(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[542],{5775:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let i=n(7043);n(7437),n(2265);let l=i._(n(5602));function o(e,t){var n;let i={loading:e=>{let{error:t,isLoading:n,pastDelay:i}=e;return null}};"function"==typeof e&&(i.loader=e);let o={...i,...t};return(0,l.default)({...o,modules:null==(n=o.loadableGenerated)?void 0:n.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)},1523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let i=n(8993);function l(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new i.BailoutToCSRError(t);return n}},5602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return c}});let i=n(7437),l=n(2265),o=n(1523),s=n(49);function r(e){return{default:e&&"default"in e?e.default:e}}let a={loader:()=>Promise.resolve(r(()=>null)),loading:null,ssr:!0},c=function(e){let t={...a,...e},n=(0,l.lazy)(()=>t.loader().then(r)),c=t.loading;function u(e){let r=c?(0,i.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,a=t.ssr?(0,i.jsxs)(i.Fragment,{children:["undefined"==typeof window?(0,i.jsx)(s.PreloadCss,{moduleIds:t.modules}):null,(0,i.jsx)(n,{...e})]}):(0,i.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,i.jsx)(n,{...e})});return(0,i.jsx)(l.Suspense,{fallback:r,children:a})}return u.displayName="LoadableComponent",u}},49:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return o}});let i=n(7437),l=n(544);function o(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,l.getExpectedRequestStore)("next/dynamic css"),o=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));o.push(...t)}}return 0===o.length?null:(0,i.jsx)(i.Fragment,{children:o.map(e=>(0,i.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},6583:function(){},7565:function(){},6034:function(){},5487:function(e,t,n){"use strict";n.d(t,{a:function(){return 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})}}},6156:function(e,t,n){"use strict";let i;n.d(t,{PageLayout:function(){return tQ}});var l=n(7437),o=n(5775),s=n.n(o),r=n(5563),a=n(4365),c=n(7337),u=n(2074),d=n(5461),p=n(6554),m=n(684),h=n(2265),f=n(4887);let v=300,g=({opened:e})=>{let[t,n]=(0,h.useState)(!1),i=(0,h.useRef)(null),l=(0,h.useRef)(!1);return(0,h.useEffect)(()=>(e&&!l.current?(l.current=!0,n(!0)):!e&&l.current&&(i.current=setTimeout(()=>{l.current=!1,n(!1)},v)),()=>{i.current&&clearTimeout(i.current)}),[e]),{mounted:t}},w=(0,u.g)("click-outside","sc"),x=Object.freeze({overlay:`${w}__overlay`,open:`${w}--open`,close:`${w}--close`}),_=({onClose:e,onToucheMove:t,isOpen:n,delay:i=v})=>{let o=(0,h.useRef)(null),s=(0,h.useCallback)(()=>{e&&(o.current=setTimeout(()=>{e()},i))},[i,e]),r=(0,h.useCallback)(e=>{"Escape"===e.key&&s()},[s]);return(0,h.useEffect)(()=>(n&&window.addEventListener("keydown",r),()=>{o.current&&clearTimeout(o.current),window.removeEventListener("keydown",r)}),[n,r]),(0,l.jsx)("div",{className:(0,a.Z)(x.overlay,{[x.open]:n,[x.close]:!n}),onTouchStart:t,onClick:s})},b=(e,t)=>{e&&(t?e.setAttribute("data-portal",""):e.removeAttribute("data-portal"))},j=e=>{e.style.top||(window.prevScrollPosition=window.scrollY)},y=(e,t,n)=>{t.style.setProperty("overflow-y","scroll"),e.classList.toggle("scroll-disable-windows",!0),e.style.setProperty("width",`calc(100vw - ${n}px)`),e.style.setProperty("top",`-${window.prevScrollPosition}px`)},$=e=>{e.style.setProperty("overflow","hidden"),e.style.setProperty("height","100vh")},N=e=>{e.classList.toggle("scroll-disable-windows",!1),e.style.removeProperty("overflow"),e.style.removeProperty("height"),e.style.removeProperty("width"),e.style.removeProperty("top")},C=()=>{void 0!==window.prevScrollPosition&&(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0)},k=()=>document.querySelectorAll("[data-portal]").length>1,O=e=>{let t=(0,h.useRef)(null),n=(0,h.useRef)(!1);return(0,h.useEffect)(()=>{if(n.current===e)return;n.current=e;let i=t.current,l=document.body,o=document.documentElement,s=window.innerWidth-o.clientWidth,r=s>0;if(e&&r)j(l),y(l,o,s),b(i,!0);else if(e)$(l),b(i,!0);else{let e=!k();e&&N(l),e&&C(),b(i,!1)}return()=>{let e=!k();e&&N(l),e&&C()}},[e]),t},T=(0,u.g)("drawer-footer","sc"),S=Object.freeze({footer:`${T}__footer`,hasScroll:`${T}__footer--has-scroll`}),A=({footer:e,hasScroll:t,className:n})=>(0,l.jsx)("div",{className:(0,a.Z)(S.footer,{[S.hasScroll]:t},n),children:"function"==typeof e?e():e}),I=(0,u.g)("drawer-content","sc"),R=Object.freeze({container:`${I}__container`,open:`${I}--open`,close:`${I}--close`,header:`${I}__header`,rowHeader:`${I}__header--row`,title:`${I}__title`,center:`${I}__title--center`,left:`${I}__title--left`,right:`${I}__title--right`,controlContainer:`${I}__control-container`,content:`${I}__content`,footer:`${I}__footer`}),L=({onClose:e,onContentClick:t,children:n,title:i,rowTitle:o,titleAlign:s,isCloseable:r,footer:c,closeButton:u,isOpen:d,contentClassName:p,footerClassName:f,contentStyle:v,width:g})=>{let w=(0,h.useRef)(null),x=(0,h.useRef)(null),[_,b]=(0,h.useState)(!1);(0,h.useEffect)(()=>{var e;if(!x.current||!w.current)return;let t=(null==(e=null==x?void 0:x.current)?void 0:e.getBoundingClientRect().top)||0,n=null==w?void 0:w.current,i=()=>{let e=null==x?void 0:x.current;e&&b(()=>e.getBoundingClientRect().top!==t)};return n&&n.addEventListener("scroll",i,!1),()=>{null==n||n.removeEventListener("scroll",i,!1)}},[]);let j=v||g?{width:g,...v||{}}:void 0;return(0,l.jsxs)("div",{ref:w,style:j,className:(0,a.Z)(R.container,{[R.open]:d,[R.close]:!d},p),children:[i||r?(0,l.jsxs)("div",{className:(0,a.Z)(R.header,{[R.rowHeader]:o}),children:[r?u?"function"==typeof u?u():u:(0,l.jsx)("button",{type:"button",className:R.controlContainer,onClick:e,children:(0,l.jsx)(m.IconFdsCloseO,{size:24})}):null,i?(0,l.jsx)("h3",{className:(0,a.Z)(R.title,{[R[s]]:!0}),children:i}):null]}):null,(0,l.jsx)("div",{ref:x,className:R.content,onClick:t,children:n}),c&&(0,l.jsx)(A,{className:(0,a.Z)(R.footer,f),footer:c,hasScroll:_})]})},P=(0,u.g)("drawer-layout","sc"),z=Object.freeze({window:`${P}__window`}),E=({onClose:e,isOpen:t,children:n,withDisabledScroll:i,className:o,...s})=>{let r=(0,h.useCallback)(e=>e.stopPropagation(),[]);return O(t&&i),(0,l.jsxs)("div",{"data-portal":!0,className:(0,a.Z)(z.window,o),children:[(0,l.jsx)(_,{onClose:e,isOpen:t,delay:0}),(0,l.jsx)(L,{onContentClick:r,onClose:e,isOpen:t,...s,children:n})]})},M=({isOpen:e=!1,children:t,titleAlign:n="center",isCloseable:i=!0,withDisabledScroll:o=!0,...s})=>{let{mounted:r}=g({opened:e});return r?(0,l.jsx)(E,{titleAlign:n,isCloseable:i,isOpen:e,withDisabledScroll:o,...s,children:t}):null};M.displayName="Drawer";let U=(0,u.g)("mobile-modal-footer","sc"),B=Object.freeze({footer:`${U}__footer`,footerWithoutShadow:`${U}__footer--without-shadow`}),W=({footer:e,isSmallPopup:t=!1,footerClassName:n})=>(0,l.jsx)("div",{className:(0,a.Z)(B.footer,t&&B.footerWithoutShadow,n),children:"function"==typeof e?e():e}),D=(0,u.g)("mobile-popup","sc"),F=Object.freeze({mobilePopup:`${D}`,mobilePopupOpen:`${D}--open`,content:`${D}__content`,contentFull:`${D}__content--full`,contentTransition:`${D}__content--transition`,contentTransitionOpen:`${D}__content--transition-open`,contentLine:`${D}__content-line`,contentContainer:`${D}__content-container`,smallContentContainer:`${D}__content-container--small`,min:`${D}__content-container--min`,title:`${D}__title`,closeContainer:`${D}__close-container`,closeButton:`${D}__close-button`}),Z=({children:e,footer:t,isOpen:n,isSmallPopup:i,onClose:o,hasCloseButton:s=!0,full:r,touchDistance:c=100,withDisabledScroll:u=!0,contentClassName:d,className:p,title:f,closeButton:v,footerClassName:g})=>{let[w,x]=(0,h.useState)(!1),[b,j]=(0,h.useState)(!1),[y,$]=(0,h.useState)(!0),[N,C]=(0,h.useState)("120%"),k=(0,h.useRef)(null),T=(0,h.useRef)(0),S=(0,h.useRef)(!1),A=e=>{var t,n,i;let l=null==(t=k.current)?void 0:t.offsetTop,o=null==(n=k.current)?void 0:n.offsetHeight;if(S.current=!0,$(!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),C(`${n}px`),T.current=n}},I=()=>{S.current&&(T.current>c&&o?null==o||o():C("0"),$(!0),S.current=!1),window.removeEventListener("touchmove",A),window.removeEventListener("touchend",I)};return(0,h.useEffect)(()=>{n&&setTimeout(()=>{x(!0),j(!0),C("0")},100),!n&&b&&(C("120%"),x(!1),j(!1))},[b,n]),O(n&&u),(0,l.jsxs)("div",{"data-portal":!0,className:(0,a.Z)(F.mobilePopup,b&&F.mobilePopupOpen,p),children:[(0,l.jsx)(_,{onClose:()=>{n&&(null==o||o())},onToucheMove:()=>{n&&(x(!1),window.addEventListener("touchmove",A),window.addEventListener("touchend",I))},isOpen:n,delay:0}),(0,l.jsxs)("div",{className:(0,a.Z)(F.content,r&&F.contentFull,y&&F.contentTransition,y&&w&&F.contentTransitionOpen),ref:k,style:{transform:`translateY(${N})`},children:[(0,l.jsx)("div",{className:F.contentLine}),(0,l.jsxs)("div",{className:(0,a.Z)(F.contentContainer,i&&F.smallContentContainer,{[F.min]:!f&&!s},d),children:[!!f&&(0,l.jsx)("div",{className:F.title,children:f}),s?(0,l.jsx)("div",{className:F.closeContainer,children:s?v?"function"==typeof v?v():v:(0,l.jsx)("button",{onClick:o,className:F.closeButton,children:(0,l.jsx)(m.IconFdsCloseO,{size:24})}):null}):null,e]}),t&&(0,l.jsx)(W,{footerClassName:g,isSmallPopup:i,footer:t})]})]})},G=({children:e,isSmallPopup:t=!1,isOpen:n=!1,...i})=>{let{mounted:o}=g({opened:n});return o?(0,l.jsx)(Z,{isSmallPopup:t,isOpen:n,...i,children:e}):null};G.displayName="UiMobilePopup";let V=({children:e,id:t="portal-root"})=>{let[n,i]=(0,h.useState)(null);return(0,h.useEffect)(()=>{let e=document.getElementById(t);if(e){i(e);return}let n=document.createElement("div");return n.id=t,document.body.appendChild(n),i(n),()=>{document.body.removeChild(n)}},[t]),n?(0,f.createPortal)(e,n):null},H=(0,u.g)("footer-contacts-block","sc"),q=Object.freeze({contactsWrapper:`${H}__contacts-wrapper`,gray:`${H}__gray`,phones:`${H}__phones`,contactsButtons:`${H}__contacts-buttons`,vkIcon:`${H}__vk-icon`,tgIcon:`${H}__tg-icon`,dzenIcon:`${H}__dzen-icon`,maxIcon:`${H}__max-icon`,link:`${H}__link`}),J=(0,u.g)("footer","sc"),Q=Object.freeze({wrapper:`${J}__wrapper`,section:`${J}__section`,container:`${J}__container`,top:`${J}__top`,main:`${J}__main`,links:`${J}__links`,disclaimer:`${J}__disclaimer`,bottom:`${J}__bottom`,bottomLinks:`${J}__bottom-links`,bottomDisclaimer:`${J}__bottom-disclaimer`,compact:`${J}__wrapper--compact`,white:`${J}__wrapper--white`}),Y="finkit-widgets-sc-footer",K=[{title:"8 (800) 505-32-32",url:"tel:88005053232"},{title:"8 (800) 700-64-94",url:"tel:88007006494"},{title:"+7 (495) 145-32-32",url:"tel:+74951453232"},{title:"+7 (495) 787-64-94",url:"tel:+74957876494"}],X=[...K,{title:"Онлайн чат",url:void 0}],ee=[{type:"vk",className:q.vkIcon,iconName:"vk"},{type:"telegramChannel",className:q.tgIcon,iconName:"telegram"},{type:"dzen",className:q.dzenIcon,iconName:"dzen"},{type:"max",className:q.maxIcon,iconName:"max"}],et=(0,l.jsxs)("p",{children:["На сайте finuslugi.ru предоставляются услуги оператора финансовой платформы ПАО Московская Биржа, а также услуги ООО \xabМБ Маркетплейс\xbb, организации, не являющейся оператором финансовой платформы в соответствии с Федеральным законом от 20.07.2020 №211-ФЗ \xabО совершении финансовых сделок с использованием финансовой платформы\xbb. Услуги оператора финансовой платформы ПАО Московская Биржа обозначены пометкой \xabОткрытие онлайн на Финуслугах\xbb. Иная информация на сайте www.finuslugi.ru считается размещенной ООО \xabМБ Маркетплейс\xbb, если иное явно не следует из существа размещаемой информации. ООО \xabМБ Маркетплейс\xbb входит в Группу \xabМосковская Биржа\xbb.",(0,l.jsx)("br",{}),(0,l.jsx)("br",{}),"Группа \xabМосковская Биржа\xbb - ПАО Московская Биржа и юридические лица, находящиеся под прямым или косвенным контролем ПАО Московская Биржа."]}),en=({onClick:e,eventActionText:t,eventLabel:n,...i})=>(0,l.jsx)(d.zx,{onClick:i=>{null==e||e(i),(0,p.h)({eventCategory:Y,eventActionType:p.D.button,eventActionText:t||"",eventLabel:n})},...i}),ei=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:i,chat:o,...s})=>(0,l.jsx)(d.rU,{onClick:l=>{var s,r,a;null==e||e(l),o&&(null==l||l.preventDefault(),null==(a=null==(r=null==(s=null==window?void 0:window.supportWidget)?void 0:s.craftTalk)?void 0:r.open)||a.call(r)),(0,p.h)({eventCategory:Y,eventActionType:t||p.D.link,eventActionText:n||"",eventLabel:i})},...s}),el=({minioUrl:e,blogs:t})=>(0,l.jsxs)("div",{className:q.contactsWrapper,children:[(0,l.jsx)(r.xv,{className:q.gray,size:"16",weight:"regular",children:"Звоните или пишите"}),(0,l.jsx)("div",{className:q.phones,children:X.map(({title:e,url:t})=>(0,l.jsx)(ei,{href:t,eventActionText:e,chat:!t,children:e},e))}),(0,l.jsx)(r.xv,{className:q.gray,size:"16",weight:"regular",children:"Следите за нами в соцсетях"}),(0,l.jsx)("div",{className:q.contactsButtons,children:ee.map(({type:n,className:i,iconName:o})=>(0,l.jsx)(en,{as:"a",href:null==t?void 0:t[n],target:"_blank",className:i,iconRight:(0,l.jsx)("img",{width:24,height:24,src:(0,c.xn)(e,`/widgets/footer/${o}.svg`),alt:n,loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:n,eventLabel:null==t?void 0:t[n]},n))}),(0,l.jsx)(r.xv,{className:q.gray,size:"16",weight:"regular",children:"Канал для инвесторов"}),(0,l.jsx)("div",{className:q.contactsButtons,children:(0,l.jsxs)(ei,{href:null==t?void 0:t.investTg,target:"_blank",className:q.link,eventActionText:"telegram",eventLabel:null==t?void 0:t.investTg,children:[(0,l.jsx)(en,{className:q.tgIcon,iconRight:(0,l.jsx)("img",{width:24,height:24,src:(0,c.xn)(e,"/widgets/footer/telegram.svg"),alt:"telegram",loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:"telegram",eventLabel:null==t?void 0:t.investTg}),"Финуслуги Инвест"]})})]}),eo=(0,u.g)("footer-disclaimer","sc"),es=Object.freeze({disclaimer:`${eo}`}),er=e=>{let t=e=>{e.target instanceof HTMLAnchorElement&&(0,p.h)({eventCategory:Y,eventActionType:p.D.link,eventActionText:e.target.textContent||"",eventLabel:e.target.href})};return e.disclaimer?(0,l.jsx)("div",{className:(0,a.Z)(e.className,es.disclaimer),dangerouslySetInnerHTML:{__html:e.disclaimer||""},onClick:t}):(0,l.jsx)("div",{className:(0,a.Z)(e.className,es.disclaimer),onClick:t,children:e.children})},ea=()=>{let e=new URL(window.location.href),t=new URLSearchParams;return e.searchParams.forEach((e,n)=>{/^utm_/i.test(n)&&t.set(n,e)}),t},ec=(e="")=>{let[t,n]=(0,h.useState)(e);return(0,h.useEffect)(()=>{let t=ea();if(!t||0===t.size)return;let[i,l=""]=e.split("?"),o=new URLSearchParams(l);t.forEach((e,t)=>{o.has(t)||o.set(t,e)});let s=o.toString();n(s?`${i}?${s}`:i)},[e]),t},eu=(0,u.g)("footer-modal-body","sc"),ed=Object.freeze({wrapper:`${eu}__wrapper`,title:`${eu}__title`,item:`${eu}__item`,label:`${eu}__label`,button:`${eu}__button`,description:`${eu}__description`}),ep=({directions:e})=>(0,l.jsxs)("div",{className:ed.wrapper,children:[(0,l.jsx)("div",{className:ed.title,children:"Направления"}),e.map(e=>(0,l.jsxs)(ei,{className:ed.item,href:e.url,target:"_blank",eventActionText:e.name,eventLabel:`${e.name}_${e.url}`,children:[(0,l.jsxs)("div",{className:ed.label,children:[(0,l.jsx)("span",{children:e.name}),(0,l.jsx)(en,{className:ed.button,iconRight:(0,l.jsx)(m.IconFdsArrowUpRightSmallO,{size:28}),shape:"circle-icon",eventActionText:"IconFdsArrowUpRightSmallO"})]}),(0,l.jsx)("p",{className:ed.description,children:e.description})]},e.url))]}),em=(0,u.g)("footer-popup","sc"),eh=Object.freeze({wrapper:`${em}__wrapper`,button:`${em}__button`,icon:`${em}__icon`,buttonWrapper:`${em}__button-wrapper`}),ef=({directions:e})=>{let t=(0,d._m)("l"),[n,i]=(0,h.useState)(!1),o=()=>{i(!1)};return(0,l.jsxs)("div",{className:eh.wrapper,children:[(0,l.jsx)("div",{className:eh.buttonWrapper,children:(0,l.jsx)(en,{className:eh.button,appearance:"ghost",variant:"white",onClick:()=>{i(!0)},label:"Все направления",eventActionText:"Все направления",iconLeft:(0,l.jsx)("div",{className:eh.icon,children:[1,2,3,4,5,6,7,8,9].map(e=>(0,l.jsx)("div",{},e))})})}),(0,l.jsxs)(V,{children:[!t&&(0,l.jsx)(G,{isOpen:n,onClose:o,full:!0,children:(0,l.jsx)(ep,{directions:e})}),t&&(0,l.jsx)(M,{isOpen:n,onClose:o,width:"804px",children:(0,l.jsx)(ep,{directions:e})})]})]})},ev=(0,u.g)("footer-left-column","sc"),eg=Object.freeze({leftColumn:`${ev}__left-column`,logoWrapper:`${ev}__logo-wrapper`,banner:`${ev}__banner`,mobAppLink:`${ev}__mob-app-link`,br:`${ev}__br`}),ew=({showcaseUrl:e,minioUrl:t,directions:n,mobAppUrl:i})=>{let o=ec(i);return(0,l.jsxs)("div",{className:eg.leftColumn,children:[(0,l.jsx)(ei,{className:eg.logoWrapper,href:e,eventActionType:p.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:(0,l.jsx)("img",{src:(0,c.xn)(t,"/widgets/footer/finuslugi_base_logo.svg"),alt:"finuslugi logo",loading:"lazy"})}),(0,l.jsx)(ef,{directions:n??[]}),(0,l.jsx)(ei,{href:o,target:"_blank",eventActionType:p.D.banner,eventActionText:"Управляйте финансами через приложение Финуслуг",eventLabel:o,className:eg.mobAppLink,children:(0,l.jsxs)(r.Zb,{className:eg.banner,children:[(0,l.jsxs)(r.xv,{weight:"medium",children:["Управляйте финансами",(0,l.jsx)("br",{}),"через приложение",(0,l.jsx)("br",{className:eg.br})," Финуслуг"]}),(0,l.jsx)(en,{iconRight:(0,l.jsx)(m.IconFdsArrowUpRightSmallO,{size:32}),shape:"circle-icon",variant:"white",eventActionText:"IconFdsArrowUpRightSmallO"}),(0,l.jsxs)("picture",{children:[(0,l.jsx)("source",{srcSet:(0,c.xn)(t,"/widgets/footer/apps_d.webp"),media:"(min-width: 1024px)"}),(0,l.jsx)("img",{src:(0,c.xn)(t,"/widgets/footer/apps_m.webp"),alt:"иллюстрация мобильного приложения",loading:"lazy"})]})]})})]})},ex=(0,u.g)("footer-logo","sc"),e_=Object.freeze({wrapper:`${ex}__wrapper`,link:`${ex}__link`,fromMoex:`${ex}__from-moex`,logo:`${ex}__logo`,white:`${ex}__wrapper--white`}),eb=({showcaseUrl:e,minioUrl:t,isWhite:n})=>(0,l.jsx)("div",{className:(0,a.Z)(e_.wrapper,{[e_.white]:n}),children:(0,l.jsxs)(ei,{className:e_.link,href:e,eventActionType:p.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:[(0,l.jsx)("img",{className:e_.logo,src:`${t}/images/logo-brandmark-common-finuslugi.svg`}),(0,l.jsx)("img",{className:e_.fromMoex,src:`${t}/images/fromMoex.svg`})]})});var ej=((i=ej||{}).BLACK="black",i.GRAY="gray",i);let ey=(0,u.g)("footer-warning","sc"),e$=Object.freeze({reservedSpace:`${ey}__reserved-space`,wrapper:`${ey}__wrapper`,wrapperGray:`${ey}__wrapper--gray`,fixed:`${ey}__wrapper--fixed`,container:`${ey}__container`,text:`${ey}__text`,invisibleText:`${ey}__text--invisible`}),eN=({text:e,variant:t,fixed:n,isPlaceholder:i})=>(0,l.jsx)("div",{className:(0,a.Z)(e$.wrapper,{[e$.wrapperGray]:"gray"===t,[e$.fixed]:n&&!i}),children:(0,l.jsx)(r.W2,{className:e$.container,children:(0,l.jsx)("div",{className:(0,a.Z)(e$.text,{[e$.invisibleText]:i}),dangerouslySetInnerHTML:{__html:e}})})}),eC=({warning:e})=>{let t="string"==typeof e?{text:e}:e,n={text:t.text,fixed:t.fixed??!0,variant:t.variant??ej.BLACK};return(0,l.jsxs)("div",{className:e$.reservedSpace,children:[(0,l.jsx)(eN,{...n,isPlaceholder:n.fixed}),n.fixed&&(0,l.jsx)(eN,{...n,fixed:!0})]})},ek=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",customDisclaimer:i,variant:o="default",className:s})=>{var c,u;let d=!i&&null!=e&&e.disclaimer?e.disclaimer:void 0,p=o.includes("compact"),m=o.includes("white"),h=null==(c=null==e?void 0:e.bottom)?void 0:c.concat(p?K:[]),f=e&&"warning"in e?e.warning:void 0;return e?(0,l.jsx)("footer",{className:(0,a.Z)(Q.wrapper,s,{[Q.compact]:p,[Q.white]:m}),children:(0,l.jsxs)("section",{className:Q.section,children:[(0,l.jsxs)(r.W2,{className:Q.container,children:[!p&&(0,l.jsx)(ew,{showcaseUrl:t,minioUrl:n,directions:null==e?void 0:e.directions,mobAppUrl:null==e?void 0:e.mobAppUrl}),(0,l.jsx)("div",{className:Q.wrapper,children:(0,l.jsxs)("div",{className:Q.top,children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:Q.main,children:[!p&&(0,l.jsx)("div",{className:Q.links,children:null==(u=null==e?void 0:e.top)?void 0:u.map(e=>(0,l.jsx)(ei,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),p&&(0,l.jsx)(eb,{showcaseUrl:t,minioUrl:n,isWhite:m}),(0,l.jsx)(er,{className:Q.disclaimer,disclaimer:d,children:i||et})]}),(0,l.jsxs)("div",{className:Q.bottom,children:[(0,l.jsx)("div",{className:Q.bottomLinks,children:null==h?void 0:h.map(e=>(0,l.jsx)(ei,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),(0,l.jsx)(er,{className:Q.bottomDisclaimer,disclaimer:null==e?void 0:e.bottomDisclaimer})]})]}),!p&&(0,l.jsx)(el,{minioUrl:n,blogs:null==e?void 0:e.blogs})]})})]}),p&&!!f&&(0,l.jsx)(eC,{warning:f})]})}):null},eO=(0,u.g)("header","sc"),eT=Object.freeze({header:`${eO}`,fixed:`${eO}__fixed`,hidden:`${eO}__fixed--hidden`,transparent:`${eO}--transparent`,navigationOpen:`${eO}__navigation-open`,container:`${eO}__container`,leftRow:`${eO}__left-row`,logo:`${eO}__logo`,menuItems:`${eO}__menu-items`,menuItemActive:`${eO}__menu-item-active`,tabletMenuButton:`${eO}__tablet-menu-button`,buttonGroup:`${eO}__button-group`,chips:`${eO}__chips`,menuButton:`${eO}__menu-button`,moreButtons:`${eO}__more-buttons`,auth:`${eO}__auth`,whiteIcons:`${eO}__white-icons`,close:`${eO}__close`,removed:`${eO}__removed`,overlay:`${eO}__overlay`,overlayOpening:`${eO}__overlay--opening`,overlayClosing:`${eO}__overlay--closing`}),eS="user_region",eA="user_town",eI="cb-header",eR=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],eL=eR.reduce((e,t)=>(e[t.id]=t.label,e),{}),eP=Object.freeze({mobile:56,desktop:80});var ez=n(5487);let eE=(e,t,n)=>{if(typeof window>"u"||typeof document>"u")return;let i=document.getElementById("mainHomeBanner"),l=!1,o=0,s=0,r=()=>window.innerWidth<768,a=r(),c=()=>window.scrollY||document.documentElement.scrollTop,u=()=>{let e=document.querySelector(":root");e&&(s=parseFloat(window.getComputedStyle(e).getPropertyValue("--fixed-header-height")),o=c())},d=()=>{let e=r();e!==a&&(a=e,s=0)},p=function(){let r=c(),a=document.getElementById("headerNotice"),d=null==a?void 0:a.getAttribute("data-opening");if("true"===d)return;s||u();let p=r<s,m=r<((null==i?void 0:i.clientHeight)||0);if(n&&m||p){l=!1,e(!1),t(!0);return}e(l=r>o),l&&setTimeout(()=>t(!1),50);let h=l?"0px":"false"===d?`${s}px`:"";document.documentElement.style.setProperty("--new-header-height-desktop",h),document.documentElement.style.setProperty("--new-header-height-mobile",h),o=r<=0?0:r};return window.addEventListener("scroll",p),window.addEventListener("resize",d),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",d)}},eM=()=>{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},eU=()=>document.cookie.split(";").some(e=>e.trim().startsWith("utm_params=")),eB=(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}`},eW=()=>{let e=eM();e&&!eU()&&eB("utm_params",e,90),e&&eB("utm_last",e,90)},eD=()=>{setTimeout(()=>{if(!(typeof document>"u"||"string"!=typeof document.cookie))try{eW()}catch(e){console.error("UTM tracking error:",e)}},0)},eF=(e,t,n)=>(0,p.h)({eventCategory:eI,eventActionType:e,eventActionText:t,eventLabel:n}),eZ=(0,u.g)("navigation-chips","sc"),eG=Object.freeze({wrapper:`${eZ}__wrapper`,gray:`${eZ}__variantGray`,white:`${eZ}__variantWhite`,container:`${eZ}__container`,chip:`${eZ}__chip`,more:`${eZ}__chip--more`,active:`${eZ}__chip--active`,label:`${eZ}__label`,hidden:`${eZ}__hidden`}),eV=(0,u.g)("navigation-content","sc"),eH=Object.freeze({contentWrapper:`${eV}__content-wrapper`,content:`${eV}__content`,contentOpen:`${eV}__content--open`,contentHeader:`${eV}__content-header`,contentTitle:`${eV}__content-title`,contentTitleUrl:`${eV}__content-title--url`,contentTitleLink:`${eV}__content-title--link`,contentTitleNew:`${eV}__content-title--new`,new:`${eV}__new`,vip:`${eV}__vip`,arrowIcon:`${eV}__arrow-icon`,links:`${eV}__links`,linksColumns:`${eV}__links--columns`,linksTitleless:`${eV}__links--titleless`,removed:`${eV}__removed`,hidden:`${eV}__content--hidden`}),eq=({chip:e,hidden:t,onClick:n,refCallback:i,activeChipId:o})=>{let s=!!n,r=()=>{if(s)return null==n?void 0:n(e.url);eF(p.D.chip,e.title,`${e.title}_${e.url}`)},c=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:eG.label,children:e.title}),e.arrow&&(0,l.jsx)(m.IconFdsArrowUpRightSmallO,{size:24})]}),u=(0,a.Z)(eG.chip,{[eG.hidden]:t,[eH.new]:!!e.new,[eH.vip]:!!e.vip,[eG.active]:e.url===o});return s?(0,l.jsx)("button",{type:"button",className:u,onClick:r,ref:i,children:c}):(0,l.jsx)("a",{href:e.url,className:u,onClick:r,ref:i,children:c})},eJ=({items:e=[],maxNumberOfLines:t,variant:n,className:i,activeChipId:o,onClick:s})=>{let r=(0,h.useRef)(null),c=(0,h.useRef)(null),u=(0,h.useRef)({}),[d,f]=(0,h.useState)(!1),[v,g]=(0,h.useState)(e.length),[w,x]=(0,h.useState)(!1);(0,h.useMemo)(()=>{let t=u.current;e.forEach(e=>{e.url in t||(t[e.url]=null)}),Object.keys(t).forEach(n=>{e.find(e=>String(e.url)===String(n))||delete t[n]})},[e]);let _=(0,h.useCallback)(()=>{let n=r.current;if(!n)return;let i=e=>e?e.getBoundingClientRect().width:0,l=i(n),o=Math.max(Number(t)||0,0),s=()=>{g(e.length),x(!1)};if(d||0===o||l<=0){s();return}let a=(()=>{try{let e=getComputedStyle(n),t=parseFloat(e.columnGap||e.gap||"12");return Number.isNaN(t)?12:t}catch{return 12}})(),p=i(c.current),m=e.map(e=>i(u.current[e.url]));if(m.some(e=>0===e)){s();return}let h=1,f=0,v=0;for(let e of m){let t=h===o?p+a:0,n=0===f?e:f+a+e;if(n+t<=l-.5)f=n,v++;else{if(++h>o)break;f=e,v++}}x(v<e.length),g(v)},[d,e,t]);(0,h.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(_)});return t.observe(e),requestAnimationFrame(_),()=>{t.disconnect()}},[_]),(0,h.useEffect)(()=>{requestAnimationFrame(_)},[_]);let b=d||(t??0)<=0||!w;return(0,l.jsx)("div",{className:(0,a.Z)(i,eG.wrapper,{[eG.gray]:"gray"===n,[eG.white]:"white"===n}),children:(0,l.jsxs)("div",{ref:r,className:eG.container,children:[e.map((e,t)=>(0,l.jsx)(eq,{chip:e,hidden:!b&&t>=v,activeChipId:o,onClick:s,refCallback:t=>{u.current[e.url]=t}},e.url)),!b&&w&&(0,l.jsxs)("button",{type:"button",ref:c,className:(0,a.Z)(eG.chip,eG.more),onClick:()=>{eF(p.D.chip,"Еще"),f(!0)},children:[(0,l.jsx)(m.IconFdsDotsVerticalO,{size:20}),(0,l.jsx)("span",{className:eG.label,children:"Еще"})]}),(b||!w)&&(0,l.jsxs)("button",{type:"button",ref:c,className:(0,a.Z)(eG.chip,eG.more,eG.hidden),tabIndex:-1,"aria-hidden":"true",children:[(0,l.jsx)(m.IconFdsDotsVerticalO,{size:20}),(0,l.jsx)("span",{className:eG.label,children:"Еще"})]})]})})},eQ=(e,t)=>{if(!(typeof document>"u")){if(!e&&!t){ez.a.removeItem(eS),ez.a.removeItem(eA);return}ez.a.setItem(eS,JSON.stringify(e)||"",{"max-age":31536e3}),ez.a.setItem(eA,JSON.stringify(t)||"",{"max-age":31536e3})}},eY=e=>{if(typeof document>"u")return null;let t=ez.a.getItem(e)??void 0;if(!t||"undefined"===t)return null;try{return JSON.parse(decodeURIComponent(t))}catch{return null}},eK=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},eX=()=>{if(typeof window>"u")return[];if(Array.isArray(window.allRegions)&&window.allRegions.length>0)return window.allRegions;let e=eK("all_regions")||[];return window.allRegions=e,e},e0=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]),[])},e1=async()=>{let e={regions:[]};try{e=await (await fetch("https://finuslugi.ru/money_data/Root.json?short=1")).json()}catch(e){console.warn(e)}let t=null!=e&&e.regions?e.regions:[];return t.length<1?[]:(window.allRegions=t,window.localStorage.setItem("all_regions",JSON.stringify(t)),window.localStorage.setItem("lastRegionsUpdateUnixTimestamp",JSON.stringify(Date.now())),t)},e2=async e=>{let t=null;try{t=await (await fetch(`${e}`,{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},e4=(e,t,n)=>{(0,p.h)({eventCategory:e6,eventActionType:e,eventActionText:t,eventLabel:n})},e5=eX(),e3=e0(e5),e7={regions:e5,towns:e3,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},e6="finkit-widgets-sc-city-select",e8=(0,h.createContext)(e7);function e9(){return(0,h.useContext)(e8)}let te=({children:e,initialRegion:t,initialTown:n,showStartGeoPopup:i=!0,lastRegionsUpdateUnixTimestamp:o,dadataUrl:s="https://finuslugi.ru/backend/money/dadata"})=>{let r=Number(eK("lastRegionsUpdateUnixTimestamp")||0),a=Number(o||0)>r,[c,u]=(0,h.useState)(eX()),[{startRegion:d,startTown:m},f]=(0,h.useState)({startRegion:e7.startRegion,startTown:e7.startTown}),v=t??e7.region,g=n??e7.town,[{region:w,town:x},_]=(0,h.useState)({region:v,town:g}),[b,j]=(0,h.useState)(e7.startPopupVisible),[y,$]=(0,h.useState)(e7.popupVisible),N=(0,h.useRef)(""),C=(0,h.useMemo)(()=>e0(c),[c.length]),k=(0,h.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)||""),j(!0),f({startRegion:e,startTown:t})},[j,f]),O=(0,h.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||k(e,t)},[k]),T=(0,h.useCallback)(()=>{if(N.current&&!w&&!x){let e=C.find(e=>e.name===N.current)??null;return O(c.find(t=>t.id===(null==e?void 0:e.parentId))??null,e)}O(w,x)},[w,x,C,c,O]),S=(0,h.useCallback)(e=>{$(e)},[$]),A=(0,h.useCallback)(e=>{e?e4(p.D.icon,"location"):e4(p.D.button,(null==x?void 0:x.name)||"Вся Россия"),!i||window.sessionStorage.getItem("start_popup_opened")?S(!0):T()},[i,x,S,T]),I=(0,h.useCallback)((e,t)=>{e||t?(window.localStorage.setItem("all_russia_selected","0"),window.localStorage.setItem(eS,JSON.stringify(e)||""),window.localStorage.setItem(eA,JSON.stringify(t)||""),eQ(e||null,t||null)):(window.localStorage.setItem("all_russia_selected","1"),window.localStorage.setItem(eS,""),window.localStorage.setItem(eA,""),eQ(null,null)),_({region:e||null,town:t||null}),j(!1),S(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[S]),R=()=>{_({region:eY(eS)??eK(eS),town:eY(eA)??eK(eA)});let e=async({coords:{latitude:e,longitude:t}})=>{let n=`${s}?lat=${e}&lon=${t}`,i=await e2(n);null!=i&&i.location&&(N.current=i.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&i)try{navigator.geolocation.getCurrentPosition(e,()=>null)}catch{}};return(0,h.useEffect)(()=>{if((c.length<1||a)&&e1().then(e=>u(e)),window.innerWidth<1024){let e=()=>{R(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{R()},0)},[]),(0,l.jsx)(e8.Provider,{value:{regions:c,towns:C,region:w,town:x,startPopupVisible:b,setStartPopupVisible:j,popupVisible:y,handleToggleModal:S,selectCity:I,handleButtonClick:A,startRegion:d,startTown:m},children:e})},tt=()=>{let e=(0,h.useRef)(null),t=(0,h.useCallback)(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),n=(0,h.useCallback)((t,n)=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,t()},n)},[]);return(0,h.useEffect)(()=>t,[t]),{start:n,clear:t,pending:!!e.current}},tn=(0,u.g)("city-select-modal-body","sc"),ti=Object.freeze({wrapper:`${tn}__wrapper`,subtitle:`${tn}__subtitle`,hintWrapper:`${tn}__hint-wrapper`,hintText:`${tn}__hint-text`,input:`${tn}__input`,chips:`${tn}__chips`,townsListWrapper:`${tn}__towns-list-wrapper`,townsList:`${tn}__towns-list`,townsGroup:`${tn}__towns-group`,townsGroupLabel:`${tn}__towns-group-label`,townsGroupList:`${tn}__towns-group-list`,townsName:`${tn}__towns-name`,regionName:`${tn}__region-name`}),tl=({groupedTowns:e,chips:t,query:n,setQuery:i,isDrawer:o})=>{var s;let r=e9(),a=(0,h.useRef)(null),[c,u]=(0,h.useState)("10000px");(0,h.useEffect)(()=>{if(!o||!a.current)return;let e=e=>e.reduce((e,t)=>e+t,0),t=(n,i)=>{let l=n.map(e=>[...e]),o=l.map(e),s=o.reduce((e,t,n)=>t<o[e]?n:e,0);0===s&&l[0].push(l[1].shift()),2===s&&l[2].unshift(l[1].pop()),1===s&&o[0]>o[2]&&l[1].unshift(l[0].pop()),1===s&&o[0]<o[2]&&l[1].push(l[2].shift());let r=Math.max(...l.map(e));return r>=i?i:t(l,r)};new ResizeObserver(()=>{var e;if(!(null!=(e=a.current)&&e.children))return;let n=Array.from(a.current.children,e=>e.offsetHeight+32);if(0===n.length)return;let i=0;try{i=t([[],n,[]],1/0)}catch{i=0}i>0&&u(`${i}px`)}).observe(a.current)},[]);let f=e=>{if(e4(p.D.button,(null==e?void 0:e.name)||"Вся Россия"),!(null!=e&&e.id))return r.selectCity();let t=r.regions.find(t=>t.id===Number(e.parentId))||null;r.selectCity(t,e)};return(0,l.jsxs)("div",{className:ti.wrapper,children:[(0,l.jsxs)("div",{className:ti.subtitle,children:["Покажем предложения рядом с вами",(0,l.jsxs)("div",{className:ti.hintWrapper,children:[(0,l.jsx)(m.IconFdsQuestionCircleO,{size:24}),(0,l.jsx)("div",{className:ti.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,l.jsx)(d.MA,{className:ti.input,value:n,onChange:i,size:"s",placeholder:"Введите название города",icon:n?(0,l.jsx)(m.IconFdsCloseCircleO,{size:24,onClick:()=>i("")}):(0,l.jsx)(m.IconFdsSearchO,{size:24})}),(0,l.jsx)(d.cL,{className:ti.chips,chips:t,value:(null==(s=r.town)?void 0:s.id)||0,onChipClick:e=>{f(r.towns.find(t=>t.id===e))}}),(0,l.jsx)("div",{className:ti.townsListWrapper,children:(0,l.jsx)("div",{ref:a,className:ti.townsList,style:{maxHeight:c},children:e.map(e=>(0,l.jsxs)("div",{className:ti.townsGroup,children:[(0,l.jsx)("div",{className:ti.townsGroupLabel,children:e.letter}),(0,l.jsx)("div",{className:ti.townsGroupList,children:e.towns.map(e=>(0,l.jsxs)("button",{type:"button",onClick:()=>f(e),children:[(0,l.jsx)("div",{className:ti.townsName,children:e.name}),(0,l.jsx)("div",{className:ti.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},to=[1095,1096,134,720,189,180],ts=()=>{var e;let t=e9(),n=(0,d._m)("l"),[i,o]=(0,h.useState)(""),s=`Ваш выбор: ${(null==(e=t.town)?void 0:e.name)||"Вся Россия"}`,r=(0,h.useMemo)(()=>t.towns.filter(e=>-1!==String(e.name).toLocaleLowerCase().indexOf(i.toLocaleLowerCase())).sort((e,t)=>e.name.localeCompare(t.name)).reduce((e,t)=>{let n=e.pop();return n||(n={letter:t.name[0],towns:[]}),n.letter!==t.name[0]&&(e.push(n),n={letter:t.name[0],towns:[]}),n.towns.push(t),e.push(n),e},[]),[i,t.towns.length]),a=(0,h.useMemo)(()=>[{id:0,label:"Вся Россия"},...to.map(e=>{let n=t.towns.find(t=>t.id===e);return{id:null==n?void 0:n.id,label:null==n?void 0:n.name}}).filter(e=>(null==e?void 0:e.id)!==void 0)],[t.towns.length]),c=()=>{e4(p.D.button,"close"),t.handleToggleModal(!1)};return(0,l.jsxs)(V,{children:[!n&&(0,l.jsx)(G,{title:s,isOpen:t.popupVisible,onClose:c,full:!0,children:(0,l.jsx)(tl,{groupedTowns:r,chips:a,query:i,setQuery:o})}),n&&(0,l.jsx)(M,{title:s,isOpen:t.popupVisible,onClose:c,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,l.jsx)(tl,{groupedTowns:r,chips:a,query:i,setQuery:o,isDrawer:!0})})]})},tr={"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"},ta=()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(tr,e)?tr[e]:tr["finuslugi.ru"]},tc=(e,t)=>{let n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=`${e}/assets/css/${t}`,document.head.appendChild(n);let i=document.createElement("script");i.src=`${e}/get-bootstrap/${t}`,i.defer=!0,document.body.appendChild(i)},tu=()=>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)}})}),td=()=>{let[e,t]=(0,h.useState)(!1),[n,i]=(0,h.useState)(!1),l=(0,h.useRef)(!1),o=e=>{l.current=e,i(e)};return(0,h.useEffect)(()=>{if(typeof window>"u")return;let e=ta(),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((s,r)=>{if(l.current){r(Error("chat is already opened"));return}i?(i.openWidget(),t(!1),s()):(o(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;i=e;let l=document.querySelector(".webchat");l&&tu().observe(l,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=i.closeWidget),null==i||i.openWidget(),o(!1),t(!1),s()},tc(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}},tp=(0,h.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 tm(){return(0,h.useContext)(tp)}let th=e=>{let[t,n]=(0,h.useState)(!1),[i,o]=(0,h.useState)(!1),[s,r]=(0,h.useState)(!!e.isMainBannerPage),{isChatModalOpen:a,setIsChatModalOpen:c,isChatLoading:u}=td(),[d,p]=(0,h.useState)(null),[m,f]=(0,h.useState)(null),[v,g]=(0,h.useState)(!1),[w,x]=(0,h.useState)(!1),[_,b]=(0,h.useState)(!1),j=(0,h.useRef)(null),y=O(v),$=(0,h.useRef)(null),N=(0,h.useRef)(null),C=(0,h.useRef)(null),k=(0,h.useRef)(null),T=(0,h.useCallback)(()=>{y.current&&y.current.scrollTo({top:0})},[y]),S=(0,h.useCallback)(e=>{f(e),T()},[T]),A=(0,h.useCallback)(e=>{$.current&&clearTimeout($.current),e&&x(!0),e||($.current=setTimeout(()=>{x(!1),S(null)},300))},[S]),I=(0,h.useCallback)((e,t,n)=>{if(t&&S(t),!n&&e===d||!e){A(!v),g(!v);return}p(e),A(!0),g(!0)},[d,S,v,A]),R=(0,h.useCallback)(()=>{N.current&&clearTimeout(N.current),b(!0),N.current=setTimeout(()=>{b(!1)},650)},[]);return(0,h.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id"));let t=eE(o,r,e.isMainBannerPage);return eD(),t},[]),(0,l.jsx)("header",{children:(0,l.jsx)(tp.Provider,{value:{isAuth:t,isHeaderHidden:i,isHeaderTransparent:s,openedBlock:d,setOpenedBlock:I,openedSection:m,setOpenedSection:S,isNavigationOpen:v,isNavigationMounted:w,navMenuItemsRef:j,navigationRef:y,ignoreClicks:_,setIgnoreClicks:R,isChatModalOpen:a,setIsChatModalOpen:c,isChatLoading:u,fixedContainerRef:C,headerRef:k},children:e.children})})},tf=({label:e,onClick:t,eventActionText:n,eventLabel:i,...o})=>(0,l.jsx)(d.zx,{label:e,onClick:e=>{null==t||t(e),(0,p.h)({eventCategory:eI,eventActionType:p.D.button,eventActionText:n||"",eventLabel:i||""})},...o}),tv=(0,u.g)("header-popup","sc"),tg=Object.freeze({popup:`${tv}__popup`,popupHeader:`${tv}__popup-header`,popupClose:`${tv}__popup-close`,body:`${tv}__body`}),tw=({isOpen:e,onClose:t,children:n,title:i})=>{let o=(0,d._m)("l");return(0,l.jsxs)(V,{children:[!o&&(0,l.jsx)(G,{title:i,isOpen:e,onClose:t,children:n}),o&&e&&(0,l.jsxs)("div",{className:tg.popup,children:[(0,l.jsxs)("div",{className:tg.popupHeader,children:[i,(0,l.jsx)(tf,{className:tg.popupClose,iconLeft:(0,l.jsx)(m.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:t,eventActionText:"IconFdsCloseO"})]}),(0,l.jsx)("div",{className:tg.body,children:n})]})]})},tx=(0,u.g)("start-choice-popup","sc"),t_=Object.freeze({top:`${tx}__top`,progress:`${tx}__progress`,innerCircle:`${tx}__inner-circle`,title:`${tx}__title`,subtitle:`${tx}__subtitle`,actions:`${tx}__actions`}),tb=()=>{var e,t;let n=e9(),[i,o]=(0,h.useState)(10),[s,r]=(0,h.useState)(0),a=(0,h.useRef)(void 0),c=()=>{e4(p.D.button,"close_choose_popup"),window.localStorage.setItem("auto_town",JSON.stringify(n.startTown)||""),window.localStorage.setItem("auto_region",JSON.stringify(n.startRegion)||""),n.setStartPopupVisible(!1)};return(0,h.useEffect)(()=>{n.startPopupVisible?(()=>{let e=Number((" "+i).slice(1)),t=1e3*e/100,n=0,l=0;a.current=setInterval(()=>{n++,l+=t,r(3.6*n);let s=e-Math.floor(l/1e3);s<i&&o(s),100===n&&(clearInterval(a.current),c())},t)})():(clearInterval(a.current),o(10),r(0))},[n.startPopupVisible]),(0,l.jsxs)(tw,{isOpen:n.startPopupVisible,onClose:c,title:(0,l.jsx)("button",{type:"button",className:t_.progress,style:{background:`conic-gradient(#ff0508 ${s}deg, #e3e7ec 0deg)`},onClick:c,children:(0,l.jsx)("div",{className:t_.innerCircle,children:i})}),children:[(0,l.jsxs)("div",{className:t_.top,children:[(0,l.jsxs)("div",{className:t_.title,children:["Ваш город ",(null==(e=n.startTown)?void 0:e.name)||(null==(t=n.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,l.jsx)("div",{className:t_.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,l.jsxs)("div",{className:t_.actions,children:[(0,l.jsx)(tf,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{e4(p.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,l.jsx)(tf,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{e4(p.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},tj=(0,u.g)("city-select","sc"),ty=Object.freeze({button:`${tj}__button`,minimal:`${tj}__minimal`,full:`${tj}__full`}),t$=({initialTown:e})=>{var t;let n=e9(),i=(null==(t=n.town)?void 0:t.name)||e||"Вся Россия",{setIsChatModalOpen:o,isChatModalOpen:s}=tm(),{startPopupVisible:r,setStartPopupVisible:c,popupVisible:u}=n,p=(0,h.useRef)();(0,h.useEffect)(()=>{u&&(p.current="popup")},[u]),(0,h.useEffect)(()=>{s&&(p.current="chat")},[s]),(0,h.useEffect)(()=>{r&&(p.current="startPopup")},[r]),(0,h.useEffect)(()=>{p.current&&("chat"===p.current&&r?c(!1):["startPopup","popup"].includes(p.current)&&s&&o(!1))},[u,s,r,c,o]);let f={appearance:"ghost",size:"xs",onClick:()=>n.handleButtonClick(!1),iconLeft:(0,l.jsx)(m.IconFdsLocationO,{size:24})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.zx,{...f,className:(0,a.Z)(ty.button,ty.full),label:i}),(0,l.jsx)(d.zx,{...f,className:(0,a.Z)(ty.button,ty.minimal),shape:"icon"}),(0,l.jsx)(ts,{}),(0,l.jsx)(tb,{})]})},tN=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:i,...o})=>(0,l.jsx)(d.rU,{onClick:l=>{null==e||e(l),(0,p.h)({eventCategory:eI,eventActionType:t||p.D.link,eventActionText:n||"",eventLabel:i||""})},...o}),tC=(0,u.g)("header-mobile-app-banner","sc"),tk=Object.freeze({wrapper:`${tC}__wrapper`,container:`${tC}__container`,closeButton:`${tC}__close-button`,innerWrapper:`${tC}__inner-wrapper`,imageWrapper:`${tC}__image-wrapper`,image:`${tC}__image`,title:`${tC}__title`,description:`${tC}__description`,callToAction:`${tC}__call-to-action`,scanQr:`${tC}__scan-qr`}),tO=Object.freeze({mobile:56,desktop:68}),tT="headerBannerShownAt",tS=()=>{let e=localStorage.getItem(tT);if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},tA=()=>{localStorage.setItem(tT,new Date().toISOString())},tI=()=>{let e=tS();return!e||Math.floor((e.getTime()-new Date().getTime())/864e5)>5},tR=({minioUrl:e,className:t,mobileAppUrl:n})=>{let{fixedContainerRef:i,headerRef:o}=tm(),[s,u]=(0,h.useState)(!1),[f,v]=(0,h.useState)(!1),[g,w]=(0,h.useState)(!1),x=(0,h.useCallback)((e="desktop")=>{let t=i.current;t&&(t.style.transform="translateY(0)",document.documentElement.style.setProperty("--fixed-header-height",`${tO[e]+eP[e]}px`),document.documentElement.style.setProperty("--new-header-height-desktop",`${tO.desktop+eP.desktop}px`),document.documentElement.style.setProperty("--new-header-height-mobile",`${tO.mobile+eP.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-mobile",`${tO.mobile+eP.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-desktop",`${tO.desktop+eP.desktop}px`),document.documentElement.style.setProperty("--header-height",`${tO[e]+108}px`))},[]),_=(0,h.useCallback)(()=>{let e=i.current;e&&(document.documentElement.style.removeProperty("--fixed-header-height"),document.documentElement.style.removeProperty("--new-header-height-desktop"),document.documentElement.style.removeProperty("--new-header-height-mobile"),document.documentElement.style.removeProperty("--static-new-header-height-mobile"),document.documentElement.style.removeProperty("--static-new-header-height-desktop"),document.documentElement.style.removeProperty("--header-height"),e.style.transform="")},[]);return(0,h.useEffect)(()=>{let e=o.current;if(!e)return;let t=()=>{f&&u(!1),w(!1)};return e.addEventListener("transitionend",t),()=>{e.removeEventListener("transitionend",t)}},[f]),(0,h.useEffect)(()=>{tI()&&u(!0)},[]),(0,h.useEffect)(()=>{let e=window.innerWidth<768;s&&(x(e?"mobile":"desktop"),window.matchMedia("(prefers-reduced-motion: reduce)").matches?u(!0):w(!0));let t=()=>{if(!s)return null;x(window.innerWidth<768?"mobile":"desktop")};return window.addEventListener("resize",t),()=>{_(),window.removeEventListener("resize",t)}},[s,x,_]),s?(0,l.jsx)("div",{id:"headerNotice",role:"region","aria-label":"Мобильное приложение","data-opening":g,className:(0,a.Z)(tk.wrapper,t),children:(0,l.jsx)(r.W2,{children:(0,l.jsxs)("div",{className:tk.container,children:[(0,l.jsxs)("div",{className:tk.innerWrapper,children:[(0,l.jsxs)("picture",{className:tk.imageWrapper,children:[(0,l.jsx)("source",{srcSet:(0,c.xn)(e,"/widgets/header/qr-mobile-app.svg"),media:"(min-width: 768px)"}),(0,l.jsx)("img",{className:tk.image,src:(0,c.xn)(e,"/logo/finuslugi/default-regular.svg")})]}),(0,l.jsxs)("div",{className:tk.scanQr,children:[(0,l.jsx)("div",{className:tk.title,children:"Скачайте приложение Финуслуги"}),(0,l.jsx)("div",{className:tk.description,children:"Сканируйте QR-код"})]}),(0,l.jsxs)("div",{className:tk.callToAction,children:[(0,l.jsxs)("div",{children:["Приложение",(0,l.jsx)("br",{}),"Финуслуги"]}),(0,l.jsx)(d.zx,{onClick:()=>{eF(p.D.button,"skachat_mob_prilozheniye_fu"),window.open(n,"_blank","noreferrer")},variant:"white",size:"xs",children:"Скачать"})]})]}),(0,l.jsx)("div",{"aria-label":"Закрыть",role:"button",className:tk.closeButton,onClick:()=>{tA(),_(),window.matchMedia("(prefers-reduced-motion: reduce)").matches?u(!1):v(!0)},children:(0,l.jsx)(m.IconFdsCloseO,{size:"100%"})})]})})}):null},tL=(0,u.g)("header-chat-modal-body","sc"),tP=Object.freeze({wrapper:`${tL}__wrapper`,cardButton:`${tL}__card-button`,card:`${tL}__card`,cardTitle:`${tL}__card-title`,cardSubtitle:`${tL}__card-subtitle`,button:`${tL}__button`}),tz=()=>{let e=tm();return(0,l.jsxs)("div",{className:tP.wrapper,children:[(0,l.jsx)(tf,{className:tP.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,l.jsxs)(r.Zb,{className:tP.card,variant:"secondary",children:[(0,l.jsxs)("div",{className:tP.cardTitle,children:[(0,l.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat",width:24,height:24,loading:"lazy"}),"Напишите в чат"]}),(0,l.jsxs)("p",{className:tP.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,l.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),!1]})},tE=({data:e,isMobile:t})=>{let n=tm();return(0,l.jsx)("div",{className:eH.contentWrapper,children:e.map(e=>(0,l.jsx)(h.Fragment,{children:e.sections.map(e=>{var i;return(0,l.jsxs)("div",{className:(0,a.Z)(eH.content,{[eH.hidden]:n.openedSection!==e.id,[eH.contentOpen]:!!n.openedSection}),children:[(0,l.jsx)("div",{className:eH.contentHeader,children:(0,l.jsx)("label",{children:e.title})}),null==(i=e.content)?void 0:i.map((n,i)=>{var o,s;return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("a",{className:(0,a.Z)(eH.contentTitle,{[eH.removed]:!n.title,[eH.contentTitleUrl]:!!n.url,[eH.contentTitleLink]:!!e.isSeeAllLinkAvailable,[eH.contentTitleNew]:!!n.new}),href:e.isSeeAllLinkAvailable?n.url:void 0,children:(0,l.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,l.jsx)("div",{className:eH.arrowIcon,children:(0,l.jsx)(m.IconFdsArrowUpRightSmallO,{})}),n.title]})})}),!(null!=(o=n.links)&&o.length)&&(0,l.jsx)(eJ,{items:n.chips||[],maxNumberOfLines:e.content.length<=1?99:t?3:2}),!!(null!=(s=n.links)&&s.length)&&(0,l.jsx)("div",{className:(0,a.Z)(eH.links,{[eH.linksColumns]:!!n.columns,[eH.linksTitleless]:!n.title}),children:n.links.map(e=>(0,l.jsxs)("a",{href:e.url,className:(0,a.Z)({[eH.new]:!!e.new}),onClick:()=>eF(p.D.link,e.title,`${e.title}_${e.url}`),children:[(0,l.jsx)("div",{className:eH.arrowIcon,children:(0,l.jsx)(m.IconFdsArrowUpRightSmallO,{})}),(0,l.jsx)("span",{children:e.title})]},e.url))})]},`${n.url}_${i}`)})]},e.id)})},e.id))})},tM=(0,u.g)("navigation-section-icon","sc"),tU=Object.freeze({icon:`${tM}`}),tB=({name:e,background:t})=>{let n=(0,h.useMemo)(()=>e&&m[e]||null,[e]);return e&&n?(0,l.jsx)("div",{className:tU.icon,style:{background:t},children:(0,l.jsx)(n,{})}):null},tW=(0,u.g)("navigation","sc"),tD=Object.freeze({navigation:`${tW}`,navigationOpening:`${tW}--opening`,navigationClosing:`${tW}--closing`,wrapper:`${tW}__wrapper`,container:`${tW}__container`,containerOpen:`${tW}__container--open`,sections:`${tW}__sections`,sectionsOpen:`${tW}__sections--open`,citySelectButton:`${tW}__city-select-button`,sectionsTitle:`${tW}__sections-title`,sectionsWrapper:`${tW}__sections-wrapper`,section:`${tW}__section`,sectionArrow:`${tW}__section-arrow`,sectionExtra:`${tW}__section--extra`,sectionActive:`${tW}__section--active`,sectionTitle:`${tW}__section-title`,chatWrapper:`${tW}__chat-wrapper`,chatHeader:`${tW}__chat-header`,backButton:`${tW}__back-button`,useful:`${tW}__useful`,usefulOpen:`${tW}__useful--open`,usefulTitle:`${tW}__useful-title`,usefulGrid:`${tW}__useful-grid`,removed:`${tW}__removed`}),tF=({data:e})=>{var t;let n=tm(),i=e9(),o=(0,d.aF)("m"),[s,c]=(0,h.useState)(!0);(0,h.useEffect)(()=>{c(o)},[o]);let u=(0,h.useRef)(null),f=(0,h.useCallback)(()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>n.openedSection?n.setOpenedSection(null):n.isNavigationOpen?n.setOpenedBlock(null):void 0,50)},[n]),v=(0,h.useRef)(!1),g=(0,h.useRef)(null),w=(0,h.useCallback)(()=>{s&&(v.current=!0,g.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),f()},window.history.pushState(null,"",window.location.href))},[f,s]),x=(0,h.useCallback)(()=>{v.current=!1,window.onpopstate=g.current,window.history.go(-1)},[]),_=(0,h.useRef)(null),b=(0,h.useCallback)(e=>{if(s||!n.navMenuItemsRef.current||!n.navigationRef.current)return;let t=e.target,i=!n.navMenuItemsRef.current.contains(t)&&!n.navigationRef.current.contains(t);if(i&&!_.current){n.setIgnoreClicks(),_.current=setTimeout(()=>n.setOpenedBlock(null),300);return}!i&&_.current&&(clearTimeout(_.current),_.current=null)},[s,n]),j=(0,h.useRef)(null),y=(0,h.useCallback)(e=>{typeof window>"u"||(e?(j.current=b,window.addEventListener("mousemove",j.current)):j.current&&window.removeEventListener("mousemove",j.current))},[b]);(0,h.useEffect)(()=>{y(n.isNavigationOpen),n.isNavigationOpen&&!v.current&&w(),!n.isNavigationOpen&&v.current&&x()},[n.isNavigationOpen]);let $=(e,t)=>()=>{eF(p.D.button,t),n.setOpenedSection(e)},{start:N,clear:C}=tt(),k=(e,t)=>()=>{s||N($(e,t),150)},O=()=>{s||C()};return(0,l.jsx)("div",{ref:n.navigationRef,className:(0,a.Z)(tD.navigation,{[tD.removed]:!n.isNavigationMounted,[tD.navigationOpening]:n.isNavigationOpen,[tD.navigationClosing]:!n.isNavigationOpen}),children:(0,l.jsx)("div",{className:tD.wrapper,children:(0,l.jsxs)(r.W2,{className:(0,a.Z)(tD.container,{[tD.containerOpen]:!!n.openedSection}),children:[(0,l.jsxs)("div",{className:(0,a.Z)(tD.sections,{[tD.sectionsOpen]:!!n.openedSection}),children:[(0,l.jsx)(d.zx,{className:tD.citySelectButton,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>i.handleButtonClick(!1),iconLeft:(0,l.jsx)(m.IconFdsLocationO,{size:24}),label:(null==(t=i.town)?void 0:t.name)||"Вся Россия"}),e.map(e=>(0,l.jsxs)("ul",{className:(0,a.Z)(tD.sectionsWrapper,{[tD.removed]:n.openedBlock!==e.id&&!s}),children:[(0,l.jsx)("div",{className:tD.sectionsTitle,children:eL[e.id]}),e.sections.map(e=>(0,l.jsxs)("li",{className:(0,a.Z)(tD.section,{[tD.sectionExtra]:!!e.extra,[tD.sectionActive]:n.openedSection===e.id}),onClick:$(e.id,e.title),onMouseEnter:k(e.id,e.title),onMouseLeave:O,children:[(0,l.jsx)(tB,{name:e.uikitIcon,background:e.uikitIconBg}),(0,l.jsx)("span",{className:tD.sectionTitle,children:e.title}),(0,l.jsx)("div",{className:tD.sectionArrow,children:(0,l.jsx)(m.IconFdsChevronRightSmallO,{size:24})})]},e.id))]},e.id)),(0,l.jsxs)("div",{className:tD.chatWrapper,children:[(0,l.jsx)("div",{className:tD.chatHeader,children:"Нужна помощь?"}),(0,l.jsx)(tz,{})]})]}),(0,l.jsxs)("button",{type:"button",className:(0,a.Z)(tD.backButton,{[tD.removed]:!n.openedSection}),onClick:()=>{eF(p.D.button,"Назад"),n.setOpenedSection(null)},children:[(0,l.jsx)(m.IconFdsChevronLeftO,{size:24}),(0,l.jsx)("span",{children:"Назад"})]}),(0,l.jsx)(tE,{data:e,isMobile:s}),(0,l.jsxs)("div",{className:(0,a.Z)(tD.useful,{[tD.usefulOpen]:!!n.openedSection}),children:[(0,l.jsx)("div",{className:tD.usefulTitle,children:"Полезное на Финуслугах"}),e.map(e=>(0,l.jsx)(h.Fragment,{children:e.sections.map(e=>{var t;return(0,l.jsx)("div",{className:(0,a.Z)(tD.usefulGrid,{[tD.removed]:n.openedSection!==e.id}),children:null==(t=e.useful)?void 0:t.map((e,t)=>(0,l.jsxs)("a",{href:e.url,onClick:()=>eF(p.D.link,e.title,`${e.title}_${e.url}`),children:[(0,l.jsx)("div",{children:(0,l.jsx)("img",{src:e.icon,srcSet:e.icon2?`${e.icon}, ${e.icon2} 2x`:void 0,alt:e.title,loading:"lazy"})}),(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},`${e.title}_${t}`))},e.id)})},e.id))]})]})})})},tZ=(e,t,n)=>{var i,l,o,s,r,a,u;let d=(null==(l=null==(i=null==e?void 0:e.NAVIGATOR)?void 0:i.findIndex)?void 0:l.call(i,({id:e})=>"news"===e))||-1,p=(null==(s=null==(o=null==e?void 0:e.NAVIGATOR)?void 0:o[d])?void 0:s.content)||[];if(null!=(u=null==(a=null==(r=null==e?void 0:e.NAVIGATOR)?void 0:r[d])?void 0:a.content)&&u[0]&&Array.isArray(n)&&p.length){let i=n.map(({title:e,url:n})=>({title:e,url:(0,c.xn)(t||"",n),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:[]}]},tG=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",lkUrl:i="https://lk.finuslugi.ru/registration",initialTown:o,isMainBannerPage:s,enableAppHeaderBanner:u=!1,news:f,className:v})=>{let g=tm(),w=(0,h.useMemo)(()=>tZ(e,t,f),[e,t,f]),x=null==e?void 0:e.config,_=(0,h.useMemo)(()=>w.reduce((e,t)=>{var n;return e[t.id]=null==(n=t.sections[0])?void 0:n.id,e},{}),[w]),b=g.isAuth?"Личный кабинет":"Войти",j=s&&g.isHeaderTransparent,y=(e,t,n,i)=>()=>{e!==g.openedBlock?eF(p.D.toggle,t,"on"):eF(p.D.button,"menu_close","on");let l=n?_[e]:"";g.setOpenedBlock(e,l,!!i)},{start:$,clear:N}=tt(),C=(e,t,n,i)=>()=>{g.isNavigationOpen&&e===g.openedBlock||g.setIgnoreClicks(),$(y(e,t,n,i),200)},k=e=>()=>{g.ignoreClicks||e()},O=e=>g.openedBlock===e&&g.isNavigationOpen;return e?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{ref:g.headerRef,className:(0,a.Z)(eT.header,v,{[eT.transparent]:j}),children:(0,l.jsxs)("div",{ref:g.fixedContainerRef,className:(0,a.Z)(eT.fixed,{[eT.hidden]:g.isHeaderHidden,[eT.navigationOpen]:g.isNavigationOpen}),children:[!!(null!=x&&x.appBannerUrl)&&u&&(0,l.jsx)(tR,{mobileAppUrl:x.appBannerUrl,minioUrl:n}),(0,l.jsxs)(r.W2,{className:eT.container,children:[(0,l.jsxs)("div",{className:eT.leftRow,children:[(0,l.jsx)(tN,{className:eT.logo,href:t,eventActionType:p.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${t}`,children:(0,l.jsxs)("picture",{children:[(0,l.jsx)("source",{srcSet:(0,c.xn)(n,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,l.jsx)("img",{src:(0,c.xn)(n,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,l.jsx)("nav",{ref:g.navMenuItemsRef,className:eT.menuItems,children:(0,l.jsx)("ul",{children:eR.map(({id:e,label:t})=>(0,l.jsx)("li",{children:(0,l.jsx)(d.zx,{className:(0,a.Z)({[eT.menuItemActive]:O(e)}),label:t,variant:"white",size:"xs",onClick:k(y(e,t,!0)),onMouseEnter:C(e,t,!0,!0),onMouseLeave:N})},e))})}),(0,l.jsx)(tf,{className:(0,a.Z)(eT.tabletMenuButton,{[eT.menuItemActive]:g.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,l.jsx)(m.IconFdsChevronDownO,{size:24}),onClick:y("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,l.jsxs)("div",{className:(0,a.Z)(eT.buttonGroup,{[eT.whiteIcons]:(null==x?void 0:x.iconColorOnMobileMainBanner)==="white"}),children:[(0,l.jsxs)("div",{className:eT.chips,children:[(0,l.jsx)(tf,{as:"a",href:i,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:`profile_${i}`,iconLeft:(0,l.jsx)(m.IconFdsUserO,{size:20})}),(0,l.jsx)(tf,{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,l.jsx)(m.IconFdsChatDotsCircleO,{size:24})})]}),(0,l.jsx)(tf,{className:eT.menuButton,size:"xs",shape:j?"icon":"default",appearance:j?"ghost":"fill",label:"Меню",onClick:y("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,l.jsx)(m.IconFdsMenuSkewedO,{size:24})}),(0,l.jsxs)("div",{className:eT.moreButtons,children:[(0,l.jsx)(t$,{initialTown:o}),(0,l.jsx)(tf,{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,l.jsx)(m.IconFdsChatDotsSquareAddO,{size:24}),children:"Онлайн чат"}),(0,l.jsx)(tf,{as:"a",href:i,size:"xs",eventActionText:b,eventLabel:`${b}_${i}`,label:b})]})]}),(0,l.jsxs)(tN,{className:eT.auth,href:i,eventActionText:b,eventLabel:`${b}_${i}`,children:[(0,l.jsx)(tf,{size:"xs",shape:"circle-icon",iconLeft:(0,l.jsx)(m.IconFdsUserO,{}),eventActionText:b,eventLabel:`${b}_${i}`}),(0,l.jsx)("p",{children:b})]}),(0,l.jsx)("div",{className:eT.close,children:(0,l.jsx)(tf,{className:eT.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,l.jsx)(m.IconFdsCloseO,{}),onClick:()=>g.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})]})}),(0,l.jsx)("div",{className:(0,a.Z)(eT.overlay,{[eT.removed]:!g.isNavigationMounted,[eT.overlayOpening]:g.isNavigationOpen,[eT.overlayClosing]:!g.isNavigationOpen}),onClick:k(()=>g.setOpenedBlock(null))}),(0,l.jsx)(tF,{data:w,minioUrl:n})]}):null},tV=e=>(0,l.jsx)(th,{isMainBannerPage:e.isMainBannerPage,children:(0,l.jsx)(tG,{...e})}),tH=(0,u.g)("page-layout","sc"),tq=Object.freeze({main:"".concat(tH,"__main")}),tJ=s()(()=>n.e(715).then(n.bind(n,6715)).then(e=>e.CookiesPlate),{loadableGenerated:{webpack:()=>[require.resolveWeak("../sc-cookies-plate/index.mjs")]},ssr:!1});function tQ(e){let{initialGeo:t,headerData:n,footerData:i,showStartGeoPopup:o=!1,children:s}=e,{region:r,town:a}=null!=t?t:{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(te,{showStartGeoPopup:o,initialRegion:r,initialTown:a,children:[n&&(0,l.jsx)(tV,{...n}),(0,l.jsx)("main",{className:tq.main,children:s}),i&&(0,l.jsx)(ek,{...i})]}),(0,l.jsx)(tJ,{})]})}}}]);