(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7213],{22180:(e,t,n)=>{"use strict";n.d(t,{H:()=>ev,Y9:()=>eU,b:()=>ee,p:()=>et,u:()=>ed}),n(53234);var i=n(95155),l=n(12115),o=n(67909),a=n(23451);let r={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:{...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(c,{viewBox:"0 0 24 24",style:s}))}u.displayName="IconFdsChevronDownO";var d=n(79576);let p={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},h={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 f({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:h}))}f.displayName="IconFdsUserO";var g=n(53548),w=n(95633),v=n(2821),b=n(81637),x=n(55369),_=n(93372),C=n(19481);let k=({web2app:e,href:t,onClick:n,children:l,...o})=>{let a=(0,C.u)({target:e,fallbackHref:t});return(0,i.jsx)("a",{...o,href:a.href,onClick:e=>{a.onClick(e),null==n||n(e)},children:l})};var y=n(1611),I=n(61995),j=n(32080),S=n(99456),O=n(42195),N=n(52143),A=n(79264),R=n(91482),T=n(98910);let E={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},z={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("path",{d:"M12.004 7.246A1.247 1.247 0 0110.75 6a1.25 1.25 0 111.254 1.247zM10.75 12c0 .686.559 1.252 1.254 1.247a1.252 1.252 0 001.246-1.25 1.25 1.25 0 10-2.5.003zm0 6c0 .686.559 1.253 1.254 1.247a1.252 1.252 0 001.246-1.25 1.25 1.25 0 10-2.5.003z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function $({className:e,style:t,boxSize:n,size:i,onClick:o}){return l.createElement("span",{className:e,style:{...E,...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:z}))}$.displayName="IconFdsDotsVerticalO";let M=(0,y.g)("navigation-chips","sc"),P=Object.freeze({wrapper:`${M}__wrapper`,gray:`${M}__variantGray`,white:`${M}__variantWhite`,container:`${M}__container`,chip:`${M}__chip`,more:`${M}__chip--more`,active:`${M}__chip--active`,icon:`${M}__icon`,label:`${M}__label`,hidden:`${M}__hidden`}),F=(0,y.g)("navigation-content","sc"),L=Object.freeze({contentWrapper:`${F}__content-wrapper`,content:`${F}__content`,contentOpen:`${F}__content--open`,contentHeader:`${F}__content-header`,contentTitle:`${F}__content-title`,contentTitleUrl:`${F}__content-title--url`,contentTitleLink:`${F}__content-title--link`,contentTitleNew:`${F}__content-title--new`,new:`${F}__new`,newInline:`${F}__new-inline`,vip:`${F}__vip`,arrowIcon:`${F}__arrow-icon`,links:`${F}__links`,linksColumns:`${F}__links--columns`,linksTitleless:`${F}__links--titleless`,removed:`${F}__removed`,hidden:`${F}__content--hidden`}),U=({chip:e,hidden:t,onClick:n,refCallback:l,activeChipId:o})=>{let a=!!n,r=()=>{if(a)return null==n?void 0:n(e.url);(0,j.h)(_.D.chip,e.title,`${e.title}_${e.url}`)},s=(0,i.jsxs)(i.Fragment,{children:[e.icon&&(0,i.jsx)("span",{className:P.icon,"aria-hidden":"true",children:e.icon}),(0,i.jsx)("span",{className:P.label,children:e.title}),e.arrow&&(0,i.jsx)(T.K,{size:24})]}),c=(0,v.A)(P.chip,{[P.hidden]:t,[L.new]:!!e.new,[L.vip]:!!e.vip,[P.active]:e.url===o});return a?(0,i.jsx)("button",{type:"button",className:c,onClick:r,ref:l,children:s}):(0,i.jsx)("a",{href:e.url,className:c,onClick:r,ref:l,children:s})},W=({items:e=[],maxNumberOfLines:t,variant:n,className:o,activeChipId:a,onClick:r,moreButtonOptions:s})=>{let c=(0,l.useRef)(null),u=(0,l.useRef)(null),d=(0,l.useRef)([]),p=(null==s?void 0:s.label)??"Еще",h="Еще",m=(null==s?void 0:s.showIcon)??!0,f=(0,v.A)(P.chip,P.more,null==s?void 0:s.className),[g,w]=(0,l.useState)(!1),[b,x]=(0,l.useState)(e.length),[C,k]=(0,l.useState)(!1),y=(0,l.useCallback)(()=>{let n=c.current;if(!n)return;let i=e=>e?e.getBoundingClientRect().width:0,l=i(n),o=Math.max(Number(t)||0,0),a=()=>{x(e.length),k(!1)};if(g||0===o||l<=0)return void a();let r=(()=>{try{let e=getComputedStyle(n),t=parseFloat(e.columnGap||e.gap||"12");return Number.isNaN(t)?12:t}catch{return 12}})(),s=i(u.current),p=e.map((e,t)=>i(d.current[t]));if(p.some(e=>0===e))return void a();let h=1,m=0,f=0;for(let e of p){let t=h===o?s+r:0,n=0===m?e:m+r+e;if(n+t<=l-.5)m=n,f++;else{if(++h>o)break;m=e,f++}}k(f<e.length),x(f)},[g,e,t]);(0,l.useLayoutEffect)(()=>{let e=c.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(y)});return t.observe(e),requestAnimationFrame(y),()=>{t.disconnect()}},[y]),(0,l.useEffect)(()=>{requestAnimationFrame(y)},[y]);let I=g||(t??0)<=0||!C;return(0,i.jsx)("div",{className:(0,v.A)(o,P.wrapper,{[P.gray]:"gray"===n,[P.white]:"white"===n}),children:(0,i.jsxs)("div",{ref:c,className:P.container,children:[e.map((e,t)=>(0,i.jsx)(U,{chip:e,hidden:!I&&t>=b,activeChipId:a,onClick:r,refCallback:e=>{d.current[t]=e}},`${e.url}_${t}`)),!I&&C&&(0,i.jsxs)("button",{type:"button",ref:u,className:f,"aria-label":h,onClick:()=>{(0,j.h)(_.D.chip,h),w(!0)},children:[m&&(0,i.jsx)($,{size:20}),(0,i.jsx)("span",{className:P.label,children:p})]}),(I||!C)&&(0,i.jsxs)("button",{type:"button",ref:u,className:(0,v.A)(f,P.hidden),tabIndex:-1,"aria-hidden":"true",children:[m&&(0,i.jsx)($,{size:20}),(0,i.jsx)("span",{className:P.label,children:p})]})]})})},H={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},D={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},V=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 G(e){let{className:t,style:n,boxSize:i,size:o,onClick:a}=e;return l.createElement("span",{className:t,style:{...H,...a&&{cursor:"pointer"},...o&&{fontSize:"".concat(o,"px")},...i&&{width:"".concat(i,"px"),height:"".concat(i,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...a?{role:"button",tabIndex:"0",onClick:a}:{}},l.createElement(V,{viewBox:"0 0 24 24",style:D}))}G.displayName="IconFdsChatDotsSquareAddO";let q={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},J={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},Y=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 K(e){let{className:t,style:n,boxSize:i,size:o,onClick:a}=e;return l.createElement("span",{className:t,style:{...q,...a&&{cursor:"pointer"},...o&&{fontSize:"".concat(o,"px")},...i&&{width:"".concat(i,"px"),height:"".concat(i,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...a?{role:"button",tabIndex:"0",onClick:a}:{}},l.createElement(Y,{viewBox:"0 0 24 24",style:J}))}K.displayName="IconFdsMenuSkewedO";let Z=()=>{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}},Q=(0,y.g)("certificates-warning-banner","sc"),X=(0,y.g)("certificates-warning-popup","sc"),ee=Object.freeze({wrapper:"".concat(Q),container:"".concat(Q,"__container"),content:"".concat(Q,"__content"),info:"".concat(Q,"__info"),image:"".concat(Q,"__image"),text:"".concat(Q,"__text"),title:"".concat(Q,"__title"),description:"".concat(Q,"__description"),details:"".concat(Q,"__details"),buttons:"".concat(Q,"__buttons"),button:"".concat(Q,"__button"),closeButton:"".concat(Q,"__close-button"),mobileActivator:"".concat(Q,"__mobile-activator")}),et=Object.freeze({modal:"".concat(X,"__modal"),desktopCloseButton:"".concat(X,"__desktop-close-button"),mobilePopup:"".concat(X,"__mobile-popup"),mobileContentContainer:"".concat(X,"__mobile-content-container"),mobileCloseButton:"".concat(X,"__mobile-close-button"),mobileDialog:"".concat(X,"__mobile-dialog"),content:"".concat(X,"__content"),image:"".concat(X,"__image"),text:"".concat(X,"__text"),title:"".concat(X,"__title"),description:"".concat(X,"__description"),actions:"".concat(X,"__actions"),primaryActions:"".concat(X,"__primary-actions"),divider:"".concat(X,"__divider"),explanation:"".concat(X,"__explanation"),button:"".concat(X,"__button"),gosuslugiButton:"".concat(X,"__gosuslugi-button"),gosuslugiIcon:"".concat(X,"__gosuslugi-icon")}),en="fu_certificates_access_confirmed",ei="fu_certificates_banner_dismissed",el="fu_external_link_warning_shown",eo=new Map,ea=e=>{if(typeof window>"u")return"1"===eo.get(e);try{return"1"===window.localStorage.getItem(e)||"1"===eo.get(e)}catch(t){return"1"===eo.get(e)}},er=e=>{if(eo.set(e,"1"),!(typeof window>"u"))try{window.localStorage.setItem(e,"1")}catch(e){}},es=(e,t)=>{if(!e)return null;try{let n=new URL(e.toString(),t.href);return"http:"!==n.protocol&&"https:"!==n.protocol||((e,t)=>e===t||"finuslugi.ru"===e||e.endsWith(".finuslugi.ru"))(n.hostname,t.hostname)?null:n}catch(e){return null}},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,a]=(0,l.useState)(!1),[r,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),a=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,r)=>{if(o.current)return void r(Error("chat is already opened"));i?(i.openWidget(),t(!1),l()):(a(!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(),a(!1),t(!1),l()},((e,t)=>{let n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href="".concat(e,"/assets/css/").concat(t),document.head.appendChild(n);let i=document.createElement("script");i.src="".concat(e,"/get-bootstrap/").concat(t),i.defer=!0,document.body.appendChild(i)})(e,n))}),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,h]=(0,l.useState)(null),[m,f]=(0,l.useState)(null),[g,w]=(0,l.useState)(!1),[v,b]=(0,l.useState)(!1),[x,_]=(0,l.useState)(!1),C=(0,l.useRef)(null),k=(0,I.u)(g),y=(0,l.useRef)(null),S=(0,l.useRef)(null),O=(0,l.useRef)(null),N=(0,l.useRef)(null),A=(0,l.useCallback)(()=>{k.current&&k.current.scrollTo({top:0})},[k]),R=(0,l.useCallback)(e=>{f(e),A()},[A]),T=(0,l.useCallback)(e=>{y.current&&clearTimeout(y.current),e&&b(!0),e||(y.current=setTimeout(()=>{b(!1),R(null)},300))},[R]),E=(0,l.useCallback)((e,t,n)=>{if(t&&R(t),!n&&e===p||!e){T(!g),w(!g);return}h(e),T(!0),w(!0)},[p,R,g,T]),z=(0,l.useCallback)(()=>{S.current&&clearTimeout(S.current),_(!0),S.current=setTimeout(()=>{_(!1)},650)},[]);return(0,l.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id"));let t=(0,j.s)(a,s,e.isMainBannerPage);return(0,j.i)(),t},[]),(0,i.jsx)("header",{children:(0,i.jsx)(eu.Provider,{value:{isAuth:t,isHeaderHidden:o,isHeaderTransparent:r,openedBlock:p,setOpenedBlock:E,openedSection:m,setOpenedSection:R,isNavigationOpen:g,isNavigationMounted:v,navMenuItemsRef:C,navigationRef:k,ignoreClicks:x,setIgnoreClicks:z,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:d,fixedContainerRef:O,headerRef:N},children:e.children})})},eh=(0,y.g)("city-select","sc"),em=Object.freeze({button:"".concat(eh,"__button"),minimal:"".concat(eh,"__minimal"),full:"".concat(eh,"__full")}),ef=(0,o.default)(()=>Promise.all([n.e(2316),n.e(2545),n.e(7491),n.e(2434)]).then(n.bind(n,62434)).then(e=>e.CitySelectModal),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/CitySelectModal-C7idy7Zb.mjs")]},ssr:!1}),eg=(0,o.default)(()=>n.e(6506).then(n.bind(n,76506)).then(e=>e.StartChoicePopup),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/StartChoicePopup-DypxD-me.mjs")]},ssr:!1}),ew=e=>{var t;let{initialTown:n}=e,o=(0,x.u)(),a=(null==(t=o.town)?void 0:t.name)||n||"Вся Россия",{setIsChatModalOpen:r,isChatModalOpen:s}=ed(),{startPopupVisible:c,setStartPopupVisible:u,popupVisible:d}=o,p=(0,x.a)(d),h=(0,x.a)(c),m=(0,l.useRef)(void 0);(0,l.useEffect)(()=>{d&&(m.current="popup")},[d]),(0,l.useEffect)(()=>{s&&(m.current="chat")},[s]),(0,l.useEffect)(()=>{c&&(m.current="startPopup")},[c]),(0,l.useEffect)(()=>{m.current&&("chat"===m.current&&c?u(!1):["startPopup","popup"].includes(m.current)&&s&&r(!1))},[d,s,c,u,r]);let f={appearance:"ghost",size:"xs",onClick:()=>o.handleButtonClick(!1),iconLeft:(0,i.jsx)(x.Y,{size:24})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.Button,{...f,className:(0,v.A)(em.button,em.full),label:a}),(0,i.jsx)(g.Button,{...f,className:(0,v.A)(em.button,em.minimal),shape:"icon"}),p&&(0,i.jsx)(ef,{}),h&&(0,i.jsx)(eg,{})]})},ev=e=>{let{label:t,onClick:n,eventActionText:l,eventLabel:o,...a}=e;return(0,i.jsx)(g.Button,{label:t,onClick:e=>{null==n||n(e),(0,_.h)({eventCategory:S.H,eventActionType:_.D.button,eventActionText:l||"",eventLabel:o||""})},...a})},eb=e=>{let{onClick:t,eventActionType:n,eventActionText:l,eventLabel:o,...a}=e;return(0,i.jsx)(O.N,{onClick:e=>{null==t||t(e),(0,_.h)({eventCategory:S.H,eventActionType:n||_.D.link,eventActionText:l||"",eventLabel:o||""})},...a})},ex={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},e_={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},eC=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 ek(e){let{className:t,style:n,boxSize:i,size:o,onClick:a}=e;return l.createElement("span",{className:t,style:{...ex,...a&&{cursor:"pointer"},...o&&{fontSize:"".concat(o,"px")},...i&&{width:"".concat(i,"px"),height:"".concat(i,"px"),display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...a?{role:"button",tabIndex:"0",onClick:a}:{}},l.createElement(eC,{viewBox:"0 0 24 24",style:e_}))}ek.displayName="IconFdsChevronLeftO";let ey=(0,y.g)("header-chat-modal-body","sc"),eI=Object.freeze({wrapper:"".concat(ey,"__wrapper"),cardButton:"".concat(ey,"__card-button"),card:"".concat(ey,"__card"),cardTitle:"".concat(ey,"__card-title"),cardSubtitle:"".concat(ey,"__card-subtitle"),button:"".concat(ey,"__button")}),ej=()=>{let e=ed();return(0,i.jsxs)("div",{className:eI.wrapper,children:[(0,i.jsx)(ev,{className:eI.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)(R.Z,{className:eI.card,variant:"secondary",children:[(0,i.jsxs)("div",{className:eI.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:eI.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,i.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),!1]})},eS=e=>{let{data:t,isMobile:n}=e,o=ed();return(0,i.jsx)("div",{className:L.contentWrapper,children:t.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>{var t;return(0,i.jsxs)("div",{className:(0,v.A)(L.content,{[L.hidden]:o.openedSection!==e.id,[L.contentOpen]:!!o.openedSection}),children:[(0,i.jsx)("div",{className:L.contentHeader,children:(0,i.jsx)("label",{children:e.title})}),null==(t=e.content)?void 0:t.map((t,l)=>{var o,a;return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:(0,i.jsx)("a",{className:(0,v.A)(L.contentTitle,{[L.removed]:!t.title,[L.contentTitleUrl]:!!t.url,[L.contentTitleLink]:!!e.isSeeAllLinkAvailable,[L.contentTitleNew]:!!t.new}),href:e.isSeeAllLinkAvailable?t.url:void 0,children:(0,i.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,i.jsx)("div",{className:L.arrowIcon,children:(0,i.jsx)(T.K,{})}),t.title]})})}),!(null!=(o=t.links)&&o.length)&&(0,i.jsx)(W,{items:t.chips||[],maxNumberOfLines:e.content.length<=1?99:n?3:2}),!!(null!=(a=t.links)&&a.length)&&(0,i.jsx)("div",{className:(0,v.A)(L.links,{[L.linksColumns]:!!t.columns,[L.linksTitleless]:!t.title}),children:t.links.map((e,t)=>(0,i.jsxs)(k,{href:e.url,web2app:e.web2app?C.a:void 0,onClick:()=>(0,j.h)(_.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,i.jsx)("div",{className:L.arrowIcon,children:(0,i.jsx)(T.K,{})}),(0,i.jsxs)("span",{children:[(0,i.jsx)("span",{children:e.title}),!!e.new&&(0,i.jsx)("span",{className:(0,v.A)({[L.newInline]:!!e.new})})]})]},"".concat(e.url,"_").concat(t)))})]},"".concat(t.url,"_").concat(l))})]},e.id)})},e.id))})},eO=(0,y.g)("navigation-section-icon","sc"),eN=Object.freeze({icon:"".concat(eO)}),eA=()=>n.e(3977).then(n.bind(n,13977)),eR={IconFdsAcademicCapO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsAcademicCapO}),IconFdsBankO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsBankO}),IconFdsBookOpenO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsBookOpenO}),IconFdsCalculatorO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsCalculatorO}),IconFdsCardO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsCardO}),IconFdsChatDotsCircleO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsChatDotsCircleO}),IconFdsCoinMultipleO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsCoinMultipleO}),IconFdsDotsHorizontalO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsDotsHorizontalO}),IconFdsFlashO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsFlashO}),IconFdsGraphO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsGraphO}),IconFdsLayoutHorizontalO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsLayoutHorizontalO}),IconFdsPortfolioO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsPortfolioO}),IconFdsRubleCircleO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsRubleCircleO}),IconFdsSafeO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsSafeO}),IconFdsShieldCheckO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsShieldCheckO}),IconFdsWalletO:()=>eA().then(e=>{let{navigationSectionIcons:t}=e;return t.IconFdsWalletO})},eT=e=>Object.prototype.hasOwnProperty.call(eR,e),eE=e=>{let{name:t,background:n}=e,[o,a]=(0,l.useState)(null);if((0,l.useEffect)(()=>{if(!t||!eT(t))return void a(null);let e=!0;return eR[t]().then(n=>{e&&a({name:t,component:n})}).catch(()=>{e&&a(null)}),()=>{e=!1}},[t]),!t||!eT(t))return null;let r=(null==o?void 0:o.name)===t?o.component:null;return(0,i.jsx)("div",{className:eN.icon,style:{background:n},children:r&&(0,i.jsx)(r,{})})},ez=(0,y.g)("navigation","sc"),eB=Object.freeze({navigation:"".concat(ez),navigationOpening:"".concat(ez,"--opening"),navigationClosing:"".concat(ez,"--closing"),wrapper:"".concat(ez,"__wrapper"),container:"".concat(ez,"__container"),containerOpen:"".concat(ez,"__container--open"),sections:"".concat(ez,"__sections"),sectionsOpen:"".concat(ez,"__sections--open"),citySelectButton:"".concat(ez,"__city-select-button"),sectionsTitle:"".concat(ez,"__sections-title"),sectionsWrapper:"".concat(ez,"__sections-wrapper"),section:"".concat(ez,"__section"),sectionArrow:"".concat(ez,"__section-arrow"),sectionExtra:"".concat(ez,"__section--extra"),sectionActive:"".concat(ez,"__section--active"),sectionTitle:"".concat(ez,"__section-title"),chatWrapper:"".concat(ez,"__chat-wrapper"),chatHeader:"".concat(ez,"__chat-header"),backButton:"".concat(ez,"__back-button"),useful:"".concat(ez,"__useful"),usefulOpen:"".concat(ez,"__useful--open"),usefulTitle:"".concat(ez,"__useful-title"),usefulGrid:"".concat(ez,"__useful-grid"),removed:"".concat(ez,"__removed")}),e$=e=>{var t;let{data:n}=e,o=ed(),a=(0,x.u)(),r=(0,A.nu)("m"),[s,c]=(0,l.useState)(!0);(0,l.useEffect)(()=>{c(r)},[r]);let u=(0,l.useRef)(null),d=(0,l.useCallback)(()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>o.openedSection?o.setOpenedSection(null):o.isNavigationOpen?o.setOpenedBlock(null):void 0,50)},[o]),p=(0,l.useRef)(!1),h=(0,l.useRef)(null),m=(0,l.useCallback)(()=>{s&&(p.current=!0,h.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),d()},window.history.pushState(null,"",window.location.href))},[d,s]),f=(0,l.useCallback)(()=>{p.current=!1,window.onpopstate=h.current,window.history.go(-1)},[]),b=(0,l.useRef)(null),C=(0,l.useCallback)(e=>{if(s||!o.navMenuItemsRef.current||!o.navigationRef.current)return;let t=e.target,n=!o.navMenuItemsRef.current.contains(t)&&!o.navigationRef.current.contains(t);if(n&&!b.current){o.setIgnoreClicks(),b.current=setTimeout(()=>o.setOpenedBlock(null),300);return}!n&&b.current&&(clearTimeout(b.current),b.current=null)},[s,o]),k=(0,l.useRef)(null),y=(0,l.useCallback)(e=>{typeof window>"u"||(e?(k.current=C,window.addEventListener("mousemove",k.current)):k.current&&window.removeEventListener("mousemove",k.current))},[C]);(0,l.useEffect)(()=>{y(o.isNavigationOpen),o.isNavigationOpen&&!p.current&&m(),!o.isNavigationOpen&&p.current&&f()},[o.isNavigationOpen]);let I=(e,t)=>()=>{(0,j.h)(_.D.button,t),o.setOpenedSection(e)},{start:O,clear:R}=Z(),T=()=>{s||R()};return(0,i.jsx)("div",{ref:o.navigationRef,className:(0,v.A)(eB.navigation,{[eB.removed]:!o.isNavigationMounted,[eB.navigationOpening]:o.isNavigationOpen,[eB.navigationClosing]:!o.isNavigationOpen}),children:(0,i.jsx)("div",{className:eB.wrapper,children:(0,i.jsxs)(w.m,{className:(0,v.A)(eB.container,{[eB.containerOpen]:!!o.openedSection}),children:[(0,i.jsxs)("div",{className:(0,v.A)(eB.sections,{[eB.sectionsOpen]:!!o.openedSection}),children:[(0,i.jsx)(g.Button,{className:eB.citySelectButton,variant:"violet",appearance:"ghost",size:"xs",onClick:()=>a.handleButtonClick(!1),iconLeft:(0,i.jsx)(x.Y,{size:24}),label:(null==(t=a.town)?void 0:t.name)||"Вся Россия"}),n.map(e=>(0,i.jsxs)("ul",{className:(0,v.A)(eB.sectionsWrapper,{[eB.removed]:o.openedBlock!==e.id&&!s}),children:[(0,i.jsx)("div",{className:eB.sectionsTitle,children:S.a[e.id]}),e.sections.map(e=>{let t,n;return(0,i.jsxs)("li",{className:(0,v.A)(eB.section,{[eB.sectionExtra]:!!e.extra,[eB.sectionActive]:o.openedSection===e.id}),onClick:I(e.id,e.title),onMouseEnter:(t=e.id,n=e.title,()=>{s||O(I(t,n),150)}),onMouseLeave:T,children:[o.isNavigationMounted&&(0,i.jsx)(eE,{name:e.uikitIcon,background:e.uikitIconBg}),(0,i.jsx)("span",{className:eB.sectionTitle,children:e.title}),(0,i.jsx)("div",{className:eB.sectionArrow,children:(0,i.jsx)(N._,{size:24})})]},e.id)})]},e.id)),(0,i.jsxs)("div",{className:eB.chatWrapper,children:[(0,i.jsx)("div",{className:eB.chatHeader,children:"Нужна помощь?"}),(0,i.jsx)(ej,{})]})]}),(0,i.jsxs)("button",{type:"button",className:(0,v.A)(eB.backButton,{[eB.removed]:!o.openedSection}),onClick:()=>{(0,j.h)(_.D.button,"Назад"),o.setOpenedSection(null)},children:[(0,i.jsx)(ek,{size:24}),(0,i.jsx)("span",{children:"Назад"})]}),(0,i.jsx)(eS,{data:n,isMobile:s}),(0,i.jsxs)("div",{className:(0,v.A)(eB.useful,{[eB.usefulOpen]:!!o.openedSection}),children:[(0,i.jsx)("div",{className:eB.usefulTitle,children:"Полезное на Финуслугах"}),n.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>{var t;return(0,i.jsx)("div",{className:(0,v.A)(eB.usefulGrid,{[eB.removed]:o.openedSection!==e.id}),children:null==(t=e.useful)?void 0:t.map((e,t)=>(0,i.jsxs)("a",{href:e.url,onClick:()=>(0,j.h)(_.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,i.jsx)("div",{children:(0,i.jsx)("img",{src:e.icon,srcSet:e.icon2?"".concat(e.icon,", ").concat(e.icon2," 2x"):void 0,alt:e.title,loading:"lazy"})}),(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},"".concat(e.title,"_").concat(t)))},e.id)})},e.id))]})]})})})},eM=(0,o.default)(()=>n.e(6939).then(n.bind(n,66939)).then(e=>e.CertificatesWarningBanner),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/CertificatesWarningBanner-BRL_tBdi.mjs")]},ssr:!1}),eP=(0,o.default)(()=>Promise.all([n.e(2316),n.e(2545),n.e(7491),n.e(84)]).then(n.bind(n,40084)).then(e=>e.CertificatesWarningPopup),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/CertificatesWarningPopup-D7E2JzzU.mjs")]},ssr:!1}),eF=(0,o.default)(()=>n.e(4733).then(n.bind(n,14733)).then(e=>e.HeaderMobileAppBanner),{loadableGenerated:{webpack:()=>[require.resolveWeak("../chunks/HeaderMobileAppBanner-C6MgJm_-.mjs")]},ssr:!1}),eL=e=>{let{data:t,showcaseUrl:n="https://finuslugi.ru",minioUrl:o="https://assets.finuslugi.ru/mp-assets",lkUrl:r="https://lk.finuslugi.ru/registration",initialTown:s,isMainBannerPage:c,enableAppHeaderBanner:p=!1,enableCertificatesBanner:h=!1,enableExternalLinkWarning:m=!1,certificatesWarningProduct:k,news:y,className:I}=e,O=ed(),N=(0,l.useMemo)(()=>((e,t,n)=>{var i,l,o,a,r,s,c,u;let d=null!=(u=null==(l=null==(i=null==e?void 0:e.NAVIGATOR)?void 0:i.findIndex)?void 0:l.call(i,e=>{let{id:t}=e;return"news"===t}))?u:-1,p=(null==(a=null==(o=null==e?void 0:e.NAVIGATOR)?void 0:o[d])?void 0:a.content)||[];if(null!=(c=null==(s=null==(r=null==e?void 0:e.NAVIGATOR)?void 0:r[d])?void 0:s.content)&&c[0]&&Array.isArray(n)&&p.length){let i=n.map(e=>{let{title:n,url:i}=e;return{title:n,url:(0,b.oq)(t||"",i),new:0}});e.NAVIGATOR[d].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:[]}]})(t,n,y),[t,n,y]),A=null==t?void 0:t.config,R=!!t&&h&&!!c,T=(e=>{let{enableCertificatesBanner:t,enableExternalLinkWarning:n,isMainBannerPage:i}=e,[o,a]=(0,l.useState)("checking"),[r,s]=(0,l.useState)(!1),[c,u]=(0,l.useState)(!1),[d,p]=(0,l.useState)(!1),[h,m]=(0,l.useState)(!1),f=(0,l.useRef)(void 0),g=(0,l.useRef)(!1),w=(0,l.useRef)(!1),v=(0,l.useRef)(!1);(0,l.useRef)(null);let b=(0,l.useRef)(null),x=(0,l.useRef)(null),_=(0,l.useRef)(null),C=t&&i,k=C||n,y=(0,l.useCallback)(e=>{let t=f.current;if(t)return void t.call(window,e,"_blank","noopener,noreferrer");window.open(e,"_blank","noopener,noreferrer")},[]),I=(0,l.useCallback)(()=>{s(!1),v.current=!1,b.current=null,x.current=null,_.current=null,m(!1)},[]),j=(0,l.useCallback)(e=>{er(el),w.current=!0,v.current=!1,b.current=e,m("external"===e&&null!==x.current),s(!0)},[]),S=(0,l.useCallback)(()=>!g.current&&("external"===b.current&&!v.current||!w.current),[]),O=(0,l.useCallback)(()=>{"external"!==b.current&&j("external")},[j]);(0,l.useEffect)(()=>{f.current=window.open;let e=window.navigator.userAgent.includes("YaBrowser/");return e&&er(en),g.current=e||ea(en),w.current=ea(el),p(g.current),u(!0),()=>{x.current=null,_.current=null}},[]),(0,l.useEffect)(()=>{if(c){if(!C)return void a("skipped");a(e=>"shown"===e||"closing"===e||"dismissed"===e?e:d||ea(ei)?"skipped":"shown")}},[d,C,c]),(0,l.useEffect)(()=>{},[I,k,c]),(0,l.useEffect)(()=>{if(!c||!n)return;let e=f.current;if(!e)return;let t=!0,i=e=>{if(0!==e.button&&1!==e.button||!(e.target instanceof Element))return;let n=e.target.closest("a[href]");if(!n||e.defaultPrevented)return;let i=es(n.href,window.location);if(!i||!S())return;e.preventDefault(),null===x.current&&(x.current=i.href,_.current={source:"external_anchor",host:i.hostname});let l=x.current;queueMicrotask(()=>{t&&S()&&x.current===l&&O()})},l=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_blank",i=arguments.length>2?arguments[2]:void 0,l=es(t,window.location);return l&&S()?(null===x.current&&(x.current=l.href,_.current={source:"external_window_open",host:l.hostname}),O(),null):e.call(window,t,n,i)};return window.open=l,document.addEventListener("click",i,!0),document.addEventListener("auxclick",i,!0),()=>{t=!1,document.removeEventListener("click",i,!0),document.removeEventListener("auxclick",i,!0),window.open===l&&(window.open=e)}},[n,c,S,O]),(0,l.useEffect)(()=>{var e;n||(x.current=null,(null==(e=_.current)?void 0:e.source)!=="banner"&&(_.current=null),m(!1),"external"===b.current&&I())},[I,n]),(0,l.useEffect)(()=>{C||"banner"===b.current&&I()},[I,C]),(0,l.useEffect)(()=>{k||I()},[I,k]);let N=(0,l.useCallback)(()=>{er(ei),a("closing")},[]),A=(0,l.useCallback)(()=>{a("dismissed")},[]),R=(0,l.useCallback)(()=>{x.current=null,_.current={source:"banner"},j("banner")},[j]),T=(0,l.useCallback)(()=>{y("https://www.gosuslugi.ru/crt")},[y]),E=(0,l.useCallback)(()=>{y("https://browser.yandex.ru/")},[y]),z=(0,l.useCallback)(()=>{let e=x.current;e&&(er(el),w.current=!0,v.current=!0,y(e))},[y]);return{bannerStatus:o,isPopupOpen:r,popupAnalyticsContext:_.current,dismissBanner:N,finishBannerClosing:A,openPopupFromBanner:R,closePopup:I,openCertificatesPage:T,openYandexBrowserPage:E,continueToExternalPage:h?z:void 0}})({enableCertificatesBanner:R,enableExternalLinkWarning:m,isMainBannerPage:!!c}),E="shown"===T.bannerStatus||"closing"===T.bannerStatus,z=!R||"skipped"===T.bannerStatus,B=(0,x.a)(T.isPopupOpen);(e=>{(0,l.useEffect)(()=>(0,C.s)(e),[e])})(null==A?void 0:A.web2app);let $=(0,l.useMemo)(()=>N.reduce((e,t)=>{var n;return e[t.id]=null==(n=t.sections[0])?void 0:n.id,e},{}),[N]),M=O.isAuth?"Личный кабинет":"Войти",P=c&&O.isHeaderTransparent,F=(e,t,n,i)=>()=>{e!==O.openedBlock?(0,j.h)(_.D.toggle,t,"on"):(0,j.h)(_.D.button,"menu_close","on");let l=n?$[e]:"";O.setOpenedBlock(e,l,!!i)},{start:L,clear:U}=Z(),W=e=>()=>{O.ignoreClicks||e()},H=B?(0,i.jsx)(eP,{isOpen:T.isPopupOpen,analyticsContext:T.popupAnalyticsContext,certificatesWarningProduct:k,onClose:T.closePopup,onOpenCertificatesPage:T.openCertificatesPage,onOpenYandexBrowserPage:T.openYandexBrowserPage,onContinue:T.continueToExternalPage}):null;return t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:O.headerRef,className:(0,v.A)(S.s.header,I,{[S.s.transparent]:P}),children:(0,i.jsxs)("div",{ref:O.fixedContainerRef,className:(0,v.A)(S.s.fixed,{[S.s.hidden]:O.isHeaderHidden,[S.s.navigationOpen]:O.isNavigationOpen}),children:[E&&(0,i.jsx)(eM,{onDismiss:T.dismissBanner,onClosed:T.finishBannerClosing,onOpenDetails:T.openPopupFromBanner,onOpenCertificatesPage:T.openCertificatesPage,onOpenYandexBrowserPage:T.openYandexBrowserPage}),z&&!!(null!=A&&A.appBannerUrl)&&p&&(0,i.jsx)(eF,{mobileAppUrl:A.appBannerUrl,minioUrl:o}),(0,i.jsxs)(w.m,{className:S.s.container,children:[(0,i.jsxs)("div",{className:S.s.leftRow,children:[(0,i.jsx)(eb,{className:S.s.logo,href:n,eventActionType:_.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(n),children:(0,i.jsxs)("picture",{children:[(0,i.jsx)("source",{srcSet:(0,b.oq)(o,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,i.jsx)("img",{src:(0,b.oq)(o,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,i.jsx)("nav",{ref:O.navMenuItemsRef,className:S.s.menuItems,children:(0,i.jsx)("ul",{children:S.b.map(e=>{let{id:t,label:n}=e;return(0,i.jsx)("li",{children:(0,i.jsx)(g.Button,{className:(0,v.A)({[S.s.menuItemActive]:O.openedBlock===t&&O.isNavigationOpen}),label:n,variant:"white",size:"xs",onClick:W(F(t,n,!0)),onMouseEnter:((e,t,n,i)=>()=>{O.isNavigationOpen&&e===O.openedBlock||O.setIgnoreClicks(),L(F(e,t,n,i),200)})(t,n,!0,!0),onMouseLeave:U})},t)})})}),(0,i.jsx)(ev,{className:(0,v.A)(S.s.tabletMenuButton,{[S.s.menuItemActive]:O.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,i.jsx)(u,{size:24}),onClick:F("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,i.jsxs)("div",{className:(0,v.A)(S.s.buttonGroup,{[S.s.whiteIcons]:(null==A?void 0:A.iconColorOnMobileMainBanner)==="white"}),children:[(0,i.jsxs)("div",{className:S.s.chips,children:[(0,i.jsx)(ev,{as:"a",href:r,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:"profile_".concat(r),iconLeft:(0,i.jsx)(f,{size:20}),"aria-label":M}),(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)(a.G,{size:24}),"aria-label":"Онлайн чат"})]}),(0,i.jsx)(ev,{className:S.s.menuButton,size:"xs",shape:P?"icon":"default",appearance:P?"ghost":"fill",label:"Меню",onClick:F("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,i.jsx)(K,{size:24})}),(0,i.jsxs)("div",{className:S.s.moreButtons,children:[(0,i.jsx)(ew,{initialTown:s}),(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)(G,{size:24}),children:"Онлайн чат"}),(0,i.jsx)(ev,{as:"a",href:r,size:"xs",eventActionText:M,eventLabel:"".concat(M,"_").concat(r),label:M})]})]}),(0,i.jsxs)(eb,{className:S.s.auth,href:r,eventActionText:M,eventLabel:"".concat(M,"_").concat(r),children:[(0,i.jsx)(ev,{size:"xs",shape:"circle-icon",iconLeft:(0,i.jsx)(f,{}),eventActionText:M,eventLabel:"".concat(M,"_").concat(r)}),(0,i.jsx)("p",{children:M})]}),(0,i.jsx)("div",{className:S.s.close,children:(0,i.jsx)(ev,{className:S.s.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,i.jsx)(d.a,{}),onClick:()=>O.setOpenedBlock(null),eventActionText:"IconFdsCloseO","aria-label":"Закрыть"})})]})]})}),(0,i.jsx)("div",{className:(0,v.A)(S.s.overlay,{[S.s.removed]:!O.isNavigationMounted,[S.s.overlayOpening]:O.isNavigationOpen,[S.s.overlayClosing]:!O.isNavigationOpen}),onClick:W(()=>O.setOpenedBlock(null))}),(0,i.jsx)(e$,{data:N,minioUrl:o}),H]}):m?H:null},eU=e=>(0,i.jsx)(ep,{isMainBannerPage:e.isMainBannerPage,children:(0,i.jsx)(eL,{...e})})},22191:(e,t,n)=>{"use strict";n.d(t,{S:()=>u}),n(48839);var i=n(95155),l=n(12115),o=n(79576),a=n(2821),r=n(30753);let s=(0,n(1611).g)("cookies-plate","sc"),c=Object.freeze({wrapper:"".concat(s,"__wrapper"),contentWrapper:"".concat(s,"__content-wrapper"),visible:"".concat(s,"--visible"),hidden:"".concat(s,"--hidden"),content:"".concat(s,"__content"),text:"".concat(s,"__text"),link:"".concat(s,"__link"),button:"".concat(s,"__button")}),u=e=>{let{className:t,mountDelay:n=3e3,href:s="https://assets.finuslugi.ru/mp-assets/pravila-ispolzovanija-cookie-pao-moskovskaja-birzh.doc",children:u,closeIcon:d,onMount:p,onLinkClick:h,onClose:m,mountAfterScroll:f=!0}=e,[g,w]=(0,l.useState)(!1),[v,b]=(0,l.useState)(!1),[x,_]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let e=()=>{document.removeEventListener("scroll",e),r.a.getItem("Allow-Cookie")||(_(!0),setTimeout(()=>{w(!0),null==p||p()},n))};return f?document.addEventListener("scroll",e):e(),()=>document.removeEventListener("scroll",e)},[]);let C=(0,l.useCallback)(()=>{r.a.setItem("Allow-Cookie","1"),b(!0),null==m||m(),setTimeout(()=>_(!1),1e3)},[m]);return x?(0,i.jsx)("div",{className:c.wrapper,children:(0,i.jsx)("div",{className:(0,a.A)(c.contentWrapper,{[c.visible]:g,[c.hidden]:v}),children:(0,i.jsxs)("div",{className:(0,a.A)(t,c.content),children:[u||(0,i.jsxs)("p",{className:c.text,children:["Мы используем"," ",(0,i.jsx)("a",{className:c.link,href:s,target:"_blank",rel:"noreferrer",onClick:h,children:"cookie"})," ","для лучшей работы сайта"]}),(0,i.jsx)("button",{className:c.button,onClick:C,children:d||(0,i.jsx)(o.a,{})})]})})}):(0,i.jsx)(i.Fragment,{})}},23451:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var i=n(12115);let l={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},o={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},a=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 r({className:e,style:t,boxSize:n,size:r,onClick:s}){return i.createElement("span",{className:e,style:{...l,...s&&{cursor:"pointer"},...r&&{fontSize:`${r}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...s?{role:"button",tabIndex:"0",onClick:s}:{}},i.createElement(a,{viewBox:"0 0 24 24",style:o}))}r.displayName="IconFdsChatDotsCircleO"},30753:(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})}}},32080:(e,t,n)=>{"use strict";n.d(t,{H:()=>o,h:()=>c,i:()=>s,s:()=>a});var i=n(93372),l=n(99456);let o="finuslugi-header-height-change",a=(e,t,n)=>{if(typeof window>"u"||typeof document>"u")return;let i=document.getElementById("mainHomeBanner"),l=!1,a=0,r=0,s=window.innerWidth<768,c=()=>window.scrollY||document.documentElement.scrollTop,u=e=>{document.documentElement.style.setProperty("--new-header-height-desktop",e),document.documentElement.style.setProperty("--new-header-height-mobile",e)},d=()=>{let e=window.innerWidth<768;e!==s&&(s=e,r=0)},p=function(){let o=c(),s=document.getElementById("headerNotice");if((null==s?void 0:s.getAttribute("data-opening"))==="true")return;r||(()=>{let e=document.querySelector(":root");if(e){let t=parseFloat(window.getComputedStyle(e).getPropertyValue("--fixed-header-height"));r=Number.isNaN(t)?0:t,a=c()}})();let d=o<r,p=o<((null==i?void 0:i.clientHeight)||0);if(n&&p||d){l=!1,e(!1),t(!0),u(`${r}px`);return}e(l=o>a),l&&setTimeout(()=>t(!1),50),u(l?"0px":`${r}px`),a=o<=0?0:o},h=()=>{r=0,p()};return window.addEventListener("scroll",p),window.addEventListener("resize",d),window.addEventListener(o,h),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",d),window.removeEventListener(o,h)}},r=(e,t,n)=>{let i=new Date;i.setTime(i.getTime()+864e5*n);let l=encodeURIComponent(JSON.stringify(t)),o=`;domain=.${window.location.hostname}`;document.cookie=`${e}=${l};expires=${i.toUTCString()};path=/;SameSite=Lax${o}`},s=()=>{setTimeout(()=>{if(!(typeof document>"u"||"string"!=typeof document.cookie))try{(()=>{let e=(()=>{let e=new URLSearchParams(window.location.search),t={};for(let[n,i]of Array.from(e.entries()))n.startsWith("utm_")&&(t[n]=i);return Object.keys(t).length>0?t:null})();e&&!document.cookie.split(";").some(e=>e.trim().startsWith("utm_params="))&&r("utm_params",e,90),e&&r("utm_last",e,90)})()}catch(e){console.error("UTM tracking error:",e)}},0)},c=(e,t,n)=>(0,i.h)({eventCategory:l.H,eventActionType:e,eventActionText:t,eventLabel:n})},48839:()=>{},52143:(e,t,n)=>{"use strict";n.d(t,{_:()=>r});var i=n(12115);let l={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},o={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},a=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 r({className:e,style:t,boxSize:n,size:r,onClick:s}){return i.createElement("span",{className:e,style:{...l,...s&&{cursor:"pointer"},...r&&{fontSize:`${r}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...s?{role:"button",tabIndex:"0",onClick:s}:{}},i.createElement(a,{viewBox:"0 0 24 24",style:o}))}r.displayName="IconFdsChevronRightSmallO"},53234:()=>{},55369:(e,t,n)=>{"use strict";n.d(t,{C:()=>w,Y:()=>d,a:()=>r,u:()=>g});var i=n(12115),l=n(95155),o=n(93372),a=n(93631);let r=e=>{let[t,n]=(0,i.useState)(e);return(0,i.useEffect)(()=>{e&&n(!0)},[e]),e||t},s={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},c={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},u=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.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 d({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...s,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(u,{viewBox:"0 0 24 24",style:c}))}d.displayName="IconFdsLocationO";let p=(0,a.g)(),h=(0,a.a)(p),m={regions:p,towns:h,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},f=(0,i.createContext)(m);function g(){return(0,i.useContext)(f)}let w=({children:e,initialRegion:t,initialTown:n,showStartGeoPopup:r=!0,lastRegionsUpdateUnixTimestamp:s,showcaseUrl:c="",dadataUrl:u=(0,a.d)(c,"/backend/money/dadata"),useNewCitiesApi:d=!1})=>{let p=(0,a.e)(d),h=Number((0,a.p)(p.lastRegionsUpdateUnixTimestamp)||0),g=Number(s||0)>h,[w,v]=(0,i.useState)((0,a.g)(d)),b=(0,i.useRef)(w),[{startRegion:x,startTown:_},C]=(0,i.useState)({startRegion:m.startRegion,startTown:m.startTown}),k=t??m.region,y=n??m.town,[{region:I,town:j},S]=(0,i.useState)({region:k,town:y}),[O,N]=(0,i.useState)(m.startPopupVisible),[A,R]=(0,i.useState)(m.popupVisible),T=(0,i.useRef)(""),E=(0,i.useRef)(!1),z=(0,i.useMemo)(()=>(0,a.a)(w),[w]);(0,i.useEffect)(()=>{b.current=w},[w]);let B=(0,i.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)||""),N(!0),C({startRegion:e,startTown:t})},[N,C]),$=(0,i.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||B(e,t)},[B]),M=(0,i.useCallback)(()=>{if(T.current&&!I&&!j){let e=z.find(e=>e.name===T.current)??null;return $(w.find(t=>t.id===(null==e?void 0:e.parentId))??null,e)}$(I,j)},[I,j,z,w,$]),P=(0,i.useCallback)(e=>{R(e)},[R]),F=(0,i.useCallback)((e,t)=>{if(!e&&!t){window.localStorage.setItem(p.allRussiaSelected,"1"),window.localStorage.setItem(p.userRegion,""),window.localStorage.setItem(p.userTown,""),(0,a.s)(null,null,d);return}window.localStorage.setItem(p.allRussiaSelected,"0"),window.localStorage.setItem(p.userRegion,JSON.stringify(e)||""),window.localStorage.setItem(p.userTown,JSON.stringify(t)||""),(0,a.s)(e||null,t||null,d)},[p,d]),L=(0,i.useCallback)(e=>{e?(0,a.h)(o.D.icon,"location"):(0,a.h)(o.D.button,(null==j?void 0:j.name)||"Вся Россия"),!r||window.sessionStorage.getItem("start_popup_opened")?P(!0):M()},[r,j,P,M]),U=(0,i.useCallback)((e,t)=>{F(e,t),S({region:e||null,town:t||null}),N(!1),P(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[P,F]),W=()=>{let e=(0,a.f)(p.userRegion),t=e??(0,a.p)(p.userRegion),n=(0,a.f)(p.userTown)??(0,a.p)(p.userTown),i=(0,a.b)(b.current,t,n),l=d&&(0,a.j)(t,n);(0,a.k)(e,i.region)&&(0,a.s)(i.region,i.town,d),l&&(E.current=!0),l&&(0,a.c)(i.region,i.town)&&(F(i.region,i.town),E.current=!1),S(i);let o=async({coords:{latitude:e,longitude:t}})=>{let n=`${u}?lat=${e}&lon=${t}`,i=await (0,a.m)(n);null!=i&&i.location&&(T.current=i.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&r)try{navigator.geolocation.getCurrentPosition(o,()=>null)}catch{}};return(0,i.useEffect)(()=>{(!(0,a.i)(w,d)||g)&&(0,a.l)({showcaseUrl:c,useNewCitiesApi:d}).then(e=>{e.length<1||v(e)})},[]),(0,i.useEffect)(()=>{let e=(0,a.b)(w,I,j);E.current&&(0,a.c)(e.region,e.town)&&(F(e.region,e.town),E.current=!1),S(e)},[w,I,F,j]),(0,i.useEffect)(()=>{if(window.innerWidth<1024){let e=()=>{W(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{W()},0)},[]),(0,l.jsx)(f.Provider,{value:{regions:w,towns:z,region:I,town:j,startPopupVisible:O,setStartPopupVisible:N,popupVisible:A,handleToggleModal:P,selectCity:U,handleButtonClick:L,startRegion:x,startTown:_},children:e})}},88992:(e,t,n)=>{"use strict";n.d(t,{tH:()=>a});var i=n(12115);let l=(0,i.createContext)(null),o={didCatch:!1,error:null};class a extends i.Component{static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){for(var e,t,n=arguments.length,i=Array(n),l=0;l<n;l++)i[l]=arguments[l];let{error:a}=this.state;null!==a&&(null==(e=(t=this.props).onReset)||e.call(t,{args:i,reason:"imperative-api"}),this.setState(o))}componentDidCatch(e,t){var n,i;null==(n=(i=this.props).onError)||n.call(i,e,t)}componentDidUpdate(e,t){var n,i;let{didCatch:l}=this.state,{resetKeys:a}=this.props;l&&null!==t.error&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}(e.resetKeys,a)&&(null==(n=(i=this.props).onReset)||n.call(i,{next:a,prev:e.resetKeys,reason:"keys"}),this.setState(o))}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:o}=this.props,{didCatch:a,error:r}=this.state,s=e;if(a){let e={error:r,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)s=t(e);else if(n)s=(0,i.createElement)(n,e);else if(void 0!==o)s=o;else throw r}return(0,i.createElement)(l.Provider,{value:{didCatch:a,error:r,resetErrorBoundary:this.resetErrorBoundary}},s)}constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=o}}},93631:(e,t,n)=>{"use strict";n.d(t,{a:()=>v,b:()=>k,c:()=>I,d:()=>x,e:()=>s,f:()=>h,g:()=>f,h:()=>A,i:()=>w,j:()=>y,k:()=>d,l:()=>O,m:()=>N,p:()=>m,s:()=>p});var i=n(30753),l=n(93372),o=n(99456);let a={userRegion:o.U,userTown:o.c,allRegions:"all_regions",lastRegionsUpdateUnixTimestamp:"lastRegionsUpdateUnixTimestamp",allRussiaSelected:"all_russia_selected"},r={userRegion:o.U,userTown:o.c,allRegions:"all_regions_new_api",lastRegionsUpdateUnixTimestamp:"lastRegionsUpdateUnixTimestamp_new_api",allRussiaSelected:"all_russia_selected"},s=(e=!1)=>e?r:a,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})},h=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},f=(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),_=async e=>{try{return await (await fetch(e)).json()}catch(e){console.warn(e)}return null},C=(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()))},k=(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??((e,t)=>t?e.find(e=>e.url===t.url)??e.find(e=>e.region_id===t.region_id)??null:null)(e,t)??t,town:l??n}},y=(e,t)=>(!!e||!!t)&&!(null!=e&&e.newId)&&!(null!=e&&e.fiasId)&&!(null!=t&&t.newId)&&!(null!=t&&t.fiasId),I=(e,t)=>!!(null!=e&&e.newId||null!=e&&e.fiasId||null!=t&&t.newId||null!=t&&t.fiasId),j=async e=>{let t=await _(x(e,"/money_data/Root.json?short=1")),n=Array.isArray(null==t?void 0:t.regions)?t.regions:[];return C(n),n},S=async e=>{let[t,n]=await Promise.all([_(b(e,"/sc/api/v1/cities?all=true&isActive=true")),_(b(e,"/sc/api/v1/regions?all=true"))]);if(!Array.isArray(null==t?void 0:t.content)||!Array.isArray(null==n?void 0:n.content))return[];let i=((e,t)=>{let n=t.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:[]})),i=n.reduce((e,t)=>(e[t.id]=t,e),{});return e.forEach(e=>{let t=i[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})}),n})(t.content,n.content);return g(i)?(C(i,!0),i):[]},O=async({showcaseUrl:e="",useNewCitiesApi:t=!1}={})=>t?S(e):j(e),N=async e=>{let t=null;try{t=await (await fetch(`${e}`,{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},A=(e,t,n)=>{(0,l.h)({eventCategory:"finkit-widgets-sc-city-select",eventActionType:e,eventActionText:t,eventLabel:n})}},99456:(e,t,n)=>{"use strict";n.d(t,{F:()=>u,H:()=>r,U:()=>o,a:()=>c,b:()=>s,c:()=>a,s:()=>l});let i=(0,n(1611).g)("header","sc"),l=Object.freeze({header:`${i}`,fixed:`${i}__fixed`,hidden:`${i}__fixed--hidden`,transparent:`${i}--transparent`,navigationOpen:`${i}__navigation-open`,container:`${i}__container`,leftRow:`${i}__left-row`,logo:`${i}__logo`,menuItems:`${i}__menu-items`,menuItemActive:`${i}__menu-item-active`,tabletMenuButton:`${i}__tablet-menu-button`,buttonGroup:`${i}__button-group`,chips:`${i}__chips`,menuButton:`${i}__menu-button`,moreButtons:`${i}__more-buttons`,auth:`${i}__auth`,whiteIcons:`${i}__white-icons`,close:`${i}__close`,removed:`${i}__removed`,overlay:`${i}__overlay`,overlayOpening:`${i}__overlay--opening`,overlayClosing:`${i}__overlay--closing`}),o="user_region",a="user_town",r="cb-header",s=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],c=s.reduce((e,t)=>(e[t.id]=t.label,e),{}),u=Object.freeze({mobile:56,desktop:80})}}]);