"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[621],{4939:function(e,t,n){n.d(t,{F:function(){return J}});var i,l=n(7437),o=n(2833),s=n(3167),r=n(4866),a=n(3919),c=n(1810),u=n(4354),d=n(6094),p=n(2265),m=n(9007);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`}),w="finkit-widgets-sc-footer",_=[{title:"8 (800) 505-32-32",url:"tel:88005053232"},{title:"+7 (495) 145-32-32",url:"tel:+74951453232"}],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 - ПАО Московская Биржа и юридические лица, находящиеся под прямым или косвенным контролем ПАО Московская Биржа."]}),y=({onClick:e,eventActionText:t,eventLabel:n,...i})=>(0,l.jsx)(c.zx,{onClick:i=>{null==e||e(i),(0,u.h)({eventCategory:w,eventActionType:u.D.button,eventActionText:t||"",eventLabel:n})},...i}),$=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:i,chat:o,...s})=>(0,l.jsx)(c.rU,{onClick:l=>{var s,r,a;null==e||e(l),o&&(null==l||l.preventDefault(),null==(a=null==(r=null==(s=null==window?void 0:window.supportWidget)?void 0:s.craftTalk)?void 0:r.open)||a.call(r)),(0,u.h)({eventCategory:w,eventActionType:t||u.D.link,eventActionText:n||"",eventLabel:i})},...s}),N=({minioUrl:e,blogs:t})=>(0,l.jsxs)("div",{className:v.contactsWrapper,children:[(0,l.jsx)(o.xv,{className:v.gray,size:"16",weight:"regular",children:"Звоните или пишите"}),(0,l.jsx)("div",{className:v.phones,children:x.map(({title:e,url:t})=>(0,l.jsx)($,{href:t,eventActionText:e,chat:!t,children:e},e))}),(0,l.jsx)(o.xv,{className:v.gray,size:"16",weight:"regular",children:"Следите за нами в соцсетях"}),(0,l.jsx)("div",{className:v.contactsButtons,children:b.map(({type:n,className:i,iconName:o})=>(0,l.jsx)(y,{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/${o}.svg`),alt:n,loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:n,eventLabel:null==t?void 0:t[n]},n))}),(0,l.jsx)(o.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)(y,{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}),"Финуслуги Инвест"]})})]}),k=(0,a.g)("footer-disclaimer","sc"),C=Object.freeze({disclaimer:`${k}`}),T=e=>{let t=e=>{e.target instanceof HTMLAnchorElement&&(0,u.h)({eventCategory:w,eventActionType:u.D.link,eventActionText:e.target.textContent||"",eventLabel:e.target.href})};return e.disclaimer?(0,l.jsx)("div",{className:(0,s.Z)(e.className,C.disclaimer),dangerouslySetInnerHTML:{__html:e.disclaimer||""},onClick:t}):(0,l.jsx)("div",{className:(0,s.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("?"),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},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)(y,{className:I.button,iconRight:(0,l.jsx)(d.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"),z=Object.freeze({wrapper:`${R}__wrapper`,button:`${R}__button`,icon:`${R}__icon`,buttonWrapper:`${R}__button-wrapper`}),E=({directions:e})=>{let t=(0,c._m)("l"),[n,i]=(0,p.useState)(!1),o=()=>{i(!1)};return(0,l.jsxs)("div",{className:z.wrapper,children:[(0,l.jsx)("div",{className:z.buttonWrapper,children:(0,l.jsx)(y,{className:z.button,appearance:"ghost",variant:"white",onClick:()=>{i(!0)},label:"Все направления",eventActionText:"Все направления",iconLeft:(0,l.jsx)("div",{className:z.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:o,full:!0,children:(0,l.jsx)(L,{directions:e})}),t&&(0,l.jsx)(m.D,{isOpen:n,onClose:o,width:"804px",children:(0,l.jsx)(L,{directions:e})})]})]})},P=(0,a.g)("footer-left-column","sc"),U=Object.freeze({leftColumn:`${P}__left-column`,logoWrapper:`${P}__logo-wrapper`,banner:`${P}__banner`,mobAppLink:`${P}__mob-app-link`,br:`${P}__br`}),B=({showcaseUrl:e,minioUrl:t,directions:n,mobAppUrl:i})=>{let s=S(i);return(0,l.jsxs)("div",{className:U.leftColumn,children:[(0,l.jsx)($,{className:U.logoWrapper,href:e,eventActionType:u.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)(E,{directions:n??[]}),(0,l.jsx)($,{href:s,target:"_blank",eventActionType:u.D.banner,eventActionText:"Управляйте финансами через приложение Финуслуг",eventLabel:s,className:U.mobAppLink,children:(0,l.jsxs)(o.Zb,{className:U.banner,children:[(0,l.jsxs)(o.xv,{weight:"medium",children:["Управляйте финансами",(0,l.jsx)("br",{}),"через приложение",(0,l.jsx)("br",{className:U.br})," Финуслуг"]}),(0,l.jsx)(y,{iconRight:(0,l.jsx)(d.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"})]})]})})]})},M=(0,a.g)("footer-logo","sc"),D=Object.freeze({wrapper:`${M}__wrapper`,link:`${M}__link`,fromMoex:`${M}__from-moex`,logo:`${M}__logo`,white:`${M}__wrapper--white`}),W=({showcaseUrl:e,minioUrl:t,isWhite:n})=>(0,l.jsx)("div",{className:(0,s.Z)(D.wrapper,{[D.white]:n}),children:(0,l.jsxs)($,{className:D.link,href:e,eventActionType:u.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:[(0,l.jsx)("img",{className:D.logo,src:`${t}/images/logo-brandmark-common-finuslugi.svg`}),(0,l.jsx)("img",{className:D.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,s.Z)(V.wrapper,{[V.wrapperGray]:"gray"===t,[V.fixed]:n&&!i}),children:(0,l.jsx)(o.W2,{className:V.container,children:(0,l.jsx)("div",{className:(0,s.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})]})},J=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",customDisclaimer:i,variant:r="default",className:a})=>{var c,u;let d=!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?_:[]),v=e&&"warning"in e?e.warning:void 0;return e?(0,l.jsx)("footer",{className:(0,s.Z)(f.wrapper,a,{[f.compact]:p,[f.white]:m}),children:(0,l.jsxs)("section",{className:f.section,children:[(0,l.jsxs)(o.W2,{className:f.container,children:[!p&&(0,l.jsx)(B,{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==(u=null==e?void 0:e.top)?void 0:u.map(e=>(0,l.jsx)($,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),p&&(0,l.jsx)(W,{showcaseUrl:t,minioUrl:n,isWhite:m}),(0,l.jsx)(T,{className:f.disclaimer,disclaimer:d,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)(N,{minioUrl:n,blogs:null==e?void 0:e.blogs})]})})]}),p&&!!v&&(0,l.jsx)(G,{warning:v})]})}):null}},7507:function(e,t,n){n.d(t,{C:function(){return q},H:function(){return eD},u:function(){return J}});var i=n(7437),l=n(2265),o=n(6094),s=n(2833),r=n(1810),a=n(3167),c=n(4866),u=n(4354),d=n(9007),p=n(3919);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",w=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],_=w.reduce((e,t)=>(e[t.id]=t.label,e),{}),x=Object.freeze({mobile:56,desktop:80});var b=n(6692);let j=(e,t,n)=>{if(typeof window>"u"||typeof document>"u")return;let i=document.getElementById("mainHomeBanner"),l=!1,o=0,s=0,r=()=>window.innerWidth<768,a=r(),c=()=>window.scrollY||document.documentElement.scrollTop,u=()=>{let e=document.querySelector(":root");e&&(s=parseFloat(window.getComputedStyle(e).getPropertyValue("--fixed-header-height")),o=c())},d=()=>{let e=r();e!==a&&(a=e,s=0)},p=function(){let r=c(),a=document.getElementById("headerNotice"),d=null==a?void 0:a.getAttribute("data-opening");if("true"===d)return;s||u();let p=r<s,m=r<((null==i?void 0:i.clientHeight)||0);if(n&&m||p){l=!1,e(!1),t(!0);return}e(l=r>o),l&&setTimeout(()=>t(!1),50);let h=l?"0px":"false"===d?`${s}px`:"";document.documentElement.style.setProperty("--new-header-height-desktop",h),document.documentElement.style.setProperty("--new-header-height-mobile",h),o=r<=0?0:r};return window.addEventListener("scroll",p),window.addEventListener("resize",d),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",d)}},y=()=>{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=")),N=(e,t,n)=>{let i=new Date;i.setTime(i.getTime()+864e5*n);let l=encodeURIComponent(JSON.stringify(t)),o=`;domain=.${window.location.hostname}`;document.cookie=`${e}=${l};expires=${i.toUTCString()};path=/;SameSite=Lax${o}`},k=()=>{let e=y();e&&!$()&&N("utm_params",e,90),e&&N("utm_last",e,90)},C=()=>{setTimeout(()=>{if(!(typeof document>"u"||"string"!=typeof document.cookie))try{k()}catch(e){console.error("UTM tracking error:",e)}},0)},T=(e,t,n)=>(0,u.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:s})=>{let r=!!n,c=()=>{if(r)return null==n?void 0:n(e.url);T(u.D.chip,e.title,`${e.title}_${e.url}`)},d=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:S.label,children:e.title}),e.arrow&&(0,i.jsx)(o.IconFdsArrowUpRightSmallO,{size:24})]}),p=(0,a.Z)(S.chip,{[S.hidden]:t,[I.new]:!!e.new,[I.vip]:!!e.vip,[S.active]:e.url===s});return r?(0,i.jsx)("button",{type:"button",className:p,onClick:c,ref:l,children:d}):(0,i.jsx)("a",{href:e.url,className:p,onClick:c,ref:l,children:d})},R=({items:e=[],maxNumberOfLines:t,variant:n,className:s,activeChipId:r,onClick:c})=>{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),_(!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++}}_(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||!w;return(0,i.jsx)("div",{className:(0,a.Z)(s,S.wrapper,{[S.gray]:"gray"===n,[S.white]:"white"===n}),children:(0,i.jsxs)("div",{ref:d,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&&w&&(0,i.jsxs)("button",{type:"button",ref:p,className:(0,a.Z)(S.chip,S.more),onClick:()=>{T(u.D.chip,"Еще"),v(!0)},children:[(0,i.jsx)(o.IconFdsDotsVerticalO,{size:20}),(0,i.jsx)("span",{className:S.label,children:"Еще"})]}),(b||!w)&&(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)(o.IconFdsDotsVerticalO,{size:20}),(0,i.jsx)("span",{className:S.label,children:"Еще"})]})]})})},z=(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})}},E=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},U=()=>{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},B=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]),[])},M=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)},D=async e=>{let t=null;try{t=await (await fetch(`${e}`,{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},W=(e,t,n)=>{(0,u.h)({eventCategory:H,eventActionType:e,eventActionText:t,eventLabel:n})},F=U(),Z=B(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 J(){return(0,l.useContext)(G)}let q=({children:e,initialRegion:t,initialTown:n,showStartGeoPopup:o=!0,lastRegionsUpdateUnixTimestamp:s,dadataUrl:r="https://finuslugi.ru/backend/money/dadata"})=>{let a=Number(P("lastRegionsUpdateUnixTimestamp")||0),c=Number(s||0)>a,[d,p]=(0,l.useState)(U()),[{startRegion:m,startTown:h},f]=(0,l.useState)({startRegion:V.startRegion,startTown:V.startTown}),w=t??V.region,_=n??V.town,[{region:x,town:b},j]=(0,l.useState)({region:w,town:_}),[y,$]=(0,l.useState)(V.startPopupVisible),[N,k]=(0,l.useState)(V.popupVisible),C=(0,l.useRef)(""),T=(0,l.useMemo)(()=>B(d),[d.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&&!x&&!b){let e=T.find(e=>e.name===C.current)??null;return S(d.find(t=>t.id===(null==e?void 0:e.parentId))??null,e)}S(x,b)},[x,b,T,d,S]),I=(0,l.useCallback)(e=>{k(e)},[k]),L=(0,l.useCallback)(e=>{e?W(u.D.icon,"location"):W(u.D.button,(null==b?void 0:b.name)||"Вся Россия"),!o||window.sessionStorage.getItem("start_popup_opened")?I(!0):A()},[o,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)||""),z(e||null,t||null)):(window.localStorage.setItem("all_russia_selected","1"),window.localStorage.setItem(v,""),window.localStorage.setItem(g,""),z(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:E(v)??P(v),town:E(g)??P(g)});let e=async({coords:{latitude:e,longitude:t}})=>{let n=`${r}?lat=${e}&lon=${t}`,i=await D(n);null!=i&&i.location&&(C.current=i.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&o)try{navigator.geolocation.getCurrentPosition(e,()=>null)}catch{}};return(0,l.useEffect)(()=>{if((d.length<1||c)&&M().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:d,towns:T,region:x,town:b,startPopupVisible:y,setStartPopupVisible:$,popupVisible:N,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:s,isDrawer:a})=>{var c;let d=J(),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]),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(W(u.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:K.wrapper,children:[(0,i.jsxs)("div",{className:K.subtitle,children:["Покажем предложения рядом с вами",(0,i.jsxs)("div",{className:K.hintWrapper,children:[(0,i.jsx)(o.IconFdsQuestionCircleO,{size:24}),(0,i.jsx)("div",{className:K.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,i.jsx)(r.MA,{className:K.input,value:n,onChange:s,size:"s",placeholder:"Введите название города",icon:n?(0,i.jsx)(o.IconFdsCloseCircleO,{size:24,onClick:()=>s("")}):(0,i.jsx)(o.IconFdsSearchO,{size:24})}),(0,i.jsx)(r.cL,{className:K.chips,chips:t,value:(null==(c=d.town)?void 0:c.id)||0,onChipClick:e=>{v(d.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=J(),n=(0,r._m)("l"),[o,s]=(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(o.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},[]),[o,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=()=>{W(u.D.button,"close"),t.handleToggleModal(!1)};return(0,i.jsxs)(d.P,{children:[!n&&(0,i.jsx)(d.U,{title:a,isOpen:t.popupVisible,onClose:m,full:!0,children:(0,i.jsx)(X,{groupedTowns:c,chips:p,query:o,setQuery:s})}),n&&(0,i.jsx)(d.D,{title:a,isOpen:t.popupVisible,onClose:m,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,i.jsx)(X,{groupedTowns:c,chips:p,query:o,setQuery:s,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)},eo=()=>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)}})}),es=()=>{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=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(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&&eo().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()},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),[o,s]=(0,l.useState)(!1),[r,a]=(0,l.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p}=es(),[m,h]=(0,l.useState)(null),[v,g]=(0,l.useState)(null),[f,w]=(0,l.useState)(!1),[_,x]=(0,l.useState)(!1),[b,y]=(0,l.useState)(!1),$=(0,l.useRef)(null),N=(0,d.u)(f),k=(0,l.useRef)(null),T=(0,l.useRef)(null),O=(0,l.useRef)(null),S=(0,l.useRef)(null),A=(0,l.useCallback)(()=>{N.current&&N.current.scrollTo({top:0})},[N]),I=(0,l.useCallback)(e=>{g(e),A()},[A]),L=(0,l.useCallback)(e=>{k.current&&clearTimeout(k.current),e&&x(!0),e||(k.current=setTimeout(()=>{x(!1),I(null)},300))},[I]),R=(0,l.useCallback)((e,t,n)=>{if(t&&I(t),!n&&e===m||!e){L(!f),w(!f);return}h(e),L(!0),w(!0)},[m,I,f,L]),z=(0,l.useCallback)(()=>{T.current&&clearTimeout(T.current),y(!0),T.current=setTimeout(()=>{y(!1)},650)},[]);return(0,l.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id"));let t=j(s,a,e.isMainBannerPage);return C(),t},[]),(0,i.jsx)("header",{children:(0,i.jsx)(er.Provider,{value:{isAuth:t,isHeaderHidden:o,isHeaderTransparent:r,openedBlock:m,setOpenedBlock:R,openedSection:v,setOpenedSection:I,isNavigationOpen:f,isNavigationMounted:_,navMenuItemsRef:$,navigationRef:N,ignoreClicks:b,setIgnoreClicks:z,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p,fixedContainerRef:O,headerRef:S},children:e.children})})},eu=({label:e,onClick:t,eventActionText:n,eventLabel:l,...o})=>(0,i.jsx)(r.zx,{label:e,onClick:e=>{null==t||t(e),(0,u.h)({eventCategory:f,eventActionType:u.D.button,eventActionText:n||"",eventLabel:l||""})},...o}),ed=(0,p.g)("header-popup","sc"),ep=Object.freeze({popup:`${ed}__popup`,popupHeader:`${ed}__popup-header`,popupClose:`${ed}__popup-close`,body:`${ed}__body`}),em=({isOpen:e,onClose:t,children:n,title:l})=>{let s=(0,r._m)("l");return(0,i.jsxs)(d.P,{children:[!s&&(0,i.jsx)(d.U,{title:l,isOpen:e,onClose:t,children:n}),s&&e&&(0,i.jsxs)("div",{className:ep.popup,children:[(0,i.jsxs)("div",{className:ep.popupHeader,children:[l,(0,i.jsx)(eu,{className:ep.popupClose,iconLeft:(0,i.jsx)(o.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=J(),[o,s]=(0,l.useState)(10),[r,a]=(0,l.useState)(0),c=(0,l.useRef)(void 0),d=()=>{W(u.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((" "+o).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<o&&s(l),100===n&&(clearInterval(c.current),d())},t)})():(clearInterval(c.current),s(10),a(0))},[n.startPopupVisible]),(0,i.jsxs)(em,{isOpen:n.startPopupVisible,onClose:d,title:(0,i.jsx)("button",{type:"button",className:ev.progress,style:{background:`conic-gradient(#ff0508 ${r}deg, #e3e7ec 0deg)`},onClick:d,children:(0,i.jsx)("div",{className:ev.innerCircle,children:o})}),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)(eu,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{W(u.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,i.jsx)(eu,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{W(u.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},ef=(0,p.g)("city-select","sc"),ew=Object.freeze({button:`${ef}__button`,minimal:`${ef}__minimal`,full:`${ef}__full`}),e_=({initialTown:e})=>{var t;let n=J(),s=(null==(t=n.town)?void 0:t.name)||e||"Вся Россия",{setIsChatModalOpen:c,isChatModalOpen:u}=ea(),{startPopupVisible:d,setStartPopupVisible:p,popupVisible:m}=n,h=(0,l.useRef)();(0,l.useEffect)(()=>{m&&(h.current="popup")},[m]),(0,l.useEffect)(()=>{u&&(h.current="chat")},[u]),(0,l.useEffect)(()=>{d&&(h.current="startPopup")},[d]),(0,l.useEffect)(()=>{h.current&&("chat"===h.current&&d?p(!1):["startPopup","popup"].includes(h.current)&&u&&c(!1))},[m,u,d,p,c]);let v={appearance:"ghost",size:"xs",onClick:()=>n.handleButtonClick(!1),iconLeft:(0,i.jsx)(o.IconFdsLocationO,{size:24})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.zx,{...v,className:(0,a.Z)(ew.button,ew.full),label:s}),(0,i.jsx)(r.zx,{...v,className:(0,a.Z)(ew.button,ew.minimal),shape:"icon"}),(0,i.jsx)(et,{}),(0,i.jsx)(eg,{})]})},ex=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:l,...o})=>(0,i.jsx)(r.rU,{onClick:i=>{null==e||e(i),(0,u.h)({eventCategory:f,eventActionType:t||u.D.link,eventActionText:n||"",eventLabel:l||""})},...o}),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`}),ey=Object.freeze({mobile:56,desktop:68}),e$="headerBannerShownAt",eN=()=>{let e=localStorage.getItem(e$);if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},ek=()=>{localStorage.setItem(e$,new Date().toISOString())},eC=()=>{let e=eN();return!e||Math.floor((e.getTime()-new Date().getTime())/864e5)>5},eT=({minioUrl:e,className:t,mobileAppUrl:n})=>{let{fixedContainerRef:d,headerRef:p}=ea(),[m,h]=(0,l.useState)(!1),[v,g]=(0,l.useState)(!1),[f,w]=(0,l.useState)(!1),_=(0,l.useCallback)((e="desktop")=>{let t=d.current;t&&(t.style.transform="translateY(0)",document.documentElement.style.setProperty("--fixed-header-height",`${ey[e]+x[e]}px`),document.documentElement.style.setProperty("--new-header-height-desktop",`${ey.desktop+x.desktop}px`),document.documentElement.style.setProperty("--new-header-height-mobile",`${ey.mobile+x.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-mobile",`${ey.mobile+x.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-desktop",`${ey.desktop+x.desktop}px`),document.documentElement.style.setProperty("--header-height",`${ey[e]+108}px`))},[]),b=(0,l.useCallback)(()=>{let e=d.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),w(!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&&(_(e?"mobile":"desktop"),window.matchMedia("(prefers-reduced-motion: reduce)").matches?h(!0):w(!0));let t=()=>{if(!m)return null;_(window.innerWidth<768?"mobile":"desktop")};return window.addEventListener("resize",t),()=>{b(),window.removeEventListener("resize",t)}},[m,_,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)(s.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(u.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:()=>{ek(),b(),window.matchMedia("(prefers-reduced-motion: reduce)").matches?h(!1):g(!0)},children:(0,i.jsx)(o.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)(eu,{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)(s.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=>(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})}),e.content.map((n,l)=>{var s,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)(o.IconFdsArrowUpRightSmallO,{})}),n.title]})})}),!(null!=(s=n.links)&&s.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(u.D.link,e.title,`${e.title}_${e.url}`),children:[(0,i.jsx)("div",{className:I.arrowIcon,children:(0,i.jsx)(o.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}`}),ez=({name:e,background:t})=>{let n=(0,l.useMemo)(()=>e&&o[e]||null,[e]);return e&&n?(0,i.jsx)("div",{className:eR.icon,style:{background:t},children:(0,i.jsx)(n,{})}):null},eE=(0,p.g)("navigation","sc"),eP=Object.freeze({navigation:`${eE}`,navigationOpening:`${eE}--opening`,navigationClosing:`${eE}--closing`,wrapper:`${eE}__wrapper`,container:`${eE}__container`,containerOpen:`${eE}__container--open`,sections:`${eE}__sections`,sectionsOpen:`${eE}__sections--open`,citySelectButton:`${eE}__city-select-button`,sectionsTitle:`${eE}__sections-title`,sectionsWrapper:`${eE}__sections-wrapper`,section:`${eE}__section`,sectionArrow:`${eE}__section-arrow`,sectionExtra:`${eE}__section--extra`,sectionActive:`${eE}__section--active`,sectionTitle:`${eE}__section-title`,chatWrapper:`${eE}__chat-wrapper`,chatHeader:`${eE}__chat-header`,backButton:`${eE}__back-button`,useful:`${eE}__useful`,usefulOpen:`${eE}__useful--open`,usefulTitle:`${eE}__useful-title`,usefulGrid:`${eE}__useful-grid`,removed:`${eE}__removed`}),eU=({data:e})=>{var t;let n=ea(),c=J(),d=(0,r.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),f=(0,l.useRef)(null),w=(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]),x=(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]),y=(0,l.useRef)(null),$=(0,l.useCallback)(e=>{typeof window>"u"||(e?(y.current=j,window.addEventListener("mousemove",y.current)):y.current&&window.removeEventListener("mousemove",y.current))},[j]);(0,l.useEffect)(()=>{$(n.isNavigationOpen),n.isNavigationOpen&&!g.current&&w(),!n.isNavigationOpen&&g.current&&x()},[n.isNavigationOpen]);let N=(e,t)=>()=>{T(u.D.button,t),n.setOpenedSection(e)},{start:k,clear:C}=Q(),O=(e,t)=>()=>{p||k(N(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)(s.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)(o.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:_[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:N(e.id,e.title),onMouseEnter:O(e.id,e.title),onMouseLeave:S,children:[(0,i.jsx)(ez,{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)(o.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(u.D.button,"Назад"),n.setOpenedSection(null)},children:[(0,i.jsx)(o.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=>(0,i.jsx)("div",{className:(0,a.Z)(eP.usefulGrid,{[eP.removed]:n.openedSection!==e.id}),children:e.useful.map((e,t)=>(0,i.jsxs)("a",{href:e.url,onClick:()=>T(u.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))]})]})})})},eB=(e,t,n)=>{var i,l,o,s,r,a,u;let d=(null==(l=null==(i=null==e?void 0:e.NAVIGATOR)?void 0:i.findIndex)?void 0:l.call(i,({id:e})=>"news"===e))||-1,p=(null==(s=null==(o=null==e?void 0:e.NAVIGATOR)?void 0:o[d])?void 0:s.content)||[];if(null!=(u=null==(a=null==(r=null==e?void 0:e.NAVIGATOR)?void 0:r[d])?void 0:a.content)&&u[0]&&Array.isArray(n)&&p.length){let i=n.map(({title:e,url:n})=>({title:e,url:(0,c.xn)(t||"",n),new:0}));e.NAVIGATOR[d].content[0].links=i}return[{id:"FINPRODUCTS",sections:Array.isArray(null==e?void 0:e.FINPRODUCTS)?null==e?void 0:e.FINPRODUCTS:[]},{id:"NAVIGATOR",sections:Array.isArray(null==e?void 0:e.NAVIGATOR)?null==e?void 0:e.NAVIGATOR:[]},{id:"ABOUT",sections:Array.isArray(null==e?void 0:e.ABOUT)?null==e?void 0:e.ABOUT:[]}]},eM=({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:g,className:f})=>{let _=ea(),x=(0,l.useMemo)(()=>eB(e,t,g),[e,t,g]),b=null==e?void 0:e.config,j=(0,l.useMemo)(()=>x.reduce((e,t)=>{var n;return e[t.id]=null==(n=t.sections[0])?void 0:n.id,e},{}),[x]),y=_.isAuth?"Личный кабинет":"Войти",$=m&&_.isHeaderTransparent,N=(e,t,n,i)=>()=>{e!==_.openedBlock?T(u.D.toggle,t,"on"):T(u.D.button,"menu_close","on");let l=n?j[e]:"";_.setOpenedBlock(e,l,!!i)},{start:k,clear:C}=Q(),O=(e,t,n,i)=>()=>{_.isNavigationOpen&&e===_.openedBlock||_.setIgnoreClicks(),k(N(e,t,n,i),200)},S=e=>()=>{_.ignoreClicks||e()},A=e=>_.openedBlock===e&&_.isNavigationOpen;return e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:_.headerRef,className:(0,a.Z)(h.header,f,{[h.transparent]:$}),children:(0,i.jsxs)("div",{ref:_.fixedContainerRef,className:(0,a.Z)(h.fixed,{[h.hidden]:_.isHeaderHidden,[h.navigationOpen]:_.isNavigationOpen}),children:[!!(null!=b&&b.appBannerUrl)&&v&&(0,i.jsx)(eT,{mobileAppUrl:b.appBannerUrl,minioUrl:n}),(0,i.jsxs)(s.W2,{className:h.container,children:[(0,i.jsxs)("div",{className:h.leftRow,children:[(0,i.jsx)(ex,{className:h.logo,href:t,eventActionType:u.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:_.navMenuItemsRef,className:h.menuItems,children:(0,i.jsx)("ul",{children:w.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(N(e,t,!0)),onMouseEnter:O(e,t,!0,!0),onMouseLeave:C})},e))})}),(0,i.jsx)(eu,{className:(0,a.Z)(h.tabletMenuButton,{[h.menuItemActive]:_.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,i.jsx)(o.IconFdsChevronDownO,{size:24}),onClick:N("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)(eu,{as:"a",href:d,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:`profile_${d}`,iconLeft:(0,i.jsx)(o.IconFdsUserO,{size:20})}),(0,i.jsx)(eu,{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)(o.IconFdsChatDotsCircleO,{size:24})})]}),(0,i.jsx)(eu,{className:h.menuButton,size:"xs",shape:$?"icon":"default",appearance:$?"ghost":"fill",label:"Меню",onClick:N("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,i.jsx)(o.IconFdsMenuSkewedO,{size:24})}),(0,i.jsxs)("div",{className:h.moreButtons,children:[(0,i.jsx)(e_,{initialTown:p}),(0,i.jsx)(eu,{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)(o.IconFdsChatDotsSquareAddO,{size:24}),children:"Онлайн чат"}),(0,i.jsx)(eu,{as:"a",href:d,size:"xs",eventActionText:y,eventLabel:`${y}_${d}`,label:y})]})]}),(0,i.jsxs)(ex,{className:h.auth,href:d,eventActionText:y,eventLabel:`${y}_${d}`,children:[(0,i.jsx)(eu,{size:"xs",shape:"circle-icon",iconLeft:(0,i.jsx)(o.IconFdsUserO,{}),eventActionText:y,eventLabel:`${y}_${d}`}),(0,i.jsx)("p",{children:y})]}),(0,i.jsx)("div",{className:h.close,children:(0,i.jsx)(eu,{className:h.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,i.jsx)(o.IconFdsCloseO,{}),onClick:()=>_.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})]})}),(0,i.jsx)("div",{className:(0,a.Z)(h.overlay,{[h.removed]:!_.isNavigationMounted,[h.overlayOpening]:_.isNavigationOpen,[h.overlayClosing]:!_.isNavigationOpen}),onClick:S(()=>_.setOpenedBlock(null))}),(0,i.jsx)(eU,{data:x,minioUrl:n})]}):null},eD=e=>(0,i.jsx)(ec,{isMainBannerPage:e.isMainBannerPage,children:(0,i.jsx)(eM,{...e})})},9007: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(7437),l=n(2265),o=n(3167),s=n(6094),r=n(3919),a=n(4887);let c=300,u=({opened:e})=>{let[t,n]=(0,l.useState)(!1),i=(0,l.useRef)(null),o=(0,l.useRef)(!1);return(0,l.useEffect)(()=>(e&&!o.current?(o.current=!0,n(!0)):!e&&o.current&&(i.current=setTimeout(()=>{o.current=!1,n(!1)},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,l.useRef)(null),a=(0,l.useCallback)(()=>{e&&(r.current=setTimeout(()=>{e()},s))},[s,e]),u=(0,l.useCallback)(e=>{"Escape"===e.key&&a()},[a]);return(0,l.useEffect)(()=>(n&&window.addEventListener("keydown",u),()=>{r.current&&clearTimeout(r.current),window.removeEventListener("keydown",u)}),[n,u]),(0,i.jsx)("div",{className:(0,o.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")},w=e=>{e.classList.toggle("scroll-disable-windows",!1),e.style.removeProperty("overflow"),e.style.removeProperty("height"),e.style.removeProperty("width"),e.style.removeProperty("top")},_=()=>{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,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,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&&w(l),e&&_(),h(i,!1)}return()=>{let e=!x();e&&w(l),e&&_()}},[e]),t},j=(0,r.g)("drawer-footer","sc"),y=Object.freeze({footer:`${j}__footer`,hasScroll:`${j}__footer--has-scroll`}),$=({footer:e,hasScroll:t,className:n})=>(0,i.jsx)("div",{className:(0,o.Z)(y.footer,{[y.hasScroll]:t},n),children:"function"==typeof e?e():e}),N=(0,r.g)("drawer-content","sc"),k=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 w=(0,l.useRef)(null),_=(0,l.useRef)(null),[x,b]=(0,l.useState)(!1);(0,l.useEffect)(()=>{var e;if(!_.current||!w.current)return;let t=(null==(e=null==_?void 0:_.current)?void 0:e.getBoundingClientRect().top)||0,n=null==w?void 0:w.current,i=()=>{let e=null==_?void 0:_.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:w,style:j,className:(0,o.Z)(k.container,{[k.open]:m,[k.close]:!m},h),children:[r||u?(0,i.jsxs)("div",{className:(0,o.Z)(k.header,{[k.rowHeader]:a}),children:[u?p?"function"==typeof p?p():p:(0,i.jsx)("button",{type:"button",className:k.controlContainer,onClick:e,children:(0,i.jsx)(s.IconFdsCloseO,{size:24})}):null,r?(0,i.jsx)("h3",{className:(0,o.Z)(k.title,{[k[c]]:!0}),children:r}):null]}):null,(0,i.jsx)("div",{ref:_,className:k.content,onClick:t,children:n}),d&&(0,i.jsx)($,{className:(0,o.Z)(k.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,l.useCallback)(e=>e.stopPropagation(),[]);return b(t&&s),(0,i.jsxs)("div",{"data-portal":!0,className:(0,o.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,o.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:w})=>{let[_,x]=(0,l.useState)(!1),[j,y]=(0,l.useState)(!1),[$,N]=(0,l.useState)(!0),[k,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,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,l.useEffect)(()=>{n&&setTimeout(()=>{x(!0),y(!0),C("0")},100),!n&&j&&(C("120%"),x(!1),y(!1))},[j,n]),b(n&&p),(0,i.jsxs)("div",{"data-portal":!0,className:(0,o.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,o.Z)(E.content,u&&E.contentFull,$&&E.contentTransition,$&&_&&E.contentTransitionOpen),ref:T,style:{transform:`translateY(${k})`},children:[(0,i.jsx)("div",{className:E.contentLine}),(0,i.jsxs)("div",{className:(0,o.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:w,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,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}},3919:function(e,t,n){n.d(t,{g:function(){return i}});function i(e,t){return`finkit-widgets-${t}-${e}`}},6692:function(e,t,n){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})}}},4354:function(e,t,n){n.d(t,{D:function(){return r},h:function(){return c}});var i,l=n(7816),o=n(915);let s=(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,o.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 o={event:"data-event",eventCategory:e,eventAction:a[t]+(0,l.t)(n)};void 0!==i&&(o.eventLabel=(0,l.t)("string"==typeof i?i:i.toString())),s(o)}},7816:function(e,t,n){n.d(t,{t:function(){return l}});let i={а:"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"},l=e=>e.replace(/[а-яё]/gi,e=>{let t=e.toLowerCase();return t in i?i[t]:e}).replaceAll(/[ \u00A0]/g,"_")}}]);