!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e.SENTRY_RELEASE={id:"721d496d7d9e9a892aa890e361982b6cdcd51ec1"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="295c3553-b0fc-4c2d-86d6-ca0c8b5ac743",e._sentryDebugIdIdentifier="sentry-dbid-295c3553-b0fc-4c2d-86d6-ca0c8b5ac743")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9937],{2438:(e,t,n)=>{"use strict";function i({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return i}}),n(95155),n(47650),n(44701),n(37108),n(41144)},11509:(e,t,n)=>{"use strict";n.d(t,{_:()=>a});var i=n(12115);let l={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},o={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},r=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M11.28 17.03l4.5-4.5a.75.75 0 000-1.06l-4.5-4.5a.75.75 0 10-1.06 1.06L14.19 12l-3.97 3.97a.75.75 0 101.06 1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function a({className:e,style:t,boxSize:n,size:s,onClick:c}){return i.createElement("span",{className:e,style:{...l,...c&&{cursor:"pointer"},...s&&{fontSize:`${s}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...c?{role:"button",tabIndex:"0",onClick:c}:{}},i.createElement(r,{viewBox:"0 0 24 24",style:o}))}a.displayName="IconFdsChevronRightSmallO"},17828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return i}});let i=(0,n(64054).createAsyncLocalStorage)()},22875:(e,t,n)=>{"use strict";n.d(t,{L:()=>es,H:()=>ev,Y9:()=>eW,b:()=>H,p:()=>V,u:()=>ed,om:()=>ea}),n(33746);var i=n(95155),l=n(12115),o=n(39431),r=n(86245);let a={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},s={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},c=e=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("path",{d:"M19.03 10.28l-6.5 6.5a.75.75 0 01-1.06 0l-6.5-6.5a.75.75 0 111.06-1.06L12 15.19l5.97-5.97a.75.75 0 111.06 1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function u({className:e,style:t,boxSize:n,size:i,onClick:o}){return l.createElement("span",{className:e,style:{...a,...o&&{cursor:"pointer"},...i&&{fontSize:`${i}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(c,{viewBox:"0 0 24 24",style:s}))}u.displayName="IconFdsChevronDownO";var d=n(69666);let p={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},f={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},m=e=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("path",{d:"M6.999 7a5 5 0 1110 0 5 5 0 01-10 0zm5-3.5a3.5 3.5 0 100 7 3.5 3.5 0 000-7zM10.012 14h3.974c1.52 0 2.497 0 3.345.337a4.75 4.75 0 011.916 1.402c.579.705.875 1.636 1.335 3.085l.05.159.332 1.04a.75.75 0 11-1.43.455l-.33-1.04c-.53-1.664-.744-2.293-1.117-2.748a3.249 3.249 0 00-1.31-.959c-.547-.217-1.212-.23-2.958-.23h-3.64c-1.746 0-2.41.013-2.957.23a3.249 3.249 0 00-1.311.959c-.373.454-.587 1.084-1.116 2.748l-.331 1.04a.75.75 0 11-1.43-.455l.331-1.04.05-.159c.461-1.449.757-2.38 1.336-3.086a4.752 4.752 0 011.916-1.4C7.515 14 8.492 14 10.012 14z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function h({className:e,style:t,boxSize:n,size:i,onClick:o}){return l.createElement("span",{className:e,style:{...p,...o&&{cursor:"pointer"},...i&&{fontSize:`${i}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(m,{viewBox:"0 0 24 24",style:f}))}h.displayName="IconFdsUserO";var g=n(13622),w=n(42687),v=n(29427),b=n(65079),x=n(48822),y=n(31117),_=n(67693),C=n(50621),k=n(69478),O=n(52886),j=n(57471),S=n(11509),I=n(45822),$=n(34096),N=n(59092),A=n(51223);let R={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},T={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},E=e=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("defs",null,l.createElement("clipPath",{id:"fds-chat-dots-square-add-o_svg__a"},l.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24.001H0z"}))),l.createElement("g",{clipPath:"url(#fds-chat-dots-square-add-o_svg__a)"},l.createElement("path",{d:"M18.25 5.75V8c0 .42.33.75.75.75s.75-.33.75-.75V5.75H22c.42 0 .75-.33.75-.75s-.33-.75-.75-.75h-2.25V2c0-.42-.33-.75-.75-.75s-.75.33-.75.75v2.25H16c-.42 0-.75.33-.75.75s.33.75.75.75h2.25zm-4.546-2.23c-.259-.014-.827-.02-1.704-.02-.676 0-1.129.002-1.358.007a7.963 7.963 0 00-.779.047 7.246 7.246 0 00-2.328.689 7.204 7.204 0 00-4.028 6.4c-.005.228-.007.68-.007 1.357 0 .671.002 1.121.007 1.349.007.324.023.584.047.778.057.474.158.933.303 1.378v.001a7.17 7.17 0 001.76 2.867 7.169 7.169 0 002.92 1.777 7.436 7.436 0 002.108.341c.228.006.68.009 1.355.009.67 0 1.12-.003 1.346-.009a7.12 7.12 0 00.794-.057c.476-.05.96-.162 1.455-.333a.71.71 0 01.685.102c.662.48 1.32.829 1.976 1.047a4.85 4.85 0 001.482.264c.142.002.278-.004.41-.016a10.758 10.758 0 01-.222-.535c-.45-1.164-.676-2.305-.676-3.423a.74.74 0 01.116-.401 7.211 7.211 0 001.08-3.01c.024-.196.04-.456.047-.78.005-.228.007-.678.007-1.349 0-.214.002-.488.006-.822.003-.22.004-.376.004-.468 0-.42.33-.75.75-.75s.75.33.75.75c0 .098-.001.26-.004.486A70.38 70.38 0 0022 12c0 .682-.003 1.142-.008 1.381a9.337 9.337 0 01-.058.93 8.752 8.752 0 01-.393 1.737 8.757 8.757 0 01-.788 1.7c.026.866.217 1.757.571 2.674a8.847 8.847 0 00.6 1.249c.11.224.136.42.078.587-.057.168-.198.306-.423.416-.139.068-.32.13-.543.189a5 5 0 01-1.316.15 6.336 6.336 0 01-1.94-.34 8.598 8.598 0 01-2.064-1.035c-.471.14-.939.236-1.402.286a8.23 8.23 0 01-.93.067c-.24.006-.701.009-1.384.009-.688 0-1.152-.003-1.392-.009a8.222 8.222 0 01-.937-.067 8.672 8.672 0 01-3.989-1.538 8.707 8.707 0 01-2.077-2.078 8.705 8.705 0 01-1.597-4.927A78.972 78.972 0 012 12c0-.687.003-1.15.008-1.39.008-.376.027-.686.057-.93a8.737 8.737 0 01.832-2.806 8.69 8.69 0 013.977-3.977 8.7 8.7 0 012.803-.831c.246-.03.557-.05.933-.058C10.85 2.003 11.313 2 12 2c.902 0 1.495.007 1.779.021.42.021.732.367.712.787a.743.743 0 01-.787.711zm-5.91 9.19a1 1 0 111.412-1.414 1 1 0 01-1.413 1.415zm3.497-1.412a1 1 0 101.418 1.41 1 1 0 00-1.418-1.41zm3.502 1.413a1 1 0 111.414-1.415 1 1 0 01-1.414 1.415z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})));function P({className:e,style:t,boxSize:n,size:i,onClick:o}){return l.createElement("span",{className:e,style:{...R,...o&&{cursor:"pointer"},...i&&{fontSize:`${i}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(E,{viewBox:"0 0 24 24",style:T}))}P.displayName="IconFdsChatDotsSquareAddO";let z={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},M={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},B=e=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("defs",null,l.createElement("clipPath",{id:"fds-menu-skewed-o_svg__a"},l.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24.001H0z"}))),l.createElement("g",{clipPath:"url(#fds-menu-skewed-o_svg__a)"},l.createElement("path",{d:"M7.75 5a.75.75 0 100 1.5h13.5a.75.75 0 100-1.5H7.75zM22 12a.75.75 0 00-.75-.75H2.75a.75.75 0 100 1.5h18.5A.75.75 0 0022 12zm-5.75 5.5a.75.75 0 110 1.5H2.75a.75.75 0 110-1.5h13.5z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})));function L({className:e,style:t,boxSize:n,size:i,onClick:o}){return l.createElement("span",{className:e,style:{...z,...o&&{cursor:"pointer"},...i&&{fontSize:`${i}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(B,{viewBox:"0 0 24 24",style:M}))}L.displayName="IconFdsMenuSkewedO";let F=e=>{let[t,n]=(0,l.useState)(e);return(0,l.useEffect)(()=>{e&&n(!0)},[e]),e||t},W=()=>{let e=(0,l.useRef)(null),t=(0,l.useCallback)(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),n=(0,l.useCallback)((t,n)=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,t()},n)},[]);return(0,l.useEffect)(()=>t,[t]),{start:n,clear:t,pending:!!e.current}},U=(0,y.g)("certificates-warning-banner","sc"),D=(0,y.g)("certificates-warning-popup","sc"),H=Object.freeze({wrapper:`${U}`,container:`${U}__container`,content:`${U}__content`,info:`${U}__info`,image:`${U}__image`,text:`${U}__text`,title:`${U}__title`,description:`${U}__description`,details:`${U}__details`,buttons:`${U}__buttons`,button:`${U}__button`,closeButton:`${U}__close-button`,mobileActivator:`${U}__mobile-activator`}),V=Object.freeze({modal:`${D}__modal`,desktopCloseButton:`${D}__desktop-close-button`,mobilePopup:`${D}__mobile-popup`,mobileContentContainer:`${D}__mobile-content-container`,mobileCloseButton:`${D}__mobile-close-button`,mobileDialog:`${D}__mobile-dialog`,content:`${D}__content`,image:`${D}__image`,text:`${D}__text`,title:`${D}__title`,description:`${D}__description`,actions:`${D}__actions`,primaryActions:`${D}__primary-actions`,divider:`${D}__divider`,explanation:`${D}__explanation`,button:`${D}__button`,gosuslugiButton:`${D}__gosuslugi-button`,gosuslugiIcon:`${D}__gosuslugi-icon`}),G="fu_certificates_access_confirmed",q="fu_certificates_banner_dismissed",J="fu_external_link_warning_shown",Y=new Map,K=e=>{if(typeof window>"u")return"1"===Y.get(e);try{return"1"===window.localStorage.getItem(e)||"1"===Y.get(e)}catch{return"1"===Y.get(e)}},X=e=>{if(Y.set(e,"1"),!(typeof window>"u"))try{window.localStorage.setItem(e,"1")}catch{}},Z=(e,t)=>{if(!e)return null;try{let n,i,l=new URL(e.toString(),t.href);return"http:"!==l.protocol&&"https:"!==l.protocol||(n=l.hostname,i=t.hostname,n===i||"finuslugi.ru"===n||n.endsWith(".finuslugi.ru"))?null:l}catch{return null}},Q={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},ee={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},et=e=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("path",{d:"M3 9.998a9 9 0 0118 0c0 2.08-.89 4.273-2.029 6.249-1.148 1.991-2.6 3.844-3.826 5.262a4.123 4.123 0 01-6.29 0c-1.227-1.418-2.678-3.271-3.826-5.262C3.889 14.27 3 12.077 3 9.998zm9-7.5a7.5 7.5 0 00-7.5 7.5c0 1.688.737 3.607 1.828 5.5 1.083 1.877 2.468 3.65 3.661 5.029 1.084 1.251 2.938 1.251 4.022 0 1.193-1.379 2.578-3.152 3.66-5.03 1.092-1.893 1.829-3.81 1.829-5.499a7.5 7.5 0 00-7.5-7.5zm-4 7.5a4 4 0 118 0 4 4 0 01-8 0zm4-2.5a2.5 2.5 0 100 5 2.5 2.5 0 000-5z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function en({className:e,style:t,boxSize:n,size:i,onClick:o}){return l.createElement("span",{className:e,style:{...Q,...o&&{cursor:"pointer"},...i&&{fontSize:`${i}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(et,{viewBox:"0 0 24 24",style:ee}))}en.displayName="IconFdsLocationO";let ei=(0,_.g)(),el=(0,_.a)(ei),eo={regions:ei,towns:el,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},er=(0,l.createContext)(eo);function ea(){return(0,l.useContext)(er)}let es=({children:e,initialRegion:t,initialTown:n,showStartGeoPopup:o=!0,lastRegionsUpdateUnixTimestamp:r,showcaseUrl:a="",dadataUrl:s=(0,_.d)(a,"/backend/money/dadata"),useNewCitiesApi:c=!1})=>{let u=(0,_.e)(c),d=Number((0,_.p)(u.lastRegionsUpdateUnixTimestamp)||0),p=Number(r||0)>d,[f,m]=(0,l.useState)((0,_.g)(c)),h=(0,l.useRef)(f),[{startRegion:g,startTown:w},v]=(0,l.useState)({startRegion:eo.startRegion,startTown:eo.startTown}),b=t??eo.region,y=n??eo.town,[{region:C,town:k},O]=(0,l.useState)({region:b,town:y}),[j,S]=(0,l.useState)(eo.startPopupVisible),[I,$]=(0,l.useState)(eo.popupVisible),N=(0,l.useRef)(""),A=(0,l.useRef)(!1),R=(0,l.useMemo)(()=>(0,_.a)(f),[f]);(0,l.useEffect)(()=>{h.current=f},[f]);let T=(0,l.useCallback)((e,t)=>{window.sessionStorage.setItem("start_popup_opened","1"),window.localStorage.setItem("auto_town",JSON.stringify(t)||""),window.localStorage.setItem("auto_region",JSON.stringify(e)||""),S(!0),v({startRegion:e,startTown:t})},[S,v]),E=(0,l.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||T(e,t)},[T]),P=(0,l.useCallback)(()=>{if(N.current&&!C&&!k){let e=R.find(e=>e.name===N.current)??null;return E(f.find(t=>t.id===(null==e?void 0:e.parentId))??null,e)}E(C,k)},[C,k,R,f,E]),z=(0,l.useCallback)(e=>{$(e)},[$]),M=(0,l.useCallback)((e,t)=>{if(!e&&!t){window.localStorage.setItem(u.allRussiaSelected,"1"),window.localStorage.setItem(u.userRegion,""),window.localStorage.setItem(u.userTown,""),(0,_.s)(null,null,c);return}window.localStorage.setItem(u.allRussiaSelected,"0"),window.localStorage.setItem(u.userRegion,JSON.stringify(e)||""),window.localStorage.setItem(u.userTown,JSON.stringify(t)||""),(0,_.s)(e||null,t||null,c)},[u,c]),B=(0,l.useCallback)(e=>{e?(0,_.h)(x.D.icon,"location"):(0,_.h)(x.D.button,(null==k?void 0:k.name)||"Вся Россия"),!o||window.sessionStorage.getItem("start_popup_opened")?z(!0):P()},[o,k,z,P]),L=(0,l.useCallback)((e,t)=>{M(e,t),O({region:e||null,town:t||null}),S(!1),z(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[z,M]),F=()=>{let e=(0,_.f)(u.userRegion),t=e??(0,_.p)(u.userRegion),n=(0,_.f)(u.userTown)??(0,_.p)(u.userTown),i=(0,_.b)(h.current,t,n),l=c&&(0,_.j)(t,n);(0,_.k)(e,i.region)&&(0,_.s)(i.region,i.town,c),l&&(A.current=!0),l&&(0,_.c)(i.region,i.town)&&(M(i.region,i.town),A.current=!1),O(i);let r=async({coords:{latitude:e,longitude:t}})=>{let n=`${s}?lat=${e}&lon=${t}`,i=await (0,_.m)(n);null!=i&&i.location&&(N.current=i.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&o)try{navigator.geolocation.getCurrentPosition(r,()=>null)}catch{}};return(0,l.useEffect)(()=>{(!(0,_.i)(f,c)||p)&&(0,_.l)({showcaseUrl:a,useNewCitiesApi:c}).then(e=>{e.length<1||m(e)})},[]),(0,l.useEffect)(()=>{let e=(0,_.b)(f,C,k);A.current&&(0,_.c)(e.region,e.town)&&(M(e.region,e.town),A.current=!1),O(e)},[f,C,M,k]),(0,l.useEffect)(()=>{if(window.innerWidth<1024){let e=()=>{F(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{F()},0)},[]),(0,i.jsx)(er.Provider,{value:{regions:f,towns:R,region:C,town:k,startPopupVisible:j,setStartPopupVisible:S,popupVisible:I,handleToggleModal:z,selectCity:L,handleButtonClick:B,startRegion:g,startTown:w},children:e})},ec={"uat-mp.beta.moex.com":"//chat-marketplace.beta.moex.com","finuslugi.ru":"//chat.finuslugi.ru","dev-rc.beta.moex.com":"//dev-opbot.tech.finuslugi.ru"},eu=(0,l.createContext)({isAuth:!1,isHeaderHidden:!1,isHeaderTransparent:!1,openedBlock:null,setOpenedBlock:()=>null,openedSection:null,setOpenedSection:()=>null,isNavigationOpen:!1,isNavigationMounted:!1,navMenuItemsRef:{current:null},navigationRef:{current:null},ignoreClicks:!1,setIgnoreClicks:()=>null,isChatModalOpen:!1,setIsChatModalOpen:()=>null,isChatLoading:!1,fixedContainerRef:{current:null},headerRef:{current:null}});function ed(){return(0,l.useContext)(eu)}let ep=e=>{let[t,n]=(0,l.useState)(!1),[o,r]=(0,l.useState)(!1),[a,s]=(0,l.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:d}=(()=>{let[e,t]=(0,l.useState)(!1),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(!1),r=e=>{o.current=e,i(e)};return(0,l.useEffect)(()=>{if(typeof window>"u")return;let e=(()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(ec,e)?ec[e]:ec["finuslugi.ru"]})(),n="webchat_main";window.supportWidget={craftTalk:{isOpened:!1,setConfig:t=>{if(t.host&&(e=t.host),t.channel&&(n=t.channel),t.user){let e="function"==typeof t.user?t.user:()=>({...t.user});window.__WebchatUserCallback=e}},open:()=>new Promise(e=>{e()}),close:()=>null,toggle:()=>null}};let i=null;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.open=()=>new Promise((l,a)=>{var s,c;let u,d;o.current?a(Error("chat is already opened")):i?(i.openWidget(),t(!1),l()):(r(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;i=e;let o=document.querySelector(".webchat");o&&new MutationObserver(e=>{e.forEach(e=>{if("style"===e.attributeName){let e=document.querySelector(".webchat"),t=!!e&&"none"!==e.style.display;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.isOpened=t)}})}).observe(o,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=i.closeWidget),null==i||i.openWidget(),r(!1),t(!1),l()},s=e,c=n,(u=document.createElement("link")).rel="stylesheet",u.type="text/css",u.href=`${s}/assets/css/${c}`,document.head.appendChild(u),(d=document.createElement("script")).src=`${s}/get-bootstrap/${c}`,d.defer=!0,document.body.appendChild(d))}),window.supportWidget.craftTalk.toggle=()=>{var e,t,n,i;null!=(t=null==(e=window.supportWidget)?void 0:e.craftTalk)&&t.isOpened?window.supportWidget.craftTalk.close():null==(i=null==(n=window.supportWidget)?void 0:n.craftTalk)||i.open()})},[]),{isChatModalOpen:e,setIsChatModalOpen:t,isChatLoading:n}})(),[p,f]=(0,l.useState)(null),[m,h]=(0,l.useState)(null),[g,w]=(0,l.useState)(!1),[v,b]=(0,l.useState)(!1),[x,y]=(0,l.useState)(!1),_=(0,l.useRef)(null),O=(0,C.u)(g),j=(0,l.useRef)(null),S=(0,l.useRef)(null),I=(0,l.useRef)(null),$=(0,l.useRef)(null),N=(0,l.useCallback)(()=>{O.current&&O.current.scrollTo({top:0})},[O]),A=(0,l.useCallback)(e=>{h(e),N()},[N]),R=(0,l.useCallback)(e=>{j.current&&clearTimeout(j.current),e&&b(!0),e||(j.current=setTimeout(()=>{b(!1),A(null)},300))},[A]),T=(0,l.useCallback)((e,t,n)=>{if(t&&A(t),!n&&e===p||!e){R(!g),w(!g);return}f(e),R(!0),w(!0)},[p,A,g,R]),E=(0,l.useCallback)(()=>{S.current&&clearTimeout(S.current),y(!0),S.current=setTimeout(()=>{y(!1)},650)},[]);return(0,l.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id"));let t=(0,k.s)(r,s,e.isMainBannerPage);return(0,k.i)(),t},[]),(0,i.jsx)("header",{children:(0,i.jsx)(eu.Provider,{value:{isAuth:t,isHeaderHidden:o,isHeaderTransparent:a,openedBlock:p,setOpenedBlock:T,openedSection:m,setOpenedSection:A,isNavigationOpen:g,isNavigationMounted:v,navMenuItemsRef:_,navigationRef:O,ignoreClicks:x,setIgnoreClicks:E,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:d,fixedContainerRef:I,headerRef:$},children:e.children})})},ef=(0,y.g)("city-select","sc"),em=Object.freeze({button:`${ef}__button`,minimal:`${ef}__minimal`,full:`${ef}__full`}),eh=(0,o.default)(()=>Promise.all([n.e(621),n.e(2545),n.e(8420),n.e(578)]).then(n.bind(n,30578)).then(e=>e.CitySelectModal),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/CitySelectModal-DgX5KtbX.mjs")]},ssr:!1}),eg=(0,o.default)(()=>n.e(5659).then(n.bind(n,75659)).then(e=>e.StartChoicePopup),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/StartChoicePopup-BlKfoo1M.mjs")]},ssr:!1}),ew=({initialTown:e})=>{var t;let n=ea(),o=(null==(t=n.town)?void 0:t.name)||e||"Вся Россия",{setIsChatModalOpen:r,isChatModalOpen:a}=ed(),{startPopupVisible:s,setStartPopupVisible:c,popupVisible:u}=n,d=F(u),p=F(s),f=(0,l.useRef)();(0,l.useEffect)(()=>{u&&(f.current="popup")},[u]),(0,l.useEffect)(()=>{a&&(f.current="chat")},[a]),(0,l.useEffect)(()=>{s&&(f.current="startPopup")},[s]),(0,l.useEffect)(()=>{f.current&&("chat"===f.current&&s?c(!1):["startPopup","popup"].includes(f.current)&&a&&r(!1))},[u,a,s,c,r]);let m={appearance:"ghost",size:"xs",onClick:()=>n.handleButtonClick(!1),iconLeft:(0,i.jsx)(en,{size:24})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.$,{...m,className:(0,v.A)(em.button,em.full),label:o}),(0,i.jsx)(g.$,{...m,className:(0,v.A)(em.button,em.minimal),shape:"icon"}),d&&(0,i.jsx)(eh,{}),p&&(0,i.jsx)(eg,{})]})},ev=({label:e,onClick:t,eventActionText:n,eventLabel:l,...o})=>(0,i.jsx)(g.$,{label:e,onClick:e=>{null==t||t(e),(0,x.h)({eventCategory:O.H,eventActionType:x.D.button,eventActionText:n||"",eventLabel:l||""})},...o}),eb=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:l,...o})=>(0,i.jsx)(j.N,{onClick:i=>{null==e||e(i),(0,x.h)({eventCategory:O.H,eventActionType:t||x.D.link,eventActionText:n||"",eventLabel:l||""})},...o}),ex={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},ey={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},e_=e=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("path",{d:"M7.22 12.53a.75.75 0 010-1.06l6.5-6.5a.75.75 0 111.06 1.06L8.81 12l5.97 5.97a.75.75 0 11-1.06 1.06l-6.5-6.5z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function eC({className:e,style:t,boxSize:n,size:i,onClick:o}){return l.createElement("span",{className:e,style:{...ex,...o&&{cursor:"pointer"},...i&&{fontSize:`${i}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},l.createElement(e_,{viewBox:"0 0 24 24",style:ey}))}eC.displayName="IconFdsChevronLeftO";let ek=(0,y.g)("header-chat-modal-body","sc"),eO=Object.freeze({wrapper:`${ek}__wrapper`,cardButton:`${ek}__card-button`,card:`${ek}__card`,cardTitle:`${ek}__card-title`,cardSubtitle:`${ek}__card-subtitle`,button:`${ek}__button`}),ej=()=>{let e=ed();return(0,i.jsxs)("div",{className:eO.wrapper,children:[(0,i.jsx)(ev,{className:eO.cardButton,variant:"secondary",pending:e.isChatLoading,onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},eventActionText:"Напишите в чат",children:(0,i.jsxs)($.Z,{className:eO.card,variant:"secondary",children:[(0,i.jsxs)("div",{className:eO.cardTitle,children:[(0,i.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat",width:24,height:24,loading:"lazy"}),"Напишите в чат"]}),(0,i.jsxs)("p",{className:eO.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,i.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),!1]})},eS=({data:e,isMobile:t})=>{let n=ed();return(0,i.jsx)("div",{className:A.s.contentWrapper,children:e.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>{var l;return(0,i.jsxs)("div",{className:(0,v.A)(A.s.content,{[A.s.hidden]:n.openedSection!==e.id,[A.s.contentOpen]:!!n.openedSection}),children:[(0,i.jsx)("div",{className:A.s.contentHeader,children:(0,i.jsx)("label",{children:e.title})}),null==(l=e.content)?void 0:l.map((n,l)=>{var o,r;return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:(0,i.jsx)("a",{className:(0,v.A)(A.s.contentTitle,{[A.s.removed]:!n.title,[A.s.contentTitleUrl]:!!n.url,[A.s.contentTitleLink]:!!e.isSeeAllLinkAvailable,[A.s.contentTitleNew]:!!n.new}),href:e.isSeeAllLinkAvailable?n.url:void 0,children:(0,i.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,i.jsx)("div",{className:A.s.arrowIcon,children:(0,i.jsx)(N.K,{})}),n.title]})})}),!(null!=(o=n.links)&&o.length)&&(0,i.jsx)(A.N,{items:n.chips||[],maxNumberOfLines:e.content.length<=1?99:t?3:2}),!!(null!=(r=n.links)&&r.length)&&(0,i.jsx)("div",{className:(0,v.A)(A.s.links,{[A.s.linksColumns]:!!n.columns,[A.s.linksTitleless]:!n.title}),children:n.links.map((e,t)=>(0,i.jsxs)("a",{href:e.url,onClick:()=>(0,k.h)(x.D.link,e.title,`${e.title}_${e.url}`),children:[(0,i.jsx)("div",{className:A.s.arrowIcon,children:(0,i.jsx)(N.K,{})}),(0,i.jsxs)("span",{children:[(0,i.jsx)("span",{children:e.title}),!!e.new&&(0,i.jsx)("span",{className:(0,v.A)({[A.s.newInline]:!!e.new})})]})]},`${e.url}_${t}`))})]},`${n.url}_${l}`)})]},e.id)})},e.id))})},eI=(0,y.g)("navigation-section-icon","sc"),e$=Object.freeze({icon:`${eI}`}),eN=()=>n.e(5977).then(n.bind(n,65977)),eA={IconFdsAcademicCapO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsAcademicCapO),IconFdsBankO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsBankO),IconFdsBookOpenO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsBookOpenO),IconFdsCalculatorO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsCalculatorO),IconFdsCardO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsCardO),IconFdsChatDotsCircleO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsChatDotsCircleO),IconFdsCoinMultipleO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsCoinMultipleO),IconFdsDotsHorizontalO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsDotsHorizontalO),IconFdsFlashO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsFlashO),IconFdsGraphO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsGraphO),IconFdsLayoutHorizontalO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsLayoutHorizontalO),IconFdsPortfolioO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsPortfolioO),IconFdsRubleCircleO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsRubleCircleO),IconFdsSafeO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsSafeO),IconFdsShieldCheckO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsShieldCheckO),IconFdsWalletO:()=>eN().then(({navigationSectionIcons:e})=>e.IconFdsWalletO)},eR=e=>Object.prototype.hasOwnProperty.call(eA,e),eT=({name:e,background:t})=>{let[n,o]=(0,l.useState)(null);if((0,l.useEffect)(()=>{if(!e||!eR(e))return void o(null);let t=!0;return eA[e]().then(n=>{t&&o({name:e,component:n})}).catch(()=>{t&&o(null)}),()=>{t=!1}},[e]),!e||!eR(e))return null;let r=(null==n?void 0:n.name)===e?n.component:null;return(0,i.jsx)("div",{className:e$.icon,style:{background:t},children:r&&(0,i.jsx)(r,{})})},eE=(0,y.g)("navigation","sc"),eP=Object.freeze({navigation:`${eE}`,navigationOpening:`${eE}--opening`,navigationClosing:`${eE}--closing`,wrapper:`${eE}__wrapper`,container:`${eE}__container`,containerOpen:`${eE}__container--open`,sections:`${eE}__sections`,sectionsOpen:`${eE}__sections--open`,citySelectButton:`${eE}__city-select-button`,sectionsTitle:`${eE}__sections-title`,sectionsWrapper:`${eE}__sections-wrapper`,section:`${eE}__section`,sectionArrow:`${eE}__section-arrow`,sectionExtra:`${eE}__section--extra`,sectionActive:`${eE}__section--active`,sectionTitle:`${eE}__section-title`,chatWrapper:`${eE}__chat-wrapper`,chatHeader:`${eE}__chat-header`,backButton:`${eE}__back-button`,useful:`${eE}__useful`,usefulOpen:`${eE}__useful--open`,usefulTitle:`${eE}__useful-title`,usefulGrid:`${eE}__useful-grid`,removed:`${eE}__removed`}),ez=({data:e})=>{var t;let n=ed(),o=ea(),r=(0,I.nu)("m"),[a,s]=(0,l.useState)(!0);(0,l.useEffect)(()=>{s(r)},[r]);let c=(0,l.useRef)(null),u=(0,l.useCallback)(()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>n.openedSection?n.setOpenedSection(null):n.isNavigationOpen?n.setOpenedBlock(null):void 0,50)},[n]),d=(0,l.useRef)(!1),p=(0,l.useRef)(null),f=(0,l.useCallback)(()=>{a&&(d.current=!0,p.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),u()},window.history.pushState(null,"",window.location.href))},[u,a]),m=(0,l.useCallback)(()=>{d.current=!1,window.onpopstate=p.current,window.history.go(-1)},[]),h=(0,l.useRef)(null),b=(0,l.useCallback)(e=>{if(a||!n.navMenuItemsRef.current||!n.navigationRef.current)return;let t=e.target,i=!n.navMenuItemsRef.current.contains(t)&&!n.navigationRef.current.contains(t);if(i&&!h.current){n.setIgnoreClicks(),h.current=setTimeout(()=>n.setOpenedBlock(null),300);return}!i&&h.current&&(clearTimeout(h.current),h.current=null)},[a,n]),y=(0,l.useRef)(null),_=(0,l.useCallback)(e=>{typeof window>"u"||(e?(y.current=b,window.addEventListener("mousemove",y.current)):y.current&&window.removeEventListener("mousemove",y.current))},[b]);(0,l.useEffect)(()=>{_(n.isNavigationOpen),n.isNavigationOpen&&!d.current&&f(),!n.isNavigationOpen&&d.current&&m()},[n.isNavigationOpen]);let C=(e,t)=>()=>{(0,k.h)(x.D.button,t),n.setOpenedSection(e)},{start:j,clear:$}=W(),N=()=>{a||$()};return(0,i.jsx)("div",{ref:n.navigationRef,className:(0,v.A)(eP.navigation,{[eP.removed]:!n.isNavigationMounted,[eP.navigationOpening]:n.isNavigationOpen,[eP.navigationClosing]:!n.isNavigationOpen}),children:(0,i.jsx)("div",{className:eP.wrapper,children:(0,i.jsxs)(w.m,{className:(0,v.A)(eP.container,{[eP.containerOpen]:!!n.openedSection}),children:[(0,i.jsxs)("div",{className:(0,v.A)(eP.sections,{[eP.sectionsOpen]:!!n.openedSection}),children:[(0,i.jsx)(g.$,{className:eP.citySelectButton,variant:"violet",appearance:"ghost",size:"xs",onClick:()=>o.handleButtonClick(!1),iconLeft:(0,i.jsx)(en,{size:24}),label:(null==(t=o.town)?void 0:t.name)||"Вся Россия"}),e.map(e=>(0,i.jsxs)("ul",{className:(0,v.A)(eP.sectionsWrapper,{[eP.removed]:n.openedBlock!==e.id&&!a}),children:[(0,i.jsx)("div",{className:eP.sectionsTitle,children:O.a[e.id]}),e.sections.map(e=>{let t,l;return(0,i.jsxs)("li",{className:(0,v.A)(eP.section,{[eP.sectionExtra]:!!e.extra,[eP.sectionActive]:n.openedSection===e.id}),onClick:C(e.id,e.title),onMouseEnter:(t=e.id,l=e.title,()=>{a||j(C(t,l),150)}),onMouseLeave:N,children:[n.isNavigationMounted&&(0,i.jsx)(eT,{name:e.uikitIcon,background:e.uikitIconBg}),(0,i.jsx)("span",{className:eP.sectionTitle,children:e.title}),(0,i.jsx)("div",{className:eP.sectionArrow,children:(0,i.jsx)(S._,{size:24})})]},e.id)})]},e.id)),(0,i.jsxs)("div",{className:eP.chatWrapper,children:[(0,i.jsx)("div",{className:eP.chatHeader,children:"Нужна помощь?"}),(0,i.jsx)(ej,{})]})]}),(0,i.jsxs)("button",{type:"button",className:(0,v.A)(eP.backButton,{[eP.removed]:!n.openedSection}),onClick:()=>{(0,k.h)(x.D.button,"Назад"),n.setOpenedSection(null)},children:[(0,i.jsx)(eC,{size:24}),(0,i.jsx)("span",{children:"Назад"})]}),(0,i.jsx)(eS,{data:e,isMobile:a}),(0,i.jsxs)("div",{className:(0,v.A)(eP.useful,{[eP.usefulOpen]:!!n.openedSection}),children:[(0,i.jsx)("div",{className:eP.usefulTitle,children:"Полезное на Финуслугах"}),e.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>{var t;return(0,i.jsx)("div",{className:(0,v.A)(eP.usefulGrid,{[eP.removed]:n.openedSection!==e.id}),children:null==(t=e.useful)?void 0:t.map((e,t)=>(0,i.jsxs)("a",{href:e.url,onClick:()=>(0,k.h)(x.D.link,e.title,`${e.title}_${e.url}`),children:[(0,i.jsx)("div",{children:(0,i.jsx)("img",{src:e.icon,srcSet:e.icon2?`${e.icon}, ${e.icon2} 2x`:void 0,alt:e.title,loading:"lazy"})}),(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},`${e.title}_${t}`))},e.id)})},e.id))]})]})})})},eM=(0,o.default)(()=>n.e(7289).then(n.bind(n,67289)).then(e=>e.CertificatesWarningBanner),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/CertificatesWarningBanner-BPl0-f-t.mjs")]},ssr:!1}),eB=(0,o.default)(()=>Promise.all([n.e(621),n.e(2545),n.e(8420),n.e(9642)]).then(n.bind(n,39642)).then(e=>e.CertificatesWarningPopup),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/CertificatesWarningPopup-CeN5nBOR.mjs")]},ssr:!1}),eL=(0,o.default)(()=>n.e(331).then(n.bind(n,20331)).then(e=>e.HeaderMobileAppBanner),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/HeaderMobileAppBanner-C6MgJm_-.mjs")]},ssr:!1}),eF=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",lkUrl:o="https://lk.finuslugi.ru/registration",initialTown:a,isMainBannerPage:s,enableAppHeaderBanner:c=!1,enableCertificatesBanner:p=!1,enableExternalLinkWarning:f=!1,certificatesWarningProduct:m,news:y,className:_})=>{let C=ed(),j=(0,l.useMemo)(()=>((e,t,n)=>{var i,l,o,r,a,s,c;let u=(null==(l=null==(i=null==e?void 0:e.NAVIGATOR)?void 0:i.findIndex)?void 0:l.call(i,({id:e})=>"news"===e))??-1,d=(null==(r=null==(o=null==e?void 0:e.NAVIGATOR)?void 0:o[u])?void 0:r.content)||[];if(null!=(c=null==(s=null==(a=null==e?void 0:e.NAVIGATOR)?void 0:a[u])?void 0:s.content)&&c[0]&&Array.isArray(n)&&d.length){let i=n.map(({title:e,url:n})=>({title:e,url:(0,b.oq)(t||"",n),new:0}));e.NAVIGATOR[u].content[0].links=i}return[{id:"FINPRODUCTS",sections:Array.isArray(null==e?void 0:e.FINPRODUCTS)?null==e?void 0:e.FINPRODUCTS:[]},{id:"NAVIGATOR",sections:Array.isArray(null==e?void 0:e.NAVIGATOR)?null==e?void 0:e.NAVIGATOR:[]},{id:"ABOUT",sections:Array.isArray(null==e?void 0:e.ABOUT)?null==e?void 0:e.ABOUT:[]}]})(e,t,y),[e,t,y]),S=null==e?void 0:e.config,I=!!e&&p&&!!s,$=(({enableCertificatesBanner:e,enableExternalLinkWarning:t,isMainBannerPage:n})=>{let[i,o]=(0,l.useState)("checking"),[r,a]=(0,l.useState)(!1),[s,c]=(0,l.useState)(!1),[u,d]=(0,l.useState)(!1),[p,f]=(0,l.useState)(!1),m=(0,l.useRef)(),h=(0,l.useRef)(!1),g=(0,l.useRef)(!1),w=(0,l.useRef)(!1);(0,l.useRef)(null);let v=(0,l.useRef)(null),b=(0,l.useRef)(null),x=(0,l.useRef)(null),y=e&&n,_=y||t,C=(0,l.useCallback)(e=>{let t=m.current;t?t.call(window,e,"_blank","noopener,noreferrer"):window.open(e,"_blank","noopener,noreferrer")},[]),k=(0,l.useCallback)(()=>{a(!1),w.current=!1,v.current=null,b.current=null,x.current=null,f(!1)},[]),O=(0,l.useCallback)(e=>{X(J),g.current=!0,w.current=!1,v.current=e,f("external"===e&&null!==b.current),a(!0)},[]),j=(0,l.useCallback)(()=>!h.current&&("external"===v.current&&!w.current||!g.current),[]),S=(0,l.useCallback)(()=>{"external"!==v.current&&O("external")},[O]);(0,l.useEffect)(()=>{m.current=window.open;let e=window.navigator.userAgent.includes("YaBrowser/");return e&&X(G),h.current=e||K(G),g.current=K(J),d(h.current),c(!0),()=>{b.current=null,x.current=null}},[]),(0,l.useEffect)(()=>{if(s){if(!y)return void o("skipped");o(e=>"shown"===e||"closing"===e||"dismissed"===e?e:u||K(q)?"skipped":"shown")}},[u,y,s]),(0,l.useEffect)(()=>{},[k,_,s]),(0,l.useEffect)(()=>{if(!s||!t)return;let e=m.current;if(!e)return;let n=!0,i=e=>{if(0!==e.button&&1!==e.button||!(e.target instanceof Element))return;let t=e.target.closest("a[href]");if(!t||e.defaultPrevented)return;let i=Z(t.href,window.location);if(!i||!j())return;e.preventDefault(),null===b.current&&(b.current=i.href,x.current={source:"external_anchor",host:i.hostname});let l=b.current;queueMicrotask(()=>{n&&j()&&b.current===l&&S()})},l=(t,n="_blank",i)=>{let l=Z(t,window.location);return l&&j()?(null===b.current&&(b.current=l.href,x.current={source:"external_window_open",host:l.hostname}),S(),null):e.call(window,t,n,i)};return window.open=l,document.addEventListener("click",i,!0),document.addEventListener("auxclick",i,!0),()=>{n=!1,document.removeEventListener("click",i,!0),document.removeEventListener("auxclick",i,!0),window.open===l&&(window.open=e)}},[t,s,j,S]),(0,l.useEffect)(()=>{var e;t||(b.current=null,(null==(e=x.current)?void 0:e.source)!=="banner"&&(x.current=null),f(!1),"external"===v.current&&k())},[k,t]),(0,l.useEffect)(()=>{y||"banner"===v.current&&k()},[k,y]),(0,l.useEffect)(()=>{_||k()},[k,_]);let I=(0,l.useCallback)(()=>{X(q),o("closing")},[]),$=(0,l.useCallback)(()=>{o("dismissed")},[]),N=(0,l.useCallback)(()=>{b.current=null,x.current={source:"banner"},O("banner")},[O]),A=(0,l.useCallback)(()=>{C("https://www.gosuslugi.ru/crt")},[C]),R=(0,l.useCallback)(()=>{C("https://browser.yandex.ru/")},[C]),T=(0,l.useCallback)(()=>{let e=b.current;e&&(X(J),g.current=!0,w.current=!0,C(e))},[C]);return{bannerStatus:i,isPopupOpen:r,popupAnalyticsContext:x.current,dismissBanner:I,finishBannerClosing:$,openPopupFromBanner:N,closePopup:k,openCertificatesPage:A,openYandexBrowserPage:R,continueToExternalPage:p?T:void 0}})({enableCertificatesBanner:I,enableExternalLinkWarning:f,isMainBannerPage:!!s}),N="shown"===$.bannerStatus||"closing"===$.bannerStatus,A=!I||"skipped"===$.bannerStatus,R=F($.isPopupOpen),T=(0,l.useMemo)(()=>j.reduce((e,t)=>{var n;return e[t.id]=null==(n=t.sections[0])?void 0:n.id,e},{}),[j]),E=C.isAuth?"Личный кабинет":"Войти",z=s&&C.isHeaderTransparent,M=(e,t,n,i)=>()=>{e!==C.openedBlock?(0,k.h)(x.D.toggle,t,"on"):(0,k.h)(x.D.button,"menu_close","on");let l=n?T[e]:"";C.setOpenedBlock(e,l,!!i)},{start:B,clear:U}=W(),D=e=>()=>{C.ignoreClicks||e()},H=R?(0,i.jsx)(eB,{isOpen:$.isPopupOpen,analyticsContext:$.popupAnalyticsContext,certificatesWarningProduct:m,onClose:$.closePopup,onOpenCertificatesPage:$.openCertificatesPage,onOpenYandexBrowserPage:$.openYandexBrowserPage,onContinue:$.continueToExternalPage}):null;return e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:C.headerRef,className:(0,v.A)(O.s.header,_,{[O.s.transparent]:z}),children:(0,i.jsxs)("div",{ref:C.fixedContainerRef,className:(0,v.A)(O.s.fixed,{[O.s.hidden]:C.isHeaderHidden,[O.s.navigationOpen]:C.isNavigationOpen}),children:[N&&(0,i.jsx)(eM,{onDismiss:$.dismissBanner,onClosed:$.finishBannerClosing,onOpenDetails:$.openPopupFromBanner,onOpenCertificatesPage:$.openCertificatesPage,onOpenYandexBrowserPage:$.openYandexBrowserPage}),A&&!!(null!=S&&S.appBannerUrl)&&c&&(0,i.jsx)(eL,{mobileAppUrl:S.appBannerUrl,minioUrl:n}),(0,i.jsxs)(w.m,{className:O.s.container,children:[(0,i.jsxs)("div",{className:O.s.leftRow,children:[(0,i.jsx)(eb,{className:O.s.logo,href:t,eventActionType:x.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${t}`,children:(0,i.jsxs)("picture",{children:[(0,i.jsx)("source",{srcSet:(0,b.oq)(n,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,i.jsx)("img",{src:(0,b.oq)(n,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,i.jsx)("nav",{ref:C.navMenuItemsRef,className:O.s.menuItems,children:(0,i.jsx)("ul",{children:O.b.map(({id:e,label:t})=>(0,i.jsx)("li",{children:(0,i.jsx)(g.$,{className:(0,v.A)({[O.s.menuItemActive]:C.openedBlock===e&&C.isNavigationOpen}),label:t,variant:"white",size:"xs",onClick:D(M(e,t,!0)),onMouseEnter:()=>{C.isNavigationOpen&&e===C.openedBlock||C.setIgnoreClicks(),B(M(e,t,!0,!0),200)},onMouseLeave:U})},e))})}),(0,i.jsx)(ev,{className:(0,v.A)(O.s.tabletMenuButton,{[O.s.menuItemActive]:C.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,i.jsx)(u,{size:24}),onClick:M("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,i.jsxs)("div",{className:(0,v.A)(O.s.buttonGroup,{[O.s.whiteIcons]:(null==S?void 0:S.iconColorOnMobileMainBanner)==="white"}),children:[(0,i.jsxs)("div",{className:O.s.chips,children:[(0,i.jsx)(ev,{as:"a",href:o,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:`profile_${o}`,iconLeft:(0,i.jsx)(h,{size:20}),"aria-label":E}),(0,i.jsx)(ev,{onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,i.jsx)(r.G,{size:24}),"aria-label":"Онлайн чат"})]}),(0,i.jsx)(ev,{className:O.s.menuButton,size:"xs",shape:z?"icon":"default",appearance:z?"ghost":"fill",label:"Меню",onClick:M("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,i.jsx)(L,{size:24})}),(0,i.jsxs)("div",{className:O.s.moreButtons,children:[(0,i.jsx)(ew,{initialTown:a}),(0,i.jsx)(ev,{onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},size:"xs",appearance:"ghost",eventActionText:"IconFdsChatDotsSquareAddO",iconLeft:(0,i.jsx)(P,{size:24}),children:"Онлайн чат"}),(0,i.jsx)(ev,{as:"a",href:o,size:"xs",eventActionText:E,eventLabel:`${E}_${o}`,label:E})]})]}),(0,i.jsxs)(eb,{className:O.s.auth,href:o,eventActionText:E,eventLabel:`${E}_${o}`,children:[(0,i.jsx)(ev,{size:"xs",shape:"circle-icon",iconLeft:(0,i.jsx)(h,{}),eventActionText:E,eventLabel:`${E}_${o}`}),(0,i.jsx)("p",{children:E})]}),(0,i.jsx)("div",{className:O.s.close,children:(0,i.jsx)(ev,{className:O.s.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,i.jsx)(d.a,{}),onClick:()=>C.setOpenedBlock(null),eventActionText:"IconFdsCloseO","aria-label":"Закрыть"})})]})]})}),(0,i.jsx)("div",{className:(0,v.A)(O.s.overlay,{[O.s.removed]:!C.isNavigationMounted,[O.s.overlayOpening]:C.isNavigationOpen,[O.s.overlayClosing]:!C.isNavigationOpen}),onClick:D(()=>C.setOpenedBlock(null))}),(0,i.jsx)(ez,{data:j,minioUrl:n}),H]}):f?H:null},eW=e=>(0,i.jsx)(ep,{isMainBannerPage:e.isMainBannerPage,children:(0,i.jsx)(eF,{...e})})},30607:(e,t,n)=>{"use strict";n.d(t,{a:()=>i});let i={getItem:e=>{if(typeof document>"u")return null;let t=document.cookie.split(";").find(t=>t.split("=")[0].trim()===e);return t?t.split("=")[1]??null:null},setItem:(e,t,n={})=>{if(typeof document>"u")return;(n={path:"/",...n}).expires instanceof Date&&(n.expires=n.expires.toUTCString());let i=`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;for(let e in n){if(!n.hasOwnProperty(e))continue;i+=`; ${e}`;let t=n[e];!0!==t&&(i+=`=${t}`)}document.cookie=i},removeItem:e=>{i.setItem(e,"",{"max-age":-1})}}},33746:()=>{},34096:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(95155),l=n(29427),o=n(52951);n(76610);let r=(0,o.g)("card"),a={card:r,variants:{primary:`${r}--primary`,secondary:`${r}--secondary`}},s=({as:e,className:t,style:n,children:o,variant:r="primary",dataQa:s,dataId:c,...u})=>(0,i.jsx)(e||"div",{className:(0,l.A)(t,a.card,a.variants[r]),style:n,...u,"data-id":c,"data-qa":s,children:o});s.displayName="Card"},39431:(e,t,n)=>{"use strict";n.d(t,{default:()=>l.a});var i=n(52124),l=n.n(i)},44701:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return i.workAsyncStorageInstance}});let i=n(17828)},45822:(e,t,n)=>{"use strict";n.d(t,{nu:()=>u,qF:()=>d,qK:()=>p});let i=Object.freeze({xs:Object.freeze({maxWidth:599}),s:Object.freeze({minWidth:600,maxWidth:767}),m:Object.freeze({minWidth:768,maxWidth:1023}),l:Object.freeze({minWidth:1024,maxWidth:1279}),xl:Object.freeze({minWidth:1280,maxWidth:1439}),"2xl":Object.freeze({minWidth:1440,maxWidth:1919}),"3xl":Object.freeze({minWidth:1920})}),l=Object.freeze(Object.keys(i));Object.freeze(l.filter(e=>"xs"!==e)),Object.freeze(l.filter(e=>"3xl"!==e));var o=n(12115);function r(){return"u"<typeof window}let a=r()?o.useLayoutEffect:o.useEffect;function s(e,t=!1){return r()?t:window.matchMedia(e).matches}function c(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){let[i,l]=(0,o.useState)(()=>n?s(e,t):t??!1);function r(){l(s(e))}return a(()=>{let t=window.matchMedia(e);return r(),"function"==typeof t.addListener?t.addListener(r):t.addEventListener("change",r),()=>{"function"==typeof t.removeListener?t.removeListener(r):t.removeEventListener("change",r)}},[e]),i}function u(e){let{maxWidth:t}=i[e];return c(`screen and (max-width: ${t}px)`)}function d(e){let{minWidth:t}=i[e];return c(`screen and (min-width: ${t}px)`)}function p(){let[e,t]=(0,o.useState)(!1);return(0,o.useEffect)(()=>t(!0),[]),e}},48675:(e,t,n)=>{"use strict";n.d(t,{C:()=>m,P:()=>k,U:()=>y,u:()=>d});var i=n(95155),l=n(12115),o=n(69666),r=n(29427),a=n(50621),s=n(31117),c=n(47650);let u=300,d=({opened:e})=>{let[t,n]=(0,l.useState)(!1),i=(0,l.useRef)(null),o=(0,l.useRef)(!1);return(0,l.useEffect)(()=>(e&&!o.current?(o.current=!0,n(!0)):!e&&o.current&&(i.current=setTimeout(()=>{o.current=!1,n(!1)},u)),()=>{i.current&&clearTimeout(i.current)}),[e]),{mounted:t}},p=(0,s.g)("click-outside","sc"),f=Object.freeze({overlay:`${p}__overlay`,open:`${p}--open`,close:`${p}--close`}),m=({onClose:e,onToucheMove:t,isOpen:n,delay:o=u})=>{let a=(0,l.useRef)(null),s=(0,l.useCallback)(()=>{e&&(a.current=setTimeout(()=>{e()},o))},[o,e]),c=(0,l.useCallback)(e=>{"Escape"===e.key&&s()},[s]);return(0,l.useEffect)(()=>(n&&window.addEventListener("keydown",c),()=>{a.current&&clearTimeout(a.current),window.removeEventListener("keydown",c)}),[n,c]),(0,i.jsx)("div",{className:(0,r.A)(f.overlay,{[f.open]:n,[f.close]:!n}),onTouchStart:t,onClick:s})},h=(0,s.g)("mobile-modal-footer","sc"),g=Object.freeze({footer:`${h}__footer`,footerWithoutShadow:`${h}__footer--without-shadow`}),w=({footer:e,isSmallPopup:t=!1,footerClassName:n})=>(0,i.jsx)("div",{className:(0,r.A)(g.footer,t&&g.footerWithoutShadow,n),children:"function"==typeof e?e():e}),v=(0,s.g)("mobile-popup","sc"),b=Object.freeze({mobilePopup:`${v}`,mobilePopupOpen:`${v}--open`,content:`${v}__content`,contentFull:`${v}__content--full`,contentTransition:`${v}__content--transition`,contentTransitionOpen:`${v}__content--transition-open`,contentLine:`${v}__content-line`,contentContainer:`${v}__content-container`,smallContentContainer:`${v}__content-container--small`,min:`${v}__content-container--min`,title:`${v}__title`,closeContainer:`${v}__close-container`,closeButton:`${v}__close-button`}),x=({children:e,footer:t,isOpen:n,isSmallPopup:s,onClose:c,hasCloseButton:u=!0,full:d,touchDistance:p=100,withDisabledScroll:f=!0,contentClassName:h,className:g,title:v,closeButton:x,footerClassName:y})=>{let[_,C]=(0,l.useState)(!1),[k,O]=(0,l.useState)(!1),[j,S]=(0,l.useState)(!0),[I,$]=(0,l.useState)("120%"),N=(0,l.useRef)(null),A=(0,l.useRef)(0),R=(0,l.useRef)(!1),T=e=>{var t,n,i;let l=null==(t=N.current)?void 0:t.offsetTop,o=null==(n=N.current)?void 0:n.offsetHeight;if(R.current=!0,S(!1),l&&o){let t=(null==(i=null==e?void 0:e.touches[0])?void 0:i.clientY)-l,n=0;t>=0&&t<=o+30&&(n=t),t>o+30&&(n=o+30),$(`${n}px`),A.current=n}},E=()=>{R.current&&(A.current>p&&c?null==c||c():$("0"),S(!0),R.current=!1),window.removeEventListener("touchmove",T),window.removeEventListener("touchend",E)};return(0,l.useEffect)(()=>{n&&setTimeout(()=>{C(!0),O(!0),$("0")},100),!n&&k&&($("120%"),C(!1),O(!1))},[k,n]),(0,a.u)(n&&f),(0,i.jsxs)("div",{"data-portal":!0,className:(0,r.A)(b.mobilePopup,k&&b.mobilePopupOpen,g),children:[(0,i.jsx)(m,{onClose:()=>{n&&(null==c||c())},onToucheMove:()=>{n&&(C(!1),window.addEventListener("touchmove",T),window.addEventListener("touchend",E))},isOpen:n,delay:0}),(0,i.jsxs)("div",{className:(0,r.A)(b.content,d&&b.contentFull,j&&b.contentTransition,j&&_&&b.contentTransitionOpen),ref:N,style:{transform:`translateY(${I})`},children:[(0,i.jsx)("div",{className:b.contentLine}),(0,i.jsxs)("div",{className:(0,r.A)(b.contentContainer,s&&b.smallContentContainer,{[b.min]:!v&&!u},h),children:[!!v&&(0,i.jsx)("div",{className:b.title,children:v}),u?(0,i.jsx)("div",{className:b.closeContainer,children:u?x?"function"==typeof x?x():x:(0,i.jsx)("button",{onClick:c,className:b.closeButton,children:(0,i.jsx)(o.a,{size:24})}):null}):null,e]}),t&&(0,i.jsx)(w,{footerClassName:y,isSmallPopup:s,footer:t})]})]})},y=({children:e,isSmallPopup:t=!1,isOpen:n=!1,...l})=>{let{mounted:o}=d({opened:n});return o?(0,i.jsx)(x,{isSmallPopup:t,isOpen:n,...l,children:e}):null};y.displayName="UiMobilePopup";let _="data-portal-users",C=e=>Number(e.getAttribute(_)??0),k=({children:e,id:t="portal-root"})=>{let[n,i]=(0,l.useState)(null);return(0,l.useEffect)(()=>{let e=document.getElementById(t);if(e&&!e.hasAttribute(_))return void i(e);let n=e??document.body.appendChild(document.createElement("div"));return n.id=t,n.setAttribute(_,String(C(n)+1)),i(n),()=>{let e=C(n)-1;n.setAttribute(_,String(e)),e>0||n.remove()}},[t]),n?(0,c.createPortal)(e,n):null}},50621:(e,t,n)=>{"use strict";n.d(t,{u:()=>s});var i=n(12115);let l=(e,t)=>{e&&(t?e.setAttribute("data-portal",""):e.removeAttribute("data-portal"))},o=(e,t)=>{t.style.removeProperty("overflow-y"),e.classList.toggle("scroll-disable-windows",!1),e.style.removeProperty("overflow"),e.style.removeProperty("height"),e.style.removeProperty("width"),e.style.removeProperty("top")},r=()=>{void 0!==window.prevScrollPosition&&(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0)},a=()=>document.querySelectorAll("[data-portal]").length>1,s=e=>{let t=(0,i.useRef)(null),n=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{if(n.current===e)return;n.current=e;let i=t.current,s=document.body,c=document.documentElement,u=window.innerWidth-c.clientWidth;if(e&&u>0)s.style.top||(window.prevScrollPosition=window.scrollY),c.style.setProperty("overflow-y","scroll"),s.classList.toggle("scroll-disable-windows",!0),s.style.setProperty("width",`calc(100vw - ${u}px)`),s.style.setProperty("top",`-${window.prevScrollPosition}px`),l(i,!0);else if(e)s.style.setProperty("overflow","hidden"),s.style.setProperty("height","100vh"),l(i,!0);else{let e=!a();e&&o(s,c),e&&r(),l(i,!1)}return()=>{let e=!a();e&&o(s,c),e&&r()}},[e]),t}},52124:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let i=n(42174)._(n(52572));function l(e,t){let n={};"function"==typeof e&&(n.loader=e);let l={...n,...t};return(0,i.default)({...l,modules:l.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},52572:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let i=n(95155),l=n(12115),o=n(73275);function r(e){return{default:e&&"default"in e?e.default:e}}n(2438);let a={loader:()=>Promise.resolve(r(()=>null)),loading:null,ssr:!0},s=function(e){let t={...a,...e},n=(0,l.lazy)(()=>t.loader().then(r)),s=t.loading;function c(e){let r=s?(0,i.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,a=!t.ssr||!!t.loading,c=a?l.Suspense:l.Fragment,u=t.ssr?(0,i.jsxs)(i.Fragment,{children:[null,(0,i.jsx)(n,{...e})]}):(0,i.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,i.jsx)(n,{...e})});return(0,i.jsx)(c,{...a?{fallback:r}:{},children:u})}return c.displayName="LoadableComponent",c}},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={bindSnapshot:function(){return s},createAsyncLocalStorage:function(){return a},createSnapshot:function(){return c}};for(var i in n)Object.defineProperty(t,i,{enumerable:!0,get:n[i]});let l=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class o{disable(){throw l}getStore(){}run(){throw l}exit(){throw l}enterWith(){throw l}static bind(e){return e}}let r="u">typeof globalThis&&globalThis.AsyncLocalStorage;function a(){return r?new r:new o}function s(e){return r?r.bind(e):o.bind(e)}function c(){return r?r.snapshot():function(e,...t){return e(...t)}}},67693:(e,t,n)=>{"use strict";n.d(t,{a:()=>v,b:()=>C,c:()=>O,d:()=>x,e:()=>s,f:()=>f,g:()=>h,h:()=>N,i:()=>w,j:()=>k,k:()=>d,l:()=>I,m:()=>$,p:()=>m,s:()=>p});var i=n(30607),l=n(48822),o=n(52886);let r={userRegion:o.U,userTown:o.c,allRegions:"all_regions",lastRegionsUpdateUnixTimestamp:"lastRegionsUpdateUnixTimestamp",allRussiaSelected:"all_russia_selected"},a={userRegion:o.U,userTown:o.c,allRegions:"all_regions_new_api",lastRegionsUpdateUnixTimestamp:"lastRegionsUpdateUnixTimestamp_new_api",allRussiaSelected:"all_russia_selected"},s=(e=!1)=>e?a:r,c=(e,t=!1)=>{if(t){window.allRegionsNewApi=e;return}window.allRegions=e},u=e=>Array.isArray(e.towns)?e.towns:[],d=(e,t)=>{if(!e||!t)return!1;if(e.url!==t.url)return!0;let n=u(e);return n.length>1||n.some(({main:e})=>!e)},p=(e,t,n=!1)=>{if(typeof document>"u")return;let l=s(n);if(!e&&!t){i.a.removeItem(l.userRegion),i.a.removeItem(l.userTown);return}i.a.setItem(l.userRegion,JSON.stringify((e=>{if(!e)return null;let t=u(e).find(({main:e})=>!!e);return{...e,towns:t?[t]:[]}})(e))||"",{"max-age":31536e3}),i.a.setItem(l.userTown,JSON.stringify(t)||"",{"max-age":31536e3})},f=e=>{if(typeof document>"u")return null;let t=i.a.getItem(e)??void 0;if(!t||"undefined"===t)return null;try{return JSON.parse(decodeURIComponent(t))}catch{return null}},m=function(e){if(typeof window>"u"||!window.localStorage)return null;let t=window.localStorage.getItem(e);if(!t||"undefined"===t)return null;try{return JSON.parse(t)}catch(t){console.warn(`Invalid object in localStorage for key "${e}": ${t}`)}return null},h=(e=!1)=>{if(typeof window>"u")return[];let t=((e=!1)=>e?window.allRegionsNewApi:window.allRegions)(e);if(Array.isArray(t)&&t.length>0)return t;let n=m(s(e).allRegions)||[];return c(n,e),n},g=e=>e.some(e=>e.towns.some(e=>!!e.newId||!!e.fiasId)),w=(e,t=!1)=>!(e.length<1)&&(!t||g(e)),v=e=>{let t={};return e.map(({id:e,name:n,towns:i})=>(i.forEach(i=>{i.parentId=e,t[i.name]=t[i.name]||{},t[i.name][i.id]=n}),i)).reduce((e,n)=>(n.forEach(e=>{Object.keys(t[e.name]).length>1&&(e.parentName=t[e.name][e.id])}),[...e,...n]),[])},b=(e,t)=>`${e.replace(/\/+$/,"")}${t}`,x=(e,t)=>b(e||"https://finuslugi.ru",t),y=async e=>{try{return await (await fetch(e)).json()}catch(e){console.warn(e)}return null},_=(e,t=!1)=>{if(e.length<1)return;let n=s(t);c(e,t),window.localStorage.setItem(n.allRegions,JSON.stringify(e)),window.localStorage.setItem(n.lastRegionsUpdateUnixTimestamp,JSON.stringify(Date.now()))},C=(e,t,n)=>{let i=null,l=null;return n&&e.some(e=>{let t=e.towns.find(e=>e.id===n.id)??null;return!!t&&(i=e,l=t,!0)}),{region:i??(t?e.find(e=>e.url===t.url)??e.find(e=>e.region_id===t.region_id)??null:null)??t,town:l??n}},k=(e,t)=>(!!e||!!t)&&!(null!=e&&e.newId)&&!(null!=e&&e.fiasId)&&!(null!=t&&t.newId)&&!(null!=t&&t.fiasId),O=(e,t)=>!!(null!=e&&e.newId||null!=e&&e.fiasId||null!=t&&t.newId||null!=t&&t.fiasId),j=async e=>{let t=await y(x(e,"/money_data/Root.json?short=1")),n=Array.isArray(null==t?void 0:t.regions)?t.regions:[];return _(n),n},S=async e=>{let t,n,[i,l]=await Promise.all([y(b(e,"/sc/api/v1/cities?all=true&isActive=true")),y(b(e,"/sc/api/v1/regions?all=true"))]);if(!Array.isArray(null==i?void 0:i.content)||!Array.isArray(null==l?void 0:l.content))return[];let o=i.content,r=(n=(t=l.content.filter(e=>e.isActive).map(e=>({id:e.geoRegionId,name:e.name,name_r:e.nameR,name_p:e.nameP,url:e.url,region_id:e.geoRegionId,enabled:+!!e.isActive,fiasId:e.fiasId,towns:[]}))).reduce((e,t)=>(e[t.id]=t,e),{}),o.forEach(e=>{let t=n[e.geoRegionId];t&&t.towns.push({id:e.legacyId,name:e.name,name_r:e.nameR,name_p:e.nameP,url:e.url,main:+!!e.isRegionalCenter,newId:e.id,fiasId:e.fiasId})}),t);return g(r)?(_(r,!0),r):[]},I=async({showcaseUrl:e="",useNewCitiesApi:t=!1}={})=>t?S(e):j(e),$=async e=>{let t=null;try{t=await (await fetch(`${e}`,{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},N=(e,t,n)=>{(0,l.h)({eventCategory:"finkit-widgets-sc-city-select",eventActionType:e,eventActionText:t,eventLabel:n})}},69666:(e,t,n)=>{"use strict";n.d(t,{a:()=>a});var i=n(12115);let l={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},o={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},r=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M7.22 7.22a.743.743 0 011.06 0L12 10.94l3.72-3.72a.743.743 0 011.06 0 .742.742 0 010 1.06L13.061 12l3.72 3.72a.743.743 0 010 1.06.743.743 0 01-1.061 0L12 13.06l-3.72 3.72a.743.743 0 01-1.06 0 .743.743 0 010-1.06L10.94 12 7.22 8.28a.743.743 0 010-1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function a({className:e,style:t,boxSize:n,size:s,onClick:c}){return i.createElement("span",{className:e,style:{...l,...c&&{cursor:"pointer"},...s&&{fontSize:`${s}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...c?{role:"button",tabIndex:"0",onClick:c}:{}},i.createElement(r,{viewBox:"0 0 24 24",style:o}))}a.displayName="IconFdsCloseO"},73275:(e,t,n)=>{"use strict";function i({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return i}}),n(72399)},76610:()=>{},86245:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var i=n(12115);let l={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},o={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},r=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M21.309 22.765a6.932 6.932 0 01-2.016.233c-1.156-.04-2.62-.39-3.927-1.58A9.985 9.985 0 0112 22a9.97 9.97 0 01-7.071-2.929A9.97 9.97 0 012 12C2 6.477 6.477 2 12 2s10 4.477 10 10a9.958 9.958 0 01-1.233 4.814c.07 1.607.354 2.81.617 3.606a7.784 7.784 0 00.424 1.04c.125.248.251.497.15.787-.103.296-.366.44-.65.52zM12 3.5a8.5 8.5 0 103.258 16.353.75.75 0 01.834.178c1.06 1.124 2.278 1.436 3.252 1.469.304.01.584-.007.824-.035a10.45 10.45 0 01-.208-.574c-.317-.96-.641-2.374-.7-4.237a.75.75 0 01.1-.4A8.5 8.5 0 0012 3.5zm-4.209 7.794a1 1 0 10.003-.002l-.003.002zm3.5 0a1 1 0 10.003-.002l-.003.002zm3.502 1.414a1 1 0 01-.002-1.414l.003-.002a1 1 0 110 1.415z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function a({className:e,style:t,boxSize:n,size:s,onClick:c}){return i.createElement("span",{className:e,style:{...l,...c&&{cursor:"pointer"},...s&&{fontSize:`${s}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...c?{role:"button",tabIndex:"0",onClick:c}:{}},i.createElement(r,{viewBox:"0 0 24 24",style:o}))}a.displayName="IconFdsChatDotsCircleO"}}]);
//# debugId=295c3553-b0fc-4c2d-86d6-ca0c8b5ac743