@redneckz/wildless-cms-uni-blocks 0.14.568 → 0.14.570
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +86 -63
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/bundle/ui-kit/Checkbox/CheckboxProps.d.ts +1 -1
- package/bundle/ui-kit/FormField/Fields/ConsentToAllDocsField.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/ProductField.d.ts +8 -1
- package/bundle/ui-kit/FormField/constants.d.ts +0 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -5
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/dist/ui-kit/Checkbox/CheckboxGroup.js +2 -1
- package/dist/ui-kit/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/ui-kit/Checkbox/CheckboxProps.d.ts +1 -1
- package/dist/ui-kit/FormField/Fields/ConsentToAllDocsField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/ConsentToAllDocsField.js +26 -0
- package/dist/ui-kit/FormField/Fields/ConsentToAllDocsField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/ProductField.d.ts +8 -1
- package/dist/ui-kit/FormField/Fields/ProductField.js +3 -3
- package/dist/ui-kit/FormField/Fields/ProductField.js.map +1 -1
- package/dist/ui-kit/FormField/constants.d.ts +0 -1
- package/dist/ui-kit/FormField/constants.js +1 -9
- package/dist/ui-kit/FormField/constants.js.map +1 -1
- package/dist/ui-kit/FormField/getField.js +6 -1
- package/dist/ui-kit/FormField/getField.js.map +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.js +1 -0
- package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -5
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +1 -0
- package/lib/ui-kit/Checkbox/CheckboxGroup.js +2 -1
- package/lib/ui-kit/Checkbox/CheckboxGroup.js.map +1 -1
- package/lib/ui-kit/Checkbox/CheckboxProps.d.ts +1 -1
- package/lib/ui-kit/FormField/Fields/ConsentToAllDocsField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/ConsentToAllDocsField.js +24 -0
- package/lib/ui-kit/FormField/Fields/ConsentToAllDocsField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/ProductField.d.ts +8 -1
- package/lib/ui-kit/FormField/Fields/ProductField.js +3 -3
- package/lib/ui-kit/FormField/Fields/ProductField.js.map +1 -1
- package/lib/ui-kit/FormField/constants.d.ts +0 -1
- package/lib/ui-kit/FormField/constants.js +0 -8
- package/lib/ui-kit/FormField/constants.js.map +1 -1
- package/lib/ui-kit/FormField/getField.js +6 -1
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.js +1 -0
- package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +86 -63
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/mobile/bundle/ui-kit/Checkbox/CheckboxProps.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentToAllDocsField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/ProductField.d.ts +8 -1
- package/mobile/bundle/ui-kit/FormField/constants.d.ts +0 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -5
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxGroup.js +2 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxGroup.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxProps.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConsentToAllDocsField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/ConsentToAllDocsField.js +26 -0
- package/mobile/dist/ui-kit/FormField/Fields/ConsentToAllDocsField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/ProductField.d.ts +8 -1
- package/mobile/dist/ui-kit/FormField/Fields/ProductField.js +3 -3
- package/mobile/dist/ui-kit/FormField/Fields/ProductField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/constants.d.ts +0 -1
- package/mobile/dist/ui-kit/FormField/constants.js +1 -9
- package/mobile/dist/ui-kit/FormField/constants.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getField.js +6 -1
- package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js +1 -0
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +3 -5
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxGroup.js +2 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxGroup.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxProps.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentToAllDocsField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/ConsentToAllDocsField.js +24 -0
- package/mobile/lib/ui-kit/FormField/Fields/ConsentToAllDocsField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/ProductField.d.ts +8 -1
- package/mobile/lib/ui-kit/FormField/Fields/ProductField.js +3 -3
- package/mobile/lib/ui-kit/FormField/Fields/ProductField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/constants.d.ts +0 -1
- package/mobile/lib/ui-kit/FormField/constants.js +0 -8
- package/mobile/lib/ui-kit/FormField/constants.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getField.js +6 -1
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js +1 -0
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +2 -1
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.example.json +6 -856
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -9
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -1
- package/mobile/src/ui-kit/Checkbox/CheckboxGroup.tsx +7 -1
- package/mobile/src/ui-kit/Checkbox/CheckboxProps.ts +1 -1
- package/mobile/src/ui-kit/FormField/Fields/ConsentToAllDocsField.tsx +29 -0
- package/mobile/src/ui-kit/FormField/Fields/ProductField.tsx +13 -4
- package/mobile/src/ui-kit/FormField/constants.tsx +0 -9
- package/mobile/src/ui-kit/FormField/getField.tsx +7 -1
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +1 -0
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationFormContent.ts +2 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.example.json +6 -856
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.mobile.tsx +8 -10
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +7 -10
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -9
- package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -1
- package/src/ui-kit/Checkbox/CheckboxGroup.tsx +7 -1
- package/src/ui-kit/Checkbox/CheckboxProps.ts +1 -1
- package/src/ui-kit/FormField/Fields/ConsentToAllDocsField.tsx +29 -0
- package/src/ui-kit/FormField/Fields/ProductField.tsx +13 -4
- package/src/ui-kit/FormField/constants.tsx +0 -9
- package/src/ui-kit/FormField/getField.tsx +7 -1
- package/src/ui-kit/FormField/getObjectValidator.tsx +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef");const o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:h("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),x=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:f(t)}))),f=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},w={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=v[n]||"h3";return o(i,{role:"heading",className:h("font-sans m-0",w[t],e),children:l||a})})),k=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=S[n],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(N,{className:h("whitespace-pre-wrap",i),...u?.title,as:r||u?.title.as,title:l}):null,a?o(k,{size:u.descriptionSize,font:u.descriptionWeight,align:i,...p,children:a}):null]})})),T=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function B(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=T,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:h(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const P=[],M=(e,{key:t,ancestors:n=P,slotName:l=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||P,[r.parent,l]]:n},a)))};function R({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?M(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function V(){return V._impl()}V._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),V.setup=e=>{V._impl=e};const D=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return D.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),A=e=>Boolean(e?.includes(":")),j=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),_=e=>Boolean(e?.startsWith("#")),E=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),$=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:A,isLocalURL:j,isHash:_,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:E,hasPrefix:$});const O="/api/",F=`${O}v1/storage`,U=e=>(t,n)=>{if([!t,A(t),_(t),[z.CDN,O].some((e=>$(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${F}/${t}/attachment`;const l=t?.startsWith("/");return E($(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},H=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const d=V(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,u=U(d)(E(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:u,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:q(e,s)}):o(Y,{className:e,children:c("svg",{className:h(K(r),W[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:u,xlinkHref:u})]})})})),q=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},K=e=>e?"":"w-full h-full",Y=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),X=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function G(e=""){try{const[,...t]=new URL(e).pathname.split("/");return`/${t.filter(Boolean).join("/")}`}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!A(t)?U(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const l=V();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:J(l)(e),type:te(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(l)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:h("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),te=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(H,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(Q,{className:e,imageClassName:n,image:t}):null)),le={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},re="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" ");const ce=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}},de=()=>({open:(e,t={})=>ce.fire("dialog",{type:"open",dialog:e,...t}),close:()=>ce.fire("dialog",{type:"close"}),closeAll:()=>ce.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function he(){const e=G(X.SITE_URL),t=V(),{closeAll:n}=de();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:me(l({...e,href:n}))}};function l({href:l,target:a,onClick:i}){return r=>{i&&i(r);const s=!$(l,e||"/");l&&!s&&j(l,a)&&(n(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(l,e)))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const ue=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},pe=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=xe(e)&&"hidden lg:block";return c("div",{className:h(ge(e),"flex gap-xs"),children:[l?o("div",{className:h(r,se[i]),children:l}):null,xe(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(r,se[i]),children:a}):null]})})),ge=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",xe(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},xe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),fe=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:l}),s=he()({onClick:r,href:l,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...ue(d),children:m}))),ve=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:fe({className:e,rounded:l,version:n}),children:a})));function we({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(be,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const Ne=()=>{const[e,t]=l(true);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",n)}}),[]),e},ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Se=(e,{className:t,imageAlign:n})=>e?o("div",{className:h("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Ce=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=Ne(),v=V(),w=i((()=>v.back()),[]),N=b.options?.page?.common?.backwardButton,k=x&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&we({version:t,handleClick:w,text:N}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Se(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[u,f]}),Ie(R({...b,extraProps:{className:"@container-normal"}})),Se(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[Te(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Te=e=>h(e?"row-span-2":"@xl:row-span-2"),Ie=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Be=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pe=d((e=>{const{__html:t="",richVersion:n="",itemSize:l="list-m",isDotted:a=!0}=e,i=a?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(n,l,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Me=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Re=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),Ve=(e,t)=>e?o(Re,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,De=(e,t)=>["label"in e?Ve(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Me(e.description,t)},String(t)):null,"__html"in e?o(Pe,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Be(n.icon,t):null,o("div",{children:De(n)})]}))),Ae=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(ze,{benefitsVersion:t,...e},String(n))))}):null)),je=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(De)}):null)),_e=d((({isTabularBenefits:e,...t})=>o(e?je:Ae,{...t}))),Ee=e=>Boolean(e?.src||e?.icon),$e=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(Le(n))}):null,Le=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Oe(a,r),d=Oe(i,r);return l||a?.icon?o(be,{className:h("basis-full @lg:basis-auto",e),appendLeft:Fe({...a,iconVersion:c}),appendRight:Fe({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Oe=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Fe=e=>Ee(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ue=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),We=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(He)}):null)),He=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Re,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ue(2)(t)," ",n||"₽"]}):null]},String(l)),qe=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ke)}):null)),Ke=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Re,{size:"text-m",font:"font-light",children:e})},String(t)),Ye={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Xe=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:w=!0,isImageAlwaysOnRight:N,isImageSecondary:k=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(ne,{image:y}):null,P=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Ce,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Ge(B,w),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:N,buttons:$e(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?o(_e,{benefitsVersion:s,isTabularBenefits:d,benefits:M}):null,u?o(Pe,{richVersion:p,__html:u,isDotted:m,itemSize:Ye[i]}):null,T,x?.length?o(We,{priceList:x}):null,Je(f)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},Je=e=>e?.length?o(qe,{tags:e}):null,Ze=e=>Boolean(e&&Array.isArray(e)),Qe=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),et=(e,t)=>{return n=e,Boolean(Qe(n)&&"string"==typeof n.$ref)?t.ref(e):Qe(e)?t.record(e):Ze(e)?t.array(e):t.scalar?t.scalar(e):e;var n},tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(nt,e),nt=(e,t)=>e&&t?Qe(e)?e[t]:Ze(e)?e[parseInt(t,10)]:e:e,lt=(e,t)=>et(e,{ref:({$ref:e,...n})=>lt(e?tt(t(e),e):n,t),record:e=>Object.entries(e).map((([e,n])=>({[e]:lt(n,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>lt(e,t)))}),at=(e,t,n=[])=>{et(e,{ref:e=>t(e.$ref,n),record:e=>{for(const l in e)at(e[l],t,[...n,l])},array:e=>{for(let l=0;l<e.length;l++)at(e[l],t,[...n,l])}})};async function it(e,t){try{return e?await rt(e,t):null}catch(e){console.error(e)}return null}const rt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),st=e=>[...new Set(e)],ot={},ct=["/portal-resources"],dt=(e,t)=>lt(e,(e=>t?.[e])),mt=(e,t)=>{const n=(e=>{const t=[];return at(e,(e=>t.push(e))),t})(e),[i,r]=l({});return a((()=>{n.length&&(async e=>Object.fromEntries((await Promise.allSettled(st(e).filter((e=>!ct.some((t=>e.startsWith(t))))).map((async e=>[e,ot[e]||=await rt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(n).then(r)}),[n.join()]),n.length?dt(e,{...t,...i}):e};function ht(e,t={}){const n=d((t=>{const n=mt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const ut=ht((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(Xe,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),pt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>gt(0,t?.length)),[t]),l=t?.[n];return l?o(ut,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(x,{})})})),gt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),xt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},ft=e=>e?.replace(/[^+\d]/g,"");function bt(){return{send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:n,...wt(l,g),...Nt(i,g),...yt(a),...vt(s,"desiredMeetingDate"),...g?vt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...kt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});if(!e?.ok)return null;return await e.json()}catch(e){return null}}}}const yt=e=>e?{phone:ft(e)}:{},vt=(e,t="birthday")=>e?{[t]:xt(e)}:{},wt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Nt=(e,t=!0)=>({[t?"email":"mail"]:e}),kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:ft(e)}:{},St=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e)t[l??""]?.(n,a)},Ct="rshb-query-params";function Tt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Ct)||"";return e&&globalThis.sessionStorage?.setItem(Ct,e),e}function It(e){if(!e)throw new Error("Value should be fulfilled");return e}const Bt=e=>t=>{const[,n]=It(e.find((([e])=>e(t))));return n(t)},Pt=e=>Bt(e.map((([e,t])=>[e,()=>t])));Pt.if=e=>new Mt(void 0,e);class Mt{parent;predicate;unit;get entry(){return[It(this.predicate),It(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Mt(this,e)}then(e){return new Mt(this.parent,this.predicate,e)}else(e){return Bt([...Rt(this),[()=>!0,e]])}}const Rt=e=>[...e?.parent?Rt(e.parent):[],e.entry],Vt=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=Tt();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;if(n){Dt(t?.target)?.(n)}}},Dt=Pt([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function zt(){return zt._impl()}zt._impl=()=>({forwardQuery:Vt}),zt.setup=e=>{zt._impl=e};const At=e=>e,jt=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=l(e),c=i(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return _t(t,n)?t:n}:r(e)):o,[r]);a((()=>{r&&o(r)}),[r]);const[d,m]=l(!1),[h,u]=l({}),p=i(((e,t)=>{const{parse:n=At,format:l=At}=t||{};return{value:l(s[e]),isDirty:d||h[e],onChange:t=>{c((l=>({...l,[e]:n(t)}))),u((t=>({...t,[e]:!0})))}}}),[c,d,h]),g=i((e=>{c(e),u(e)}),[]),x=i((()=>{c(e),m(!1),u({})}),[e]),f=i((e=>{e.preventDefault(),t?x():m(!0),n&&n(s,e)}),[n,s]);return[s,{isDirty:d||Object.values(h).some(Boolean),field:p,update:g,reset:x,onSubmit:f}]},_t=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),Et=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})})),$t=e=>e?.find((e=>"consentDataProcessing"===e?.name)),Lt=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Ot=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Ft=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],Ut=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Wt=[{key:"Карта дебетовая",text:"Карта дебетовая"},{key:"Карта кредитная",text:"Карта кредитная"},{key:"Потребительский кредит",text:"Потребительский кредит"},{key:"Ипотечный кредит",text:"Ипотечный кредит"},{key:"Вклад",text:"Вклад"},{key:"Накопительный счет",text:"Накопительный счет"}],Ht="/api/v1/outservice/outserviceregions",qt=e=>"OUTSERVICE"===e?Ht:void 0,Kt=e=>o("div",{className:"h-6",children:e?o(Re,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Yt=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Xt="appearance-none w-5 h-5 border-solid flex-none",Gt=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Jt=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Yt,{paths:Gt,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:h("flex items-center relative group/box",Qt(l)),onClick:s,children:[o("div",{className:h(Xt,"m-0",a?"rounded-full border-2":tn(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:en(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,Zt(n)]})})})),Zt=e=>e?o("div",{className:"ml-s",children:o(Re,{size:"text-l",font:"font-light",children:e})}):null,Qt=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",en=(e=!1)=>e?"radio":"checkbox",tn=(e=!1)=>h("rounded border",{"bg-primary-main":e}),nn=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Jt,{text:t,value:n,disabled:a,onChange:r},l),Kt(i)]})));function ln(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}const an=e=>e?o(Re,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,rn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",sn=d((({key:e,className:t="",id:n,name:l,type:r="text",label:d,placeholder:m,value:u="",valid:p=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:w=!1})=>{const N=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&N.current?.focus()}),[v,N]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",T=on(p);return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[an(d),w?o("textarea",{className:h("block resize-y min-h-24",S,T),id:h("textarea",n),name:l||n,placeholder:m,value:u,onChange:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:h("h-14",S,C,T),ref:N,id:n,name:l||n,placeholder:m,value:u,onChange:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),on=e=>e?rn:"border-error",cn=e=>e?.text||e?.key||"";function dn(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function mn(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return dn(globalThis.document,"click",n),t}const hn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,un=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:hn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:cn(e)}),o(H,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:h("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));function pn({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>ce.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>ce.fire("popup",{type:"update",popup:e,...t}),close:()=>ce.fire("popup",{type:"close"})},h=i((()=>{m.close(),c&&c()}),[c]),u=i((e=>{h(),r&&r(e)}),[h,r]),p=s(null),g=mn(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(un,{popupRef:g,options:t,value:n,query:l,onChange:u,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,u]),p}const gn=d((({className:e,label:t,options:n=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:u="black",onChange:p,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=ln(),[y,v]=l(""),w=g||0===n.length,N=x&&!w,k=i((()=>{v(""),f()}),[]),S=pn({isOpen:x,options:n,value:a,query:y,onChange:p,onClose:k,iconVersion:u});return c("div",{className:h("space-y-xs",e),children:[an(t),c("div",{className:h("relative",N?"z-20":"z-10"),ref:S,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",fn(s,r,w)),onClick:N?k:b,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:cn(a)||d}),xn(N,u)]}),m&&N?o("div",{className:h("absolute top-0 w-full z-20"),children:o(sn,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),xn=(e,t)=>o(H,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),fn=(e,t,n)=>h(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),bn=()=>{},yn=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>n)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=vn(t,e),c=wn(t,i,r);h.push(o("td",{children:o("div",{className:Nn(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},vn=(e,t)=>t&&e.toDateString()===t.toDateString(),wn=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),Nn=(e,t)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),kn=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Sn=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=bn,setValue:d=bn})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:h,totalDays:u}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:kn.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:yn({firstDayOfWeek:h,today:e,totalDays:u,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:m})})]})})),Cn=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Tn=Cn.map((e=>({key:e}))),In=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Bn={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Pn={className:"min-w-32",iconVersion:"black",isBorder:!1},Mn=d((({className:e="",label:t="",value:n,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:u}]=ln(!1),[p,g]=l(n?.getMonth()||(new Date).getMonth()),[x,f]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:w,monthsOptions:N,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=mn(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>l(Cn.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Tn,yearsOptions:In,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:u,selectedYear:x,selectedMonth:p,showCalendar:m});return c("div",{className:h("space-y-xs",e),ref:C,children:[an(t),c("div",{className:"relative",children:[Rn(S,n,a),m?c("div",{className:"absolute bg-white z-20 select-none bottom-full",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(H,{...Bn,className:"-rotate-90 cursor-pointer"})}),o(gn,{onChange:v,value:{key:Cn[p]},options:N,...Pn}),o(gn,{onChange:w,value:{key:String(x)},options:k,...Pn}),o("div",{className:"my-auto",onClick:y,children:o(H,{...Bn,className:"rotate-90 cursor-pointer"})})]}),o(Sn,{today:n,currentMonth:p,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),Rn=(e,t,n)=>c("div",{onClick:e,className:h("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error"),children:[o(k,{children:t&&xt(t)}),o(H,{...Bn,name:"CalendarIcon"})]}),Vn=d((({className:e,label:t,error:n,...l})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Mn,{label:t&&l?.errors?`${t}*`:t,valid:Boolean(!n),...l}),Kt(n)]}))),Dn=d((({className:e,label:t,value:n="",placeholder:l,error:a,onChange:i,onBlur:r,isTextarea:s,type:d,...m})=>c("div",{className:h("shrink-0 w-full",e),children:[o(sn,{type:d||"text","aria-label":t,label:t&&m?.errors?`${t}*`:t,valid:Boolean(!a),value:n,onChange:i,onBlur:r,isTextarea:s,placeholder:m?.errors&&!t?`${l}*`:l}),Kt(a)]}))),zn=d((({className:e="",label:t,error:n,...l})=>c("div",{className:e,children:[o(gn,{...l,valid:!n,label:l?.errors?`${t}*`:t}),Kt(n)]}))),An=e=>!e?.length,jn=e=>t=>n=>e(n)?[]:[t],_n="Некорректно заполненное поле",En=jn((e=>null!=e&&""!==e))(_n),$n=jn((e=>e?.key&&""!==e?.key))(_n),Ln=jn((e=>"string"==typeof e&&e.length>1))(_n),On=jn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(_n),Fn=(Un=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,jn((e=>"string"==typeof e&&Un.test(e))))(_n);var Un;const Wn=jn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Hn={typeForm:En,surname:Ln,name:Ln,region:$n,addressBranch:$n,phone:Fn,secondaryPhone:Fn,birthday:En,email:En,fullName:Ln,inn:On,partnerComments:En,collectionCount:En,comment:En,acquiringType:$n,feedbackType:$n,feedbackMethod:$n,serviceType:$n,serviceDirection:$n,meetingDay:En,product:En,localities:En,consentDataProcessing:Wn,annualRevenue:En},qn=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Hn?.[e]])))},Kn=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},Yn=(e,t,n=!1)=>n?Kn(e,t):e,Xn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Gn=d((({field:e,input:t})=>o(zn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Xn,...Yn(e("acquiringType"),Hn.acquiringType,t?.required)}))),Jn=(e="")=>Boolean("trade"===e||"all"===e),Zn=e=>null!=e,Qn=new Map,el=e=>Boolean(e?.every((e=>Array.isArray(e)?el(e):!e||"string"==typeof e))),tl=e=>el(e)?e.toString():"";function nl(e,t,{fallback:n,cache:i}={}){const s=r((()=>ll(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(Zn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=Qn)=>n=>{const l=tl(n),a=t.get(l);if(l&&Zn(a))return a;const i=e(...n);return l&&Zn(i)&&t.set(l,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function ll(e){return Array.isArray(e)?e:e instanceof Function?ll(e()):[e]}const al=[];const il=async e=>await it(e,{method:"GET"})||al;function rl(){const{data:e}=nl("/api/v1/branchesByRegions",rt);return Array.isArray(e)?e:[]}const sl=d((({field:e,input:t,isPremium:n=!1})=>{const l=e("region"),i=l?.value?.key,r=l?.value?.text,s=n?rl()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=nl(e?`/api/v1/branches?regionCode=${e}`:null,il);return t||al}(i)?.filter((e=>e?.address));return a((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(zn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...Yn(e("addressBranch"),Hn.addressBranch,t?.required),isSearch:!0})})),ol=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},cl=(e,t,n)=>Math.max(t,Math.min(e,n));function dl(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function ml({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:i,onChange:t=>{const n=dl(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const hl=1,ul=100,pl=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:hl),max:s=(a.length?a.length-1:ul),step:d=1,value:m=a[0]||r,disabled:u=!1,onChange:p}=e,g=ol(e,{normalize:(e=0)=>a.length?gl(a)(e):cl(e,r,s),format:Ue()}),x=i((e=>{p&&p(dl(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",rn,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:x,...g}),ml({list:a,min:r,max:s,step:d,disabled:u,value:m,onChange:p})]}),xl(l)]})})),gl=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),xl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),fl=["От 1 000 ₽","До 1 000 000 000 ₽"],bl=d((({field:e})=>o(pl,{title:"Сумма, ₽",items:fl,min:1e3,max:1e9,...e("amount")}))),yl=d((({field:e,input:t})=>o(Dn,{className:"col-span-2",...Yn(e("comment"),Hn.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),vl=d((({field:e})=>o(zn,{label:"Способ получения ответа",options:Ut,...Kn(e("feedbackMethod"),Hn.feedbackMethod)}))),wl=d((({field:e})=>{const t=e("feedbackType");return a((()=>{"FEEDBACK"===t?.value?.key&&e("serviceDirection")?.onChange?.(Ot[0])}),[t?.value]),o(zn,{label:"Тема",placeholder:"Выберите тему",options:Ft,...Kn(t,Hn.feedbackType)})})),Nl=d((({field:e})=>o(nn,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'})));function kl(e="/api/v1/regions"){const{data:t}=nl(e,rt);return Array.isArray(t)?t:[]}const Sl=d((({field:e,input:t})=>{const n=e("region")?.value?.key,l=kl(Ht)?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(zn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:l,...Yn(e("localities"),Hn.localities,t?.required),isSearch:!0})})),Cl=d((({field:e})=>o(Dn,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}))),Tl=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(Dn,{label:"Имя",...Yn(e("name"),Hn.name,n),...l})})),Il=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:h("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Bl=d((({field:e})=>Jn(e("acquiringType")?.value?.key)?o(Il,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Pl=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(Dn,{...Yn(e("partnerComments"),Hn.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...l})})),Ml=e=>"_"===e,Rl=e=>/\d/.test(e),Vl=e=>Ml(e)||Rl(e),Dl=[..."+7 (___) ___-__-__"],zl=Dl.findIndex(Ml),Al=Dl.map(((e,t)=>Vl(e)?Dl.slice(0,t).filter(Vl).length:-1));const jl=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=Dl.map(((e,n)=>Rl(e)?e:t.charAt(Al[n])||e)),l=Al.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(zl,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&(t&&t(""))}),[]);return o(sn,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),_l=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:h("shrink-0 w-full",e),children:[o(jl,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Kt(l)]}))),El=d((({field:e,input:t})=>o(_l,{label:"Телефон",...Yn(e("phone"),Hn.phone,t?.required)}))),$l=d((({field:e})=>Jn(e("acquiringType")?.value?.key)?o(Il,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Ll=d((({field:e})=>o(zn,{placeholder:"Выберите продукт",label:"Продукт",options:Wt,...Kn(e("product"),Hn.product)}))),Ol=d((({field:e,input:t,url:n})=>{const l=kl(n);return o(zn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...Yn(e("region"),Hn.region,t?.required)})})),Fl=d((({field:e,input:t})=>{const n=rl(),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(zn,{label:"Регион",placeholder:"Выберите регион",options:l,...Yn(e("region"),Hn.region,t?.required)})})),Ul=d((({field:e})=>{const t=e("secondaryPhone");return o(_l,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Kn(t,Hn.secondaryPhone):t})})),Wl=d((({field:e})=>o(zn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Ot,...Kn(e("serviceDirection"),Hn.serviceDirection)}))),Hl=d((({field:e,input:t})=>o(Dn,{label:"Фамилия",...Yn(e("surname"),Hn.surname,t?.required)}))),ql=["От 1 мес","До 15 лет"],Kl=d((({field:e})=>o(pl,{title:"Срок, месяцев",items:ql,min:1,max:180,...e("term")}))),Yl=d((({field:e})=>o(zn,{label:"Тип обслуживания",options:Lt,...Kn(e("serviceType"),Hn.serviceType)}))),Xl=d((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:h(rn.split(" ").filter((e=>"rounded"!==e)),Xt,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Re,{color:"text-primary-text",children:t}):null]})}))),Gl=["currencyControl","documentOperations","conversionTransactions","otherIssues"],Jl=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(Xl,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:n}),o(Xl,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:n}),o(Xl,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:n}),o(Xl,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:n})]})}));const Zl=(e,t)=>(n,l)=>{const{required:a,...i}=n,r="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,s={surname:o(Hl,{field:e,input:n}),name:o(Tl,{field:e,input:n}),middleName:o(Cl,{field:e}),phone:o(El,{field:e,input:n}),email:o(Dn,{label:"Электронная почта",...Yn(e("email"),Hn.email,a),...i}),fullName:o(Dn,{label:"ФИО",...Yn(e("fullName"),Hn.fullName,a),...i}),inn:o(Dn,{label:"ИНН",type:"number",...Yn(e("inn"),Hn.inn,a)}),comment:o(yl,{field:e,input:n}),region:r?o(Fl,{field:e}):o(Ol,{field:e,input:n,url:qt(t)}),addressBranch:o(sl,{field:e,input:n,isPremium:r}),birthday:o(Vn,{label:"Дата рождения",...Yn(e("birthday"),Hn.birthday,a)}),desiredMeetingDate:o(Vn,{label:"Желаемая дата встречи",...Yn(e("desiredMeetingDate"),Hn.meetingDay,a)}),product:o(Ll,{field:e}),localities:o(Sl,{field:e,input:n}),isClient:o(Nl,{field:e}),consentToReceiveMaterials:o(nn,{...e("consentToReceiveMaterials"),text:"Согласен на получение информационных и аналитических материалов по электронной почте"}),partnerComments:o(Pl,{field:e,input:n}),collectionCount:o(Dn,{label:"Количество объектов инкассации",type:"number",...Yn(e("collectionCount"),Hn.collectionCount,a)}),acquiringType:o(Gn,{field:e,input:n}),onlineCheckout:o(Bl,{field:e}),posTerminal:o($l,{field:e}),serviceType:o(Yl,{field:e}),term:o(Kl,{field:e}),amount:o(bl,{field:e}),annualRevenue:o(Dn,{label:"Годовая выручка, ₽",...Yn(e("annualRevenue"),Hn.annualRevenue,a)}),vedTypes:o(Jl,{field:e}),feedbackType:o(wl,{field:e}),feedbackMethod:o(vl,{field:e}),serviceDirection:o(Wl,{field:e}),bankEmpolee:o(Dn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}),applicationDate:o(Dn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),secondaryPhone:o(Ul,{field:e})};return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:n,field:e})?o("div",{children:s[n?.name]},String(l)):null},Ql=e=>2===e?"@xl:grid-cols-2":"",ea=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Re,{size:"text-h6",children:e})}):null;function ta({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const na={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active"},la={primary:h("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:h("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},aa=d((({children:e,...t})=>{const n=e=>({...e,onClick:me(ta(e))}),{className:l,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=n(t);return o("button",{className:h("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":h(na[a],la[a]),l),type:s,role:d,onClick:m,children:e})})),ia=d((({className:e,onClose:t})=>o("button",{className:h("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(H,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),ra=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:h("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(ia,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),sa=d((function({responseType:e,typeForm:t}){const n="OK"===e,l=n?"ResponseOKIcon":"ResponseFailIcon",{close:a}=de(),r=i((()=>{a()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(ra,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:l,iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(aa,{type:"button",onClick:r,children:"Хорошо"})]})})})),oa=e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(sa,{...e}),n),close:n}},ca=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],da=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,feedbackType:o,vedTypes:c,region:d,...m}=e,h=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Jn(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...m,...ha(c),...ma(d),...h?{partnerComments:h}:{},...s?{typeForm:s}:{},...o?{typeForm:o}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},ma=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},ha=e=>e?{vedTypes:Object.fromEntries(Gl.map((t=>[t,t===e])))}:{},ua={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Xn[0],serviceType:Lt[0],feedbackType:Ft[0],feedbackMethod:Ut[0],serviceDirection:Ot[0],vedTypes:Gl[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},pa=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Re,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Re,{children:t.text})}):null]}))),ga=(e,t)=>o(aa,{className:h("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),xa=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Jt,{...e}),o(pa,{link:t})]}),Kt(Kn(e,Wn).error)]}):o(pa,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),ga(n)]}),fa=bt(),ba=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:u,isContacts:p,data:g,...x})=>{const f=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||ua[e.name]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=Lt[1]),{...n,typeForm:{key:t,text:""}}})(f,n),[y,v]=l(""),w=i((async(e,t)=>{const l=ya(f,e),a=ca(qn(l));if(!An(a(e)))return"Fail";const i=da({...e,...u}),r=await fa.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){oa({responseType:r,typeForm:n}).open()}if("OK"===r&&g){const e=zt();St({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:S,reset:C}]=jt(b,{onSubmit:w}),T=$t(f)?.name;return a((()=>{"OK"===y&&(v(""),C())}),[y]),c(Et,{className:h("container space-y-m",e),title:t,...x,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:h(Ql(e.columns),"grid gap-x-m"),children:[ea(e.title),(e?.inputs||[])?.map(Zl(k,n))]},`section-${t}`))),xa(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),ya=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const l=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):n===(l?.key??l)})))),va=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},wa={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Xn[0],serviceType:Lt[0],feedbackType:Ft[0],feedbackMethod:Ut[0],serviceDirection:Ot[0],vedTypes:Gl[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Na=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||wa[e.name]]))),typeForm:{key:t,text:""}}),ka=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Re,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Re,{children:t.text})}):null]}))),Sa=(e,t)=>o(aa,{className:h("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Ca=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Jt,{...e}),o(ka,{link:t})]}),e?Kt(Kn(e,Wn).error):null]}),Sa(n)]}),Ta=bt(),Ia=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,...u})=>{const p=r?.flatMap((e=>e?.inputs))||[],g=Na(p,n),[x,f]=l(""),b=i((async e=>{const t=ca(qn(p));if(!An(t(e)))return"Fail";const l=(e=>{const{region:t,...n}=e,l={...n,...va(t)};return Object.fromEntries(Object.entries(l)?.map((([e,t])=>[e,t?.key||t])))})(e),a=await Ta.send(l,"lead"===m)?"OK":"Fail";if(f(a),a){oa({responseType:a,typeForm:n}).open()}return a}),[]),[,{field:y,onSubmit:v,reset:w}]=jt(g,{onSubmit:b}),N=$t(p)?.name;return a((()=>{"OK"===x&&(f(""),w())}),[x]),o(Et,{className:h("container space-y-m",e),title:t,...u,children:c("form",{onSubmit:v,children:[r.map(((e,t)=>c("div",{className:h(Ql(e.columns),"grid gap-x-m"),children:[ea(e.title),(e?.inputs||[])?.map(Zl(y,n))]},`section-${t}`))),Ca(N?y("consentDataProcessing"):void 0,d,s)]})})})),Ba=d((({title:e,description:t})=>{const n=Ne();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Pa=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Ma=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Ra(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const Va=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:c,children:d,onIntersection:m})=>{const u=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:Ra(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}(i((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:u,role:"listitem",children:d})})),Da=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],za=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),x&&x(ja(n))}),[g,x]),v=a>0?r*Number(a)-1:0,w="vertical-list"===d,N="horizontal-list"===d,k={...N?Aa(c,v):{},...w?Ma(u):{},gap:`${r}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(Va,{className:h(m,a?Da[a-1]:"",{"h-full":w},t),style:N?Aa(c/4):{},activeIndex:l,idx:n,observerOptions:f,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Aa=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),ja=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),_a={"horizontal-list":"w-6","vertical-list":"h-6"},Ea=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?_a[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),$a=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:h("text-secondary-text font-light",s),children:n?.description})]},String(l))},La=e=>e,Oa=(e=La)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),Fa=Oa(),Ua=(e=La)=>Oa((t=>-e(t))),Wa=Ua(),Ha=e=>t=>e.scrollWidth/t,qa=e=>(t,n)=>{e.scrollBy({left:n*Ha(e)(t),behavior:"smooth"})},Ka=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[Ua()(a),Oa()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;n.current&&(m?qa(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(h?qa(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Ya={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Xa=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=Ne(),[u,p]=Ka({itemCount:s.length}),g=Ga(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const x=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(za,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map($a({activeIndex:t,onClick:x}))}):n?o("div",{className:h("flex gap-xs",Ya[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Ea({activeIndex:t,onClick:x,listType:l}))}):null})),Ga=(e=!1)=>({behavior:e?"auto":"smooth"}),Ja=d((({className:e,disabled:t,...n})=>o(be,{rounded:!0,className:h("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e),disabled:t,...n,children:o(ne,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),Za=d((e=>o(Ja,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Qa=d((e=>o(Ja,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),ei="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",ti=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?ni(t):null,i?o(Za,{className:h(li(a),m?"left-1":"left-0"),onClick:s}):null,r?o(Qa,{className:h(li(a),m?"right-1":"right-0"),onClick:d}):null]})})),ni=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(ei,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(ei,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),li=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),ai=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:x,navButtons:f})=>{const b=Array.isArray(g)?g.length:0,[y,v]=Ka({itemCount:b,onVisibleIndicesChange:x}),[w]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===i?"relative h-full":""),children:[o(za,{containerRef:y,activeIndex:w,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(ti,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(Xa,{className:h(!p&&"lg:hidden"),activeIndex:w,dotCount:b,listType:i,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),ii=({blocksToRender:e,...t})=>o(ai,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:M(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:h("relative min-w-80",Pa(!0)),children:B(e,t)},String(n))})}),ri=e=>e%2!=0,si=d((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,role:r,...s})=>c(n,{tag:n,className:h("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:l,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),oi=d((({className:e="",label:t,icon:n,dataTheme:l="pc",disabled:a=!1,onClick:i})=>o(si,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",role:"button",className:h("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Re,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),ci=({isUnfolded:e,onToggle:t})=>o(oi,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),di=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const mi=d((({className:e="",isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),hi=["ArrowDownIcon","ArrowUpIcon"],ui="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",pi=({topItemsCount:e=0,label:t="",block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]];return c("div",{className:h("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:h(ui),children:[M(i,{...a.options,parent:n}),ri(i.length)?o(pt,{className:"col-span-6",...a}):null]}),o(di,{renderFoldableSection:({isUnfolded:e})=>c(mi,{className:h(ui),isUnfolded:e,children:[M(r,{...a.options,parent:n}),ri(r.length)?o(pt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:l})=>o(oi,{className:h({hidden:e<1}),disabled:!r?.length,label:t,icon:hi[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:l})})]})},gi=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[xi(n,t),pi({...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[xi(n,t),ii({...l,blocksToRender:t})]});default:return null}})),xi=(e,t)=>e&&!t.length?o(Ba,{...e}):null,fi=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),bi=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(Il,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),yi=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,fi(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(vi(l)).filter(Boolean))]}),n?o("div",{children:o(aa,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),vi=e=>([t,n])=>{const l=n?.type;return"array"===l?wi(t,e)(n):null},wi=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(bi,{items:l,multiple:!n?.single,...t(e)})]},e)};function Ni(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const ki=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Si=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>ki(t[e])||ki(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>ki(t[e])||ki(n[e])||Ci(t[e])<=Ci(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>ki(t[e])||ki(n[e])||Ci(t[e]?.min)>=Ci(n[e]?.min)&&Ci(t[e]?.min)<=Ci(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>ki(t[e])||ki(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>ki(t[e])||ki(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Ci=e=>Number(e||0),Ti=(e,{block:t,page:n,normalize:l=At})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=jt(e),d=r((()=>Ni(a,a.map((e=>dt(e.content,n?.fallback))))),[a,n?.fallback]),m=i===e?a:((e,t)=>(n=At)=>e?.filter((([,e])=>Si(t,n(e)||{}))).map((([e])=>e)))(d,i)(l);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},Ii={},Bi={},Pi=ht((({className:e,filtrationSchema:t=Ii,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Ti(Bi,{block:a.block,page:a.options?.page}),d=o(gn,{className:"w-64",label:n?.title,options:Mi(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Mi(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(yi,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(aa,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(gi,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Mi=e=>Ni(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Ri=(e=!1)=>e?"text-left":"text-center",Vi={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Di=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:h("rounded-icon object-fit flex justify-center items-center",Vi[n],e),children:o(H,{...i,width:"54%",height:"54%",name:a})}):null})),zi=d((({className:e="",title:t,benefitList:n,...l})=>{const a=Ne();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(N,{headingType:"h3",as:"h2",className:Ri(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Ai)}):null]})})),Ai=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(Di,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ne,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Re,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Pe,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),ji=(e,t,n)=>{return o(ai,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>c("div",{className:h("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(Re,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(Re,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},_i=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:h("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?ji(e,0,t):null]}))),Ei={start:"justify-start",center:"justify-center",end:"justify-end"},$i=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&h("flex",Ei[n]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:$e(e)})})),Li=d((({className:e,title:t,children:n,...l})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),Oi="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",Fi="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",Ui="flex flex-col gap-y-xl min-w-52",Wi=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(Re,{size:"text-h3",children:"number"==typeof e?[l,Ue(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),Hi=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o(Re,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(Wi,{value:n,...a}):o(Re,{size:"text-h3",children:"-"})]}))),qi=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Ki=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Re,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ue(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Yi=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(H,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Xi=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(Yi,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(Ki,{title:e,rate:t,unit:n,fractionDigits:l,color:i,...s})}),o(Hi,{className:"@xl:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:i,...s}),r]}),Gi=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(pl,{items:e?[`От ${Ue(1)(l.min||0)} ${n}`,`До ${Ue(1)(l.max||0)} ${n}`]:[],step:t,...l}),Ji={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Zi={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Qi=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=Ji.prefMonthsNum,prefTravelBonusRate:i=Ji.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||Zi,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},er=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=jt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:x}=Qi(r,n);return o(Li,{className:e,title:t,...i,children:c("section",{className:h(Oi,e),children:[c("div",{className:Fi,children:[Gi({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Gi({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Xi({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Ui,children:[x>=0?o(Hi,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,$e(l,{isVertical:!0}),qi(a)]})]})})})),tr=Math.round(29.5),nr=(e,t=0)=>e?.sum?e.sum:t,lr=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,ar=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,ir={horizontal:"gap-5xl",vertical:"flex-col gap-s"},rr=d((({items:e,checkedItem:t,className:n,onChange:l,disabled:a=!1,orientation:i="horizontal"})=>o("div",{className:h(`flex ${ir[i]}`,n),role:"radiogroup","aria-label":"Группа кнопок",children:e?.map((({id:e,text:n})=>o(Jt,{isRadio:!0,text:n,value:t===e,onChange:()=>l&&l(e),disabled:a},String(e))))}))),sr=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Re,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Re,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(rr,{orientation:l,items:e,checkedItem:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),or=e=>sr({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),cr=" (c капитализацией)",dr=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:Ui,children:[o(Hi,{title:`Доход в конце срока${i?cr:""}`,value:e,postfix:n,prefix:"+"}),o(Hi,{title:`Сумма в конце срока${i?cr:""}`,value:t,postfix:n}),$e(l,{isVertical:!0}),a?.map(qi)]}),mr=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:hr([e,t],l),hr=([e,t],n=[])=>({[e]:n.length?Wa(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?Fa(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ur=(e,[t,n],l)=>e>=l[t]&&e<=l[n],pr={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const gr={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},xr=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?pr[e?.rateType]:"",{data:n}=nl(t?`/api/v1/depositrates/${t}`:null,rt);return Array.isArray(n)?n:[]}(t);if(n<=30)return{...gr,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&fr(s,e)&&ur(l,["minSum","maxSum"],e)&&ur(n,["minDays","maxDays"],e)))||gr,{rate:m}=d,h=br(m,e),u=l+h,p=c||[gr];return{...d,...hr(["minSum","maxSum"],p),...hr(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},fr=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,br=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},yr=ht((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:u}]=jt({moneyValue:nr(r,1e5),daysValue:lr(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=xr(m,s),{income:g,finalSum:x,rate:f,isUnavailableByTerm:b,depositeName:y}=p;return o(Li,{className:e,title:t,...d,children:c("section",{className:h(Oi,e),children:[c("div",{className:Fi,children:[Gi({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(pl,{items:[`От ${ar(v.min||0)}`,`До ${ar(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[vr(p,u),or({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Xi({rate:f,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),dr({income:g,finalSum:x,buttons:n,footnotes:[l,a]})]})});var v})),vr=(e,t)=>c("div",{className:"space-y-s",children:[o(Re,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Jt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Jt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),wr=(e=[],t=!1)=>Nr([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Nr=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},kr=({min:e=0,max:t=0,availableMonths:n,...l})=>o(pl,{items:[`От ${Sr(e)}`,`До ${Sr(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),Sr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Cr=e=>sr({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Tr=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(cl(t?.[a],n.minMonths,n.maxMonths))},Ir=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},Br={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Pr=e=>Mr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Mr({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Mr({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Mr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Mr=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Rr=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[Br],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Pr({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=mr(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=mr(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>Pr({row:e,userInputParams:t,paramsViewSettings:n})&&ur(l,["minSum","maxSum"],e)&&ur(a,["minMonths","maxMonths"],e)))||Br)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:h}=m,u=Ir(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:u}},Vr=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Dr={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},zr=ht((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(u=n?.rateRows,Nr([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],u));var u;const[p,{field:g}]=jt({moneyValue:nr(s,2e5),monthsValue:lr(s,tr),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),x=Rr(p,n,r),f=Cr({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(cl(p.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(cl(p.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!Vr(s)&&m&&Tr({field:g,defParams:m,calcParams:x,map:Dr,monthsValue:"minMonths"})}),[n,s]),o(Li,{className:e,title:t,...d,children:c("section",{className:h(Oi,e),children:[c("div",{className:Fi,children:[Gi({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),kr({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),Ar({...x,...r},g),o("div",{className:"sm:hidden",children:f})]}),c("div",{className:h(Ui,"@4xl:w-1/2"),children:[o(Hi,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Hi,{title:"Ставка",value:x?.rate,fractionDigits:2,postfix:"%"}),o(Hi,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),$e(l,{isVertical:!0}),qi(i)]})]})})})),Ar=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Jt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Jt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Jt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Jt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),jr=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},_r={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Er=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?Or(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Lr({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Lr({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Lr({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Lr({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,ur(l,["minSum","maxSum"],t),ur(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||_r,{rate:h}=m,u=$r(h,e),p=l+u,g=t||[_r];return{...m,...hr(["minSum","maxSum"],g),...hr(["minMonths","maxMonths"],g),availableMonths:jr(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:u,finalSum:p}},$r=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},Lr=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Or=(e,t)=>e+Math.round((t-e)/2),Fr=(e="rub")=>"rub"===e,Ur=(e,t)=>{const{minMonths:n,maxMonths:l}=hr(["minMonths","maxMonths"],Kr(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:cl(a,n,l)}},Wr=(e,t)=>{const{minSum:n,maxSum:l}=hr(["minSum","maxSum"],Kr(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:cl(a,n,l)}},Hr=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),qr=e=>{const t=Fr(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Kr=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},Yr=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?sr({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?sr({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),Xr(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?or({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},sr({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),Xr(e.isShowNewClient),e.isShowNewClient?o(Jt,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},Xr=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,Gr={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Jr={text:"₽",key:"rub"},Zr=ht((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=n??{},p=u?.map((e=>e.currency))??[Jr],g=i((e=>t=>e?{...t,...qr(t),...Wr(t,e),...Ur(t,e),...Hr(t,e)}:t)(u),[u]),[x,{field:f}]=jt({moneyValue:nr(d,2e4),monthsValue:lr(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:Jr},{normalize:g}),b=f?.("currency")?.value??Jr,y=f?.("isNewClient")?.value,v=Kr(u,b),w=Er(x,v,s),{rate:N,income:k,finalSum:S,type:C=""}=w,T=i((()=>{Tr({field:f,defParams:wr(v,y),calcParams:w,monthsValue:"minMonths",map:Gr})}),[f,u]);a((()=>{!Vr(d)&&v&&T()}),[d,u]);const I=N===wr(v,y)?.rate;return o(Li,{className:e,title:t,...m,children:c("section",{className:h(Oi,e),children:[c("div",{className:Fi,children:[c("div",{className:"flex gap-m",children:[Gi({className:"w-full",title:`Сумма, ${b?.text}`,min:w.minSum,max:w.maxSum,...f("moneyValue"),value:w.moneyValue,postfix:b?.text,step:Qr(b?.key)}),u&&u?.length>1?o(zn,{label:"Валюта",options:p,...f("currency")}):null]}),kr({title:"Срок, месяцев",min:w.minMonths,max:w.maxMonths,availableMonths:w.availableMonths,...f("monthsValue"),value:w.monthsValue}),Yr({...w,...s},f)]}),Xi({rate:N,children:ts(T,I)}),dr({income:k,finalSum:S,buttons:[...l,es(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:f("isMonthlyInterestPayment").value})]})})})),Qr=(e="")=>Fr(e)?1e3:100,es=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},ts=(e,t=!1)=>t?null:o(aa,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),ns=e=>ls({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ls({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ls=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],as={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},is=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[as],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>ns({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=mr(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=mr(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>ns({row:e,userInputParams:t,paramsViewSettings:n})&&ur(l+r,["minSum","maxSum"],e)&&ur(i,["minSumOld","maxSumOld"],e)&&ur(r,["minSumExtra","maxSumExtra"],e)&&ur(a,["minMonths","maxMonths"],e)))||as)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=Ir(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},rs=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=jt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=is(s,n,i),u=Cr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Li,{className:e,title:t,...r,children:c("section",{className:h(Oi,e),children:[c("div",{className:Fi,children:[Gi({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Gi({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),kr({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),ss({...m,...i},d),m.isExtraMoney?Gi({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:u})]}),c("div",{className:h(Ui,"@4xl:w-1/2"),children:[o(Hi,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Hi,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Hi,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Hi,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:u}),$e(l,{isVertical:!0}),qi(a)]})]})})})),ss=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Jt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Jt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Jt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),os=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=ol(e,{normalize:(e=a)=>n&&l?String(cl(Number(cs(e)),n,l)):cs(e),format:Ue(r)}),d=i((e=>t&&t(cs(e))),[t]);return o(sn,{onChange:d,...s,...c})})),cs=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),ds=d((e=>o(os,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Re,{size:"text-xl",font:"font-light",children:"₽"})})}))),ms={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},hs={amount:1500},us=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=jt(hs),[u,p]=l(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:ms[r],children:[o(ds,{valid:!u,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(aa,{className:"w-full mt-lg",type:"submit",disabled:u,children:i.text}):null]})]})})),ps=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(H,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),gs="relative h-full",xs={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},fs=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(vs),r=n?{defaultPadding:"p-6xl pb-m"}:{};return R({...l,renderProps:(n,l,a)=>c("div",{className:bs(n,{someCardsHighlighted:i}),children:[B(n,l,{className:ys(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),vs(n)?ps({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},bs=(e,{someCardsHighlighted:t})=>h(gs,t&&(vs(e)?"pt-3xl":"pt-3xl sm:pt-16")),ys=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>h(gs,"min-w-80",xs[l],t&&(vs(e)?"pt-3xl sm:pt-16":"pt-3xl"),Pa(n),n&&"h-full"),vs=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,ws=ht((({className:e,visibleItemCount:t=0,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(ai,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?Ns(s?.block?.blocks):[],hasBlur:!0,children:fs({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Ns=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],ks="z-10 border border-solid w-full h-full",Ss=h(ks,"absolute hidden @xl:block border-transparent"),Cs=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:h("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:h(Ss,"top-9 right-12 bg-green-dark")}),o("div",{className:h(Ss,"top-6 right-8 bg-green")}),o("div",{className:h(Ss,"top-3 right-4 bg-green-light")}),c("div",{className:h(ks,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),$e([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Ts={black:"bg-black",white:"bg-white"},Is=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ce,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:$e([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Re,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Bs)]}):null,a?c(Re,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Bs=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Ts[e]}`},String(t)),Ps=d((({icon:e,...t})=>{const n=he(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),Ms=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?Rs(l):null]})}))),Rs=e=>o("div",{className:h("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(Ps,{...e},String(t))))}),Vs=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Ds=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=he()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:h("block",e),...t?r:{},role:t?"link":"none",...ue(a),children:i})})),zs=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],As=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>zs.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ee(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},js(a));return c("div",{className:h("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:$e(m,{className:_s(s??!1,a??!1,n),buttonClassName:u})}),r?o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),js=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",_s=(e,t,n=!1)=>h(e||t?"basis-full":"",!t||n&&e?"":"flex-nowrap"),Es=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:x,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...w})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...w,children:o(Ds,{href:a,target:m,className:"h-full",data:Vs(v),children:c(Ce,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:u,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ge(Ee(i)?o(ne,{image:i}):null,f),buttons:d.length?o(As,{media:d,stretched:!0,showButtonText:!0,version:w?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(_e,{benefits:x}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,$s(l,p)]})})}))),$s=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Ls=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Re,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(Re,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:$e(a)}):null]},String(t))},Os=d((({className:e="",title:t,align:n="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:u,...p})=>{const x=d.map(Ls),[f,b]=s>0?[x.slice(0,s),x.slice(s)]:[x,[]],[y,v]=l(!1);return a((()=>ce.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[Ee(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(N,{className:h("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(di,{renderFoldableSection:()=>c("div",{children:[f,o(mi,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?Fs(y,m?.parent,u):null}):o("div",{children:f})]})})),Fs=(e,t,n)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&ce.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",...e?ue(n):{},children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(H,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Us=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Ws=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),Hs=1e9,qs={sum:{min:1e4,max:Hs},period:3},Ks=ht((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Ti(qs,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:Ys(e)})}),u=s.map((([,e])=>e?.paramsSource?.rateRows)),p=Xs(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(yi,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(ds,{label:l?.title,min:500,max:Hs,...d("sum",{parse:e=>({min:Number(e),max:Hs}),format:({min:e})=>String(e)})}),o(pl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(gi,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Ys=e=>st((e?.paramsSource?.rateRows||[]).filter(Us).flatMap((e=>Ws(e.minMonths,e.maxMonths)))),Xs=e=>st(e.flatMap((e=>e||[])).filter(Us).flatMap((e=>Ws(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Gs=[{key:"10"},{key:"50"},{key:"100"}],Js=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(gn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:Gs,iconVersion:"black"})]})},Zs="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",Qs=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:Zs,"aria-label":`Страница ${i}`,children:i},String(t)):null},eo={width:"24",height:"24"},to=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(H,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:no(1===e),...eo})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Zs,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(Qs),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Zs,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(H,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:no(e===n),...eo})})]})},no=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",lo=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(to,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(Js,{itemCount:l,onItemCountChange:a}):null]}),ao=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",rn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),io=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(ao,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Mn,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Mn,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(aa,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),ro=(e,t)=>o(Di,{...e,iconBgVersion:t,className:"shrink-0"}),so=({title:e,timestamp:t,publicId:n})=>{const l=he(),{href:a}=l({href:`/api/v1/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[ro({icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Re,{size:"text-m","font-weight":"font-light",children:xt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)},oo="/api/v1/depository",co={startDate:void 0,endDate:void 0,query:""},mo=ht((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:u}]=jt(co),{totalPages:p=0,items:x=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?xt(l,!0):"",r=a?xt(a,!0):"",s=new URLSearchParams(oo);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=nl(oo+o,rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),f=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o(io,{filtrationState:d,field:m,onClearFilter:u}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),x.length?x.map((e=>o(so,{...e},String(e.publicId)))):o(Ba,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(lo,{currentPage:n+1,onPageChange:f,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),ho=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,uo=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:ho(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),po="location";function go(e="Москва"){const[t,n]=((e,t,n)=>{const[r,s]=l(n||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((n=>e.fire(t,n)),[e,t])]})(ce,"location",fo()??{name:e}),r=i((e=>{bo(e),n(e)}),[]),{data:s}=nl(xo()?null:"/api/v1/region",rt);return a((()=>{s&&!xo()&&n(s)}),[s]),[t??{name:e},r]}const xo=()=>Boolean(globalThis.localStorage?.getItem(po)),fo=()=>{try{const e=globalThis.localStorage?.getItem(po);return e&&JSON.parse(e)}catch(e){return null}},bo=e=>{try{globalThis.localStorage?.setItem(po,JSON.stringify(e))}catch(e){}};var yo;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(yo||(yo={}));const vo=new Intl.NumberFormat("ru",{style:"currency",currency:yo.RUB}),wo=e=>e?vo.format(e):"",No="text-m font-light text-secondary-text ",ko=`${No} text-left`,So=`${No} pl-5xl text-center`,Co=`${No} pl-5xl text-right`,To={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Io=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:ko,children:o(Re,{size:"text-m",children:"Валюта"})}),o("th",{className:So,children:o(Re,{size:"text-m",children:"Купить"})}),o("th",{className:Co,children:o(Re,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Bo)})]}))),Bo=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:To[t]},width:"24",height:"24"}):null,o(Re,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Re,{size:"text-h6",children:wo(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Re,{size:"text-h6",children:wo(e?.buyExchangeRate)})})]},t)},Po={icon:"GpsIcon"},Mo=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Di,{...Po,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Ro=(e,t,n)=>{const l=Number(Vo(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},Vo=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Do=e=>Pt([[e=>e.value!==yo.RUB&&e.oppositeValue!==yo.RUB,()=>e.handleConvert(e.value,yo.RUB)],[e=>e.value===yo.RUB&&e.oppositeValue===yo.RUB,()=>e.handleConvert(e.value,yo.USD)],[e=>e.value===yo.RUB&&e.oppositeValue===yo.RUB,()=>e.handleConvert(e.value,yo.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function zo(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(sn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(gn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Ao=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||yo.RUB,selectBuy:n?.[0]?.currency?.currency||yo.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[zo({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:jo(r,d,n),value:r.inputSell,setValue:e=>Eo(d,n)(e,r.selectSell,r.selectBuy)}),zo({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:_o(r,d,t),value:r.inputBuy,setValue:e=>$o(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),jo=(e,t,n)=>l=>{t({selectSell:l}),Do({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{Eo(t,n)(e.inputSell,l,a)}})},_o=(e,t,n)=>l=>{t({selectBuy:l}),Do({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>$o(t,n)(e.inputBuy,l,a)})},Eo=(e,t)=>(n,l,a)=>{e({inputSell:Vo(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(Ro(n,i,l===yo.RUB)||"")})},$o=(e,t)=>(n,l,a)=>{e({inputBuy:Vo(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(Ro(n,i,l===yo.RUB)||"")})};const Lo=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const[a]=go(),i=function(e){const t=e?.code||"000",{data:n}=nl(`/api/v1/exchangerates?regionCode=${t}`,rt);return n||{}}(a),r=Oo(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:yo.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:yo.RUB}}),o(g,{className:h("box-border min-h-80",e),...l,children:o(Ce,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(Io,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Mo,{address:i?.address})]}),o(Ao,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:n})]})})})})),Oo=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Fo=d((({className:e="",items:t})=>{const n=he();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(Uo(n))})})),Uo=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...ue(t),children:a||null})},String(l)):null},Wo=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>o(si,{tag:"button",className:h("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:l,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[ro(a,t),e?o(Re,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(H,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Ho=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",qo=(e=!1)=>e?"MinusIcon":"PlusIcon",Ko=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Yo=ht((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:l="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=Ne();return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(di,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(mi,{className:h("gap-lg",Ho(m)),isUnfolded:e,children:R({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Xo({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),Xo=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?Ko(e):qo(e))(a,r);return"accordion"===e?o(Wo,{label:s,labelIcon:n,labelIconBgVersion:l,icon:c,onToggle:i}):o(oi,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Go=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:Jo(e)}))),Jo=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(Yo,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(Fo,{items:e.items}):null},String(t)))),Zo=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(Qo)}):null)),Qo=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Re,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(ec)})]},String(t)),ec=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:tc(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),tc=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${nc(t)}`,children:o(Re,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},nc=e=>e.replaceAll(/\D/g,""),lc=d((({className:e="",index:t,text:n,...l})=>{const a=he(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:h("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),ac=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Re,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(lc,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),ic=d((({className:e="",index:t,...n})=>{const l=he(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),rc=d((({className:e="",links:t,license:n})=>c("div",{className:h("@container space-y-lg",e),children:[n?o("div",{children:o(Re,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(ic,{index:t,...e},String(t))))}):null]}))),sc=ht((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{};n.options?.page?.common;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:u,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Go,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Zo,{items:r}),m?o(be,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(As,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(be,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(ac,{title:d,links:i}),o(rc,{links:a,license:u})]})})),oc=ht((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],u=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,x=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(zn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(be,{href:p,target:"_blank",className:h("p-m w-full @xl:w-auto",u),data:Vs(i,s?.key),children:x})}):null]})})})),cc={width:"103",height:"21"},dc={"bg-white":"color",transparent:"white"},mc={"bg-white":"text-primary-main",transparent:"text-white"},hc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:dc[e]},className:mc[e],width:n?.width,height:n?.height}),uc={"bg-white":"text-primary-text",transparent:"text-white"},pc=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...ue(s),children:[hc(i,n?.image,cc),r?l??o("div",{className:"ml-s",children:o(Re,{font:"font-medium",color:uc[i],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),gc={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},xc=d((({version:e,text:t,mobileText:n,...l})=>{const a=Ne()?n:t;return a?o(be,{className:h("py-s px-lg font-light whitespace-nowrap",gc["transparent"===e?"transparent":"default"]),...l,children:a}):null})),fc=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:l,version:a,backwardButton:r})=>{const s=V(),d="/"===s.pathname,{dataFooter:m,dataHeader:h,...u}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(pc,{className:"my-2xs",bgColor:e,logo:u,data:h,showTitle:!1})}):bc(p,r),o(xc,{version:a,...l})]})})),bc=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(H,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,yc={"bg-white":"primary",transparent:"transparent"},vc=ht((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=yc[e],portal:l,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=l||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:n,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(fc,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...i})})})})),wc=(e=!1)=>e?{}:{padding:"p-0"},Nc={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},kc=ht((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=V();return o(g,{className:h("relative flex flex-col",Nc[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:R({...c,extraProps:{className:h("w-full",Pa(r)),...wc(l)}})})}),{childrenTypes:[]}),Sc=ht((e=>o(kc,{...e})),{childrenTypes:[]}),Cc=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?h("flex",Ei[n]):"";return o(g,{className:h(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:l})})})),Tc=["байт","Кб","Мб","Гб","Тб","Пб"],Ic=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...ue(i),children:[e,t?c(Re,{size:"text-l",font:"font-light",children:[t," ",Bc(d,m),o(Re,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Bc=(e,t)=>e||t?o("span",{children:", "}):"",Pc=(e,t)=>(n,l)=>{const a=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Tc[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Rc(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(Ic,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:Mc(t),data:n?.data}),o(Pe,{__html:n?.__html})]},String(l))},Mc=e=>e?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,Rc=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},Vc=d((({href:e,__html:t,target:n})=>{const{close:l}=de(),a=V(),r=U(a)(e),s=i((()=>{l()}),[]);return c(ra,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Pe,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(be,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o(aa,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Dc=d((({text:e,href:t,target:n,__html:l})=>{if(!e&&!l)return null;const a=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Vc,{...e}),n),close:n}})({__html:l,href:t,target:n}),r=i((()=>a.open()),[a]);return o("button",{className:"text-primary-main",onClick:r,children:e})})),zc={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Ac=ht((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=V();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",zc[r]),role:"list",children:a.map(jc(d,i))}):null]})})),jc=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?_c(n,l):Pc(e,t)(n,l)},_c=(e,t)=>{const n={text:e.text,target:e.target,__html:e.reportSource?.__html};return e.reportSource?.__html&&e.text?c("div",{role:"listitem",children:[o(Dc,{...n,href:Ec(e)?e?.href:e?.attachment?.src}),o(Pe,{__html:e?.__html})]},String(t)):null},Ec=e=>"href"in e,$c=ht((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...x})=>{const f="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...x,children:c(Ce,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:u,className:h("whitespace-pre-wrap",n)}),rightImage:b,buttons:$e(l,{className:"flex-wrap"}),children:[a?o(Re,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Pe,{__html:r,itemSize:"list-m"}):null,o(Re,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),Lc=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Oc=(e=[],t={})=>e.filter((({content:e={}})=>Si(t,e))).length,Fc=(e,t)=>e===t;const Uc=(Wc=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(Fc,((e=Fc)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,n])=>Wc(n,t[e])))));var Wc;const Hc=[],qc={},Kc={primary:"bg-white/30",secondary:"bg-main-divider"},Yc={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Xc=d((({count:e,version:t="secondary"})=>{const n=Ne(),l=n?"bg-main-divider":Kc[t],a=Yc[t][n?"mobile":"desktop"];return o("div",{className:h("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Re,{size:"text-xs",color:a,children:e})})})),Gc=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:h("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},Jc={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Zc={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Qc={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},ed={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},td=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:u,...p}=t;return o(i,{className:h("h-12","block flex-1","cursor-pointer",Jc[l],n?ed[l]:Qc[l]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Zc[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Gc({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Xc,{count:m,version:Lc(n,l)})}):null]})})})),nd=d((e=>o(e?.item?.href?ld:ad,{...e}))),ld=d((e=>{const t=he(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(td,{...e,tag:"a",item:a,onClick:l})})),ad=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(td,{item:e,onClick:l,...n})})),id=(e,t,n)=>(l,a)=>o(nd,{isActive:l===e,onClick:t,type:n,item:l},String(a)),rd=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:h("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(id(l,a,t))}))),sd={categories:[],extraOptions:[],propertyType:[],stage:[]},od=ht((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=Ti(sd,{block:a.block,page:a.options?.page}),x=i(((e=sd)=>p(e)),[]),f=(({hotFilters:e=Hc,filtrationState:t=qc,blocks:n=Hc,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Uc(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Oc(n,t.filter),version:Lc(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:x});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(rd,{...f}),o(yi,{filtrationSchema:n,resetButton:l,field:m,reset:u}),o(gi,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),cd=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),dd=d((({children:e})=>cd?e:null)),md=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:h("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:h("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),hd="/icons/MapMarkerClusterIcon.svg",ud="/icons/MapMarkerClusterYellowIcon.svg";function pd({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n?.length)return;t.geoObjects.removeAll();const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=gd("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=gd("workplaces",e,a),r=xd(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=xd(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=xd(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const gd=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?hd:ud,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),xd=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?hd:ud,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),fd={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},bd={...fd,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},yd=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(bd).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(H,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),vd=e=>globalThis[e];function wd(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=vd(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(vd(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(vd(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}const Nd={...fd,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},kd=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(Nd).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(H,{name:n,width:"20",height:"16"})})})),Sd=[55.753995,37.614069],Cd=d((({points:e,className:t="",zoom:n=5,isLoad:l})=>{const i=s(null),r=wd("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{i.current?(pd({yandexMaps:r,map:i.current,points:e,isLoad:l}),i.current.setCenter(Td(e))):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:Td(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),pd({yandexMaps:r,map:i.current,points:e,isLoad:l})}))}),[r,e,n,l]),!r)return null;const d="z-10";return c("div",{id:"map",className:h("relative","w-full",t),children:[l?o(md,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(kd,{yandexMaps:i}),o(kd,{yandexMaps:i,direction:"out"})]}),yd(i,r,h("right-2 top-80",d))]})})),Td=e=>{const t=[Bd(Id(e,0)),Bd(Id(e,1))];return t.every((e=>e))?t:Sd},Id=(e,t)=>e.map((e=>e.coords?.[t])),Bd=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Pd=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Pe,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Re,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Md={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Rd="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Vd=(e,{field:t,reset:n},l)=>{const a=l?5:6,i=(e||[]).map((e=>o(Jt,{text:Md[e],...t(e)},e))),[r,s]=a>0?[i.slice(0,a),i.slice(a)]:[i,[]];return o("div",{children:e?.length?o("div",{children:o(di,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Rd,children:r}),o(mi,{className:Rd,isUnfolded:e,children:s})]}),renderFoldButton:Dd(n,l)})}):null})},Dd=(e,t)=>({isUnfolded:n,onToggle:l})=>c("div",{className:"flex space-x-lg",children:[t?o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(H,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:l}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:zd()})]}),zd=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(H,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),Ad=()=>{},jd=()=>[],_d=e=>"all"===e?"block":"hidden",Ed=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=Ad,renderRemoteWorkplaceCard:s=Ad,filterItems:d=jd,getBalloon:m=Ad,getBalloonRemoteWorkplaces:u=Ad,initFilterState:p={},descriptionData:g,title:x})=>{const f=x?.includes("Офис"),[b,{field:y,reset:v}]=jt(p),[w,N,k,S]=r((()=>{const e=d(t,b),n=d(a,b),l=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:u({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,l,n,e.length+n?.length]}),[t,a,b]),[C,T]=l("all");return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[$d(x,S),g?Pd(g):null,f&&Ld(t,C,T),o("div",{className:h("pb-3xl",_d(C)),children:Vd(Object.keys(p),{field:y,reset:v},f)})]}),o("div",{className:"h-[600px]",children:o(dd,{children:o(Cd,{points:N,isLoad:n,className:"h-full"})})})]}),c(dd,{children:[w.map(i),k.map(s)]})]})})),$d=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Re,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Ld=(e,t,n)=>{const l=Lc("all"===t),a=Lc("business"===t),i=(e,t,l)=>(e.currentTarget===e.target&&"business"===t&&l.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),n(t),l);return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(aa,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(aa,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Od={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Fd=d((({className:e,children:t,color:n="gray"})=>c("div",{className:h("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Od[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Re,{size:"text-m",color:Od[n].text,children:t})]}))),Ud=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:Wd({textItems:i,subText:t,children:n,isPhone:l,...a})})),Wd=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Re,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Hd(n,s),a?o(Re,{color:l,size:"text-m",children:a}):null]}),Hd=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Re,{size:"text-l",children:t?o("a",{href:`tel:${qd(e)}`,children:e.trim()}):e.trim()},String(n)))),qd=e=>e.replace(/\D/g,""),Kd=d((({className:e,children:t})=>o("div",{className:h("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Yd=["ArrowDownIcon","ArrowUpIcon"],Xd=["Подробнее","Скрыть"],Gd=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:Xd[Number(e)]}),o(H,{className:"text-primary-text",name:Yd[Number(e)],width:"16",height:"16"})]}),Jd=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:em(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:em(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Fd,{color:"green",children:em(s)})})]}),o("div",{className:"hidden sm:block",children:o(Kd,{className:"flex-wrap",children:m?.map(Qd)})}),o(di,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(mi,{isUnfolded:e,children:o(Kd,{className:"flex-wrap",children:m?.map(Qd)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Gd({isUnfolded:e,onToggle:t})})]},String(d))},Zd=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${em(t)} №${n}`,body:e.toUpperCase()}),Qd=(e,t)=>o(Ud,{...e},String(t)),em=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",tm=[];const nm=async e=>{const t=await it(e,{method:"GET"});return Array.isArray(t)?t:tm},lm={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},am={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},im=d((({descriptionData:e,className:t})=>{const[n]=go(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=nl(`/api/v1/atms?regionCode=${e}`,nm);return{data:t||tm,isLoad:!t&&!n}}(l);return o(Ed,{className:t,filterItems:rm,data:a,isLoad:i,initFilterState:lm,renderCard:Jd,getBalloon:Zd,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),rm=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>am[t](e))),n=!l.length||l.some((t=>am[t](e)));return t&&n}))},sm=e=>{const t=cm(e);return o(Ud,{label:"Режим работы",value:t,className:"max-w-none"})},om=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",cm=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[om({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),om({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},dm=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],mm=e=>dm.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),hm=e=>{if(!e)return null;const t=um(e);return c(Kd,{className:"border-none",children:[o(Ud,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(pm)})}),o(Ud,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]})},um=e=>{const t=dm.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},pm=({short:e,status:t},n)=>o("div",{className:h("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Re,{size:"text-xs",children:e})},String(n)),gm=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Ud,{label:"Валюта",value:e.currency}):null,t?o(Ud,{label:"Купить",value:String(t)}):null,n?o(Ud,{label:"Продать",value:String(n)}):null]},String(l)),xm=(new Date).getDay(),fm=e=>{const[t]=e?.slice(xm-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Fd,{color:"green",children:a}):null,n&&i?o(Fd,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Fd,{color:"red",children:"Выходной"})},bm=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",ym=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(Ud,{label:e,value:t&&n?n:"",subText:bm({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),vm=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,wm=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Nm=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,km=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=mm(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),fm(u)]}),o("div",{className:"hidden sm:block",children:Sm({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(di,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(mi,{isUnfolded:e,children:Sm({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Gd({isUnfolded:e,onToggle:t})})]},String(h))},Sm=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=mm(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Kd,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Ud,{label:"Факс",value:t,isPhone:!0}),o(Ud,{label:"Телефон филиала",value:e,isPhone:!0}),o(Ud,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Ud,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(Ud,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Ud,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(Kd,{children:o(Ud,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(ym)})})}):c(Kd,{children:[o(Ud,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(pm)})}),sm(d)]}),r?.businessScheduleVisibleTag?hm(r?.businessScheduleDescription):null,s?.currencies?.length?o(Kd,{className:"flex-wrap",children:s?.currencies?.map(gm)}):null]})},Cm=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=mm(e),n=e?cm(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?vm(n):Nm(n,l):wm(n):null})(n)}`;return{header:l,body:i}},Tm=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Re,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Im({workScheduleDescription:t})}),o(di,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(mi,{isUnfolded:e,children:Im({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Gd({isUnfolded:e,onToggle:t})})]},String(n)):null,Im=({workScheduleDescription:e})=>c("div",{children:[c(Kd,{className:"flex",children:[o(Ud,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Ud,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание банковских карт"})}),o(Ud,{label:"Операции для физических лиц",children:o(Re,{children:"Инвестиционное и накопительное страхование"})}),o(Ud,{label:"Операции для физических лиц",children:o(Re,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Ud,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]}),Bm=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Pm={branches:[],remoteWorkplaces:[]};const Mm=async e=>await it(e,{method:"GET"})||Pm,Rm={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Vm={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},Dm=d((({className:e})=>{const[t]=go(),n=t?.code??"000",{data:l,isLoad:a}=function(e){const{data:t,error:n}=nl(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,Mm);return{data:t||Pm,isLoad:!t&&!n}}(n);return o(Ed,{className:e,filterItems:zm,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,initFilterState:Rm,renderCard:km,renderRemoteWorkplaceCard:Tm,getBalloon:Cm,getBalloonRemoteWorkplaces:Bm,title:`Офисы филиала ${t?.name}`})})),zm=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Vm[t](e)))))},Am=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:h(t),defaultPadding:"p-0",...n,children:"offices"===l?o(Dm,{}):o(im,{descriptionData:e})})})),jm=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:h("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),_m=d((({className:e,padding:t,slides:n=[],...l})=>o(g,{className:h("overflow-hidden relative",e),padding:t,...l,children:o(ai,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Xe,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),Em=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ee(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?$m({__html:i,richVersion:r}):null,Lm({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Lm({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Lm({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?$e([l]):null]})]}))),$m=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),Lm=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(H,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Re,{size:"text-xl",color:l,children:t})]})]}):null,Om=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Pe,{__html:t,richVersion:n})})})),Fm=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(Xl,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Xl,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Um=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(gn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),Wm=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Um,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Um,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Hm=["От 1 дня","До 365 дней"],qm=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Re,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(pl,{min:1,max:365,value:e,items:Hm,onChange:t})]}))),Km=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Um,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Um,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Ym=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Wm,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:Xm(m)}),o(qm,{days:a,setDays:e=>m({days:e})}),o(Km,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Gm(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Fm,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),Xm=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Gm=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Jm=d((({days:e,tariffs:t=[]})=>{const n=Qm(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Zm("Аренда за",e),Zm("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(k,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),Zm=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Qm=(e,t)=>{const n=eh(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},eh=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},th=(e,t)=>e.find((e=>e.branchCode===t)),nh=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=th(l,n.selectedBranch),d=lh(s?.safeBoxCaseVolumes),m=ah(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,h=ih(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Ym,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Jm,{days:n.days,tariffs:h})]})})),lh=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],ah=(e,t)=>e?.find((e=>e.volume===t)),ih=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,rh=[];const sh=async e=>await it(e,{method:"GET"})||rh,oh=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,h]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=kl(),p=ch(m.selectedRegion,u),x=function(e){const{data:t}=nl(e?`/api/v1/safeboxes?regionCode=${e}`:null,sh);return t||rh}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=th(x,m.selectedBranch)||x,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(nh,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Cd,{points:b,className:"h-[640px]"}):null]})})),ch=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,dh={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},mh=(e,t,n)=>(l,a)=>{const{button:i}=l;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:hh(e,n)(l,a)}),c("div",{className:h("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[uh(l),i?.text?o(be,{className:"box-border py-s w-full max-w-60 mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},hh=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=ph(e,i),s=i?"transparent"===t:t;return o(g,{className:h("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:gh({step:n,iconVersion:a,i:l,stepVersion:t})})})},uh=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:h("text-s font-light text-left",dh.description),children:e.description}):null,o(Pe,{__html:e.__html})]}),ph=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",gh=({step:e,iconVersion:t,i:n,stepVersion:l})=>{return Ee(e?.icon)?o(ne,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:h("text-h4","transparent"===l?dh.iconText:(a=l,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var a},xh=d((({className:e="",title:t,description:n,steps:l=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=l.length>3;return c(g,{className:h("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:l.map(mh(d,r,i))}):null,$e(a,{isVertical:!0})]})})),fh=d((({isActive:e,item:t,onClick:n})=>c("div",{className:h(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(H,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),bh=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:h("relative min-h-full bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(ia,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),yh=({menuRef:e,dialogRef:t,closeDialog:n,openDialog:l,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();l(o(bh,{onClick:e=>e.stopPropagation(),onClose:n,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(N,{as:"h4",title:c[r].description||c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];function vh(e){throw new Error(e)}const wh=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(n),o()}),[n,e]),d=i((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return a((()=>ce.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:vh(e)}}))),[c,d]),n},Nh=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const kh=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(Sh,{...e},String(t))))})]}):null,Sh=d((({icon:e,...t})=>{const n=he(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Ch=(e,t)=>n=>n.name?o(Ds,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Vs(e,n.name),children:o(Re,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Th=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:h(rn,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Ih=d((({foreignOffices:e,branches:t})=>{const[n,a]=go(t?.default),r=he(),{href:s}=r({href:`/branches/${n.slug}`}),[d,m]=l(""),h=Ph(kl()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(h,Bh),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(ra,{className:"pb-20",head:c("div",{children:[o(Re,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Ds,{href:s,className:"inline mx-2xs text-primary-main",children:n.name})]})}):null,o(Th,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&Nh(e.toLowerCase())(d.toLowerCase())>=.8)).map(Ch(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((x=g,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Re,{size:"text-h6",children:e})}),t.map(Ch(f,x))]},e)))}),kh(e)]});var x,f})),Bh=e=>e.name?.charAt(0)||"",Ph=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Mh=d((({menuRef:e,menuItem:t,locationDialogProps:n,closeAll:l})=>{const i=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Ih,{...e}),n),close:n}})(n||{}),[{name:r}]=go(),s=e?.current?.getBoundingClientRect(),c=G(X.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open(),"reload"===e.data.type&&l(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(bh,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center justify-center px-xl",children:o(N,{as:"h4",title:t?.title,className:"font-medium"})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),Rh="burgerMenuDialog",Vh=({menuRef:e,centralMenuItem:t,closeAll:n,openDialog:l,locationDialogProps:a})=>{const i=wh(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Rh,i);return[r,{toggle:()=>{r?n():l(o(Mh,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:n}),{id:Rh})}}]},Dh=[],zh=ht((({sticky:e,...t})=>{const{menuItems:n=Dh}=e??{},a=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),h=r.slice(d),[u,p]=l(-1),[x,f]=l(""),{open:b,closeAll:y}=de(),v=i((()=>{p(-1),f(""),y()}),[y]),w=mn(v),N=s(null),[k,{toggle:S}]=Vh({menuRef:N,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.header}),[{openBottomMenuItemDialog:C}]=yh({menuRef:N,dialogRef:w,closeDialog:v,openDialog:b,leftItems:m,rightItems:h}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{f(t),p(e),y(),C(e,t)}),[y,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(Ah(I,"left",{activeIndex:u,currentItemPosition:x})),o(fh,{item:a,isActive:k,onClick:e=>T(e)}),h.map(Ah(I,"right",{activeIndex:u,currentItemPosition:x}))]})})})),Ah=(e,t,n)=>(l,a,i)=>o(fh,{item:l,isActive:i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t,onClick:r=>{i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t||r.stopPropagation(),e(a,t)}},l.title||String(a)),jh="hidden sm:flex absolute z-40",_h={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Eh=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=Ka({itemCount:t?.length||0});return a((()=>$h(r.current,t,n)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(za,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:_h[i].item,gap:_h[i].gap,children:t.map(id(n,l,i))}),s.canScrollLeft?o(Za,{className:h("left-6",jh,_h[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(Qa,{className:h("right-6",jh,_h[i].buttonTop),onClick:s.scrollRight}):null]})})),$h=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},Lh={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Oh=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:h(Lh[t].wrapper,e),children:o(Eh,{className:Lh[t].component,tabsType:t,...n})}):null,Fh=ht((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=Uh(n??{}),p=V(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(qh(f,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(u))),w=f[y],N=f.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[u]?f.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[u])):N;v(-1===e?0:e)}),[b,N,u]);const k=Hh(f[y],y),S=i((e=>{const t=f.indexOf(e),n=f[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(u,e?.tabName??String(t)):n.delete(u),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[f]);return c(g,{className:h({"sticky top-1 z-20":d&&x},e),defaultPadding:"p-0",block:n,...m,children:[Oh({className:h({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!x}),items:Wh(t,f),activeItem:w,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>M(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Hh)?.filter(Boolean)||[]}),Uh=({__id:e,anchor:t})=>t??e??"tabs",Wh=(e,t)=>t?.length?t:e,Hh=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",qh=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Kh={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Yh=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Kh[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Xh=d((({className:e="",isOpen:t,onClick:n})=>o(be,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),Gh={Buttons:({buttons:e})=>$e(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Pe,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Re,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Re,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(Xh,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},Jh=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return Zh({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Zh=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in Gh))return null;return o(Gh[n],{...t,...l})},Qh=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Jh,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),eu=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),tu=(e,t)=>e?.length>0?o("div",{className:h("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Re,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,nu=d((({rows:e})=>{return o(za,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=h("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Re,{size:"text-xl",font:"font-light",children:l.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${eu(a,t)}px)`},children:a?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Re,{size:"text-xl",children:e.data}):null,e?.cols?tu(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),lu=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Re,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(nu,{rows:t.rowsData})})})]},l)}))}))),au=(e=!1)=>""+(e?"text-white":"text-secondary-text"),iu=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:h("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(Re,{size:"text-xl",font:"font-light",color:au(t===n),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(H,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),ru=ht((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(iu,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(lu,{activeTabIndex:r,items:m}),o(Xh,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Re,{size:"text-h6",children:"Данных нет"}),o(Xh,{onClick:n,isOpen:!0})]})})),su=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:h("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(ru,{...t,onClick:n})}):null]}))),ou=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[u,p]=l(void 0),g=i((e=>p(e)),[]);return c(su,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Yh,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Qh,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function cu({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?c("div",{children:[n?o(Ja,{className:h("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?o(Ja,{className:h("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const du=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,cu({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),mu=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],u=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[x,f]=((e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:p,visibleItemCount:2}),b=(u||[]).map(((e,t)=>o(ou,{row:e,activeIndex:x,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]];return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?o(di,{renderFoldableSection:({isUnfolded:e})=>c(du,{controls:f,children:[y,o(mi,{isUnfolded:e,children:v})]}),renderFoldButton:ci}):o(du,{controls:f,children:b})})]})})),hu=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:h("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?uu():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Re,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?pu(n):null,a?o(Pe,{richVersion:i,__html:a}):null]})]}))),uu=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),pu=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),gu=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:n})}):null]}))),xu=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(gu,{prefix:t,unit:n,suffix:l})})})),fu={AdTile:pt,ApplicationForm:ba,ApplicationLeadForm:Ia,BankAccountFiltration:Pi,BenefitsBlock:zi,BonusBenefitsBlock:_i,ButtonsBlock:$i,CalculatorBonus:er,CalculatorBusinessDeposit:yr,CalculatorCredit:zr,CalculatorDeposit:Zr,CalculatorRefinancing:rs,CardTransfer:us,Carousel:ws,CarouselCard:Cs,CarouselCatalogCard:Is,CarouselLinks:Ms,CarouselRecommendationCard:Es,CarouselTariffsCard:Os,DepositFiltration:Ks,Depository:mo,ErrorBlock:uo,ExchangeRateTile:Lo,Footer:sc,GrantSupport:oc,Header:vc,Headline:C,HorizontalLayout:Sc,ImgBlock:Cc,LinkDocs:Ac,MobileAppTile:$c,MortgageFiltration:od,OfficesAtmsMap:Am,Placeholder:jm,ProductBlock:ut,ProductGallery:_m,RepresentativeOfficeInfo:Em,RichTextBlock:Om,RollupItem:Yo,SafeDepositRental:oh,StepsBlock:xh,StickyBottomMenu:zh,TabsLayout:Fh,TariffsTable:mu,TextBlock:hu,UnitBlock:xu,VerticalLayout:kc},bu=me((()=>{a((()=>{Tt()}),[]);const e=zt();dn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");St({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const yu="cookie",vu=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=ln();!function(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(yu)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(yu,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Pe,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(ia,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null})),wu=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=wh({onCloseAll:e,onClose:t}),{close:l}=de(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return dn(globalThis.document,"keydown",r),a((()=>{n.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[n]),n.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},l)=>o("div",{className:h("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==n.length-1}),children:e},String(t||l))))}):null})),Nu=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);a((()=>ce.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:vh(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return dn(globalThis.document,"keydown",r),e?o("div",{className:h("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),ku="header",Su="footer",Cu="sticky-footer",Tu={},Iu=d((({className:e,data:t=Tu,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=mt(s,r);bu();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:M(a?.header,{...m,slotName:ku})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[R({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),M(a?.footer,{...m,slotName:Su})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.["sticky-footer"],{...m,slotName:Cu})}):null,o(wu,{}),o(Nu,{}),o(vu,{__html:d?.cookieContent?.__html})]})}));Object.assign(Iu,{childrenTypes:[],slots:()=>[ku,Su,Cu]});e.Blocks=fu,e.ContentPage=Iu,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=me,e.joinList=fi,e.packageVersion="0.14.567",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=V,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef");const o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:h("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),x=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:f(t)}))),f=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},w={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=v[n]||"h3";return o(i,{role:"heading",className:h("font-sans m-0",w[t],e),children:l||a})})),k=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=S[n],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(N,{className:h("whitespace-pre-wrap",i),...u?.title,as:r||u?.title.as,title:l}):null,a?o(k,{size:u.descriptionSize,font:u.descriptionWeight,align:i,...p,children:a}):null]})})),T=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function B(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=T,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:h(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const P=[],M=(e,{key:t,ancestors:n=P,slotName:l=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||P,[r.parent,l]]:n},a)))};function R({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?M(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function V(){return V._impl()}V._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),V.setup=e=>{V._impl=e};const D=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return D.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),A=e=>Boolean(e?.includes(":")),j=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),_=e=>Boolean(e?.startsWith("#")),$=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),E=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:A,isLocalURL:j,isHash:_,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:$,hasPrefix:E});const O="/api/",F=`${O}v1/storage`,U=e=>(t,n)=>{if([!t,A(t),_(t),[z.CDN,O].some((e=>E(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${F}/${t}/attachment`;const l=t?.startsWith("/");return $(E(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},H=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const d=V(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,u=U(d)($(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:u,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:q(e,s)}):o(Y,{className:e,children:c("svg",{className:h(K(r),W[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:u,xlinkHref:u})]})})})),q=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},K=e=>e?"":"w-full h-full",Y=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),X=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function G(e=""){try{const[,...t]=new URL(e).pathname.split("/");return`/${t.filter(Boolean).join("/")}`}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!A(t)?U(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const l=V();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:J(l)(e),type:te(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(l)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:h("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),te=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(H,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(Q,{className:e,imageClassName:n,image:t}):null)),le={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},re="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" ");const ce=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}},de=()=>({open:(e,t={})=>ce.fire("dialog",{type:"open",dialog:e,...t}),close:()=>ce.fire("dialog",{type:"close"}),closeAll:()=>ce.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function he(){const e=G(X.SITE_URL),t=V(),{closeAll:n}=de();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:me(l({...e,href:n}))}};function l({href:l,target:a,onClick:i}){return r=>{i&&i(r);const s=!E(l,e||"/");l&&!s&&j(l,a)&&(n(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(l,e)))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const ue=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},pe=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=xe(e)&&"hidden lg:block";return c("div",{className:h(ge(e),"flex gap-xs"),children:[l?o("div",{className:h(r,se[i]),children:l}):null,xe(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(r,se[i]),children:a}):null]})})),ge=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",xe(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},xe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),fe=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:l}),s=he()({onClick:r,href:l,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...ue(d),children:m}))),ve=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:fe({className:e,rounded:l,version:n}),children:a})));function we({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(be,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const Ne=()=>{const[e,t]=l(true);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",n)}}),[]),e},ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Se=(e,{className:t,imageAlign:n})=>e?o("div",{className:h("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Ce=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=Ne(),v=V(),w=i((()=>v.back()),[]),N=b.options?.page?.common?.backwardButton,k=x&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&we({version:t,handleClick:w,text:N}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Se(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[u,f]}),Ie(R({...b,extraProps:{className:"@container-normal"}})),Se(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[Te(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Te=e=>h(e?"row-span-2":"@xl:row-span-2"),Ie=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Be=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pe=d((e=>{const{__html:t="",richVersion:n="",itemSize:l="list-m",isDotted:a=!0}=e,i=a?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(n,l,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Me=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Re=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),Ve=(e,t)=>e?o(Re,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,De=(e,t)=>["label"in e?Ve(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Me(e.description,t)},String(t)):null,"__html"in e?o(Pe,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Be(n.icon,t):null,o("div",{children:De(n)})]}))),Ae=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(ze,{benefitsVersion:t,...e},String(n))))}):null)),je=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(De)}):null)),_e=d((({isTabularBenefits:e,...t})=>o(e?je:Ae,{...t}))),$e=e=>Boolean(e?.src||e?.icon),Ee=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(Le(n))}):null,Le=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Oe(a,r),d=Oe(i,r);return l||a?.icon?o(be,{className:h("basis-full @lg:basis-auto",e),appendLeft:Fe({...a,iconVersion:c}),appendRight:Fe({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Oe=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Fe=e=>$e(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ue=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),We=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(He)}):null)),He=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Re,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ue(2)(t)," ",n||"₽"]}):null]},String(l)),qe=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ke)}):null)),Ke=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Re,{size:"text-m",font:"font-light",children:e})},String(t)),Ye={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Xe=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:w=!0,isImageAlwaysOnRight:N,isImageSecondary:k=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(ne,{image:y}):null,P=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Ce,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Ge(B,w),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:N,buttons:Ee(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?o(_e,{benefitsVersion:s,isTabularBenefits:d,benefits:M}):null,u?o(Pe,{richVersion:p,__html:u,isDotted:m,itemSize:Ye[i]}):null,T,x?.length?o(We,{priceList:x}):null,Je(f)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},Je=e=>e?.length?o(qe,{tags:e}):null,Ze=e=>Boolean(e&&Array.isArray(e)),Qe=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),et=(e,t)=>{return n=e,Boolean(Qe(n)&&"string"==typeof n.$ref)?t.ref(e):Qe(e)?t.record(e):Ze(e)?t.array(e):t.scalar?t.scalar(e):e;var n},tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(nt,e),nt=(e,t)=>e&&t?Qe(e)?e[t]:Ze(e)?e[parseInt(t,10)]:e:e,lt=(e,t)=>et(e,{ref:({$ref:e,...n})=>lt(e?tt(t(e),e):n,t),record:e=>Object.entries(e).map((([e,n])=>({[e]:lt(n,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>lt(e,t)))}),at=(e,t,n=[])=>{et(e,{ref:e=>t(e.$ref,n),record:e=>{for(const l in e)at(e[l],t,[...n,l])},array:e=>{for(let l=0;l<e.length;l++)at(e[l],t,[...n,l])}})};async function it(e,t){try{return e?await rt(e,t):null}catch(e){console.error(e)}return null}const rt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),st=e=>[...new Set(e)],ot={},ct=["/portal-resources"],dt=(e,t)=>lt(e,(e=>t?.[e])),mt=(e,t)=>{const n=(e=>{const t=[];return at(e,(e=>t.push(e))),t})(e),[i,r]=l({});return a((()=>{n.length&&(async e=>Object.fromEntries((await Promise.allSettled(st(e).filter((e=>!ct.some((t=>e.startsWith(t))))).map((async e=>[e,ot[e]||=await rt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(n).then(r)}),[n.join()]),n.length?dt(e,{...t,...i}):e};function ht(e,t={}){const n=d((t=>{const n=mt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const ut=ht((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(Xe,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),pt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>gt(0,t?.length)),[t]),l=t?.[n];return l?o(ut,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(x,{})})})),gt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),xt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},ft=e=>e?.replace(/[^+\d]/g,"");function bt(){return{send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:n,...wt(l,g),...Nt(i,g),...yt(a),...vt(s,"desiredMeetingDate"),...g?vt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...kt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});if(!e?.ok)return null;return await e.json()}catch(e){return null}}}}const yt=e=>e?{phone:ft(e)}:{},vt=(e,t="birthday")=>e?{[t]:xt(e)}:{},wt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Nt=(e,t=!0)=>({[t?"email":"mail"]:e}),kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:ft(e)}:{},St=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e)t[l??""]?.(n,a)},Ct="rshb-query-params";function Tt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Ct)||"";return e&&globalThis.sessionStorage?.setItem(Ct,e),e}function It(e){if(!e)throw new Error("Value should be fulfilled");return e}const Bt=e=>t=>{const[,n]=It(e.find((([e])=>e(t))));return n(t)},Pt=e=>Bt(e.map((([e,t])=>[e,()=>t])));Pt.if=e=>new Mt(void 0,e);class Mt{parent;predicate;unit;get entry(){return[It(this.predicate),It(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Mt(this,e)}then(e){return new Mt(this.parent,this.predicate,e)}else(e){return Bt([...Rt(this),[()=>!0,e]])}}const Rt=e=>[...e?.parent?Rt(e.parent):[],e.entry],Vt=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=Tt();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;if(n){Dt(t?.target)?.(n)}}},Dt=Pt([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function zt(){return zt._impl()}zt._impl=()=>({forwardQuery:Vt}),zt.setup=e=>{zt._impl=e};const At=e=>e,jt=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=l(e),c=i(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return _t(t,n)?t:n}:r(e)):o,[r]);a((()=>{r&&o(r)}),[r]);const[d,m]=l(!1),[h,u]=l({}),p=i(((e,t)=>{const{parse:n=At,format:l=At}=t||{};return{value:l(s[e]),isDirty:d||h[e],onChange:t=>{c((l=>({...l,[e]:n(t)}))),u((t=>({...t,[e]:!0})))}}}),[c,d,h]),g=i((e=>{c(e),u(e)}),[]),x=i((()=>{c(e),m(!1),u({})}),[e]),f=i((e=>{e.preventDefault(),t?x():m(!0),n&&n(s,e)}),[n,s]);return[s,{isDirty:d||Object.values(h).some(Boolean),field:p,update:g,reset:x,onSubmit:f}]},_t=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),$t=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})})),Et=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Lt=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Ot=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],Ft=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Ut="/api/v1/outservice/outserviceregions",Wt=e=>"OUTSERVICE"===e?Ut:void 0,Ht=e=>o("div",{className:"h-6",children:e?o(Re,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),qt=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Kt="appearance-none w-5 h-5 border-solid flex-none",Yt=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Xt=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(qt,{paths:Yt,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:h("flex items-center relative group/box",Jt(l)),onClick:s,children:[o("div",{className:h(Kt,"m-0",a?"rounded-full border-2":Qt(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Zt(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,Gt(n)]})})})),Gt=e=>e?o("div",{className:"ml-s",children:o(Re,{size:"text-l",font:"font-light",children:e})}):null,Jt=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Zt=(e=!1)=>e?"radio":"checkbox",Qt=(e=!1)=>h("rounded border",{"bg-primary-main":e}),en=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Xt,{text:t,value:n,disabled:a,onChange:r},l),Ht(i)]})));function tn(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}const nn=e=>e?o(Re,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,ln="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",an=d((({key:e,className:t="",id:n,name:l,type:r="text",label:d,placeholder:m,value:u="",valid:p=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:w=!1})=>{const N=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&N.current?.focus()}),[v,N]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",T=rn(p);return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[nn(d),w?o("textarea",{className:h("block resize-y min-h-24",S,T),id:h("textarea",n),name:l||n,placeholder:m,value:u,onChange:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:h("h-14",S,C,T),ref:N,id:n,name:l||n,placeholder:m,value:u,onChange:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),rn=e=>e?ln:"border-error",sn=e=>e?.text||e?.key||"";function on(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function cn(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return on(globalThis.document,"click",n),t}const dn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,mn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:dn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:sn(e)}),o(H,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:h("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));function hn({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>ce.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>ce.fire("popup",{type:"update",popup:e,...t}),close:()=>ce.fire("popup",{type:"close"})},h=i((()=>{m.close(),c&&c()}),[c]),u=i((e=>{h(),r&&r(e)}),[h,r]),p=s(null),g=cn(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(mn,{popupRef:g,options:t,value:n,query:l,onChange:u,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,u]),p}const un=d((({className:e,label:t,options:n=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:u="black",onChange:p,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=tn(),[y,v]=l(""),w=g||0===n.length,N=x&&!w,k=i((()=>{v(""),f()}),[]),S=hn({isOpen:x,options:n,value:a,query:y,onChange:p,onClose:k,iconVersion:u});return c("div",{className:h("space-y-xs",e),children:[nn(t),c("div",{className:h("relative",N?"z-20":"z-10"),ref:S,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",gn(s,r,w)),onClick:N?k:b,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:sn(a)||d}),pn(N,u)]}),m&&N?o("div",{className:h("absolute top-0 w-full z-20"),children:o(an,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),pn=(e,t)=>o(H,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),gn=(e,t,n)=>h(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),xn=()=>{},fn=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>n)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=bn(t,e),c=yn(t,i,r);h.push(o("td",{children:o("div",{className:vn(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},bn=(e,t)=>t&&e.toDateString()===t.toDateString(),yn=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),vn=(e,t)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),wn=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Nn=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=xn,setValue:d=xn})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:h,totalDays:u}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:wn.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:fn({firstDayOfWeek:h,today:e,totalDays:u,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:m})})]})})),kn=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Sn=kn.map((e=>({key:e}))),Cn=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Tn={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},In={className:"min-w-32",iconVersion:"black",isBorder:!1},Bn=d((({className:e="",label:t="",value:n,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:u}]=tn(!1),[p,g]=l(n?.getMonth()||(new Date).getMonth()),[x,f]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:w,monthsOptions:N,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=cn(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>l(kn.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Sn,yearsOptions:Cn,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:u,selectedYear:x,selectedMonth:p,showCalendar:m});return c("div",{className:h("space-y-xs",e),ref:C,children:[nn(t),c("div",{className:"relative",children:[Pn(S,n,a),m?c("div",{className:"absolute bg-white z-20 select-none bottom-full",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(H,{...Tn,className:"-rotate-90 cursor-pointer"})}),o(un,{onChange:v,value:{key:kn[p]},options:N,...In}),o(un,{onChange:w,value:{key:String(x)},options:k,...In}),o("div",{className:"my-auto",onClick:y,children:o(H,{...Tn,className:"rotate-90 cursor-pointer"})})]}),o(Nn,{today:n,currentMonth:p,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),Pn=(e,t,n)=>c("div",{onClick:e,className:h("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error"),children:[o(k,{children:t&&xt(t)}),o(H,{...Tn,name:"CalendarIcon"})]}),Mn=d((({className:e,label:t,error:n,...l})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Bn,{label:t&&l?.errors?`${t}*`:t,valid:Boolean(!n),...l}),Ht(n)]}))),Rn=d((({className:e,label:t,value:n="",placeholder:l,error:a,onChange:i,onBlur:r,isTextarea:s,type:d,...m})=>c("div",{className:h("shrink-0 w-full",e),children:[o(an,{type:d||"text","aria-label":t,label:t&&m?.errors?`${t}*`:t,valid:Boolean(!a),value:n,onChange:i,onBlur:r,isTextarea:s,placeholder:m?.errors&&!t?`${l}*`:l}),Ht(a)]}))),Vn=d((({className:e="",label:t,error:n,...l})=>c("div",{className:e,children:[o(un,{...l,valid:!n,label:l?.errors?`${t}*`:t}),Ht(n)]}))),Dn=e=>!e?.length,zn=e=>t=>n=>e(n)?[]:[t],An="Некорректно заполненное поле",jn=zn((e=>null!=e&&""!==e))(An),_n=zn((e=>e?.key&&""!==e?.key))(An),$n=zn((e=>"string"==typeof e&&e.length>1))(An),En=zn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(An),Ln=(On=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,zn((e=>"string"==typeof e&&On.test(e))))(An);var On;const Fn=zn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Un={typeForm:jn,surname:$n,name:$n,region:_n,addressBranch:_n,phone:Ln,secondaryPhone:Ln,birthday:jn,email:jn,fullName:$n,inn:En,partnerComments:jn,collectionCount:jn,comment:jn,acquiringType:_n,feedbackType:_n,feedbackMethod:_n,serviceType:_n,serviceDirection:_n,meetingDay:jn,product:jn,localities:jn,consentDataProcessing:Fn,annualRevenue:jn,consentToAllDocs:Fn},Wn=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Un?.[e]])))},Hn=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},qn=(e,t,n=!1)=>n?Hn(e,t):e,Kn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Yn=d((({field:e,input:t})=>o(Vn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Kn,...qn(e("acquiringType"),Un.acquiringType,t?.required)}))),Xn=(e="")=>Boolean("trade"===e||"all"===e),Gn=e=>null!=e,Jn=new Map,Zn=e=>Boolean(e?.every((e=>Array.isArray(e)?Zn(e):!e||"string"==typeof e))),Qn=e=>Zn(e)?e.toString():"";function el(e,t,{fallback:n,cache:i}={}){const s=r((()=>tl(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(Gn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=Jn)=>n=>{const l=Qn(n),a=t.get(l);if(l&&Gn(a))return a;const i=e(...n);return l&&Gn(i)&&t.set(l,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function tl(e){return Array.isArray(e)?e:e instanceof Function?tl(e()):[e]}const nl=[];const ll=async e=>await it(e,{method:"GET"})||nl;function al(){const{data:e}=el("/api/v1/branchesByRegions",rt);return Array.isArray(e)?e:[]}const il=d((({field:e,input:t,isPremium:n=!1})=>{const l=e("region"),i=l?.value?.key,r=l?.value?.text,s=n?al()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=el(e?`/api/v1/branches?regionCode=${e}`:null,ll);return t||nl}(i)?.filter((e=>e?.address));return a((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(Vn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...qn(e("addressBranch"),Un.addressBranch,t?.required),isSearch:!0})})),rl=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},sl=(e,t,n)=>Math.max(t,Math.min(e,n));function ol(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function cl({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:i,onChange:t=>{const n=ol(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const dl=1,ml=100,hl=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:dl),max:s=(a.length?a.length-1:ml),step:d=1,value:m=a[0]||r,disabled:u=!1,onChange:p}=e,g=rl(e,{normalize:(e=0)=>a.length?ul(a)(e):sl(e,r,s),format:Ue()}),x=i((e=>{p&&p(ol(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",ln,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:x,...g}),cl({list:a,min:r,max:s,step:d,disabled:u,value:m,onChange:p})]}),pl(l)]})})),ul=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),pl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),gl=["От 1 000 ₽","До 1 000 000 000 ₽"],xl=d((({field:e})=>o(hl,{title:"Сумма, ₽",items:gl,min:1e3,max:1e9,...e("amount")}))),fl=d((({field:e,input:t})=>o(Rn,{className:"col-span-2",...qn(e("comment"),Un.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),bl=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const yl=d((({className:e="",isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),vl=d((({className:e,items:t=[],...n})=>{const l=t.every((e=>e?.value));return o("div",{className:h("w-full",e),children:o(bl,{isFoldButtonOnTop:!0,renderFoldableSection:({isUnfolded:e})=>o(yl,{isUnfolded:e,className:"flex flex-col gap-lg pl-2xl py-xs",children:t.map(Xt)}),renderFoldButton:wl(o(en,{required:!0,value:l,onChange:e=>{for(const n of t)n?.onChange&&n.onChange(e)},...n}))})})})),wl=e=>t=>c("div",{className:"flex items-center",children:[e,o("button",{onClick:t.onToggle,className:"p-m",children:o(H,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),Nl=[{field:"processPersonalDataLeadFlg",text:"Согласие на обработку персональных данных",required:!0},{field:"consentOtherFlg",text:"Согласие на информирование о продуктах и услугах Банка",required:!0},{field:"consentProviderFlg",text:"Согласие об использовании простой электронной подписи",required:!0},{field:"consentPfrFlg",text:"Согласие на запрос в ПФР Открыты по субботам",required:!0},{field:"consentPhotoFlg",text:"Прочие согласия (согласие на фотографирование)"}],kl=d((({field:e})=>o(vl,{text:"Согласие на все документы",items:Nl.map((t=>({...e(t.field),text:t.text,required:t.required})))}))),Sl=d((({field:e})=>o(Vn,{label:"Способ получения ответа",options:Ft,...Hn(e("feedbackMethod"),Un.feedbackMethod)}))),Cl=d((({field:e})=>{const t=e("feedbackType");return a((()=>{"FEEDBACK"===t?.value?.key&&e("serviceDirection")?.onChange?.(Lt[0])}),[t?.value]),o(Vn,{label:"Тема",placeholder:"Выберите тему",options:Ot,...Hn(t,Un.feedbackType)})})),Tl=d((({field:e})=>o(en,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'})));function Il(e="/api/v1/regions"){const{data:t}=el(e,rt);return Array.isArray(t)?t:[]}const Bl=d((({field:e,input:t})=>{const n=e("region")?.value?.key,l=Il(Ut)?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(Vn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:l,...qn(e("localities"),Un.localities,t?.required),isSearch:!0})})),Pl=d((({field:e})=>o(Rn,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}))),Ml=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(Rn,{label:"Имя",...qn(e("name"),Un.name,n),...l})})),Rl=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:h("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Vl=d((({field:e})=>Xn(e("acquiringType")?.value?.key)?o(Rl,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Dl=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(Rn,{...qn(e("partnerComments"),Un.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...l})})),zl=e=>"_"===e,Al=e=>/\d/.test(e),jl=e=>zl(e)||Al(e),_l=[..."+7 (___) ___-__-__"],$l=_l.findIndex(zl),El=_l.map(((e,t)=>jl(e)?_l.slice(0,t).filter(jl).length:-1));const Ll=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=_l.map(((e,n)=>Al(e)?e:t.charAt(El[n])||e)),l=El.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max($l,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&(t&&t(""))}),[]);return o(an,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),Ol=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Ll,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Ht(l)]}))),Fl=d((({field:e,input:t})=>o(Ol,{label:"Телефон",...qn(e("phone"),Un.phone,t?.required)}))),Ul=d((({field:e})=>Xn(e("acquiringType")?.value?.key)?o(Rl,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Wl=ht((({field:e,source:t})=>o(Vn,{placeholder:"Выберите продукт",label:"Продукт",options:Hl(t?.productList),...Hn(e("product"),Un.product)}))),Hl=e=>(e??[]).map((e=>({key:e,value:e}))),ql=d((({field:e,input:t,url:n})=>{const l=Il(n);return o(Vn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...qn(e("region"),Un.region,t?.required)})})),Kl=d((({field:e,input:t})=>{const n=al(),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(Vn,{label:"Регион",placeholder:"Выберите регион",options:l,...qn(e("region"),Un.region,t?.required)})})),Yl=d((({field:e})=>{const t=e("secondaryPhone");return o(Ol,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Hn(t,Un.secondaryPhone):t})})),Xl=d((({field:e})=>o(Vn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Lt,...Hn(e("serviceDirection"),Un.serviceDirection)}))),Gl=d((({field:e,input:t})=>o(Rn,{label:"Фамилия",...qn(e("surname"),Un.surname,t?.required)}))),Jl=["От 1 мес","До 15 лет"],Zl=d((({field:e})=>o(hl,{title:"Срок, месяцев",items:Jl,min:1,max:180,...e("term")}))),Ql=d((({field:e})=>o(Vn,{label:"Тип обслуживания",options:Et,...Hn(e("serviceType"),Un.serviceType)}))),ea=d((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:h(ln.split(" ").filter((e=>"rounded"!==e)),Kt,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Re,{color:"text-primary-text",children:t}):null]})}))),ta=["currencyControl","documentOperations","conversionTransactions","otherIssues"],na=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(ea,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:n}),o(ea,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:n}),o(ea,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:n}),o(ea,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:n})]})}));const la={$ref:"/wcms-resources/outservice-productlist.json"},aa=(e,t)=>(n,l)=>{const{required:a,...i}=n,r="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,s={surname:o(Gl,{field:e,input:n}),name:o(Ml,{field:e,input:n}),middleName:o(Pl,{field:e}),phone:o(Fl,{field:e,input:n}),email:o(Rn,{label:"Электронная почта",...qn(e("email"),Un.email,a),...i}),fullName:o(Rn,{label:"ФИО",...qn(e("fullName"),Un.fullName,a),...i}),inn:o(Rn,{label:"ИНН",type:"number",...qn(e("inn"),Un.inn,a)}),comment:o(fl,{field:e,input:n}),region:r?o(Kl,{field:e}):o(ql,{field:e,input:n,url:Wt(t)}),addressBranch:o(il,{field:e,input:n,isPremium:r}),birthday:o(Mn,{label:"Дата рождения",...qn(e("birthday"),Un.birthday,a)}),desiredMeetingDate:o(Mn,{label:"Желаемая дата встречи",...qn(e("desiredMeetingDate"),Un.meetingDay,a)}),product:o(Wl,{field:e,source:la}),localities:o(Bl,{field:e,input:n}),isClient:o(Tl,{field:e}),consentToReceiveMaterials:o(en,{...e("consentToReceiveMaterials"),text:"Согласен на получение информационных и аналитических материалов по электронной почте"}),partnerComments:o(Dl,{field:e,input:n}),collectionCount:o(Rn,{label:"Количество объектов инкассации",type:"number",...qn(e("collectionCount"),Un.collectionCount,a)}),acquiringType:o(Yn,{field:e,input:n}),onlineCheckout:o(Vl,{field:e}),posTerminal:o(Ul,{field:e}),serviceType:o(Ql,{field:e}),term:o(Zl,{field:e}),amount:o(xl,{field:e}),annualRevenue:o(Rn,{label:"Годовая выручка, ₽",...qn(e("annualRevenue"),Un.annualRevenue,a)}),vedTypes:o(na,{field:e}),feedbackType:o(Cl,{field:e}),feedbackMethod:o(Sl,{field:e}),serviceDirection:o(Xl,{field:e}),bankEmpolee:o(Rn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}),applicationDate:o(Rn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),secondaryPhone:o(Yl,{field:e}),"сonsentToAllDocs":o(kl,{field:e})};return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:n,field:e})?o("div",{children:s[n?.name]},String(l)):null},ia=e=>2===e?"@xl:grid-cols-2":"",ra=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Re,{size:"text-h6",children:e})}):null;function sa({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const oa={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active"},ca={primary:h("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:h("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},da=d((({children:e,...t})=>{const n=e=>({...e,onClick:me(sa(e))}),{className:l,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=n(t);return o("button",{className:h("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":h(oa[a],ca[a]),l),type:s,role:d,onClick:m,children:e})})),ma=d((({className:e,onClose:t})=>o("button",{className:h("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(H,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),ha=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:h("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(ma,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),ua=d((function({responseType:e,typeForm:t}){const n="OK"===e,l=n?"ResponseOKIcon":"ResponseFailIcon",{close:a}=de(),r=i((()=>{a()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(ha,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:l,iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(da,{type:"button",onClick:r,children:"Хорошо"})]})})})),pa=e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(ua,{...e}),n),close:n}},ga=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],xa=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,feedbackType:o,vedTypes:c,region:d,...m}=e,h=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Xn(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...m,...ba(c),...fa(d),...h?{partnerComments:h}:{},...s?{typeForm:s}:{},...o?{typeForm:o}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},fa=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},ba=e=>e?{vedTypes:Object.fromEntries(ta.map((t=>[t,t===e])))}:{},ya={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Kn[0],serviceType:Et[0],feedbackType:Ot[0],feedbackMethod:Ft[0],serviceDirection:Lt[0],vedTypes:ta[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},va=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Re,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Re,{children:t.text})}):null]}))),wa=(e,t)=>o(da,{className:h("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Na=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Xt,{...e}),o(va,{link:t})]}),Ht(Hn(e,Fn).error)]}):o(va,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),wa(n)]}),ka=bt(),Sa=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:u,isContacts:p,data:g,...x})=>{const f=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||ya[e.name]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=Et[1]),{...n,typeForm:{key:t,text:""}}})(f,n),[y,v]=l(""),w=i((async(e,t)=>{const l=Ca(f,e),a=ga(Wn(l));if(!Dn(a(e)))return"Fail";const i=xa({...e,...u}),r=await ka.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){pa({responseType:r,typeForm:n}).open()}if("OK"===r&&g){const e=zt();St({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:S,reset:C}]=jt(b,{onSubmit:w}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(f)?.name;return a((()=>{"OK"===y&&(v(""),C())}),[y]),c($t,{className:h("container space-y-m",e),title:t,...x,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:h(ia(e.columns),"grid gap-x-m"),children:[ra(e.title),(e?.inputs||[])?.map(aa(k,n))]},`section-${t}`))),Na(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),Ca=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const l=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):n===(l?.key??l)})))),Ta=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Ia={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Kn[0],serviceType:Et[0],feedbackType:Ot[0],feedbackMethod:Ft[0],serviceDirection:Lt[0],vedTypes:ta[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Ba=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Ia[e.name]]))),typeForm:{key:t,text:""}}),Pa=(e,t)=>o(da,{className:h("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Ma=bt(),Ra=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,endpoint:d,...m})=>{const u=r?.flatMap((e=>e?.inputs))||[],p=Ba(u,n),[g,x]=l(""),f=i((async e=>{const t=ga(Wn(u));if(!Dn(t(e)))return"Fail";const l=(e=>{const{region:t,...n}=e,l={...n,...Ta(t)};return Object.fromEntries(Object.entries(l)?.map((([e,t])=>[e,t?.key||t])))})(e),a=await Ma.send(l,"lead"===d)?"OK":"Fail";if(x(a),a){pa({responseType:a,typeForm:n}).open()}return a}),[]),[,{field:b,onSubmit:y,reset:v}]=jt(p,{onSubmit:f});return a((()=>{"OK"===g&&(x(""),v())}),[g]),o($t,{className:h("container space-y-m",e),title:t,...m,children:c("form",{onSubmit:y,children:[r.map(((e,t)=>c("div",{className:h(ia(e.columns),"grid gap-x-m"),children:[ra(e.title),(e?.inputs||[])?.map(aa(b,n))]},`section-${t}`))),Pa(s)]})})})),Va=d((({title:e,description:t})=>{const n=Ne();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Da=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",za=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Aa(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const ja=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:c,children:d,onIntersection:m})=>{const u=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:Aa(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}(i((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:u,role:"listitem",children:d})})),_a=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],$a=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),x&&x(La(n))}),[g,x]),v=a>0?r*Number(a)-1:0,w="vertical-list"===d,N="horizontal-list"===d,k={...N?Ea(c,v):{},...w?za(u):{},gap:`${r}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(ja,{className:h(m,a?_a[a-1]:"",{"h-full":w},t),style:N?Ea(c/4):{},activeIndex:l,idx:n,observerOptions:f,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Ea=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),La=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Oa={"horizontal-list":"w-6","vertical-list":"h-6"},Fa=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?Oa[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),Ua=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:h("text-secondary-text font-light",s),children:n?.description})]},String(l))},Wa=e=>e,Ha=(e=Wa)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),qa=Ha(),Ka=(e=Wa)=>Ha((t=>-e(t))),Ya=Ka(),Xa=e=>t=>e.scrollWidth/t,Ga=e=>(t,n)=>{e.scrollBy({left:n*Xa(e)(t),behavior:"smooth"})},Ja=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[Ka()(a),Ha()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;n.current&&(m?Ga(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(h?Ga(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Za={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Qa=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=Ne(),[u,p]=Ja({itemCount:s.length}),g=ei(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const x=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o($a,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Ua({activeIndex:t,onClick:x}))}):n?o("div",{className:h("flex gap-xs",Za[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Fa({activeIndex:t,onClick:x,listType:l}))}):null})),ei=(e=!1)=>({behavior:e?"auto":"smooth"}),ti=d((({className:e,disabled:t,...n})=>o(be,{rounded:!0,className:h("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e),disabled:t,...n,children:o(ne,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),ni=d((e=>o(ti,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),li=d((e=>o(ti,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),ai="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",ii=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?ri(t):null,i?o(ni,{className:h(si(a),m?"left-1":"left-0"),onClick:s}):null,r?o(li,{className:h(si(a),m?"right-1":"right-0"),onClick:d}):null]})})),ri=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(ai,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(ai,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),si=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),oi=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:x,navButtons:f})=>{const b=Array.isArray(g)?g.length:0,[y,v]=Ja({itemCount:b,onVisibleIndicesChange:x}),[w]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===i?"relative h-full":""),children:[o($a,{containerRef:y,activeIndex:w,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(ii,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(Qa,{className:h(!p&&"lg:hidden"),activeIndex:w,dotCount:b,listType:i,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),ci=({blocksToRender:e,...t})=>o(oi,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:M(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:h("relative min-w-80",Da(!0)),children:B(e,t)},String(n))})}),di=e=>e%2!=0,mi=d((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,role:r,...s})=>c(n,{tag:n,className:h("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:l,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),hi=d((({className:e="",label:t,icon:n,dataTheme:l="pc",disabled:a=!1,onClick:i})=>o(mi,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",role:"button",className:h("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Re,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),ui=({isUnfolded:e,onToggle:t})=>o(hi,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),pi=["ArrowDownIcon","ArrowUpIcon"],gi="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",xi=({topItemsCount:e=0,label:t="",block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]];return c("div",{className:h("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:h(gi),children:[M(i,{...a.options,parent:n}),di(i.length)?o(pt,{className:"col-span-6",...a}):null]}),o(bl,{renderFoldableSection:({isUnfolded:e})=>c(yl,{className:h(gi),isUnfolded:e,children:[M(r,{...a.options,parent:n}),di(r.length)?o(pt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:l})=>o(hi,{className:h({hidden:e<1}),disabled:!r?.length,label:t,icon:pi[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:l})})]})},fi=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[bi(n,t),xi({...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[bi(n,t),ci({...l,blocksToRender:t})]});default:return null}})),bi=(e,t)=>e&&!t.length?o(Va,{...e}):null,yi=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),vi=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(Rl,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),wi=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,yi(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Ni(l)).filter(Boolean))]}),n?o("div",{children:o(da,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),Ni=e=>([t,n])=>{const l=n?.type;return"array"===l?ki(t,e)(n):null},ki=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(vi,{items:l,multiple:!n?.single,...t(e)})]},e)};function Si(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Ci=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Ti=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Ci(t[e])||Ci(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Ci(t[e])||Ci(n[e])||Ii(t[e])<=Ii(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Ci(t[e])||Ci(n[e])||Ii(t[e]?.min)>=Ii(n[e]?.min)&&Ii(t[e]?.min)<=Ii(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Ci(t[e])||Ci(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Ci(t[e])||Ci(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Ii=e=>Number(e||0),Bi=(e,{block:t,page:n,normalize:l=At})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=jt(e),d=r((()=>Si(a,a.map((e=>dt(e.content,n?.fallback))))),[a,n?.fallback]),m=i===e?a:((e,t)=>(n=At)=>e?.filter((([,e])=>Ti(t,n(e)||{}))).map((([e])=>e)))(d,i)(l);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},Pi={},Mi={},Ri=ht((({className:e,filtrationSchema:t=Pi,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Bi(Mi,{block:a.block,page:a.options?.page}),d=o(un,{className:"w-64",label:n?.title,options:Vi(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Vi(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(wi,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(da,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(fi,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Vi=e=>Si(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Di=(e=!1)=>e?"text-left":"text-center",zi={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Ai=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:h("rounded-icon object-fit flex justify-center items-center",zi[n],e),children:o(H,{...i,width:"54%",height:"54%",name:a})}):null})),ji=d((({className:e="",title:t,benefitList:n,...l})=>{const a=Ne();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(N,{headingType:"h3",as:"h2",className:Di(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(_i)}):null]})})),_i=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(Ai,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ne,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Re,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Pe,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),$i=(e,t,n)=>{return o(oi,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>c("div",{className:h("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(Re,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(Re,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},Ei=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:h("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?$i(e,0,t):null]}))),Li={start:"justify-start",center:"justify-center",end:"justify-end"},Oi=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&h("flex",Li[n]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:Ee(e)})})),Fi=d((({className:e,title:t,children:n,...l})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),Ui="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",Wi="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",Hi="flex flex-col gap-y-xl min-w-52",qi=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(Re,{size:"text-h3",children:"number"==typeof e?[l,Ue(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),Ki=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o(Re,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(qi,{value:n,...a}):o(Re,{size:"text-h3",children:"-"})]}))),Yi=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Xi=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Re,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ue(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Gi=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(H,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Ji=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(Gi,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(Xi,{title:e,rate:t,unit:n,fractionDigits:l,color:i,...s})}),o(Ki,{className:"@xl:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:i,...s}),r]}),Zi=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(hl,{items:e?[`От ${Ue(1)(l.min||0)} ${n}`,`До ${Ue(1)(l.max||0)} ${n}`]:[],step:t,...l}),Qi={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},er={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},tr=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=Qi.prefMonthsNum,prefTravelBonusRate:i=Qi.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||er,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},nr=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=jt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:x}=tr(r,n);return o(Fi,{className:e,title:t,...i,children:c("section",{className:h(Ui,e),children:[c("div",{className:Wi,children:[Zi({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Zi({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Ji({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Hi,children:[x>=0?o(Ki,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,Ee(l,{isVertical:!0}),Yi(a)]})]})})})),lr=Math.round(29.5),ar=(e,t=0)=>e?.sum?e.sum:t,ir=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,rr=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,sr={horizontal:"gap-5xl",vertical:"flex-col gap-s"},or=d((({items:e,checkedItem:t,className:n,onChange:l,disabled:a=!1,orientation:i="horizontal"})=>o("div",{className:h(`flex ${sr[i]}`,n),role:"radiogroup","aria-label":"Группа кнопок",children:e?.map((({id:e,text:n})=>o(Xt,{isRadio:!0,text:n,value:t===e,onChange:()=>l&&l(e),disabled:a},String(e))))}))),cr=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Re,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Re,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(or,{orientation:l,items:e,checkedItem:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),dr=e=>cr({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),mr=" (c капитализацией)",hr=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:Hi,children:[o(Ki,{title:`Доход в конце срока${i?mr:""}`,value:e,postfix:n,prefix:"+"}),o(Ki,{title:`Сумма в конце срока${i?mr:""}`,value:t,postfix:n}),Ee(l,{isVertical:!0}),a?.map(Yi)]}),ur=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:pr([e,t],l),pr=([e,t],n=[])=>({[e]:n.length?Ya(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?qa(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),gr=(e,[t,n],l)=>e>=l[t]&&e<=l[n],xr={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const fr={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},br=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?xr[e?.rateType]:"",{data:n}=el(t?`/api/v1/depositrates/${t}`:null,rt);return Array.isArray(n)?n:[]}(t);if(n<=30)return{...fr,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&yr(s,e)&&gr(l,["minSum","maxSum"],e)&&gr(n,["minDays","maxDays"],e)))||fr,{rate:m}=d,h=vr(m,e),u=l+h,p=c||[fr];return{...d,...pr(["minSum","maxSum"],p),...pr(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},yr=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,vr=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},wr=ht((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:u}]=jt({moneyValue:ar(r,1e5),daysValue:ir(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=br(m,s),{income:g,finalSum:x,rate:f,isUnavailableByTerm:b,depositeName:y}=p;return o(Fi,{className:e,title:t,...d,children:c("section",{className:h(Ui,e),children:[c("div",{className:Wi,children:[Zi({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(hl,{items:[`От ${rr(v.min||0)}`,`До ${rr(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Nr(p,u),dr({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Ji({rate:f,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),hr({income:g,finalSum:x,buttons:n,footnotes:[l,a]})]})});var v})),Nr=(e,t)=>c("div",{className:"space-y-s",children:[o(Re,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Xt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Xt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),kr=(e=[],t=!1)=>Sr([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Sr=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Cr=({min:e=0,max:t=0,availableMonths:n,...l})=>o(hl,{items:[`От ${Tr(e)}`,`До ${Tr(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),Tr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Ir=e=>cr({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Br=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(sl(t?.[a],n.minMonths,n.maxMonths))},Pr=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},Mr={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Rr=e=>Vr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Vr({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Vr({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Vr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Vr=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Dr=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[Mr],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Rr({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=ur(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=ur(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>Rr({row:e,userInputParams:t,paramsViewSettings:n})&&gr(l,["minSum","maxSum"],e)&&gr(a,["minMonths","maxMonths"],e)))||Mr)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:h}=m,u=Pr(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:u}},zr=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Ar={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},jr=ht((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(u=n?.rateRows,Sr([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],u));var u;const[p,{field:g}]=jt({moneyValue:ar(s,2e5),monthsValue:ir(s,lr),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),x=Dr(p,n,r),f=Ir({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(sl(p.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(sl(p.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!zr(s)&&m&&Br({field:g,defParams:m,calcParams:x,map:Ar,monthsValue:"minMonths"})}),[n,s]),o(Fi,{className:e,title:t,...d,children:c("section",{className:h(Ui,e),children:[c("div",{className:Wi,children:[Zi({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),Cr({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),_r({...x,...r},g),o("div",{className:"sm:hidden",children:f})]}),c("div",{className:h(Hi,"@4xl:w-1/2"),children:[o(Ki,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Ki,{title:"Ставка",value:x?.rate,fractionDigits:2,postfix:"%"}),o(Ki,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),Ee(l,{isVertical:!0}),Yi(i)]})]})})})),_r=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Xt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Xt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Xt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Xt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),$r=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},Er={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Lr=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?Ur(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Fr({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Fr({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Fr({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Fr({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,gr(l,["minSum","maxSum"],t),gr(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||Er,{rate:h}=m,u=Or(h,e),p=l+u,g=t||[Er];return{...m,...pr(["minSum","maxSum"],g),...pr(["minMonths","maxMonths"],g),availableMonths:$r(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:u,finalSum:p}},Or=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},Fr=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Ur=(e,t)=>e+Math.round((t-e)/2),Wr=(e="rub")=>"rub"===e,Hr=(e,t)=>{const{minMonths:n,maxMonths:l}=pr(["minMonths","maxMonths"],Xr(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:sl(a,n,l)}},qr=(e,t)=>{const{minSum:n,maxSum:l}=pr(["minSum","maxSum"],Xr(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:sl(a,n,l)}},Kr=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),Yr=e=>{const t=Wr(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Xr=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},Gr=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?cr({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?cr({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),Jr(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?dr({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},cr({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),Jr(e.isShowNewClient),e.isShowNewClient?o(Xt,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},Jr=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,Zr={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Qr={text:"₽",key:"rub"},es=ht((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=n??{},p=u?.map((e=>e.currency))??[Qr],g=i((e=>t=>e?{...t,...Yr(t),...qr(t,e),...Hr(t,e),...Kr(t,e)}:t)(u),[u]),[x,{field:f}]=jt({moneyValue:ar(d,2e4),monthsValue:ir(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:Qr},{normalize:g}),b=f?.("currency")?.value??Qr,y=f?.("isNewClient")?.value,v=Xr(u,b),w=Lr(x,v,s),{rate:N,income:k,finalSum:S,type:C=""}=w,T=i((()=>{Br({field:f,defParams:kr(v,y),calcParams:w,monthsValue:"minMonths",map:Zr})}),[f,u]);a((()=>{!zr(d)&&v&&T()}),[d,u]);const I=N===kr(v,y)?.rate;return o(Fi,{className:e,title:t,...m,children:c("section",{className:h(Ui,e),children:[c("div",{className:Wi,children:[c("div",{className:"flex gap-m",children:[Zi({className:"w-full",title:`Сумма, ${b?.text}`,min:w.minSum,max:w.maxSum,...f("moneyValue"),value:w.moneyValue,postfix:b?.text,step:ts(b?.key)}),u&&u?.length>1?o(Vn,{label:"Валюта",options:p,...f("currency")}):null]}),Cr({title:"Срок, месяцев",min:w.minMonths,max:w.maxMonths,availableMonths:w.availableMonths,...f("monthsValue"),value:w.monthsValue}),Gr({...w,...s},f)]}),Ji({rate:N,children:ls(T,I)}),hr({income:k,finalSum:S,buttons:[...l,ns(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:f("isMonthlyInterestPayment").value})]})})})),ts=(e="")=>Wr(e)?1e3:100,ns=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},ls=(e,t=!1)=>t?null:o(da,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),as=e=>is({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&is({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),is=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],rs={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},ss=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[rs],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>as({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=ur(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=ur(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>as({row:e,userInputParams:t,paramsViewSettings:n})&&gr(l+r,["minSum","maxSum"],e)&&gr(i,["minSumOld","maxSumOld"],e)&&gr(r,["minSumExtra","maxSumExtra"],e)&&gr(a,["minMonths","maxMonths"],e)))||rs)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=Pr(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},os=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=jt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=ss(s,n,i),u=Ir({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Fi,{className:e,title:t,...r,children:c("section",{className:h(Ui,e),children:[c("div",{className:Wi,children:[Zi({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Zi({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Cr({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),cs({...m,...i},d),m.isExtraMoney?Zi({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:u})]}),c("div",{className:h(Hi,"@4xl:w-1/2"),children:[o(Ki,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Ki,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Ki,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Ki,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:u}),Ee(l,{isVertical:!0}),Yi(a)]})]})})})),cs=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Xt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Xt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Xt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),ds=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=rl(e,{normalize:(e=a)=>n&&l?String(sl(Number(ms(e)),n,l)):ms(e),format:Ue(r)}),d=i((e=>t&&t(ms(e))),[t]);return o(an,{onChange:d,...s,...c})})),ms=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),hs=d((e=>o(ds,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Re,{size:"text-xl",font:"font-light",children:"₽"})})}))),us={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},ps={amount:1500},gs=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=jt(ps),[u,p]=l(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:us[r],children:[o(hs,{valid:!u,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(da,{className:"w-full mt-lg",type:"submit",disabled:u,children:i.text}):null]})]})})),xs=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(H,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),fs="relative h-full",bs={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},ys=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(Ns),r=n?{defaultPadding:"p-6xl pb-m"}:{};return R({...l,renderProps:(n,l,a)=>c("div",{className:vs(n,{someCardsHighlighted:i}),children:[B(n,l,{className:ws(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),Ns(n)?xs({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},vs=(e,{someCardsHighlighted:t})=>h(fs,t&&(Ns(e)?"pt-3xl":"pt-3xl sm:pt-16")),ws=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>h(fs,"min-w-80",bs[l],t&&(Ns(e)?"pt-3xl sm:pt-16":"pt-3xl"),Da(n),n&&"h-full"),Ns=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,ks=ht((({className:e,visibleItemCount:t=0,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(oi,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?Ss(s?.block?.blocks):[],hasBlur:!0,children:ys({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Ss=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Cs="z-10 border border-solid w-full h-full",Ts=h(Cs,"absolute hidden @xl:block border-transparent"),Is=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:h("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:h(Ts,"top-9 right-12 bg-green-dark")}),o("div",{className:h(Ts,"top-6 right-8 bg-green")}),o("div",{className:h(Ts,"top-3 right-4 bg-green-light")}),c("div",{className:h(Cs,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ee([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Bs={black:"bg-black",white:"bg-white"},Ps=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ce,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:Ee([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Re,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Ms)]}):null,a?c(Re,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Ms=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Bs[e]}`},String(t)),Rs=d((({icon:e,...t})=>{const n=he(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),Vs=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?Ds(l):null]})}))),Ds=e=>o("div",{className:h("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(Rs,{...e},String(t))))}),zs=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),As=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=he()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:h("block",e),...t?r:{},role:t?"link":"none",...ue(a),children:i})})),js=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],_s=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>js.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=$e(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},$s(a));return c("div",{className:h("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:Ee(m,{className:Es(s??!1,a??!1,n),buttonClassName:u})}),r?o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),$s=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",Es=(e,t,n=!1)=>h(e||t?"basis-full":"",!t||n&&e?"":"flex-nowrap"),Ls=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:x,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...w})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...w,children:o(As,{href:a,target:m,className:"h-full",data:zs(v),children:c(Ce,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:u,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ge($e(i)?o(ne,{image:i}):null,f),buttons:d.length?o(_s,{media:d,stretched:!0,showButtonText:!0,version:w?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(_e,{benefits:x}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,Os(l,p)]})})}))),Os=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Fs=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Re,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(Re,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:Ee(a)}):null]},String(t))},Us=d((({className:e="",title:t,align:n="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:u,...p})=>{const x=d.map(Fs),[f,b]=s>0?[x.slice(0,s),x.slice(s)]:[x,[]],[y,v]=l(!1);return a((()=>ce.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[$e(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(N,{className:h("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(bl,{renderFoldableSection:()=>c("div",{children:[f,o(yl,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?Ws(y,m?.parent,u):null}):o("div",{children:f})]})})),Ws=(e,t,n)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&ce.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",...e?ue(n):{},children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(H,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Hs=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,qs=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),Ks=1e9,Ys={sum:{min:1e4,max:Ks},period:3},Xs=ht((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Bi(Ys,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:Gs(e)})}),u=s.map((([,e])=>e?.paramsSource?.rateRows)),p=Js(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(wi,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(hs,{label:l?.title,min:500,max:Ks,...d("sum",{parse:e=>({min:Number(e),max:Ks}),format:({min:e})=>String(e)})}),o(hl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(fi,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Gs=e=>st((e?.paramsSource?.rateRows||[]).filter(Hs).flatMap((e=>qs(e.minMonths,e.maxMonths)))),Js=e=>st(e.flatMap((e=>e||[])).filter(Hs).flatMap((e=>qs(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Zs=[{key:"10"},{key:"50"},{key:"100"}],Qs=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(un,{className:"min-w-20",onChange:n,value:{key:String(e)},options:Zs,iconVersion:"black"})]})},eo="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",to=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:eo,"aria-label":`Страница ${i}`,children:i},String(t)):null},no={width:"24",height:"24"},lo=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(H,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:ao(1===e),...no})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:eo,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(to),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:eo,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(H,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:ao(e===n),...no})})]})},ao=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",io=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(lo,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(Qs,{itemCount:l,onItemCountChange:a}):null]}),ro=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",ln),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),so=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(ro,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Bn,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Bn,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(da,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),oo=(e,t)=>o(Ai,{...e,iconBgVersion:t,className:"shrink-0"}),co=({title:e,timestamp:t,publicId:n})=>{const l=he(),{href:a}=l({href:`/api/v1/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[oo({icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Re,{size:"text-m","font-weight":"font-light",children:xt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)},mo="/api/v1/depository",ho={startDate:void 0,endDate:void 0,query:""},uo=ht((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:u}]=jt(ho),{totalPages:p=0,items:x=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?xt(l,!0):"",r=a?xt(a,!0):"",s=new URLSearchParams(mo);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=el(mo+o,rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),f=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o(so,{filtrationState:d,field:m,onClearFilter:u}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),x.length?x.map((e=>o(co,{...e},String(e.publicId)))):o(Va,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(io,{currentPage:n+1,onPageChange:f,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),po=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,go=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:po(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),xo="location";function fo(e="Москва"){const[t,n]=((e,t,n)=>{const[r,s]=l(n||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((n=>e.fire(t,n)),[e,t])]})(ce,"location",yo()??{name:e}),r=i((e=>{vo(e),n(e)}),[]),{data:s}=el(bo()?null:"/api/v1/region",rt);return a((()=>{s&&!bo()&&n(s)}),[s]),[t??{name:e},r]}const bo=()=>Boolean(globalThis.localStorage?.getItem(xo)),yo=()=>{try{const e=globalThis.localStorage?.getItem(xo);return e&&JSON.parse(e)}catch(e){return null}},vo=e=>{try{globalThis.localStorage?.setItem(xo,JSON.stringify(e))}catch(e){}};var wo;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(wo||(wo={}));const No=new Intl.NumberFormat("ru",{style:"currency",currency:wo.RUB}),ko=e=>e?No.format(e):"",So="text-m font-light text-secondary-text ",Co=`${So} text-left`,To=`${So} pl-5xl text-center`,Io=`${So} pl-5xl text-right`,Bo={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Po=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Co,children:o(Re,{size:"text-m",children:"Валюта"})}),o("th",{className:To,children:o(Re,{size:"text-m",children:"Купить"})}),o("th",{className:Io,children:o(Re,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Mo)})]}))),Mo=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:Bo[t]},width:"24",height:"24"}):null,o(Re,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Re,{size:"text-h6",children:ko(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Re,{size:"text-h6",children:ko(e?.buyExchangeRate)})})]},t)},Ro={icon:"GpsIcon"},Vo=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Ai,{...Ro,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Do=(e,t,n)=>{const l=Number(zo(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},zo=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Ao=e=>Pt([[e=>e.value!==wo.RUB&&e.oppositeValue!==wo.RUB,()=>e.handleConvert(e.value,wo.RUB)],[e=>e.value===wo.RUB&&e.oppositeValue===wo.RUB,()=>e.handleConvert(e.value,wo.USD)],[e=>e.value===wo.RUB&&e.oppositeValue===wo.RUB,()=>e.handleConvert(e.value,wo.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function jo(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(an,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(un,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const _o=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||wo.RUB,selectBuy:n?.[0]?.currency?.currency||wo.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[jo({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:$o(r,d,n),value:r.inputSell,setValue:e=>Lo(d,n)(e,r.selectSell,r.selectBuy)}),jo({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Eo(r,d,t),value:r.inputBuy,setValue:e=>Oo(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),$o=(e,t,n)=>l=>{t({selectSell:l}),Ao({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{Lo(t,n)(e.inputSell,l,a)}})},Eo=(e,t,n)=>l=>{t({selectBuy:l}),Ao({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>Oo(t,n)(e.inputBuy,l,a)})},Lo=(e,t)=>(n,l,a)=>{e({inputSell:zo(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(Do(n,i,l===wo.RUB)||"")})},Oo=(e,t)=>(n,l,a)=>{e({inputBuy:zo(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(Do(n,i,l===wo.RUB)||"")})};const Fo=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const[a]=fo(),i=function(e){const t=e?.code||"000",{data:n}=el(`/api/v1/exchangerates?regionCode=${t}`,rt);return n||{}}(a),r=Uo(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:wo.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:wo.RUB}}),o(g,{className:h("box-border min-h-80",e),...l,children:o(Ce,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(Po,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Vo,{address:i?.address})]}),o(_o,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:n})]})})})})),Uo=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Wo=d((({className:e="",items:t})=>{const n=he();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(Ho(n))})})),Ho=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...ue(t),children:a||null})},String(l)):null},qo=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>o(mi,{tag:"button",className:h("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:l,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[oo(a,t),e?o(Re,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(H,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Ko=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Yo=(e=!1)=>e?"MinusIcon":"PlusIcon",Xo=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Go=ht((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:l="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=Ne();return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(bl,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(yl,{className:h("gap-lg",Ko(m)),isUnfolded:e,children:R({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Jo({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),Jo=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?Xo(e):Yo(e))(a,r);return"accordion"===e?o(qo,{label:s,labelIcon:n,labelIconBgVersion:l,icon:c,onToggle:i}):o(hi,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Zo=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:Qo(e)}))),Qo=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(Go,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(Wo,{items:e.items}):null},String(t)))),ec=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(tc)}):null)),tc=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Re,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(nc)})]},String(t)),nc=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:lc(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),lc=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${ac(t)}`,children:o(Re,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},ac=e=>e.replaceAll(/\D/g,""),ic=d((({className:e="",index:t,text:n,...l})=>{const a=he(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:h("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),rc=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Re,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(ic,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),sc=d((({className:e="",index:t,...n})=>{const l=he(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),oc=d((({className:e="",links:t,license:n})=>c("div",{className:h("@container space-y-lg",e),children:[n?o("div",{children:o(Re,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(sc,{index:t,...e},String(t))))}):null]}))),cc=ht((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{};n.options?.page?.common;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:u,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Zo,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(ec,{items:r}),m?o(be,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(_s,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(be,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(rc,{title:d,links:i}),o(oc,{links:a,license:u})]})})),dc=ht((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],u=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,x=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Vn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(be,{href:p,target:"_blank",className:h("p-m w-full @xl:w-auto",u),data:zs(i,s?.key),children:x})}):null]})})})),mc={width:"103",height:"21"},hc={"bg-white":"color",transparent:"white"},uc={"bg-white":"text-primary-main",transparent:"text-white"},pc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:hc[e]},className:uc[e],width:n?.width,height:n?.height}),gc={"bg-white":"text-primary-text",transparent:"text-white"},xc=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...ue(s),children:[pc(i,n?.image,mc),r?l??o("div",{className:"ml-s",children:o(Re,{font:"font-medium",color:gc[i],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),fc={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},bc=d((({version:e,text:t,mobileText:n,...l})=>{const a=Ne()?n:t;return a?o(be,{className:h("py-s px-lg font-light whitespace-nowrap",fc["transparent"===e?"transparent":"default"]),...l,children:a}):null})),yc=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:l,version:a,backwardButton:r})=>{const s=V(),d="/"===s.pathname,{dataFooter:m,dataHeader:h,...u}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(xc,{className:"my-2xs",bgColor:e,logo:u,data:h,showTitle:!1})}):vc(p,r),o(bc,{version:a,...l})]})})),vc=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(H,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,wc={"bg-white":"primary",transparent:"transparent"},Nc=ht((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=wc[e],portal:l,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=l||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:n,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(yc,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...i})})})})),kc=(e=!1)=>e?{}:{padding:"p-0"},Sc={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Cc=ht((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=V();return o(g,{className:h("relative flex flex-col",Sc[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:R({...c,extraProps:{className:h("w-full",Da(r)),...kc(l)}})})}),{childrenTypes:[]}),Tc=ht((e=>o(Cc,{...e})),{childrenTypes:[]}),Ic=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?h("flex",Li[n]):"";return o(g,{className:h(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:l})})})),Bc=["байт","Кб","Мб","Гб","Тб","Пб"],Pc=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...ue(i),children:[e,t?c(Re,{size:"text-l",font:"font-light",children:[t," ",Mc(d,m),o(Re,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Mc=(e,t)=>e||t?o("span",{children:", "}):"",Rc=(e,t)=>(n,l)=>{const a=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Bc[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Dc(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(Pc,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:Vc(t),data:n?.data}),o(Pe,{__html:n?.__html})]},String(l))},Vc=e=>e?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,Dc=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},zc=d((({href:e,__html:t,target:n})=>{const{close:l}=de(),a=V(),r=U(a)(e),s=i((()=>{l()}),[]);return c(ha,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Pe,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(be,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o(da,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Ac=d((({text:e,href:t,target:n,__html:l})=>{if(!e&&!l)return null;const a=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(zc,{...e}),n),close:n}})({__html:l,href:t,target:n}),r=i((()=>a.open()),[a]);return o("button",{className:"text-primary-main",onClick:r,children:e})})),jc={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},_c=ht((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=V();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",jc[r]),role:"list",children:a.map($c(d,i))}):null]})})),$c=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?Ec(n,l):Rc(e,t)(n,l)},Ec=(e,t)=>{const n={text:e.text,target:e.target,__html:e.reportSource?.__html};return e.reportSource?.__html&&e.text?c("div",{role:"listitem",children:[o(Ac,{...n,href:Lc(e)?e?.href:e?.attachment?.src}),o(Pe,{__html:e?.__html})]},String(t)):null},Lc=e=>"href"in e,Oc=ht((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...x})=>{const f="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...x,children:c(Ce,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:u,className:h("whitespace-pre-wrap",n)}),rightImage:b,buttons:Ee(l,{className:"flex-wrap"}),children:[a?o(Re,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Pe,{__html:r,itemSize:"list-m"}):null,o(Re,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),Fc=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Uc=(e=[],t={})=>e.filter((({content:e={}})=>Ti(t,e))).length,Wc=(e,t)=>e===t;const Hc=(qc=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(Wc,((e=Wc)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,n])=>qc(n,t[e])))));var qc;const Kc=[],Yc={},Xc={primary:"bg-white/30",secondary:"bg-main-divider"},Gc={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Jc=d((({count:e,version:t="secondary"})=>{const n=Ne(),l=n?"bg-main-divider":Xc[t],a=Gc[t][n?"mobile":"desktop"];return o("div",{className:h("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Re,{size:"text-xs",color:a,children:e})})})),Zc=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:h("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},Qc={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},ed={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},td={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},nd={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},ld=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:u,...p}=t;return o(i,{className:h("h-12","block flex-1","cursor-pointer",Qc[l],n?nd[l]:td[l]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?ed[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Zc({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Jc,{count:m,version:Fc(n,l)})}):null]})})})),ad=d((e=>o(e?.item?.href?id:rd,{...e}))),id=d((e=>{const t=he(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(ld,{...e,tag:"a",item:a,onClick:l})})),rd=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(ld,{item:e,onClick:l,...n})})),sd=(e,t,n)=>(l,a)=>o(ad,{isActive:l===e,onClick:t,type:n,item:l},String(a)),od=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:h("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(sd(l,a,t))}))),cd={categories:[],extraOptions:[],propertyType:[],stage:[]},dd=ht((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=Bi(cd,{block:a.block,page:a.options?.page}),x=i(((e=cd)=>p(e)),[]),f=(({hotFilters:e=Kc,filtrationState:t=Yc,blocks:n=Kc,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Hc(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Uc(n,t.filter),version:Fc(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:x});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(od,{...f}),o(wi,{filtrationSchema:n,resetButton:l,field:m,reset:u}),o(fi,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),md=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),hd=d((({children:e})=>md?e:null)),ud=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:h("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:h("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),pd="/icons/MapMarkerClusterIcon.svg",gd="/icons/MapMarkerClusterYellowIcon.svg";function xd({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n?.length)return;t.geoObjects.removeAll();const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=fd("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=fd("workplaces",e,a),r=bd(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=bd(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=bd(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const fd=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?pd:gd,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),bd=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?pd:gd,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),yd={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},vd={...yd,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},wd=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(vd).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(H,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Nd=e=>globalThis[e];function kd(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=Nd(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(Nd(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(Nd(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}const Sd={...yd,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Cd=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(Sd).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(H,{name:n,width:"20",height:"16"})})})),Td=[55.753995,37.614069],Id=d((({points:e,className:t="",zoom:n=5,isLoad:l})=>{const i=s(null),r=kd("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{i.current?(xd({yandexMaps:r,map:i.current,points:e,isLoad:l}),i.current.setCenter(Bd(e))):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:Bd(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),xd({yandexMaps:r,map:i.current,points:e,isLoad:l})}))}),[r,e,n,l]),!r)return null;const d="z-10";return c("div",{id:"map",className:h("relative","w-full",t),children:[l?o(ud,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(Cd,{yandexMaps:i}),o(Cd,{yandexMaps:i,direction:"out"})]}),wd(i,r,h("right-2 top-80",d))]})})),Bd=e=>{const t=[Md(Pd(e,0)),Md(Pd(e,1))];return t.every((e=>e))?t:Td},Pd=(e,t)=>e.map((e=>e.coords?.[t])),Md=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Rd=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Pe,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Re,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Vd={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Dd="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",zd=(e,{field:t,reset:n},l)=>{const a=l?5:6,i=(e||[]).map((e=>o(Xt,{text:Vd[e],...t(e)},e))),[r,s]=a>0?[i.slice(0,a),i.slice(a)]:[i,[]];return o("div",{children:e?.length?o("div",{children:o(bl,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Dd,children:r}),o(yl,{className:Dd,isUnfolded:e,children:s})]}),renderFoldButton:Ad(n,l)})}):null})},Ad=(e,t)=>({isUnfolded:n,onToggle:l})=>c("div",{className:"flex space-x-lg",children:[t?o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(H,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:l}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:jd()})]}),jd=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(H,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),_d=()=>{},$d=()=>[],Ed=e=>"all"===e?"block":"hidden",Ld=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=_d,renderRemoteWorkplaceCard:s=_d,filterItems:d=$d,getBalloon:m=_d,getBalloonRemoteWorkplaces:u=_d,initFilterState:p={},descriptionData:g,title:x})=>{const f=x?.includes("Офис"),[b,{field:y,reset:v}]=jt(p),[w,N,k,S]=r((()=>{const e=d(t,b),n=d(a,b),l=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:u({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,l,n,e.length+n?.length]}),[t,a,b]),[C,T]=l("all");return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Od(x,S),g?Rd(g):null,f&&Fd(t,C,T),o("div",{className:h("pb-3xl",Ed(C)),children:zd(Object.keys(p),{field:y,reset:v},f)})]}),o("div",{className:"h-[600px]",children:o(hd,{children:o(Id,{points:N,isLoad:n,className:"h-full"})})})]}),c(hd,{children:[w.map(i),k.map(s)]})]})})),Od=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Re,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Fd=(e,t,n)=>{const l=Fc("all"===t),a=Fc("business"===t),i=(e,t,l)=>(e.currentTarget===e.target&&"business"===t&&l.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),n(t),l);return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(da,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(da,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Ud={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Wd=d((({className:e,children:t,color:n="gray"})=>c("div",{className:h("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Ud[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Re,{size:"text-m",color:Ud[n].text,children:t})]}))),Hd=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:qd({textItems:i,subText:t,children:n,isPhone:l,...a})})),qd=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Re,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Kd(n,s),a?o(Re,{color:l,size:"text-m",children:a}):null]}),Kd=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Re,{size:"text-l",children:t?o("a",{href:`tel:${Yd(e)}`,children:e.trim()}):e.trim()},String(n)))),Yd=e=>e.replace(/\D/g,""),Xd=d((({className:e,children:t})=>o("div",{className:h("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Gd=["ArrowDownIcon","ArrowUpIcon"],Jd=["Подробнее","Скрыть"],Zd=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:Jd[Number(e)]}),o(H,{className:"text-primary-text",name:Gd[Number(e)],width:"16",height:"16"})]}),Qd=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:nm(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:nm(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Wd,{color:"green",children:nm(s)})})]}),o("div",{className:"hidden sm:block",children:o(Xd,{className:"flex-wrap",children:m?.map(tm)})}),o(bl,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(yl,{isUnfolded:e,children:o(Xd,{className:"flex-wrap",children:m?.map(tm)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Zd({isUnfolded:e,onToggle:t})})]},String(d))},em=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${nm(t)} №${n}`,body:e.toUpperCase()}),tm=(e,t)=>o(Hd,{...e},String(t)),nm=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",lm=[];const am=async e=>{const t=await it(e,{method:"GET"});return Array.isArray(t)?t:lm},im={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},rm={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},sm=d((({descriptionData:e,className:t})=>{const[n]=fo(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=el(`/api/v1/atms?regionCode=${e}`,am);return{data:t||lm,isLoad:!t&&!n}}(l);return o(Ld,{className:t,filterItems:om,data:a,isLoad:i,initFilterState:im,renderCard:Qd,getBalloon:em,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),om=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>rm[t](e))),n=!l.length||l.some((t=>rm[t](e)));return t&&n}))},cm=e=>{const t=mm(e);return o(Hd,{label:"Режим работы",value:t,className:"max-w-none"})},dm=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",mm=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[dm({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),dm({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},hm=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],um=e=>hm.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),pm=e=>{if(!e)return null;const t=gm(e);return c(Xd,{className:"border-none",children:[o(Hd,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(xm)})}),o(Hd,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]})},gm=e=>{const t=hm.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},xm=({short:e,status:t},n)=>o("div",{className:h("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Re,{size:"text-xs",children:e})},String(n)),fm=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Hd,{label:"Валюта",value:e.currency}):null,t?o(Hd,{label:"Купить",value:String(t)}):null,n?o(Hd,{label:"Продать",value:String(n)}):null]},String(l)),bm=(new Date).getDay(),ym=e=>{const[t]=e?.slice(bm-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Wd,{color:"green",children:a}):null,n&&i?o(Wd,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Wd,{color:"red",children:"Выходной"})},vm=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",wm=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(Hd,{label:e,value:t&&n?n:"",subText:vm({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Nm=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,km=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Sm=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,Cm=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=um(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),ym(u)]}),o("div",{className:"hidden sm:block",children:Tm({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(bl,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(yl,{isUnfolded:e,children:Tm({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Zd({isUnfolded:e,onToggle:t})})]},String(h))},Tm=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=um(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Xd,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Hd,{label:"Факс",value:t,isPhone:!0}),o(Hd,{label:"Телефон филиала",value:e,isPhone:!0}),o(Hd,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Hd,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(Hd,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Hd,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(Xd,{children:o(Hd,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(wm)})})}):c(Xd,{children:[o(Hd,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(xm)})}),cm(d)]}),r?.businessScheduleVisibleTag?pm(r?.businessScheduleDescription):null,s?.currencies?.length?o(Xd,{className:"flex-wrap",children:s?.currencies?.map(fm)}):null]})},Im=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=um(e),n=e?mm(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?Nm(n):Sm(n,l):km(n):null})(n)}`;return{header:l,body:i}},Bm=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Re,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Pm({workScheduleDescription:t})}),o(bl,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(yl,{isUnfolded:e,children:Pm({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Zd({isUnfolded:e,onToggle:t})})]},String(n)):null,Pm=({workScheduleDescription:e})=>c("div",{children:[c(Xd,{className:"flex",children:[o(Hd,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Hd,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание банковских карт"})}),o(Hd,{label:"Операции для физических лиц",children:o(Re,{children:"Инвестиционное и накопительное страхование"})}),o(Hd,{label:"Операции для физических лиц",children:o(Re,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Hd,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]}),Mm=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Rm={branches:[],remoteWorkplaces:[]};const Vm=async e=>await it(e,{method:"GET"})||Rm,Dm={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},zm={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},Am=d((({className:e})=>{const[t]=fo(),n=t?.code??"000",{data:l,isLoad:a}=function(e){const{data:t,error:n}=el(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,Vm);return{data:t||Rm,isLoad:!t&&!n}}(n);return o(Ld,{className:e,filterItems:jm,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,initFilterState:Dm,renderCard:Cm,renderRemoteWorkplaceCard:Bm,getBalloon:Im,getBalloonRemoteWorkplaces:Mm,title:`Офисы филиала ${t?.name}`})})),jm=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>zm[t](e)))))},_m=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:h(t),defaultPadding:"p-0",...n,children:"offices"===l?o(Am,{}):o(sm,{descriptionData:e})})})),$m=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:h("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),Em=d((({className:e,padding:t,slides:n=[],...l})=>o(g,{className:h("overflow-hidden relative",e),padding:t,...l,children:o(oi,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Xe,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),Lm=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[$e(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Om({__html:i,richVersion:r}):null,Fm({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Fm({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Fm({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?Ee([l]):null]})]}))),Om=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),Fm=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(H,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Re,{size:"text-xl",color:l,children:t})]})]}):null,Um=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Pe,{__html:t,richVersion:n})})})),Wm=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(ea,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(ea,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Hm=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(un,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),qm=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Hm,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Hm,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Km=["От 1 дня","До 365 дней"],Ym=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Re,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(hl,{min:1,max:365,value:e,items:Km,onChange:t})]}))),Xm=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Hm,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Hm,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Gm=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(qm,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:Jm(m)}),o(Ym,{days:a,setDays:e=>m({days:e})}),o(Xm,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Zm(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Wm,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),Jm=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Zm=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Qm=d((({days:e,tariffs:t=[]})=>{const n=th(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[eh("Аренда за",e),eh("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(k,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),eh=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),th=(e,t)=>{const n=nh(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},nh=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},lh=(e,t)=>e.find((e=>e.branchCode===t)),ah=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=lh(l,n.selectedBranch),d=ih(s?.safeBoxCaseVolumes),m=rh(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,h=sh(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Gm,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Qm,{days:n.days,tariffs:h})]})})),ih=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],rh=(e,t)=>e?.find((e=>e.volume===t)),sh=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,oh=[];const ch=async e=>await it(e,{method:"GET"})||oh,dh=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,h]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Il(),p=mh(m.selectedRegion,u),x=function(e){const{data:t}=el(e?`/api/v1/safeboxes?regionCode=${e}`:null,ch);return t||oh}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=lh(x,m.selectedBranch)||x,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(ah,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Id,{points:b,className:"h-[640px]"}):null]})})),mh=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,hh={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},uh=(e,t,n)=>(l,a)=>{const{button:i}=l;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:ph(e,n)(l,a)}),c("div",{className:h("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[gh(l),i?.text?o(be,{className:"box-border py-s w-full max-w-60 mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},ph=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=xh(e,i),s=i?"transparent"===t:t;return o(g,{className:h("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:fh({step:n,iconVersion:a,i:l,stepVersion:t})})})},gh=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:h("text-s font-light text-left",hh.description),children:e.description}):null,o(Pe,{__html:e.__html})]}),xh=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",fh=({step:e,iconVersion:t,i:n,stepVersion:l})=>{return $e(e?.icon)?o(ne,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:h("text-h4","transparent"===l?hh.iconText:(a=l,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var a},bh=d((({className:e="",title:t,description:n,steps:l=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=l.length>3;return c(g,{className:h("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:l.map(uh(d,r,i))}):null,Ee(a,{isVertical:!0})]})})),yh=d((({isActive:e,item:t,onClick:n})=>c("div",{className:h(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(H,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),vh=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:h("relative min-h-full bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(ma,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),wh=({menuRef:e,dialogRef:t,closeDialog:n,openDialog:l,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();l(o(vh,{onClick:e=>e.stopPropagation(),onClose:n,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(N,{as:"h4",title:c[r].description||c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];function Nh(e){throw new Error(e)}const kh=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(n),o()}),[n,e]),d=i((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return a((()=>ce.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Nh(e)}}))),[c,d]),n},Sh=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const Ch=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(Th,{...e},String(t))))})]}):null,Th=d((({icon:e,...t})=>{const n=he(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Ih=(e,t)=>n=>n.name?o(As,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:zs(e,n.name),children:o(Re,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Bh=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:h(ln,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Ph=d((({foreignOffices:e,branches:t})=>{const[n,a]=fo(t?.default),r=he(),{href:s}=r({href:`/branches/${n.slug}`}),[d,m]=l(""),h=Rh(Il()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(h,Mh),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(ha,{className:"pb-20",head:c("div",{children:[o(Re,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(As,{href:s,className:"inline mx-2xs text-primary-main",children:n.name})]})}):null,o(Bh,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&Sh(e.toLowerCase())(d.toLowerCase())>=.8)).map(Ih(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((x=g,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Re,{size:"text-h6",children:e})}),t.map(Ih(f,x))]},e)))}),Ch(e)]});var x,f})),Mh=e=>e.name?.charAt(0)||"",Rh=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Vh=d((({menuRef:e,menuItem:t,locationDialogProps:n,closeAll:l})=>{const i=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Ph,{...e}),n),close:n}})(n||{}),[{name:r}]=fo(),s=e?.current?.getBoundingClientRect(),c=G(X.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open(),"reload"===e.data.type&&l(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(vh,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center justify-center px-xl",children:o(N,{as:"h4",title:t?.title,className:"font-medium"})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),Dh="burgerMenuDialog",zh=({menuRef:e,centralMenuItem:t,closeAll:n,openDialog:l,locationDialogProps:a})=>{const i=kh(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Dh,i);return[r,{toggle:()=>{r?n():l(o(Vh,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:n}),{id:Dh})}}]},Ah=[],jh=ht((({sticky:e,...t})=>{const{menuItems:n=Ah}=e??{},a=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),h=r.slice(d),[u,p]=l(-1),[x,f]=l(""),{open:b,closeAll:y}=de(),v=i((()=>{p(-1),f(""),y()}),[y]),w=cn(v),N=s(null),[k,{toggle:S}]=zh({menuRef:N,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.header}),[{openBottomMenuItemDialog:C}]=wh({menuRef:N,dialogRef:w,closeDialog:v,openDialog:b,leftItems:m,rightItems:h}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{f(t),p(e),y(),C(e,t)}),[y,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(_h(I,"left",{activeIndex:u,currentItemPosition:x})),o(yh,{item:a,isActive:k,onClick:e=>T(e)}),h.map(_h(I,"right",{activeIndex:u,currentItemPosition:x}))]})})})),_h=(e,t,n)=>(l,a,i)=>o(yh,{item:l,isActive:i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t,onClick:r=>{i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t||r.stopPropagation(),e(a,t)}},l.title||String(a)),$h="hidden sm:flex absolute z-40",Eh={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Lh=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=Ja({itemCount:t?.length||0});return a((()=>Oh(r.current,t,n)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o($a,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Eh[i].item,gap:Eh[i].gap,children:t.map(sd(n,l,i))}),s.canScrollLeft?o(ni,{className:h("left-6",$h,Eh[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(li,{className:h("right-6",$h,Eh[i].buttonTop),onClick:s.scrollRight}):null]})})),Oh=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},Fh={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Uh=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:h(Fh[t].wrapper,e),children:o(Lh,{className:Fh[t].component,tabsType:t,...n})}):null,Wh=ht((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=Hh(n??{}),p=V(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(Yh(f,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(u))),w=f[y],N=f.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[u]?f.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[u])):N;v(-1===e?0:e)}),[b,N,u]);const k=Kh(f[y],y),S=i((e=>{const t=f.indexOf(e),n=f[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(u,e?.tabName??String(t)):n.delete(u),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[f]);return c(g,{className:h({"sticky top-1 z-20":d&&x},e),defaultPadding:"p-0",block:n,...m,children:[Uh({className:h({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!x}),items:qh(t,f),activeItem:w,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>M(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Kh)?.filter(Boolean)||[]}),Hh=({__id:e,anchor:t})=>t??e??"tabs",qh=(e,t)=>t?.length?t:e,Kh=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Yh=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Xh={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Gh=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Xh[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Jh=d((({className:e="",isOpen:t,onClick:n})=>o(be,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),Zh={Buttons:({buttons:e})=>Ee(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Pe,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Re,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Re,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(Jh,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},Qh=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return eu({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),eu=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in Zh))return null;return o(Zh[n],{...t,...l})},tu=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Qh,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),nu=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),lu=(e,t)=>e?.length>0?o("div",{className:h("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Re,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,au=d((({rows:e})=>{return o($a,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=h("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Re,{size:"text-xl",font:"font-light",children:l.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${nu(a,t)}px)`},children:a?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Re,{size:"text-xl",children:e.data}):null,e?.cols?lu(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),iu=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Re,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(au,{rows:t.rowsData})})})]},l)}))}))),ru=(e=!1)=>""+(e?"text-white":"text-secondary-text"),su=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:h("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(Re,{size:"text-xl",font:"font-light",color:ru(t===n),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(H,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),ou=ht((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(su,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(iu,{activeTabIndex:r,items:m}),o(Jh,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Re,{size:"text-h6",children:"Данных нет"}),o(Jh,{onClick:n,isOpen:!0})]})})),cu=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:h("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(ou,{...t,onClick:n})}):null]}))),du=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[u,p]=l(void 0),g=i((e=>p(e)),[]);return c(cu,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Gh,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(tu,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function mu({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?c("div",{children:[n?o(ti,{className:h("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?o(ti,{className:h("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const hu=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,mu({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),uu=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],u=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[x,f]=((e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:p,visibleItemCount:2}),b=(u||[]).map(((e,t)=>o(du,{row:e,activeIndex:x,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]];return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?o(bl,{renderFoldableSection:({isUnfolded:e})=>c(hu,{controls:f,children:[y,o(yl,{isUnfolded:e,children:v})]}),renderFoldButton:ui}):o(hu,{controls:f,children:b})})]})})),pu=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:h("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?gu():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Re,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?xu(n):null,a?o(Pe,{richVersion:i,__html:a}):null]})]}))),gu=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),xu=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),fu=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:n})}):null]}))),bu=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(fu,{prefix:t,unit:n,suffix:l})})})),yu={AdTile:pt,ApplicationForm:Sa,ApplicationLeadForm:Ra,BankAccountFiltration:Ri,BenefitsBlock:ji,BonusBenefitsBlock:Ei,ButtonsBlock:Oi,CalculatorBonus:nr,CalculatorBusinessDeposit:wr,CalculatorCredit:jr,CalculatorDeposit:es,CalculatorRefinancing:os,CardTransfer:gs,Carousel:ks,CarouselCard:Is,CarouselCatalogCard:Ps,CarouselLinks:Vs,CarouselRecommendationCard:Ls,CarouselTariffsCard:Us,DepositFiltration:Xs,Depository:uo,ErrorBlock:go,ExchangeRateTile:Fo,Footer:cc,GrantSupport:dc,Header:Nc,Headline:C,HorizontalLayout:Tc,ImgBlock:Ic,LinkDocs:_c,MobileAppTile:Oc,MortgageFiltration:dd,OfficesAtmsMap:_m,Placeholder:$m,ProductBlock:ut,ProductGallery:Em,RepresentativeOfficeInfo:Lm,RichTextBlock:Um,RollupItem:Go,SafeDepositRental:dh,StepsBlock:bh,StickyBottomMenu:jh,TabsLayout:Wh,TariffsTable:uu,TextBlock:pu,UnitBlock:bu,VerticalLayout:Cc},vu=me((()=>{a((()=>{Tt()}),[]);const e=zt();on(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");St({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const wu="cookie",Nu=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=tn();!function(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(wu)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(wu,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Pe,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(ma,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null})),ku=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=kh({onCloseAll:e,onClose:t}),{close:l}=de(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return on(globalThis.document,"keydown",r),a((()=>{n.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[n]),n.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},l)=>o("div",{className:h("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==n.length-1}),children:e},String(t||l))))}):null})),Su=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);a((()=>ce.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:Nh(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return on(globalThis.document,"keydown",r),e?o("div",{className:h("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Cu="header",Tu="footer",Iu="sticky-footer",Bu={},Pu=d((({className:e,data:t=Bu,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=mt(s,r);vu();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:M(a?.header,{...m,slotName:Cu})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[R({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),M(a?.footer,{...m,slotName:Tu})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.["sticky-footer"],{...m,slotName:Iu})}):null,o(ku,{}),o(Su,{}),o(Nu,{__html:d?.cookieContent?.__html})]})}));Object.assign(Pu,{childrenTypes:[],slots:()=>[Cu,Tu,Iu]});e.Blocks=yu,e.ContentPage=Pu,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=me,e.joinList=yi,e.packageVersion="0.14.569",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=V,Object.defineProperty(e,"__esModule",{value:!0})}));
|