(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[806],{16456:function(e,t,n){"use strict";function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(null,arguments)}n.d(t,{default:function(){return o}});var l=n(2265),s=n(69362);function o(e){let{locale:t,...n}=e;if(!t)throw Error("Failed to determine locale in `NextIntlClientProvider`, please provide the `locale` prop explicitly.\n\nSee https://next-intl-docs.vercel.app/docs/configuration#locale");return l.createElement(s.IntlProvider,i({locale:t},n))}},38068:function(){},69696:function(){},76583:function(){},27565:function(){},86034:function(){},52848:function(e,t,n){"use strict";let i;n.d(t,{F:function(){return q}});var l=n(57437),s=n(35563),o=n(61994),r=n(77337),a=n(52074),c=n(75461),d=n(49750),u=n(80684),p=n(2265),m=n(94246);let h=(0,a.g)("footer-contacts-block","sc"),v=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`}),g=(0,a.g)("footer","sc"),f=Object.freeze({wrapper:`${g}__wrapper`,section:`${g}__section`,container:`${g}__container`,top:`${g}__top`,main:`${g}__main`,links:`${g}__links`,disclaimer:`${g}__disclaimer`,bottom:`${g}__bottom`,bottomLinks:`${g}__bottom-links`,bottomDisclaimer:`${g}__bottom-disclaimer`,compact:`${g}__wrapper--compact`,white:`${g}__wrapper--white`}),_="finkit-widgets-sc-footer",x=[{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"}],w=[...x,{title:"Онлайн чат",url:void 0}],b=[{type:"vk",className:v.vkIcon,iconName:"vk"},{type:"telegramChannel",className:v.tgIcon,iconName:"telegram"},{type:"dzen",className:v.dzenIcon,iconName:"dzen"},{type:"max",className:v.maxIcon,iconName:"max"}],j=(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 - ПАО Московская Биржа и юридические лица, находящиеся под прямым или косвенным контролем ПАО Московская Биржа."]}),N=({onClick:e,eventActionText:t,eventLabel:n,...i})=>(0,l.jsx)(c.zx,{onClick:i=>{null==e||e(i),(0,d.h)({eventCategory:_,eventActionType:d.D.button,eventActionText:t||"",eventLabel:n})},...i}),$=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:i,chat:s,...o})=>(0,l.jsx)(c.rU,{onClick:l=>{var o,r,a;null==e||e(l),s&&(null==l||l.preventDefault(),null==(a=null==(r=null==(o=null==window?void 0:window.supportWidget)?void 0:o.craftTalk)?void 0:r.open)||a.call(r)),(0,d.h)({eventCategory:_,eventActionType:t||d.D.link,eventActionText:n||"",eventLabel:i})},...o}),k=({minioUrl:e,blogs:t})=>(0,l.jsxs)("div",{className:v.contactsWrapper,children:[(0,l.jsx)(s.xv,{className:v.gray,size:"16",weight:"regular",children:"Звоните или пишите"}),(0,l.jsx)("div",{className:v.phones,children:w.map(({title:e,url:t})=>(0,l.jsx)($,{href:t,eventActionText:e,chat:!t,children:e},e))}),(0,l.jsx)(s.xv,{className:v.gray,size:"16",weight:"regular",children:"Следите за нами в соцсетях"}),(0,l.jsx)("div",{className:v.contactsButtons,children:b.map(({type:n,className:i,iconName:s})=>(0,l.jsx)(N,{as:"a",href:null==t?void 0:t[n],target:"_blank",className:i,iconRight:(0,l.jsx)("img",{width:24,height:24,src:(0,r.xn)(e,`/widgets/footer/${s}.svg`),alt:n,loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:n,eventLabel:null==t?void 0:t[n]},n))}),(0,l.jsx)(s.xv,{className:v.gray,size:"16",weight:"regular",children:"Канал для инвесторов"}),(0,l.jsx)("div",{className:v.contactsButtons,children:(0,l.jsxs)($,{href:null==t?void 0:t.investTg,target:"_blank",className:v.link,eventActionText:"telegram",eventLabel:null==t?void 0:t.investTg,children:[(0,l.jsx)(N,{className:v.tgIcon,iconRight:(0,l.jsx)("img",{width:24,height:24,src:(0,r.xn)(e,"/widgets/footer/telegram.svg"),alt:"telegram",loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:"telegram",eventLabel:null==t?void 0:t.investTg}),"Финуслуги Инвест"]})})]}),y=(0,a.g)("footer-disclaimer","sc"),C=Object.freeze({disclaimer:`${y}`}),T=e=>{let t=e=>{e.target instanceof HTMLAnchorElement&&(0,d.h)({eventCategory:_,eventActionType:d.D.link,eventActionText:e.target.textContent||"",eventLabel:e.target.href})};return e.disclaimer?(0,l.jsx)("div",{className:(0,o.Z)(e.className,C.disclaimer),dangerouslySetInnerHTML:{__html:e.disclaimer||""},onClick:t}):(0,l.jsx)("div",{className:(0,o.Z)(e.className,C.disclaimer),onClick:t,children:e.children})},O=()=>{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},S=(e="")=>{let[t,n]=(0,p.useState)(e);return(0,p.useEffect)(()=>{let t=O();if(!t||0===t.size)return;let[i,l=""]=e.split("?"),s=new URLSearchParams(l);t.forEach((e,t)=>{s.has(t)||s.set(t,e)});let o=s.toString();n(o?`${i}?${o}`:i)},[e]),t},A=(0,a.g)("footer-modal-body","sc"),I=Object.freeze({wrapper:`${A}__wrapper`,title:`${A}__title`,item:`${A}__item`,label:`${A}__label`,button:`${A}__button`,description:`${A}__description`}),L=({directions:e})=>(0,l.jsxs)("div",{className:I.wrapper,children:[(0,l.jsx)("div",{className:I.title,children:"Направления"}),e.map(e=>(0,l.jsxs)($,{className:I.item,href:e.url,target:"_blank",eventActionText:e.name,eventLabel:`${e.name}_${e.url}`,children:[(0,l.jsxs)("div",{className:I.label,children:[(0,l.jsx)("span",{children:e.name}),(0,l.jsx)(N,{className:I.button,iconRight:(0,l.jsx)(u.IconFdsArrowUpRightSmallO,{size:28}),shape:"circle-icon",eventActionText:"IconFdsArrowUpRightSmallO"})]}),(0,l.jsx)("p",{className:I.description,children:e.description})]},e.url))]}),R=(0,a.g)("footer-popup","sc"),E=Object.freeze({wrapper:`${R}__wrapper`,button:`${R}__button`,icon:`${R}__icon`,buttonWrapper:`${R}__button-wrapper`}),z=({directions:e})=>{let t=(0,c._m)("l"),[n,i]=(0,p.useState)(!1),s=()=>{i(!1)};return(0,l.jsxs)("div",{className:E.wrapper,children:[(0,l.jsx)("div",{className:E.buttonWrapper,children:(0,l.jsx)(N,{className:E.button,appearance:"ghost",variant:"white",onClick:()=>{i(!0)},label:"Все направления",eventActionText:"Все направления",iconLeft:(0,l.jsx)("div",{className:E.icon,children:[1,2,3,4,5,6,7,8,9].map(e=>(0,l.jsx)("div",{},e))})})}),(0,l.jsxs)(m.P,{children:[!t&&(0,l.jsx)(m.U,{isOpen:n,onClose:s,full:!0,children:(0,l.jsx)(L,{directions:e})}),t&&(0,l.jsx)(m.D,{isOpen:n,onClose:s,width:"804px",children:(0,l.jsx)(L,{directions:e})})]})]})},P=(0,a.g)("footer-left-column","sc"),B=Object.freeze({leftColumn:`${P}__left-column`,logoWrapper:`${P}__logo-wrapper`,banner:`${P}__banner`,mobAppLink:`${P}__mob-app-link`,br:`${P}__br`}),U=({showcaseUrl:e,minioUrl:t,directions:n,mobAppUrl:i})=>{let o=S(i);return(0,l.jsxs)("div",{className:B.leftColumn,children:[(0,l.jsx)($,{className:B.logoWrapper,href:e,eventActionType:d.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:(0,l.jsx)("img",{src:(0,r.xn)(t,"/widgets/footer/finuslugi_base_logo.svg"),alt:"finuslugi logo",loading:"lazy"})}),(0,l.jsx)(z,{directions:n??[]}),(0,l.jsx)($,{href:o,target:"_blank",eventActionType:d.D.banner,eventActionText:"Управляйте финансами через приложение Финуслуг",eventLabel:o,className:B.mobAppLink,children:(0,l.jsxs)(s.Zb,{className:B.banner,children:[(0,l.jsxs)(s.xv,{weight:"medium",children:["Управляйте финансами",(0,l.jsx)("br",{}),"через приложение",(0,l.jsx)("br",{className:B.br})," Финуслуг"]}),(0,l.jsx)(N,{iconRight:(0,l.jsx)(u.IconFdsArrowUpRightSmallO,{size:32}),shape:"circle-icon",variant:"white",eventActionText:"IconFdsArrowUpRightSmallO"}),(0,l.jsxs)("picture",{children:[(0,l.jsx)("source",{srcSet:(0,r.xn)(t,"/widgets/footer/apps_d.webp"),media:"(min-width: 1024px)"}),(0,l.jsx)("img",{src:(0,r.xn)(t,"/widgets/footer/apps_m.webp"),alt:"иллюстрация мобильного приложения",loading:"lazy"})]})]})})]})},W=(0,a.g)("footer-logo","sc"),M=Object.freeze({wrapper:`${W}__wrapper`,link:`${W}__link`,fromMoex:`${W}__from-moex`,logo:`${W}__logo`,white:`${W}__wrapper--white`}),D=({showcaseUrl:e,minioUrl:t,isWhite:n})=>(0,l.jsx)("div",{className:(0,o.Z)(M.wrapper,{[M.white]:n}),children:(0,l.jsxs)($,{className:M.link,href:e,eventActionType:d.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:[(0,l.jsx)("img",{className:M.logo,src:`${t}/images/logo-brandmark-common-finuslugi.svg`}),(0,l.jsx)("img",{className:M.fromMoex,src:`${t}/images/fromMoex.svg`})]})});var F=((i=F||{}).BLACK="black",i.GRAY="gray",i);let Z=(0,a.g)("footer-warning","sc"),V=Object.freeze({reservedSpace:`${Z}__reserved-space`,wrapper:`${Z}__wrapper`,wrapperGray:`${Z}__wrapper--gray`,fixed:`${Z}__wrapper--fixed`,container:`${Z}__container`,text:`${Z}__text`,invisibleText:`${Z}__text--invisible`}),H=({text:e,variant:t,fixed:n,isPlaceholder:i})=>(0,l.jsx)("div",{className:(0,o.Z)(V.wrapper,{[V.wrapperGray]:"gray"===t,[V.fixed]:n&&!i}),children:(0,l.jsx)(s.W2,{className:V.container,children:(0,l.jsx)("div",{className:(0,o.Z)(V.text,{[V.invisibleText]:i}),dangerouslySetInnerHTML:{__html:e}})})}),G=({warning:e})=>{let t="string"==typeof e?{text:e}:e,n={text:t.text,fixed:t.fixed??!0,variant:t.variant??F.BLACK};return(0,l.jsxs)("div",{className:V.reservedSpace,children:[(0,l.jsx)(H,{...n,isPlaceholder:n.fixed}),n.fixed&&(0,l.jsx)(H,{...n,fixed:!0})]})},q=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",customDisclaimer:i,variant:r="default",className:a})=>{var c,d;let u=!i&&null!=e&&e.disclaimer?e.disclaimer:void 0,p=r.includes("compact"),m=r.includes("white"),h=null==(c=null==e?void 0:e.bottom)?void 0:c.concat(p?x:[]),v=e&&"warning"in e?e.warning:void 0;return e?(0,l.jsx)("footer",{className:(0,o.Z)(f.wrapper,a,{[f.compact]:p,[f.white]:m}),children:(0,l.jsxs)("section",{className:f.section,children:[(0,l.jsxs)(s.W2,{className:f.container,children:[!p&&(0,l.jsx)(U,{showcaseUrl:t,minioUrl:n,directions:null==e?void 0:e.directions,mobAppUrl:null==e?void 0:e.mobAppUrl}),(0,l.jsx)("div",{className:f.wrapper,children:(0,l.jsxs)("div",{className:f.top,children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:f.main,children:[!p&&(0,l.jsx)("div",{className:f.links,children:null==(d=null==e?void 0:e.top)?void 0:d.map(e=>(0,l.jsx)($,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),p&&(0,l.jsx)(D,{showcaseUrl:t,minioUrl:n,isWhite:m}),(0,l.jsx)(T,{className:f.disclaimer,disclaimer:u,children:i||j})]}),(0,l.jsxs)("div",{className:f.bottom,children:[(0,l.jsx)("div",{className:f.bottomLinks,children:null==h?void 0:h.map(e=>(0,l.jsx)($,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),(0,l.jsx)(T,{className:f.bottomDisclaimer,disclaimer:null==e?void 0:e.bottomDisclaimer})]})]}),!p&&(0,l.jsx)(k,{minioUrl:n,blogs:null==e?void 0:e.blogs})]})})]}),p&&!!v&&(0,l.jsx)(G,{warning:v})]})}):null}},21395:function(e,t,n){"use strict";n.d(t,{C:function(){return J},H:function(){return eM}});var i=n(57437),l=n(2265),s=n(80684),o=n(35563),r=n(75461),a=n(61994),c=n(77337),d=n(49750),u=n(94246),p=n(52074);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`,whiteIcons:`${m}__white-icons`,close:`${m}__close`,removed:`${m}__removed`,overlay:`${m}__overlay`,overlayOpening:`${m}__overlay--opening`,overlayClosing:`${m}__overlay--closing`}),v="user_region",g="user_town",f="cb-header",_=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],x=_.reduce((e,t)=>(e[t.id]=t.label,e),{}),w=Object.freeze({mobile:56,desktop:80});var b=n(55487);let j=(e,t,n)=>{if(typeof window>"u"||typeof document>"u")return;let i=document.getElementById("mainHomeBanner"),l=!1,s=0,o=0,r=()=>window.innerWidth<768,a=r(),c=()=>window.scrollY||document.documentElement.scrollTop,d=()=>{let e=document.querySelector(":root");e&&(o=parseFloat(window.getComputedStyle(e).getPropertyValue("--fixed-header-height")),s=c())},u=()=>{let e=r();e!==a&&(a=e,o=0)},p=function(){let r=c(),a=document.getElementById("headerNotice"),u=null==a?void 0:a.getAttribute("data-opening");if("true"===u)return;o||d();let p=r<o,m=r<((null==i?void 0:i.clientHeight)||0);if(n&&m||p){l=!1,e(!1),t(!0);return}e(l=r>s),l&&setTimeout(()=>t(!1),50);let h=l?"0px":"false"===u?`${o}px`:"";document.documentElement.style.setProperty("--new-header-height-desktop",h),document.documentElement.style.setProperty("--new-header-height-mobile",h),s=r<=0?0:r};return window.addEventListener("scroll",p),window.addEventListener("resize",u),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",u)}},N=()=>{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},$=()=>document.cookie.split(";").some(e=>e.trim().startsWith("utm_params=")),k=(e,t,n)=>{let i=new Date;i.setTime(i.getTime()+864e5*n);let l=encodeURIComponent(JSON.stringify(t)),s=`;domain=.${window.location.hostname}`;document.cookie=`${e}=${l};expires=${i.toUTCString()};path=/;SameSite=Lax${s}`},y=()=>{let e=N();e&&!$()&&k("utm_params",e,90),e&&k("utm_last",e,90)},C=()=>{setTimeout(()=>{if(!(typeof document>"u"||"string"!=typeof document.cookie))try{y()}catch(e){console.error("UTM tracking error:",e)}},0)},T=(e,t,n)=>(0,d.h)({eventCategory:f,eventActionType:e,eventActionText:t,eventLabel:n}),O=(0,p.g)("navigation-chips","sc"),S=Object.freeze({wrapper:`${O}__wrapper`,gray:`${O}__variantGray`,white:`${O}__variantWhite`,container:`${O}__container`,chip:`${O}__chip`,more:`${O}__chip--more`,active:`${O}__chip--active`,label:`${O}__label`,hidden:`${O}__hidden`}),A=(0,p.g)("navigation-content","sc"),I=Object.freeze({contentWrapper:`${A}__content-wrapper`,content:`${A}__content`,contentOpen:`${A}__content--open`,contentHeader:`${A}__content-header`,contentTitle:`${A}__content-title`,contentTitleUrl:`${A}__content-title--url`,contentTitleLink:`${A}__content-title--link`,contentTitleNew:`${A}__content-title--new`,new:`${A}__new`,vip:`${A}__vip`,arrowIcon:`${A}__arrow-icon`,links:`${A}__links`,linksColumns:`${A}__links--columns`,linksTitleless:`${A}__links--titleless`,removed:`${A}__removed`,hidden:`${A}__content--hidden`}),L=({chip:e,hidden:t,onClick:n,refCallback:l,activeChipId:o})=>{let r=!!n,c=()=>{if(r)return null==n?void 0:n(e.url);T(d.D.chip,e.title,`${e.title}_${e.url}`)},u=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:S.label,children:e.title}),e.arrow&&(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{size:24})]}),p=(0,a.Z)(S.chip,{[S.hidden]:t,[I.new]:!!e.new,[I.vip]:!!e.vip,[S.active]:e.url===o});return r?(0,i.jsx)("button",{type:"button",className:p,onClick:c,ref:l,children:u}):(0,i.jsx)("a",{href:e.url,className:p,onClick:c,ref:l,children:u})},R=({items:e=[],maxNumberOfLines:t,variant:n,className:o,activeChipId:r,onClick:c})=>{let u=(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),[_,x]=(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 w=(0,l.useCallback)(()=>{let n=u.current;if(!n)return;let i=e=>e?e.getBoundingClientRect().width:0,l=i(n),s=Math.max(Number(t)||0,0),o=()=>{f(e.length),x(!1)};if(h||0===s||l<=0){o();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)){o();return}let d=1,v=0,g=0;for(let e of c){let t=d===s?a+r:0,n=0===v?e:v+r+e;if(n+t<=l-.5)v=n,g++;else{if(++d>s)break;v=e,g++}}x(g<e.length),f(g)},[h,e,t]);(0,l.useLayoutEffect)(()=>{let e=u.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(w)});return t.observe(e),requestAnimationFrame(w),()=>{t.disconnect()}},[w]),(0,l.useEffect)(()=>{requestAnimationFrame(w)},[w]);let b=h||(t??0)<=0||!_;return(0,i.jsx)("div",{className:(0,a.Z)(o,S.wrapper,{[S.gray]:"gray"===n,[S.white]:"white"===n}),children:(0,i.jsxs)("div",{ref:u,className:S.container,children:[e.map((e,t)=>(0,i.jsx)(L,{chip:e,hidden:!b&&t>=g,activeChipId:r,onClick:c,refCallback:t=>{m.current[e.url]=t}},e.url)),!b&&_&&(0,i.jsxs)("button",{type:"button",ref:p,className:(0,a.Z)(S.chip,S.more),onClick:()=>{T(d.D.chip,"Еще"),v(!0)},children:[(0,i.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,i.jsx)("span",{className:S.label,children:"Еще"})]}),(b||!_)&&(0,i.jsxs)("button",{type:"button",ref:p,className:(0,a.Z)(S.chip,S.more,S.hidden),tabIndex:-1,"aria-hidden":"true",children:[(0,i.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,i.jsx)("span",{className:S.label,children:"Еще"})]})]})})},E=(e,t)=>{if(!(typeof document>"u")){if(!e&&!t){b.a.removeItem(v),b.a.removeItem(g);return}b.a.setItem(v,JSON.stringify(e)||"",{"max-age":31536e3}),b.a.setItem(g,JSON.stringify(t)||"",{"max-age":31536e3})}},z=e=>{if(typeof document>"u")return null;let t=b.a.getItem(e)??void 0;if(!t||"undefined"===t)return null;try{return JSON.parse(decodeURIComponent(t))}catch{return null}},P=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},B=()=>{if(typeof window>"u")return[];if(Array.isArray(window.allRegions)&&window.allRegions.length>0)return window.allRegions;let e=P("all_regions")||[];return window.allRegions=e,e},U=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]),[])},W=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)},M=async e=>{let t=null;try{t=await (await fetch(`${e}`,{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},D=(e,t,n)=>{(0,d.h)({eventCategory:H,eventActionType:e,eventActionText:t,eventLabel:n})},F=B(),Z=U(F),V={regions:F,towns:Z,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},H="finkit-widgets-sc-city-select",G=(0,l.createContext)(V);function q(){return(0,l.useContext)(G)}let J=({children:e,initialRegion:t,initialTown:n,showStartGeoPopup:s=!0,lastRegionsUpdateUnixTimestamp:o,dadataUrl:r="https://finuslugi.ru/backend/money/dadata"})=>{let a=Number(P("lastRegionsUpdateUnixTimestamp")||0),c=Number(o||0)>a,[u,p]=(0,l.useState)(B()),[{startRegion:m,startTown:h},f]=(0,l.useState)({startRegion:V.startRegion,startTown:V.startTown}),_=t??V.region,x=n??V.town,[{region:w,town:b},j]=(0,l.useState)({region:_,town:x}),[N,$]=(0,l.useState)(V.startPopupVisible),[k,y]=(0,l.useState)(V.popupVisible),C=(0,l.useRef)(""),T=(0,l.useMemo)(()=>U(u),[u.length]),O=(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),f({startRegion:e,startTown:t})},[$,f]),S=(0,l.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||O(e,t)},[O]),A=(0,l.useCallback)(()=>{if(C.current&&!w&&!b){let e=T.find(e=>e.name===C.current)??null;return S(u.find(t=>t.id===(null==e?void 0:e.parentId))??null,e)}S(w,b)},[w,b,T,u,S]),I=(0,l.useCallback)(e=>{y(e)},[y]),L=(0,l.useCallback)(e=>{e?D(d.D.icon,"location"):D(d.D.button,(null==b?void 0:b.name)||"Вся Россия"),!s||window.sessionStorage.getItem("start_popup_opened")?I(!0):A()},[s,b,I,A]),R=(0,l.useCallback)((e,t)=>{e||t?(window.localStorage.setItem("all_russia_selected","0"),window.localStorage.setItem(v,JSON.stringify(e)||""),window.localStorage.setItem(g,JSON.stringify(t)||""),E(e||null,t||null)):(window.localStorage.setItem("all_russia_selected","1"),window.localStorage.setItem(v,""),window.localStorage.setItem(g,""),E(null,null)),j({region:e||null,town:t||null}),$(!1),I(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[I]),F=()=>{j({region:z(v)??P(v),town:z(g)??P(g)});let e=async({coords:{latitude:e,longitude:t}})=>{let n=`${r}?lat=${e}&lon=${t}`,i=await M(n);null!=i&&i.location&&(C.current=i.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&s)try{navigator.geolocation.getCurrentPosition(e,()=>null)}catch{}};return(0,l.useEffect)(()=>{if((u.length<1||c)&&W().then(e=>p(e)),window.innerWidth<1024){let e=()=>{F(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{F()},0)},[]),(0,i.jsx)(G.Provider,{value:{regions:u,towns:T,region:w,town:b,startPopupVisible:N,setStartPopupVisible:$,popupVisible:k,handleToggleModal:I,selectCity:R,handleButtonClick:L,startRegion:m,startTown:h},children:e})},Q=()=>{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}},Y=(0,p.g)("city-select-modal-body","sc"),K=Object.freeze({wrapper:`${Y}__wrapper`,subtitle:`${Y}__subtitle`,hintWrapper:`${Y}__hint-wrapper`,hintText:`${Y}__hint-text`,input:`${Y}__input`,chips:`${Y}__chips`,townsListWrapper:`${Y}__towns-list-wrapper`,townsList:`${Y}__towns-list`,townsGroup:`${Y}__towns-group`,townsGroupLabel:`${Y}__towns-group-label`,townsGroupList:`${Y}__towns-group-list`,townsName:`${Y}__towns-name`,regionName:`${Y}__region-name`}),X=({groupedTowns:e,chips:t,query:n,setQuery:o,isDrawer:a})=>{var c;let u=q(),p=(0,l.useRef)(null),[m,h]=(0,l.useState)("10000px");(0,l.useEffect)(()=>{if(!a||!p.current)return;let e=e=>e.reduce((e,t)=>e+t,0),t=(n,i)=>{let l=n.map(e=>[...e]),s=l.map(e),o=s.reduce((e,t,n)=>t<s[e]?n:e,0);0===o&&l[0].push(l[1].shift()),2===o&&l[2].unshift(l[1].pop()),1===o&&s[0]>s[2]&&l[1].unshift(l[0].pop()),1===o&&s[0]<s[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(D(d.D.button,(null==e?void 0:e.name)||"Вся Россия"),!(null!=e&&e.id))return u.selectCity();let t=u.regions.find(t=>t.id===Number(e.parentId))||null;u.selectCity(t,e)};return(0,i.jsxs)("div",{className:K.wrapper,children:[(0,i.jsxs)("div",{className:K.subtitle,children:["Покажем предложения рядом с вами",(0,i.jsxs)("div",{className:K.hintWrapper,children:[(0,i.jsx)(s.IconFdsQuestionCircleO,{size:24}),(0,i.jsx)("div",{className:K.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,i.jsx)(r.MA,{className:K.input,value:n,onChange:o,size:"s",placeholder:"Введите название города",icon:n?(0,i.jsx)(s.IconFdsCloseCircleO,{size:24,onClick:()=>o("")}):(0,i.jsx)(s.IconFdsSearchO,{size:24})}),(0,i.jsx)(r.cL,{className:K.chips,chips:t,value:(null==(c=u.town)?void 0:c.id)||0,onChipClick:e=>{v(u.towns.find(t=>t.id===e))}}),(0,i.jsx)("div",{className:K.townsListWrapper,children:(0,i.jsx)("div",{ref:p,className:K.townsList,style:{maxHeight:m},children:e.map(e=>(0,i.jsxs)("div",{className:K.townsGroup,children:[(0,i.jsx)("div",{className:K.townsGroupLabel,children:e.letter}),(0,i.jsx)("div",{className:K.townsGroupList,children:e.towns.map(e=>(0,i.jsxs)("button",{type:"button",onClick:()=>v(e),children:[(0,i.jsx)("div",{className:K.townsName,children:e.name}),(0,i.jsx)("div",{className:K.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},ee=[1095,1096,134,720,189,180],et=()=>{var e;let t=q(),n=(0,r._m)("l"),[s,o]=(0,l.useState)(""),a=`Ваш выбор: ${(null==(e=t.town)?void 0:e.name)||"Вся Россия"}`,c=(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:"Вся Россия"},...ee.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=()=>{D(d.D.button,"close"),t.handleToggleModal(!1)};return(0,i.jsxs)(u.P,{children:[!n&&(0,i.jsx)(u.U,{title:a,isOpen:t.popupVisible,onClose:m,full:!0,children:(0,i.jsx)(X,{groupedTowns:c,chips:p,query:s,setQuery:o})}),n&&(0,i.jsx)(u.D,{title:a,isOpen:t.popupVisible,onClose:m,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,i.jsx)(X,{groupedTowns:c,chips:p,query:s,setQuery:o,isDrawer:!0})})]})},en={"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"},ei=()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(en,e)?en[e]:en["finuslugi.ru"]},el=(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)},es=()=>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)}})}),eo=()=>{let[e,t]=(0,l.useState)(!1),[n,i]=(0,l.useState)(!1),s=(0,l.useRef)(!1),o=e=>{s.current=e,i(e)};return(0,l.useEffect)(()=>{if(typeof window>"u")return;let e=ei(),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(s.current){r(Error("chat is already opened"));return}i?(i.openWidget(),t(!1),l()):(o(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;i=e;let s=document.querySelector(".webchat");s&&es().observe(s,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=i.closeWidget),null==i||i.openWidget(),o(!1),t(!1),l()},el(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}},er=(0,l.createContext)({isAuth:!1,isHeaderHidden:!1,isHeaderTransparent:!1,openedBlock:null,setOpenedBlock:()=>null,openedSection:null,setOpenedSection:()=>null,isNavigationOpen:!1,isNavigationMounted:!1,navMenuItemsRef:{current:null},navigationRef:{current:null},ignoreClicks:!1,setIgnoreClicks:()=>null,isChatModalOpen:!1,setIsChatModalOpen:()=>null,isChatLoading:!1,fixedContainerRef:{current:null},headerRef:{current:null}});function ea(){return(0,l.useContext)(er)}let ec=e=>{let[t,n]=(0,l.useState)(!1),[s,o]=(0,l.useState)(!1),[r,a]=(0,l.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:d,isChatLoading:p}=eo(),[m,h]=(0,l.useState)(null),[v,g]=(0,l.useState)(null),[f,_]=(0,l.useState)(!1),[x,w]=(0,l.useState)(!1),[b,N]=(0,l.useState)(!1),$=(0,l.useRef)(null),k=(0,u.u)(f),y=(0,l.useRef)(null),T=(0,l.useRef)(null),O=(0,l.useRef)(null),S=(0,l.useRef)(null),A=(0,l.useCallback)(()=>{k.current&&k.current.scrollTo({top:0})},[k]),I=(0,l.useCallback)(e=>{g(e),A()},[A]),L=(0,l.useCallback)(e=>{y.current&&clearTimeout(y.current),e&&w(!0),e||(y.current=setTimeout(()=>{w(!1),I(null)},300))},[I]),R=(0,l.useCallback)((e,t,n)=>{if(t&&I(t),!n&&e===m||!e){L(!f),_(!f);return}h(e),L(!0),_(!0)},[m,I,f,L]),E=(0,l.useCallback)(()=>{T.current&&clearTimeout(T.current),N(!0),T.current=setTimeout(()=>{N(!1)},650)},[]);return(0,l.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id"));let t=j(o,a,e.isMainBannerPage);return C(),t},[]),(0,i.jsx)("header",{children:(0,i.jsx)(er.Provider,{value:{isAuth:t,isHeaderHidden:s,isHeaderTransparent:r,openedBlock:m,setOpenedBlock:R,openedSection:v,setOpenedSection:I,isNavigationOpen:f,isNavigationMounted:x,navMenuItemsRef:$,navigationRef:k,ignoreClicks:b,setIgnoreClicks:E,isChatModalOpen:c,setIsChatModalOpen:d,isChatLoading:p,fixedContainerRef:O,headerRef:S},children:e.children})})},ed=({label:e,onClick:t,eventActionText:n,eventLabel:l,...s})=>(0,i.jsx)(r.zx,{label:e,onClick:e=>{null==t||t(e),(0,d.h)({eventCategory:f,eventActionType:d.D.button,eventActionText:n||"",eventLabel:l||""})},...s}),eu=(0,p.g)("header-popup","sc"),ep=Object.freeze({popup:`${eu}__popup`,popupHeader:`${eu}__popup-header`,popupClose:`${eu}__popup-close`,body:`${eu}__body`}),em=({isOpen:e,onClose:t,children:n,title:l})=>{let o=(0,r._m)("l");return(0,i.jsxs)(u.P,{children:[!o&&(0,i.jsx)(u.U,{title:l,isOpen:e,onClose:t,children:n}),o&&e&&(0,i.jsxs)("div",{className:ep.popup,children:[(0,i.jsxs)("div",{className:ep.popupHeader,children:[l,(0,i.jsx)(ed,{className:ep.popupClose,iconLeft:(0,i.jsx)(s.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:t,eventActionText:"IconFdsCloseO"})]}),(0,i.jsx)("div",{className:ep.body,children:n})]})]})},eh=(0,p.g)("start-choice-popup","sc"),ev=Object.freeze({top:`${eh}__top`,progress:`${eh}__progress`,innerCircle:`${eh}__inner-circle`,title:`${eh}__title`,subtitle:`${eh}__subtitle`,actions:`${eh}__actions`}),eg=()=>{var e,t;let n=q(),[s,o]=(0,l.useState)(10),[r,a]=(0,l.useState)(0),c=(0,l.useRef)(void 0),u=()=>{D(d.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;c.current=setInterval(()=>{n++,i+=t,a(3.6*n);let l=e-Math.floor(i/1e3);l<s&&o(l),100===n&&(clearInterval(c.current),u())},t)})():(clearInterval(c.current),o(10),a(0))},[n.startPopupVisible]),(0,i.jsxs)(em,{isOpen:n.startPopupVisible,onClose:u,title:(0,i.jsx)("button",{type:"button",className:ev.progress,style:{background:`conic-gradient(#ff0508 ${r}deg, #e3e7ec 0deg)`},onClick:u,children:(0,i.jsx)("div",{className:ev.innerCircle,children:s})}),children:[(0,i.jsxs)("div",{className:ev.top,children:[(0,i.jsxs)("div",{className:ev.title,children:["Ваш город ",(null==(e=n.startTown)?void 0:e.name)||(null==(t=n.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,i.jsx)("div",{className:ev.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,i.jsxs)("div",{className:ev.actions,children:[(0,i.jsx)(ed,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{D(d.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,i.jsx)(ed,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{D(d.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},ef=(0,p.g)("city-select","sc"),e_=Object.freeze({button:`${ef}__button`,minimal:`${ef}__minimal`,full:`${ef}__full`}),ex=({initialTown:e})=>{var t;let n=q(),o=(null==(t=n.town)?void 0:t.name)||e||"Вся Россия",{setIsChatModalOpen:c,isChatModalOpen:d}=ea(),{startPopupVisible:u,setStartPopupVisible:p,popupVisible:m}=n,h=(0,l.useRef)();(0,l.useEffect)(()=>{m&&(h.current="popup")},[m]),(0,l.useEffect)(()=>{d&&(h.current="chat")},[d]),(0,l.useEffect)(()=>{u&&(h.current="startPopup")},[u]),(0,l.useEffect)(()=>{h.current&&("chat"===h.current&&u?p(!1):["startPopup","popup"].includes(h.current)&&d&&c(!1))},[m,d,u,p,c]);let v={appearance:"ghost",size:"xs",onClick:()=>n.handleButtonClick(!1),iconLeft:(0,i.jsx)(s.IconFdsLocationO,{size:24})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.zx,{...v,className:(0,a.Z)(e_.button,e_.full),label:o}),(0,i.jsx)(r.zx,{...v,className:(0,a.Z)(e_.button,e_.minimal),shape:"icon"}),(0,i.jsx)(et,{}),(0,i.jsx)(eg,{})]})},ew=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:l,...s})=>(0,i.jsx)(r.rU,{onClick:i=>{null==e||e(i),(0,d.h)({eventCategory:f,eventActionType:t||d.D.link,eventActionText:n||"",eventLabel:l||""})},...s}),eb=(0,p.g)("header-mobile-app-banner","sc"),ej=Object.freeze({wrapper:`${eb}__wrapper`,container:`${eb}__container`,closeButton:`${eb}__close-button`,innerWrapper:`${eb}__inner-wrapper`,imageWrapper:`${eb}__image-wrapper`,image:`${eb}__image`,title:`${eb}__title`,description:`${eb}__description`,callToAction:`${eb}__call-to-action`,scanQr:`${eb}__scan-qr`}),eN=Object.freeze({mobile:56,desktop:68}),e$="headerBannerShownAt",ek=()=>{let e=localStorage.getItem(e$);if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},ey=()=>{localStorage.setItem(e$,new Date().toISOString())},eC=()=>{let e=ek();return!e||Math.floor((e.getTime()-new Date().getTime())/864e5)>5},eT=({minioUrl:e,className:t,mobileAppUrl:n})=>{let{fixedContainerRef:u,headerRef:p}=ea(),[m,h]=(0,l.useState)(!1),[v,g]=(0,l.useState)(!1),[f,_]=(0,l.useState)(!1),x=(0,l.useCallback)((e="desktop")=>{let t=u.current;t&&(t.style.transform="translateY(0)",document.documentElement.style.setProperty("--fixed-header-height",`${eN[e]+w[e]}px`),document.documentElement.style.setProperty("--new-header-height-desktop",`${eN.desktop+w.desktop}px`),document.documentElement.style.setProperty("--new-header-height-mobile",`${eN.mobile+w.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-mobile",`${eN.mobile+w.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-desktop",`${eN.desktop+w.desktop}px`),document.documentElement.style.setProperty("--header-height",`${eN[e]+108}px`))},[]),b=(0,l.useCallback)(()=>{let e=u.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=p.current;if(!e)return;let t=()=>{v&&h(!1),_(!1)};return e.addEventListener("transitionend",t),()=>{e.removeEventListener("transitionend",t)}},[v]),(0,l.useEffect)(()=>{eC()&&h(!0)},[]),(0,l.useEffect)(()=>{let e=window.innerWidth<768;m&&(x(e?"mobile":"desktop"),window.matchMedia("(prefers-reduced-motion: reduce)").matches?h(!0):_(!0));let t=()=>{if(!m)return null;x(window.innerWidth<768?"mobile":"desktop")};return window.addEventListener("resize",t),()=>{b(),window.removeEventListener("resize",t)}},[m,x,b]),m?(0,i.jsx)("div",{id:"headerNotice",role:"region","aria-label":"Мобильное приложение","data-opening":f,className:(0,a.Z)(ej.wrapper,t),children:(0,i.jsx)(o.W2,{children:(0,i.jsxs)("div",{className:ej.container,children:[(0,i.jsxs)("div",{className:ej.innerWrapper,children:[(0,i.jsxs)("picture",{className:ej.imageWrapper,children:[(0,i.jsx)("source",{srcSet:(0,c.xn)(e,"/widgets/header/qr-mobile-app.svg"),media:"(min-width: 768px)"}),(0,i.jsx)("img",{className:ej.image,src:(0,c.xn)(e,"/logo/finuslugi/default-regular.svg")})]}),(0,i.jsxs)("div",{className:ej.scanQr,children:[(0,i.jsx)("div",{className:ej.title,children:"Скачайте приложение Финуслуги"}),(0,i.jsx)("div",{className:ej.description,children:"Сканируйте QR-код"})]}),(0,i.jsxs)("div",{className:ej.callToAction,children:[(0,i.jsxs)("div",{children:["Приложение",(0,i.jsx)("br",{}),"Финуслуги"]}),(0,i.jsx)(r.zx,{onClick:()=>{T(d.D.button,"skachat_mob_prilozheniye_fu"),window.open(n,"_blank","noreferrer")},variant:"white",size:"xs",children:"Скачать"})]})]}),(0,i.jsx)("div",{"aria-label":"Закрыть",role:"button",className:ej.closeButton,onClick:()=>{ey(),b(),window.matchMedia("(prefers-reduced-motion: reduce)").matches?h(!1):g(!0)},children:(0,i.jsx)(s.IconFdsCloseO,{size:"100%"})})]})})}):null},eO=(0,p.g)("header-chat-modal-body","sc"),eS=Object.freeze({wrapper:`${eO}__wrapper`,cardButton:`${eO}__card-button`,card:`${eO}__card`,cardTitle:`${eO}__card-title`,cardSubtitle:`${eO}__card-subtitle`,button:`${eO}__button`}),eA=()=>{let e=ea();return(0,i.jsxs)("div",{className:eS.wrapper,children:[(0,i.jsx)(ed,{className:eS.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)(o.Zb,{className:eS.card,variant:"secondary",children:[(0,i.jsxs)("div",{className:eS.cardTitle,children:[(0,i.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat",width:24,height:24,loading:"lazy"}),"Напишите в чат"]}),(0,i.jsxs)("p",{className:eS.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,i.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),!1]})},eI=({data:e,isMobile:t})=>{let n=ea();return(0,i.jsx)("div",{className:I.contentWrapper,children:e.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>{var l;return(0,i.jsxs)("div",{className:(0,a.Z)(I.content,{[I.hidden]:n.openedSection!==e.id,[I.contentOpen]:!!n.openedSection}),children:[(0,i.jsx)("div",{className:I.contentHeader,children:(0,i.jsx)("label",{children:e.title})}),null==(l=e.content)?void 0:l.map((n,l)=>{var o,r;return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:(0,i.jsx)("a",{className:(0,a.Z)(I.contentTitle,{[I.removed]:!n.title,[I.contentTitleUrl]:!!n.url,[I.contentTitleLink]:!!e.isSeeAllLinkAvailable,[I.contentTitleNew]:!!n.new}),href:e.isSeeAllLinkAvailable?n.url:void 0,children:(0,i.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,i.jsx)("div",{className:I.arrowIcon,children:(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{})}),n.title]})})}),!(null!=(o=n.links)&&o.length)&&(0,i.jsx)(R,{items:n.chips||[],maxNumberOfLines:e.content.length<=1?99:t?3:2}),!!(null!=(r=n.links)&&r.length)&&(0,i.jsx)("div",{className:(0,a.Z)(I.links,{[I.linksColumns]:!!n.columns,[I.linksTitleless]:!n.title}),children:n.links.map(e=>(0,i.jsxs)("a",{href:e.url,className:(0,a.Z)({[I.new]:!!e.new}),onClick:()=>T(d.D.link,e.title,`${e.title}_${e.url}`),children:[(0,i.jsx)("div",{className:I.arrowIcon,children:(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{})}),(0,i.jsx)("span",{children:e.title})]},e.url))})]},`${n.url}_${l}`)})]},e.id)})},e.id))})},eL=(0,p.g)("navigation-section-icon","sc"),eR=Object.freeze({icon:`${eL}`}),eE=({name:e,background:t})=>{let n=(0,l.useMemo)(()=>e&&s[e]||null,[e]);return e&&n?(0,i.jsx)("div",{className:eR.icon,style:{background:t},children:(0,i.jsx)(n,{})}):null},ez=(0,p.g)("navigation","sc"),eP=Object.freeze({navigation:`${ez}`,navigationOpening:`${ez}--opening`,navigationClosing:`${ez}--closing`,wrapper:`${ez}__wrapper`,container:`${ez}__container`,containerOpen:`${ez}__container--open`,sections:`${ez}__sections`,sectionsOpen:`${ez}__sections--open`,citySelectButton:`${ez}__city-select-button`,sectionsTitle:`${ez}__sections-title`,sectionsWrapper:`${ez}__sections-wrapper`,section:`${ez}__section`,sectionArrow:`${ez}__section-arrow`,sectionExtra:`${ez}__section--extra`,sectionActive:`${ez}__section--active`,sectionTitle:`${ez}__section-title`,chatWrapper:`${ez}__chat-wrapper`,chatHeader:`${ez}__chat-header`,backButton:`${ez}__back-button`,useful:`${ez}__useful`,usefulOpen:`${ez}__useful--open`,usefulTitle:`${ez}__useful-title`,usefulGrid:`${ez}__useful-grid`,removed:`${ez}__removed`}),eB=({data:e})=>{var t;let n=ea(),c=q(),u=(0,r.aF)("m"),[p,m]=(0,l.useState)(!0);(0,l.useEffect)(()=>{m(u)},[u]);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),f=(0,l.useRef)(null),_=(0,l.useCallback)(()=>{p&&(g.current=!0,f.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),v()},window.history.pushState(null,"",window.location.href))},[v,p]),w=(0,l.useCallback)(()=>{g.current=!1,window.onpopstate=f.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]),N=(0,l.useRef)(null),$=(0,l.useCallback)(e=>{typeof window>"u"||(e?(N.current=j,window.addEventListener("mousemove",N.current)):N.current&&window.removeEventListener("mousemove",N.current))},[j]);(0,l.useEffect)(()=>{$(n.isNavigationOpen),n.isNavigationOpen&&!g.current&&_(),!n.isNavigationOpen&&g.current&&w()},[n.isNavigationOpen]);let k=(e,t)=>()=>{T(d.D.button,t),n.setOpenedSection(e)},{start:y,clear:C}=Q(),O=(e,t)=>()=>{p||y(k(e,t),150)},S=()=>{p||C()};return(0,i.jsx)("div",{ref:n.navigationRef,className:(0,a.Z)(eP.navigation,{[eP.removed]:!n.isNavigationMounted,[eP.navigationOpening]:n.isNavigationOpen,[eP.navigationClosing]:!n.isNavigationOpen}),children:(0,i.jsx)("div",{className:eP.wrapper,children:(0,i.jsxs)(o.W2,{className:(0,a.Z)(eP.container,{[eP.containerOpen]:!!n.openedSection}),children:[(0,i.jsxs)("div",{className:(0,a.Z)(eP.sections,{[eP.sectionsOpen]:!!n.openedSection}),children:[(0,i.jsx)(r.zx,{className:eP.citySelectButton,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>c.handleButtonClick(!1),iconLeft:(0,i.jsx)(s.IconFdsLocationO,{size:24}),label:(null==(t=c.town)?void 0:t.name)||"Вся Россия"}),e.map(e=>(0,i.jsxs)("ul",{className:(0,a.Z)(eP.sectionsWrapper,{[eP.removed]:n.openedBlock!==e.id&&!p}),children:[(0,i.jsx)("div",{className:eP.sectionsTitle,children:x[e.id]}),e.sections.map(e=>(0,i.jsxs)("li",{className:(0,a.Z)(eP.section,{[eP.sectionExtra]:!!e.extra,[eP.sectionActive]:n.openedSection===e.id}),onClick:k(e.id,e.title),onMouseEnter:O(e.id,e.title),onMouseLeave:S,children:[(0,i.jsx)(eE,{name:e.uikitIcon,background:e.uikitIconBg}),(0,i.jsx)("span",{className:eP.sectionTitle,children:e.title}),(0,i.jsx)("div",{className:eP.sectionArrow,children:(0,i.jsx)(s.IconFdsChevronRightSmallO,{size:24})})]},e.id))]},e.id)),(0,i.jsxs)("div",{className:eP.chatWrapper,children:[(0,i.jsx)("div",{className:eP.chatHeader,children:"Нужна помощь?"}),(0,i.jsx)(eA,{})]})]}),(0,i.jsxs)("button",{type:"button",className:(0,a.Z)(eP.backButton,{[eP.removed]:!n.openedSection}),onClick:()=>{T(d.D.button,"Назад"),n.setOpenedSection(null)},children:[(0,i.jsx)(s.IconFdsChevronLeftO,{size:24}),(0,i.jsx)("span",{children:"Назад"})]}),(0,i.jsx)(eI,{data:e,isMobile:p}),(0,i.jsxs)("div",{className:(0,a.Z)(eP.useful,{[eP.usefulOpen]:!!n.openedSection}),children:[(0,i.jsx)("div",{className:eP.usefulTitle,children:"Полезное на Финуслугах"}),e.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>{var t;return(0,i.jsx)("div",{className:(0,a.Z)(eP.usefulGrid,{[eP.removed]:n.openedSection!==e.id}),children:null==(t=e.useful)?void 0:t.map((e,t)=>(0,i.jsxs)("a",{href:e.url,onClick:()=>T(d.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))]})]})})})},eU=(e,t,n)=>{var i,l,s,o,r,a,d;let u=(null==(l=null==(i=null==e?void 0:e.NAVIGATOR)?void 0:i.findIndex)?void 0:l.call(i,({id:e})=>"news"===e))||-1,p=(null==(o=null==(s=null==e?void 0:e.NAVIGATOR)?void 0:s[u])?void 0:o.content)||[];if(null!=(d=null==(a=null==(r=null==e?void 0:e.NAVIGATOR)?void 0:r[u])?void 0:a.content)&&d[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[u].content[0].links=i}return[{id:"FINPRODUCTS",sections:Array.isArray(null==e?void 0:e.FINPRODUCTS)?null==e?void 0:e.FINPRODUCTS:[]},{id:"NAVIGATOR",sections:Array.isArray(null==e?void 0:e.NAVIGATOR)?null==e?void 0:e.NAVIGATOR:[]},{id:"ABOUT",sections:Array.isArray(null==e?void 0:e.ABOUT)?null==e?void 0:e.ABOUT:[]}]},eW=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",lkUrl:u="https://lk.finuslugi.ru/registration",initialTown:p,isMainBannerPage:m,enableAppHeaderBanner:v=!1,news:g,className:f})=>{let x=ea(),w=(0,l.useMemo)(()=>eU(e,t,g),[e,t,g]),b=null==e?void 0:e.config,j=(0,l.useMemo)(()=>w.reduce((e,t)=>{var n;return e[t.id]=null==(n=t.sections[0])?void 0:n.id,e},{}),[w]),N=x.isAuth?"Личный кабинет":"Войти",$=m&&x.isHeaderTransparent,k=(e,t,n,i)=>()=>{e!==x.openedBlock?T(d.D.toggle,t,"on"):T(d.D.button,"menu_close","on");let l=n?j[e]:"";x.setOpenedBlock(e,l,!!i)},{start:y,clear:C}=Q(),O=(e,t,n,i)=>()=>{x.isNavigationOpen&&e===x.openedBlock||x.setIgnoreClicks(),y(k(e,t,n,i),200)},S=e=>()=>{x.ignoreClicks||e()},A=e=>x.openedBlock===e&&x.isNavigationOpen;return e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:x.headerRef,className:(0,a.Z)(h.header,f,{[h.transparent]:$}),children:(0,i.jsxs)("div",{ref:x.fixedContainerRef,className:(0,a.Z)(h.fixed,{[h.hidden]:x.isHeaderHidden,[h.navigationOpen]:x.isNavigationOpen}),children:[!!(null!=b&&b.appBannerUrl)&&v&&(0,i.jsx)(eT,{mobileAppUrl:b.appBannerUrl,minioUrl:n}),(0,i.jsxs)(o.W2,{className:h.container,children:[(0,i.jsxs)("div",{className:h.leftRow,children:[(0,i.jsx)(ew,{className:h.logo,href:t,eventActionType:d.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${t}`,children:(0,i.jsxs)("picture",{children:[(0,i.jsx)("source",{srcSet:(0,c.xn)(n,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,i.jsx)("img",{src:(0,c.xn)(n,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,i.jsx)("nav",{ref:x.navMenuItemsRef,className:h.menuItems,children:(0,i.jsx)("ul",{children:_.map(({id:e,label:t})=>(0,i.jsx)("li",{children:(0,i.jsx)(r.zx,{className:(0,a.Z)({[h.menuItemActive]:A(e)}),label:t,variant:"white",size:"xs",onClick:S(k(e,t,!0)),onMouseEnter:O(e,t,!0,!0),onMouseLeave:C})},e))})}),(0,i.jsx)(ed,{className:(0,a.Z)(h.tabletMenuButton,{[h.menuItemActive]:x.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,i.jsx)(s.IconFdsChevronDownO,{size:24}),onClick:k("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,i.jsxs)("div",{className:(0,a.Z)(h.buttonGroup,{[h.whiteIcons]:(null==b?void 0:b.iconColorOnMobileMainBanner)==="white"}),children:[(0,i.jsxs)("div",{className:h.chips,children:[(0,i.jsx)(ed,{as:"a",href:u,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:`profile_${u}`,iconLeft:(0,i.jsx)(s.IconFdsUserO,{size:20})}),(0,i.jsx)(ed,{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)(ed,{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)(ex,{initialTown:p}),(0,i.jsx)(ed,{onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},size:"xs",appearance:"ghost",eventActionText:"IconFdsChatDotsSquareAddO",iconLeft:(0,i.jsx)(s.IconFdsChatDotsSquareAddO,{size:24}),children:"Онлайн чат"}),(0,i.jsx)(ed,{as:"a",href:u,size:"xs",eventActionText:N,eventLabel:`${N}_${u}`,label:N})]})]}),(0,i.jsxs)(ew,{className:h.auth,href:u,eventActionText:N,eventLabel:`${N}_${u}`,children:[(0,i.jsx)(ed,{size:"xs",shape:"circle-icon",iconLeft:(0,i.jsx)(s.IconFdsUserO,{}),eventActionText:N,eventLabel:`${N}_${u}`}),(0,i.jsx)("p",{children:N})]}),(0,i.jsx)("div",{className:h.close,children:(0,i.jsx)(ed,{className:h.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,i.jsx)(s.IconFdsCloseO,{}),onClick:()=>x.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})]})}),(0,i.jsx)("div",{className:(0,a.Z)(h.overlay,{[h.removed]:!x.isNavigationMounted,[h.overlayOpening]:x.isNavigationOpen,[h.overlayClosing]:!x.isNavigationOpen}),onClick:S(()=>x.setOpenedBlock(null))}),(0,i.jsx)(eB,{data:w,minioUrl:n})]}):null},eM=e=>(0,i.jsx)(ec,{isMainBannerPage:e.isMainBannerPage,children:(0,i.jsx)(eW,{...e})})},94246:function(e,t,n){"use strict";n.d(t,{D:function(){return A},P:function(){return U},U:function(){return B},u:function(){return b}});var i=n(57437),l=n(2265),s=n(61994),o=n(80684),r=n(52074),a=n(54887);let c=300,d=({opened:e})=>{let[t,n]=(0,l.useState)(!1),i=(0,l.useRef)(null),s=(0,l.useRef)(!1);return(0,l.useEffect)(()=>(e&&!s.current?(s.current=!0,n(!0)):!e&&s.current&&(i.current=setTimeout(()=>{s.current=!1,n(!1)},c)),()=>{i.current&&clearTimeout(i.current)}),[e]),{mounted:t}},u=(0,r.g)("click-outside","sc"),p=Object.freeze({overlay:`${u}__overlay`,open:`${u}--open`,close:`${u}--close`}),m=({onClose:e,onToucheMove:t,isOpen:n,delay:o=c})=>{let r=(0,l.useRef)(null),a=(0,l.useCallback)(()=>{e&&(r.current=setTimeout(()=>{e()},o))},[o,e]),d=(0,l.useCallback)(e=>{"Escape"===e.key&&a()},[a]);return(0,l.useEffect)(()=>(n&&window.addEventListener("keydown",d),()=>{r.current&&clearTimeout(r.current),window.removeEventListener("keydown",d)}),[n,d]),(0,i.jsx)("div",{className:(0,s.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","100vh")},_=e=>{e.classList.toggle("scroll-disable-windows",!1),e.style.removeProperty("overflow"),e.style.removeProperty("height"),e.style.removeProperty("width"),e.style.removeProperty("top")},x=()=>{void 0!==window.prevScrollPosition&&(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0)},w=()=>document.querySelectorAll("[data-portal]").length>1,b=e=>{let t=(0,l.useRef)(null),n=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{if(n.current===e)return;n.current=e;let i=t.current,l=document.body,s=document.documentElement,o=window.innerWidth-s.clientWidth,r=o>0;if(e&&r)v(l),g(l,s,o),h(i,!0);else if(e)f(l),h(i,!0);else{let e=!w();e&&_(l),e&&x(),h(i,!1)}return()=>{let e=!w();e&&_(l),e&&x()}},[e]),t},j=(0,r.g)("drawer-footer","sc"),N=Object.freeze({footer:`${j}__footer`,hasScroll:`${j}__footer--has-scroll`}),$=({footer:e,hasScroll:t,className:n})=>(0,i.jsx)("div",{className:(0,s.Z)(N.footer,{[N.hasScroll]:t},n),children:"function"==typeof e?e():e}),k=(0,r.g)("drawer-content","sc"),y=Object.freeze({container:`${k}__container`,open:`${k}--open`,close:`${k}--close`,header:`${k}__header`,rowHeader:`${k}__header--row`,title:`${k}__title`,center:`${k}__title--center`,left:`${k}__title--left`,right:`${k}__title--right`,controlContainer:`${k}__control-container`,content:`${k}__content`,footer:`${k}__footer`}),C=({onClose:e,onContentClick:t,children:n,title:r,rowTitle:a,titleAlign:c,isCloseable:d,footer:u,closeButton:p,isOpen:m,contentClassName:h,footerClassName:v,contentStyle:g,width:f})=>{let _=(0,l.useRef)(null),x=(0,l.useRef)(null),[w,b]=(0,l.useState)(!1);(0,l.useEffect)(()=>{var e;if(!x.current||!_.current)return;let t=(null==(e=null==x?void 0:x.current)?void 0:e.getBoundingClientRect().top)||0,n=null==_?void 0:_.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=g||f?{width:f,...g||{}}:void 0;return(0,i.jsxs)("div",{ref:_,style:j,className:(0,s.Z)(y.container,{[y.open]:m,[y.close]:!m},h),children:[r||d?(0,i.jsxs)("div",{className:(0,s.Z)(y.header,{[y.rowHeader]:a}),children:[d?p?"function"==typeof p?p():p:(0,i.jsx)("button",{type:"button",className:y.controlContainer,onClick:e,children:(0,i.jsx)(o.IconFdsCloseO,{size:24})}):null,r?(0,i.jsx)("h3",{className:(0,s.Z)(y.title,{[y[c]]:!0}),children:r}):null]}):null,(0,i.jsx)("div",{ref:x,className:y.content,onClick:t,children:n}),u&&(0,i.jsx)($,{className:(0,s.Z)(y.footer,v),footer:u,hasScroll:w})]})},T=(0,r.g)("drawer-layout","sc"),O=Object.freeze({window:`${T}__window`}),S=({onClose:e,isOpen:t,children:n,withDisabledScroll:o,className:r,...a})=>{let c=(0,l.useCallback)(e=>e.stopPropagation(),[]);return b(t&&o),(0,i.jsxs)("div",{"data-portal":!0,className:(0,s.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:s=!0,...o})=>{let{mounted:r}=d({opened:e});return r?(0,i.jsx)(S,{titleAlign:n,isCloseable:l,isOpen:e,withDisabledScroll:s,...o,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,s.Z)(L.footer,t&&L.footerWithoutShadow,n),children:"function"==typeof e?e():e}),E=(0,r.g)("mobile-popup","sc"),z=Object.freeze({mobilePopup:`${E}`,mobilePopupOpen:`${E}--open`,content:`${E}__content`,contentFull:`${E}__content--full`,contentTransition:`${E}__content--transition`,contentTransitionOpen:`${E}__content--transition-open`,contentLine:`${E}__content-line`,contentContainer:`${E}__content-container`,smallContentContainer:`${E}__content-container--small`,min:`${E}__content-container--min`,title:`${E}__title`,closeContainer:`${E}__close-container`,closeButton:`${E}__close-button`}),P=({children:e,footer:t,isOpen:n,isSmallPopup:r,onClose:a,hasCloseButton:c=!0,full:d,touchDistance:u=100,withDisabledScroll:p=!0,contentClassName:h,className:v,title:g,closeButton:f,footerClassName:_})=>{let[x,w]=(0,l.useState)(!1),[j,N]=(0,l.useState)(!1),[$,k]=(0,l.useState)(!0),[y,C]=(0,l.useState)("120%"),T=(0,l.useRef)(null),O=(0,l.useRef)(0),S=(0,l.useRef)(!1),A=e=>{var t,n,i;let l=null==(t=T.current)?void 0:t.offsetTop,s=null==(n=T.current)?void 0:n.offsetHeight;if(S.current=!0,k(!1),l&&s){let t=(null==(i=null==e?void 0:e.touches[0])?void 0:i.clientY)-l,n=0;t>=0&&t<=s+30&&(n=t),t>s+30&&(n=s+30),C(`${n}px`),O.current=n}},I=()=>{S.current&&(O.current>u&&a?null==a||a():C("0"),k(!0),S.current=!1),window.removeEventListener("touchmove",A),window.removeEventListener("touchend",I)};return(0,l.useEffect)(()=>{n&&setTimeout(()=>{w(!0),N(!0),C("0")},100),!n&&j&&(C("120%"),w(!1),N(!1))},[j,n]),b(n&&p),(0,i.jsxs)("div",{"data-portal":!0,className:(0,s.Z)(z.mobilePopup,j&&z.mobilePopupOpen,v),children:[(0,i.jsx)(m,{onClose:()=>{n&&(null==a||a())},onToucheMove:()=>{n&&(w(!1),window.addEventListener("touchmove",A),window.addEventListener("touchend",I))},isOpen:n,delay:0}),(0,i.jsxs)("div",{className:(0,s.Z)(z.content,d&&z.contentFull,$&&z.contentTransition,$&&x&&z.contentTransitionOpen),ref:T,style:{transform:`translateY(${y})`},children:[(0,i.jsx)("div",{className:z.contentLine}),(0,i.jsxs)("div",{className:(0,s.Z)(z.contentContainer,r&&z.smallContentContainer,{[z.min]:!g&&!c},h),children:[!!g&&(0,i.jsx)("div",{className:z.title,children:g}),c?(0,i.jsx)("div",{className:z.closeContainer,children:c?f?"function"==typeof f?f():f:(0,i.jsx)("button",{onClick:a,className:z.closeButton,children:(0,i.jsx)(o.IconFdsCloseO,{size:24})}):null}):null,e]}),t&&(0,i.jsx)(R,{footerClassName:_,isSmallPopup:r,footer:t})]})]})},B=({children:e,isSmallPopup:t=!1,isOpen:n=!1,...l})=>{let{mounted:s}=d({opened:n});return s?(0,i.jsx)(P,{isSmallPopup:t,isOpen:n,...l,children:e}):null};B.displayName="UiMobilePopup";let U=({children:e,id:t="portal-root"})=>{let[n,i]=(0,l.useState)(null);return(0,l.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}},55487: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})}}},49750:function(e,t,n){"use strict";let i;n.d(t,{D:function(){return r},h:function(){return c}});var l=n(31620),s=n(30631);let o=(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 r=((i=r||{}).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 a={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_"},c=({eventCategory:e,eventActionType:t,eventActionText:n="",eventLabel:i})=>{let s={event:"data-event",eventCategory:e,eventAction:a[t]+(0,l.t)(n)};void 0!==i&&(s.eventLabel=(0,l.t)("string"==typeof i?i:i.toString())),o(s)}},16715:function(e,t,n){"use strict";n.d(t,{CookiesPlate:function(){return d}});var i=n(57437),l=n(2265),s=n(80684),o=n(61994),r=n(55487);let a=(0,n(52074).g)("cookies-plate","sc"),c=Object.freeze({wrapper:"".concat(a,"__wrapper"),contentWrapper:"".concat(a,"__content-wrapper"),visible:"".concat(a,"--visible"),hidden:"".concat(a,"--hidden"),content:"".concat(a,"__content"),text:"".concat(a,"__text"),link:"".concat(a,"__link"),button:"".concat(a,"__button")}),d=e=>{let{className:t,mountDelay:n=3e3,href:a="https://assets.finuslugi.ru/mp-assets/user-agreement.pdf",children:d,closeIcon:u,onMount:p,onLinkClick:m,onClose:h,mountAfterScroll:v=!0}=e,[g,f]=(0,l.useState)(!1),[_,x]=(0,l.useState)(!1),[w,b]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let e=()=>{document.removeEventListener("scroll",e),r.a.getItem("Allow-Cookie")||(b(!0),setTimeout(()=>{f(!0),null==p||p()},n))};return v?document.addEventListener("scroll",e):e(),()=>document.removeEventListener("scroll",e)},[]);let j=(0,l.useCallback)(()=>{r.a.setItem("Allow-Cookie","1"),x(!0),null==h||h(),setTimeout(()=>b(!1),1e3)},[h]);return w?(0,i.jsx)("div",{className:c.wrapper,children:(0,i.jsx)("div",{className:(0,o.Z)(c.contentWrapper,{[c.visible]:g,[c.hidden]:_}),children:(0,i.jsxs)("div",{className:(0,o.Z)(t,c.content),children:[d||(0,i.jsxs)("p",{className:c.text,children:["Мы используем"," ",(0,i.jsx)("a",{className:c.link,href:a,target:"_blank",rel:"noreferrer",onClick:m,children:"cookie"})," ","для лучшей работы сайта"]}),(0,i.jsx)("button",{className:c.button,onClick:j,children:u||(0,i.jsx)(s.IconFdsCloseO,{})})]})})}):(0,i.jsx)(i.Fragment,{})}},44789:function(e,t,n){"use strict";n.d(t,{CitySelectProvider:function(){return i.C}});var i=n(21395)},17730:function(e,t,n){"use strict";n.d(t,{B:function(){return w}});var i=n(57437),l=n(35563),s=n(61994),o=n(80684),r=n(75461),a=n(49750),c=n(52074),d=n(2265);let u=(0,c.g)("support","sc"),p=Object.freeze({support:u,title:`${u}__title`,cardsContainer:`${u}__cards-container`}),m="cb-support",h=(0,c.g)("support-app-card","sc"),v=Object.freeze({supportAppCard:h,textWrapper:`${h}__text-wrapper`,imageContainer:`${h}__image-container`,title:`${h}__title`,description:`${h}__description`,button:`${h}__button`,imageWrapper:`${h}__image-wrapper`,image:`${h}__image`}),g=({title:e,linkUrl:t,s3Assets:n,description:l})=>{let s=(0,r.aF)("s");return(0,i.jsxs)("div",{className:v.supportAppCard,onClick:()=>{s&&((0,a.h)({eventCategory:m,eventActionType:a.D.banner,eventActionText:e,eventLabel:t}),window.open(t,"_blank","noreferrer"))},children:[(0,i.jsx)(r.zx,{className:v.button,iconLeft:(0,i.jsx)(o.IconFdsArrowUpRightSmallO,{size:24}),shape:"circle-icon",size:"xs"}),(0,i.jsxs)("div",{className:v.textWrapper,children:[(0,i.jsx)("div",{className:v.title,children:e}),!!l&&(0,i.jsx)("div",{className:v.description,children:l})]}),(0,i.jsx)("div",{className:v.imageContainer,children:(0,i.jsxs)("picture",{className:v.imageWrapper,children:[(0,i.jsx)("source",{media:"(max-width: 767px)",srcSet:`${n}/mp-assets/widgets/SupportBlock/mobile-app.png 1x, ${n}/mp-assets/widgets/SupportBlock/mobile-app@2x.png 2x`}),(0,i.jsx)("img",{className:v.image,loading:"lazy",src:`${n}/mp-assets/widgets/SupportBlock/qr-code-mobile-app.jpg`,srcSet:`${n}/mp-assets/widgets/SupportBlock/qr-code-mobile-app.jpg 1x, ${n}/mp-assets/widgets/SupportBlock/qr-code-mobile-app@2x.jpg 2x`})]})})]})},f=(0,c.g)("support-phone-card","sc"),_=Object.freeze({supportPhoneCard:f,contacts:`${f}__contacts`,contactsExtra:`${f}__contacts-extra`,phone:`${f}__phone`,phonesExtra:`${f}__phones-extra`,phoneExtra:`${f}__phone-extra`,chat:`${f}__chat`,text:`${f}__text`,image:`${f}__image`}),x=({phones:e,phonesExtra:t,description:n,s3Assets:l})=>{let s=(0,d.useCallback)(()=>{var e,t,n;null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)||n.call(t),(0,a.h)({eventCategory:m,eventActionType:a.D.button,eventActionText:"messenger",eventLabel:"chat"})},[]),o=e=>{let t=e.replace(/[\s-]/g,"");(0,a.h)({eventCategory:m,eventActionType:a.D.link,eventActionText:"phone",eventLabel:t})};return(0,i.jsxs)("div",{className:_.supportPhoneCard,children:[(0,i.jsxs)("div",{className:_.contacts,children:[e.map(e=>(0,i.jsx)("a",{className:_.phone,href:e.href,onClick:()=>o(e.label),children:e.label},e.label)),(0,i.jsx)("span",{className:_.chat,onClick:s,children:"Онлайн чат"})]}),(null==t?void 0:t.length)>0&&(0,i.jsxs)("div",{className:_.contactsExtra,children:[(0,i.jsx)("p",{className:_.text,children:"Дополнительные телефоны"}),(0,i.jsx)("div",{className:_.phonesExtra,children:t.map(e=>(0,i.jsx)("a",{className:_.phoneExtra,href:e.href,onClick:()=>o(e.label),children:e.label},e.label))})]}),(0,i.jsx)("p",{className:_.text,children:n}),(0,i.jsx)("img",{className:_.image,src:`${l}/mp-assets/widgets/SupportBlock/bannerSupportGirl.png`})]})},w=({className:e,phoneCard:t,appCard:n,s3Assets:o})=>(0,i.jsx)("section",{className:(0,s.Z)(p.support,e),children:(0,i.jsxs)(l.W2,{children:[(0,i.jsx)(l.X6,{as:"h2",type:"display",weight:"bold",className:p.title,children:"Поддержка"}),(0,i.jsxs)("div",{className:p.cardsContainer,children:[(0,i.jsx)(x,{s3Assets:o,...t}),(0,i.jsx)(g,{s3Assets:o,...n})]})]})});w.displayName="Support"}}]);