(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9715],{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 r}});var l=n(2265),s=n(69362);function r(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))}},30166:function(e,t,n){"use strict";n.d(t,{default:function(){return l.a}});var i=n(55775),l=n.n(i)},63515:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{cancelIdleCallback:function(){return i},requestIdleCallback:function(){return n}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},i="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},55775:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let i=n(47043);n(57437),n(2265);let l=i._(n(15602));function s(e,t){var n;let i={loading:e=>{let{error:t,isLoading:n,pastDelay:i}=e;return null}};"function"==typeof e&&(i.loader=e);let s={...i,...t};return(0,l.default)({...s,modules:null==(n=s.loadableGenerated)?void 0:n.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let i=n(18993);function l(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new i.BailoutToCSRError(t);return n}},15602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return c}});let i=n(57437),l=n(2265),s=n(81523),r=n(70049);function a(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(a(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},n=(0,l.lazy)(()=>t.loader().then(a)),c=t.loading;function u(e){let a=c?(0,i.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=t.ssr?(0,i.jsxs)(i.Fragment,{children:["undefined"==typeof window?(0,i.jsx)(r.PreloadCss,{moduleIds:t.modules}):null,(0,i.jsx)(n,{...e})]}):(0,i.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,i.jsx)(n,{...e})});return(0,i.jsx)(l.Suspense,{fallback:a,children:o})}return u.displayName="LoadableComponent",u}},70049:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return s}});let i=n(57437),l=n(20544);function s(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,l.getExpectedRequestStore)("next/dynamic css"),s=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));s.push(...t)}}return 0===s.length?null:(0,i.jsx)(i.Fragment,{children:s.map(e=>(0,i.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},38068:function(){},69696:function(){},76583:function(){},27565:function(){},86034:function(){},19801:function(){},10855:function(e,t,n){"use strict";n.d(t,{C:function(){return c}});var i=n(57437),l=n(80684),s=n(75461),r=n(61994);let a=(0,n(52074).g)("check-all","sc"),o=Object.freeze({wrapper:`${a}__wrapper`,link:`${a}__link`,icon:`${a}__icon`,iconGray:`${a}__icon--gray`}),c=({children:e,className:t,linkClassName:n,iconGrayBackground:a,Link:c,event:u,href:d,dataLayerPush:p})=>{let m=c??s.rU;return(0,i.jsx)("div",{className:(0,r.Z)(o.wrapper,t),onClick:()=>{u&&p(u)},children:(0,i.jsxs)(m,{className:(0,r.Z)(o.link,n),href:d,children:[e,(0,i.jsx)("span",{className:(0,r.Z)(o.icon,{[o.iconGray]:a}),children:(0,i.jsx)(l.IconFdsArrowUpRightSmallO,{size:24})})]})})}},22711:function(e,t,n){"use strict";n.d(t,{C:function(){return ed},H:function(){return e5}});var i=n(57437),l=n(2265),s=n(80684),r=n(35563),a=n(75461),o=n(61994),c=n(77337),u=n(6554),d=n(94246),p=n(55487),m=n(52074);let h=(0,m.g)("header","sc"),f=Object.freeze({header:`${h}`,fixed:`${h}__fixed`,hidden:`${h}__fixed--hidden`,transparent:`${h}--transparent`,navigationOpen:`${h}__navigation-open`,container:`${h}__container`,leftRow:`${h}__left-row`,logo:`${h}__logo`,menuItems:`${h}__menu-items`,menuItemActive:`${h}__menu-item-active`,tabletMenuButton:`${h}__tablet-menu-button`,buttonGroup:`${h}__button-group`,chips:`${h}__chips`,menuButton:`${h}__menu-button`,moreButtons:`${h}__more-buttons`,auth:`${h}__auth`,whiteIcons:`${h}__white-icons`,close:`${h}__close`,removed:`${h}__removed`,overlay:`${h}__overlay`,overlayOpening:`${h}__overlay--opening`,overlayClosing:`${h}__overlay--closing`}),g="user_region",v="user_town",w="cb-header",x=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],_=x.reduce((e,t)=>(e[t.id]=t.label,e),{}),b=Object.freeze({mobile:56,desktop:80}),j={userRegion:g,userTown:v,allRegions:"all_regions",lastRegionsUpdateUnixTimestamp:"lastRegionsUpdateUnixTimestamp",allRussiaSelected:"all_russia_selected"},y={userRegion:g,userTown:v,allRegions:"all_regions_new_api",lastRegionsUpdateUnixTimestamp:"lastRegionsUpdateUnixTimestamp_new_api",allRussiaSelected:"all_russia_selected"},k=(e=!1)=>e?y:j,C=(e=!1)=>e?window.allRegionsNewApi:window.allRegions,N=(e,t=!1)=>{if(t){window.allRegionsNewApi=e;return}window.allRegions=e},$=(e,t,n=!1)=>{if(typeof document>"u")return;let i=k(n);if(!e&&!t){p.a.removeItem(i.userRegion),p.a.removeItem(i.userTown);return}p.a.setItem(i.userRegion,JSON.stringify(e)||"",{"max-age":31536e3}),p.a.setItem(i.userTown,JSON.stringify(t)||"",{"max-age":31536e3})},T=e=>{if(typeof document>"u")return null;let t=p.a.getItem(e)??void 0;if(!t||"undefined"===t)return null;try{return JSON.parse(decodeURIComponent(t))}catch{return null}},O=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},I=(e=!1)=>{if(typeof window>"u")return[];let t=C(e);if(Array.isArray(t)&&t.length>0)return t;let n=O(k(e).allRegions)||[];return N(n,e),n},S=e=>e.some(e=>e.towns.some(e=>!!e.newId||!!e.fiasId)),A=(e,t=!1)=>!(e.length<1)&&(!t||S(e)),R=e=>{let t={};return e.map(({id:e,name:n,towns:i})=>(i.forEach(i=>{i.parentId=e,t[i.name]=t[i.name]||{},t[i.name][i.id]=n}),i)).reduce((e,n)=>(n.forEach(e=>{Object.keys(t[e.name]).length>1&&(e.parentName=t[e.name][e.id])}),[...e,...n]),[])},L=(e,t)=>`${e.replace(/\/+$/,"")}${t}`,E=e=>e?1:0,P=async e=>{try{return await (await fetch(e)).json()}catch(e){console.warn(e)}return null},M=(e,t=!1)=>{if(e.length<1)return;let n=k(t);N(e,t),window.localStorage.setItem(n.allRegions,JSON.stringify(e)),window.localStorage.setItem(n.lastRegionsUpdateUnixTimestamp,JSON.stringify(Date.now()))},z=(e,t)=>{let n=t.filter(e=>e.isActive).map(e=>({id:e.geoRegionId,name:e.name,name_r:e.nameR,name_p:e.nameP,url:e.url,region_id:e.geoRegionId,enabled:E(e.isActive),fiasId:e.fiasId,towns:[]})),i=n.reduce((e,t)=>(e[t.id]=t,e),{});return e.forEach(e=>{let t=i[e.geoRegionId];t&&t.towns.push({id:e.legacyId,name:e.name,name_r:e.nameR,name_p:e.nameP,url:e.url,main:E(e.isRegionalCenter),newId:e.id,fiasId:e.fiasId})}),n},B=(e,t,n)=>{let i=null,l=null;n&&e.some(e=>{let t=e.towns.find(e=>e.id===n.id)??null;return!!t&&(i=e,l=t,!0)});let s=t?e.find(e=>e.id===t.id)??null:null;return{region:i??s??t,town:l??n}},U=(e,t)=>(!!e||!!t)&&!(null!=e&&e.newId)&&!(null!=e&&e.fiasId)&&!(null!=t&&t.newId)&&!(null!=t&&t.fiasId),W=(e,t)=>!!(null!=e&&e.newId||null!=e&&e.fiasId||null!=t&&t.newId||null!=t&&t.fiasId),F=async()=>{let e=await P("https://finuslugi.ru/money_data/Root.json?short=1"),t=Array.isArray(null==e?void 0:e.regions)?e.regions:[];return M(t),t},D=async e=>{let[t,n]=await Promise.all([P(L(e,"/sc/api/v1/cities?all=true&isActive=true")),P(L(e,"/sc/api/v1/regions?all=true"))]);if(!Array.isArray(null==t?void 0:t.content)||!Array.isArray(null==n?void 0:n.content))return[];let i=z(t.content,n.content);return S(i)?(M(i,!0),i):[]},Z=async({showcaseUrl:e="",useNewCitiesApi:t=!1}={})=>t?D(e):F(),q=async e=>{let t=null;try{t=await (await fetch(`${e}`,{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},G=(e,t,n)=>{(0,u.h)({eventCategory:"finkit-widgets-sc-city-select",eventActionType:e,eventActionText:t,eventLabel:n})},V=(e,t,n)=>{if(typeof window>"u"||typeof document>"u")return;let i=document.getElementById("mainHomeBanner"),l=!1,s=0,r=0,a=()=>window.innerWidth<768,o=a(),c=()=>window.scrollY||document.documentElement.scrollTop,u=()=>{let e=document.querySelector(":root");e&&(r=parseFloat(window.getComputedStyle(e).getPropertyValue("--fixed-header-height")),s=c())},d=()=>{let e=a();e!==o&&(o=e,r=0)},p=function(){let a=c(),o=document.getElementById("headerNotice"),d=null==o?void 0:o.getAttribute("data-opening");if("true"===d)return;r||u();let p=a<r,m=a<((null==i?void 0:i.clientHeight)||0);if(n&&m||p){l=!1,e(!1),t(!0);return}e(l=a>s),l&&setTimeout(()=>t(!1),50);let h=l?"0px":"false"===d?`${r}px`:"";document.documentElement.style.setProperty("--new-header-height-desktop",h),document.documentElement.style.setProperty("--new-header-height-mobile",h),s=a<=0?0:a};return window.addEventListener("scroll",p),window.addEventListener("resize",d),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",d)}},H=()=>{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},J=()=>document.cookie.split(";").some(e=>e.trim().startsWith("utm_params=")),Q=(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}`},X=()=>{let e=H();e&&!J()&&Q("utm_params",e,90),e&&Q("utm_last",e,90)},Y=()=>{setTimeout(()=>{if(!(typeof document>"u"||"string"!=typeof document.cookie))try{X()}catch(e){console.error("UTM tracking error:",e)}},0)},K=(e,t,n)=>(0,u.h)({eventCategory:w,eventActionType:e,eventActionText:t,eventLabel:n}),ee=(0,m.g)("navigation-chips","sc"),et=Object.freeze({wrapper:`${ee}__wrapper`,gray:`${ee}__variantGray`,white:`${ee}__variantWhite`,container:`${ee}__container`,chip:`${ee}__chip`,more:`${ee}__chip--more`,active:`${ee}__chip--active`,label:`${ee}__label`,hidden:`${ee}__hidden`}),en=(0,m.g)("navigation-content","sc"),ei=Object.freeze({contentWrapper:`${en}__content-wrapper`,content:`${en}__content`,contentOpen:`${en}__content--open`,contentHeader:`${en}__content-header`,contentTitle:`${en}__content-title`,contentTitleUrl:`${en}__content-title--url`,contentTitleLink:`${en}__content-title--link`,contentTitleNew:`${en}__content-title--new`,new:`${en}__new`,newInline:`${en}__new-inline`,vip:`${en}__vip`,arrowIcon:`${en}__arrow-icon`,links:`${en}__links`,linksColumns:`${en}__links--columns`,linksTitleless:`${en}__links--titleless`,removed:`${en}__removed`,hidden:`${en}__content--hidden`}),el=({chip:e,hidden:t,onClick:n,refCallback:l,activeChipId:r})=>{let a=!!n,c=()=>{if(a)return null==n?void 0:n(e.url);K(u.D.chip,e.title,`${e.title}_${e.url}`)},d=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:et.label,children:e.title}),e.arrow&&(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{size:24})]}),p=(0,o.Z)(et.chip,{[et.hidden]:t,[ei.new]:!!e.new,[ei.vip]:!!e.vip,[et.active]:e.url===r});return a?(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})},es=({items:e=[],maxNumberOfLines:t,variant:n,className:r,activeChipId:a,onClick:c})=>{let d=(0,l.useRef)(null),p=(0,l.useRef)(null),m=(0,l.useRef)({}),[h,f]=(0,l.useState)(!1),[g,v]=(0,l.useState)(e.length),[w,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 _=(0,l.useCallback)(()=>{let n=d.current;if(!n)return;let i=e=>e?e.getBoundingClientRect().width:0,l=i(n),s=Math.max(Number(t)||0,0),r=()=>{v(e.length),x(!1)};if(h||0===s||l<=0){r();return}let a=(()=>{try{let e=getComputedStyle(n),t=parseFloat(e.columnGap||e.gap||"12");return Number.isNaN(t)?12:t}catch{return 12}})(),o=i(p.current),c=e.map(e=>i(m.current[e.url]));if(c.some(e=>0===e)){r();return}let u=1,f=0,g=0;for(let e of c){let t=u===s?o+a:0,n=0===f?e:f+a+e;if(n+t<=l-.5)f=n,g++;else{if(++u>s)break;f=e,g++}}x(g<e.length),v(g)},[h,e,t]);(0,l.useLayoutEffect)(()=>{let e=d.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(_)});return t.observe(e),requestAnimationFrame(_),()=>{t.disconnect()}},[_]),(0,l.useEffect)(()=>{requestAnimationFrame(_)},[_]);let b=h||(t??0)<=0||!w;return(0,i.jsx)("div",{className:(0,o.Z)(r,et.wrapper,{[et.gray]:"gray"===n,[et.white]:"white"===n}),children:(0,i.jsxs)("div",{ref:d,className:et.container,children:[e.map((e,t)=>(0,i.jsx)(el,{chip:e,hidden:!b&&t>=g,activeChipId:a,onClick:c,refCallback:t=>{m.current[e.url]=t}},e.url)),!b&&w&&(0,i.jsxs)("button",{type:"button",ref:p,className:(0,o.Z)(et.chip,et.more),onClick:()=>{K(u.D.chip,"Еще"),f(!0)},children:[(0,i.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,i.jsx)("span",{className:et.label,children:"Еще"})]}),(b||!w)&&(0,i.jsxs)("button",{type:"button",ref:p,className:(0,o.Z)(et.chip,et.more,et.hidden),tabIndex:-1,"aria-hidden":"true",children:[(0,i.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,i.jsx)("span",{className:et.label,children:"Еще"})]})]})})},er=I(),ea=R(er),eo={regions:er,towns:ea,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},ec=(0,l.createContext)(eo);function eu(){return(0,l.useContext)(ec)}let ed=({children:e,initialRegion:t,initialTown:n,showStartGeoPopup:s=!0,lastRegionsUpdateUnixTimestamp:r,dadataUrl:a="https://finuslugi.ru/backend/money/dadata",showcaseUrl:o="",useNewCitiesApi:c=!1})=>{let d=k(c),p=Number(O(d.lastRegionsUpdateUnixTimestamp)||0),m=Number(r||0)>p,[h,f]=(0,l.useState)(I(c)),g=(0,l.useRef)(h),[{startRegion:v,startTown:w},x]=(0,l.useState)({startRegion:eo.startRegion,startTown:eo.startTown}),_=t??eo.region,b=n??eo.town,[{region:j,town:y},C]=(0,l.useState)({region:_,town:b}),[N,S]=(0,l.useState)(eo.startPopupVisible),[L,E]=(0,l.useState)(eo.popupVisible),P=(0,l.useRef)(""),M=(0,l.useRef)(!1),z=(0,l.useMemo)(()=>R(h),[h]);(0,l.useEffect)(()=>{g.current=h},[h]);let F=(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)||""),S(!0),x({startRegion:e,startTown:t})},[S,x]),D=(0,l.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||F(e,t)},[F]),V=(0,l.useCallback)(()=>{if(P.current&&!j&&!y){let e=z.find(e=>e.name===P.current)??null;return D(h.find(t=>t.id===(null==e?void 0:e.parentId))??null,e)}D(j,y)},[j,y,z,h,D]),H=(0,l.useCallback)(e=>{E(e)},[E]),J=(0,l.useCallback)((e,t)=>{if(!e&&!t){window.localStorage.setItem(d.allRussiaSelected,"1"),window.localStorage.setItem(d.userRegion,""),window.localStorage.setItem(d.userTown,""),$(null,null,c);return}window.localStorage.setItem(d.allRussiaSelected,"0"),window.localStorage.setItem(d.userRegion,JSON.stringify(e)||""),window.localStorage.setItem(d.userTown,JSON.stringify(t)||""),$(e||null,t||null,c)},[d,c]),Q=(0,l.useCallback)(e=>{e?G(u.D.icon,"location"):G(u.D.button,(null==y?void 0:y.name)||"Вся Россия"),!s||window.sessionStorage.getItem("start_popup_opened")?H(!0):V()},[s,y,H,V]),X=(0,l.useCallback)((e,t)=>{J(e,t),C({region:e||null,town:t||null}),S(!1),H(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[H,J]),Y=()=>{let e=T(d.userRegion)??O(d.userRegion),t=T(d.userTown)??O(d.userTown),n=B(g.current,e,t),i=c&&U(e,t);i&&(M.current=!0),i&&W(n.region,n.town)&&(J(n.region,n.town),M.current=!1),C(n);let l=async({coords:{latitude:e,longitude:t}})=>{let n=`${a}?lat=${e}&lon=${t}`,i=await q(n);null!=i&&i.location&&(P.current=i.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&s)try{navigator.geolocation.getCurrentPosition(l,()=>null)}catch{}};return(0,l.useEffect)(()=>{(!A(h,c)||m)&&Z({showcaseUrl:o,useNewCitiesApi:c}).then(e=>{e.length<1||f(e)})},[]),(0,l.useEffect)(()=>{if(!c)return;let e=B(h,j,y);M.current&&W(e.region,e.town)&&(J(e.region,e.town),M.current=!1),C(e)},[h,j,J,y,c]),(0,l.useEffect)(()=>{if(window.innerWidth<1024){let e=()=>{Y(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{Y()},0)},[]),(0,i.jsx)(ec.Provider,{value:{regions:h,towns:z,region:j,town:y,startPopupVisible:N,setStartPopupVisible:S,popupVisible:L,handleToggleModal:H,selectCity:X,handleButtonClick:Q,startRegion:v,startTown:w},children:e})},ep=()=>{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}},em=(0,m.g)("city-select-modal-body","sc"),eh=Object.freeze({wrapper:`${em}__wrapper`,subtitle:`${em}__subtitle`,hintWrapper:`${em}__hint-wrapper`,hintText:`${em}__hint-text`,input:`${em}__input`,chips:`${em}__chips`,townsListWrapper:`${em}__towns-list-wrapper`,townsList:`${em}__towns-list`,townsGroup:`${em}__towns-group`,townsGroupLabel:`${em}__towns-group-label`,townsGroupList:`${em}__towns-group-list`,townsName:`${em}__towns-name`,regionName:`${em}__region-name`}),ef=({groupedTowns:e,chips:t,query:n,setQuery:r,isDrawer:o})=>{var c;let d=eu(),p=(0,l.useRef)(null),[m,h]=(0,l.useState)("10000px");(0,l.useEffect)(()=>{if(!o||!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),r=s.reduce((e,t,n)=>t<s[e]?n:e,0);0===r&&l[0].push(l[1].shift()),2===r&&l[2].unshift(l[1].pop()),1===r&&s[0]>s[2]&&l[1].unshift(l[0].pop()),1===r&&s[0]<s[2]&&l[1].push(l[2].shift());let a=Math.max(...l.map(e));return a>=i?i:t(l,a)};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 f=e=>{if(G(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:eh.wrapper,children:[(0,i.jsxs)("div",{className:eh.subtitle,children:["Покажем предложения рядом с вами",(0,i.jsxs)("div",{className:eh.hintWrapper,children:[(0,i.jsx)(s.IconFdsQuestionCircleO,{size:24}),(0,i.jsx)("div",{className:eh.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,i.jsx)(a.MA,{className:eh.input,value:n,onChange:r,size:"s",placeholder:"Введите название города",icon:n?(0,i.jsx)(s.IconFdsCloseCircleO,{size:24,onClick:()=>r("")}):(0,i.jsx)(s.IconFdsSearchO,{size:24})}),(0,i.jsx)(a.cL,{className:eh.chips,chips:t,value:(null==(c=d.town)?void 0:c.id)||0,onChipClick:e=>{f(d.towns.find(t=>t.id===e))}}),(0,i.jsx)("div",{className:eh.townsListWrapper,children:(0,i.jsx)("div",{ref:p,className:eh.townsList,style:{maxHeight:m},children:e.map(e=>(0,i.jsxs)("div",{className:eh.townsGroup,children:[(0,i.jsx)("div",{className:eh.townsGroupLabel,children:e.letter}),(0,i.jsx)("div",{className:eh.townsGroupList,children:e.towns.map(e=>(0,i.jsxs)("button",{type:"button",onClick:()=>f(e),children:[(0,i.jsx)("div",{className:eh.townsName,children:e.name}),(0,i.jsx)("div",{className:eh.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},eg=[1095,1096,134,720,189,180],ev=()=>{var e;let t=eu(),n=(0,a._m)("l"),[s,r]=(0,l.useState)(""),o=`Ваш выбор: ${(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:"Вся Россия"},...eg.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=()=>{G(u.D.button,"close"),t.handleToggleModal(!1)};return(0,i.jsxs)(d.P,{children:[!n&&(0,i.jsx)(d.U,{title:o,isOpen:t.popupVisible,onClose:m,full:!0,children:(0,i.jsx)(ef,{groupedTowns:c,chips:p,query:s,setQuery:r})}),n&&(0,i.jsx)(d.D,{title:o,isOpen:t.popupVisible,onClose:m,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,i.jsx)(ef,{groupedTowns:c,chips:p,query:s,setQuery:r,isDrawer:!0})})]})},ew={"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"},ex=()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(ew,e)?ew[e]:ew["finuslugi.ru"]},e_=(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)},eb=()=>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)}})}),ej=()=>{let[e,t]=(0,l.useState)(!1),[n,i]=(0,l.useState)(!1),s=(0,l.useRef)(!1),r=e=>{s.current=e,i(e)};return(0,l.useEffect)(()=>{if(typeof window>"u")return;let e=ex(),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,a)=>{if(s.current){a(Error("chat is already opened"));return}i?(i.openWidget(),t(!1),l()):(r(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;i=e;let s=document.querySelector(".webchat");s&&eb().observe(s,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=i.closeWidget),null==i||i.openWidget(),r(!1),t(!1),l()},e_(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}},ey=(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 ek(){return(0,l.useContext)(ey)}let eC=e=>{let[t,n]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[a,o]=(0,l.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p}=ej(),[m,h]=(0,l.useState)(null),[f,g]=(0,l.useState)(null),[v,w]=(0,l.useState)(!1),[x,_]=(0,l.useState)(!1),[b,j]=(0,l.useState)(!1),y=(0,l.useRef)(null),k=(0,d.u)(v),C=(0,l.useRef)(null),N=(0,l.useRef)(null),$=(0,l.useRef)(null),T=(0,l.useRef)(null),O=(0,l.useCallback)(()=>{k.current&&k.current.scrollTo({top:0})},[k]),I=(0,l.useCallback)(e=>{g(e),O()},[O]),S=(0,l.useCallback)(e=>{C.current&&clearTimeout(C.current),e&&_(!0),e||(C.current=setTimeout(()=>{_(!1),I(null)},300))},[I]),A=(0,l.useCallback)((e,t,n)=>{if(t&&I(t),!n&&e===m||!e){S(!v),w(!v);return}h(e),S(!0),w(!0)},[m,I,v,S]),R=(0,l.useCallback)(()=>{N.current&&clearTimeout(N.current),j(!0),N.current=setTimeout(()=>{j(!1)},650)},[]);return(0,l.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id"));let t=V(r,o,e.isMainBannerPage);return Y(),t},[]),(0,i.jsx)("header",{children:(0,i.jsx)(ey.Provider,{value:{isAuth:t,isHeaderHidden:s,isHeaderTransparent:a,openedBlock:m,setOpenedBlock:A,openedSection:f,setOpenedSection:I,isNavigationOpen:v,isNavigationMounted:x,navMenuItemsRef:y,navigationRef:k,ignoreClicks:b,setIgnoreClicks:R,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p,fixedContainerRef:$,headerRef:T},children:e.children})})},eN=({label:e,onClick:t,eventActionText:n,eventLabel:l,...s})=>(0,i.jsx)(a.zx,{label:e,onClick:e=>{null==t||t(e),(0,u.h)({eventCategory:w,eventActionType:u.D.button,eventActionText:n||"",eventLabel:l||""})},...s}),e$=(0,m.g)("header-popup","sc"),eT=Object.freeze({popup:`${e$}__popup`,popupHeader:`${e$}__popup-header`,popupClose:`${e$}__popup-close`,body:`${e$}__body`}),eO=({isOpen:e,onClose:t,children:n,title:l})=>{let r=(0,a._m)("l");return(0,i.jsxs)(d.P,{children:[!r&&(0,i.jsx)(d.U,{title:l,isOpen:e,onClose:t,children:n}),r&&e&&(0,i.jsxs)("div",{className:eT.popup,children:[(0,i.jsxs)("div",{className:eT.popupHeader,children:[l,(0,i.jsx)(eN,{className:eT.popupClose,iconLeft:(0,i.jsx)(s.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:t,eventActionText:"IconFdsCloseO"})]}),(0,i.jsx)("div",{className:eT.body,children:n})]})]})},eI=(0,m.g)("start-choice-popup","sc"),eS=Object.freeze({top:`${eI}__top`,progress:`${eI}__progress`,innerCircle:`${eI}__inner-circle`,title:`${eI}__title`,subtitle:`${eI}__subtitle`,actions:`${eI}__actions`}),eA=()=>{var e,t;let n=eu(),[s,r]=(0,l.useState)(10),[a,o]=(0,l.useState)(0),c=(0,l.useRef)(void 0),d=()=>{G(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((" "+s).slice(1)),t=1e3*e/100,n=0,i=0;c.current=setInterval(()=>{n++,i+=t,o(3.6*n);let l=e-Math.floor(i/1e3);l<s&&r(l),100===n&&(clearInterval(c.current),d())},t)})():(clearInterval(c.current),r(10),o(0))},[n.startPopupVisible]),(0,i.jsxs)(eO,{isOpen:n.startPopupVisible,onClose:d,title:(0,i.jsx)("button",{type:"button",className:eS.progress,style:{background:`conic-gradient(#ff0508 ${a}deg, #e3e7ec 0deg)`},onClick:d,children:(0,i.jsx)("div",{className:eS.innerCircle,children:s})}),children:[(0,i.jsxs)("div",{className:eS.top,children:[(0,i.jsxs)("div",{className:eS.title,children:["Ваш город ",(null==(e=n.startTown)?void 0:e.name)||(null==(t=n.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,i.jsx)("div",{className:eS.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,i.jsxs)("div",{className:eS.actions,children:[(0,i.jsx)(eN,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{G(u.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,i.jsx)(eN,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{G(u.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},eR=(0,m.g)("city-select","sc"),eL=Object.freeze({button:`${eR}__button`,minimal:`${eR}__minimal`,full:`${eR}__full`}),eE=({initialTown:e})=>{var t;let n=eu(),r=(null==(t=n.town)?void 0:t.name)||e||"Вся Россия",{setIsChatModalOpen:c,isChatModalOpen:u}=ek(),{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 f={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)(a.zx,{...f,className:(0,o.Z)(eL.button,eL.full),label:r}),(0,i.jsx)(a.zx,{...f,className:(0,o.Z)(eL.button,eL.minimal),shape:"icon"}),(0,i.jsx)(ev,{}),(0,i.jsx)(eA,{})]})},eP=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:l,...s})=>(0,i.jsx)(a.rU,{onClick:i=>{null==e||e(i),(0,u.h)({eventCategory:w,eventActionType:t||u.D.link,eventActionText:n||"",eventLabel:l||""})},...s}),eM=(0,m.g)("header-mobile-app-banner","sc"),ez=Object.freeze({wrapper:`${eM}__wrapper`,container:`${eM}__container`,closeButton:`${eM}__close-button`,innerWrapper:`${eM}__inner-wrapper`,imageWrapper:`${eM}__image-wrapper`,image:`${eM}__image`,title:`${eM}__title`,description:`${eM}__description`,callToAction:`${eM}__call-to-action`,scanQr:`${eM}__scan-qr`}),eB=Object.freeze({mobile:56,desktop:68}),eU="headerBannerShownAt",eW=()=>{let e=localStorage.getItem(eU);if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},eF=()=>{localStorage.setItem(eU,new Date().toISOString())},eD=()=>{let e=eW();return!e||Math.floor((e.getTime()-new Date().getTime())/864e5)>5},eZ=({minioUrl:e,className:t,mobileAppUrl:n})=>{let{fixedContainerRef:d,headerRef:p}=ek(),[m,h]=(0,l.useState)(!1),[f,g]=(0,l.useState)(!1),[v,w]=(0,l.useState)(!1),x=(0,l.useCallback)((e="desktop")=>{let t=d.current;t&&(t.style.transform="translateY(0)",document.documentElement.style.setProperty("--fixed-header-height",`${eB[e]+b[e]}px`),document.documentElement.style.setProperty("--new-header-height-desktop",`${eB.desktop+b.desktop}px`),document.documentElement.style.setProperty("--new-header-height-mobile",`${eB.mobile+b.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-mobile",`${eB.mobile+b.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-desktop",`${eB.desktop+b.desktop}px`),document.documentElement.style.setProperty("--header-height",`${eB[e]+108}px`))},[]),_=(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=()=>{f&&h(!1),w(!1)};return e.addEventListener("transitionend",t),()=>{e.removeEventListener("transitionend",t)}},[f]),(0,l.useEffect)(()=>{eD()&&h(!0)},[]),(0,l.useEffect)(()=>{let e=window.innerWidth<768;m&&(x(e?"mobile":"desktop"),window.matchMedia("(prefers-reduced-motion: reduce)").matches?h(!0):w(!0));let t=()=>{if(!m)return null;x(window.innerWidth<768?"mobile":"desktop")};return window.addEventListener("resize",t),()=>{_(),window.removeEventListener("resize",t)}},[m,x,_]),m?(0,i.jsx)("div",{id:"headerNotice",role:"region","aria-label":"Мобильное приложение","data-opening":v,className:(0,o.Z)(ez.wrapper,t),children:(0,i.jsx)(r.W2,{children:(0,i.jsxs)("div",{className:ez.container,children:[(0,i.jsxs)("div",{className:ez.innerWrapper,children:[(0,i.jsxs)("picture",{className:ez.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:ez.image,src:(0,c.xn)(e,"/logo/finuslugi/default-regular.svg")})]}),(0,i.jsxs)("div",{className:ez.scanQr,children:[(0,i.jsx)("div",{className:ez.title,children:"Скачайте приложение Финуслуги"}),(0,i.jsx)("div",{className:ez.description,children:"Сканируйте QR-код"})]}),(0,i.jsxs)("div",{className:ez.callToAction,children:[(0,i.jsxs)("div",{children:["Приложение",(0,i.jsx)("br",{}),"Финуслуги"]}),(0,i.jsx)(a.zx,{onClick:()=>{K(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:ez.closeButton,onClick:()=>{eF(),_(),window.matchMedia("(prefers-reduced-motion: reduce)").matches?h(!1):g(!0)},children:(0,i.jsx)(s.IconFdsCloseO,{size:"100%"})})]})})}):null},eq=(0,m.g)("header-chat-modal-body","sc"),eG=Object.freeze({wrapper:`${eq}__wrapper`,cardButton:`${eq}__card-button`,card:`${eq}__card`,cardTitle:`${eq}__card-title`,cardSubtitle:`${eq}__card-subtitle`,button:`${eq}__button`}),eV=()=>{let e=ek();return(0,i.jsxs)("div",{className:eG.wrapper,children:[(0,i.jsx)(eN,{className:eG.cardButton,variant:"secondary",pending:e.isChatLoading,onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},eventActionText:"Напишите в чат",children:(0,i.jsxs)(r.Zb,{className:eG.card,variant:"secondary",children:[(0,i.jsxs)("div",{className:eG.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:eG.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,i.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),!1]})},eH=({data:e,isMobile:t})=>{let n=ek();return(0,i.jsx)("div",{className:ei.contentWrapper,children:e.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>{var l;return(0,i.jsxs)("div",{className:(0,o.Z)(ei.content,{[ei.hidden]:n.openedSection!==e.id,[ei.contentOpen]:!!n.openedSection}),children:[(0,i.jsx)("div",{className:ei.contentHeader,children:(0,i.jsx)("label",{children:e.title})}),null==(l=e.content)?void 0:l.map((n,l)=>{var r,a;return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:(0,i.jsx)("a",{className:(0,o.Z)(ei.contentTitle,{[ei.removed]:!n.title,[ei.contentTitleUrl]:!!n.url,[ei.contentTitleLink]:!!e.isSeeAllLinkAvailable,[ei.contentTitleNew]:!!n.new}),href:e.isSeeAllLinkAvailable?n.url:void 0,children:(0,i.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,i.jsx)("div",{className:ei.arrowIcon,children:(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{})}),n.title]})})}),!(null!=(r=n.links)&&r.length)&&(0,i.jsx)(es,{items:n.chips||[],maxNumberOfLines:e.content.length<=1?99:t?3:2}),!!(null!=(a=n.links)&&a.length)&&(0,i.jsx)("div",{className:(0,o.Z)(ei.links,{[ei.linksColumns]:!!n.columns,[ei.linksTitleless]:!n.title}),children:n.links.map(e=>(0,i.jsxs)("a",{href:e.url,onClick:()=>K(u.D.link,e.title,`${e.title}_${e.url}`),children:[(0,i.jsx)("div",{className:ei.arrowIcon,children:(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{})}),(0,i.jsxs)("span",{children:[(0,i.jsx)("span",{children:e.title}),!!e.new&&(0,i.jsx)("span",{className:(0,o.Z)({[ei.newInline]:!!e.new})})]})]},e.url))})]},`${n.url}_${l}`)})]},e.id)})},e.id))})},eJ=(0,m.g)("navigation-section-icon","sc"),eQ=Object.freeze({icon:`${eJ}`}),eX=({name:e,background:t})=>{let n=(0,l.useMemo)(()=>e&&s[e]||null,[e]);return e&&n?(0,i.jsx)("div",{className:eQ.icon,style:{background:t},children:(0,i.jsx)(n,{})}):null},eY=(0,m.g)("navigation","sc"),eK=Object.freeze({navigation:`${eY}`,navigationOpening:`${eY}--opening`,navigationClosing:`${eY}--closing`,wrapper:`${eY}__wrapper`,container:`${eY}__container`,containerOpen:`${eY}__container--open`,sections:`${eY}__sections`,sectionsOpen:`${eY}__sections--open`,citySelectButton:`${eY}__city-select-button`,sectionsTitle:`${eY}__sections-title`,sectionsWrapper:`${eY}__sections-wrapper`,section:`${eY}__section`,sectionArrow:`${eY}__section-arrow`,sectionExtra:`${eY}__section--extra`,sectionActive:`${eY}__section--active`,sectionTitle:`${eY}__section-title`,chatWrapper:`${eY}__chat-wrapper`,chatHeader:`${eY}__chat-header`,backButton:`${eY}__back-button`,useful:`${eY}__useful`,usefulOpen:`${eY}__useful--open`,usefulTitle:`${eY}__useful-title`,usefulGrid:`${eY}__useful-grid`,removed:`${eY}__removed`}),e0=({data:e})=>{var t;let n=ek(),c=eu(),d=(0,a.aF)("m"),[p,m]=(0,l.useState)(!0);(0,l.useEffect)(()=>{m(d)},[d]);let h=(0,l.useRef)(null),f=(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),v=(0,l.useRef)(null),w=(0,l.useCallback)(()=>{p&&(g.current=!0,v.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),f()},window.history.pushState(null,"",window.location.href))},[f,p]),x=(0,l.useCallback)(()=>{g.current=!1,window.onpopstate=v.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),k=(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)(()=>{k(n.isNavigationOpen),n.isNavigationOpen&&!g.current&&w(),!n.isNavigationOpen&&g.current&&x()},[n.isNavigationOpen]);let C=(e,t)=>()=>{K(u.D.button,t),n.setOpenedSection(e)},{start:N,clear:$}=ep(),T=(e,t)=>()=>{p||N(C(e,t),150)},O=()=>{p||$()};return(0,i.jsx)("div",{ref:n.navigationRef,className:(0,o.Z)(eK.navigation,{[eK.removed]:!n.isNavigationMounted,[eK.navigationOpening]:n.isNavigationOpen,[eK.navigationClosing]:!n.isNavigationOpen}),children:(0,i.jsx)("div",{className:eK.wrapper,children:(0,i.jsxs)(r.W2,{className:(0,o.Z)(eK.container,{[eK.containerOpen]:!!n.openedSection}),children:[(0,i.jsxs)("div",{className:(0,o.Z)(eK.sections,{[eK.sectionsOpen]:!!n.openedSection}),children:[(0,i.jsx)(a.zx,{className:eK.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,o.Z)(eK.sectionsWrapper,{[eK.removed]:n.openedBlock!==e.id&&!p}),children:[(0,i.jsx)("div",{className:eK.sectionsTitle,children:_[e.id]}),e.sections.map(e=>(0,i.jsxs)("li",{className:(0,o.Z)(eK.section,{[eK.sectionExtra]:!!e.extra,[eK.sectionActive]:n.openedSection===e.id}),onClick:C(e.id,e.title),onMouseEnter:T(e.id,e.title),onMouseLeave:O,children:[(0,i.jsx)(eX,{name:e.uikitIcon,background:e.uikitIconBg}),(0,i.jsx)("span",{className:eK.sectionTitle,children:e.title}),(0,i.jsx)("div",{className:eK.sectionArrow,children:(0,i.jsx)(s.IconFdsChevronRightSmallO,{size:24})})]},e.id))]},e.id)),(0,i.jsxs)("div",{className:eK.chatWrapper,children:[(0,i.jsx)("div",{className:eK.chatHeader,children:"Нужна помощь?"}),(0,i.jsx)(eV,{})]})]}),(0,i.jsxs)("button",{type:"button",className:(0,o.Z)(eK.backButton,{[eK.removed]:!n.openedSection}),onClick:()=>{K(u.D.button,"Назад"),n.setOpenedSection(null)},children:[(0,i.jsx)(s.IconFdsChevronLeftO,{size:24}),(0,i.jsx)("span",{children:"Назад"})]}),(0,i.jsx)(eH,{data:e,isMobile:p}),(0,i.jsxs)("div",{className:(0,o.Z)(eK.useful,{[eK.usefulOpen]:!!n.openedSection}),children:[(0,i.jsx)("div",{className:eK.usefulTitle,children:"Полезное на Финуслугах"}),e.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>{var t;return(0,i.jsx)("div",{className:(0,o.Z)(eK.usefulGrid,{[eK.removed]:n.openedSection!==e.id}),children:null==(t=e.useful)?void 0:t.map((e,t)=>(0,i.jsxs)("a",{href:e.url,onClick:()=>K(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))]})]})})})},e1=(e,t,n)=>{var i,l,s,r,a,o,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==(r=null==(s=null==e?void 0:e.NAVIGATOR)?void 0:s[d])?void 0:r.content)||[];if(null!=(u=null==(o=null==(a=null==e?void 0:e.NAVIGATOR)?void 0:a[d])?void 0:o.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:[]}]},e2=({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:h=!1,news:g,className:v})=>{let w=ek(),_=(0,l.useMemo)(()=>e1(e,t,g),[e,t,g]),b=null==e?void 0:e.config,j=(0,l.useMemo)(()=>_.reduce((e,t)=>{var n;return e[t.id]=null==(n=t.sections[0])?void 0:n.id,e},{}),[_]),y=w.isAuth?"Личный кабинет":"Войти",k=m&&w.isHeaderTransparent,C=(e,t,n,i)=>()=>{e!==w.openedBlock?K(u.D.toggle,t,"on"):K(u.D.button,"menu_close","on");let l=n?j[e]:"";w.setOpenedBlock(e,l,!!i)},{start:N,clear:$}=ep(),T=(e,t,n,i)=>()=>{w.isNavigationOpen&&e===w.openedBlock||w.setIgnoreClicks(),N(C(e,t,n,i),200)},O=e=>()=>{w.ignoreClicks||e()},I=e=>w.openedBlock===e&&w.isNavigationOpen;return e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:w.headerRef,className:(0,o.Z)(f.header,v,{[f.transparent]:k}),children:(0,i.jsxs)("div",{ref:w.fixedContainerRef,className:(0,o.Z)(f.fixed,{[f.hidden]:w.isHeaderHidden,[f.navigationOpen]:w.isNavigationOpen}),children:[!!(null!=b&&b.appBannerUrl)&&h&&(0,i.jsx)(eZ,{mobileAppUrl:b.appBannerUrl,minioUrl:n}),(0,i.jsxs)(r.W2,{className:f.container,children:[(0,i.jsxs)("div",{className:f.leftRow,children:[(0,i.jsx)(eP,{className:f.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:w.navMenuItemsRef,className:f.menuItems,children:(0,i.jsx)("ul",{children:x.map(({id:e,label:t})=>(0,i.jsx)("li",{children:(0,i.jsx)(a.zx,{className:(0,o.Z)({[f.menuItemActive]:I(e)}),label:t,variant:"white",size:"xs",onClick:O(C(e,t,!0)),onMouseEnter:T(e,t,!0,!0),onMouseLeave:$})},e))})}),(0,i.jsx)(eN,{className:(0,o.Z)(f.tabletMenuButton,{[f.menuItemActive]:w.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,i.jsx)(s.IconFdsChevronDownO,{size:24}),onClick:C("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,i.jsxs)("div",{className:(0,o.Z)(f.buttonGroup,{[f.whiteIcons]:(null==b?void 0:b.iconColorOnMobileMainBanner)==="white"}),children:[(0,i.jsxs)("div",{className:f.chips,children:[(0,i.jsx)(eN,{as:"a",href:d,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:`profile_${d}`,iconLeft:(0,i.jsx)(s.IconFdsUserO,{size:20})}),(0,i.jsx)(eN,{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)(eN,{className:f.menuButton,size:"xs",shape:k?"icon":"default",appearance:k?"ghost":"fill",label:"Меню",onClick:C("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,i.jsx)(s.IconFdsMenuSkewedO,{size:24})}),(0,i.jsxs)("div",{className:f.moreButtons,children:[(0,i.jsx)(eE,{initialTown:p}),(0,i.jsx)(eN,{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)(eN,{as:"a",href:d,size:"xs",eventActionText:y,eventLabel:`${y}_${d}`,label:y})]})]}),(0,i.jsxs)(eP,{className:f.auth,href:d,eventActionText:y,eventLabel:`${y}_${d}`,children:[(0,i.jsx)(eN,{size:"xs",shape:"circle-icon",iconLeft:(0,i.jsx)(s.IconFdsUserO,{}),eventActionText:y,eventLabel:`${y}_${d}`}),(0,i.jsx)("p",{children:y})]}),(0,i.jsx)("div",{className:f.close,children:(0,i.jsx)(eN,{className:f.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,i.jsx)(s.IconFdsCloseO,{}),onClick:()=>w.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})]})}),(0,i.jsx)("div",{className:(0,o.Z)(f.overlay,{[f.removed]:!w.isNavigationMounted,[f.overlayOpening]:w.isNavigationOpen,[f.overlayClosing]:!w.isNavigationOpen}),onClick:O(()=>w.setOpenedBlock(null))}),(0,i.jsx)(e0,{data:_,minioUrl:n})]}):null},e5=e=>(0,i.jsx)(eC,{isMainBannerPage:e.isMainBannerPage,children:(0,i.jsx)(e2,{...e})})},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})}}},16715:function(e,t,n){"use strict";n.d(t,{CookiesPlate:function(){return u}});var i=n(57437),l=n(2265),s=n(80684),r=n(61994),a=n(55487);let o=(0,n(52074).g)("cookies-plate","sc"),c=Object.freeze({wrapper:"".concat(o,"__wrapper"),contentWrapper:"".concat(o,"__content-wrapper"),visible:"".concat(o,"--visible"),hidden:"".concat(o,"--hidden"),content:"".concat(o,"__content"),text:"".concat(o,"__text"),link:"".concat(o,"__link"),button:"".concat(o,"__button")}),u=e=>{let{className:t,mountDelay:n=3e3,href:o="https://assets.finuslugi.ru/mp-assets/user-agreement.pdf",children:u,closeIcon:d,onMount:p,onLinkClick:m,onClose:h,mountAfterScroll:f=!0}=e,[g,v]=(0,l.useState)(!1),[w,x]=(0,l.useState)(!1),[_,b]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let e=()=>{document.removeEventListener("scroll",e),a.a.getItem("Allow-Cookie")||(b(!0),setTimeout(()=>{v(!0),null==p||p()},n))};return f?document.addEventListener("scroll",e):e(),()=>document.removeEventListener("scroll",e)},[]);let j=(0,l.useCallback)(()=>{a.a.setItem("Allow-Cookie","1"),x(!0),null==h||h(),setTimeout(()=>b(!1),1e3)},[h]);return _?(0,i.jsx)("div",{className:c.wrapper,children:(0,i.jsx)("div",{className:(0,r.Z)(c.contentWrapper,{[c.visible]:g,[c.hidden]:w}),children:(0,i.jsxs)("div",{className:(0,r.Z)(t,c.content),children:[u||(0,i.jsxs)("p",{className:c.text,children:["Мы используем"," ",(0,i.jsx)("a",{className:c.link,href:o,target:"_blank",rel:"noreferrer",onClick:m,children:"cookie"})," ","для лучшей работы сайта"]}),(0,i.jsx)("button",{className:c.button,onClick:j,children:d||(0,i.jsx)(s.IconFdsCloseO,{})})]})})}):(0,i.jsx)(i.Fragment,{})}},59226:function(e,t,n){"use strict";n.d(t,{C:function(){return x}});var i=n(57437),l=n(2265),s=n(35563),r=n(75461),a=n(61994),o=n(31620),c=n(10855),u=n(52074);let d=(0,u.g)("faq-block","sc"),p=Object.freeze({faqBlock:d,titleWrapper:`${d}__title-wrapper`,title:`${d}__title`,accordionWrapper:`${d}__accordion-wrapper`,accordionItems:`${d}__accordion-items`,accordionItemGray:`${d}__accordion-item--gray`,accordionItemContent:`${d}__accordion-item-content`,accordionActiveItemContent:`${d}__accordion-item-content--active`,states:{primary:`${d}--primary`,secondary:`${d}--secondary`,gray:`${d}--gray`}}),m=e=>{e.data.forEach((t,n)=>{"header"===t.type&&(e.headerBlocksCount++,3===e.headerBlocksCount&&("banner"===e.data[n-1].type&&(e.banner=e.data.splice(n-1,1)),"banner"===e.data[n+1].type&&(e.banner=e.data.splice(n+1,1))),e.banner&&4===e.headerBlocksCount&&e.data.splice(n,0,e.banner[0]))})},h=(0,u.g)("faq-content-block","sc"),f=Object.freeze({contentBlocks:`${h}__content-blocks`,blockLink:`${h}__block-link`,keynoteWrapper:`${h}__keynote-wrapper`,keynote:`${h}__keynote`,annotation:`${h}__annotation`,contentTableWrapper:`${h}__content-table-wrapper`}),g=({className:e,data:t})=>{if(!Array.isArray(t))return null;let n=(()=>{let e=[],n=1,l={data:t,headerBlocksCount:0,banner:[]};m(l),m(l);let s={},r=e=>{var t,n,i,l;let r=(null==(t=e.data)?void 0:t.text)??(null==(n=e.data)?void 0:n.url)??(null==(i=e.data)?void 0:i.html)??(null!=(l=e.data)&&l.year?String(e.data.year):"");return s[e.type]=(s[e.type]??0)+1,`${e.type}-${String(r).slice(0,80)}-${s[e.type]}`};return t.forEach(t=>{let l=r(t);switch(t.type){case"header":e.push((0,i.jsx)("h2",{id:`content_header_${n}`,role:"header",children:t.data.text||""},l)),n++;break;case"sub_header":e.push((0,i.jsx)("h3",{role:"sub-header",children:t.data.text||""},l));break;case"paragraph":e.push((0,i.jsx)("div",{dangerouslySetInnerHTML:{__html:t.data.text||""},role:"paragraph"},l));break;case"link":e.push((0,i.jsx)("div",{className:f.blockLink,children:(0,i.jsx)("a",{target:"_blank",href:t.data.url||"",role:"link",rel:"noreferrer",children:t.data.text||""})},l));break;case"dossier":e.push((0,i.jsxs)("div",{children:[(0,i.jsx)("span",{role:"dossier-year",children:t.data.year||""}),(0,i.jsx)("div",{dangerouslySetInnerHTML:{__html:t.data.text||""},role:"dossier-text"})]},l));break;case"html":e.push((0,i.jsx)("div",{dangerouslySetInnerHTML:{__html:t.data.html||""},role:"html"},l));break;case"annotation":e.push((0,i.jsx)("div",{className:f.annotation,dangerouslySetInnerHTML:{__html:t.data.text||""},role:"annotation"},l));break;case"company-annotation":e.push((0,i.jsx)("div",{dangerouslySetInnerHTML:{__html:t.data.text||""},role:"company-annotation"},l));break;case"keynote":e.push((0,i.jsx)("div",{className:f.keynoteWrapper,children:(0,i.jsx)("p",{className:f.keynote,dangerouslySetInnerHTML:{__html:t.data.text||""},role:"keynote"})},l));break;case"image":e.push((0,i.jsx)("img",{src:t.data.url||"",alt:"image"},l))}}),e})();return(0,i.jsx)("div",{className:(0,a.Z)(f.contentBlocks,e),role:"blocks",children:n})},v=({question:e,eventCategory:t,dataLayerPush:n,...l})=>(0,i.jsx)(r.Qd,{...l,title:e.question,children:(0,i.jsx)("div",{className:(0,a.Z)(p.accordionItemContent,{[p.accordionActiveItemContent]:l.isActive}),onClick:e=>{e.target instanceof HTMLAnchorElement&&n({event:"data-event",eventCategory:t,eventAction:"click_link",eventLabel:e.target.href})},children:"string"==typeof e.answer?(0,i.jsx)(g,{data:[{type:"html",data:{html:e.answer}}]}):e.answer})}),w=e=>{setTimeout(()=>{let{top:t}=e.getBoundingClientRect();t<80&&e.scrollIntoView({behavior:"smooth",block:"start"})},300)},x=({sectionTitle:e="Частые вопросы",innerTitle:t,questions:n=[],href:u,checkAllText:d,Link:m,className:h,eventCategory:f="cb-faq",multiple:g=!1,variant:x="secondary",dataLayerPush:_,tagTitle:b})=>{let j=g?n.map(e=>e.question):[],[y,k]=(0,l.useState)(j),C="gray"===x;return(0,i.jsx)("section",{className:(0,a.Z)(p.faqBlock,p.states[x],h),children:(0,i.jsxs)(s.W2,{children:[!t&&(0,i.jsx)("div",{className:p.titleWrapper,children:(0,i.jsx)(s.X6,{as:"h2",type:"display",className:p.title,children:e})}),(0,i.jsxs)("div",{className:p.accordionWrapper,children:[t&&(0,i.jsx)(s.X6,{as:"h3",type:"h1",style:{paddingBottom:"12px"},className:(0,a.Z)(p.title,`${p.title}--inner`),children:t}),(0,i.jsx)("div",{className:p.accordionItems,children:(0,i.jsx)(r.UQ,{activeIndex:y,variant:C?"primary":"secondary",withoutOutline:C,onTabToggle:e=>{let t=(null==e?void 0:e.length)>(null==y?void 0:y.length),n=e.filter(e=>!y.includes(e))[0]||y.filter(t=>!e.includes(t))[0];_({event:"data-event",eventCategory:f,eventAction:`click_togg_${t?"on":"off"}`,eventLabel:(0,o.t)(String(n))}),k(e);let i=`[data-accordion-index="${n}"]`,l=document.querySelector(i);l&&w(l)},multiple:g,children:n.map(e=>{let t=`faq-${e.question}`;return(0,i.jsx)(v,{id:t,question:e,dataLayerPush:_,eventCategory:f,className:C?p.accordionItemGray:void 0,tagTitle:b},t)})})}),u&&d&&(0,i.jsx)(c.C,{href:u,event:{event:"data-event",eventCategory:f,eventAction:"сlick_link_answer-link",eventLabel:u},dataLayerPush:_,...null!=m?{Link:m}:{},iconGrayBackground:!0,children:d||"Читать все вопросы"})]})]})})}},44789:function(e,t,n){"use strict";n.d(t,{CitySelectProvider:function(){return i.C}});var i=n(22711)},17730:function(e,t,n){"use strict";n.d(t,{B:function(){return _}});var i=n(57437),l=n(35563),s=n(61994),r=n(80684),a=n(75461),o=n(6554),c=n(52074),u=n(2265);let d=(0,c.g)("support","sc"),p=Object.freeze({support:d,title:`${d}__title`,cardsContainer:`${d}__cards-container`}),m="cb-support",h=(0,c.g)("support-app-card","sc"),f=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,a.aF)("s");return(0,i.jsxs)("div",{className:f.supportAppCard,onClick:()=>{s&&((0,o.h)({eventCategory:m,eventActionType:o.D.banner,eventActionText:e,eventLabel:t}),window.open(t,"_blank","noreferrer"))},children:[(0,i.jsx)(a.zx,{className:f.button,iconLeft:(0,i.jsx)(r.IconFdsArrowUpRightSmallO,{size:24}),shape:"circle-icon",size:"xs"}),(0,i.jsxs)("div",{className:f.textWrapper,children:[(0,i.jsx)("div",{className:f.title,children:e}),!!l&&(0,i.jsx)("div",{className:f.description,children:l})]}),(0,i.jsx)("div",{className:f.imageContainer,children:(0,i.jsxs)("picture",{className:f.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:f.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`})]})})]})},v=(0,c.g)("support-phone-card","sc"),w=Object.freeze({supportPhoneCard:v,contacts:`${v}__contacts`,contactsExtra:`${v}__contacts-extra`,phone:`${v}__phone`,phonesExtra:`${v}__phones-extra`,phoneExtra:`${v}__phone-extra`,chat:`${v}__chat`,text:`${v}__text`,image:`${v}__image`}),x=({phones:e,phonesExtra:t,description:n,s3Assets:l})=>{let s=(0,u.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,o.h)({eventCategory:m,eventActionType:o.D.button,eventActionText:"messenger",eventLabel:"chat"})},[]),r=e=>{let t=e.replace(/[\s-]/g,"");(0,o.h)({eventCategory:m,eventActionType:o.D.link,eventActionText:"phone",eventLabel:t})};return(0,i.jsxs)("div",{className:w.supportPhoneCard,children:[(0,i.jsxs)("div",{className:w.contacts,children:[e.map(e=>(0,i.jsx)("a",{className:w.phone,href:e.href,onClick:()=>r(e.label),children:e.label},e.label)),(0,i.jsx)("span",{className:w.chat,onClick:s,children:"Онлайн чат"})]}),(null==t?void 0:t.length)>0&&(0,i.jsxs)("div",{className:w.contactsExtra,children:[(0,i.jsx)("p",{className:w.text,children:"Дополнительные телефоны"}),(0,i.jsx)("div",{className:w.phonesExtra,children:t.map(e=>(0,i.jsx)("a",{className:w.phoneExtra,href:e.href,onClick:()=>r(e.label),children:e.label},e.label))})]}),(0,i.jsx)("p",{className:w.text,children:n}),(0,i.jsx)("img",{className:w.image,src:`${l}/mp-assets/widgets/SupportBlock/bannerSupportGirl.png`})]})},_=({className:e,phoneCard:t,appCard:n,s3Assets:r})=>(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:r,...t}),(0,i.jsx)(g,{s3Assets:r,...n})]})]})});_.displayName="Support"}}]);