"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5041],{81594:function(e,t,n){n.d(t,{D:function(){return A},P:function(){return B},U:function(){return U},u:function(){return b}});var i=n(85893),l=n(86010),o=n(67294),s=n(59194),r=n(84941),a=n(73935);let c=300,u=({opened:e})=>{let[t,n]=(0,o.useState)(!1),i=(0,o.useRef)(null),l=(0,o.useRef)(!1);return(0,o.useEffect)(()=>(e&&!l.current?(l.current=!0,n(!0)):!e&&l.current&&(i.current=setTimeout(()=>{l.current=!1,n(!1)},c)),()=>{i.current&&clearTimeout(i.current)}),[e]),{mounted:t}},d=(0,r.g)("click-outside","sc"),p=Object.freeze({overlay:`${d}__overlay`,open:`${d}--open`,close:`${d}--close`}),m=({onClose:e,onToucheMove:t,isOpen:n,delay:s=c})=>{let r=(0,o.useRef)(null),a=(0,o.useCallback)(()=>{e&&(r.current=setTimeout(()=>{e()},s))},[s,e]),u=(0,o.useCallback)(e=>{"Escape"===e.key&&a()},[a]);return(0,o.useEffect)(()=>(n&&window.addEventListener("keydown",u),()=>{r.current&&clearTimeout(r.current),window.removeEventListener("keydown",u)}),[n,u]),(0,i.jsx)("div",{className:(0,l.Z)(p.overlay,{[p.open]:n,[p.close]:!n}),onTouchStart:t,onClick:a})},h=(e,t)=>{e&&(t?e.setAttribute("data-portal",""):e.removeAttribute("data-portal"))},v=e=>{e.style.top||(window.prevScrollPosition=window.scrollY)},g=(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`)},f=e=>{e.style.setProperty("overflow","hidden"),e.style.setProperty("height","100vw")},_=e=>{e.classList.toggle("scroll-disable-windows",!1),e.style.removeProperty("overflow"),e.style.removeProperty("height"),e.style.removeProperty("width"),e.style.removeProperty("top")},w=()=>{void 0!==window.prevScrollPosition&&(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0)},x=()=>document.querySelectorAll("[data-portal]").length>1,b=e=>{let t=(0,o.useRef)(null),n=(0,o.useRef)(!1);return(0,o.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)v(l),g(l,o,s),h(i,!0);else if(e)f(l),h(i,!0);else{let e=!x();e&&_(l),e&&w(),h(i,!1)}return()=>{let e=!x();e&&_(l),e&&w()}},[e]),t},j=(0,r.g)("drawer-footer","sc"),$=Object.freeze({footer:`${j}__footer`,hasScroll:`${j}__footer--has-scroll`}),k=({footer:e,hasScroll:t,className:n})=>(0,i.jsx)("div",{className:(0,l.Z)($.footer,{[$.hasScroll]:t},n),children:"function"==typeof e?e():e}),N=(0,r.g)("drawer-content","sc"),y=Object.freeze({container:`${N}__container`,open:`${N}--open`,close:`${N}--close`,header:`${N}__header`,rowHeader:`${N}__header--row`,title:`${N}__title`,center:`${N}__title--center`,left:`${N}__title--left`,right:`${N}__title--right`,controlContainer:`${N}__control-container`,content:`${N}__content`,footer:`${N}__footer`}),C=({onClose:e,onContentClick:t,children:n,title:r,rowTitle:a,titleAlign:c,isCloseable:u,footer:d,closeButton:p,isOpen:m,contentClassName:h,footerClassName:v,contentStyle:g,width:f})=>{let _=(0,o.useRef)(null),w=(0,o.useRef)(null),[x,b]=(0,o.useState)(!1);(0,o.useEffect)(()=>{var e;if(!w.current||!_.current)return;let t=(null==(e=null==w?void 0:w.current)?void 0:e.getBoundingClientRect().top)||0,n=null==_?void 0:_.current,i=()=>{let e=null==w?void 0:w.current;e&&b(()=>e.getBoundingClientRect().top!==t)};return n&&n.addEventListener("scroll",i,!1),()=>{null==n||n.removeEventListener("scroll",i,!1)}},[]);let j=g||f?{width:f,...g||{}}:void 0;return(0,i.jsxs)("div",{ref:_,style:j,className:(0,l.Z)(y.container,{[y.open]:m,[y.close]:!m},h),children:[r||u?(0,i.jsxs)("div",{className:(0,l.Z)(y.header,{[y.rowHeader]:a}),children:[u?p?"function"==typeof p?p():p:(0,i.jsx)("button",{type:"button",className:y.controlContainer,onClick:e,children:(0,i.jsx)(s.IconFdsCloseO,{size:24})}):null,r?(0,i.jsx)("h3",{className:(0,l.Z)(y.title,{[y[c]]:!0}),children:r}):null]}):null,(0,i.jsx)("div",{ref:w,className:y.content,onClick:t,children:n}),d&&(0,i.jsx)(k,{className:(0,l.Z)(y.footer,v),footer:d,hasScroll:x})]})},T=(0,r.g)("drawer-layout","sc"),O=Object.freeze({window:`${T}__window`}),S=({onClose:e,isOpen:t,children:n,withDisabledScroll:s,className:r,...a})=>{let c=(0,o.useCallback)(e=>e.stopPropagation(),[]);return b(t&&s),(0,i.jsxs)("div",{"data-portal":!0,className:(0,l.Z)(O.window,r),children:[(0,i.jsx)(m,{onClose:e,isOpen:t,delay:0}),(0,i.jsx)(C,{onContentClick:c,onClose:e,isOpen:t,...a,children:n})]})},A=({isOpen:e=!1,children:t,titleAlign:n="center",isCloseable:l=!0,withDisabledScroll:o=!0,...s})=>{let{mounted:r}=u({opened:e});return r?(0,i.jsx)(S,{titleAlign:n,isCloseable:l,isOpen:e,withDisabledScroll:o,...s,children:t}):null};A.displayName="Drawer";let I=(0,r.g)("mobile-modal-footer","sc"),L=Object.freeze({footer:`${I}__footer`,footerWithoutShadow:`${I}__footer--without-shadow`}),R=({footer:e,isSmallPopup:t=!1,footerClassName:n})=>(0,i.jsx)("div",{className:(0,l.Z)(L.footer,t&&L.footerWithoutShadow,n),children:"function"==typeof e?e():e}),z=(0,r.g)("mobile-popup","sc"),E=Object.freeze({mobilePopup:`${z}`,mobilePopupOpen:`${z}--open`,content:`${z}__content`,contentFull:`${z}__content--full`,contentTransition:`${z}__content--transition`,contentTransitionOpen:`${z}__content--transition-open`,contentLine:`${z}__content-line`,contentContainer:`${z}__content-container`,smallContentContainer:`${z}__content-container--small`,min:`${z}__content-container--min`,title:`${z}__title`,closeContainer:`${z}__close-container`,closeButton:`${z}__close-button`}),P=({children:e,footer:t,isOpen:n,isSmallPopup:r,onClose:a,hasCloseButton:c=!0,full:u,touchDistance:d=100,withDisabledScroll:p=!0,contentClassName:h,className:v,title:g,closeButton:f,footerClassName:_})=>{let[w,x]=(0,o.useState)(!1),[j,$]=(0,o.useState)(!1),[k,N]=(0,o.useState)(!0),[y,C]=(0,o.useState)("120%"),T=(0,o.useRef)(null),O=(0,o.useRef)(0),S=(0,o.useRef)(!1),A=e=>{var t,n,i;let l=null==(t=T.current)?void 0:t.offsetTop,o=null==(n=T.current)?void 0:n.offsetHeight;if(S.current=!0,N(!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`),O.current=n}},I=()=>{S.current&&(O.current>d&&a?null==a||a():C("0"),N(!0),S.current=!1),window.removeEventListener("touchmove",A),window.removeEventListener("touchend",I)};return(0,o.useEffect)(()=>{n&&setTimeout(()=>{x(!0),$(!0),C("0")},100),!n&&j&&(C("120%"),x(!1),$(!1))},[j,n]),b(n&&p),(0,i.jsxs)("div",{"data-portal":!0,className:(0,l.Z)(E.mobilePopup,j&&E.mobilePopupOpen,v),children:[(0,i.jsx)(m,{onClose:()=>{n&&(null==a||a())},onToucheMove:()=>{n&&(x(!1),window.addEventListener("touchmove",A),window.addEventListener("touchend",I))},isOpen:n,delay:0}),(0,i.jsxs)("div",{className:(0,l.Z)(E.content,u&&E.contentFull,k&&E.contentTransition,k&&w&&E.contentTransitionOpen),ref:T,style:{transform:`translateY(${y})`},children:[(0,i.jsx)("div",{className:E.contentLine}),(0,i.jsxs)("div",{className:(0,l.Z)(E.contentContainer,r&&E.smallContentContainer,{[E.min]:!g&&!c},h),children:[!!g&&(0,i.jsx)("div",{className:E.title,children:g}),c?(0,i.jsx)("div",{className:E.closeContainer,children:c?f?"function"==typeof f?f():f:(0,i.jsx)("button",{onClick:a,className:E.closeButton,children:(0,i.jsx)(s.IconFdsCloseO,{size:24})}):null}):null,e]}),t&&(0,i.jsx)(R,{footerClassName:_,isSmallPopup:r,footer:t})]})]})},U=({children:e,isSmallPopup:t=!1,isOpen:n=!1,...l})=>{let{mounted:o}=u({opened:n});return o?(0,i.jsx)(P,{isSmallPopup:t,isOpen:n,...l,children:e}):null};U.displayName="UiMobilePopup";let B=({children:e,id:t="portal-root"})=>{let[n,i]=(0,o.useState)(null);return(0,o.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,a.createPortal)(e,n):null}},84941:function(e,t,n){n.d(t,{g:function(){return i}});function i(e,t){return`finkit-widgets-${t}-${e}`}},84385:function(e,t,n){let i;n.d(t,{D:function(){return a},h:function(){return u}});let l={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sch",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya"},o=e=>e.replace(/[а-яё]/gi,e=>{let t=e.toLowerCase();return t in l?l[t]:e}).replaceAll(/[ \u00A0]/g,"_");var s=n(77607);let r=(e,t)=>{if(typeof window>"u")return;let n=sessionStorage.getItem("pushedEvents"),i=n?JSON.parse(n):[];e.event||(e.event="data-event"),"string"==typeof e.eventAction&&(e.eventAction=e.eventAction.toLowerCase().replaceAll(" ","_")),"string"==typeof e.eventLabel&&(e.eventLabel=e.eventLabel.toLowerCase().replaceAll(" ","_")),e.eventLabel||(e.eventLabel="undefined");let l=i.find(n=>n.eventCategory===e.eventCategory&&n.eventAction===e.eventAction&&n.eventLabel===e.eventLabel&&("all"===t||"url"===t&&window.location.pathname===n.url));if(!t||!l){if(t){let t={...e};t.url=window.location.pathname,i.push(t),sessionStorage.setItem("pushedEvents",JSON.stringify(i))}(0,s.AB)(e)}};var a=((i=a||{}).icon="icon",i.chip="chip",i.accordion="accordion",i.button="button",i.checkbox="checkbox",i.radio="radio",i.select="select",i.toggle="toggle",i.tooltip="tooltip",i.link="link",i.banner="banner",i.tag="tag",i.date="date",i.field="field",i.offer="offer",i.tab="tab",i.submitButton="submitButton",i.popup="popup",i.block="block",i);let c={icon:"click_icon_",chip:"click_chip_",accordion:"show_acc_",button:"click_button_",checkbox:"click_check_",radio:"click_radio_",select:"click_sel_",toggle:"click_togg_",tooltip:"click_tip_",link:"click_link_",banner:"click_bnr_",tag:"click_tag_",date:"input_date_",field:"input_field_",offer:"click_offer_",tab:"click_tab_",submitButton:"form_button_",popup:"show_pop_up_",block:"click_block_"},u=({eventCategory:e,eventActionType:t,eventActionText:n="",eventLabel:i})=>{let l={event:"data-event",eventCategory:e,eventAction:c[t]+o(n)};void 0!==i&&(l.eventLabel=o("string"==typeof i?i:i.toString())),r(l)}},35862:function(e,t,n){n.d(t,{z:function(){return p}});var i=n(85893),l=n(59194),o=n(86010),s=n(67294),r=n(84941);let a="https://assets.finuslugi.ru/mp-assets/user-agreement.pdf",c={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=>{c.setItem(e,"",{"max-age":-1})}},u=(0,r.g)("cookies-plate","sc"),d=Object.freeze({wrapper:`${u}__wrapper`,contentWrapper:`${u}__content-wrapper`,visible:`${u}--visible`,hidden:`${u}--hidden`,content:`${u}__content`,text:`${u}__text`,link:`${u}__link`,button:`${u}__button`}),p=({className:e,mountDelay:t=3e3,href:n=a,children:r,closeIcon:u,onMount:p,onLinkClick:m,onClose:h,mountAfterScroll:v=!0})=>{let[g,f]=(0,s.useState)(!1),[_,w]=(0,s.useState)(!1),[x,b]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=()=>{document.removeEventListener("scroll",e),c.getItem("Allow-Cookie")||(b(!0),setTimeout(()=>{f(!0),null==p||p()},t))};return v?document.addEventListener("scroll",e):e(),()=>document.removeEventListener("scroll",e)},[]);let j=(0,s.useCallback)(()=>{c.setItem("Allow-Cookie","1"),w(!0),null==h||h(),setTimeout(()=>b(!1),1e3)},[h]);return x?(0,i.jsx)("div",{className:d.wrapper,children:(0,i.jsx)("div",{className:(0,o.Z)(d.contentWrapper,{[d.visible]:g,[d.hidden]:_}),children:(0,i.jsxs)("div",{className:(0,o.Z)(e,d.content),children:[r||(0,i.jsxs)("p",{className:d.text,children:["Мы используем"," ",(0,i.jsx)("a",{className:d.link,href:n,target:"_blank",rel:"noreferrer",onClick:m,children:"cookie"})," ","для лучшей работы сайта"]}),(0,i.jsx)("button",{className:d.button,onClick:j,children:u||(0,i.jsx)(l.IconFdsCloseO,{})})]})})}):(0,i.jsx)(i.Fragment,{})}},16817:function(e,t,n){n.d(t,{$:function(){return H}});var i=n(85893),l=n(66535),o=n(86010),s=n(57769),r=n(84941),a=n(34588),c=n(84385),u=n(59194),d=n(67294),p=n(81594);let m=(0,r.g)("footer-contacts-block","sc"),h=Object.freeze({contactsWrapper:`${m}__contacts-wrapper`,gray:`${m}__gray`,phones:`${m}__phones`,contactsButtons:`${m}__contacts-buttons`,vkIcon:`${m}__vk-icon`,tgIcon:`${m}__tg-icon`,dzenIcon:`${m}__dzen-icon`,maxIcon:`${m}__max-icon`,link:`${m}__link`}),v=(0,r.g)("footer","sc"),g=Object.freeze({wrapper:`${v}__wrapper`,section:`${v}__section`,container:`${v}__container`,top:`${v}__top`,main:`${v}__main`,links:`${v}__links`,disclaimer:`${v}__disclaimer`,bottom:`${v}__bottom`,bottomLinks:`${v}__bottom-links`,bottomDisclaimer:`${v}__bottom-disclaimer`,compact:`${v}__wrapper--compact`,white:`${v}__wrapper--white`}),f="finkit-widgets-sc-footer",_=[{title:"8 (800) 505-32-32",url:"tel:88005053232"},{title:"+7 (495) 145-32-32",url:"tel:+74951453232"}],w=[..._,{title:"Онлайн чат",url:void 0}],x=[{type:"vk",className:h.vkIcon,iconName:"vk"},{type:"telegramChannel",className:h.tgIcon,iconName:"telegram"},{type:"dzen",className:h.dzenIcon,iconName:"dzen"},{type:"max",className:h.maxIcon,iconName:"max"}],b=(0,i.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,i.jsx)("br",{}),(0,i.jsx)("br",{}),"Группа \xabМосковская Биржа\xbb - ПАО Московская Биржа и юридические лица, находящиеся под прямым или косвенным контролем ПАО Московская Биржа."]}),j=({onClick:e,eventActionText:t,eventLabel:n,...l})=>(0,i.jsx)(a.zx,{onClick:i=>{null==e||e(i),(0,c.h)({eventCategory:f,eventActionType:c.D.button,eventActionText:t||"",eventLabel:n})},...l}),$=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:l,chat:o,...s})=>(0,i.jsx)(a.rU,{onClick:i=>{var s,r,a;null==e||e(i),o&&(null==i||i.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,c.h)({eventCategory:f,eventActionType:t||c.D.link,eventActionText:n||"",eventLabel:l})},...s}),k=({minioUrl:e,blogs:t})=>(0,i.jsxs)("div",{className:h.contactsWrapper,children:[(0,i.jsx)(l.xv,{className:h.gray,size:"16",weight:"regular",children:"Звоните или пишите"}),(0,i.jsx)("div",{className:h.phones,children:w.map(({title:e,url:t})=>(0,i.jsx)($,{href:t,eventActionText:e,chat:!t,children:e},e))}),(0,i.jsx)(l.xv,{className:h.gray,size:"16",weight:"regular",children:"Следите за нами в соцсетях"}),(0,i.jsx)("div",{className:h.contactsButtons,children:x.map(({type:n,className:l,iconName:o})=>(0,i.jsx)(j,{as:"a",href:null==t?void 0:t[n],target:"_blank",className:l,iconRight:(0,i.jsx)("img",{width:24,height:24,src:(0,s.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,i.jsx)(l.xv,{className:h.gray,size:"16",weight:"regular",children:"Канал для инвесторов"}),(0,i.jsx)("div",{className:h.contactsButtons,children:(0,i.jsxs)($,{href:null==t?void 0:t.investTg,target:"_blank",className:h.link,eventActionText:"telegram",eventLabel:null==t?void 0:t.investTg,children:[(0,i.jsx)(j,{className:h.tgIcon,iconRight:(0,i.jsx)("img",{width:24,height:24,src:(0,s.xn)(e,"/widgets/footer/telegram.svg"),alt:"telegram",loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:"telegram",eventLabel:null==t?void 0:t.investTg}),"Финуслуги Инвест"]})})]}),N=(0,r.g)("footer-disclaimer","sc"),y=Object.freeze({disclaimer:`${N}`}),C=e=>{let t=e=>{e.target instanceof HTMLAnchorElement&&(0,c.h)({eventCategory:f,eventActionType:c.D.link,eventActionText:e.target.textContent||"",eventLabel:e.target.href})};return e.disclaimer?(0,i.jsx)("div",{className:(0,o.Z)(e.className,y.disclaimer),dangerouslySetInnerHTML:{__html:e.disclaimer||""},onClick:t}):(0,i.jsx)("div",{className:(0,o.Z)(e.className,y.disclaimer),onClick:t,children:e.children})},T=()=>{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},O=(e="")=>{let[t,n]=(0,d.useState)(e);return(0,d.useEffect)(()=>{let t=T();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},S=(0,r.g)("footer-modal-body","sc"),A=Object.freeze({wrapper:`${S}__wrapper`,title:`${S}__title`,item:`${S}__item`,label:`${S}__label`,button:`${S}__button`,description:`${S}__description`}),I=({directions:e})=>(0,i.jsxs)("div",{className:A.wrapper,children:[(0,i.jsx)("div",{className:A.title,children:"Направления"}),e.map(e=>(0,i.jsxs)($,{className:A.item,href:e.url,target:"_blank",eventActionText:e.name,eventLabel:`${e.name}_${e.url}`,children:[(0,i.jsxs)("div",{className:A.label,children:[(0,i.jsx)("span",{children:e.name}),(0,i.jsx)(j,{className:A.button,iconRight:(0,i.jsx)(u.IconFdsArrowUpRightSmallO,{size:28}),shape:"circle-icon",eventActionText:"IconFdsArrowUpRightSmallO"})]}),(0,i.jsx)("p",{className:A.description,children:e.description})]},e.url))]}),L=(0,r.g)("footer-popup","sc"),R=Object.freeze({wrapper:`${L}__wrapper`,button:`${L}__button`,icon:`${L}__icon`,buttonWrapper:`${L}__button-wrapper`}),z=({directions:e})=>{let t=(0,a._m)("l"),[n,l]=(0,d.useState)(!1),o=()=>{l(!1)};return(0,i.jsxs)("div",{className:R.wrapper,children:[(0,i.jsx)("div",{className:R.buttonWrapper,children:(0,i.jsx)(j,{className:R.button,appearance:"ghost",variant:"white",onClick:()=>{l(!0)},label:"Все направления",eventActionText:"Все направления",iconLeft:(0,i.jsx)("div",{className:R.icon,children:[1,2,3,4,5,6,7,8,9].map(e=>(0,i.jsx)("div",{},e))})})}),(0,i.jsxs)(p.P,{children:[!t&&(0,i.jsx)(p.U,{isOpen:n,onClose:o,full:!0,children:(0,i.jsx)(I,{directions:e})}),t&&(0,i.jsx)(p.D,{isOpen:n,onClose:o,width:"804px",children:(0,i.jsx)(I,{directions:e})})]})]})},E=(0,r.g)("footer-left-column","sc"),P=Object.freeze({leftColumn:`${E}__left-column`,logoWrapper:`${E}__logo-wrapper`,banner:`${E}__banner`}),U=({showcaseUrl:e,minioUrl:t,directions:n,mobAppUrl:o})=>{let r=O(o);return(0,i.jsxs)("div",{className:P.leftColumn,children:[(0,i.jsx)($,{className:P.logoWrapper,href:e,eventActionType:c.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:(0,i.jsx)("img",{src:(0,s.xn)(t,"/pl-common-blocks-renderer/footer/finuslugi_base_logo.svg"),alt:"finuslugi logo",loading:"lazy"})}),(0,i.jsx)(z,{directions:n??[]}),(0,i.jsx)($,{href:r,target:"_blank",eventActionType:c.D.banner,eventActionText:"Управляйте финансами через приложение Финуслуг",eventLabel:r,children:(0,i.jsxs)(l.Zb,{className:P.banner,children:[(0,i.jsxs)(l.xv,{weight:"medium",children:["Управляйте финансами",(0,i.jsx)("br",{}),"через приложение Финуслуг"]}),(0,i.jsx)(j,{iconRight:(0,i.jsx)(u.IconFdsArrowUpRightSmallO,{size:32}),shape:"circle-icon",variant:"white",eventActionText:"IconFdsArrowUpRightSmallO"}),(0,i.jsxs)("picture",{children:[(0,i.jsx)("source",{srcSet:(0,s.xn)(t,"/pl-common-blocks-renderer/footer/apps_d.webp"),media:"(min-width: 1024px)"}),(0,i.jsx)("img",{src:(0,s.xn)(t,"/pl-common-blocks-renderer/footer/apps_m.webp"),alt:"иллюстрация мобильного приложения",loading:"lazy"})]})]})})]})},B=(0,r.g)("footer-logo","sc"),M=Object.freeze({wrapper:`${B}__wrapper`,link:`${B}__link`,fromMoex:`${B}__from-moex`,logo:`${B}__logo`,white:`${B}__wrapper--white`}),W=({showcaseUrl:e,minioUrl:t,isWhite:n})=>(0,i.jsx)("div",{className:(0,o.Z)(M.wrapper,{[M.white]:n}),children:(0,i.jsxs)($,{className:M.link,href:e,eventActionType:c.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:[(0,i.jsx)("img",{className:M.logo,src:`${t}/images/logo-brandmark-common-finuslugi.svg`}),(0,i.jsx)("img",{className:M.fromMoex,src:`${t}/images/fromMoex.svg`})]})}),D=(0,r.g)("footer-warning","sc"),F=Object.freeze({reservedSpace:`${D}__reserved-space`,wrapper:`${D}__wrapper`,fixed:`${D}__wrapper--fixed`,container:`${D}__container`}),Z=({text:e,fixed:t})=>(0,i.jsx)("div",{className:(0,o.Z)(F.wrapper,{[F.fixed]:t}),children:(0,i.jsx)(l.W2,{className:F.container,children:e})}),V=({text:e})=>(0,i.jsxs)("div",{className:F.reservedSpace,children:[(0,i.jsx)(Z,{text:e}),(0,i.jsx)(Z,{text:e,fixed:!0})]}),H=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",customDisclaimer:s,variant:r="default"})=>{var a,c;let u=!s&&null!=e&&e.disclaimer?e.disclaimer:void 0,d=r.includes("compact"),p=r.includes("white"),m=null==(a=null==e?void 0:e.bottom)?void 0:a.concat(d?_:[]),h="warning"in e?e.warning:void 0;return(0,i.jsx)("footer",{className:(0,o.Z)(g.wrapper,{[g.compact]:d,[g.white]:p}),children:(0,i.jsxs)("section",{className:g.section,children:[(0,i.jsxs)(l.W2,{className:g.container,children:[!d&&(0,i.jsx)(U,{showcaseUrl:t,minioUrl:n,directions:e.directions,mobAppUrl:e.mobAppUrl}),(0,i.jsx)("div",{className:g.wrapper,children:(0,i.jsxs)("div",{className:g.top,children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:g.main,children:[!d&&(0,i.jsx)("div",{className:g.links,children:null==(c=null==e?void 0:e.top)?void 0:c.map(e=>(0,i.jsx)($,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),d&&(0,i.jsx)(W,{showcaseUrl:t,minioUrl:n,isWhite:p}),(0,i.jsx)(C,{className:g.disclaimer,disclaimer:u,children:s||b})]}),(0,i.jsxs)("div",{className:g.bottom,children:[(0,i.jsx)("div",{className:g.bottomLinks,children:null==m?void 0:m.map(e=>(0,i.jsx)($,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),(0,i.jsx)(C,{className:g.bottomDisclaimer,disclaimer:null==e?void 0:e.bottomDisclaimer})]})]}),!d&&(0,i.jsx)(k,{minioUrl:n,blogs:e.blogs})]})})]}),d&&!!h&&(0,i.jsx)(V,{text:h})]})})}},42147:function(e,t,n){n.d(t,{sM:function(){return Z},h4:function(){return eE},ar:function(){return F}});var i=n(85893),l=n(67294),o=n(84385),s=n(59194),r=n(66535),a=n(34588),c=n(86010),u=n(57769),d=n(81594),p=n(84941);let m=(0,p.g)("header","sc"),h=Object.freeze({header:`${m}`,fixed:`${m}__fixed`,hidden:`${m}__fixed--hidden`,transparent:`${m}--transparent`,navigationOpen:`${m}__navigation-open`,container:`${m}__container`,leftRow:`${m}__left-row`,logo:`${m}__logo`,menuItems:`${m}__menu-items`,menuItemActive:`${m}__menu-item-active`,tabletMenuButton:`${m}__tablet-menu-button`,buttonGroup:`${m}__button-group`,chips:`${m}__chips`,menuButton:`${m}__menu-button`,moreButtons:`${m}__more-buttons`,auth:`${m}__auth`,close:`${m}__close`,removed:`${m}__removed`,overlay:`${m}__overlay`,overlayOpening:`${m}__overlay--opening`,overlayClosing:`${m}__overlay--closing`}),v="cb-header",g=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],f=g.reduce((e,t)=>(e[t.id]=t.label,e),{}),_=Object.freeze({mobile:56,desktop:80}),w=(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("headerMobileBanner"),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)}},x=()=>{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},b=()=>document.cookie.split(";").some(e=>e.trim().startsWith("utm_params=")),j=(e,t)=>{let n=new Date;n.setTime(n.getTime()+864e5*t);let i=encodeURIComponent(JSON.stringify(e));document.cookie=`utm_params=${i};expires=${n.toUTCString()};path=/;SameSite=Lax`},$=()=>{if(b())return;let e=x();e&&j(e,90)},k=()=>{setTimeout(()=>{if(!(typeof document>"u"||!document.cookie))try{$()}catch(e){console.error("UTM tracking error:",e)}},0)},N=(e,t,n)=>(0,o.h)({eventCategory:v,eventActionType:e,eventActionText:t,eventLabel:n}),y=(0,p.g)("navigation-chips","sc"),C=Object.freeze({wrapper:`${y}__wrapper`,gray:`${y}__variantGray`,white:`${y}__variantWhite`,container:`${y}__container`,chip:`${y}__chip`,more:`${y}__chip--more`,active:`${y}__chip--active`,label:`${y}__label`,hidden:`${y}__hidden`}),T=(0,p.g)("navigation-content","sc"),O=Object.freeze({contentWrapper:`${T}__content-wrapper`,content:`${T}__content`,contentOpen:`${T}__content--open`,contentHeader:`${T}__content-header`,contentTitle:`${T}__content-title`,contentTitleUrl:`${T}__content-title--url`,contentTitleLink:`${T}__content-title--link`,contentTitleNew:`${T}__content-title--new`,new:`${T}__new`,vip:`${T}__vip`,arrowIcon:`${T}__arrow-icon`,links:`${T}__links`,linksColumns:`${T}__links--columns`,linksTitleless:`${T}__links--titleless`,removed:`${T}__removed`,hidden:`${T}__content--hidden`}),S=({chip:e,hidden:t,onClick:n,refCallback:l,activeChipId:r})=>{let a=!!n,u=()=>{if(a)return null==n?void 0:n(e.url);N(o.D.chip,e.title,`${e.title}_${e.url}`)},d=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:C.label,children:e.title}),e.arrow&&(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{size:24})]}),p=(0,c.Z)(C.chip,{[C.hidden]:t,[O.new]:!!e.new,[O.vip]:!!e.vip,[C.active]:e.url===r});return a?(0,i.jsx)("button",{type:"button",className:p,onClick:u,ref:l,children:d}):(0,i.jsx)("a",{href:e.url,className:p,onClick:u,ref:l,children:d})},A=({items:e=[],maxNumberOfLines:t,variant:n,className:r,activeChipId:a,onClick:u})=>{let d=(0,l.useRef)(null),p=(0,l.useRef)(null),m=(0,l.useRef)({}),[h,v]=(0,l.useState)(!1),[g,f]=(0,l.useState)(e.length),[_,w]=(0,l.useState)(!1);(0,l.useMemo)(()=>{let t=m.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 x=(0,l.useCallback)(()=>{let n=d.current;if(!n)return;let i=e=>e?e.getBoundingClientRect().width:0,l=i(n),o=Math.max(Number(t)||0,0),s=()=>{f(e.length),w(!1)};if(h||0===o||l<=0){s();return}let r=(()=>{try{let e=getComputedStyle(n),t=parseFloat(e.columnGap||e.gap||"12");return Number.isNaN(t)?12:t}catch{return 12}})(),a=i(p.current),c=e.map(e=>i(m.current[e.url]));if(c.some(e=>0===e)){s();return}let u=1,v=0,g=0;for(let e of c){let t=u===o?a+r:0,n=0===v?e:v+r+e;if(n+t<=l-.5)v=n,g++;else{if(++u>o)break;v=e,g++}}w(g<e.length),f(g)},[h,e,t]);(0,l.useLayoutEffect)(()=>{let e=d.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(x)});return t.observe(e),requestAnimationFrame(x),()=>{t.disconnect()}},[x]),(0,l.useEffect)(()=>{requestAnimationFrame(x)},[x]);let b=h||(t??0)<=0||!_;return(0,i.jsx)("div",{className:(0,c.Z)(r,C.wrapper,{[C.gray]:"gray"===n,[C.white]:"white"===n}),children:(0,i.jsxs)("div",{ref:d,className:C.container,children:[e.map((e,t)=>(0,i.jsx)(S,{chip:e,hidden:!b&&t>=g,activeChipId:a,onClick:u,refCallback:t=>{m.current[e.url]=t}},e.url)),!b&&_&&(0,i.jsxs)("button",{type:"button",ref:p,className:(0,c.Z)(C.chip,C.more),onClick:()=>{N(o.D.chip,"Еще"),v(!0)},children:[(0,i.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,i.jsx)("span",{className:C.label,children:"Еще"})]}),(b||!_)&&(0,i.jsxs)("button",{type:"button",ref:p,className:(0,c.Z)(C.chip,C.more,C.hidden),tabIndex:-1,"aria-hidden":"true",children:[(0,i.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,i.jsx)("span",{className:C.label,children:"Еще"})]})]})})},I=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},L=()=>{if(typeof window>"u")return[];if(Array.isArray(window.allRegions)&&window.allRegions.length>0)return window.allRegions;let e=I("all_regions")||[];return window.allRegions=e,e},R=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]),[])},z=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)},E=async e=>{let t=null;try{t=await (await fetch(`${e}`,{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},P=(e,t,n)=>{(0,o.h)({eventCategory:W,eventActionType:e,eventActionText:t,eventLabel:n})},U=L(),B=R(U),M={regions:U,towns:B,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},W="finkit-widgets-sc-city-select",D=(0,l.createContext)(M);function F(){return(0,l.useContext)(D)}let Z=({children:e,showStartGeoPopup:t=!0,lastRegionsUpdateUnixTimestamp:n,dadataUrl:s="https://finuslugi.ru/backend/money/dadata"})=>{let r=Number(I("lastRegionsUpdateUnixTimestamp")||0),a=Number(n||0)>r,[c,u]=(0,l.useState)(L()),[{startRegion:d,startTown:p},m]=(0,l.useState)({startRegion:M.startRegion,startTown:M.startTown}),[{region:h,town:v},g]=(0,l.useState)({region:M.region,town:M.town}),[f,_]=(0,l.useState)(M.startPopupVisible),[w,x]=(0,l.useState)(M.popupVisible),b=(0,l.useRef)(""),j=(0,l.useMemo)(()=>R(c),[c.length]),$=(0,l.useCallback)((e,t)=>{window.sessionStorage.setItem("start_popup_opened","1"),window.localStorage.setItem("auto_town",JSON.stringify(t)||""),window.localStorage.setItem("auto_region",JSON.stringify(e)||""),_(!0),m({startRegion:e,startTown:t})},[_,m]),k=(0,l.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||$(e,t)},[$]),N=(0,l.useCallback)(()=>{if(b.current&&!h&&!v){let e=j.find(e=>e.name===b.current)??null;return k(c.find(t=>t.id===(null==e?void 0:e.parentId))??null,e)}k(h,v)},[h,v,j,c,k]),y=(0,l.useCallback)(e=>{x(e)},[x]),C=(0,l.useCallback)(e=>{e?P(o.D.icon,"location"):P(o.D.button,(null==v?void 0:v.name)||"Вся Россия"),!t||window.sessionStorage.getItem("start_popup_opened")?y(!0):N()},[t,v,y,N]),T=(0,l.useCallback)((e,t)=>{e||t?(window.localStorage.setItem("all_russia_selected","0"),window.localStorage.setItem("user_region",JSON.stringify(e)||""),window.localStorage.setItem("user_town",JSON.stringify(t)||"")):(window.localStorage.setItem("all_russia_selected","1"),window.localStorage.setItem("user_region",""),window.localStorage.setItem("user_town","")),g({region:e||null,town:t||null}),_(!1),y(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[y]),O=()=>{g({region:I("user_region"),town:I("user_town")});let e=async({coords:{latitude:e,longitude:t}})=>{let n=`${s}?lat=${e}&lon=${t}`,i=await E(n);null!=i&&i.location&&(b.current=i.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&t)try{navigator.geolocation.getCurrentPosition(e,()=>null)}catch{}};return(0,l.useEffect)(()=>{if((c.length<1||a)&&z().then(e=>u(e)),window.innerWidth<1024){let e=()=>{O(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{O()},0)},[]),(0,i.jsx)(D.Provider,{value:{regions:c,towns:j,region:h,town:v,startPopupVisible:f,setStartPopupVisible:_,popupVisible:w,handleToggleModal:y,selectCity:T,handleButtonClick:C,startRegion:d,startTown:p},children:e})},V=()=>{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}},H=(0,p.g)("city-select-modal-body","sc"),G=Object.freeze({wrapper:`${H}__wrapper`,subtitle:`${H}__subtitle`,hintWrapper:`${H}__hint-wrapper`,hintText:`${H}__hint-text`,input:`${H}__input`,chips:`${H}__chips`,townsListWrapper:`${H}__towns-list-wrapper`,townsList:`${H}__towns-list`,townsGroup:`${H}__towns-group`,townsGroupLabel:`${H}__towns-group-label`,townsGroupList:`${H}__towns-group-list`,townsName:`${H}__towns-name`,regionName:`${H}__region-name`}),q=({groupedTowns:e,chips:t,query:n,setQuery:r,isDrawer:c})=>{var u;let d=F(),p=(0,l.useRef)(null),[m,h]=(0,l.useState)("10000px");(0,l.useEffect)(()=>{if(!c||!p.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=p.current)&&e.children))return;let n=Array.from(p.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&&h(`${i}px`)}).observe(p.current)},[]);let v=e=>{if(P(o.D.button,(null==e?void 0:e.name)||"Вся Россия"),!(null!=e&&e.id))return d.selectCity();let t=d.regions.find(t=>t.id===Number(e.parentId))||null;d.selectCity(t,e)};return(0,i.jsxs)("div",{className:G.wrapper,children:[(0,i.jsxs)("div",{className:G.subtitle,children:["Покажем предложения рядом с вами",(0,i.jsxs)("div",{className:G.hintWrapper,children:[(0,i.jsx)(s.IconFdsQuestionCircleO,{size:24}),(0,i.jsx)("div",{className:G.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,i.jsx)(a.MA,{className:G.input,value:n,onChange:r,size:"s",placeholder:"Введите название города",icon:n?(0,i.jsx)(s.IconFdsCloseCircleO,{size:24,onClick:()=>r("")}):(0,i.jsx)(s.IconFdsSearchO,{size:24})}),(0,i.jsx)(a.cL,{className:G.chips,chips:t,value:(null==(u=d.town)?void 0:u.id)||0,onChipClick:e=>{v(d.towns.find(t=>t.id===e))}}),(0,i.jsx)("div",{className:G.townsListWrapper,children:(0,i.jsx)("div",{ref:p,className:G.townsList,style:{maxHeight:m},children:e.map(e=>(0,i.jsxs)("div",{className:G.townsGroup,children:[(0,i.jsx)("div",{className:G.townsGroupLabel,children:e.letter}),(0,i.jsx)("div",{className:G.townsGroupList,children:e.towns.map(e=>(0,i.jsxs)("button",{type:"button",onClick:()=>v(e),children:[(0,i.jsx)("div",{className:G.townsName,children:e.name}),(0,i.jsx)("div",{className:G.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},J=[1095,1096,134,720,189,180],Q=()=>{var e;let t=F(),n=(0,a._m)("l"),[s,r]=(0,l.useState)(""),c=`Ваш выбор: ${(null==(e=t.town)?void 0:e.name)||"Вся Россия"}`,u=(0,l.useMemo)(()=>t.towns.filter(e=>-1!==String(e.name).toLocaleLowerCase().indexOf(s.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},[]),[s,t.towns.length]),p=(0,l.useMemo)(()=>[{id:0,label:"Вся Россия"},...J.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]),m=()=>{P(o.D.button,"close"),t.handleToggleModal(!1)};return(0,i.jsxs)(d.P,{children:[!n&&(0,i.jsx)(d.U,{title:c,isOpen:t.popupVisible,onClose:m,full:!0,children:(0,i.jsx)(q,{groupedTowns:u,chips:p,query:s,setQuery:r})}),n&&(0,i.jsx)(d.D,{title:c,isOpen:t.popupVisible,onClose:m,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,i.jsx)(q,{groupedTowns:u,chips:p,query:s,setQuery:r,isDrawer:!0})})]})},Y={"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"},K=()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(Y,e)?Y[e]:Y["finuslugi.ru"]},X=(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)},ee=()=>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)}})}),et=()=>{let[e,t]=(0,l.useState)(!1),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(!1),s=e=>{o.current=e,i(e)};return(0,l.useEffect)(()=>{if(typeof window>"u")return;let e=K(),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){r(Error("chat is already opened"));return}i?(i.openWidget(),t(!1),l()):(s(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;i=e;let o=document.querySelector(".webchat");o&&ee().observe(o,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=i.closeWidget),null==i||i.openWidget(),s(!1),t(!1),l()},X(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}},en=(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}});function ei(){return(0,l.useContext)(en)}let el=e=>{let[t,n]=(0,l.useState)(!1),[o,s]=(0,l.useState)(!1),[r,a]=(0,l.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p}=et(),[m,h]=(0,l.useState)(null),[v,g]=(0,l.useState)(null),[f,_]=(0,l.useState)(!1),[x,b]=(0,l.useState)(!1),[j,$]=(0,l.useState)(!1),N=(0,l.useRef)(null),y=(0,d.u)(f),C=(0,l.useRef)(null),T=(0,l.useRef)(null),O=(0,l.useRef)(null),S=(0,l.useCallback)(()=>{y.current&&y.current.scrollTo({top:0})},[y]),A=(0,l.useCallback)(e=>{g(e),S()},[S]),I=(0,l.useCallback)(e=>{C.current&&clearTimeout(C.current),e&&b(!0),e||(C.current=setTimeout(()=>{b(!1),A(null)},300))},[A]),L=(0,l.useCallback)((e,t,n)=>{if(t&&A(t),!n&&e===m||!e){I(!f),_(!f);return}h(e),I(!0),_(!0)},[m,A,f,I]),R=(0,l.useCallback)(()=>{T.current&&clearTimeout(T.current),$(!0),T.current=setTimeout(()=>{$(!1)},650)},[]);return(0,l.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id"));let t=w(s,a,e.isMainBannerPage);return k(),t},[]),(0,i.jsx)("div",{children:(0,i.jsx)(en.Provider,{value:{isAuth:t,isHeaderHidden:o,isHeaderTransparent:r,openedBlock:m,setOpenedBlock:L,openedSection:v,setOpenedSection:A,isNavigationOpen:f,isNavigationMounted:x,navMenuItemsRef:N,navigationRef:y,ignoreClicks:j,setIgnoreClicks:R,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p,fixedContainerRef:O},children:e.children})})},eo=({label:e,onClick:t,eventActionText:n,eventLabel:l,...s})=>(0,i.jsx)(a.zx,{label:e,onClick:e=>{null==t||t(e),(0,o.h)({eventCategory:v,eventActionType:o.D.button,eventActionText:n||"",eventLabel:l||""})},...s}),es=(0,p.g)("header-popup","sc"),er=Object.freeze({popup:`${es}__popup`,popupHeader:`${es}__popup-header`,popupClose:`${es}__popup-close`,body:`${es}__body`}),ea=({isOpen:e,onClose:t,children:n,title:l})=>{let o=(0,a._m)("l");return(0,i.jsxs)(d.P,{children:[!o&&(0,i.jsx)(d.U,{title:l,isOpen:e,onClose:t,children:n}),o&&e&&(0,i.jsxs)("div",{className:er.popup,children:[(0,i.jsxs)("div",{className:er.popupHeader,children:[l,(0,i.jsx)(eo,{className:er.popupClose,iconLeft:(0,i.jsx)(s.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:t,eventActionText:"IconFdsCloseO"})]}),(0,i.jsx)("div",{className:er.body,children:n})]})]})},ec=(0,p.g)("start-choice-popup","sc"),eu=Object.freeze({top:`${ec}__top`,progress:`${ec}__progress`,innerCircle:`${ec}__inner-circle`,title:`${ec}__title`,subtitle:`${ec}__subtitle`,actions:`${ec}__actions`}),ed=()=>{var e,t;let n=F(),[s,r]=(0,l.useState)(10),[a,c]=(0,l.useState)(0),u=(0,l.useRef)(void 0),d=()=>{P(o.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,l.useEffect)(()=>{n.startPopupVisible?(()=>{let e=Number((" "+s).slice(1)),t=1e3*e/100,n=0,i=0;u.current=setInterval(()=>{n++,i+=t,c(3.6*n);let l=e-Math.floor(i/1e3);l<s&&r(l),100===n&&(clearInterval(u.current),d())},t)})():(clearInterval(u.current),r(10),c(0))},[n.startPopupVisible]),(0,i.jsxs)(ea,{isOpen:n.startPopupVisible,onClose:d,title:(0,i.jsx)("button",{type:"button",className:eu.progress,style:{background:`conic-gradient(#ff0508 ${a}deg, #e3e7ec 0deg)`},onClick:d,children:(0,i.jsx)("div",{className:eu.innerCircle,children:s})}),children:[(0,i.jsxs)("div",{className:eu.top,children:[(0,i.jsxs)("div",{className:eu.title,children:["Ваш город ",(null==(e=n.startTown)?void 0:e.name)||(null==(t=n.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,i.jsx)("div",{className:eu.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,i.jsxs)("div",{className:eu.actions,children:[(0,i.jsx)(eo,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{P(o.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,i.jsx)(eo,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{P(o.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},ep=(0,p.g)("city-select","sc"),em=Object.freeze({button:`${ep}__button`}),eh=({initialTown:e})=>{var t;let n=F(),o=(null==(t=n.town)?void 0:t.name)||e||"Вся Россия",{setIsChatModalOpen:r,isChatModalOpen:c}=ei(),{startPopupVisible:u,setStartPopupVisible:d,popupVisible:p}=n,m=(0,l.useRef)();return(0,l.useEffect)(()=>{p&&(m.current="popup")},[p]),(0,l.useEffect)(()=>{c&&(m.current="chat")},[c]),(0,l.useEffect)(()=>{u&&(m.current="startPopup")},[u]),(0,l.useEffect)(()=>{m.current&&("chat"===m.current&&u?d(!1):["startPopup","popup"].includes(m.current)&&c&&r(!1))},[p,c,u,d,r]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.zx,{className:em.button,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>n.handleButtonClick(!1),iconLeft:(0,i.jsx)(s.IconFdsLocationO,{size:16}),label:o}),(0,i.jsx)(Q,{}),(0,i.jsx)(ed,{})]})},ev=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:l,...s})=>(0,i.jsx)(a.rU,{onClick:i=>{null==e||e(i),(0,o.h)({eventCategory:v,eventActionType:t||o.D.link,eventActionText:n||"",eventLabel:l||""})},...s}),eg=(0,p.g)("header-mobile-app-banner","sc"),ef=Object.freeze({wrapper:`${eg}__wrapper`,container:`${eg}__container`,closeButton:`${eg}__close-button`,innerWrapper:`${eg}__inner-wrapper`,imageWrapper:`${eg}__image-wrapper`,image:`${eg}__image`,title:`${eg}__title`,description:`${eg}__description`,callToAction:`${eg}__call-to-action`,scanQr:`${eg}__scan-qr`}),e_=Object.freeze({mobile:56,desktop:68}),ew="headerBannerShownAt",ex=()=>{let e=localStorage.getItem(ew);if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},eb=()=>{localStorage.setItem(ew,new Date().toISOString())},ej=()=>{let e=ex();return!e||Math.floor((e.getTime()-new Date().getTime())/864e5)>5},e$=({minioUrl:e,className:t,mobileAppUrl:n})=>{let{fixedContainerRef:o}=ei(),[d,p]=(0,l.useState)(!1),[m,h]=(0,l.useState)(!1),[v,g]=(0,l.useState)(!1),f=(0,l.useCallback)((e="desktop")=>{let t=o.current;t&&(t.style.transform="translateY(0)",document.documentElement.style.setProperty("--fixed-header-height",`${e_[e]+_[e]}px`),document.documentElement.style.setProperty("--new-header-height-desktop",`${e_.desktop+_.desktop}px`),document.documentElement.style.setProperty("--new-header-height-mobile",`${e_.mobile+_.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-mobile",`${e_.mobile+_.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-desktop",`${e_.desktop+_.desktop}px`),document.documentElement.style.setProperty("--header-height",`${e_[e]+108}px`))},[]),w=(0,l.useCallback)(()=>{let e=o.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,l.useEffect)(()=>{let e=o.current;if(!e)return;let t=()=>{m&&p(!1),g(!1)};return e.addEventListener("transitionend",t),()=>{e.removeEventListener("transitionend",t)}},[m]),(0,l.useEffect)(()=>{ej()&&p(!0)},[]),(0,l.useEffect)(()=>{let e=window.innerWidth<768;d&&(f(e?"mobile":"desktop"),g(!0));let t=()=>{if(!d)return null;f(window.innerWidth<768?"mobile":"desktop")};return window.addEventListener("resize",t),()=>{w(),window.removeEventListener("resize",t)}},[d,f,w]),d?(0,i.jsx)("div",{id:"headerMobileBanner",role:"region","aria-label":"Мобильное приложение","data-opening":v,className:(0,c.Z)(ef.wrapper,t),children:(0,i.jsx)(r.W2,{children:(0,i.jsxs)("div",{className:ef.container,children:[(0,i.jsxs)("div",{className:ef.innerWrapper,children:[(0,i.jsxs)("picture",{className:ef.imageWrapper,children:[(0,i.jsx)("source",{srcSet:(0,u.xn)(e,"/widgets/header/qr-mobile-app.svg"),media:"(min-width: 768px)"}),(0,i.jsx)("img",{className:ef.image,src:(0,u.xn)(e,"/logo/finuslugi/default-regular.svg")})]}),(0,i.jsxs)("div",{className:ef.scanQr,children:[(0,i.jsx)("div",{className:ef.title,children:"Скачайте приложение Финуслуги"}),(0,i.jsx)("div",{className:ef.description,children:"Сканируйте QR-код"})]}),(0,i.jsxs)("div",{className:ef.callToAction,children:[(0,i.jsxs)("div",{children:["Приложение",(0,i.jsx)("br",{}),"Финуслуги"]}),(0,i.jsx)(a.zx,{onClick:()=>{window.open(n,"_blank","noreferrer")},variant:"white",size:"xs",children:"Скачать"})]})]}),(0,i.jsx)("div",{"aria-label":"Закрыть",role:"button",className:ef.closeButton,onClick:()=>{eb(),w(),window.matchMedia("(prefers-reduced-motion: reduce)").matches?p(!1):h(!0)},children:(0,i.jsx)(s.IconFdsCloseO,{size:"100%"})})]})})}):null},ek=(0,p.g)("header-chat-modal-body","sc"),eN=Object.freeze({wrapper:`${ek}__wrapper`,cardButton:`${ek}__card-button`,card:`${ek}__card`,cardTitle:`${ek}__card-title`,cardSubtitle:`${ek}__card-subtitle`,button:`${ek}__button`}),ey=()=>{let e=ei();return(0,i.jsxs)("div",{className:eN.wrapper,children:[(0,i.jsx)(eo,{className:eN.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.Zb,{className:eN.card,variant:"secondary",children:[(0,i.jsxs)("div",{className:eN.cardTitle,children:[(0,i.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat"}),"Напишите в чат"]}),(0,i.jsxs)("p",{className:eN.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,i.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),(0,i.jsx)(eo,{className:eN.cardButton,variant:"secondary",as:"a",href:"https://finuslugi.ru/landing/fingpt",target:"_blank",eventActionText:"Спросите у FinGPT",children:(0,i.jsxs)(r.Zb,{className:eN.card,variant:"secondary",children:[(0,i.jsxs)("div",{className:eN.cardTitle,children:[(0,i.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/robot_icon_hover.svg",alt:"chat"}),"Спросите у FinGPT"]}),(0,i.jsx)("p",{className:eN.cardSubtitle,children:"Ваш личный финансовый AI-ассистент"})]})})]})},eC=({data:e,isMobile:t})=>{let n=ei();return(0,i.jsx)("div",{className:O.contentWrapper,children:e.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>(0,i.jsxs)("div",{className:(0,c.Z)(O.content,{[O.hidden]:n.openedSection!==e.id,[O.contentOpen]:!!n.openedSection}),children:[(0,i.jsx)("div",{className:O.contentHeader,children:(0,i.jsx)("label",{children:e.title})}),e.content.map((n,l)=>{var r,a;return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:(0,i.jsx)("a",{className:(0,c.Z)(O.contentTitle,{[O.removed]:!n.title,[O.contentTitleUrl]:!!n.url,[O.contentTitleLink]:!!e.isSeeAllLinkAvailable,[O.contentTitleNew]:!!n.new}),href:e.isSeeAllLinkAvailable?n.url:void 0,children:(0,i.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,i.jsx)("div",{className:O.arrowIcon,children:(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{})}),n.title]})})}),!(null!=(r=n.links)&&r.length)&&(0,i.jsx)(A,{items:n.chips||[],maxNumberOfLines:e.content.length<=1?99:t?3:2}),!!(null!=(a=n.links)&&a.length)&&(0,i.jsx)("div",{className:(0,c.Z)(O.links,{[O.linksColumns]:!!n.columns,[O.linksTitleless]:!n.title}),children:n.links.map(e=>(0,i.jsxs)("a",{href:e.url,className:(0,c.Z)({[O.new]:!!e.new}),onClick:()=>N(o.D.link,e.title,`${e.title}_${e.url}`),children:[(0,i.jsx)("div",{className:O.arrowIcon,children:(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{})}),(0,i.jsx)("span",{children:e.title})]},e.url))})]},`${n.url}_${l}`)})]},e.id))},e.id))})},eT=(0,p.g)("navigation-section-icon","sc"),eO=Object.freeze({icon:`${eT}`}),eS=({name:e,background:t})=>{let n=(0,l.useMemo)(()=>e&&s[e]||null,[e]);return e&&n?(0,i.jsx)("div",{className:eO.icon,style:{background:t},children:(0,i.jsx)(n,{})}):null},eA=(0,p.g)("navigation","sc"),eI=Object.freeze({navigation:`${eA}`,navigationOpening:`${eA}--opening`,navigationClosing:`${eA}--closing`,wrapper:`${eA}__wrapper`,container:`${eA}__container`,containerOpen:`${eA}__container--open`,sections:`${eA}__sections`,sectionsOpen:`${eA}__sections--open`,citySelectButton:`${eA}__city-select-button`,sectionsTitle:`${eA}__sections-title`,sectionsWrapper:`${eA}__sections-wrapper`,section:`${eA}__section`,sectionArrow:`${eA}__section-arrow`,sectionExtra:`${eA}__section--extra`,sectionActive:`${eA}__section--active`,sectionTitle:`${eA}__section-title`,chatWrapper:`${eA}__chat-wrapper`,chatHeader:`${eA}__chat-header`,backButton:`${eA}__back-button`,useful:`${eA}__useful`,usefulOpen:`${eA}__useful--open`,usefulTitle:`${eA}__useful-title`,usefulGrid:`${eA}__useful-grid`,removed:`${eA}__removed`}),eL=({data:e})=>{var t;let n=ei(),u=F(),d=(0,a.aF)("m"),[p,m]=(0,l.useState)(!0);(0,l.useEffect)(()=>{m(d)},[d]);let h=(0,l.useRef)(null),v=(0,l.useCallback)(()=>{h.current&&clearTimeout(h.current),h.current=setTimeout(()=>n.openedSection?n.setOpenedSection(null):n.isNavigationOpen?n.setOpenedBlock(null):void 0,50)},[n]),g=(0,l.useRef)(!1),_=(0,l.useRef)(null),w=(0,l.useCallback)(()=>{p&&(g.current=!0,_.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),v()},window.history.pushState(null,"",window.location.href))},[v,p]),x=(0,l.useCallback)(()=>{g.current=!1,window.onpopstate=_.current,window.history.go(-1)},[]),b=(0,l.useRef)(null),j=(0,l.useCallback)(e=>{if(p||!n.navMenuItemsRef.current||!n.navigationRef.current)return;let t=e.target,i=!n.navMenuItemsRef.current.contains(t)&&!n.navigationRef.current.contains(t);if(i&&!b.current){n.setIgnoreClicks(),b.current=setTimeout(()=>n.setOpenedBlock(null),300);return}!i&&b.current&&(clearTimeout(b.current),b.current=null)},[p,n]),$=(0,l.useRef)(null),k=(0,l.useCallback)(e=>{typeof window>"u"||(e?($.current=j,window.addEventListener("mousemove",$.current)):$.current&&window.removeEventListener("mousemove",$.current))},[j]);(0,l.useEffect)(()=>{k(n.isNavigationOpen),n.isNavigationOpen&&!g.current&&w(),!n.isNavigationOpen&&g.current&&x()},[n.isNavigationOpen]);let y=(e,t)=>()=>{N(o.D.button,t),n.setOpenedSection(e)},{start:C,clear:T}=V(),O=(e,t)=>()=>{p||C(y(e,t),150)},S=()=>{p||T()};return(0,i.jsx)("div",{ref:n.navigationRef,className:(0,c.Z)(eI.navigation,{[eI.removed]:!n.isNavigationMounted,[eI.navigationOpening]:n.isNavigationOpen,[eI.navigationClosing]:!n.isNavigationOpen}),children:(0,i.jsx)("div",{className:eI.wrapper,children:(0,i.jsxs)(r.W2,{className:(0,c.Z)(eI.container,{[eI.containerOpen]:!!n.openedSection}),children:[(0,i.jsxs)("div",{className:(0,c.Z)(eI.sections,{[eI.sectionsOpen]:!!n.openedSection}),children:[(0,i.jsx)(a.zx,{className:eI.citySelectButton,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>u.handleButtonClick(!1),iconLeft:(0,i.jsx)(s.IconFdsLocationO,{size:24}),label:(null==(t=u.town)?void 0:t.name)||"Вся Россия"}),e.map(e=>(0,i.jsxs)("ul",{className:(0,c.Z)(eI.sectionsWrapper,{[eI.removed]:n.openedBlock!==e.id&&!p}),children:[(0,i.jsx)("div",{className:eI.sectionsTitle,children:f[e.id]}),e.sections.map(e=>(0,i.jsxs)("li",{className:(0,c.Z)(eI.section,{[eI.sectionExtra]:!!e.extra,[eI.sectionActive]:n.openedSection===e.id}),onClick:y(e.id,e.title),onMouseEnter:O(e.id,e.title),onMouseLeave:S,children:[(0,i.jsx)(eS,{name:e.uikitIcon,background:e.uikitIconBg}),(0,i.jsx)("span",{className:eI.sectionTitle,children:e.title}),(0,i.jsx)("div",{className:eI.sectionArrow,children:(0,i.jsx)(s.IconFdsChevronRightSmallO,{size:24})})]},e.id))]},e.id)),(0,i.jsxs)("div",{className:eI.chatWrapper,children:[(0,i.jsx)("div",{className:eI.chatHeader,children:"Нужна помощь?"}),(0,i.jsx)(ey,{})]})]}),(0,i.jsxs)("button",{type:"button",className:(0,c.Z)(eI.backButton,{[eI.removed]:!n.openedSection}),onClick:()=>{N(o.D.button,"Назад"),n.setOpenedSection(null)},children:[(0,i.jsx)(s.IconFdsChevronLeftO,{size:24}),(0,i.jsx)("span",{children:"Назад"})]}),(0,i.jsx)(eC,{data:e,isMobile:p}),(0,i.jsxs)("div",{className:(0,c.Z)(eI.useful,{[eI.usefulOpen]:!!n.openedSection}),children:[(0,i.jsx)("div",{className:eI.usefulTitle,children:"Полезное на Финуслугах"}),e.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>(0,i.jsx)("div",{className:(0,c.Z)(eI.usefulGrid,{[eI.removed]:n.openedSection!==e.id}),children:e.useful.map((e,t)=>(0,i.jsxs)("a",{href:e.url,onClick:()=>N(o.D.link,e.title,`${e.title}_${e.url}`),children:[(0,i.jsx)("div",{children:(0,i.jsx)("img",{src:e.icon,srcSet:e.icon2?`${e.icon}, ${e.icon2} 2x`:void 0,alt:e.title,loading:"lazy"})}),(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},`${e.title}_${t}`))},e.id))},e.id))]})]})})})},eR=(e,t,n)=>{var i,l,o;let s=(null==(i=null==e?void 0:e.NAVIGATOR)?void 0:i.findIndex(({id:e})=>"news"===e))||-1,r=(null==(o=null==(l=null==e?void 0:e.NAVIGATOR)?void 0:l[s])?void 0:o.content)||[];if(e&&Array.isArray(n)&&r.length){let i=n.map(({title:e,url:n})=>({title:e,url:(0,u.xn)(t||"",n),new:0}));e.NAVIGATOR[s].content[0].links=i}return[{id:"FINPRODUCTS",sections:(null==e?void 0:e.FINPRODUCTS)||[]},{id:"NAVIGATOR",sections:(null==e?void 0:e.NAVIGATOR)||[]},{id:"ABOUT",sections:(null==e?void 0:e.ABOUT)||[]}]},ez=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",lkUrl:d="https://lk.finuslugi.ru/registration",initialTown:p,isMainBannerPage:m,enableAppHeaderBanner:v=!1,news:f})=>{let _=ei(),w=eR(e,t,f),x=null==e?void 0:e.config,b=(0,l.useMemo)(()=>w.reduce((e,t)=>(e[t.id]=t.sections[0].id,e),{}),[w]),j=_.isAuth?"Личный кабинет":"Войти",$=m&&_.isHeaderTransparent,k=(e,t,n,i)=>()=>{e!==_.openedBlock?N(o.D.toggle,t,"on"):N(o.D.button,"menu_close","on");let l=n?b[e]:"";_.setOpenedBlock(e,l,!!i)},{start:y,clear:C}=V(),T=(e,t,n,i)=>()=>{_.isNavigationOpen&&e===_.openedBlock||_.setIgnoreClicks(),y(k(e,t,n,i),200)},O=e=>()=>{_.ignoreClicks||e()},S=e=>_.openedBlock===e&&_.isNavigationOpen;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("header",{className:(0,c.Z)(h.header,{[h.transparent]:$}),children:(0,i.jsxs)("div",{ref:_.fixedContainerRef,className:(0,c.Z)(h.fixed,{[h.hidden]:_.isHeaderHidden,[h.navigationOpen]:_.isNavigationOpen}),children:[!!(null!=x&&x.appBannerUrl)&&v&&(0,i.jsx)(e$,{mobileAppUrl:x.appBannerUrl,minioUrl:n}),(0,i.jsxs)(r.W2,{className:h.container,children:[(0,i.jsxs)("div",{className:h.leftRow,children:[(0,i.jsx)(ev,{className:h.logo,href:t,eventActionType:o.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${t}`,children:(0,i.jsxs)("picture",{children:[(0,i.jsx)("source",{srcSet:(0,u.xn)(n,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,i.jsx)("img",{src:(0,u.xn)(n,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,i.jsx)("nav",{ref:_.navMenuItemsRef,className:h.menuItems,children:(0,i.jsx)("ul",{children:g.map(({id:e,label:t})=>(0,i.jsx)("li",{children:(0,i.jsx)(a.zx,{className:(0,c.Z)({[h.menuItemActive]:S(e)}),label:t,variant:"white",size:"xs",onClick:O(k(e,t,!0)),onMouseEnter:T(e,t,!0,!0),onMouseLeave:C})},e))})}),(0,i.jsx)(eo,{className:(0,c.Z)(h.tabletMenuButton,{[h.menuItemActive]:_.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,i.jsx)(s.IconFdsChevronDownO,{size:24}),onClick:k("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,i.jsxs)("div",{className:h.buttonGroup,children:[(0,i.jsxs)("div",{className:h.chips,children:[(0,i.jsx)(eo,{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)(s.IconFdsChatDotsCircleO,{size:24})}),(0,i.jsx)(eo,{as:"a",href:d,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:`profile_${d}`,iconLeft:(0,i.jsx)(s.IconFdsUserO,{size:24})})]}),(0,i.jsx)(eo,{className:h.menuButton,size:"xs",shape:$?"icon":"default",appearance:$?"ghost":"fill",label:"Меню",onClick:k("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,i.jsx)(s.IconFdsMenuSkewedO,{size:24})}),(0,i.jsxs)("div",{className:h.moreButtons,children:[(0,i.jsx)(eh,{initialTown:p}),(0,i.jsx)(eo,{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)(s.IconFdsChatDotsCircleO,{size:24})}),(0,i.jsx)(eo,{as:"a",href:d,size:"xs",eventActionText:j,eventLabel:`${j}_${d}`,label:j})]})]}),(0,i.jsxs)(ev,{className:h.auth,href:d,eventActionText:j,eventLabel:`${j}_${d}`,children:[(0,i.jsx)(eo,{size:"xs",shape:"circle-icon",iconLeft:(0,i.jsx)(s.IconFdsUserO,{}),eventActionText:j,eventLabel:`${j}_${d}`}),(0,i.jsx)("p",{children:j})]}),(0,i.jsx)("div",{className:h.close,children:(0,i.jsx)(eo,{className:h.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,i.jsx)(s.IconFdsCloseO,{}),onClick:()=>_.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})]})}),(0,i.jsx)("div",{className:(0,c.Z)(h.overlay,{[h.removed]:!_.isNavigationMounted,[h.overlayOpening]:_.isNavigationOpen,[h.overlayClosing]:!_.isNavigationOpen}),onClick:O(()=>_.setOpenedBlock(null))}),(0,i.jsx)(eL,{data:w,minioUrl:n})]})},eE=e=>(0,i.jsx)(el,{isMainBannerPage:e.isMainBannerPage,children:(0,i.jsx)(ez,{...e})})},57769:function(e,t,n){n.d(t,{xn:function(){return l}});let i=/^\.?\//;function l(e,...t){let n=e||"";for(let e of t.filter(e=>e&&"/"!==e))if(n){let t=e.replace(i,"");n=function(e="",t){return e.endsWith("/")?e:e+"/"}(n)+t}else n=e;return n}Symbol.for("ufo:protocolRelative")}}]);