@redneckz/wildless-cms-uni-blocks 0.14.166 → 0.14.168
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/bundle.umd.js +8 -30
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/ContentPage/ContentPage.js +3 -3
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +3 -3
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +8 -30
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +3 -3
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +3 -3
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/src/components/ContentPage/ContentPage.tsx +3 -3
- package/package.json +2 -2
- package/src/components/ContentPage/ContentPage.tsx +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("fs"),require("path"),require("util")):"function"==typeof define&&define.amd?define(["exports","fs","path","util"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={},e.fs,null,e.util)}(this,(function(e,t,l,n){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(l){if("default"!==l){var n=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,n.get?n:{enumerable:!0,get:function(){return e[l]}})}})),t.default=e,Object.freeze(t)}var i=a(t);let r;const s=e=>(...t)=>r[e](...t),o=s("useState"),c=s("useEffect"),d=s("useCallback"),m=s("useMemo"),h=s("useRef");const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=g((({children:e})=>f?e:null));const y=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{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}};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 N=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),w={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","":""},k=g((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:n="p-xl",padding:a,block:i,tag:r="section",role:s,children:d,style:m})=>{const h=r,p=v(),[g,x]=o(!1);c((()=>y.subscribe("tab",(e=>{e.groupName&&e.groupName!==i?.labelGroup||x(Boolean(e.label&&i?.labels?.length&&!i.labels.includes(e.label)))}))),[i,p]);const f=t&&l;return u(h,{className:N("@container font-sans",f?"group":"",w[t],g?"hidden":"",a||n,e),...f?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:m,children:d})})),S={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},C={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},I=g((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=S[l]||"h3";return u(i,{className:N("font-sans m-0",C[t],e),children:n||a})})),T=g((({children:e,...t})=>u("p",{className:N("font-sans",Object.values(t)),children:e}))),B={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"}},M=g((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=B[l],m={marginTop:d.descriptionStyle};return p(k,{className:N(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(I,{className:N("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(T,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),P=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),V=[];function R(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=P,blocksRegistry:r={},ancestors:s=V}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:N(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const z=[],A=(e,{key:t,ancestors:l=z,slotName:n=null,extraProps:a,renderProps:i=R,...r})=>{const s=a?(e,t)=>R(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||z,[r.parent,n]]:l},a)))};function D({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?A(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const j=e=>e&&!e.endsWith("/")?`${e}/`:e,F=["CDN","BASE_PATH"],E=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return F.includes(t)?j(l):l}}),L=e=>Boolean(e?.includes(":")),O=(e,t)=>Boolean(e&&!L(e)&&(!t||"_self"===t)),$=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),_=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var U=Object.freeze({__proto__:null,isURL:L,isLocalURL:O,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:$,joinPath:_});const H="/api/",W=`${H}v1/storage`,K=e=>(t,l=E.BASE_PATH)=>{if(!t||L(t)||[E.CDN,H].some((e=>G(t,e))))return t;if(/^[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(t))return`${W}/${t}/file`;const n=t.startsWith("/");return _(G(t,l)?"":l,n?"/":(e=>e?.split("/").slice(0,-1).join("/"))(e.pathname),t)},G=(e,t)=>t&&e&&e.startsWith(t),q={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},X=g((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const o=v(),c="normal"===i?`${l}.svg`:`sprites.svg#${l}`,d=K(o)(_(E.CDN,"/icons/",c));return"normal"===i?u("img",{className:e,src:d,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:Y(e,s)}):u(Z,{className:e,children:p("svg",{className:N(Q(r),q[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:d,xlinkHref:d})]})})})),Y=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},Q=e=>e?"":"w-full h-full",Z=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),J=(e,t)=>l=>l&&!L(l)?K(e)(_(t,l)):l,ee=(e,t)=>e?.media&&t?.media?e.media-t.media:0,te=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=v();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(ee).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:J(a,n)(e),type:ne(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?le({...t,src:J(a,n)(t.src)},l):null]})})),le=(e,t="")=>u("img",{src:e.src,className:N("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}),ne=e=>e?`image/${String(e)}`:void 0,ae=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(X,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(te,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),ie={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","":""},re="bg-main-divider text-main-disabled",se={primary:re,secondary:re,white:re,link:"",transparent:"",gray:re,"":""},oe="text-center font-sans select-none",ce={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","":""},de=({className:e,rounded:t,version:l})=>[oe,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?ie[l]:"",t?"rounded-full":"rounded-md",e].join(" "),me=()=>({open:(e,t={})=>y.fire("dialog",{type:"open",dialog:e,...t}),close:()=>y.fire("dialog",{type:"close"}),closeAll:()=>y.fire("dialog",{type:"close",all:!0})}),he=(e,t)=>he._impl(e,t);function ue(e={}){const{isRemote:t,basePath:l}=e,n=v(),{closeAll:a}=me();return e=>({...e,href:t&&!l?e.href:K(n)(e.href,l),"aria-label":e.text,onClick:he(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&O(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}he._impl=e=>e,he.setup=e=>{he._impl=e};const pe=g((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=xe(e)?"hidden lg:block":"";return p("div",{className:N(ge(e),"flex gap-xs"),children:[n?u("div",{className:N(r,ce[i]),children:n}):null,xe(e)?p("div",{className:"whitespace-pre",children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:N(r,ce[i]),children:a}):null]})})),ge=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return N("group/btn items-center justify-center",xe(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},xe=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),fe=({className:e,rounded:t,version:l})=>["inline-block",oe,l?se[l]:"",t?"rounded-full":"rounded-md",e].join(" "),be=g((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const i=(({method:e,href:t})=>d((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),r=ue()({onClick:i,href:n,...a}),s=t??u(pe,{...r});return u(e?ve:ye,{...r,children:s})})),ye=g((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:de({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),ve=g((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:fe({className:e,rounded:n,version:l}),children:a})));function Ne(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"hidden sm:flex items-center gap-s",children:[u("div",{className:de({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(ae,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(be,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const we={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},ke=g((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:i="",buttons:r,leftImage:s,rightImage:o,imageAlign:c,isImageAlwaysOnRight:m=!1,isImageSecondary:h=!1,backwardButton:g,children:x,...f})=>{const b=v(),y=d((e=>{e?.preventDefault(),b.back()}),[]);return p("div",{className:Se(n,l,e),children:[g?Ne(t,y):null,a?u("div",{className:"relative h-full",children:a}):null,p("div",{className:N("grow relative flex flex-col @xl:flex-row gap-3xl w-full",s?"self-start @xl:w-auto":""),children:[Me(s,{imageAlign:c,className:"mx-auto"}),p("div",{className:N("grid gap-3xl",o?"@xl:grid-cols-2":"",s?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[p("div",{className:"grow space-y-lg min-w-fit",children:[i,x]}),Be(D({...f,extraProps:{className:"@container-normal"}})),Me(o,{className:N("@xl:justify-self-end @xl:col-start-2",r?Ce(m):"",Ie(m),Pe(h)),imageAlign:c}),Te(r)]})]})]})})),Se=(e="",t="",l="")=>N("relative flex flex-col gap-3xl overflow-hidden",e||t,l),Ce=e=>e?"row-span-2":"@xl:row-span-2",Ie=e=>e?"col-start-2 self-center":"",Te=e=>e?u("div",{className:"self-end",children:e}):null,Be=e=>e&&e?.length?u("div",{className:"flex items-start justify-end",children:e}):null,Me=(e,{className:t,imageAlign:l})=>e?u("div",{className:N("shrink-1/2 justify-self-center",l&&we[l],t),children:e}):null,Pe=e=>e?"hidden @xl:block":"",Ve=(e=[])=>e.reduce(((e,t)=>e+t),0),Re=(e=[])=>e?.length?Ve(e)/e.length:0,ze=(e,t="normal")=>e?u("div",{className:N("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:u(ae,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Ae=g((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?u("div",{"data-component":"rich-text-container",children:u("div",{className:N(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),De=(e,t)=>e?u(T,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,je=g((({children:e,...t})=>u("span",{className:N("font-sans",Object.values(t)),children:e}))),Fe=(e,t)=>e?u(je,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ee=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Ae,{...e},`rte-${t}`):["label"in e?Fe(e.label,t):null,"description"in e?u("span",{className:e.descriptionClassName,children:De(e.description,t)},String(t)):null],Le=g((({className:e,benefitsVersion:t,...l})=>p("div",{className:N("flex gap-m min-w-56 items-center",e),children:["icon"in l?ze(l.icon,t):null,u("div",{children:Ee(l)})]}))),Oe=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),$e=e=>{return((t=e.map(Oe))?.length?Math.sqrt(Math.abs(Re(t.map((e=>e**2)))-Re(t)**2)):0)>16;var t},_e=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Ue=e=>!e.some(_e),He=g((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:N("flex gap-x-m gap-y-s",$e(l)||Ue(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Le,{benefitsVersion:t,...e},String(l))))}):null)),We=g((({className:e,benefits:t})=>t?.length?u("div",{className:N("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Ee)}):null)),Ke=g((({isTabularBenefits:e,...t})=>u(e?We:He,{...t}))),Ge=e=>Boolean(e?.src||e?.icon),qe=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:N("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map(Xe(l))}):null,Xe=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o=Ye(a,r),c=Ye(i,r);return n||a?.icon?u(be,{className:N("basis-full @lg:basis-auto",e),appendLeft:Qe({...a,iconVersion:o}),appendRight:Qe({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Ye=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Qe=e=>Ge(e)?u(ae,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Ze=g((({className:e,isDotted:t,dotClassName:l,children:n})=>p("div",{className:N("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:N("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,u("span",{children:n})]}))),Je={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},et=g((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=Je[n];return l?.length?u("section",{className:N("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>u(Ze,{isDotted:t,dotClassName:N(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),tt=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),lt=g((({priceList:e})=>e?.length?u("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:e.map(nt)}):null)),nt=({label:e,amount:t})=>p("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",children:[u(je,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?p("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[tt(2)(t)," ₽"]}):null]}),at=g((({className:e,tags:t})=>t?.length?u("div",{className:N("flex flex-wrap gap-xs",e),role:"list",children:t.map(it)}):null)),it=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(je,{size:"text-m",font:"font-light",children:e})},String(t)),rt={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},st=g((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m,items:h,isDotted:g=!0,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:C,...I})=>{const T=y?.src?u(ae,{image:y}):null,B=u(M,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),P=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(ke,{className:e,padding:t,defaultPadding:l,...m?{title:B}:{insetTitle:B},...ot(T,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:qe(b),backwardButton:S,...I,children:p("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?u(Ke,{benefitsVersion:s,isTabularBenefits:o,benefits:P}):null,d?u(Ae,{__html:d}):null,h?.length?u(et,{items:h,isDotted:g,listItemSize:rt[i]}):null,C,x?.length?u(lt,{priceList:x}):null,ct(f)]})})})),ot=(e,t)=>t?{rightImage:e}:{leftImage:e},ct=e=>e?.length?u(at,{tags:e}):null,dt=e=>Boolean(e&&Array.isArray(e)),mt=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),ht=(e,t)=>{return l=e,Boolean(mt(l)&&"string"==typeof l.$ref)?t.ref(e):mt(e)?t.record(e):dt(e)?t.array(e):t.scalar?t.scalar(e):e;var l},ut=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(pt,e),pt=(e,t)=>e&&t?mt(e)?e[t]:dt(e)?e[parseInt(t,10)]:e:e,gt=(e,t)=>ht(e,{ref:({$ref:e,...l})=>gt(e?ut(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:gt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>gt(e,t)))}),xt=(e,t,l=[])=>{ht(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)xt(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)xt(e[n],t,[...l,n])}})};async function ft(e,t){try{return e?await bt(e,t):null}catch(e){console.error(e)}return null}n.promisify(i.readFile);const bt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),yt=e=>[...new Set(e)],vt={},Nt=["/portal-resources"],wt=(e,t)=>{const l=(e=>{const t=[];return xt(e,(e=>t.push(e))),t})(e),[n,a]=o({});return c((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(yt(e).filter((e=>!Nt.some((t=>e.startsWith(t))))).map((async e=>[e,vt[e]||=await bt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(a)}),[l.join()]),l.length?gt(e,(e=>n[e]||t?.[e])):e};function kt(e,t={}){const l=g((t=>{const l=wt((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return u(e,{...t,...l})}));return Object.assign(l,t),l}const St=kt((({className:e,padding:t,...l})=>u(k,{className:N("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:u(st,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),Ct=g((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=m((()=>It(0,t?.length)),[t]),n=t?.[l];return n?u(b,{children:u(St,{...n,...e})}):null})),It=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Tt=e=>e?.replace(/[^+\d]/g,"");const Bt=e=>e&&"+7 ("!==e?{secondaryPhoneNumber:Tt(e)}:{},Mt=e=>e,Pt=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[n,a]=o(e),[i,r]=o(!1),[s,c]=o({}),m=h({}),u=d(((e,t)=>{const{parse:l=Mt,format:r=Mt}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((n=>({...n,[e]:l(t)}))),c((t=>({...t,[e]:!0})))},{value:r(n[e]),isDirty:i||s[e],onChange:m.current[e]}}),[n,i,s]),p=d((e=>{a(e),c(e)}),[]),g=d((()=>{a(e),r(!1),c({})}),[e]),x=d((e=>{e.preventDefault(),t?g():r(!0),l&&l(n)}),[l,n]);return[n,{isDirty:i||Object.values(s).some(Boolean),field:u,update:p,reset:g,onSubmit:x}]},Vt=g((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:N("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:N("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?u(je,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Rt=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],zt=e=>!e?.length,At=e=>t=>l=>e(l)?[]:[t],Dt=g((({text:e,link:t})=>p(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(je,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?u(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:u(je,{children:t.text})}):null]}))),jt="container space-y-lg",Ft="w-full max-w-xl space-y-s m-auto",Et=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Lt=g((({title:e,children:t})=>p("fieldset",{className:"grid @xl:flex @xl:justify-between gap-lg border-b border-b-main-divider @xl:border-none",children:[e?u("legend",{className:"w-full",children:u(I,{title:e,headingType:"h6",className:"@xl:text-center"})}):null,t]}))),Ot="@xl:w-1/2 space-y-s",$t=g((({key:e,className:t="",id:l,name:n,type:a="text",label:i,placeholder:r,value:s="",valid:o=!0,children:m,onChange:g,onFocus:x,onBlur:f,pattern:b,autoFocus:y=!1,isTextarea:v=!1})=>{const w=h(null),k=d((e=>{g&&g(e.target?.value||"")}),[g]);c((()=>{y&&w.current?.focus()}),[y,w]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=m?"pr-3xl":"",I=Ut(o);return p("div",{className:N("relative",t),children:[p("label",{children:[i?_t(i):null,v?u("textarea",{className:N("block resize-y min-h-24",S,I),id:N("textarea",l),name:n||l,placeholder:r,value:s,onInput:k,onFocus:x,onBlur:f},e):u("input",{type:a,className:N("h-14",S,C,I),ref:w,id:l,name:n||l,placeholder:r,value:s,onInput:k,onFocus:x,onBlur:f,pattern:b},e)]}),m]})})),_t=e=>u("div",{className:"mb-xs",children:u(je,{size:"text-m",font:"font-light",children:e})}),Ut=e=>e?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error",Ht=e=>u("div",{className:"h-4",children:e?u(je,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Wt=g((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,...o})=>p("div",{className:N("shrink-0 w-full",e),children:[u($t,{type:"text","aria-label":t,label:t&&o?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:o?.errors&&!t?`${n}*`:n}),Ht(a)]}))),Kt=e=>"_"===e,Gt=e=>/\d/.test(e),qt=e=>Kt(e)||Gt(e),Xt=[..."+7 (___) ___-__-__"],Yt=Xt.findIndex(Kt),Qt=Xt.map(((e,t)=>qt(e)?Xt.slice(0,t).filter(qt).length:-1));const Zt=g((({children:e,onChange:t,...l})=>{const n=d((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Xt.map(((e,l)=>Gt(e)?e:t.charAt(Qt[l])||e)),n=Qt.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Yt,n)):l).join("")}(e))),[t]);return u($t,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Jt=g((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>p("div",{className:N("shrink-0 w-full",e),children:[u(Zt,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Ht(n)]}))),el="Некорректно заполненное поле",tl=At((e=>null!=e&&""!==e))(el),ll=At((e=>"string"==typeof e&&e.length>1))(el),nl=At((e=>"string"==typeof e&&(10===e.length||12===e.length)))(el),al=(il=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,At((e=>"string"==typeof e&&il.test(e))))(el);var il;const rl=At((e=>"boolean"==typeof e&&e))(el),sl=(e,t)=>p(Lt,{title:t,children:[p("div",{className:Ot,children:[u(Wt,{label:"Наименование организации",...Et(e("fullName"),tl)}),u(Wt,{label:"Контактное лицо",...Et(e("name"),ll)})]}),p("div",{className:Ot,children:[u(Wt,{label:"ИНН",...Et(e("inn"),nl)}),u(Jt,{label:"Телефон",...Et(e("phone"),al)})]})]}),ol=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],cl=e=>null!=e,dl=new Map,ml=e=>Boolean(e?.every((e=>Array.isArray(e)?ml(e):!e||"string"==typeof e))),hl=e=>ml(e)?e.toString():"";function ul(e,t,{fallback:l,cache:n}={}){const a=m((()=>pl(e)),[e]),[i,r]=o(void 0),[s,d]=o(void 0);c((()=>{if(!a.some(cl))return;let e=!1;const l=(t,l)=>{e||(r(t),d(l))};return(async()=>{try{l(await((e,t=dl)=>l=>{const n=hl(l),a=t.get(n);if(n&&cl(a))return a;const i=e(...l);return n&&cl(i)&&t.set(n,Promise.resolve(i)),i})(t,n)(a))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,n,a]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(a)&&l[a[0]];return{data:!i&&h?h:i,error:s,mutate:()=>Promise.resolve(void 0)}}function pl(e){return Array.isArray(e)?e:e instanceof Function?pl(e()):[e]}function gl(){const{data:e}=ul("/api/v1/regions",bt);return e||[]}function xl(e=!1){const[t,l]=o(e),n=d((()=>l(!0)),[]),a=d((()=>l(!1)),[]),i=d((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:n,setFalse:a,toggle:i}]}const fl=e=>e?.text||e?.key||"";function bl(e,t,l,n){c((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function yl(e){const t=h(null),l=d((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return bl(globalThis.document,"click",l),t}const vl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Nl=g((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:vl(t,n).map((e=>p("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[u("span",{className:"min-h-6",children:fl(e)}),u(X,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:N("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function wl({isOpen:e,options:t,value:l,query:n,onChange:a,onClose:i,iconVersion:r}){const s={open:(e,t)=>y.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>y.fire("popup",{type:"update",popup:e,...t}),close:()=>y.fire("popup",{type:"close"})},o=d((()=>{s.close(),i&&i()}),[i]),m=d((e=>{o(),a&&a(e)}),[o,a]),p=h(null),g=yl(o);return c((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:o,width:c,height:d}=a.getBoundingClientRect();s.update(u(Nl,{popupRef:g,options:t,value:l,query:n,onChange:m,iconVersion:r}),{top:i+window.scrollY+d,left:o,width:c})}),[e,t,l,n,m]),p}const kl=g((({className:e,label:t,options:l=[],value:n,valid:a=!0,isBorder:i=!0,placeholder:r="",isSearch:s=!1,iconVersion:c,onChange:m})=>{const[h,{setFalse:g,setTrue:x}]=xl(),[f,b]=o(""),y=d((()=>{b(""),g()}),[]),v=wl({isOpen:h,options:l,value:n,query:f,onChange:m,onClose:y,iconVersion:c});return p("div",{className:e,children:[Sl(t),p("div",{className:N("relative",h?"z-20":"z-10"),ref:v,children:[p("div",{className:N("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",Il(i,a)),onClick:h?y:x,children:[u("p",{className:"p-m pr-8 flex items-center overflow-hidden text-ellipsis",children:fl(n)||r}),Cl(h,c)]}),s&&h?u("div",{className:N("absolute top-0 w-full z-20"),children:u($t,{type:"text",autoFocus:!0,value:f,onChange:b})}):null]})]})})),Sl=e=>e?u("div",{className:"mb-xs",children:u(je,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,Cl=(e,t)=>u(X,{className:N("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Il=(e,t)=>N(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Tl=g((({className:e="",label:t,error:l,...n})=>p("div",{className:e,children:[u(kl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),Ht(l)]}))),Bl=g((({field:e})=>{const t=gl();return u(Tl,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...Et(e("region"),tl)})})),Ml=({field:e,title:t})=>p(Lt,{title:t,children:[u("div",{className:Ot,children:u(Tl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:ol,...Et(e("acquiringType"),tl)})}),u("div",{className:Ot,children:u(Bl,{field:e})})]});function Pl({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const Vl={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"},Rl={primary:N("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:N("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")},zl=g((({children:e,...t})=>{const l=e=>({...e,onClick:he(Pl(e),e)}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:o=!0,role:c,onClick:d}=l(t);return u("button",{className:N("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":N(Vl[a],Rl[a]),o?"rounded-md":"",n),type:s,role:c,onClick:d,children:e})})),Al=(e,t)=>u(zl,{className:N("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Dl={typeForm:{key:"acqr",text:"Предупреждение о мошенничестве"},acquiringType:{key:"trade",text:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},jl=Rt({acquiringType:tl,region:tl,fullName:tl,inn:nl,name:ll,phone:al}),Fl=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=d((e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:a,...i}=e,r=El(t?.key),s={partnerComments:`Вид эквайринга=${t?.text||""}${r?`/Онлайн касса=${l}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`,...i};zt(jl(e))&&n(s,!1)}),[n]),[,{field:i,...r}]=Pt(Dl,{onSubmit:a}),s=El(i("acquiringType").value?.key);return p("form",{className:jt,onSubmit:r.onSubmit,children:[Ml({field:i,title:"Вид эквайринга и регион"}),sl(i,"Данные организации"),s?p("div",{children:[u(Vt,{text:"Хочу купить онлайн-кассу",...i("onlineCheckout")}),u(Vt,{text:"Хочу купить POS-терминал",...i("posTerminal")})]}):null,Al(t),u(Dt,{link:l})]})})),El=e=>"all"===e||"trade"===e,Ll=g((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return u("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),Ol=[{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"}],$l=g((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:i})=>{const r=d((e=>{n||(e.preventDefault(),i&&i(!t))}),[i,n,t]),s=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Ll,{paths:Ol,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:r,children:[u("div",{className:N("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":_l(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?s:null,l?u("div",{className:"ml-s",children:u(je,{size:"text-l",font:"font-light",children:l})}):null]})})})),_l=e=>N("rounded border",e?"bg-primary-main":""),Ul=g((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>p("div",{className:N("shrink-0 w-full",e),children:[u($l,{text:t,value:l,disabled:a,onChange:r},n),Ht(i)]}))),Hl=(e,t,l)=>p("div",{className:"flex gap-m flex-col lg:flex-row w-full justify-between items-baseline",children:[p("div",{children:[p("div",{className:"flex gap-3",children:[u($l,{...e}),u(Dt,{text:"Согласен с ",link:t})]}),Ht(Et(e,rl).error)]}),Al(l)]}),Wl=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Kl=()=>{},Gl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const o=[];let c=1;for(let d=0;d<6;d++){const m=[];for(let o=0;o<7;o++)if(0===d&&o<t)m.push(u("td",{},`empty-${o}`));else if(c>l)m.push(u("td",{},`empty-${o}`));else{const t=new Date(a,n,c),l=ql(t,e),o=Xl(t,i,r);m.push(u("td",{children:u("div",{className:Yl(l,o),onClick:()=>!o&&s(t),children:c})},`day-${c}`)),c++}o.push(u("tr",{children:m},`row-${d}`))}return o},ql=(e,t)=>t&&e.toDateString()===t.toDateString(),Xl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Yl=(e,t)=>N("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Ql=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Zl=g((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:i=Kl})=>{const r=d((e=>i(e)),[]),{firstDayOfWeek:s,totalDays:o}=m((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return p("table",{className:"mx-auto",children:[u("thead",{className:"text-gray font-light",children:u("tr",{children:Ql.map(((e,t)=>u("th",{className:"p-s",children:e},String(t))))})}),u("tbody",{children:Gl({firstDayOfWeek:s,today:e,totalDays:o,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:r})})]})})),Jl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],en=Jl.map((e=>({key:e}))),tn=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),ln={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},nn={className:"min-w-32",iconVersion:"black",isBorder:!1},an=g((({className:e="",label:t="",value:l,valid:n=!0,minDate:a,maxDate:i,onChange:r})=>{const[s,{setValue:c}]=xl(!1),[m,h]=o(l?.getMonth()||(new Date).getMonth()),[g,x]=o(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:f,handleNextMonth:b,handleSelectMonth:y,handleSelectYear:v,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:i})=>{const r=yl(d((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:d((()=>e(!t)),[t]),handleNextMonth:d((()=>{l+1<=11?n(l+1):(n(0),a(i+1))}),[l]),handlePrevMonth:d((()=>{l-1>=0?n(l-1):(n(11),a(i-1))}),[l]),handleSelectMonth:d((({key:e})=>n(Jl.indexOf(e))),[]),handleSelectYear:d((({key:e})=>a(Number(e))),[]),monthsOptions:en,yearsOptions:tn,ref:r}})({onYearSelect:x,onMonthSelect:h,onShowCalendar:c,selectedYear:g,selectedMonth:m,showCalendar:s});return p("div",{className:N(e,"relative"),ref:C,children:[u(je,{size:"text-m","font-weight":"font-light",children:t}),rn(S,l,n),s?p("div",{className:"absolute bg-white z-20 select-none",children:[p("div",{className:"flex gap-s",children:[u("div",{className:"my-auto",onClick:f,children:u(X,{...ln,className:"-rotate-90 cursor-pointer"})}),u(kl,{onChange:y,value:{key:Jl[m]},options:w,...nn}),u(kl,{onChange:v,value:{key:String(g)},options:k,...nn}),u("div",{className:"my-auto",onClick:b,children:u(X,{...ln,className:"rotate-90 cursor-pointer"})})]}),u(Zl,{today:l,currentMonth:m,currentYear:g,onDateSelect:r,min:a,max:i})]}):null]})})),rn=(e,t,l)=>p("div",{onClick:e,className:N("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",l?"border-gray":"border-error"),children:[u(T,{children:t&&Wl(t)}),u(X,{...ln,name:"CalendarIcon"})]}),sn=g((({className:e,label:t,value:l,error:n,onChange:a,...i})=>p("div",{className:N("shrink-0 w-full",e),children:[t?u("div",{className:"mb-xs",children:u(je,{size:"text-m",font:"font-light",children:i?.errors?`${t}*`:t})}):null,u(an,{value:l,onChange:a,valid:Boolean(!n)}),Ht(n)]}))),on={surname:"",name:"",middleName:""},cn=(e,t=!0)=>p("div",{className:"space-y-s",children:[u(Wt,{label:"Фамилия",...Et(e("surname"),ll)}),u(Wt,{label:"Имя",...Et(e("name"),ll)}),u(Wt,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),t?u(sn,{label:"Дата рождения",...Et(e("birthday"),tl)}):null]}),dn={...on,typeForm:{key:"ANTIFRAUD",text:"Предупреждение о мошенничестве"},phone:"",birthday:void 0,isClient:!1,comment:"",consentDataProcessing:!1},mn=Rt({typeForm:tl,surname:tl,name:ll,birthday:tl,phone:al,comment:tl,consentDataProcessing:rl}),hn=g((({button:e,link:t,onSubmit:l})=>{const n=d((e=>{zt(mn(e))&&l(e,!0)}),[l]),[,{field:a,...i}]=Pt(dn,{onSubmit:n});return u("form",{className:jt,onSubmit:i.onSubmit,children:u(Lt,{children:p("div",{className:Ft,children:[cn(a,!0),u(Jt,{label:"Телефон",...Et(a("phone"),al)}),u(Ul,{...a("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}),u(Wt,{...Et(a("comment"),tl),placeholder:"Комментарий",isTextarea:!0}),Hl(a("consentDataProcessing"),t,e)]})})})})),un={typeForm:{key:"bcrd",text:"Заявка на бизнес-карту"},name:"",phone:"",inn:"",email:""},pn=Rt({region:tl,name:ll,phone:al,inn:nl,email:tl}),gn=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=d((e=>{zt(pn(e))&&n(e)}),[n]),[,{field:i,...r}]=Pt(un,{onSubmit:a});return p("form",{className:jt,onSubmit:r.onSubmit,children:[u(Bl,{field:i}),p(Lt,{children:[p("div",{className:Ot,children:[u(Wt,{label:"Контактное лицо",...Et(i("name"),ll)}),u(Wt,{label:"ИНН",...Et(i("inn"),nl)})]}),p("div",{className:Ot,children:[u(Jt,{label:"Телефон",...Et(i("phone"),al)}),u(Wt,{label:"Электронная почта",...Et(i("email"),tl)})]})]}),Al(t),u(Dt,{link:l})]})})),xn={typeForm:{key:"CORRUPTION",text:"Факты коррупции"},...on,phone:"",email:"",comment:"",consentDataProcessing:!1},fn=Rt({typeForm:tl,surname:tl,name:ll,region:tl,phone:al,email:tl,comment:tl,consentDataProcessing:rl}),bn=g((({button:e,link:t,onSubmit:l})=>{const n=d((e=>{zt(fn(e))&&l(e,!0)}),[l]),[,{field:a,...i}]=Pt(xn,{onSubmit:n});return u("form",{className:jt,onSubmit:i.onSubmit,children:u(Lt,{children:p("div",{className:Ft,children:[cn(a,!1),u(Bl,{field:a}),u(Jt,{label:"Телефон",...Et(a("phone"),al)}),u(Wt,{label:"Электронная почта",...Et(a("email"),tl)}),u(Wt,{...Et(a("comment"),tl),placeholder:"Ваше сообщение",isTextarea:!0}),Hl(a("consentDataProcessing"),t,e)]})})})})),yn=[];const vn=async e=>await ft(e,{method:"GET"})||yn;function Nn(){const{data:e}=ul("/api/v1/premiumBranchesByRegions",bt);return e||[]}const wn=g((({field:e,regionKey:t,isPremium:l=!1})=>{const n=l?Nn().find((e=>e?.region===t))?.branches:function(e){const{data:t}=ul(e?`/api/v1/branches?regionCode=${e}`:null,vn);return t||yn}(t).filter((e=>e?.address));return u(Tl,{label:"Адрес",placeholder:"Выберите адрес",options:(n||[]).map((({address:e=""})=>({key:e,text:e}))),...Et(e("addressBranch"),tl)})})),kn=["От 1 000 ₽","До 1 000 000 000 ₽"],Sn=["От 1 мес","До 15 лет"],Cn=(e,t)=>p(Lt,{title:t,children:[p("div",{className:Ot,children:[u(Wt,{label:"Наименование организации",...Et(e("fullName"),tl)}),u(Wt,{label:"ИНН",...Et(e("inn"),nl)}),u(Jt,{label:"Телефон",...Et(e("phone"),al)})]}),p("div",{className:Ot,children:[u(Wt,{label:"Годовая выручка, ₽",...Et(e("annualRevenue"),tl)}),u(Wt,{label:"Контактное лицо",...Et(e("name"),ll)}),u(Wt,{label:"Электронная почта",...Et(e("email"),tl)})]})]}),In=(e,{normalize:t,format:l})=>{const{value:n,onFocus:a,onBlur:i,onChange:r}=e,[s,c]=o(!1),m=d((e=>{c(!0),a&&a(e)}),[]),h=d((()=>{c(!1),r&&r(t(n)),i&&i()}),[r,n]);return{value:s||!l?n:l(n),onFocus:m,onBlur:h}},Tn=(e,t,l)=>Math.max(t,Math.min(e,l));function Bn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function Mn({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:N("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=Bn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const Pn=1,Vn=100,Rn=g((e=>{const{className:t,title:l,items:n=[],list:a=[],min:i=(a.length?0:Pn),max:r=(a.length?a.length-1:Vn),step:s=1,value:o=a[0]||i,disabled:c=!1,onChange:m}=e,h=In(e,{normalize:(e=0)=>a.length?zn(a)(e):Tn(e,i,r),format:tt()}),g=d((e=>{m&&m(Bn(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(je,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:N("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:c,onInput:g,...h}),Mn({list:a,min:i,max:r,step:s,disabled:c,value:o,onChange:m})]}),An(n)]})})),zn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),An=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(je,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Dn=(e,t)=>p(Lt,{title:t,children:[u("div",{className:Ot,children:u(Rn,{title:"Сумма, ₽",items:kn,min:1e3,max:1e9,...e("amount")})}),u("div",{className:Ot,children:u(Rn,{title:"Срок, месяцев",items:Sn,min:1,max:180,...e("term")})})]}),jn={typeForm:{key:"cred",text:"Кредит"},amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",email:"",annualRevenue:""},Fn=Rt({fullName:tl,annualRevenue:tl,inn:nl,name:ll,phone:al,region:tl}),En=g((({button:e,link:t,onSubmit:l})=>{const n=d((e=>{const{amount:t,term:n,addressBranch:a,annualRevenue:i,...r}=e;zt(Fn(e))&&l({...r,addressBranch:a?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${i}`})}),[l]),[a,{field:i,...r}]=Pt(jn,{onSubmit:n});return p("form",{className:jt,onSubmit:r.onSubmit,children:[Dn(i,"Параметры"),Cn(i,"Данные организации"),p(Lt,{title:"Офис банка",children:[u("div",{className:Ot,children:u(Bl,{field:i})}),u("div",{className:Ot,children:u(wn,{field:i,regionKey:a.region?.key})})]}),Al(e),u(Dt,{link:t})]})})),Ln={typeForm:{key:"dpst",text:"Заявка на депозит"},name:"",phone:""},On=Rt({name:ll,phone:al}),$n=g((({button:e,link:t,onSubmit:l})=>{const n=d((e=>{zt(On(e))&&l(e)}),[l]),[,{field:a,...i}]=Pt(Ln,{onSubmit:n,resetOnSubmit:!1});return u("form",{className:jt,onSubmit:i.onSubmit,children:u(Lt,{title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",children:p("div",{className:Ft,children:[u(Wt,{label:"Имя",...Et(a("name"),ll)}),u(Jt,{label:"Телефон",...Et(a("phone"),al)}),Al(e),u(Dt,{link:t})]})})})})),_n=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],Un=[{key:"phone",text:"Телефонный звонок"},{key:"mail",text:"Электронное сообщение"}],Hn=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Wn={typeForm:tl,region:tl,surname:tl,name:ll,feedbackMethod:tl,phone:al,email:tl,comment:tl,consentDataProcessing:rl},Kn={...on,typeForm:{key:"FEEDBACK",text:"Задать вопрос по продуктам и услугам"},serviceDirection:{key:"Физическое лицо"},birthday:void 0,feedbackMethod:{key:"Телефонный звонок"},phone:"",email:"",comment:"",consentDataProcessing:!1},Gn=g((({button:e,link:t,onSubmit:l})=>{const n=d((e=>{qn(e.typeForm.key,e.serviceDirection?.key)?((e,t)=>{const l=Rt({...Wn,addressBranch:tl,inn:nl});zt(l(e))&&t(e,!1)})(e,l):"FEEDBACK"===e.typeForm.key?((e,t)=>{const l=Rt({...Wn,birthday:tl});zt(l(e))&&t(e,!0)})(e,l):((e,t)=>{const l=Rt({...Wn,addressBranch:tl});zt(l(e))&&t(e,!0)})(e,l)}),[l]),[a,{field:i,...r}]=Pt(Kn,{onSubmit:n}),s="FEEDBACK_QS"===i("typeForm").value?.key,o=qn(i("typeForm").value?.key,i("serviceDirection").value?.key);return u("form",{className:jt,onSubmit:r.onSubmit,children:u(Lt,{children:p("div",{className:Ft,children:[u(Tl,{label:"Тема",placeholder:"Выберите тему",options:_n,...Et(i("typeForm"),tl)}),s?u(Tl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Hn,...Et(i("serviceDirection"),tl)}):null,u(Bl,{field:i}),s?u(wn,{field:i,regionKey:a?.region?.key}):null,cn(i,!0),o?p("div",{children:[u(Wt,{label:"ИНН",...Et(i("inn"),nl)}),u(Wt,{label:"Наименование организации",...i("fullName")})]}):null,u(Tl,{label:"Способ получения ответа",options:Un,...Et(i("feedbackMethod"),tl)}),u(Jt,{label:"Телефон",...Et(i("phone"),al)}),s?p("div",{children:[u(Jt,{label:"Дополнительный телефон",...i("secondaryPhone").value&&"+7 ("!==i("secondaryPhone").value?Et(i("secondaryPhone"),al):i("secondaryPhone")}),u(Wt,{label:"Электронная почта",...Et(i("email"),tl)}),u(Wt,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...i("bankEmpolee")}),u(Wt,{label:"Дата и время обращения в Банк",...i("applicationDate")})]}):u(Wt,{label:"Электронная почта",...Et(i("email"),tl)}),u(Wt,{...Et(i("comment"),tl),placeholder:"Ваше сообщение",isTextarea:!0}),Hl(i("consentDataProcessing"),t,e)]})})})})),qn=(e="",t="")=>"FEEDBACK_QS"===e&&"Юридическое лицо / ИП"===t,Xn={},Yn="/wcms-resources";const Qn=g((e=>{const{button:t,sourceBookDir:l}=e,{regions:n}=function(e,t={}){const{fallback:l=Xn,pathDir:n=Yn}=t,{data:a}=ul(e?`${n}/${e}.json`:null,bt,{fallback:l});return a||Xn}(l||"regions-grant-support"),[a,i]=o({key:""}),r=de({className:"text-white",version:t?.version}),s=n?.find((e=>e.name===a.key))?.href;return p("div",{className:"container space-y-s",children:[n?u(Tl,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:n.map((({name:e=""})=>({key:e,text:e}))),value:a,onChange:i}):null,s?u("div",{className:"text-center",children:u(be,{href:s,target:"_blank",className:N("p-m w-full @xl:w-auto",r),children:t?.text?t.text:"Перейти"})}):null]})})),Zn={...on,phone:"",email:"",birthday:void 0,consentDataProcessing:!1},Jn=Rt({surname:ll,name:ll,phone:al,email:tl,birthday:tl,consentDataProcessing:rl}),ea=g((e=>{const{button:t,link:l,product:n="",onSubmit:a}=e,i=d((e=>{zt(Jn(e))&&a({...e,product:n},!0)}),[a]),[,{field:r,...s}]=Pt(Zn,{onSubmit:i});return p("form",{className:jt,onSubmit:s.onSubmit,children:[p(Lt,{children:[p("div",{className:Ot,children:[u(Wt,{label:"Фамилия",...Et(r("surname"),ll)}),u(Wt,{label:"Отчество (Обязательно, при наличии)",...r("middleName")}),u(Jt,{label:"Телефон",...Et(r("phone"),al)})]}),p("div",{className:Ot,children:[u(Wt,{label:"Имя",...Et(r("name"),ll)}),u(sn,{label:"Дата рождения",...Et(r("birthday"),tl)}),u(Wt,{label:"Электронная почта",...Et(r("email"),tl)})]})]}),Hl(r("consentDataProcessing"),l,t)]})})),ta={typeForm:{key:"SELFCOLLECTION",text:"Самоинкассация"},fullName:"",phone:"",consentDataProcessing:!1},la=Rt({typeForm:tl,region:tl,fullName:tl,phone:al}),na=g((({button:e,link:t,onSubmit:l})=>{const n=d((e=>{zt(la(e))&&l(e,!1)}),[l]),[,{field:a,...i}]=Pt(ta,{onSubmit:n});return u("form",{className:jt,onSubmit:i.onSubmit,children:u(Lt,{children:p("div",{className:Ft,children:[u(Wt,{label:"ФИО",...Et(a("fullName"),tl)}),u(Bl,{field:a}),u(Jt,{label:"Телефон",...Et(a("phone"),al)}),Hl(a("consentDataProcessing"),t,e)]})})})})),aa=g((({field:e})=>{const t=Nn().map((({region:e})=>({key:e,text:e})));return u(Tl,{label:"Регион",placeholder:"Выберите регион",options:t,...Et(e("region"),tl)})})),ia=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],ra={typeForm:ia[0],...on,email:"",phone:"",comment:"",consentDataProcessing:!1},sa=Rt({typeForm:tl,surname:tl,name:ll,phone:al,email:tl,addressBranch:tl,consentDataProcessing:rl}),oa=g((({button:e,link:t,onSubmit:l,defaultType:n="PREMIUMSERVICE"})=>{const a=d((e=>{zt(sa(e))&&l(e,!0)}),[l]),[i,{field:r,...s}]=Pt({...ra,typeForm:ca(n)},{onSubmit:a}),o=i?.region?.key;return p("form",{className:jt,onSubmit:s.onSubmit,children:[p(Lt,{title:"Ваши данные",children:[p("div",{className:Ot,children:[u(Wt,{label:"Фамилия",...Et(r("surname"),ll)}),u(Wt,{label:"Отчество (Обязательно, при наличии)",...r("middleName")}),u(Wt,{label:"Электронная почта",...Et(r("email"),tl)})]}),p("div",{className:Ot,children:[u(Wt,{label:"Имя",...Et(r("name"),ll)}),u(Jt,{label:"Телефон",...Et(r("phone"),al)}),u(Tl,{label:"Тип обслуживания",options:ia,...Et(r("typeForm"),tl)})]})]}),p(Lt,{title:"Офис банка",children:[u("div",{className:Ot,children:u(aa,{field:r})}),u("div",{className:Ot,children:u(wn,{field:r,regionKey:o,isPremium:!0})})]}),u(Wt,{...r("comment"),placeholder:"Комментарий, удобное время и прочее",isTextarea:!0}),Hl(r("consentDataProcessing"),t,e)]})})),ca=e=>ia.find((t=>t.key===e)),da=g((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u(je,{color:"text-primary-text",children:t}):null]})}))),ma=e=>{const{value:t,onChange:l}=e("vedTypes");return u(Lt,{children:p("div",{className:"gap-xl grid @xl:flex @xl:items-center",children:[u(da,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),u(da,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),u(da,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),u(da,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},ha=({field:e})=>{const t="currencyControl"===e("vedTypes").value;return p("div",{className:"space-y-s",children:[t?u(Bl,{field:e}):null,p("div",{className:"grid @xl:grid-cols-2 @xl:gap-x-lg gap-s",children:[t?u(Wt,{label:"ИНН",...Et(e("inn"),nl)}):null,u(Wt,{label:"Наименование организации",...Et(e("fullName"),tl)}),u(Wt,{label:"ФИО",...Et(e("name"),ll)}),u(Jt,{label:"Телефон",...Et(e("phone"),al)}),t?null:u(Wt,{label:"Электронная почта",...e("email")})]})]})},ua={typeForm:{key:"KVED",text:"Заявка на консультацию ВЭД"},vedTypes:"currencyControl",fullName:"",name:"",phone:"",inn:"",email:"",partnerComments:""},pa={fullName:tl,name:ll,phone:al},ga=Rt({...pa}),xa=Rt({...pa,inn:nl,region:tl}),fa=e=>"currencyControl"===e,ba=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),ya={ApplicationFormBusinessCard:gn,ApplicationFormWed:g((e=>{const{button:t,link:l,onSubmit:n}=e,a=d((e=>{const{typeForm:t,fullName:l,name:a,phone:i,email:r,inn:s,region:o,vedTypes:c,partnerComments:d}=e,m={typeForm:t,fullName:l,name:a,phone:i,vedTypes:ba(c),partnerComments:d,...fa(c)?{inn:s,region:o}:{email:r}};zt((e=>fa(e)?xa:ga)(c)(e))&&n(m)}),[n]),[,{field:i,...r}]=Pt(ua,{onSubmit:a});return p("form",{className:"container space-y-lg",onSubmit:r.onSubmit,children:[ma(i),u(I,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),ha({field:i}),u(Wt,{label:"Обращение",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",...i("partnerComments"),isTextarea:!0}),Al(t),u(Dt,{link:l}),u(I,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),p("div",{className:"flex gap-xl",children:[p("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:[u(ae,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(ae,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:$n,ApplicationFormCredit:En,ApplicationFormAcquiring:Fl,ApplicationFormGrantSupport:Qn,ApplicationFormIndividuals:ea,ApplicationFormFeedback:Gn,ApplicationFormAntiFraud:hn,ApplicationFormCorruption:bn,ApplicationFormSelfCollection:na,ApplicationFormUltraPremium:oa},va=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(ae,{image:{icon:(t?"ResponseOKIcon":"ResponseFailIcon")?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"42",height:"42"}),p("div",{children:[u(I,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Na={send:async function(e,t=!1){const l=t?"/api/v1/lead":"/api/v1/sendcorporatelead",{typeForm:n,region:a,phone:i="",email:r,birthday:s,inn:o,fullName:c,addressBranch:d,secondaryPhone:m="",bankEmpolee:h,applicationDate:u,...p}=e,g={typeForm:n,[t?"regionBranch":"region"]:a,[t?"phoneNumber":"phone"]:Tt(i),[t?"email":"mail"]:r,...t?{birthday:s}:{inn:o,fullName:c},..."FEEDBACK"===n?{}:{addressBranch:d,bankEmpolee:h,applicationDate:u,...Bt(m)},...p};try{const e=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(g)});return e?.ok?await e.json():null}catch(e){return null}}},wa=g((e=>{const{className:t,formBlock:l,...n}=e,[a,i]=o(""),r=d((async(e,t=!1)=>{const l=Sa(e),n=await Na.send(l,t)?"OK":"Fail";return i(n),n}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...n,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(I,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?ka(l,r):null,a?u(va,{responseType:a}):null]})})})),ka=(e,t)=>{const l=e?.formType;if(!l||!(l in ya))return null;return u(ya[l],{...e,onSubmit:t})},Sa=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(t?.region?t?.text:t?.key)||t]))),Ca="text-left",Ia={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Ta=g((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:N("rounded-icon object-fit flex justify-center items-center",Ia[l],e),children:u(X,{...i,width:"54%",height:"54%",name:a})}):null})),Ba=g((({className:e="",title:t,benefitList:l,...n})=>p(k,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(I,{headingType:"h3",as:"h2",className:Ca,title:t}):null,l?.length?u("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(Ma)}):null]}))),Ma=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>p("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?u(Ta,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?u(ae,{className:"shrink-0",image:n}):null,e?p("div",{className:"@sm:h-full space-y-xs",children:[u(I,{headingType:"h6",children:e}),u(je,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),u(et,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Pa=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Va(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const Ra=g((({className:e,style:t,idx:l,activeIndex:n,observerOptions:a,children:i,onIntersection:r})=>{const s=function(e,{sensitivity:t,rootRef:l}={}){const n=h(null),a=m((()=>({threshold:Va(t),root:l?.current})),[t,l?.current]);return c((()=>{if(!n.current)return;const t=new IntersectionObserver(e,a);return t.observe(n.current),()=>{t.disconnect()}}),[e,a]),n}(d((e=>{e.length&&r&&r(l||0,e[e.length-1])}),[r,l]),a);return u("div",{className:N("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:s,children:i})})),za=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],Aa=g((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:i=0,padding:r=0,listType:s="horizontal-list",snapAlign:o="snap-center",minHeight:c,children:m,onVisibleItemsChange:p,onVisibleIndicesChange:g})=>{const x={sensitivity:1,rootRef:l},f=h([]),b=d(((e,t)=>{const l=[...f.current||[]];l[e]=t,f.current=l,p&&p(l),g&&g(ja(l))}),[p,g]),y=a>0?i*Number(a)-1:0,v="vertical-list"===s,w="horizontal-list"===s,k={...w?Da(r,y):{},...v?Pa(c):{},gap:`${i}px`};return u("div",{className:N("box-border overflow-auto no-scrollbar",s,e),style:k,ref:l,children:(S=(e,l)=>u(Ra,{className:N(o,a?za[a-1]:"",v?"h-full":"",t),style:w?Da(r/4):{},activeIndex:n,idx:l,observerOptions:x,onIntersection:b,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(m)});var S})),Da=(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)),Fa={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Ea={"horizontal-list":"w-6","vertical-list":"h-6"},La=g((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?u("div",{className:N("flex gap-xs",Fa[a],i?"group":"",e),"data-ver":i,children:Array.from({length:n}).fill(null).map(((e,n)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?Ea[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Oa=e=>e,$a=(e=Oa)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),_a=$a(),Ua=(e=Oa)=>$a((t=>-e(t))),Ha=Ua(),Wa=e=>t=>e.scrollWidth/t,Ka=e=>(t,l)=>{e.scrollBy({left:l*Wa(e)(t),behavior:"smooth"})},Ga=({itemCount:e,onVisibleIndicesChange:t})=>{const l=h(null),[n,a]=o([]),i=d((e=>{a((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[r,s]=n.length?[Ua()(n),$a()(n)]:[-1,-1],c=r>0,m=s<e-1,u=d((()=>{var t;l.current&&(c?Ka(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,c]),p=d((()=>{l.current&&(m?Ka(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,m]),g=d(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:c,canScrollRight:m,visibleIndicesRange:[r,s],handleVisibleIndicesChange:i}]},qa=g((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=true,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=Ga({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:N(e,"vertical-list"===o?"relative h-full":""),children:[u(Aa,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(La,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Xa=(e,t,l)=>{return u(qa,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>p("div",{className:N("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(je,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?u(ae,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?u(je,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},Ya=g((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(k,{className:N("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[u(M,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Xa(e,0,t):null]}))),Qa={start:"justify-start",center:"justify-center",end:"justify-end"},Za=g((({buttons:e,className:t="",align:l,...n})=>{const a=l?N("flex",Qa[l]):"";return u(k,{className:N("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:qe(e)})})),Ja=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:n,renderFoldButton:a})=>{const[i,r]=o(l),s=d((()=>{r((e=>!e))}),[]),c=n({isUnfolded:i,onToggle:s}),m=a?a({isUnfolded:i,onToggle:s}):null;return p("div",t?{className:e,children:[m,c]}:{className:e,children:[c,m]})}));const ei=g((({className:e="",isUnfolded:t,children:l})=>{const n=h(null),a=function(e,t){const l=h(null);return c((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:u("div",{className:e,ref:a,children:l})})})),ti=g((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r})=>p("div",{className:N("flex justify-between @xl:flex-col",e),children:[t?u(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,u("div",l?{children:u(je,{size:"text-h3",children:[i,tt(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:u(je,{size:"text-h3",children:"-"})})]}))),li=1e4,ni=5e6,ai=Math.round(29.5),ii={minSum:li,maxSum:ni,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},ri={minSum:li,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},si={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},oi={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},ci={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},di=e=>e?u(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,mi=g((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>p("div",{children:[u(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:tt(n,{fixed:!0})(e)}),l?u("span",{className:"text-7xl",children:l}):null]}),a&&i?u("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),hi=g((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{className:"space-y-s",children:[u(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u(X,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),u("div",{className:"w-64",children:t?p(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),ui=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?u(hi,{title:e,...i}):p("div",{children:[u("div",{className:"hidden @xl:block",children:u(mi,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),u("div",{className:"@xl:hidden",children:u(ti,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function pi({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${tt(2)(l.min||0)} ₽`,`До ${tt(2)(l.max||0)} ₽`];return u(Rn,{items:e?n:[],step:t,...l})}function gi(e){const{data:t}=ul(`/wcms-resources/${e}.json`,bt);return t}const xi=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=gi(t||"bonus-calculator-data")||si,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},fi=g((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=Pt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=xi(a,t);return p("section",{className:N("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[p("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[pi({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),pi({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?ui({title:"Баллов за месяц",rate:d,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,p("div",{className:"flex flex-col gap-y-xl @xl:w-96",children:[m>=0?u(ti,{title:"Баллов за год",value:m}):null,qe(l,{isVertical:!0}),di(n)]})]})})),bi=g((({className:e,inputChildren:t,rateChildren:l,resultChildren:n})=>p("section",{className:N("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[u("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:t}),u("div",{className:"border-b border-main-divider md:hidden"}),l,u("div",{className:"flex flex-col gap-2xl sm:w-96 max-w-full",children:n})]}))),yi=(e,t=0)=>e?.sum&&e.sum>=li&&e.sum<=ni?e.sum:t,vi=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Ni=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,wi={horizontal:"gap-5xl",vertical:"flex-col gap-s"},ki=g((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:N(`flex ${wi[a]}`,l),children:e?.map((({id:e,text:l})=>u($l,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Si=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>p("div",{className:"space-y-s",children:[t?u("div",{className:"hidden @5xl:block",children:u(je,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?u("div",{className:"@5xl:hidden",children:u(je,{color:"text-secondary-text",font:"font-light",children:l})}):null,u(ki,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:N("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),Ci=e=>Si({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Ii=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Ti([e,t],n),Ti=([e,t],l=[])=>({[e]:l.length?Ha(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?_a(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Bi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Mi=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Pi=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},Vi=g((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r})=>{const[s,{field:o}]=Pt({moneyValue:yi(r,1e5),daysValue:vi(r,90),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),c=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=gi(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...ci,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&Mi(o,e)&&Bi(n,["minSum","maxSum"],e)&&Bi(l,["minDays","maxDays"],e)))||ci,{rate:m}=d,h=Pi(m,e),u=n+h,p=s?.rateRows||[ci];return{...d,...Ti(["minSum","maxSum"],p),...Ti(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(s,t?.rateType&&t.sourceBookDir),{income:d,finalSum:m,rate:h,isUnavailableByTerm:g,depositeName:x}=c;return u(bi,{className:e,inputChildren:p("div",{children:[pi({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),(f={title:"Срок, дней",min:c.minDays,max:c.maxDays,...o("daysValue"),value:c.daysValue},u(Rn,{items:[`От ${Ni(f.min||0)}`,`До ${Ni(f.max||0)}`],step:1,...f})),p("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[Ri(c,o),Ci({title:"Выплата процентов",orientation:"vertical",...o("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),rateChildren:ui({rate:h,depositeName:x,isShowDepositeName:i,isUnavailableByTerm:g}),resultChildren:p("div",{children:[zi(m,d),qe(l,{isVertical:!0}),di(n),di(a)]})});var f})),Ri=(e,t)=>p("div",{className:"space-y-s",children:[u(je,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u($l,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u($l,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),zi=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0 mb-lg",children:[u(ti,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(ti,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),Ai=({min:e=0,max:t=0,availableMonths:l,...n})=>u(Rn,{items:[`От ${Di(e)}`,`До ${Di(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Di=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,ji=e=>Si({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Fi=e=>Ei({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Ei({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Ei({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Ei({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Ei=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Li=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},Oi=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=gi(t||"credit-calculator-data"),r=i?.rateRows||[ii],s=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Fi({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:o,maxSum:c}=Ii(["minSum","maxSum"],s,r),{minMonths:d,maxMonths:h}=Ii(["minMonths","maxMonths"],s,r),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>Fi({row:e,userInputParams:t,paramsViewSettings:l})&&Bi(n,["minSum","maxSum"],e)&&Bi(a,["minMonths","maxMonths"],e)))||ii)({rateRows:r,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=Li(p,e);return m((()=>({...u,...e,minSum:o,maxSum:c,minMonths:d,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},$i=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=Pt({moneyValue:yi(i,2e5),monthsValue:vi(i,ai),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),o=Oi(r,t,a),c=ji({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return u(bi,{className:e,inputChildren:p("div",{children:[pi({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Ai({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),_i({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),rateChildren:ui({rate:o.rate}),resultChildren:p("div",{children:[u(ti,{title:"Ежемесячный платёж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block mb-lg",children:c}),qe(l,{isVertical:!0}),di(n)]})})})),_i=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u($l,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u($l,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u($l,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u($l,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Ui=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},Hi=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=gi(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?Gi(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):0,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>Ki({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&Ki({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Bi(n,["minSum","maxSum"],t)&&Bi(a||r,["minMonths","maxMonths"],t)))||oi,{rate:d}=c,m=Wi(d,e),h=n+m,u=i?.rateRows||[oi];return{...c,...Ti(["minSum","maxSum"],u),...Ti(["minMonths","maxMonths"],u),availableMonths:Ui(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},Wi=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},Ki=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Gi=(e,t)=>e+Math.round((t-e)/2),qi=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=Pt({moneyValue:yi(i,2e4),monthsValue:vi(i),isMonthlyInterestPayment:Boolean(i?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(i?.isRemoteRegistration)}),o=Hi(r,t,a),{defaultMonth:d,rate:m,income:h,finalSum:g}=o,{onChange:x}=s("monthsValue");return c((()=>{!r.monthsValue&&x&&x(d)}),[d]),u(bi,{className:e,inputChildren:p("div",{children:[pi({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Ai({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),Xi({...o,...a},s)]}),rateChildren:ui({rate:m}),resultChildren:p("div",{children:[u(ti,{title:"Доход в конце срока",value:h,postfix:"₽",prefix:"+"}),u(ti,{title:"Сумма в конце срока",value:g,postfix:"₽"}),qe(l,{isVertical:!0}),di(n)]})})})),Xi=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?Ci({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Si({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Yi=e=>Qi({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Qi({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Qi=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Zi=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=gi(t||"refinancing-calculator-data"),o=s?.rateRows||[ri],c=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Yi({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:s?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:d,maxSum:h}=Ii(["minSum","maxSum"],c,o),{minMonths:u,maxMonths:p}=Ii(["minMonths","maxMonths"],c,o),g=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Yi({row:e,userInputParams:t,paramsViewSettings:l})&&Bi(n+r,["minSum","maxSum"],e)&&Bi(i,["minSumOld","maxSumOld"],e)&&Bi(r,["minSumExtra","maxSumExtra"],e)&&Bi(a,["minMonths","maxMonths"],e)))||ri)({rateRows:o,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:x}=g,f=Li(x,e),b=e.oldMonthlyPayment-f;return m((()=>({...g,...e,minSum:d,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:f,benefit:b})),[e,s])},Ji=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=Pt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Zi(i,t,a),o=ji({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return u(bi,{className:e,inputChildren:p("div",{children:[pi({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),pi({title:"Ежемесячный платёж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),Ai({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),er({...s,...a},r),s.isExtraMoney?pi({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,u("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:o})]}),rateChildren:ui({rate:s.rate,fractionDigits:1}),resultChildren:p("div",{children:[u(ti,{title:"Ежемесячный платёж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(ti,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,u("div",{className:"hidden sm:block mb-lg",children:o}),qe(l,{isVertical:!0}),di(n)]})})})),er=(e,t)=>p("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?u($l,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u($l,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u($l,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),tr={CreditCalculatorForm:$i,DepositCalculatorForm:qi,BusinessDepositCalculatorForm:Vi,BonusCalculatorForm:fi,RefinancingCalculatorForm:Ji},lr=g((({className:e,calculatorTabs:t=[],...l})=>u(k,{className:e,defaultPadding:"p-0",...l,children:ar(t)}))),nr=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in tr))return null;const l=tr[t];return p("div",{className:"p-xl",children:[e?.calculatorBlock?.title?u(I,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,u(l,{...e.calculatorBlock,isMobile:!0})]})},ar=e=>{if(!e||!e.length)return null;return 1===e.length?nr(e[0]):e.map(((e,t)=>u(Ja,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(ei,{isUnfolded:t,children:nr(e)}),renderFoldButton:ir(e)},t.toString())))},ir=e=>({isUnfolded:t,onToggle:l})=>{const n=e.nav?.align||"text-left";return p("button",{onClick:l,className:"w-full p-xl bg-primary-main flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(X,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(je,{align:n,color:"text-white",children:e.nav?.title}),u(je,{align:n,size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(X,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]})},rr=g((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:i=0,...r}=e,s=In(e,{normalize:(e=a)=>l&&n?String(Tn(Number(sr(e)),l,n)):sr(e),format:tt(i)}),o=d((e=>t&&t(sr(e))),[t]);return u($t,{onChange:o,...r,...s})})),sr=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),or=g((e=>u(rr,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(je,{size:"text-xl",font:"font-light",children:"₽"})})}))),cr={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},dr={amount:1500},mr=g((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,formType:i="private",...r})=>{const[{amount:s},{field:d}]=Pt(dr),[m,h]=o(!1);return c((()=>{h(s<=0)}),[s]),p(k,{className:N("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?u(I,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:cr[i],children:[u(or,{valid:!m,placeholder:n,label:l,...d("amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:s}),a?.text?u(zl,{className:"w-full mt-lg",type:"submit",disabled:m,children:a.text}):null]})]})})),hr=(e,t=0)=>{const{itemCount:l,visibleItemCount:n}=e,[a,i]=o(t),r=d((()=>i((e=>Math.min(e+1,l-1)))),[l]),s=d((()=>i((e=>Math.max(e-1,0)))),[l]),c=n?l>n&&a<l-n:a<l-1,m=a>0;return[a,{inc:r,dec:s,canInc:c,canDec:m,isScrollAvailable:m||c}]},ur=g((({className:e,disabled:t,...l})=>u(be,{rounded:!0,className:N("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,...l,children:u(ae,{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"})}))),pr=g((e=>u(ur,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),gr=g((e=>u(ur,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),xr="absolute top-[calc(50%-24px)] z-40",fr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",br=g((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:i,onScrollRight:r})=>{const{canScrollLeft:s,canScrollRight:o,scrollLeft:c,scrollRight:m}=e,h=a?t>0:s,g=a?t<l-1:o,x=d((()=>{a?(s&&t!==l-1&&c(),i()):c()}),[c,i,a,s,t,l]),f=d((()=>{a?(o&&0!==t&&m(),r()):m()}),[m,r,a,s,t,l]);return p("div",{className:"hidden @lg:block",children:[yr(e),h?u(pr,{className:N(xr,n?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(gr,{className:N(xr,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),yr=e=>p("div",{children:[e.canScrollLeft?u("div",{className:N(fr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:N(fr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),vr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Nr=({className:e,text:t="ХИТ"}={})=>p("div",{className:N("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[u(X,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(T,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),wr="relative h-full",kr={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},Sr=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(Tr);return D({...n,renderProps:(n,a,r)=>p("div",{className:Cr(n,{someCardsHighlighted:i}),children:[R(n,a,{className:Ir(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Tr(n)?Nr({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},Cr=(e,{someCardsHighlighted:t})=>N(wr,t&&(Tr(e)?"pt-3xl":"pt-3xl sm:pt-16")),Ir=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>N(wr,"min-w-80",kr[n],t&&(Tr(e)?"pt-3xl sm:pt-16":"pt-3xl"),vr(l),l&&"h-full"),Tr=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Br=kt((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...o})=>{const{blocks:c=[]}=o.block||{},d=t||c?.length,[m,{inc:h,dec:g}]=hr({itemCount:d,visibleItemCount:l},Math.floor(l/2)),[x,f]=Ga({itemCount:d}),[b]=f.visibleIndicesRange,y=c&&"CarouselBankHistoryCard"===c[0]?.type;return p(k,{className:e,defaultPadding:"p-6xl",...o,children:[p("div",{className:N(a?"flex justify-center":"","relative max-w-full"),children:[u(Aa,{containerRef:x,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:Sr({noCardBorder:n,activeIndex:m,cardSize:s,...o})}),u(br,{scroll:f,arrowsPadded:i,onScrollLeft:g,onScrollRight:h,hasEdgeBlocks:y,activeIndex:m,itemCount:d})]}),u(La,{className:"@5xl:hidden",containerRef:x,activeIndex:b,dotCount:d,listType:"horizontal-list"})]})}),{childrenTypes:["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Mr=g((({title:e,description:t,className:l})=>u(k,{className:l,defaultPadding:"p-6xl",children:u(M,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),Pr="z-10 border border-solid w-full h-full",Vr=N(Pr,"absolute hidden @xl:block border-transparent"),Rr=g((({className:e,title:t,description:l,button:n,...a})=>u(k,{className:N("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative h-full",children:[u("div",{className:N(Vr,"top-9 right-12 bg-green-dark")}),u("div",{className:N(Vr,"top-6 right-8 bg-green")}),u("div",{className:N(Vr,"top-3 right-4 bg-green-light")}),p("div",{className:N(Pr,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[u(M,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),qe([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),zr={black:"bg-black",white:"bg-white"},Ar=g((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:o,...c})=>u(k,{className:N("flex flex-col justify-left",e),defaultPadding:"p-2xl",...c,children:p(ke,{className:"h-full",padding:o,title:u(M,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?u(ae,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:qe([i],{buttonClassName:"w-full self-end"}),children:[r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(je,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Dr)]}):null,a?p(je,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Dr=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${zr[e]}`},String(t)),jr=g((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>p(l,{tag:l,className:N("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?u("div",{children:e}):null,t?u("div",{children:t}):null]}))),Fr=g((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>u(jr,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:N("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:u(je,{size:"text-h4",children:t}),iconNode:l?u(ae,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Er=({isUnfolded:e,onToggle:t})=>u(Fr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Lr=g((({className:e="",icon:t,...l})=>{const n=ue(),{text:a,href:i,target:r,onClick:s}=n(l);return a?u("div",{className:N("w-full pb-lg",e),children:p("a",{className:"bg-white flex justify-between rounded-md w-full p-lg whitespace-nowrap",role:"link",href:i,target:r,onClick:s,children:[p("div",{className:"flex items-center space-x-lg",children:[t?u(ae,{imageClassName:"text-green-dark",image:t,width:"20",height:"20"}):null,u(je,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})]}),u(X,{className:"text-green",name:"ArrowRightIcon",width:"20",height:"20"})]})}):null})),Or=g((({className:e,additionalDescription:t,description:l,links:n=[],title:a,...i})=>p(k,{className:e,...i,children:[p("div",{children:[u(M,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),u(M,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?$r(n):null]}))),$r=(e,t=3)=>{const l=(e||[]).map(((e,t)=>u(Lr,{...e},String(t)))),[n,a]=t>0?[l.slice(0,t),l.slice(t)]:[l,[]];return u("div",{className:"mt-4xl",children:a.length>0?u(Ja,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[u("div",{className:"mb-1",children:n}),u(ei,{isUnfolded:e,children:a})]}),renderFoldButton:_r}):u("div",{children:n})})},_r=({isUnfolded:e,onToggle:t})=>e?null:u(Fr,{className:"border-t-main-divider/50",icon:"PlusIcon",label:"Показать еще",onClick:t}),Ur=g((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=ue({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:N("block",e),...t?i:{},children:a})})),Hr=[{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:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Wr=e=>Hr.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},Kr=g((({className:e="",media:t,showButtonText:l,stretched:n,version:a="white",children:i})=>{const[r,s]=o(),c=t?.map((e=>{const{href:t,icon:n,text:i}=e,{iconMapped:o}=Wr(t),c=Ge(n)?n:o,d=l?{text:i}:{text:""};return!r&&i&&s(!0),{...e,...d,icon:{...c,iconVersion:"color"},version:e?.version??a}})),d=N("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&r?"":"basis-auto",n?"flex-1 justify-center":"");return p("div",{className:N("flex flex-col gap-xs",e),children:[u("div",{className:"flex gap-xs",children:qe(c,{className:N(n||r?"basis-full":""),buttonClassName:d})}),i?u(je,{size:"text-s",font:"font-light",color:"text-secondary-text",children:i}):null]})})),Gr=g((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:o=[],target:c,title:d,align:m="text-left",benefits:h,imageOptions:{directionRight:g=!0,isImageAlwaysOnRight:x=false,isImageSecondary:f=!1}={},...b})=>u(k,{className:N("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...b,children:u(Ur,{href:a,target:c,className:"h-full",children:p(ke,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:u(M,{title:d,description:l,headlineVersion:"XS",isEmbedded:!0,align:m}),...ot(Ge(i)?u(ae,{image:i}):null,g),buttons:o.length?u(Kr,{media:o,showButtonText:!0,version:b?.version}):null,isImageAlwaysOnRight:x,isImageSecondary:f,imageAlign:"center",children:[u(Ke,{benefits:h}),u(et,{items:r,isDotted:s,listItemSize:"S"}),qr(n,m)]})})}))),qr=(e,t)=>e?u(T,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Xr=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(je,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(je,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:qe(a)}):null]},String(t))},Yr=g((({className:e="",title:t,align:l="text-center",icon:n,button:a,visibleCellsCount:i=1,cardCells:r=[],...s})=>{const o=r.map(Xr),[c,d]=i>0?[o.slice(0,i),o.slice(i)]:[o,[]];return p(k,{className:N("flex flex-col",e),defaultPadding:"p-2xl",...s,children:[Ge(n)?u("div",{className:"self-center",children:u(ae,{image:n})}):null,t?u(I,{className:N("pt-xs",l),headingType:"h5",title:t}):null,a?.text?u(be,{className:"w-full mt-m mb-lg",...a}):null,d.length?u(Ja,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[c,u(ei,{isUnfolded:e,children:d})]}),renderFoldButton:r.length>1?Qr:null}):u("div",{children:c})]})})),Qr=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(X,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Zr=(e=!1)=>e?"text-white":"",Jr=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),es=g((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(ae,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(ae,{image:t})}),l?u(I,{headingType:"h4",className:Zr(a),title:l}):null,n?u("div",{className:Jr(a),children:n}):null]}))),ts=g((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:N("h-full","border-main-divider border-b"),children:e?e.map(as(l,t)):null})}))),ls=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),ns=(e=!1)=>""+(e?"text-white":""),as=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u(T,{size:"text-s",color:ls(e),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:"text-right",children:u(T,{size:"text-s",align:"text-right",color:ns(e),children:l})}):null,n?u("div",{className:"text-right",children:u(T,{size:"text-s",color:ls(e),children:n})}):null]})]},String(a)),is=g((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:N("border border-gray rounded-md p-m mb-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),role:"row",children:[u(es,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(ts,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(be,{href:e.link.href,target:e.link?.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,rs({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),rs=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:u(je,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),ss=g((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(I,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(os,{...e})})]})})),os=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:n,orientation:a,...i})=>{const[r,s]=o(Array.from({length:e.length}).fill(!n)),c=d((e=>{const t=(t,l)=>l===e?!t:t;s((e=>e.map(t)))}),[]),m=d((()=>s((e=>Array.from({length:e.length}).fill(!1)))),[]),h=e?.map((({data:e,header:a},s)=>{return u(is,{visibleRowLength:n,showRow:r[s],header:a,columnData:(o=e,o?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===s&&l,onToggleColumn:()=>c(s),...i},String(s));var o}));return"horizontal"===a?u(qa,{onVisibleIndicesChange:m,children:h}):h})),cs=e=>e%2!=0,ds=g((({title:e,description:t})=>p("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[u(ae,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),u(M,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:Ca})]}))),ms=["ArrowDownIcon","ArrowUpIcon"],hs="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",us=g((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return p("div",{children:[u("div",{className:N(t.length?"hidden":"block"),children:a?u(ds,{...a}):null}),p("div",{className:N("space-y-2xs",t.length?"":"hidden"),children:[p("div",{className:N(hs),children:[A(r,{...i.options,parent:n}),cs(r.length)?u(Ct,{className:"col-span-6"}):null]}),u(Ja,{renderFoldableSection:({isUnfolded:e})=>p(ei,{className:N(hs),isUnfolded:e,children:[A(s,{...i.options,parent:n}),cs(s.length)?u(Ct,{className:"col-span-6"}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(Fr,{className:N(l<1?"hidden":""),disabled:!s?.length,label:e,icon:ms[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),ps=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,gs=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>ps(t[e])||ps(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>ps(t[e])||ps(l[e])||xs(t[e])<=xs(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>ps(t[e])||ps(l[e])||xs(t[e]?.min)>=xs(l[e]?.min)&&xs(t[e]?.min)<=xs(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>ps(t[e])||ps(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>ps(t[e])||ps(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),xs=e=>Number(e||0),fs=(e,t)=>(l=Mt)=>e&&e.filter((e=>gs(t,l(e.content||{})))),bs=g((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(Vt,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),ys=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(vs(e))]}),n?u("div",{children:u(zl,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,children:n?.text})}):null]}),vs=e=>([t,l])=>{const n=l?.type;return"array"===n?Ns(t,e)(l):null},Ns=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(je,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(bs,{items:n,multiple:!l?.single,...t(e)})]},e)},ws=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,ks=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),Ss=(e,t)=>yt((e[t?.sourceBook]?.rateRows||[]).filter(ws).flatMap((e=>ks(e.minMonths,e.maxMonths)))),Cs=(...e)=>{const t=e.map((e=>ft(e)));return Promise.all(t)};function Is(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const Ts=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function Bs(e){const{dirs:t=[],source:l=[]}=m((()=>{const t=(e=>e?.filter(Ts).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=ul(t,Cs);return{source:Object.fromEntries(Is(l,n).filter((([,e])=>Boolean(e)))),months:yt(n.flatMap((e=>e?.rateRows||[])).filter(ws).flatMap((e=>ks(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[]}}const Ms=1e9,Ps={sum:{min:1e4,max:Ms},period:3},Vs=kt((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=Bs(i.block?.blocks),[o,{field:c,reset:d}]=Pt(Ps),m=o===Ps?i.block?.blocks:fs(i.block?.blocks,o)((e=>({...e,period:Ss(r,e||{})||[]}))),h=p("div",{children:[u(or,{label:n?.title,min:500,max:Ms,...c("sum",{parse:e=>({min:Number(e),max:Ms}),format:({min:e})=>String(e)})}),u(Rn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...c("period")})]});return p(k,{className:N("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[ys({field:c,reset:d,filtrationSchema:t,resetButton:l,children:h}),u(us,{blocksToRender:m,...i})]})}),{childrenTypes:["ProductTile"],childSchema:e=>({...e?.filtrationSchema||{},sourceBook:{type:"string",title:"Адрес справочника"}})}),Rs=e=>"Image"===e?.contentType&&e?.image?u(ae,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,zs=g((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(k,{className:N("flex flex-col justify-center items-center",e),defaultPadding:N("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:Rs(n)}),u(M,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?u(be,{version:a?.version,text:a?.text,...a}):null]}))),As="location";function Ds(e="Москва"){const[t,l]=((e,t,l)=>{const[n,a]=o(l||null);return c((()=>e.subscribe(t,(e=>a(e)))),[e,t]),[n,d((l=>e.fire(t,l)),[e,t])]})(y,"location",Fs()??{name:e}),n=d((e=>{Es(e),l(e)}),[]),{data:a}=ul(js()?null:"/api/v1/region",bt);return c((()=>{a&&!js()&&l(a)}),[a]),[t??{name:e},n]}const js=()=>Boolean(globalThis.localStorage?.getItem(As)),Fs=()=>{try{const e=globalThis.localStorage?.getItem(As);return e&&JSON.parse(e)}catch(e){return null}},Es=e=>{try{globalThis.localStorage?.setItem(As,JSON.stringify(e))}catch(e){}};var Ls;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(Ls||(Ls={}));const Os=new Intl.NumberFormat("ru",{style:"currency",currency:Ls.RUB}),$s=e=>e?Os.format(e):"",_s="text-left text-m font-light text-secondary-text",Us=`${_s} pl-5xl`,Hs={USD:"DollarIcon",EUR:"EuroIcon"},Ws=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:_s,children:u(je,{size:"text-m",children:"Валюта"})}),u("th",{className:Us,children:u(je,{size:"text-m",children:"Купить"})}),u("th",{className:Us,children:u(je,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Ks)})]}))),Ks=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(ae,{image:{icon:Hs[t]},width:"24",height:"24"}):null,u(je,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(je,{size:"text-h6",children:$s(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(je,{size:"text-h6",children:$s(e?.buyExchangeRate)})})]},t)},Gs={icon:"GpsIcon"},qs=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Ta,{...Gs,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u(T,{size:"text-l",color:"text-primary-main",children:t}):null,u(T,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Xs=(e,t,l)=>{const n=Number(Ys(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Ys=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Qs=e=>{return(t=[[e=>e.value!==Ls.RUB&&e.oppositeValue!==Ls.RUB,()=>e.handleConvert(e.value,Ls.RUB)],[e=>e.value===Ls.RUB&&e.oppositeValue===Ls.RUB,()=>e.handleConvert(e.value,Ls.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Zs(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u($t,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(kl,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const Js=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:n})=>{const[a,i]=o({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Ls.RUB,selectBuy:l?.[0]?.currency?.currency||Ls.USD}),r=d((e=>i((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Zs({placeholder:"Хочу продать",rates:l,selected:a.selectSell,setSelected:eo(a,r,l),value:a.inputSell,setValue:e=>lo(r,l)(e,a.selectSell,a.selectBuy)}),Zs({placeholder:"Получу",rates:t,selected:a.selectBuy,setSelected:to(a,r,t),value:a.inputBuy,setValue:e=>no(r,t)(e,a.selectBuy,a.selectSell)}),n?.text?u(be,{text:n.text,version:n?.version,...n}):null]})})),eo=(e,t,l)=>n=>{t({selectSell:n}),Qs({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{lo(t,l)(e.inputSell,n,a)}})},to=(e,t,l)=>n=>{t({selectBuy:n}),Qs({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>no(t,l)(e.inputBuy,n,a)})},lo=(e,t)=>(l,n,a)=>{e({inputSell:Ys(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Xs(l,i,n===Ls.RUB)||"")})},no=(e,t)=>(l,n,a)=>{e({inputBuy:Ys(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Xs(l,i,n===Ls.RUB)||"")})};const ao=g((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=Ds(),i=function(e){const t=e?.code||"000",{data:l}=ul(`/api/v1/exchangerates?regionCode=${t}`,bt);return l||{}}(a),r=io(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Ls.RUB}});const o=r.filter((e=>e.saleExchangeRate));return o.push({currency:{currency:Ls.RUB}}),u(k,{className:N("box-border min-h-80",e),...n,children:u(ke,{className:"h-full",title:u(I,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[r?u(Ws,{className:"mb-xl",exchangeCurrencyItems:r}):null,u(qs,{address:i?.address})]}),r.length&&s.length&&o.length?u(Js,{className:"grow",currencyRatesBuy:s,currencyRatesSell:o,button:l}):null]})})})})),io=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],ro=(e,t)=>u(Ta,{...e,iconBgVersion:t,className:"shrink-0"}),so=g((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>u(jr,{tag:"button",className:N("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[ro(a,t),e?u(je,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?u(X,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),oo=kt((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,...o})=>u(k,{className:N("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...o,children:u(Ja,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(ei,{className:N("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:D({...o,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>co({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),co=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"accordion"===e?u(so,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):u(Fr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},mo=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(ho):null,u(be,{version:"primary",className:"w-full",href:"https://beta.rshb.ru/natural/feedback/question",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),ho=(e,t)=>p("div",{className:"mb-m space-y-m",children:[u("div",{children:u(je,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{className:"space-y-m",children:e.items?.map(uo)})]},String(t)),uo=(e,t)=>p("div",{className:"space-y-2xs",children:[u("div",{children:po(e.type,e.text)}),u(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),po=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${go(t)}`,children:u(je,{size:"text-h6",children:t})});case"email":return u("a",{className:"no-underline",href:`mailto:${t}`,children:u(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return u("span",{children:t})}},go=e=>e.replaceAll(/\D/g,""),xo=["split_version","New","Old"],fo=g((({className:e="",index:t,text:l,...n})=>{const a=ue(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:N("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),bo=g((({title:e,links:t,className:l=""})=>p("div",{className:N("flex flex-col gap-4",l),children:[u(je,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>u(fo,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),yo=g((({className:e="",items:t,basePath:l})=>t?.length?u("ul",{className:N("flex flex-col",e),children:t.map(vo(l))}):null)),vo=e=>(t,l)=>{const{text:n,...a}=t,i=ue({isRemote:!(!E.BASE_PATH||!e)&&!E.BASE_PATH.startsWith(e),basePath:e}),{href:r,target:s,onClick:o}=i(a);return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",href:r,target:s||"_self",onClick:o,children:n||null})},`list_item_${String(l)}`)},No=g((({className:e="",index:t,...l})=>{const n=ue({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`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}`})})),wo=g((({className:e="",links:t})=>p("div",{className:N("@container",e),children:[u("div",{className:"pt-lg",children:u(je,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(No,{index:t,...e},String(t))))}):null]}))),ko=kt((({className:e,footer:t,...l})=>{const{topItems:n}=l.options?.page?.sitemap??{},{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:o,documents:c}=t||{},m=d((()=>{const[e,t,l]=xo;((e,t)=>{const l=globalThis.document?.cookie.split(";")??[],[,n]=l.map((e=>e.split("="))).find((([t])=>t.trim()===e))||[];t(n)&&(globalThis.document.cookie=`${e}=${t(n)}`)})(e,(e=>e?.replace(t,l)))}),[]);return p(k,{tag:"footer",className:e,defaultPadding:"p-4xl pb-24",...l,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:So(n)}),u(mo,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(Kr,{className:"mb-xl",media:r,stretched:!0,children:"Соцсети"}),p("div",{className:"mb-xl",children:[u("div",{className:"flex flex-col gap-4 mb-xs",children:s?.map(Co)}),u(je,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),u("div",{className:"py-lg border-t border-main-divider",children:u(fo,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:m})}),u(bo,{className:"py-lg border-y border-main-divider",title:o,links:a}),u(wo,{links:c})]})})),So=e=>e?.map(((e,t)=>u(oo,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,children:u(yo,{items:e.items,basePath:j(e.href)})},String(t)))),Co=({href:e="/",text:t},l)=>{const{label:n}=Wr(e);return u(be,{className:"w-full",text:t||n,version:"secondary",href:e,target:"_blank"},String(l))},Io={width:"34",height:"34"},To={"bg-white":"color",transparent:"white"},Bo={"bg-white":"text-primary-main",transparent:"text-white"},Mo=(e,t,l)=>u(ae,t?.src?{image:t,className:Bo[e],width:l?.width,height:l?.height}:{image:{icon:t?.icon||"LogoIcon",iconVersion:To[e]},className:Bo[e],width:l?.width,height:l?.height}),Po={"bg-white":"text-primary-text",transparent:"text-white"},Vo=g((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:N("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",children:[Mo(i,l?.image,Io),r?n??u("div",{className:"ml-s",children:u(je,{font:"font-medium",color:Po[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),Ro={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},zo=g((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=v(),i=E.BASE_PATH?.startsWith(a.pathname),r=d((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[i?u("div",{children:u(Vo,{className:"my-2xs",bgColor:e,logo:t})}):Ao(r),l?u("div",{children:u(be,{href:l,ariaLabel:"Войти",target:"_blank",className:N("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",Ro["transparent"===n?"transparent":"default"]),children:"Войти"})}):null]})})),Ao=e=>u("div",{children:p("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(ae,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),Do={"bg-white":"primary",transparent:"transparent"},jo=kt((({bgColor:e="bg-white",version:t=Do[e],portal:l,...n})=>{const{logo:a}=n.options?.page?.sitemap??{},{internetBankUrl:i}=l||{};return u(k,{tag:"header",defaultPadding:"",version:t,...n,children:u("div",{className:"container px-lg py-2xs box-border",children:u(zo,{bgColor:e,logo:a,internetBankUrl:i,version:t,...n})})})})),Fo={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Eo=kt((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...o})=>{const c=v();return u(k,{className:N("relative flex flex-col",Fo[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(c)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...o,children:D({...o,extraProps:{className:N("w-full",vr(r)),padding:n?"":"p-0"}})})}),{childrenTypes:[]}),Lo=kt((e=>u(Eo,{...e})),{childrenTypes:[]}),Oo=g((e=>{const{className:t,image:l,...n}=e;return u(k,{className:t,defaultPadding:"p-0",...n,children:u(ae,{image:l})})})),$o=["байт","Кб","Мб","Гб","Тб","Пб"],_o=g((({icon:e,text:t,href:l,target:n,fileFormat:a,fileSize:i})=>{const r=i&&a?",":"",s=i??"",o=a?String(a):"";return p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",href:l,target:n,children:[e,t?p(je,{size:"text-l",font:"font-light",children:[t," ",Uo(s,o),u(je,{color:"text-secondary-text",children:l&&`${s+r+o}`})]}):null]})})),Uo=(e,t)=>e||t?u("span",{children:", "}):"",Ho={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Wo=g((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=v();return p(k,{className:N("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(M,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:N("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Ho[r]),role:"list",children:a.map(Ko(o,i))}):null]})})),Ko=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a="Attachment"===l?.docType?K(e)(l?.attachment?.src):l?.href,i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${$o[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?Go(a):l?.fileFormat;return u("div",{role:"listitem",children:u(_o,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?u(ae,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:t,width:"24",height:"24"}):null})},String(n))},Go=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},qo=g((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,additionalDescription:o="",title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24",g=i?.src?u(ae,{className:"hidden lg:block",image:i}):null;return u(k,{className:N("min-h-80",e),padding:"p-0",version:d,...m,children:p(ke,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:u(I,{headingType:"h3",title:c,className:N("whitespace-pre-wrap",l)}),rightImage:g,buttons:qe(n,{className:"flex-wrap"}),children:[a?u(je,{size:"text-xl","font-weight":"font-light",children:a}):null,p("div",{className:N("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[u(et,{items:r,listItemSize:"M"}),u(je,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:o}),s?.src?u("div",{className:N("flex justify-center bg-white rounded-md @xl:-order-1",h),children:u(ae,{className:"w-fit",image:s})}):null,i?.src?u(ae,{className:"lg:hidden",image:i}):null]})]})})})),Xo={primary:"bg-white/30",secondary:"bg-main-divider"},Yo={primary:"text-white",secondary:"text-secondary-text"},Qo=g((({count:e,version:t="secondary"})=>u("div",{className:N("w-6 h-6 rounded-full flex items-center justify-center",Xo[t]),children:u(je,{size:"text-xs",color:Yo[t],children:e})}))),Zo=(e=[],t={})=>e.filter((({content:e={}})=>gs(t,e))).length,Jo=(e,t)=>e===t;const ec=(tc=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Jo,((e=Jo)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>tc(l,t[e])))));var tc;const lc=[],nc={},ac={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},ic={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},rc={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},sc={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},oc=g((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:N("h-12","block flex-1","cursor-pointer",ac[n],l?sc[n]:rc[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:N("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?ic[n]:"text-secondary-text hover:text-primary-main"),children:[u(je,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),cc=g((e=>u(e?.item?.href?dc:mc,{...e}))),dc=g((e=>{const t=ue(),l=d((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(oc,{...e,tag:"a",item:a,onClick:n})})),mc=g((({item:e={},onClick:t,...l})=>{const n=d((()=>{t&&t(e)}),[t,e]);return u(oc,{item:e,onClick:n,...l})})),hc=(e,t,l)=>(n,a)=>u(cc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),uc=g((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:N("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(hc(n,a,t))}))),pc={categories:[],extraOptions:[],propertyType:[],stage:[]},gc=kt((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[i,{field:r,reset:s,update:o}]=Pt(pc),c=i===pc?a.block?.blocks:fs(a.block?.blocks,i)(),h=d(((e=pc)=>o(e)),[]),g=(({hotFilters:e=lc,filtrationState:t=nc,blocks:l=lc,onFiltrationStateChange:n})=>{const a=m((()=>Math.max(0,e.findIndex((e=>ec(e.filter,t))))),[e,t]),i=m((()=>e.map((t=>({text:t.text,appendRight:u(Qo,{version:t===e[a]?"primary":"secondary",count:Zo(l,t.filter)})})))),[e,l,a]),r=d((t=>{n(e[i.indexOf(t)].filter)}),[e,i]);return{value:i[a],items:i,onChange:r}})({hotFilters:t,filtrationState:i,blocks:a.block?.blocks,onFiltrationStateChange:h});return p(k,{className:N("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(uc,{...g}),ys({field:r,reset:s,filtrationSchema:l,resetButton:n}),u(us,{blocksToRender:c,...a})]})}),{childrenTypes:["ProductTile"],childSchema:e=>e?.filtrationSchema||{}});function xc(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const fc={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},bc=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(fc).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(X,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),yc=e=>globalThis[e];const vc=()=>function(e,t){const[l,n]=o(),a=d((()=>n(yc(e))),[e]);return c((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",a),document.head.appendChild(e),()=>{document.head.removeChild(e),n(void 0)}}if(!yc(e))return l.addEventListener("load",a),()=>{l.removeEventListener("load",a)};a()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${E.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),Nc={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},wc=g((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(Nc).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(X,{name:l,width:"20",height:"16"})})})),kc={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},Sc=[55.753995,37.614069],Cc=g((({points:e,className:t="",zoom:l=5})=>{const n=h(null),a=vc(),[i,r]=o();if(c((()=>{n?.current?a&&(xc(a,n.current,e),e?.length||n.current.setCenter(Sc)):a?.ready((()=>{n.current||(n.current=new a.Map("map",{center:e?Ic(e):Sc,zoom:l,controls:[],suppressMapOpenBlock:!0}),xc(a,n.current,e))}))}),[a,n,e,l]),!a)return null;const s=i?"z-[100000]":"z-10";return p("div",{id:"map",className:N(!i&&"relative","w-full",t),children:[u("div",{className:N(Object.values(kc),s,"right-2 top-4 bg-white"),onClick:()=>{const e=n.current.container;i?e.exitFullscreen():e.enterFullscreen(),r(e.isFullscreen())},children:u(X,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:N("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",s),children:[u(wc,{yandexMaps:n}),u(wc,{yandexMaps:n,direction:"out"})]}),bc(n.current,a,N("right-2 top-80",s))]})})),Ic=e=>[Bc(Tc(e,0)),Bc(Tc(e,1))],Tc=(e,t)=>e.map((e=>e[t])),Bc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Mc={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},Pc=(e,{field:t,reset:l})=>p("div",{className:"pb-2xl",children:[e?.length?u("div",{className:"flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",children:e.map((e=>u($l,{text:Mc[e],...t(e)},e)))}):null,u(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:u(X,{name:"CloseIcon",width:"16",height:"16"})})]}),Vc=()=>null,Rc=()=>[],zc=g((({className:e,data:t=[],renderCard:l=Vc,filterItems:n=Rc,initFilterState:a={},descriptionData:i,title:r})=>{const[s,{field:o,reset:c}]=Pt(a),[d,h,g]=m((()=>{const e=n(t,s),l=e.map((e=>[e.gpsLatitude,e.gpsLongitude].filter(Boolean))).filter((e=>e&&2===e.length));return[e,l,e.length]}),[t,s]);return p("div",{className:N("space-y-1",e),children:[p("div",{className:"bg-white",children:[p("div",{className:"p-6xl pb-0",children:[p("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:[u(I,{headingType:"h2",children:r}),g?u(je,{size:"text-h2",color:"text-secondary-text",children:`(${g})`}):null]}),i?Ac(i):null,Pc(Object.keys(a),{field:o,reset:c})]}),u("div",{className:"h-[600px]",children:u(b,{children:u(Cc,{points:h,className:"h-full"})})})]}),d.map(l)]})})),Ac=({__html:e,list:t})=>e||t?.length?p("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?u("div",{className:"mb-2xl",children:u(Ae,{__html:e})}):null,t?.length?u("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>p("div",{className:"flex gap-xs items-center",children:[e?.image?u(ae,{image:e.image}):null,e?.text?u(je,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Dc={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"}},jc=g((({className:e,children:t,color:l="gray"})=>p("div",{className:N("pt-2xl sm:p-s sm:border sm:border-gray rounded-md flex items-center",Dc[l].border,e),children:[u("div",{className:"block pr-m sm:pr-0 sm:hidden",children:u(ae,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),u(je,{size:"text-m",color:Dc[l].text,children:t})]}))),Fc=g((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:Ec({textItems:a,subText:t,children:l,...n})})),Ec=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>p("div",{className:N("flex gap-2xl sm:gap-2xs flex-col h-full max-w-[300px]",i),children:[e?u(je,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>u(je,{size:"text-l",children:e.trim()},String(t)))),a?u(je,{color:n,size:"text-m",children:a}):null]}),Lc=g((({className:e,children:t})=>u("div",{className:N("sm:flex sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Oc=["ArrowDownIcon","ArrowUpIcon"],$c=["Подробнее","Скрыть"],_c=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,children:[u("div",{className:"pr-m",children:$c[Number(e)]}),u(X,{className:"text-primary-text",name:Oc[Number(e)],width:"16",height:"16"})]}),Uc=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},o)=>{const c=[{label:"Устройство",value:Wc(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return p("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[p("div",{className:"sm:flex sm:justify-between",children:[p("div",{children:[u(je,{size:"text-h4",children:Wc(e)}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(X,{name:"GeolocationIcon",width:"24",height:"24"}),u(je,{size:"text-l",children:t})]}):null]}),u(jc,{color:"green",children:Wc(s)})]}),u("div",{className:"hidden sm:block",children:u(Lc,{className:"flex-wrap",children:c?.map(Hc)})}),u(Ja,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>u(ei,{isUnfolded:e,children:u(Lc,{className:"flex-wrap",children:c?.map(Hc)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>_c({isUnfolded:e,onToggle:t})})]},String(o))},Hc=(e,t)=>u(Fc,{...e},String(t)),Wc=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Kc=[];const Gc=async e=>await ft(e,{method:"GET"})||Kc,qc={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Xc={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Yc=g((({data:e,className:t})=>{const[l]=Ds(),n=function(e){const{data:t=Kc}=ul(`/api/v1/atms?regionCode=${e}`,Gc);return t}(l?.code??"000");return u(zc,{className:t,filterItems:Qc,data:n,initFilterState:qc,renderCard:Uc,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),Qc=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Xc[t](e))),l=!n.length||n.some((t=>Xc[t](e)));return t&&l}))},Zc=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", "),a=[Jc({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Jc({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean);return u(Fc,{label:"Режим работы",value:a,className:"max-w-none"})},Jc=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",ed=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],td=e=>ed.map((([t,l,n])=>({key:t,title:n,short:l,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??"")}}))),ld=e=>{if(!e)return null;const t=nd(e);return p(Lc,{className:"border-none",children:[u(Fc,{label:"Для юридических лиц",labelSize:"text-l",children:u("div",{className:"flex gap-1",children:t.map(ad)})}),u(Fc,{label:"Режим работы",className:"max-w-none",children:u(je,{children:e})})]})},nd=e=>{const t=ed.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},ad=({short:e,status:t},l)=>u("div",{className:N("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:u(je,{size:"text-xs",children:e})},String(l)),id=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>p("div",{className:"flex gap-lg h-full",children:[e?.currency?u(Fc,{label:"Валюта",value:e.currency}):null,t?u(Fc,{label:"Купить",value:String(t)}):null,l?u(Fc,{label:"Продать",value:String(l)}):null]},String(n)),rd=(new Date).getDay(),sd=e=>{const[t]=e?.slice(rd-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?p("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?u(jc,{color:"green",children:a}):null,l&&i?u(jc,{color:"yellow",children:`перерыв: ${l}`}):null]}):u(jc,{color:"red",children:"Выходной"})},od=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",cd=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>u(Fc,{label:e,value:t&&l?l:"",subText:od({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),dd=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c},d)=>{if(!o)return null;const m=td(o);return p("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[p("div",{className:"sm:flex sm:justify-between",children:[p("div",{children:[u(je,{size:"text-h4",children:e}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(X,{name:"GeolocationIcon",width:"24",height:"24"}),u(je,{size:"text-l",children:t})]}):null]}),sd(m)]}),u("div",{className:"hidden sm:block",children:md({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c})}),u(Ja,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>u(ei,{isUnfolded:e,children:md({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>_c({isUnfolded:e,onToggle:t})})]},String(d))},md=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const o=td(r),c=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return p("div",{children:[p(Lc,{className:"flex-wrap",children:[u(Fc,{label:"Факс",value:t}),u(Fc,{label:"Телефон филиала",value:e}),u(Fc,{label:"Для обращений юридических лиц",value:l}),u(Fc,{label:"Обслуживание физических лиц",value:n}),u(Fc,{label:"Для консультаций по валютному контролю",value:i}),u(Fc,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?u(Lc,{children:u(Fc,{label:c,labelSize:"text-l",className:"w-full max-w-none",children:u("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:o?.map(cd)})})}):p(Lc,{children:[u(Fc,{label:c,labelSize:"text-l",children:u("div",{className:"flex gap-1",children:o?.map(ad)})}),Zc(o)]}),r?.businessScheduleVisibleTag?ld(r?.businessScheduleDescription):null,s?.currencies?.length?u(Lc,{className:"flex-wrap",children:s?.currencies?.map(id)}):null]})},hd=[];const ud=async e=>await ft(e,{method:"GET"})||hd,pd={workingSaturday:!1},gd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},xd=g((({className:e})=>{const[t]=Ds(),l=function(e){const{data:t=hd}=ul(`/api/v1/branches?regionCode=${e}`,ud);return t}(t?.code??"000");return u(zc,{className:e,filterItems:fd,data:l,initFilterState:pd,renderCard:dd,title:`Офисы филиала ${t?.name}`})})),fd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>gd[t](e)))))},bd=g((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return u(k,{version:"transparent",className:N(t),defaultPadding:"p-0",...l,children:"offices"===n?u(xd,{}):u(Yc,{data:e})})})),yd=g((({className:e,size:t})=>u("figure",{className:N("m-0 mt-xl min-w-[80%]",e),children:vd(t)}))),vd=(e=3)=>wd(100,e).map((e=>Math.floor(e))).map(Nd),Nd=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),wd=(e,t)=>[e].concat(t>0?wd(e/1.618,t-1):[]),kd=g((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(k,{className:N("box-border",e),...n,children:[u(M,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u(yd,{})]}))),Sd=g((({className:e,padding:t,slides:l=[],...n})=>u(k,{className:N("overflow-hidden relative",e),padding:t,...n,children:u(qa,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",children:u(st,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),Cd=g((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(k,{className:N("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ge(r)?u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:u(ae,{image:r})}):null,s?u(I,{headingType:"h3",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?Id(i):null,Td({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Td({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Td({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?qe([n]):null]})]}))),Id=e=>u("div",{className:"border-b border-main-divider pb-lg",children:u(Ae,{__html:e})}),Td=({label:e,data:t,iconName:l,dataColor:n=""})=>t?p("div",{className:"flex gap-s",children:[u(X,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col gap-2xs",children:[u(je,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),u(je,{size:"text-xl",color:n,children:t})]})]}):null,Bd=g((e=>{const{__html:t,richVersion:l,...n}=e;return u(k,{defaultPadding:"p-0",...n,children:u(Ae,{__html:t,richVersion:l})})})),Md=g((({className:e=""})=>{const[t,l]=o("option2"),n=d((e=>l(e)),[]);return p("div",{className:N("order-4",e),children:[u(da,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:n}),u(da,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:n})]})})),Pd=g((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(kl,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),Vd=g((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Pd,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(Pd,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Rd=["От 1 дня","До 365 дней"],zd=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(je,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(Rn,{min:1,max:365,value:e,items:Rd,onChange:t})]}))),Ad=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Pd,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(Pd,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Dd=g((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents @xl:block flex-1 space-y-xl",children:[u(Vd,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:jd(c)}),u(zd,{days:a,setDays:e=>c({days:e})}),u(Ad,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:Fd(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents @md:flex justify-between items-center gap-m",children:[u(Md,{}),u(be,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),jd=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Fd=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Ed=g((({days:e,tariffs:t=[]})=>{const l=Od(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[p("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:[Ld("Аренда за",e),Ld("Цена",l+" ₽")]}),u("div",{className:"@xl:hidden order-3 mb-xs",children:u(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),p("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:[u(ae,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),u("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:u(T,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),Ld=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[u(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Od=(e,t)=>{const l=$d(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},$d=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},_d=(e,t)=>e.find((e=>e.branchCode===t)),Ud=g((e=>{const{regions:t,data:l,branches:n,onChange:a,onClick:i}=e;c((()=>{a({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,a]);const r=_d(n,l.selectedBranch),s=Hd(r?.safeBoxCaseVolumes),o=Wd(r?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Kd(o,l.selectedBoxSize);return p("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[u(Dd,{...l,regions:t,onClick:i,branches:n,caseVolumes:s,safeBoxCases:o,onChange:a}),u(Ed,{days:l.days,tariffs:d})]})})),Hd=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Wd=(e,t)=>e?.find((e=>e.volume===t)),Kd=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Gd=[];const qd=async e=>await ft(e,{method:"GET"})||Gd,Xd=g((({title:e,footnote:t,className:l="",...n})=>{const[a,i]=o(!1),r=d((()=>i((e=>!e))),[]),[s,c]=o({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=gl(),h=Yd(s.selectedRegion,m),g=function(e){const{data:t}=ul(e?`/api/v1/safeboxes?regionCode=${e}`:null,qd);return t||Gd}(h),x=d((e=>c((t=>({...t,...e})))),[c]),f=(b=_d(g,s.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(k,{className:l,defaultPadding:"",...n,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(I,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Ud,{regions:m,branches:g,data:{...s,selectedRegion:h},onClick:r,onChange:x}),t?u(T,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&a?u(Cc,{points:f,className:"h-[640px]"}):null]})})),Yd=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Qd(e){throw new Error(e)}const Zd={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Jd={normal:"",small:"min-h-6xl"},em={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"},tm=g((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",stepVersion:r="gray",version:s="primary",...o})=>p(k,{className:N("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...o,children:[u(M,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(lm(i,r))})}):null,qe(a,{isVertical:!0})]}))),lm=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return nm(e,t)(l,n);case"rte":return u(Ae,{__html:l.__html});default:Qd(l)}},nm=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row items-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:am(e,t)(l,n)}),p("div",{className:N("flex flex-col justify-center h-fit",Jd[e]),children:[l.label?u(T,{size:"text-l",align:"text-left",children:l.label}):null,l.description?u("div",{className:N("text-s font-light text-left",em.description),children:l.description}):null]})]})},String(n)),am=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=Zd[e][i?"image":"icon"],s=i?"transparent"===t:t;return u(k,{className:N(r,"z-10 mr-s flex justify-center content-center rounded-md"),defaultPadding:"",version:s,children:u("span",{className:"flex max-w-full max-h-full items-center justify-center",children:Ge(l?.icon)?u(ae,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:im(e),height:im(e)}):u("span",{className:N("text-h4","transparent"===t?em.iconText:(o=t,"secondary"===o?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var o},im=e=>"normal"===e?"38":"24",rm=e=>({href:t})=>!!t&&$(sm(t,e)).startsWith($(t)),sm=(e,t)=>L(e)?t.href:t.pathname;function om(e=[]){const t=v(),l=e.findIndex((e=>rm(E.BASE_PATH?{pathname:E.BASE_PATH}:e))(t));return[l,e[l]]}const cm=g((({isActive:e,onClick:t})=>p("button",{className:N(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:t,children:[u(X,{className:"w-6 h-6",name:"BurgerIcon",iconVersion:e?"color":"black"}),"Меню"]}))),dm=g((({isActive:e,item:t,onClick:l})=>{const n=ue({isRemote:!0}),{href:a,onClick:i}=n({href:t?.href,onClick:l});return p("a",{className:N(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),href:a,target:"_self",title:t?.title||"",onClick:i,children:[u(X,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]})}));const mm=({onCloseAll:e,onClose:t}={})=>{const[l,{push:n,pop:a,clear:i}]=function(e=[]){const[t,l]=o(e),n=d((e=>l((t=>[...t,e]))),[]),a=d((()=>l((e=>e.slice(0,-1)))),[]),i=d((e=>l((t=>t.filter((t=>t!==e))))),[]),r=d((()=>l([])),[]);return[t,{setList:l,push:n,pop:a,remove:i,clear:r}]}(),r=d((()=>{e&&e(l),i()}),[l,e]),s=d((()=>{t&&t(l[l.length-1]),a()}),[l,t]);return c((()=>y.subscribe("dialog",(e=>{switch(e.type){case"open":n(e);break;case"close":e.all?r():s();break;default:Qd(e)}}))),[r,s]),l},hm=g((({className:e,onClose:t})=>u("button",{className:N("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(ae,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),um=g((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=me(),i=d((()=>{a(),n&&n()}),[n]);return p("div",{className:N("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(hm,{className:"absolute top-0 right-0",onClose:i}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})})),pm=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=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-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const gm=e=>e?.length?p("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(je,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>u(xm,{...e},String(t))))})]}):null,xm=g((({icon:e,...t})=>{const l=ue(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s items-center",children:[e?u(ae,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:u(je,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),fm=e=>t=>u("div",{className:"mb-xs sm:mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:u(je,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),bm=g((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),ym=g((({foreignOffices:e,defaultLocation:t})=>{const[l,n]=Ds(t),[a,i]=o(""),r=Nm(gl()).sort(((e,t)=>e.name.localeCompare(t.name))),s=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(r,vm),{close:c}=me(),m=d((e=>{n(e),c()}),[]);return p(um,{className:"pb-20",head:p("div",{children:[u(je,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?p("div",{className:"mb-s",children:[u(je,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>n(l),children:u(je,{color:"text-primary-main",children:l.name})})]}):null,u(bm,{onSearch:i,searchTerm:a})]}),children:[a&&a.length>=3?u("div",{children:r.filter((({name:e})=>e&&pm(e.toLowerCase())(a.toLowerCase())>=.8)).map(fm(m))}):u("div",{className:"columns-1 sm:columns-5",children:Array.from(s.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(je,{size:"text-h6",children:e})}),t.map(fm(h))]},e)))}),gm(e)]});var h})),vm=e=>e.name?.charAt(0)||"",Nm=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),wm=g((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:i="Поиск по сайту"})=>{const r=d((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:N("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(ae,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:N("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:i,autoFocus:l,onChange:r,onFocus:a})]})}));function km(e,t,l=300){c((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const Sm=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},Cm=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Im=e=>t=>e.map((([e,l])=>[pm(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>Bm(t,e))).reduce(Sm(Math.max,0),new Map),Tm=e=>t=>{return Is(t,t.map((({title:e})=>e)).map((e=>t=>{const l=Cm(t||"");return l.length?Ve(e.map((e=>_a(l.map(pm(e)))))):0})(e))).sort((e=>(t,l)=>-e(t,l))((l=([,e])=>e,(e,t)=>l(e)-l(t)))).map((([e])=>e));var l},Bm=(e,t)=>new Map(e.map((e=>[e,t]))),Mm=({basePathList:e,initialQuery:t=""})=>{const[l,n]=o(t||"");c((()=>{null!=t&&n(t)}),[t]);const{data:a}=ul(e?.length?e:null,Pm),[i,r]=o(null);return km((()=>{a&&r(a.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=Cm(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(Im(i)).reduce(Sm(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return Tm(a)(r)})(l)))}),[a,l]),[i,{value:l,onChange:n}]},Pm=async(...e)=>(await Promise.allSettled(e.map((e=>ft(_(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Vm=g((({className:e,topItems:t})=>{const l=ue({isRemote:!0});return u("div",{className:N("flex items-start justify-between",e),children:t?.map(l).map(zm)})})),Rm=["all","footer"],zm=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||Rm.includes(e.displayArea.toLowerCase())));return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>u(Am,{...e,basePath:j(a),index:t},String(t))))]},String(t))},Am=g((({text:e,index:t,basePath:l,...n})=>{const a=ue({isRemote:!(!E.BASE_PATH||!l)&&!E.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:N("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),Dm=g((({initialQuery:e,topItems:t})=>{const l=m((()=>t?.map((e=>e.href||"/"))),[t]),[n,a]=Mm({basePathList:l,initialQuery:e}),i=m((()=>jm(t)(n)),[t,n]);return u(um,{head:u(wm,{autoFocus:!0,...a}),children:u(Vm,{topItems:i})})})),jm=e=>t=>e?.length&&t?.length?Is(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:_("/",t)})))}))):[],Fm=g((({className:e,...t})=>{const[l,n]=o(""),a=d((()=>n("")),[]),i=((e={})=>{const{open:t,close:l}=me();return{open:(l={},n={})=>t(u(Dm,{...e,...l}),n),close:l}})(t),r=d((e=>{n(e),Em(e)&&i.open({initialQuery:e},{onClose:a})}),[a,i]);return p("div",{className:N("relative",e),children:[u(wm,{value:l,onChange:r}),u(hm,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),Em=e=>e&&e.length>=3,Lm=g((({item:e,basePath:t})=>{const l=ue({isRemote:!(!E.BASE_PATH||!t)&&!E.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=v(),s=rm(r)({href:n});return p("a",{className:N(s?"text-primary-main":"text-primary-text","py-3 text-h5 font-light flex justify-between cursor-pointer"),href:n,target:a,onClick:i,children:[e.text,u(ae,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]})})),Om=({item:e,isActive:t,onClick:l})=>p("button",{type:"button",className:"relative",onClick:l,children:[u("span",{className:N("whitespace-nowrap",t?"text-primary-main":""),children:e.text}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]}),$m=g((e=>{const{topItems:t,defaultLocation:l,officesLink:n}=e,[a]=Ds(l),i=(e=>{const{open:t,close:l}=me();return{open:(l={})=>t(u(ym,{...e}),l),close:l}})(e),[r,s]=Ga({itemCount:t?.length??0}),[h]=om(t),[g,x]=o(h),f=m((()=>t?.[g]),[t,g]),b=f?.items||[];c((()=>{x(h)}),[h]),c((()=>{g>0&&s.scrollTo(g)}),[g,s]);const y=d((e=>x(e)),[]);return u(um,{head:u("div",{className:"flex items-center",children:u(I,{as:"h4",title:"Меню"})}),children:p("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[u("div",{className:"w-full mb-3",children:u(Aa,{containerRef:r,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>u(Om,{item:e,isActive:g===t,onClick:()=>y(t)},String(t))))})}),p("div",{className:"relative grow overflow-auto",children:[_m(b,f?.href),u(Fm,{className:"grow mb-5",...e}),Um(n),Hm(a,(()=>i.open()))]})]})})})),_m=(e,t)=>e?u("div",{children:e.map(((e,l)=>u(Lm,{item:e,basePath:t},String(l))))}):null,Um=e=>e?p("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[u(ae,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),u("span",{children:"Офисы и банкоматы"})]}):null,Hm=(e,t)=>p("div",{className:"flex items-center text-s cursor-pointer",onClick:t,children:[u(ae,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),p("div",{className:"flex flex-col items-start",children:[u(je,{size:"text-h5",children:e.name}),u(je,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]}),Wm="burgerMenuDialog",Km=e=>{const{open:t,closeAll:l,close:n}=me(),a=mm(),i=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Wm,a),r=()=>t(u($m,{...e}),{id:Wm});return[i,{open:r,close:n,toggle:()=>{i?l():r()}}]},Gm=[],qm=kt((({sticky:e,...t})=>{const{menuItems:l=Gm}=e??{},[n,{toggle:a,close:i}]=Km(t.options?.page?.sitemap??{}),[,r]=om(l),s=Math.floor(l.length/2),o=l.slice(0,s),c=l.slice(s);return u(k,{className:"h-[74px]",defaultPadding:"p-0",...t,children:p("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[o.map(Xm(r,i)),u(cm,{isActive:n,onClick:a}),c.map(Xm(r,i))]})})})),Xm=(e,t)=>(l,n)=>u(dm,{isActive:l===e,item:l,onClick:t},l.href||String(n)),Ym="hidden sm:flex absolute z-40 top-0",Qm=g((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Ga({itemCount:t?.length||0});return p("div",{className:N("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(Aa,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(hc(l,n,a))}),r.canScrollLeft?u(pr,{className:N("left-6",Ym),onClick:r.scrollLeft}):null,r.canScrollRight?u(gr,{className:N("right-6",Ym),onClick:r.scrollRight}):null]})})),Zm=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(uc,{...t});case"centered":return u("div",{className:"flex",children:u(uc,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Qm,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Jm="tab",eh=g((({className:e="",isSticky:t,tabs:l=[],tabsMode:n,...a})=>{const i=v(),{isReady:r}=i,s=m((()=>l.map(lh)),[l]),[h,p]=o(0);c((()=>{if(!l||!l[0])return;const e=i.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===i.query.tab))||0,t=l[e]||l[0];p(e),th(t)}),[r]),c((()=>{const e=l[h];"group"===e?.type&&y.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,h]);const g=d((e=>{const t=s.indexOf(e),n=l[t];p(t),th(n),"group"===n.type&&(e=>{const t=new URLSearchParams(i.query);e.name?t.set(Jm,e.name):t.delete(Jm),i.replace(`${i.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,s]);return u(k,{className:N(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...a,children:Zm({items:s,value:s[h],tabsMode:n,onChange:g})})})),th=e=>{"group"===e.type&&y.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&y.fire("tab",{type:e.type,label:e.href})},lh=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,nh={start:"text-start",center:"text-center",end:"text-end"},ah=g((({tab:e,className:t,onClick:l,isActive:n})=>{const a=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white text-primary-text"),title:e?"mb-xs text-xl":"mb-2xs text-l",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal"}))(n);return p("button",{type:"button",onClick:l,"aria-label":e?.title,className:N("border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs",a.btn,t),children:[e?.icon?u(ae,{className:N("h-6 w-6 min-w-6 min-h-6",a.icon),image:{...e?.icon,iconVersion:e?.icon?.iconVersion??a.iconVersion},width:"24",height:"24"}):null,p("div",{className:"border-0",children:[e?.title?u("div",{className:a.title,children:e.title}):null,e?.description?u("div",{className:a.desc,children:e.description}):null]})]})})),ih=g((({tab:e})=>{const t=ue(),{onClick:l}=t({...e,onClick:()=>{e.href&&!O(e.href)&&(globalThis.location.href=e.href)}});return km(l,[],800),u(yd,{className:"col-span-12 p-xl",size:5})})),rh=kt((({className:e="",tabs:t=[],block:l,tabAlign:n,...a})=>{const[i,r]=o(oh(t)),s=sh(t[i],i),d=t.length,[m,{inc:h,dec:g}]=hr({itemCount:d},i),[x,f]=Ga({itemCount:d});return((e,t)=>{const[l,{setTrue:n}]=xl(!1);c((()=>{t.scrollTo(e,{behavior:l?"smooth":"auto",block:"nearest",inline:"center"}),!l&&n()}),[e,l])})(i,f),p(k,{className:N(e),defaultPadding:"p-0",...a,children:[p("div",{className:"relative border-b-8 border-primary-main",children:[u(Aa,{itemClassName:"flex",containerRef:x,snapAlign:"snap-end",gap:8,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:t.map(ch(i,r,n))}),u(br,{scroll:f,arrowsPadded:!0,onScrollLeft:g,onScrollRight:h,activeIndex:m,itemCount:d})]}),u("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:t[i]?.href?u(ih,{tab:t[i]}):A(l?.slots?.[s],{...a?.options,slotName:s,parent:l})})]})}),{slots:({tabs:e})=>e?.filter((e=>!e.href)).map(sh)||[],childrenTypes:{exclude:["TabsLayout"]}}),sh=(e,t)=>e?.title||`Слот №${t}`,oh=e=>e.reduce(((e,t,l)=>t.selected?l:e),0),ch=(e,t,l="start")=>(n,a)=>u(ah,{className:nh[l],tab:n,isActive:e===a,onClick:()=>t(a)},String(a)),dh={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},mh=g((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:dh[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),hh=g((({className:e="",isOpen:t,onClick:l})=>u(be,{className:e,appendRight:u(ae,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),uh={Buttons:({buttons:e})=>qe(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?u(ae,{image:e}):null,List:({isDotted:e,...t})=>u(et,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{className:"space-y-2xs",children:[e?u("div",{children:u(je,{size:"text-h6",children:e})}):null,t?u("div",{children:u(je,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(hh,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},ph=g((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:r,setOpenTableInnerIdx:s})=>{const[d,m]=o(!0);c((()=>{n===r&&i||m(!0)}),[i,r]);return gh({cell:e,cellProps:{rowIdx:l,cellIdx:n,fieldIdx:t,displayTable:e=>{m(!1),s(n),a(e)},isVisible:d}})})),gh=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in uh))return null;return u(uh[l],{...t,...n})},xh=g((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>u("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>u(ph,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),fh=(e,t)=>140*Ve(e.slice(0,t).map((e=>e?.cols?.length??1))),bh=(e,t)=>e?.length>0?u("div",{className:N("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>u("div",{className:"w-20 mx-lg",children:u(je,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,yh=g((({rows:e})=>{return u(Aa,{visibleItemCount:0,snapAlign:"snap-start",children:u("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=N("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return p("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?u("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:u(je,{size:"text-xl",font:"font-light",children:n.data})}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${fh(a,t)}px)`},children:a?.map(((e,l)=>p("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?u(je,{size:"text-xl",children:e.data}):null,e?.cols?bh(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),vh=g((({activeTabIndex:e,items:t})=>u("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return p("div",{className:"w-full @container",children:[u("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:u(je,{size:"text-xl",align:"text-left",children:t.title})}),u("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:u("div",{className:"relative",children:u(yh,{rows:t.rowsData})})})]},n)}))}))),Nh=(e=!1)=>""+(e?"text-white":"text-secondary-text"),wh=g((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>u("div",{className:N("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:u(je,{size:"text-xl",font:"font-light",color:Nh(t===l),children:e||t+1})},e)))}):null,t?u(be,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:u(X,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function kh(e){const t=await fetch(e);return await t.json()}const Sh=g((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:n}=function(e){const{data:t}=ul(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),kh);return t||{}}(e),[a,i]=o(0),r=d((e=>i(e)),[]),s=n?.[a]?.items??[],c=n?.map((e=>e.currency??""));return p("div",n?{className:"bg-white z-10",children:[u(wh,{currencies:c,activeTabIndex:a,setActiveTabIndex:r,linkToPDF:t}),u(vh,{activeTabIndex:a,items:s}),u(hh,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[u(je,{size:"text-h6",children:"Данных нет"}),u(hh,{onClick:l,isOpen:!0})]})})),Ch=g((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:N("@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?u("div",{className:"origin-top animate-expansion",children:u(Sh,{...t,onClick:l})}):null]}))),Ih=g((({row:{header:e,data:t},activeIndex:l,rowIdx:n,...a})=>{const[i,r]=o(void 0),s=d((e=>r(e)),[]),[c,m]=o(void 0),h=d((e=>m(e)),[]);return p(Ch,{onHideContentClick:()=>r(void 0),tableInner:i,...a,children:[u("div",{className:N("text-s","w-80 flex-shrink-0"),children:p("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?u(ae,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?u(je,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?u(mh,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(xh,{cells:e,rowIdx:n,cellIdx:t,setTableInner:s,tableInner:i,openTableInnerIdx:c,setOpenTableInnerIdx:h,...a},String(t))))}):null]})}));function Th({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?p("div",{children:[l?u(ur,{className:N("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u(ur,{className:N("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Bh=g((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative space-y-xs",children:[e,Th({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Mh=g((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=hr({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(Ih,{row:e,activeIndex:d,rowIdx:t,...r},String(t)))),[g,x]=i>0?[h.slice(0,-i),h.slice(-i)]:[h,[]];return p(k,{className:N("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[u(M,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),u("div",{className:"space-y-m",children:i>0?u(Ja,{renderFoldableSection:({isUnfolded:e})=>p(Bh,{controls:m,children:[g,u(ei,{isUnfolded:e,children:x})]}),renderFoldButton:Er}):u(Bh,{controls:m,children:h})})]})})),Ph=g((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>p(k,{className:N("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?Vh():null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(je,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Rh(l):null,a?u(Ae,{__html:a}):null]})]}))),Vh=()=>u("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"}),Rh=e=>u(T,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),zh=g((({prefix:e,unit:t,suffix:l})=>p("div",{className:"w-full flex items-end",children:[e?u("div",{className:"gradient-color-text",children:u(je,{size:"text-h2",children:e})}):null,t?u("div",{className:"-mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?u("div",{className:"gradient-color-text",children:u(je,{size:"text-h2",children:l})}):null]}))),Ah=g((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return u(k,{defaultPadding:"p-0",...a,children:u(zh,{prefix:t,unit:l,suffix:n})})})),Dh={AdTile:Ct,ApplicationForm:wa,BenefitsBlock:Ba,BonusBenefitsBlock:Ya,ButtonsBlock:Za,Calculator:lr,CardTransfer:mr,Carousel:Br,CarouselBankHistoryCard:Mr,CarouselCard:Rr,CarouselCatalogCard:Ar,CarouselLinks:Or,CarouselRecommendationCard:Gr,CarouselTariffsCard:Yr,ComparisonTable:ss,DepositFiltration:Vs,ErrorBlock:zs,ExchangeRateTile:ao,Footer:ko,Header:jo,Headline:M,HorizontalLayout:Lo,ImgBlock:Oo,LinkDocs:Wo,MobileAppTile:qo,MortgageFiltration:gc,OfficesAtmsMap:bd,Placeholder:kd,ProductBlock:St,ProductGallery:Sd,RepresentativeOfficeInfo:Cd,RichTextBlock:Bd,RollupItem:oo,SafeDepositRental:Xd,StepsBlock:tm,StickyBottomMenu:qm,Tabs:eh,TabsLayout:rh,TariffsTable:Mh,TextBlock:Ph,UnitBlock:Ah,VerticalLayout:Eo},jh="cookie",Fh=g((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=xl();km((()=>{globalThis.localStorage?.getItem(jh)||n()}),[],3e3);const i=d((()=>{globalThis.localStorage?.setItem(jh,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[u("div",{className:"sm:flex-1",children:p(T,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(Ur,{isRemote:!0,className:Eh(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(Ur,{isRemote:!0,className:Eh(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(hm,{className:"bg-main-gray rounded-md",onClose:i})})]})}):null})),Eh=e=>N("inline mx-2xs",e?"text-green-dark":""),Lh=g((()=>{const e=d((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=d((e=>{e?.onClose&&e.onClose()}),[]),l=mm({onCloseAll:e,onClose:t}),{close:n}=me(),a=d((({key:e})=>{"Escape"===e&&n()}),[]);return bl(globalThis.document,"keydown",a),c((()=>{l.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"))}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:N("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Oh=g((()=>{const[e,t]=o(null),l=d((()=>{t(null)}),[]);c((()=>y.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Qd(e)}}))),[]);const n=d((({key:e})=>{"Escape"===e&&l()}),[l]);return bl(globalThis.document,"keydown",n),e?u("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),$h="header",_h="footer",Uh="sticky-footer",Hh={},Wh=g((({className:e,data:t=Hh,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,...r}=t,s={key:"",page:{slots:a,blocks:i,...wt(r)},blocksRegistry:l,blockDecorator:n,parent:t};return p("div",{"data-theme":t.colorPalette||"pc",children:[p("section",{className:N("@container relative",t.style,e),children:[a?.header?.length?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:A(a?.header,{...s,slotName:$h})}):null,p("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[D({block:t,options:s,extraProps:{className:"scroll-mt-12"}}),A(a?.footer,{...s,slotName:_h})]})]}),a?.["sticky-footer"]?.length?u("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:A(a?.["sticky-footer"],{...s,slotName:Uh})}):null,u(Lh,{}),u(Oh,{}),u(Fh,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Object.assign(Wh,{childrenTypes:[],slots:()=>[$h,_h,Uh]});e.Blocks=Dh,e.ContentPage=Wh,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))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=he,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.14.165",e.projectSettings=E,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{r=e},e.url=U,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 l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("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,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},h=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),u=d((({children:e})=>h?e:null));const p=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{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}};function g(){return g._impl()}g._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),g.setup=e=>{g._impl=e};const x=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),f={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","":""},b=d((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:i="p-xl",padding:r,block:s,tag:c="section",role:d,children:m,style:h})=>{const u=c,b=g(),[y,v]=n(!1);a((()=>p.subscribe("tab",(e=>{e.groupName&&e.groupName!==s?.labelGroup||v(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s,b]);const N=t&&l;return o(u,{className:x("@container font-sans",N?"group":"",f[t],y?"hidden":"",r||i,e),...N?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:d,style:h,children:m})})),y={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},v={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:l="h3",title:n,children:a})=>{const i=y[l]||"h3";return o(i,{className:x("font-sans m-0",v[t],e),children:n||a})})),w=d((({children:e,...t})=>o("p",{className:x("font-sans",Object.values(t)),children:e}))),k={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"}},S=d((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=k[l],u={marginTop:h.descriptionStyle};return c(b,{className:x(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[n?o(N,{className:x("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:n}):null,a?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...u,children:a}):null]})})),C=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),I=[];function T(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=C,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:x(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return d?o(d,{className:i,block:e,options:t,...r,...n},a):null}},a)}const B=[],M=(e,{key:t,ancestors:l=B,slotName:n=null,extraProps:a,renderProps:i=T,...r})=>{const s=a?(e,t)=>T(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||B,[r.parent,n]]:l},a)))};function P({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?M(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const V=e=>e&&!e.endsWith("/")?`${e}/`:e,R=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return R.includes(t)?V(l):l}}),A=e=>Boolean(e?.includes(":")),D=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),j=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),F=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var E=Object.freeze({__proto__:null,isURL:A,isLocalURL:D,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:j,joinPath:F});const L="/api/",O=`${L}v1/storage`,$=e=>(t,l=z.BASE_PATH)=>{if(!t||A(t)||[z.CDN,L].some((e=>_(t,e))))return t;if(/^[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(t))return`${O}/${t}/file`;const n=t.startsWith("/");return F(_(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},_=(e,t)=>t&&e&&e.startsWith(t),U={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},H=d((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const d=g(),m="normal"===i?`${l}.svg`:`sprites.svg#${l}`,h=$(d)(F(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:W(e,s)}):o(G,{className:e,children:c("svg",{className:x(K(r),U[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,n?o("desc",{children:n}):null,o("use",{href:h,xlinkHref:h})]})})})),W=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},K=e=>e?"":"w-full h-full",G=d((({className:e,children:t})=>e?o("div",{className:e,children:t}):t)),X=(e,t)=>l=>l&&!A(l)?$(e)(F(t,l)):l,Y=(e,t)=>e?.media&&t?.media?e.media-t.media:0,q=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=g();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Y).map((({src:e,format:l,media:i},r)=>o("source",{srcSet:X(a,n)(e),type:Z(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?Q({...t,src:X(a,n)(t.src)},l):null]})})),Q=(e,t="")=>o("img",{src:e.src,className:x("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}),Z=e=>e?`image/${String(e)}`:void 0,J=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?o(H,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):o(q,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),ee={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","":""},te="bg-main-divider text-main-disabled",le={primary:te,secondary:te,white:te,link:"",transparent:"",gray:te,"":""},ne="text-center font-sans select-none",ae={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","":""},ie=({className:e,rounded:t,version:l})=>[ne,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?ee[l]:"",t?"rounded-full":"rounded-md",e].join(" "),re=()=>({open:(e,t={})=>p.fire("dialog",{type:"open",dialog:e,...t}),close:()=>p.fire("dialog",{type:"close"}),closeAll:()=>p.fire("dialog",{type:"close",all:!0})}),se=(e,t)=>se._impl(e,t);function oe(e={}){const{isRemote:t,basePath:l}=e,n=g(),{closeAll:a}=re();return e=>({...e,href:t&&!l?e.href:$(n)(e.href,l),"aria-label":e.text,onClick:se(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&D(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}se._impl=e=>e,se.setup=e=>{se._impl=e};const ce=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=me(e)?"hidden lg:block":"";return c("div",{className:x(de(e),"flex gap-xs"),children:[n?o("div",{className:x(r,ae[i]),children:n}):null,me(e)?c("div",{className:"whitespace-pre",children:[l?o("div",{className:"text-xs font-light text-left",children:l}):null,o("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:x(r,ae[i]),children:a}):null]})})),de=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return x("group/btn items-center justify-center",me(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},me=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),he=({className:e,rounded:t,version:l})=>["inline-block",ne,l?le[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ue=d((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=oe()({onClick:r,href:n,...a}),c=t??o(ce,{...s});return o(e?ge:pe,{...s,children:c})})),pe=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:c})=>o("a",{className:ie({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:c}))),ge=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:he({className:e,rounded:n,version:l}),children:a})));function xe(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return c("div",{className:"hidden sm:flex items-center gap-s",children:[o("div",{className:ie({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:o(J,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),o(ue,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const fe={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},be=d((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:r="",buttons:s,leftImage:d,rightImage:m,imageAlign:h,isImageAlwaysOnRight:u=!1,isImageSecondary:p=!1,backwardButton:f,children:b,...y})=>{const v=g(),N=i((e=>{e?.preventDefault(),v.back()}),[]);return c("div",{className:ye(n,l,e),children:[f?xe(t,N):null,a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:x("grow relative flex flex-col @xl:flex-row gap-3xl w-full",d?"self-start @xl:w-auto":""),children:[Se(d,{imageAlign:h,className:"mx-auto"}),c("div",{className:x("grid gap-3xl",m?"@xl:grid-cols-2":"",d?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[r,b]}),ke(P({...y,extraProps:{className:"@container-normal"}})),Se(m,{className:x("@xl:justify-self-end @xl:col-start-2",s?ve(u):"",Ne(u),Ce(p)),imageAlign:h}),we(s)]})]})]})})),ye=(e="",t="",l="")=>x("relative flex flex-col gap-3xl overflow-hidden",e||t,l),ve=e=>e?"row-span-2":"@xl:row-span-2",Ne=e=>e?"col-start-2 self-center":"",we=e=>e?o("div",{className:"self-end",children:e}):null,ke=e=>e&&e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Se=(e,{className:t,imageAlign:l})=>e?o("div",{className:x("shrink-1/2 justify-self-center",l&&fe[l],t),children:e}):null,Ce=e=>e?"hidden @xl:block":"",Ie=(e=[])=>e.reduce(((e,t)=>e+t),0),Te=(e=[])=>e?.length?Ie(e)/e.length:0,Be=(e,t="normal")=>e?o("div",{className:x("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(J,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Me=d((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:x(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Pe=(e,t)=>e?o(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ve=d((({children:e,...t})=>o("span",{className:x("font-sans",Object.values(t)),children:e}))),Re=(e,t)=>e?o(Ve,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,ze=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?o(Me,{...e},`rte-${t}`):["label"in e?Re(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Pe(e.description,t)},String(t)):null],Ae=d((({className:e,benefitsVersion:t,...l})=>c("div",{className:x("flex gap-m min-w-56 items-center",e),children:["icon"in l?Be(l.icon,t):null,o("div",{children:ze(l)})]}))),De=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),je=e=>{return((t=e.map(De))?.length?Math.sqrt(Math.abs(Te(t.map((e=>e**2)))-Te(t)**2)):0)>16;var t},Fe=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Ee=e=>!e.some(Fe),Le=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:x("flex gap-x-m gap-y-s",je(l)||Ee(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>o(Ae,{benefitsVersion:t,...e},String(l))))}):null)),Oe=d((({className:e,benefits:t})=>t?.length?o("div",{className:x("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(ze)}):null)),$e=d((({isTabularBenefits:e,...t})=>o(e?Oe:Le,{...t}))),_e=e=>Boolean(e?.src||e?.icon),Ue=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:x("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map(He(l))}):null,He=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=We(a,r),d=We(i,r);return n||a?.icon?o(ue,{className:x("basis-full @lg:basis-auto",e),appendLeft:Ke({...a,iconVersion:c}),appendRight:Ke({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},We=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Ke=e=>_e(e)?o(J,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Ge=d((({className:e,isDotted:t,dotClassName:l,children:n})=>c("div",{className:x("font-sans flex",e),role:"listitem",children:[t?o("div",{className:"shrink-0",children:o("div",{className:x("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,o("span",{children:n})]}))),Xe={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},Ye=d((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=Xe[n];return l?.length?o("section",{className:x("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>o(Ge,{isDotted:t,dotClassName:x(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),qe=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),Qe=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",children:e.map(Ze)}):null)),Ze=({label:e,amount:t})=>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",children:[o(Ve,{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:[qe(2)(t)," ₽"]}):null]}),Je=d((({className:e,tags:t})=>t?.length?o("div",{className:x("flex flex-wrap gap-xs",e),role:"list",children:t.map(et)}):null)),et=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ve,{size:"text-m",font:"font-light",children:e})},String(t)),tt={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},lt=d((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,benefits:m,__html:h,isFullWidthTitle:u,items:p,isDotted:g=!0,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:C,children:I,...T})=>{const B=y?.src?o(J,{image:y}):null,M=o(S,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),P=m?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return o(be,{className:e,padding:t,defaultPadding:l,...u?{title:M}:{insetTitle:M},...nt(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ue(b),backwardButton:C,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o($e,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,h?o(Me,{__html:h}):null,p?.length?o(Ye,{items:p,isDotted:g,listItemSize:tt[i]}):null,I,x?.length?o(Qe,{priceList:x}):null,at(f)]})})})),nt=(e,t)=>t?{rightImage:e}:{leftImage:e},at=e=>e?.length?o(Je,{tags:e}):null,it=e=>Boolean(e&&Array.isArray(e)),rt=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),st=(e,t)=>{return l=e,Boolean(rt(l)&&"string"==typeof l.$ref)?t.ref(e):rt(e)?t.record(e):it(e)?t.array(e):t.scalar?t.scalar(e):e;var l},ot=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(ct,e),ct=(e,t)=>e&&t?rt(e)?e[t]:it(e)?e[parseInt(t,10)]:e:e,dt=(e,t)=>st(e,{ref:({$ref:e,...l})=>dt(e?ot(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:dt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>dt(e,t)))}),mt=(e,t,l=[])=>{st(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)mt(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)mt(e[n],t,[...l,n])}})};async function ht(e,t){try{return e?await ut(e,t):null}catch(e){console.error(e)}return null}const ut=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),pt=e=>[...new Set(e)],gt={},xt=["/portal-resources"],ft=(e,t)=>{const l=(e=>{const t=[];return mt(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(pt(e).filter((e=>!xt.some((t=>e.startsWith(t))))).map((async e=>[e,gt[e]||=await ut(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?dt(e,(e=>i[e]||t?.[e])):e};function bt(e,t={}){const l=d((t=>{const l=ft((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...l})}));return Object.assign(l,t),l}const yt=bt((({className:e,padding:t,...l})=>o(b,{className:x("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(lt,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),vt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>Nt(0,t?.length)),[t]),n=t?.[l];return n?o(u,{children:o(yt,{...n,...e})}):null})),Nt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),wt=e=>e?.replace(/[^+\d]/g,"");const kt=e=>e&&"+7 ("!==e?{secondaryPhoneNumber:wt(e)}:{},St=e=>e,Ct=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[a,r]=n(e),[o,c]=n(!1),[d,m]=n({}),h=s({}),u=i(((e,t)=>{const{parse:l=St,format:n=St}=t||{};return h.current||(h.current={}),h.current[e]||=t=>{r((n=>({...n,[e]:l(t)}))),m((t=>({...t,[e]:!0})))},{value:n(a[e]),isDirty:o||d[e],onChange:h.current[e]}}),[a,o,d]),p=i((e=>{r(e),m(e)}),[]),g=i((()=>{r(e),c(!1),m({})}),[e]),x=i((e=>{e.preventDefault(),t?g():c(!0),l&&l(a)}),[l,a]);return[a,{isDirty:o||Object.values(d).some(Boolean),field:u,update:p,reset:g,onSubmit:x}]},It=d((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>c("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[o("div",{className:x("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:x("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Ve,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Tt=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],Bt=e=>!e?.length,Mt=e=>t=>l=>e(l)?[]:[t],Pt=d((({text:e,link:t})=>c(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[o(Ve,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?o(ue,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:o(Ve,{children:t.text})}):null]}))),Vt="container space-y-lg",Rt="w-full max-w-xl space-y-s m-auto",zt=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},At=d((({title:e,children:t})=>c("fieldset",{className:"grid @xl:flex @xl:justify-between gap-lg border-b border-b-main-divider @xl:border-none",children:[e?o("legend",{className:"w-full",children:o(N,{title:e,headingType:"h6",className:"@xl:text-center"})}):null,t]}))),Dt="@xl:w-1/2 space-y-s",jt=d((({key:e,className:t="",id:l,name:n,type:r="text",label:d,placeholder:m,value:h="",valid:u=!0,children:p,onChange:g,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{g&&g(e.target?.value||"")}),[g]);a((()=>{v&&w.current?.focus()}),[v,w]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=p?"pr-3xl":"",I=Et(u);return c("div",{className:x("relative",t),children:[c("label",{children:[d?Ft(d):null,N?o("textarea",{className:x("block resize-y min-h-24",S,I),id:x("textarea",l),name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:x("h-14",S,C,I),ref:w,id:l,name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b,pattern:y},e)]}),p]})})),Ft=e=>o("div",{className:"mb-xs",children:o(Ve,{size:"text-m",font:"font-light",children:e})}),Et=e=>e?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error",Lt=e=>o("div",{className:"h-4",children:e?o(Ve,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Ot=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,...d})=>c("div",{className:x("shrink-0 w-full",e),children:[o(jt,{type:"text","aria-label":t,label:t&&d?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:d?.errors&&!t?`${n}*`:n}),Lt(a)]}))),$t=e=>"_"===e,_t=e=>/\d/.test(e),Ut=e=>$t(e)||_t(e),Ht=[..."+7 (___) ___-__-__"],Wt=Ht.findIndex($t),Kt=Ht.map(((e,t)=>Ut(e)?Ht.slice(0,t).filter(Ut).length:-1));const Gt=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Ht.map(((e,l)=>_t(e)?e:t.charAt(Kt[l])||e)),n=Kt.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Wt,n)):l).join("")}(e))),[t]);return o(jt,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Xt=d((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>c("div",{className:x("shrink-0 w-full",e),children:[o(Gt,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Lt(n)]}))),Yt="Некорректно заполненное поле",qt=Mt((e=>null!=e&&""!==e))(Yt),Qt=Mt((e=>"string"==typeof e&&e.length>1))(Yt),Zt=Mt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Yt),Jt=(el=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Mt((e=>"string"==typeof e&&el.test(e))))(Yt);var el;const tl=Mt((e=>"boolean"==typeof e&&e))(Yt),ll=(e,t)=>c(At,{title:t,children:[c("div",{className:Dt,children:[o(Ot,{label:"Наименование организации",...zt(e("fullName"),qt)}),o(Ot,{label:"Контактное лицо",...zt(e("name"),Qt)})]}),c("div",{className:Dt,children:[o(Ot,{label:"ИНН",...zt(e("inn"),Zt)}),o(Xt,{label:"Телефон",...zt(e("phone"),Jt)})]})]}),nl=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],al=e=>null!=e,il=new Map,rl=e=>Boolean(e?.every((e=>Array.isArray(e)?rl(e):!e||"string"==typeof e))),sl=e=>rl(e)?e.toString():"";function ol(e,t,{fallback:l,cache:i}={}){const s=r((()=>cl(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(al))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=il)=>l=>{const n=sl(l),a=t.get(n);if(n&&al(a))return a;const i=e(...l);return n&&al(i)&&t.set(n,Promise.resolve(i)),i})(t,i)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function cl(e){return Array.isArray(e)?e:e instanceof Function?cl(e()):[e]}function dl(){const{data:e}=ol("/api/v1/regions",ut);return e||[]}function ml(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const hl=e=>e?.text||e?.key||"";function ul(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function pl(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return ul(globalThis.document,"click",l),t}const gl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,xl=d((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:gl(t,n).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:hl(e)}),o(H,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:x("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function fl({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>p.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>p.fire("popup",{type:"update",popup:e,...t}),close:()=>p.fire("popup",{type:"close"})},h=i((()=>{m.close(),c&&c()}),[c]),u=i((e=>{h(),r&&r(e)}),[h,r]),g=s(null),x=pl(h);return a((()=>{if(!e||!g.current)return;const a=g.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(xl,{popupRef:x,options:t,value:l,query:n,onChange:u,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,l,n,u]),g}const bl=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:h,onChange:u})=>{const[p,{setFalse:g,setTrue:f}]=ml(),[b,y]=n(""),v=i((()=>{y(""),g()}),[]),N=fl({isOpen:p,options:l,value:a,query:b,onChange:u,onClose:v,iconVersion:h});return c("div",{className:e,children:[yl(t),c("div",{className:x("relative",p?"z-20":"z-10"),ref:N,children:[c("div",{className:x("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",Nl(s,r)),onClick:p?v:f,children:[o("p",{className:"p-m pr-8 flex items-center overflow-hidden text-ellipsis",children:hl(a)||d}),vl(p,h)]}),m&&p?o("div",{className:x("absolute top-0 w-full z-20"),children:o(jt,{type:"text",autoFocus:!0,value:b,onChange:y})}):null]})]})})),yl=e=>e?o("div",{className:"mb-xs",children:o(Ve,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,vl=(e,t)=>o(H,{className:x("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Nl=(e,t)=>x(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),wl=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(bl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),Lt(l)]}))),kl=d((({field:e})=>{const t=dl();return o(wl,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...zt(e("region"),qt)})})),Sl=({field:e,title:t})=>c(At,{title:t,children:[o("div",{className:Dt,children:o(wl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:nl,...zt(e("acquiringType"),qt)})}),o("div",{className:Dt,children:o(kl,{field:e})})]});function Cl({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const Il={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"},Tl={primary:x("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:x("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")},Bl=d((({children:e,...t})=>{const l=e=>({...e,onClick:se(Cl(e),e)}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=l(t);return o("button",{className:x("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":x(Il[a],Tl[a]),c?"rounded-md":"",n),type:s,role:d,onClick:m,children:e})})),Ml=(e,t)=>o(Bl,{className:x("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Pl={typeForm:{key:"acqr",text:"Предупреждение о мошенничестве"},acquiringType:{key:"trade",text:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},Vl=Tt({acquiringType:qt,region:qt,fullName:qt,inn:Zt,name:Qt,phone:Jt}),Rl=d((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:a,...i}=e,r=zl(t?.key),s={partnerComments:`Вид эквайринга=${t?.text||""}${r?`/Онлайн касса=${l}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`,...i};Bt(Vl(e))&&n(s,!1)}),[n]),[,{field:r,...s}]=Ct(Pl,{onSubmit:a}),d=zl(r("acquiringType").value?.key);return c("form",{className:Vt,onSubmit:s.onSubmit,children:[Sl({field:r,title:"Вид эквайринга и регион"}),ll(r,"Данные организации"),d?c("div",{children:[o(It,{text:"Хочу купить онлайн-кассу",...r("onlineCheckout")}),o(It,{text:"Хочу купить POS-терминал",...r("posTerminal")})]}):null,Ml(t),o(Pt,{link:l})]})})),zl=e=>"all"===e||"trade"===e,Al=d((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),Dl=[{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"}],jl=d((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Al,{paths:Dl,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:"flex items-center relative cursor-pointer group/box",onClick:s,children:[o("div",{className:x("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Fl(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?d:null,l?o("div",{className:"ml-s",children:o(Ve,{size:"text-l",font:"font-light",children:l})}):null]})})})),Fl=e=>x("rounded border",e?"bg-primary-main":""),El=d((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>c("div",{className:x("shrink-0 w-full",e),children:[o(jl,{text:t,value:l,disabled:a,onChange:r},n),Lt(i)]}))),Ll=(e,t,l)=>c("div",{className:"flex gap-m flex-col lg:flex-row w-full justify-between items-baseline",children:[c("div",{children:[c("div",{className:"flex gap-3",children:[o(jl,{...e}),o(Pt,{text:"Согласен с ",link:t})]}),Lt(zt(e,tl).error)]}),Ml(l)]}),Ol=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},$l=()=>{},_l=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,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>l)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,n,d),l=Ul(t,e),c=Hl(t,i,r);h.push(o("td",{children:o("div",{className:Wl(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},Ul=(e,t)=>t&&e.toDateString()===t.toDateString(),Hl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Wl=(e,t)=>x("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Kl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Gl=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=$l})=>{const d=i((e=>s(e)),[]),{firstDayOfWeek:m,totalDays:h}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Kl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:_l({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),Xl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Yl=Xl.map((e=>({key:e}))),ql=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Ql={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Zl={className:"min-w-32",iconVersion:"black",isBorder:!1},Jl=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=ml(!1),[u,p]=n(l?.getMonth()||(new Date).getMonth()),[g,f]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=pl(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Xl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Yl,yearsOptions:ql,ref:s}})({onYearSelect:f,onMonthSelect:p,onShowCalendar:h,selectedYear:g,selectedMonth:u,showCalendar:m});return c("div",{className:x(e,"relative"),ref:C,children:[o(Ve,{size:"text-m","font-weight":"font-light",children:t}),en(S,l,a),m?c("div",{className:"absolute bg-white z-20 select-none",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(H,{...Ql,className:"-rotate-90 cursor-pointer"})}),o(bl,{onChange:v,value:{key:Xl[u]},options:w,...Zl}),o(bl,{onChange:N,value:{key:String(g)},options:k,...Zl}),o("div",{className:"my-auto",onClick:y,children:o(H,{...Ql,className:"rotate-90 cursor-pointer"})})]}),o(Gl,{today:l,currentMonth:u,currentYear:g,onDateSelect:d,min:r,max:s})]}):null]})})),en=(e,t,l)=>c("div",{onClick:e,className:x("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",l?"border-gray":"border-error"),children:[o(w,{children:t&&Ol(t)}),o(H,{...Ql,name:"CalendarIcon"})]}),tn=d((({className:e,label:t,value:l,error:n,onChange:a,...i})=>c("div",{className:x("shrink-0 w-full",e),children:[t?o("div",{className:"mb-xs",children:o(Ve,{size:"text-m",font:"font-light",children:i?.errors?`${t}*`:t})}):null,o(Jl,{value:l,onChange:a,valid:Boolean(!n)}),Lt(n)]}))),ln={surname:"",name:"",middleName:""},nn=(e,t=!0)=>c("div",{className:"space-y-s",children:[o(Ot,{label:"Фамилия",...zt(e("surname"),Qt)}),o(Ot,{label:"Имя",...zt(e("name"),Qt)}),o(Ot,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),t?o(tn,{label:"Дата рождения",...zt(e("birthday"),qt)}):null]}),an={...ln,typeForm:{key:"ANTIFRAUD",text:"Предупреждение о мошенничестве"},phone:"",birthday:void 0,isClient:!1,comment:"",consentDataProcessing:!1},rn=Tt({typeForm:qt,surname:qt,name:Qt,birthday:qt,phone:Jt,comment:qt,consentDataProcessing:tl}),sn=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{Bt(rn(e))&&l(e,!0)}),[l]),[,{field:a,...r}]=Ct(an,{onSubmit:n});return o("form",{className:Vt,onSubmit:r.onSubmit,children:o(At,{children:c("div",{className:Rt,children:[nn(a,!0),o(Xt,{label:"Телефон",...zt(a("phone"),Jt)}),o(El,{...a("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}),o(Ot,{...zt(a("comment"),qt),placeholder:"Комментарий",isTextarea:!0}),Ll(a("consentDataProcessing"),t,e)]})})})})),on={typeForm:{key:"bcrd",text:"Заявка на бизнес-карту"},name:"",phone:"",inn:"",email:""},cn=Tt({region:qt,name:Qt,phone:Jt,inn:Zt,email:qt}),dn=d((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{Bt(cn(e))&&n(e)}),[n]),[,{field:r,...s}]=Ct(on,{onSubmit:a});return c("form",{className:Vt,onSubmit:s.onSubmit,children:[o(kl,{field:r}),c(At,{children:[c("div",{className:Dt,children:[o(Ot,{label:"Контактное лицо",...zt(r("name"),Qt)}),o(Ot,{label:"ИНН",...zt(r("inn"),Zt)})]}),c("div",{className:Dt,children:[o(Xt,{label:"Телефон",...zt(r("phone"),Jt)}),o(Ot,{label:"Электронная почта",...zt(r("email"),qt)})]})]}),Ml(t),o(Pt,{link:l})]})})),mn={typeForm:{key:"CORRUPTION",text:"Факты коррупции"},...ln,phone:"",email:"",comment:"",consentDataProcessing:!1},hn=Tt({typeForm:qt,surname:qt,name:Qt,region:qt,phone:Jt,email:qt,comment:qt,consentDataProcessing:tl}),un=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{Bt(hn(e))&&l(e,!0)}),[l]),[,{field:a,...r}]=Ct(mn,{onSubmit:n});return o("form",{className:Vt,onSubmit:r.onSubmit,children:o(At,{children:c("div",{className:Rt,children:[nn(a,!1),o(kl,{field:a}),o(Xt,{label:"Телефон",...zt(a("phone"),Jt)}),o(Ot,{label:"Электронная почта",...zt(a("email"),qt)}),o(Ot,{...zt(a("comment"),qt),placeholder:"Ваше сообщение",isTextarea:!0}),Ll(a("consentDataProcessing"),t,e)]})})})})),pn=[];const gn=async e=>await ht(e,{method:"GET"})||pn;function xn(){const{data:e}=ol("/api/v1/premiumBranchesByRegions",ut);return e||[]}const fn=d((({field:e,regionKey:t,isPremium:l=!1})=>{const n=l?xn().find((e=>e?.region===t))?.branches:function(e){const{data:t}=ol(e?`/api/v1/branches?regionCode=${e}`:null,gn);return t||pn}(t).filter((e=>e?.address));return o(wl,{label:"Адрес",placeholder:"Выберите адрес",options:(n||[]).map((({address:e=""})=>({key:e,text:e}))),...zt(e("addressBranch"),qt)})})),bn=["От 1 000 ₽","До 1 000 000 000 ₽"],yn=["От 1 мес","До 15 лет"],vn=(e,t)=>c(At,{title:t,children:[c("div",{className:Dt,children:[o(Ot,{label:"Наименование организации",...zt(e("fullName"),qt)}),o(Ot,{label:"ИНН",...zt(e("inn"),Zt)}),o(Xt,{label:"Телефон",...zt(e("phone"),Jt)})]}),c("div",{className:Dt,children:[o(Ot,{label:"Годовая выручка, ₽",...zt(e("annualRevenue"),qt)}),o(Ot,{label:"Контактное лицо",...zt(e("name"),Qt)}),o(Ot,{label:"Электронная почта",...zt(e("email"),qt)})]})]}),Nn=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},wn=(e,t,l)=>Math.max(t,Math.min(e,l));function kn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function Sn({list:e=[],min:t,max:l,step:n,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)/(l-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:x("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:l,step:n,value:s,disabled:i,onInput:t=>{const l=kn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const Cn=1,In=100,Tn=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:Cn),max:s=(a.length?a.length-1:In),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:u}=e,p=Nn(e,{normalize:(e=0)=>a.length?Bn(a)(e):wn(e,r,s),format:qe()}),g=i((e=>{u&&u(kn(e.target?.value))}),[u]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(Ve,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,o("input",{className:x("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:h,onInput:g,...p}),Sn({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:u})]}),Mn(n)]})})),Bn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),Mn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ve,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Pn=(e,t)=>c(At,{title:t,children:[o("div",{className:Dt,children:o(Tn,{title:"Сумма, ₽",items:bn,min:1e3,max:1e9,...e("amount")})}),o("div",{className:Dt,children:o(Tn,{title:"Срок, месяцев",items:yn,min:1,max:180,...e("term")})})]}),Vn={typeForm:{key:"cred",text:"Кредит"},amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",email:"",annualRevenue:""},Rn=Tt({fullName:qt,annualRevenue:qt,inn:Zt,name:Qt,phone:Jt,region:qt}),zn=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,addressBranch:a,annualRevenue:i,...r}=e;Bt(Rn(e))&&l({...r,addressBranch:a?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${i}`})}),[l]),[a,{field:r,...s}]=Ct(Vn,{onSubmit:n});return c("form",{className:Vt,onSubmit:s.onSubmit,children:[Pn(r,"Параметры"),vn(r,"Данные организации"),c(At,{title:"Офис банка",children:[o("div",{className:Dt,children:o(kl,{field:r})}),o("div",{className:Dt,children:o(fn,{field:r,regionKey:a.region?.key})})]}),Ml(e),o(Pt,{link:t})]})})),An={typeForm:{key:"dpst",text:"Заявка на депозит"},name:"",phone:""},Dn=Tt({name:Qt,phone:Jt}),jn=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{Bt(Dn(e))&&l(e)}),[l]),[,{field:a,...r}]=Ct(An,{onSubmit:n,resetOnSubmit:!1});return o("form",{className:Vt,onSubmit:r.onSubmit,children:o(At,{title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",children:c("div",{className:Rt,children:[o(Ot,{label:"Имя",...zt(a("name"),Qt)}),o(Xt,{label:"Телефон",...zt(a("phone"),Jt)}),Ml(e),o(Pt,{link:t})]})})})})),Fn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],En=[{key:"phone",text:"Телефонный звонок"},{key:"mail",text:"Электронное сообщение"}],Ln=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],On={typeForm:qt,region:qt,surname:qt,name:Qt,feedbackMethod:qt,phone:Jt,email:qt,comment:qt,consentDataProcessing:tl},$n={...ln,typeForm:{key:"FEEDBACK",text:"Задать вопрос по продуктам и услугам"},serviceDirection:{key:"Физическое лицо"},birthday:void 0,feedbackMethod:{key:"Телефонный звонок"},phone:"",email:"",comment:"",consentDataProcessing:!1},_n=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{Un(e.typeForm.key,e.serviceDirection?.key)?((e,t)=>{const l=Tt({...On,addressBranch:qt,inn:Zt});Bt(l(e))&&t(e,!1)})(e,l):"FEEDBACK"===e.typeForm.key?((e,t)=>{const l=Tt({...On,birthday:qt});Bt(l(e))&&t(e,!0)})(e,l):((e,t)=>{const l=Tt({...On,addressBranch:qt});Bt(l(e))&&t(e,!0)})(e,l)}),[l]),[a,{field:r,...s}]=Ct($n,{onSubmit:n}),d="FEEDBACK_QS"===r("typeForm").value?.key,m=Un(r("typeForm").value?.key,r("serviceDirection").value?.key);return o("form",{className:Vt,onSubmit:s.onSubmit,children:o(At,{children:c("div",{className:Rt,children:[o(wl,{label:"Тема",placeholder:"Выберите тему",options:Fn,...zt(r("typeForm"),qt)}),d?o(wl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Ln,...zt(r("serviceDirection"),qt)}):null,o(kl,{field:r}),d?o(fn,{field:r,regionKey:a?.region?.key}):null,nn(r,!0),m?c("div",{children:[o(Ot,{label:"ИНН",...zt(r("inn"),Zt)}),o(Ot,{label:"Наименование организации",...r("fullName")})]}):null,o(wl,{label:"Способ получения ответа",options:En,...zt(r("feedbackMethod"),qt)}),o(Xt,{label:"Телефон",...zt(r("phone"),Jt)}),d?c("div",{children:[o(Xt,{label:"Дополнительный телефон",...r("secondaryPhone").value&&"+7 ("!==r("secondaryPhone").value?zt(r("secondaryPhone"),Jt):r("secondaryPhone")}),o(Ot,{label:"Электронная почта",...zt(r("email"),qt)}),o(Ot,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...r("bankEmpolee")}),o(Ot,{label:"Дата и время обращения в Банк",...r("applicationDate")})]}):o(Ot,{label:"Электронная почта",...zt(r("email"),qt)}),o(Ot,{...zt(r("comment"),qt),placeholder:"Ваше сообщение",isTextarea:!0}),Ll(r("consentDataProcessing"),t,e)]})})})})),Un=(e="",t="")=>"FEEDBACK_QS"===e&&"Юридическое лицо / ИП"===t,Hn={},Wn="/wcms-resources";const Kn=d((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=function(e,t={}){const{fallback:l=Hn,pathDir:n=Wn}=t,{data:a}=ol(e?`${n}/${e}.json`:null,ut,{fallback:l});return a||Hn}(l||"regions-grant-support"),[i,r]=n({key:""}),s=ie({className:"text-white",version:t?.version}),d=a?.find((e=>e.name===i.key))?.href;return c("div",{className:"container space-y-s",children:[a?o(wl,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:a.map((({name:e=""})=>({key:e,text:e}))),value:i,onChange:r}):null,d?o("div",{className:"text-center",children:o(ue,{href:d,target:"_blank",className:x("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Gn={...ln,phone:"",email:"",birthday:void 0,consentDataProcessing:!1},Xn=Tt({surname:Qt,name:Qt,phone:Jt,email:qt,birthday:qt,consentDataProcessing:tl}),Yn=d((e=>{const{button:t,link:l,product:n="",onSubmit:a}=e,r=i((e=>{Bt(Xn(e))&&a({...e,product:n},!0)}),[a]),[,{field:s,...d}]=Ct(Gn,{onSubmit:r});return c("form",{className:Vt,onSubmit:d.onSubmit,children:[c(At,{children:[c("div",{className:Dt,children:[o(Ot,{label:"Фамилия",...zt(s("surname"),Qt)}),o(Ot,{label:"Отчество (Обязательно, при наличии)",...s("middleName")}),o(Xt,{label:"Телефон",...zt(s("phone"),Jt)})]}),c("div",{className:Dt,children:[o(Ot,{label:"Имя",...zt(s("name"),Qt)}),o(tn,{label:"Дата рождения",...zt(s("birthday"),qt)}),o(Ot,{label:"Электронная почта",...zt(s("email"),qt)})]})]}),Ll(s("consentDataProcessing"),l,t)]})})),qn={typeForm:{key:"SELFCOLLECTION",text:"Самоинкассация"},fullName:"",phone:"",consentDataProcessing:!1},Qn=Tt({typeForm:qt,region:qt,fullName:qt,phone:Jt}),Zn=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{Bt(Qn(e))&&l(e,!1)}),[l]),[,{field:a,...r}]=Ct(qn,{onSubmit:n});return o("form",{className:Vt,onSubmit:r.onSubmit,children:o(At,{children:c("div",{className:Rt,children:[o(Ot,{label:"ФИО",...zt(a("fullName"),qt)}),o(kl,{field:a}),o(Xt,{label:"Телефон",...zt(a("phone"),Jt)}),Ll(a("consentDataProcessing"),t,e)]})})})})),Jn=d((({field:e})=>{const t=xn().map((({region:e})=>({key:e,text:e})));return o(wl,{label:"Регион",placeholder:"Выберите регион",options:t,...zt(e("region"),qt)})})),ea=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],ta={typeForm:ea[0],...ln,email:"",phone:"",comment:"",consentDataProcessing:!1},la=Tt({typeForm:qt,surname:qt,name:Qt,phone:Jt,email:qt,addressBranch:qt,consentDataProcessing:tl}),na=d((({button:e,link:t,onSubmit:l,defaultType:n="PREMIUMSERVICE"})=>{const a=i((e=>{Bt(la(e))&&l(e,!0)}),[l]),[r,{field:s,...d}]=Ct({...ta,typeForm:aa(n)},{onSubmit:a}),m=r?.region?.key;return c("form",{className:Vt,onSubmit:d.onSubmit,children:[c(At,{title:"Ваши данные",children:[c("div",{className:Dt,children:[o(Ot,{label:"Фамилия",...zt(s("surname"),Qt)}),o(Ot,{label:"Отчество (Обязательно, при наличии)",...s("middleName")}),o(Ot,{label:"Электронная почта",...zt(s("email"),qt)})]}),c("div",{className:Dt,children:[o(Ot,{label:"Имя",...zt(s("name"),Qt)}),o(Xt,{label:"Телефон",...zt(s("phone"),Jt)}),o(wl,{label:"Тип обслуживания",options:ea,...zt(s("typeForm"),qt)})]})]}),c(At,{title:"Офис банка",children:[o("div",{className:Dt,children:o(Jn,{field:s})}),o("div",{className:Dt,children:o(fn,{field:s,regionKey:m,isPremium:!0})})]}),o(Ot,{...s("comment"),placeholder:"Комментарий, удобное время и прочее",isTextarea:!0}),Ll(s("consentDataProcessing"),t,e)]})})),aa=e=>ea.find((t=>t.key===e)),ia=d((({name:e,text:t,value:l,checked:n,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:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?o(Ve,{color:"text-primary-text",children:t}):null]})}))),ra=e=>{const{value:t,onChange:l}=e("vedTypes");return o(At,{children:c("div",{className:"gap-xl grid @xl:flex @xl:items-center",children:[o(ia,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),o(ia,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),o(ia,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),o(ia,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},sa=({field:e})=>{const t="currencyControl"===e("vedTypes").value;return c("div",{className:"space-y-s",children:[t?o(kl,{field:e}):null,c("div",{className:"grid @xl:grid-cols-2 @xl:gap-x-lg gap-s",children:[t?o(Ot,{label:"ИНН",...zt(e("inn"),Zt)}):null,o(Ot,{label:"Наименование организации",...zt(e("fullName"),qt)}),o(Ot,{label:"ФИО",...zt(e("name"),Qt)}),o(Xt,{label:"Телефон",...zt(e("phone"),Jt)}),t?null:o(Ot,{label:"Электронная почта",...e("email")})]})]})},oa={typeForm:{key:"KVED",text:"Заявка на консультацию ВЭД"},vedTypes:"currencyControl",fullName:"",name:"",phone:"",inn:"",email:"",partnerComments:""},ca={fullName:qt,name:Qt,phone:Jt},da=Tt({...ca}),ma=Tt({...ca,inn:Zt,region:qt}),ha=e=>"currencyControl"===e,ua=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),pa={ApplicationFormBusinessCard:dn,ApplicationFormWed:d((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{typeForm:t,fullName:l,name:a,phone:i,email:r,inn:s,region:o,vedTypes:c,partnerComments:d}=e,m={typeForm:t,fullName:l,name:a,phone:i,vedTypes:ua(c),partnerComments:d,...ha(c)?{inn:s,region:o}:{email:r}};Bt((e=>ha(e)?ma:da)(c)(e))&&n(m)}),[n]),[,{field:r,...s}]=Ct(oa,{onSubmit:a});return c("form",{className:"container space-y-lg",onSubmit:s.onSubmit,children:[ra(r),o(N,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),sa({field:r}),o(Ot,{label:"Обращение",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",...r("partnerComments"),isTextarea:!0}),Ml(t),o(Pt,{link:l}),o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex 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(J,{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(J,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:jn,ApplicationFormCredit:zn,ApplicationFormAcquiring:Rl,ApplicationFormGrantSupport:Kn,ApplicationFormIndividuals:Yn,ApplicationFormFeedback:_n,ApplicationFormAntiFraud:sn,ApplicationFormCorruption:un,ApplicationFormSelfCollection:Zn,ApplicationFormUltraPremium:na},ga=d((({responseType:e})=>{const t="OK"===e;return c("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[o(J,{image:{icon:(t?"ResponseOKIcon":"ResponseFailIcon")?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"42",height:"42"}),c("div",{children:[o(N,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),o(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),xa={send:async function(e,t=!1){const l=t?"/api/v1/lead":"/api/v1/sendcorporatelead",{typeForm:n,region:a,phone:i="",email:r,birthday:s,inn:o,fullName:c,addressBranch:d,secondaryPhone:m="",bankEmpolee:h,applicationDate:u,...p}=e,g={typeForm:n,[t?"regionBranch":"region"]:a,[t?"phoneNumber":"phone"]:wt(i),[t?"email":"mail"]:r,...t?{birthday:s}:{inn:o,fullName:c},..."FEEDBACK"===n?{}:{addressBranch:d,bankEmpolee:h,applicationDate:u,...kt(m)},...p};try{const e=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(g)});return e?.ok?await e.json():null}catch(e){return null}}},fa=d((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),d=i((async(e,t=!1)=>{const l=ya(e),n=await xa.send(l,t)?"OK":"Fail";return s(n),n}),[]);return o(b,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?o(N,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?ba(l,d):null,r?o(ga,{responseType:r}):null]})})})),ba=(e,t)=>{const l=e?.formType;if(!l||!(l in pa))return null;return o(pa[l],{...e,onSubmit:t})},ya=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(t?.region?t?.text:t?.key)||t]))),va="text-left",Na={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},wa=d((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:x("rounded-icon object-fit flex justify-center items-center",Na[l],e),children:o(H,{...i,width:"54%",height:"54%",name:a})}):null})),ka=d((({className:e="",title:t,benefitList:l,...n})=>c(b,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(N,{headingType:"h3",as:"h2",className:va,title:t}):null,l?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(Sa)}):null]}))),Sa=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?o(wa,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?o(J,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Ve,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),o(Ye,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Ca=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Ia(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const Ta=d((({className:e,style:t,idx:l,activeIndex:n,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:Ia(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}(i((e=>{e.length&&m&&m(l||0,e[e.length-1])}),[m,l]),c);return o("div",{className:x("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:h,children:d})})),Ba=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],Ma=d((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:u,onVisibleItemsChange:p,onVisibleIndicesChange:g})=>{const f={sensitivity:1,rootRef:l},b=s([]),y=i(((e,t)=>{const l=[...b.current||[]];l[e]=t,b.current=l,p&&p(l),g&&g(Va(l))}),[p,g]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Pa(c,v):{},...N?Ca(h):{},gap:`${r}px`};return o("div",{className:x("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,children:(S=(e,l)=>o(Ta,{className:x(m,a?Ba[a-1]:"",N?"h-full":"",t),style:w?Pa(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(u)});var S})),Pa=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Va=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Ra={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},za={"horizontal-list":"w-6","vertical-list":"h-6"},Aa=d((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?o("div",{className:x("flex gap-xs",Ra[a],i?"group":"",e),"data-ver":i,children:Array.from({length:n}).fill(null).map(((e,n)=>o("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?za[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Da=e=>e,ja=(e=Da)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Fa=ja(),Ea=(e=Da)=>ja((t=>-e(t))),La=Ea(),Oa=e=>t=>e.scrollWidth/t,$a=e=>(t,l)=>{e.scrollBy({left:l*Oa(e)(t),behavior:"smooth"})},_a=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[Ea()(a),ja()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?$a(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?$a(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Ua=d((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=true,minHeight:i,children:r,onVisibleIndicesChange:s,listType:d="horizontal-list"})=>{const m=Array.isArray(r)?r.length:0,[h,u]=_a({itemCount:m,onVisibleIndicesChange:s}),[p]=u.visibleIndicesRange;return c("div",{className:x(e,"vertical-list"===d?"relative h-full":""),children:[o(Ma,{containerRef:h,activeIndex:p,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:u.handleVisibleIndicesChange,listType:d,minHeight:i,children:r}),a?o(Aa,{containerRef:h,activeIndex:p,dotCount:m,listType:d,version:t}):null]})})),Ha=(e,t,l)=>{return o(Ua,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>c("div",{className:x("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?o(Ve,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?o(J,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?o(Ve,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},Wa=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>c(b,{className:x("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[o(S,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Ha(e,0,t):null]}))),Ka={start:"justify-start",center:"justify-center",end:"justify-end"},Ga=d((({buttons:e,className:t="",align:l,...n})=>{const a=l?x("flex",Ka[l]):"";return o(b,{className:x("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Ue(e)})})),Xa=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),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,children:[h,m]}:{className:e,children:[m,h]})}));const Ya=d((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:l})})})),qa=d((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r})=>c("div",{className:x("flex justify-between @xl:flex-col",e),children:[t?o(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,o("div",l?{children:o(Ve,{size:"text-h3",children:[i,qe(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:o(Ve,{size:"text-h3",children:"-"})})]}))),Qa=1e4,Za=5e6,Ja=Math.round(29.5),ei={minSum:Qa,maxSum:Za,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},ti={minSum:Qa,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},li={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ni={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},ai={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},ii=e=>e?o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,ri=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>c("div",{children:[o(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),c("div",{className:"relative",children:[c("div",{className:"flex justify-start gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:qe(n,{fixed:!0})(e)}),l?o("span",{className:"text-7xl",children:l}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),si=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s",children:[o(Ve,{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(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),oi=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?o(si,{title:e,...i}):c("div",{children:[o("div",{className:"hidden @xl:block",children:o(ri,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),o("div",{className:"@xl:hidden",children:o(qa,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function ci({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${qe(2)(l.min||0)} ₽`,`До ${qe(2)(l.max||0)} ₽`];return o(Tn,{items:e?n:[],step:t,...l})}function di(e){const{data:t}=ol(`/wcms-resources/${e}.json`,ut);return t}const mi=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=di(t||"bonus-calculator-data")||li,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},hi=d((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=Ct({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:d,maxSumOther:m,monthBonus:h,yearBonus:u}=mi(a,t);return c("section",{className:x("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[c("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[ci({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),ci({title:"Сумма покупок в остальных категориях, ₽",min:d,max:m,step:500,isShowItems:!1,...i("restExpenseValue")})]}),h>=0?oi({title:"Баллов за месяц",rate:h,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,c("div",{className:"flex flex-col gap-y-xl @xl:w-96",children:[u>=0?o(qa,{title:"Баллов за год",value:u}):null,Ue(l,{isVertical:!0}),ii(n)]})]})})),ui=d((({className:e,inputChildren:t,rateChildren:l,resultChildren:n})=>c("section",{className:x("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[o("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:t}),o("div",{className:"border-b border-main-divider md:hidden"}),l,o("div",{className:"flex flex-col gap-2xl sm:w-96 max-w-full",children:n})]}))),pi=(e,t=0)=>e?.sum&&e.sum>=Qa&&e.sum<=Za?e.sum:t,gi=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,xi=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,fi={horizontal:"gap-5xl",vertical:"flex-col gap-s"},bi=d((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>o("div",{className:x(`flex ${fi[a]}`,l),children:e?.map((({id:e,text:l})=>o(jl,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),yi=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>c("div",{className:"space-y-s",children:[t?o("div",{className:"hidden @5xl:block",children:o(Ve,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",children:o(Ve,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(bi,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:x("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),vi=e=>yi({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Ni=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:wi([e,t],n),wi=([e,t],l=[])=>({[e]:l.length?La(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Fa(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ki=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Si=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ci=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},Ii=d((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r})=>{const[s,{field:d}]=Ct({moneyValue:pi(r,1e5),daysValue:gi(r,90),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),m=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=di(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...ai,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&Si(o,e)&&ki(n,["minSum","maxSum"],e)&&ki(l,["minDays","maxDays"],e)))||ai,{rate:m}=d,h=Ci(m,e),u=n+h,p=s?.rateRows||[ai];return{...d,...wi(["minSum","maxSum"],p),...wi(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(s,t?.rateType&&t.sourceBookDir),{income:h,finalSum:u,rate:p,isUnavailableByTerm:g,depositeName:x}=m;return o(ui,{className:e,inputChildren:c("div",{children:[ci({title:"Сумма, ₽",min:m.minSum,max:m.maxSum,...d("moneyValue"),value:m.moneyValue}),(f={title:"Срок, дней",min:m.minDays,max:m.maxDays,...d("daysValue"),value:m.daysValue},o(Tn,{items:[`От ${xi(f.min||0)}`,`До ${xi(f.max||0)}`],step:1,...f})),c("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[Ti(m,d),vi({title:"Выплата процентов",orientation:"vertical",...d("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),rateChildren:oi({rate:p,depositeName:x,isShowDepositeName:i,isUnavailableByTerm:g}),resultChildren:c("div",{children:[Bi(u,h),Ue(l,{isVertical:!0}),ii(n),ii(a)]})});var f})),Ti=(e,t)=>c("div",{className:"space-y-s",children:[o(Ve,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[o(jl,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(jl,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Bi=(e,t)=>c("div",{className:"flex flex-col gap-2xl sm:gap-0 mb-lg",children:[o(qa,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),o(qa,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),Mi=({min:e=0,max:t=0,availableMonths:l,...n})=>o(Tn,{items:[`От ${Pi(e)}`,`До ${Pi(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Pi=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Vi=e=>yi({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Ri=e=>zi({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&zi({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&zi({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&zi({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),zi=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Ai=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},Di=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=di(t||"credit-calculator-data"),s=i?.rateRows||[ei],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Ri({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Ni(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Ni(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>Ri({row:e,userInputParams:t,paramsViewSettings:l})&&ki(n,["minSum","maxSum"],e)&&ki(a,["minMonths","maxMonths"],e)))||ei)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=Ai(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},ji=d((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=Ct({moneyValue:pi(i,2e5),monthsValue:gi(i,Ja),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),d=Di(r,t,a),m=Vi({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return o(ui,{className:e,inputChildren:c("div",{children:[ci({title:"Сумма кредита, ₽",step:500,min:d.minSum,max:d.maxSum,...s("moneyValue"),value:d.moneyValue}),Mi({title:"Срок кредита, месяцев",min:d.minMonths,max:d.maxMonths,...s("monthsValue"),value:d.monthsValue}),Fi({...d,...a},s),o("div",{className:"sm:hidden",children:m})]}),rateChildren:oi({rate:d.rate}),resultChildren:c("div",{children:[o(qa,{title:"Ежемесячный платёж",value:d.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:m}),Ue(l,{isVertical:!0}),ii(n)]})})})),Fi=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(jl,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(jl,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(jl,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(jl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Ei=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},Li=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=di(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?_i(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):0,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>$i({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&$i({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&ki(n,["minSum","maxSum"],t)&&ki(a||r,["minMonths","maxMonths"],t)))||ni,{rate:d}=c,m=Oi(d,e),h=n+m,u=i?.rateRows||[ni];return{...c,...wi(["minSum","maxSum"],u),...wi(["minMonths","maxMonths"],u),availableMonths:Ei(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},Oi=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},$i=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],_i=(e,t)=>e+Math.round((t-e)/2),Ui=d((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:d}]=Ct({moneyValue:pi(r,2e4),monthsValue:gi(r),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(r?.isRemoteRegistration)}),m=Li(s,t,i),{defaultMonth:h,rate:u,income:p,finalSum:g}=m,{onChange:x}=d("monthsValue");return a((()=>{!s.monthsValue&&x&&x(h)}),[h]),o(ui,{className:e,inputChildren:c("div",{children:[ci({title:"Сумма, ₽",min:m.minSum,max:m.maxSum,...d("moneyValue"),value:m.moneyValue}),Mi({title:"Срок, месяцев",min:m.minMonths,max:m.maxMonths,availableMonths:m.availableMonths,...d("monthsValue"),value:m.monthsValue}),Hi({...m,...i},d)]}),rateChildren:oi({rate:u}),resultChildren:c("div",{children:[o(qa,{title:"Доход в конце срока",value:p,postfix:"₽",prefix:"+"}),o(qa,{title:"Сумма в конце срока",value:g,postfix:"₽"}),Ue(l,{isVertical:!0}),ii(n)]})})})),Hi=(e,t)=>{return c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?vi({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},yi({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Wi=e=>Ki({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Ki({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Ki=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Gi=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=di(t||"refinancing-calculator-data"),c=o?.rateRows||[ti],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Wi({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=Ni(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=Ni(["minMonths","maxMonths"],d,c),g=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Wi({row:e,userInputParams:t,paramsViewSettings:l})&&ki(n+r,["minSum","maxSum"],e)&&ki(i,["minSumOld","maxSumOld"],e)&&ki(r,["minSumExtra","maxSumExtra"],e)&&ki(a,["minMonths","maxMonths"],e)))||ti)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:x}=g,f=Ai(x,e),b=e.oldMonthlyPayment-f;return r((()=>({...g,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},Xi=d((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=Ct({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Gi(i,t,a),d=Vi({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return o(ui,{className:e,inputChildren:c("div",{children:[ci({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),ci({title:"Ежемесячный платёж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),Mi({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Yi({...s,...a},r),s.isExtraMoney?ci({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:d})]}),rateChildren:oi({rate:s.rate,fractionDigits:1}),resultChildren:c("div",{children:[o(qa,{title:"Ежемесячный платёж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?o(qa,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:d}),Ue(l,{isVertical:!0}),ii(n)]})})})),Yi=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(jl,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(jl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(jl,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),qi={CreditCalculatorForm:ji,DepositCalculatorForm:Ui,BusinessDepositCalculatorForm:Ii,BonusCalculatorForm:hi,RefinancingCalculatorForm:Xi},Qi=d((({className:e,calculatorTabs:t=[],...l})=>o(b,{className:e,defaultPadding:"p-0",...l,children:Ji(t)}))),Zi=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in qi))return null;const l=qi[t];return c("div",{className:"p-xl",children:[e?.calculatorBlock?.title?o(N,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,o(l,{...e.calculatorBlock,isMobile:!0})]})},Ji=e=>{if(!e||!e.length)return null;return 1===e.length?Zi(e[0]):e.map(((e,t)=>o(Xa,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>o(Ya,{isUnfolded:t,children:Zi(e)}),renderFoldButton:er(e)},t.toString())))},er=e=>({isUnfolded:t,onToggle:l})=>{const n=e.nav?.align||"text-left";return c("button",{onClick:l,className:"w-full p-xl bg-primary-main flex items-center border-b border-white",children:[o("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:o(H,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),c("div",{className:"flex-1 flex flex-col pl-s",children:[o(Ve,{align:n,color:"text-white",children:e.nav?.title}),o(Ve,{align:n,size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),o(H,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]})},tr=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Nn(e,{normalize:(e=a)=>l&&n?String(wn(Number(lr(e)),l,n)):lr(e),format:qe(r)}),d=i((e=>t&&t(lr(e))),[t]);return o(jt,{onChange:d,...s,...c})})),lr=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),nr=d((e=>o(tr,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ve,{size:"text-xl",font:"font-light",children:"₽"})})}))),ar={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},ir={amount:1500},rr=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...d})=>{const[{amount:m},{field:h}]=Ct(ir),[u,p]=n(!1);return a((()=>{p(m<=0)}),[m]),c(b,{className:x("flex flex-col items-center",e),defaultPadding:"p-6xl",...d,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:ar[s],children:[o(nr,{valid:!u,placeholder:i,label:l,...h("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:m}),r?.text?o(Bl,{className:"w-full mt-lg",type:"submit",disabled:u,children:r.text}):null]})]})})),sr=(e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},or=d((({className:e,disabled:t,...l})=>o(ue,{rounded:!0,className:x("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,...l,children:o(J,{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"})}))),cr=d((e=>o(or,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),dr=d((e=>o(or,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),mr="absolute top-[calc(50%-24px)] z-40",hr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",ur=d((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:d,canScrollRight:m,scrollLeft:h,scrollRight:u}=e,p=a?t>0:d,g=a?t<l-1:m,f=i((()=>{a?(d&&t!==l-1&&h(),r()):h()}),[h,r,a,d,t,l]),b=i((()=>{a?(m&&0!==t&&u(),s()):u()}),[u,s,a,d,t,l]);return c("div",{className:"hidden @lg:block",children:[pr(e),p?o(cr,{className:x(mr,n?"left-1 @lg:left-8":"left-0"),onClick:f}):null,g?o(dr,{className:x(mr,n?"right-1 @lg:right-8":"right-0"),onClick:b}):null]})})),pr=e=>c("div",{children:[e.canScrollLeft?o("div",{className:x(hr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:x(hr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),gr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",xr=({className:e,text:t="ХИТ"}={})=>c("div",{className:x("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(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),fr="relative h-full",br={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},yr=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(wr);return P({...n,renderProps:(n,a,r)=>c("div",{className:vr(n,{someCardsHighlighted:i}),children:[T(n,a,{className:Nr(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),wr(n)?xr({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},vr=(e,{someCardsHighlighted:t})=>x(fr,t&&(wr(e)?"pt-3xl":"pt-3xl sm:pt-16")),Nr=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>x(fr,"min-w-80",br[n],t&&(wr(e)?"pt-3xl sm:pt-16":"pt-3xl"),gr(l),l&&"h-full"),wr=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,kr=bt((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...d})=>{const{blocks:m=[]}=d.block||{},h=t||m?.length,[u,{inc:p,dec:g}]=sr({itemCount:h,visibleItemCount:l},Math.floor(l/2)),[f,y]=_a({itemCount:h}),[v]=y.visibleIndicesRange,N=m&&"CarouselBankHistoryCard"===m[0]?.type;return c(b,{className:e,defaultPadding:"p-6xl",...d,children:[c("div",{className:x(a?"flex justify-center":"","relative max-w-full"),children:[o(Ma,{containerRef:f,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:yr({noCardBorder:n,activeIndex:u,cardSize:s,...d})}),o(ur,{scroll:y,arrowsPadded:i,onScrollLeft:g,onScrollRight:p,hasEdgeBlocks:N,activeIndex:u,itemCount:h})]}),o(Aa,{className:"@5xl:hidden",containerRef:f,activeIndex:v,dotCount:h,listType:"horizontal-list"})]})}),{childrenTypes:["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Sr=d((({title:e,description:t,className:l})=>o(b,{className:l,defaultPadding:"p-6xl",children:o(S,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),Cr="z-10 border border-solid w-full h-full",Ir=x(Cr,"absolute hidden @xl:block border-transparent"),Tr=d((({className:e,title:t,description:l,button:n,...a})=>o(b,{className:x("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:x(Ir,"top-9 right-12 bg-green-dark")}),o("div",{className:x(Ir,"top-6 right-8 bg-green")}),o("div",{className:x(Ir,"top-3 right-4 bg-green-light")}),c("div",{className:x(Cr,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(S,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ue([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Br={black:"bg-black",white:"bg-white"},Mr=d((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(b,{className:x("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(be,{className:"h-full",padding:d,title:o(S,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(J,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Ue([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(Ve,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Pr)]}):null,a?c(Ve,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Pr=(e,t)=>o("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Br[e]}`},String(t)),Vr=d((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>c(l,{tag:l,className:x("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Rr=d((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>o(Vr,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:x("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(Ve,{size:"text-h4",children:t}),iconNode:l?o(J,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),zr=({isUnfolded:e,onToggle:t})=>o(Rr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Ar=d((({className:e="",icon:t,...l})=>{const n=oe(),{text:a,href:i,target:r,onClick:s}=n(l);return a?o("div",{className:x("w-full pb-lg",e),children:c("a",{className:"bg-white flex justify-between rounded-md w-full p-lg whitespace-nowrap",role:"link",href:i,target:r,onClick:s,children:[c("div",{className:"flex items-center space-x-lg",children:[t?o(J,{imageClassName:"text-green-dark",image:t,width:"20",height:"20"}):null,o(Ve,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})]}),o(H,{className:"text-green",name:"ArrowRightIcon",width:"20",height:"20"})]})}):null})),Dr=d((({className:e,additionalDescription:t,description:l,links:n=[],title:a,...i})=>c(b,{className:e,...i,children:[c("div",{children:[o(S,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),o(S,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?jr(n):null]}))),jr=(e,t=3)=>{const l=(e||[]).map(((e,t)=>o(Ar,{...e},String(t)))),[n,a]=t>0?[l.slice(0,t),l.slice(t)]:[l,[]];return o("div",{className:"mt-4xl",children:a.length>0?o(Xa,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:"mb-1",children:n}),o(Ya,{isUnfolded:e,children:a})]}),renderFoldButton:Fr}):o("div",{children:n})})},Fr=({isUnfolded:e,onToggle:t})=>e?null:o(Rr,{className:"border-t-main-divider/50",icon:"PlusIcon",label:"Показать еще",onClick:t}),Er=d((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=oe({isRemote:n})({href:t,target:l});return o(t?"a":"div",{className:x("block",e),...t?i:{},children:a})})),Lr=[{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:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Or=e=>Lr.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},$r=d((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,d]=n(),m=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=Or(t),o=_e(n)?n:r,c=l?{text:a}:{text:""};return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:"color"},version:e?.version??i}})),h=x("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",a?"flex-1 justify-center":"");return c("div",{className:x("flex flex-col gap-xs",e),children:[o("div",{className:"flex gap-xs",children:Ue(m,{className:x(a||s?"basis-full":""),buttonClassName:h})}),r?o(Ve,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),_r=d((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:d=[],target:m,title:h,align:u="text-left",benefits:p,imageOptions:{directionRight:g=!0,isImageAlwaysOnRight:f=false,isImageSecondary:y=!1}={},...v})=>o(b,{className:x("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...v,children:o(Er,{href:a,target:m,className:"h-full",children:c(be,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(S,{title:h,description:l,headlineVersion:"XS",isEmbedded:!0,align:u}),...nt(_e(i)?o(J,{image:i}):null,g),buttons:d.length?o($r,{media:d,showButtonText:!0,version:v?.version}):null,isImageAlwaysOnRight:f,isImageSecondary:y,imageAlign:"center",children:[o($e,{benefits:p}),o(Ye,{items:r,isDotted:s,listItemSize:"S"}),Ur(n,u)]})})}))),Ur=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Hr=(e,t)=>{const{title:l,description:n,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[l?o("div",{className:"opacity-80",children:o(Ve,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(Ve,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:Ue(a)}):null]},String(t))},Wr=d((({className:e="",title:t,align:l="text-center",icon:n,button:a,visibleCellsCount:i=1,cardCells:r=[],...s})=>{const d=r.map(Hr),[m,h]=i>0?[d.slice(0,i),d.slice(i)]:[d,[]];return c(b,{className:x("flex flex-col",e),defaultPadding:"p-2xl",...s,children:[_e(n)?o("div",{className:"self-center",children:o(J,{image:n})}):null,t?o(N,{className:x("pt-xs",l),headingType:"h5",title:t}):null,a?.text?o(ue,{className:"w-full mt-m mb-lg",...a}):null,h.length?o(Xa,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[m,o(Ya,{isUnfolded:e,children:h})]}),renderFoldButton:r.length>1?Kr:null}):o("div",{children:m})]})})),Kr=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(H,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Gr=(e=!1)=>e?"text-white":"",Xr=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),Yr=d((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>c("div",{className:"space-y-4",role:"columnheader",children:[e?o(J,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&o("div",{children:o(J,{image:t})}),l?o(N,{headingType:"h4",className:Gr(a),title:l}):null,n?o("div",{className:Xr(a),children:n}):null]}))),qr=d((({cell:e,rowHeader:t,isFillGradient:l=!1})=>o("div",{className:"box-border flex flex-col",role:"cell",children:o("div",{className:x("h-full","border-main-divider border-b"),children:e?e.map(Jr(l,t)):null})}))),Qr=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),Zr=(e=!1)=>""+(e?"text-white":""),Jr=(e,t)=>({label:l,description:n},a)=>c("div",{className:"flex justify-between text-s py-s",children:[o(w,{size:"text-s",color:Qr(e),children:t}),c("div",{className:"basis-1/2",children:[l?o("div",{className:"text-right",children:o(w,{size:"text-s",align:"text-right",color:Zr(e),children:l})}):null,n?o("div",{className:"text-right",children:o(w,{size:"text-s",color:Qr(e),children:n})}):null]})]},String(a)),es=d((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return c("div",{className:x("border border-gray rounded-md p-m mb-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),role:"row",children:[o(Yr,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>o(qr,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?o(ue,{href:e.link.href,target:e.link?.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,ts({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),ts=({onToggleColumn:e,isFillGradient:t,showRow:l})=>o("div",{className:"mt-lg",role:"cell",children:o("a",{role:"link",onClick:e,className:"cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:o(Ve,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),ls=d((e=>{const{className:t,title:l}=e;return c("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?o(N,{headingType:"h3",className:"font-medium text-center",title:l}):null,o("div",{role:"table",children:o(ns,{...e})})]})})),ns=d((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[c,d]=n(Array.from({length:e.length}).fill(!a)),m=i((e=>{const t=(t,l)=>l===e?!t:t;d((e=>e.map(t)))}),[]),h=i((()=>d((e=>Array.from({length:e.length}).fill(!1)))),[]),u=e?.map((({data:e,header:n},i)=>{return o(es,{visibleRowLength:a,showRow:c[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>m(i),...s},String(i));var r}));return"horizontal"===r?o(Ua,{onVisibleIndicesChange:h,children:u}):u})),as=e=>e%2!=0,is=d((({title:e,description:t})=>c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(J,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(S,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:va})]}))),rs=["ArrowDownIcon","ArrowUpIcon"],ss="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",os=d((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return c("div",{children:[o("div",{className:x(t.length?"hidden":"block"),children:a?o(is,{...a}):null}),c("div",{className:x("space-y-2xs",t.length?"":"hidden"),children:[c("div",{className:x(ss),children:[M(r,{...i.options,parent:n}),as(r.length)?o(vt,{className:"col-span-6"}):null]}),o(Xa,{renderFoldableSection:({isUnfolded:e})=>c(Ya,{className:x(ss),isUnfolded:e,children:[M(s,{...i.options,parent:n}),as(s.length)?o(vt,{className:"col-span-6"}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>o(Rr,{className:x(l<1?"hidden":""),disabled:!s?.length,label:e,icon:rs[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),cs=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,ds=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>cs(t[e])||cs(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>cs(t[e])||cs(l[e])||ms(t[e])<=ms(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>cs(t[e])||cs(l[e])||ms(t[e]?.min)>=ms(l[e]?.min)&&ms(t[e]?.min)<=ms(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>cs(t[e])||cs(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>cs(t[e])||cs(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),ms=e=>Number(e||0),hs=(e,t)=>(l=St)=>e&&e.filter((e=>ds(t,l(e.content||{})))),us=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(It,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),ps=({field:e,reset:t,filtrationSchema:l,resetButton:n,children: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-5xl",children:[a,Object.entries(l).map(gs(e))]}),n?o("div",{children:o(Bl,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,children:n?.text})}):null]}),gs=e=>([t,l])=>{const n=l?.type;return"array"===n?xs(t,e)(l):null},xs=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{children:[l?.title?o("div",{className:"mb-m",children:o(Ve,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,o(us,{items:n,multiple:!l?.single,...t(e)})]},e)},fs=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,bs=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),ys=(e,t)=>pt((e[t?.sourceBook]?.rateRows||[]).filter(fs).flatMap((e=>bs(e.minMonths,e.maxMonths)))),vs=(...e)=>{const t=e.map((e=>ht(e)));return Promise.all(t)};function Ns(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const ws=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function ks(e){const{dirs:t=[],source:l=[]}=r((()=>{const t=(e=>e?.filter(ws).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=ol(t,vs);return{source:Object.fromEntries(Ns(l,n).filter((([,e])=>Boolean(e)))),months:pt(n.flatMap((e=>e?.rateRows||[])).filter(fs).flatMap((e=>bs(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[]}}const Ss=1e9,Cs={sum:{min:1e4,max:Ss},period:3},Is=bt((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=ks(i.block?.blocks),[d,{field:m,reset:h}]=Ct(Cs),u=d===Cs?i.block?.blocks:hs(i.block?.blocks,d)((e=>({...e,period:ys(r,e||{})||[]}))),p=c("div",{children:[o(nr,{label:n?.title,min:500,max:Ss,...m("sum",{parse:e=>({min:Number(e),max:Ss}),format:({min:e})=>String(e)})}),o(Tn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...m("period")})]});return c(b,{className:x("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[ps({field:m,reset:h,filtrationSchema:t,resetButton:l,children:p}),o(os,{blocksToRender:u,...i})]})}),{childrenTypes:["ProductTile"],childSchema:e=>({...e?.filtrationSchema||{},sourceBook:{type:"string",title:"Адрес справочника"}})}),Ts=e=>"Image"===e?.contentType&&e?.image?o(J,{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,Bs=d((({className:e="",title:t,description:l,error:n,button:a,...i})=>c(b,{className:x("flex flex-col justify-center items-center",e),defaultPadding:x("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Ts(n)}),o(S,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(ue,{version:a?.version,text:a?.text,...a}):null]}))),Ms="location";function Ps(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(p,"location",Rs()??{name:e}),r=i((e=>{zs(e),l(e)}),[]),{data:s}=ol(Vs()?null:"/api/v1/region",ut);return a((()=>{s&&!Vs()&&l(s)}),[s]),[t??{name:e},r]}const Vs=()=>Boolean(globalThis.localStorage?.getItem(Ms)),Rs=()=>{try{const e=globalThis.localStorage?.getItem(Ms);return e&&JSON.parse(e)}catch(e){return null}},zs=e=>{try{globalThis.localStorage?.setItem(Ms,JSON.stringify(e))}catch(e){}};var As;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(As||(As={}));const Ds=new Intl.NumberFormat("ru",{style:"currency",currency:As.RUB}),js=e=>e?Ds.format(e):"",Fs="text-left text-m font-light text-secondary-text",Es=`${Fs} pl-5xl`,Ls={USD:"DollarIcon",EUR:"EuroIcon"},Os=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:`h-fit w-fit ${e}`,children:[o("thead",{children:c("tr",{children:[o("th",{className:Fs,children:o(Ve,{size:"text-m",children:"Валюта"})}),o("th",{className:Es,children:o(Ve,{size:"text-m",children:"Купить"})}),o("th",{className:Es,children:o(Ve,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map($s)})]}))),$s=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m",children:c("div",{className:"flex items-center gap-xs",children:[t?o(J,{image:{icon:Ls[t]},width:"24",height:"24"}):null,o(Ve,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl",children:o(Ve,{size:"text-h6",children:js(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl",children:o(Ve,{size:"text-h6",children:js(e?.buyExchangeRate)})})]},t)},_s={icon:"GpsIcon"},Us=d((({className:e="",address:t})=>c("div",{className:`flex gap-s ${e}`,children:[o(wa,{..._s,iconBgVersion:"primary"}),c("div",{className:"space-y-2xs",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Hs=(e,t,l)=>{const n=Number(Ws(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Ws=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Ks=e=>{return(t=[[e=>e.value!==As.RUB&&e.oppositeValue!==As.RUB,()=>e.handleConvert(e.value,As.RUB)],[e=>e.value===As.RUB&&e.oppositeValue===As.RUB,()=>e.handleConvert(e.value,As.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Gs(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:n,text:n};return c("div",{className:"relative flex",children:[o(jt,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(bl,{isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Xs=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||As.RUB,selectBuy:l?.[0]?.currency?.currency||As.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`grid gap-m pt-2xl ${e}`,children:[Gs({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Ys(r,d,l),value:r.inputSell,setValue:e=>Qs(d,l)(e,r.selectSell,r.selectBuy)}),Gs({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:qs(r,d,t),value:r.inputBuy,setValue:e=>Zs(d,t)(e,r.selectBuy,r.selectSell)}),a?.text?o(ue,{text:a.text,version:a?.version,...a}):null]})})),Ys=(e,t,l)=>n=>{t({selectSell:n}),Ks({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Qs(t,l)(e.inputSell,n,a)}})},qs=(e,t,l)=>n=>{t({selectBuy:n}),Ks({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Zs(t,l)(e.inputBuy,n,a)})},Qs=(e,t)=>(l,n,a)=>{e({inputSell:Ws(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Hs(l,i,n===As.RUB)||"")})},Zs=(e,t)=>(l,n,a)=>{e({inputBuy:Ws(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Hs(l,i,n===As.RUB)||"")})};const Js=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=Ps(),i=function(e){const t=e?.code||"000",{data:l}=ol(`/api/v1/exchangerates?regionCode=${t}`,ut);return l||{}}(a),r=eo(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:As.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:As.RUB}}),o(b,{className:x("box-border min-h-80",e),...n,children:o(be,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex gap-6xl flex-wrap",children:[c("div",{children:[r?o(Os,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Us,{address:i?.address})]}),r.length&&s.length&&d.length?o(Xs,{className:"grow",currencyRatesBuy:s,currencyRatesSell:d,button:l}):null]})})})})),eo=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],to=(e,t)=>o(wa,{...e,iconBgVersion:t,className:"shrink-0"}),lo=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(Vr,{tag:"button",className:x("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[to(a,t),e?o(Ve,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(H,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),no=bt((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,...c})=>o(b,{className:x("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...c,children:o(Xa,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Ya,{className:x("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:P({...c,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ao({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),ao=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"accordion"===e?o(lo,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):o(Rr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},io=d((({className:e="",items:t})=>c("div",{className:e,children:[t?.length?t.map(ro):null,o(ue,{version:"primary",className:"w-full",href:"https://beta.rshb.ru/natural/feedback/question",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),ro=(e,t)=>c("div",{className:"mb-m space-y-m",children:[o("div",{children:o(Ve,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(so)})]},String(t)),so=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:oo(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),oo=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${co(t)}`,children:o(Ve,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},co=e=>e.replaceAll(/\D/g,""),mo=["split_version","New","Old"],ho=d((({className:e="",index:t,text:l,...n})=>{const a=oe(),{href:i,target:r,onClick:s}=a(n);return o("a",{className:x("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),uo=d((({title:e,links:t,className:l=""})=>c("div",{className:x("flex flex-col gap-4",l),children:[o(Ve,{size:"text-l",font:"font-normal",children:e}),t?.length?o("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>o(ho,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),po=d((({className:e="",items:t,basePath:l})=>t?.length?o("ul",{className:x("flex flex-col",e),children:t.map(go(l))}):null)),go=e=>(t,l)=>{const{text:n,...a}=t,i=oe({isRemote:!(!z.BASE_PATH||!e)&&!z.BASE_PATH.startsWith(e),basePath:e}),{href:r,target:s,onClick:c}=i(a);return o("li",{className:"list-none my-xs",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:r,target:s||"_self",onClick:c,children:n||null})},`list_item_${String(l)}`)},xo=d((({className:e="",index:t,...l})=>{const n=oe({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return o("a",{className:`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}`})})),fo=d((({className:e="",links:t})=>c("div",{className:x("@container",e),children:[o("div",{className:"pt-lg",children:o(Ve,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>o(xo,{index:t,...e},String(t))))}):null]}))),bo=bt((({className:e,footer:t,...l})=>{const{topItems:n}=l.options?.page?.sitemap??{},{relatedEnterprises:a,contacts:r,socialMedia:s,mobileApps:d,horizontalNavigationTitle:m,documents:h}=t||{},u=i((()=>{const[e,t,l]=mo;((e,t)=>{const l=globalThis.document?.cookie.split(";")??[],[,n]=l.map((e=>e.split("="))).find((([t])=>t.trim()===e))||[];t(n)&&(globalThis.document.cookie=`${e}=${t(n)}`)})(e,(e=>e?.replace(t,l)))}),[]);return c(b,{tag:"footer",className:e,defaultPadding:"p-4xl pb-24",...l,children:[o("div",{className:"mb-lg pb-xs border-b border-main-divider",children:yo(n)}),o(io,{className:"overflow-hidden",items:r}),c("div",{className:"mt-xl",children:[o($r,{className:"mb-xl",media:s,stretched:!0,children:"Соцсети"}),c("div",{className:"mb-xl",children:[o("div",{className:"flex flex-col gap-4 mb-xs",children:d?.map(vo)}),o(Ve,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),o("div",{className:"py-lg border-t border-main-divider",children:o(ho,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:u})}),o(uo,{className:"py-lg border-y border-main-divider",title:m,links:a}),o(fo,{links:h})]})})),yo=e=>e?.map(((e,t)=>o(no,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,children:o(po,{items:e.items,basePath:V(e.href)})},String(t)))),vo=({href:e="/",text:t},l)=>{const{label:n}=Or(e);return o(ue,{className:"w-full",text:t||n,version:"secondary",href:e,target:"_blank"},String(l))},No={width:"34",height:"34"},wo={"bg-white":"color",transparent:"white"},ko={"bg-white":"text-primary-main",transparent:"text-white"},So=(e,t,l)=>o(J,t?.src?{image:t,className:ko[e],width:l?.width,height:l?.height}:{image:{icon:t?.icon||"LogoIcon",iconVersion:wo[e]},className:ko[e],width:l?.width,height:l?.height}),Co={"bg-white":"text-primary-text",transparent:"text-white"},Io=d((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>c("a",{className:x("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",children:[So(i,l?.image,No),r?n??o("div",{className:"ml-s",children:o(Ve,{font:"font-medium",color:Co[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),To={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Bo=d((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=g(),r=z.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return c("div",{className:"flex items-center justify-between w-full",children:[r?o("div",{children:o(Io,{className:"my-2xs",bgColor:e,logo:t})}):Mo(s),l?o("div",{children:o(ue,{href:l,ariaLabel:"Войти",target:"_blank",className:x("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",To["transparent"===n?"transparent":"default"]),children:"Войти"})}):null]})})),Mo=e=>o("div",{children:c("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,children:[o(J,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),Po={"bg-white":"primary",transparent:"transparent"},Vo=bt((({bgColor:e="bg-white",version:t=Po[e],portal:l,...n})=>{const{logo:a}=n.options?.page?.sitemap??{},{internetBankUrl:i}=l||{};return o(b,{tag:"header",defaultPadding:"",version:t,...n,children:o("div",{className:"container px-lg py-2xs box-border",children:o(Bo,{bgColor:e,logo:a,internetBankUrl:i,version:t,...n})})})})),Ro={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},zo=bt((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=g();return o(b,{className:x("relative flex flex-col",Ro[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${X(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:P({...c,extraProps:{className:x("w-full",gr(r)),padding:n?"":"p-0"}})})}),{childrenTypes:[]}),Ao=bt((e=>o(zo,{...e})),{childrenTypes:[]}),Do=d((e=>{const{className:t,image:l,...n}=e;return o(b,{className:t,defaultPadding:"p-0",...n,children:o(J,{image:l})})})),jo=["байт","Кб","Мб","Гб","Тб","Пб"],Fo=d((({icon:e,text:t,href:l,target:n,fileFormat:a,fileSize:i})=>{const r=i&&a?",":"",s=i??"",d=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",role:"link",href:l,target:n,children:[e,t?c(Ve,{size:"text-l",font:"font-light",children:[t," ",Eo(s,d),o(Ve,{color:"text-secondary-text",children:l&&`${s+r+d}`})]}):null]})})),Eo=(e,t)=>e||t?o("span",{children:", "}):"",Lo={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Oo=d((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=g();return c(b,{className:x("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(S,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:x("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Lo[r]),role:"list",children:a.map($o(d,i))}):null]})})),$o=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a="Attachment"===l?.docType?$(e)(l?.attachment?.src):l?.href,i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${jo[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?_o(a):l?.fileFormat;return o("div",{role:"listitem",children:o(Fo,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?o(J,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:t,width:"24",height:"24"}):null})},String(n))},_o=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Uo=d((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,additionalDescription:d="",title:m="Мобильное приложение",version:h="primary",...u})=>{const p="secondary"===h?"p-m min-w-32":"min-w-24",g=i?.src?o(J,{className:"hidden lg:block",image:i}):null;return o(b,{className:x("min-h-80",e),padding:"p-0",version:h,...u,children:c(be,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:"h3",title:m,className:x("whitespace-pre-wrap",l)}),rightImage:g,buttons:Ue(n,{className:"flex-wrap"}),children:[a?o(Ve,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:x("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[o(Ye,{items:r,listItemSize:"M"}),o(Ve,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:d}),s?.src?o("div",{className:x("flex justify-center bg-white rounded-md @xl:-order-1",p),children:o(J,{className:"w-fit",image:s})}):null,i?.src?o(J,{className:"lg:hidden",image:i}):null]})]})})})),Ho={primary:"bg-white/30",secondary:"bg-main-divider"},Wo={primary:"text-white",secondary:"text-secondary-text"},Ko=d((({count:e,version:t="secondary"})=>o("div",{className:x("w-6 h-6 rounded-full flex items-center justify-center",Ho[t]),children:o(Ve,{size:"text-xs",color:Wo[t],children:e})}))),Go=(e=[],t={})=>e.filter((({content:e={}})=>ds(t,e))).length,Xo=(e,t)=>e===t;const Yo=(qo=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Xo,((e=Xo)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>qo(l,t[e])))));var qo;const Qo=[],Zo={},Jo={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},ec={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},tc={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},lc={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},nc=d((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...d}=t;return o(i,{className:x("h-12","block flex-1","cursor-pointer",Jo[n],l?lc[n]:tc[n]),role:"tab","aria-selected":l,onClick:a,...d,children:c("div",{className:x("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?ec[n]:"text-secondary-text hover:text-primary-main"),children:[o(Ve,{size:"text-m",children:r}),s?o("div",{className:"ml-xs",children:s}):null]})})})),ac=d((e=>o(e?.item?.href?ic:rc,{...e}))),ic=d((e=>{const t=oe(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(nc,{...e,tag:"a",item:a,onClick:n})})),rc=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(nc,{item:e,onClick:n,...l})})),sc=(e,t,l)=>(n,a)=>o(ac,{isActive:n===e,onClick:t,type:l,item:n},String(a)),oc=d((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>o("div",{className:x("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(sc(n,a,t))}))),cc={categories:[],extraOptions:[],propertyType:[],stage:[]},dc=bt((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:d,reset:m,update:h}]=Ct(cc),u=s===cc?a.block?.blocks:hs(a.block?.blocks,s)(),p=i(((e=cc)=>h(e)),[]),g=(({hotFilters:e=Qo,filtrationState:t=Zo,blocks:l=Qo,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Yo(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:o(Ko,{version:t===e[a]?"primary":"secondary",count:Go(l,t.filter)})})))),[e,l,a]),c=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:c}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:p});return c(b,{className:x("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(oc,{...g}),ps({field:d,reset:m,filtrationSchema:l,resetButton:n}),o(os,{blocksToRender:u,...a})]})}),{childrenTypes:["ProductTile"],childSchema:e=>e?.filtrationSchema||{}});function mc(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const hc={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},uc=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(hc).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:o(H,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),pc=e=>globalThis[e];const gc=()=>function(e,t){const[l,r]=n(),s=i((()=>r(pc(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!pc(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),xc={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},fc=d((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(xc).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(H,{name:l,width:"20",height:"16"})})})),bc={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},yc=[55.753995,37.614069],vc=d((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=gc(),[d,m]=n();if(a((()=>{i?.current?r&&(mc(r,i.current,e),e?.length||i.current.setCenter(yc)):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:e?Nc(e):yc,zoom:l,controls:[],suppressMapOpenBlock:!0}),mc(r,i.current,e))}))}),[r,i,e,l]),!r)return null;const h=d?"z-[100000]":"z-10";return c("div",{id:"map",className:x(!d&&"relative","w-full",t),children:[o("div",{className:x(Object.values(bc),h,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;d?e.exitFullscreen():e.enterFullscreen(),m(e.isFullscreen())},children:o(H,{name:"FullScreenIcon",width:"16",height:"16"})}),c("div",{className:x("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(fc,{yandexMaps:i}),o(fc,{yandexMaps:i,direction:"out"})]}),uc(i.current,r,x("right-2 top-80",h))]})})),Nc=e=>[kc(wc(e,0)),kc(wc(e,1))],wc=(e,t)=>e.map((e=>e[t])),kc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Sc={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},Cc=(e,{field:t,reset:l})=>c("div",{className:"pb-2xl",children:[e?.length?o("div",{className:"flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",children:e.map((e=>o(jl,{text:Sc[e],...t(e)},e)))}):null,o(ue,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:o(H,{name:"CloseIcon",width:"16",height:"16"})})]}),Ic=()=>null,Tc=()=>[],Bc=d((({className:e,data:t=[],renderCard:l=Ic,filterItems:n=Tc,initFilterState:a={},descriptionData:i,title:s})=>{const[d,{field:m,reset:h}]=Ct(a),[p,g,f]=r((()=>{const e=n(t,d),l=e.map((e=>[e.gpsLatitude,e.gpsLongitude].filter(Boolean))).filter((e=>e&&2===e.length));return[e,l,e.length]}),[t,d]);return c("div",{className:x("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-6xl pb-0",children:[c("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:[o(N,{headingType:"h2",children:s}),f?o(Ve,{size:"text-h2",color:"text-secondary-text",children:`(${f})`}):null]}),i?Mc(i):null,Cc(Object.keys(a),{field:m,reset:h})]}),o("div",{className:"h-[600px]",children:o(u,{children:o(vc,{points:g,className:"h-full"})})})]}),p.map(l)]})})),Mc=({__html:e,list:t})=>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(Me,{__html:e})}):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(J,{image:e.image}):null,e?.text?o(Ve,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Pc={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"}},Vc=d((({className:e,children:t,color:l="gray"})=>c("div",{className:x("pt-2xl sm:p-s sm:border sm:border-gray rounded-md flex items-center",Pc[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(J,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Ve,{size:"text-m",color:Pc[l].text,children:t})]}))),Rc=d((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:zc({textItems:a,subText:t,children:l,...n})})),zc=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>c("div",{className:x("flex gap-2xl sm:gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Ve,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>o(Ve,{size:"text-l",children:e.trim()},String(t)))),a?o(Ve,{color:n,size:"text-m",children:a}):null]}),Ac=d((({className:e,children:t})=>o("div",{className:x("sm:flex sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Dc=["ArrowDownIcon","ArrowUpIcon"],jc=["Подробнее","Скрыть"],Fc=({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,children:[o("div",{className:"pr-m",children:jc[Number(e)]}),o(H,{className:"text-primary-text",name:Dc[Number(e)],width:"16",height:"16"})]}),Ec=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Oc(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{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(Ve,{size:"text-h4",children:Oc(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ve,{size:"text-l",children:t})]}):null]}),o(Vc,{color:"green",children:Oc(s)})]}),o("div",{className:"hidden sm:block",children:o(Ac,{className:"flex-wrap",children:m?.map(Lc)})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ya,{isUnfolded:e,children:o(Ac,{className:"flex-wrap",children:m?.map(Lc)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Fc({isUnfolded:e,onToggle:t})})]},String(d))},Lc=(e,t)=>o(Rc,{...e},String(t)),Oc=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",$c=[];const _c=async e=>await ht(e,{method:"GET"})||$c,Uc={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Hc={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Wc=d((({data:e,className:t})=>{const[l]=Ps(),n=function(e){const{data:t=$c}=ol(`/api/v1/atms?regionCode=${e}`,_c);return t}(l?.code??"000");return o(Bc,{className:t,filterItems:Kc,data:n,initFilterState:Uc,renderCard:Ec,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),Kc=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Hc[t](e))),l=!n.length||n.some((t=>Hc[t](e)));return t&&l}))},Gc=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", "),a=[Xc({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Xc({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean);return o(Rc,{label:"Режим работы",value:a,className:"max-w-none"})},Xc=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",Yc=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],qc=e=>Yc.map((([t,l,n])=>({key:t,title:n,short:l,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??"")}}))),Qc=e=>{if(!e)return null;const t=Zc(e);return c(Ac,{className:"border-none",children:[o(Rc,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Jc)})}),o(Rc,{label:"Режим работы",className:"max-w-none",children:o(Ve,{children:e})})]})},Zc=e=>{const t=Yc.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},Jc=({short:e,status:t},l)=>o("div",{className:x("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(Ve,{size:"text-xs",children:e})},String(l)),ed=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Rc,{label:"Валюта",value:e.currency}):null,t?o(Rc,{label:"Купить",value:String(t)}):null,l?o(Rc,{label:"Продать",value:String(l)}):null]},String(n)),td=(new Date).getDay(),ld=e=>{const[t]=e?.slice(td-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Vc,{color:"green",children:a}):null,l&&i?o(Vc,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(Vc,{color:"red",children:"Выходной"})},nd=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",ad=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(Rc,{label:e,value:t&&l?l:"",subText:nd({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),id=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=qc(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(Ve,{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(Ve,{size:"text-l",children:t})]}):null]}),ld(u)]}),o("div",{className:"hidden sm:block",children:rd({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ya,{isUnfolded:e,children:rd({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Fc({isUnfolded:e,onToggle:t})})]},String(h))},rd=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=qc(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Ac,{className:"flex-wrap",children:[o(Rc,{label:"Факс",value:t}),o(Rc,{label:"Телефон филиала",value:e}),o(Rc,{label:"Для обращений юридических лиц",value:l}),o(Rc,{label:"Обслуживание физических лиц",value:n}),o(Rc,{label:"Для консультаций по валютному контролю",value:i}),o(Rc,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?o(Ac,{children:o(Rc,{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(ad)})})}):c(Ac,{children:[o(Rc,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Jc)})}),Gc(d)]}),r?.businessScheduleVisibleTag?Qc(r?.businessScheduleDescription):null,s?.currencies?.length?o(Ac,{className:"flex-wrap",children:s?.currencies?.map(ed)}):null]})},sd=[];const od=async e=>await ht(e,{method:"GET"})||sd,cd={workingSaturday:!1},dd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},md=d((({className:e})=>{const[t]=Ps(),l=function(e){const{data:t=sd}=ol(`/api/v1/branches?regionCode=${e}`,od);return t}(t?.code??"000");return o(Bc,{className:e,filterItems:hd,data:l,initFilterState:cd,renderCard:id,title:`Офисы филиала ${t?.name}`})})),hd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>dd[t](e)))))},ud=d((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return o(b,{version:"transparent",className:x(t),defaultPadding:"p-0",...l,children:"offices"===n?o(md,{}):o(Wc,{data:e})})})),pd=d((({className:e,size:t})=>o("figure",{className:x("m-0 mt-xl min-w-[80%]",e),children:gd(t)}))),gd=(e=3)=>fd(100,e).map((e=>Math.floor(e))).map(xd),xd=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),fd=(e,t)=>[e].concat(t>0?fd(e/1.618,t-1):[]),bd=d((({className:e,title:t,description:l="Блок в разработке...",...n})=>c(b,{className:x("box-border",e),...n,children:[o(S,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(pd,{})]}))),yd=d((({className:e,padding:t,slides:l=[],...n})=>o(b,{className:x("overflow-hidden relative",e),padding:t,...n,children:o(Ua,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(lt,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),vd=d((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:d="primary",...m})=>c(b,{className:x("box-border text-left space-y-s",a),version:d,...m,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[_e(r)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(J,{image:r})}):null,s?o(N,{headingType:"h3",as:"h3",title:s}):null]}),c("div",{className:"w-full space-y-m",children:[i?Nd(i):null,wd({label:"Адрес",data:e,iconName:"GeolocationIcon"}),wd({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),wd({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Ue([n]):null]})]}))),Nd=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Me,{__html:e})}),wd=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(H,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Ve,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ve,{size:"text-xl",color:n,children:t})]})]}):null,kd=d((e=>{const{__html:t,richVersion:l,...n}=e;return o(b,{defaultPadding:"p-0",...n,children:o(Me,{__html:t,richVersion:l})})})),Sd=d((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return c("div",{className:x("order-4",e),children:[o(ia,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(ia,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Cd=d((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),c=s.find((e=>e.key===n));return o(bl,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),Id=d((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],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(Cd,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Cd,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Td=["От 1 дня","До 365 дней"],Bd=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ve,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Tn,{min:1,max:365,value:e,items:Td,onChange:t})]}))),Md=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],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(Cd,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Cd,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Pd=d((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,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(Id,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Vd(m)}),o(Bd,{days:a,setDays:e=>m({days:e})}),o(Md,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Rd(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ve,{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(Sd,{}),o(ue,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),Vd=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Rd=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},zd=d((({days:e,tariffs:t=[]})=>{const l=Dd(e,t),n="На рисунке изображена пачка листов\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:[Ad("Аренда за",e),Ad("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),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(J,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),Ad=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ve,{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})]}),Dd=(e,t)=>{const l=jd(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},jd=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},Fd=(e,t)=>e.find((e=>e.branchCode===t)),Ed=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Fd(n,l.selectedBranch),d=Ld(s?.safeBoxCaseVolumes),m=Od(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=$d(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Pd,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(zd,{days:l.days,tariffs:h})]})})),Ld=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Od=(e,t)=>e?.find((e=>e.volume===t)),$d=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,_d=[];const Ud=async e=>await ht(e,{method:"GET"})||_d,Hd=d((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),d=i((()=>s((e=>!e))),[]),[m,h]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=dl(),p=Wd(m.selectedRegion,u),g=function(e){const{data:t}=ol(e?`/api/v1/safeboxes?regionCode=${e}`:null,Ud);return t||_d}(p),x=i((e=>h((t=>({...t,...e})))),[h]),f=(y=Fd(g,m.selectedBranch)||g,Array.isArray(y)?y.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):y?.gpsLatitude&&y?.gpsLongitude?[[y.gpsLatitude,y.gpsLongitude]]:[]);var y;return c(b,{className:l,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(Ed,{regions:u,branches:g,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?o(vc,{points:f,className:"h-[640px]"}):null]})})),Wd=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Kd(e){throw new Error(e)}const Gd={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Xd={normal:"",small:"min-h-6xl"},Yd={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"},qd=d((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",stepVersion:r="gray",version:s="primary",...d})=>c(b,{className:x("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...d,children:[o(S,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?o("div",{className:"box-border",children:o("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(Qd(i,r))})}):null,Ue(a,{isVertical:!0})]}))),Qd=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Zd(e,t)(l,n);case"rte":return o(Me,{__html:l.__html});default:Kd(l)}},Zd=(e,t)=>(l,n)=>o("div",{className:"contents",children:c("div",{className:"flex flex-row items-center relative",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Jd(e,t)(l,n)}),c("div",{className:x("flex flex-col justify-center h-fit",Xd[e]),children:[l.label?o(w,{size:"text-l",align:"text-left",children:l.label}):null,l.description?o("div",{className:x("text-s font-light text-left",Yd.description),children:l.description}):null]})]})},String(n)),Jd=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=Gd[e][i?"image":"icon"],s=i?"transparent"===t:t;return o(b,{className:x(r,"z-10 mr-s flex justify-center content-center rounded-md"),defaultPadding:"",version:s,children:o("span",{className:"flex max-w-full max-h-full items-center justify-center",children:_e(l?.icon)?o(J,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:em(e),height:em(e)}):o("span",{className:x("text-h4","transparent"===t?Yd.iconText:(c=t,"secondary"===c?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var c},em=e=>"normal"===e?"38":"24",tm=e=>({href:t})=>!!t&&j(lm(t,e)).startsWith(j(t)),lm=(e,t)=>A(e)?t.href:t.pathname;function nm(e=[]){const t=g(),l=e.findIndex((e=>tm(z.BASE_PATH?{pathname:z.BASE_PATH}:e))(t));return[l,e[l]]}const am=d((({isActive:e,onClick:t})=>c("button",{className:x(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:t,children:[o(H,{className:"w-6 h-6",name:"BurgerIcon",iconVersion:e?"color":"black"}),"Меню"]}))),im=d((({isActive:e,item:t,onClick:l})=>{const n=oe({isRemote:!0}),{href:a,onClick:i}=n({href:t?.href,onClick:l});return c("a",{className:x(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),href:a,target:"_self",title:t?.title||"",onClick:i,children:[o(H,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]})}));const rm=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>p.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Kd(e)}}))),[c,d]),l},sm=d((({className:e,onClose:t})=>o("button",{className:x("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:o(J,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),om=d((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=re(),r=i((()=>{a(),n&&n()}),[n]);return c("div",{className:x("relative min-h-full bg-white pt-0 p-5",e),children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(sm,{className:"absolute top-0 right-0",onClose:r}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),cm=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=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-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const dm=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(Ve,{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(mm,{...e},String(t))))})]}):null,mm=d((({icon:e,...t})=>{const l=oe(),{text:n,target:a,href:i,onClick:r}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(J,{pathPrefix:"/wcms-resources/",image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Ve,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),hm=e=>t=>o("div",{className:"mb-xs sm:mb-2xs",children:o("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:o(Ve,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),um=d((({className:e,searchTerm:t,onSearch:l})=>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-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),pm=d((({foreignOffices:e,defaultLocation:t})=>{const[l,a]=Ps(t),[r,s]=n(""),d=xm(dl()).sort(((e,t)=>e.name.localeCompare(t.name))),m=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(d,gm),{close:h}=re(),u=i((e=>{a(e),h()}),[]);return c(om,{className:"pb-20",head:c("div",{children:[o(Ve,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?c("div",{className:"mb-s",children:[o(Ve,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),o("button",{onClick:()=>a(l),children:o(Ve,{color:"text-primary-main",children:l.name})})]}):null,o(um,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?o("div",{children:d.filter((({name:e})=>e&&cm(e.toLowerCase())(r.toLowerCase())>=.8)).map(hm(u))}):o("div",{className:"columns-1 sm:columns-5",children:Array.from(m.entries()).map((p=u,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ve,{size:"text-h6",children:e})}),t.map(hm(p))]},e)))}),dm(e)]});var p})),gm=e=>e.name?.charAt(0)||"",xm=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),fm=d((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return c("div",{className:x("font-sans relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(J,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:x("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})}));function bm(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const ym=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},vm=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Nm=e=>t=>e.map((([e,l])=>[cm(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>km(t,e))).reduce(ym(Math.max,0),new Map),wm=e=>t=>{return Ns(t,t.map((({title:e})=>e)).map((e=>t=>{const l=vm(t||"");return l.length?Ie(e.map((e=>Fa(l.map(cm(e)))))):0})(e))).sort((e=>(t,l)=>-e(t,l))((l=([,e])=>e,(e,t)=>l(e)-l(t)))).map((([e])=>e));var l},km=(e,t)=>new Map(e.map((e=>[e,t]))),Sm=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=ol(e?.length?e:null,Cm),[s,o]=n(null);return bm((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=vm(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(Nm(i)).reduce(ym(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return wm(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},Cm=async(...e)=>(await Promise.allSettled(e.map((e=>ht(F(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Im=d((({className:e,topItems:t})=>{const l=oe({isRemote:!0});return o("div",{className:x("flex items-start justify-between",e),children:t?.map(l).map(Bm)})})),Tm=["all","footer"],Bm=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||Tm.includes(e.displayArea.toLowerCase())));return c("div",{className:"flex flex-col gap-s w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>o(Mm,{...e,basePath:V(a),index:t},String(t))))]},String(t))},Mm=d((({text:e,index:t,basePath:l,...n})=>{const a=oe({isRemote:!(!z.BASE_PATH||!l)&&!z.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return o("a",{className:x("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),Pm=d((({initialQuery:e,topItems:t})=>{const l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,a]=Sm({basePathList:l,initialQuery:e}),i=r((()=>Vm(t)(n)),[t,n]);return o(om,{head:o(fm,{autoFocus:!0,...a}),children:o(Im,{topItems:i})})})),Vm=e=>t=>e?.length&&t?.length?Ns(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:F("/",t)})))}))):[],Rm=d((({className:e,...t})=>{const[l,a]=n(""),r=i((()=>a("")),[]),s=((e={})=>{const{open:t,close:l}=re();return{open:(l={},n={})=>t(o(Pm,{...e,...l}),n),close:l}})(t),d=i((e=>{a(e),zm(e)&&s.open({initialQuery:e},{onClose:r})}),[r,s]);return c("div",{className:x("relative",e),children:[o(fm,{value:l,onChange:d}),o(sm,{className:"absolute top-0 right-0 sm:hidden",onClose:r})]})})),zm=e=>e&&e.length>=3,Am=d((({item:e,basePath:t})=>{const l=oe({isRemote:!(!z.BASE_PATH||!t)&&!z.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=g(),s=tm(r)({href:n});return c("a",{className:x(s?"text-primary-main":"text-primary-text","py-3 text-h5 font-light flex justify-between cursor-pointer"),href:n,target:a,onClick:i,children:[e.text,o(J,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]})})),Dm=({item:e,isActive:t,onClick:l})=>c("button",{type:"button",className:"relative",onClick:l,children:[o("span",{className:x("whitespace-nowrap",t?"text-primary-main":""),children:e.text}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]}),jm=d((e=>{const{topItems:t,defaultLocation:l,officesLink:s}=e,[d]=Ps(l),m=(e=>{const{open:t,close:l}=re();return{open:(l={})=>t(o(pm,{...e}),l),close:l}})(e),[h,u]=_a({itemCount:t?.length??0}),[p]=nm(t),[g,x]=n(p),f=r((()=>t?.[g]),[t,g]),b=f?.items||[];a((()=>{x(p)}),[p]),a((()=>{g>0&&u.scrollTo(g)}),[g,u]);const y=i((e=>x(e)),[]);return o(om,{head:o("div",{className:"flex items-center",children:o(N,{as:"h4",title:"Меню"})}),children:c("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[o("div",{className:"w-full mb-3",children:o(Ma,{containerRef:h,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>o(Dm,{item:e,isActive:g===t,onClick:()=>y(t)},String(t))))})}),c("div",{className:"relative grow overflow-auto",children:[Fm(b,f?.href),o(Rm,{className:"grow mb-5",...e}),Em(s),Lm(d,(()=>m.open()))]})]})})})),Fm=(e,t)=>e?o("div",{children:e.map(((e,l)=>o(Am,{item:e,basePath:t},String(l))))}):null,Em=e=>e?c("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[o(J,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),o("span",{children:"Офисы и банкоматы"})]}):null,Lm=(e,t)=>c("div",{className:"flex items-center text-s cursor-pointer",onClick:t,children:[o(J,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),c("div",{className:"flex flex-col items-start",children:[o(Ve,{size:"text-h5",children:e.name}),o(Ve,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]}),Om="burgerMenuDialog",$m=e=>{const{open:t,closeAll:l,close:n}=re(),a=rm(),i=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Om,a),r=()=>t(o(jm,{...e}),{id:Om});return[i,{open:r,close:n,toggle:()=>{i?l():r()}}]},_m=[],Um=bt((({sticky:e,...t})=>{const{menuItems:l=_m}=e??{},[n,{toggle:a,close:i}]=$m(t.options?.page?.sitemap??{}),[,r]=nm(l),s=Math.floor(l.length/2),d=l.slice(0,s),m=l.slice(s);return o(b,{className:"h-[74px]",defaultPadding:"p-0",...t,children:c("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[d.map(Hm(r,i)),o(am,{isActive:n,onClick:a}),m.map(Hm(r,i))]})})})),Hm=(e,t)=>(l,n)=>o(im,{isActive:l===e,item:l,onClick:t},l.href||String(n)),Wm="hidden sm:flex absolute z-40 top-0",Km=d((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=_a({itemCount:t?.length||0});return c("div",{className:x("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[o(Ma,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(sc(l,n,a))}),r.canScrollLeft?o(cr,{className:x("left-6",Wm),onClick:r.scrollLeft}):null,r.canScrollRight?o(dr,{className:x("right-6",Wm),onClick:r.scrollRight}):null]})})),Gm=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return o(oc,{...t});case"centered":return o("div",{className:"flex",children:o(oc,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return o("div",{className:"flex",children:o(Km,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Xm="tab",Ym=d((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...c})=>{const d=g(),{isReady:m}=d,h=r((()=>l.map(Qm)),[l]),[u,f]=n(0);a((()=>{if(!l||!l[0])return;const e=d.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===d.query.tab))||0,t=l[e]||l[0];f(e),qm(t)}),[m]),a((()=>{const e=l[u];"group"===e?.type&&p.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,u]);const y=i((e=>{const t=h.indexOf(e),n=l[t];f(t),qm(n),"group"===n.type&&(e=>{const t=new URLSearchParams(d.query);e.name?t.set(Xm,e.name):t.delete(Xm),d.replace(`${d.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,h]);return o(b,{className:x(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...c,children:Gm({items:h,value:h[u],tabsMode:s,onChange:y})})})),qm=e=>{"group"===e.type&&p.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&p.fire("tab",{type:e.type,label:e.href})},Qm=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,Zm={start:"text-start",center:"text-center",end:"text-end"},Jm=d((({tab:e,className:t,onClick:l,isActive:n})=>{const a=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white text-primary-text"),title:e?"mb-xs text-xl":"mb-2xs text-l",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal"}))(n);return c("button",{type:"button",onClick:l,"aria-label":e?.title,className:x("border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs",a.btn,t),children:[e?.icon?o(J,{className:x("h-6 w-6 min-w-6 min-h-6",a.icon),image:{...e?.icon,iconVersion:e?.icon?.iconVersion??a.iconVersion},width:"24",height:"24"}):null,c("div",{className:"border-0",children:[e?.title?o("div",{className:a.title,children:e.title}):null,e?.description?o("div",{className:a.desc,children:e.description}):null]})]})})),eh=d((({tab:e})=>{const t=oe(),{onClick:l}=t({...e,onClick:()=>{e.href&&!D(e.href)&&(globalThis.location.href=e.href)}});return bm(l,[],800),o(pd,{className:"col-span-12 p-xl",size:5})})),th=bt((({className:e="",tabs:t=[],block:l,tabAlign:i,...r})=>{const[s,d]=n(nh(t)),m=lh(t[s],s),h=t.length,[u,{inc:p,dec:g}]=sr({itemCount:h},s),[f,y]=_a({itemCount:h});return((e,t)=>{const[l,{setTrue:n}]=ml(!1);a((()=>{t.scrollTo(e,{behavior:l?"smooth":"auto",block:"nearest",inline:"center"}),!l&&n()}),[e,l])})(s,y),c(b,{className:x(e),defaultPadding:"p-0",...r,children:[c("div",{className:"relative border-b-8 border-primary-main",children:[o(Ma,{itemClassName:"flex",containerRef:f,snapAlign:"snap-end",gap:8,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:t.map(ah(s,d,i))}),o(ur,{scroll:y,arrowsPadded:!0,onScrollLeft:g,onScrollRight:p,activeIndex:u,itemCount:h})]}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:t[s]?.href?o(eh,{tab:t[s]}):M(l?.slots?.[m],{...r?.options,slotName:m,parent:l})})]})}),{slots:({tabs:e})=>e?.filter((e=>!e.href)).map(lh)||[],childrenTypes:{exclude:["TabsLayout"]}}),lh=(e,t)=>e?.title||`Слот №${t}`,nh=e=>e.reduce(((e,t,l)=>t.selected?l:e),0),ah=(e,t,l="start")=>(n,a)=>o(Jm,{className:Zm[l],tab:n,isActive:e===a,onClick:()=>t(a)},String(a)),ih={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},rh=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:ih[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),sh=d((({className:e="",isOpen:t,onClick:l})=>o(ue,{className:e,appendRight:o(J,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),oh={Buttons:({buttons:e})=>Ue(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(J,{image:e}):null,List:({isDotted:e,...t})=>o(Ye,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Ve,{size:"text-h6",children:e})}):null,t?o("div",{children:o(Ve,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?o(sh,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},ch=d((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return dh({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),dh=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in oh))return null;return o(oh[l],{...t,...n})},mh=d((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,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(ch,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),hh=(e,t)=>140*Ie(e.slice(0,t).map((e=>e?.cols?.length??1))),uh=(e,t)=>e?.length>0?o("div",{className:x("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Ve,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,ph=d((({rows:e})=>{return o(Ma,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=x("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.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(Ve,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${hh(a,t)}px)`},children:a?.map(((e,l)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ve,{size:"text-xl",children:e.data}):null,e?.cols?uh(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),gh=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;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(Ve,{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(ph,{rows:t.rowsData})})})]},n)}))}))),xh=(e=!1)=>""+(e?"text-white":"text-secondary-text"),fh=d((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>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:x("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:o(Ve,{size:"text-xl",font:"font-light",color:xh(t===l),children:e||t+1})},e)))}):null,t?o(ue,{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]})));async function bh(e){const t=await fetch(e);return await t.json()}const yh=d((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=ol(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),bh);return t||{}}(e),[r,s]=n(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(fh,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(gh,{activeTabIndex:r,items:m}),o(sh,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ve,{size:"text-h6",children:"Данных нет"}),o(sh,{onClick:l,isOpen:!0})]})})),vh=d((({children:e,tableInner:t,onHideContentClick:l})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:x("@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(yh,{...t,onClick:l})}):null]}))),Nh=d((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,d]=n(void 0),m=i((e=>d(e)),[]),[h,u]=n(void 0),p=i((e=>u(e)),[]);return c(vh,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:x("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(J,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Ve,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(rh,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(mh,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:p,...r},String(t))))}):null]})}));function wh({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(or,{className:x("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(or,{className:x("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const kh=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return c("div",{role:"table",children:[c("div",{className:"relative space-y-xs",children:[e,wh({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Sh=d((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],d=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,u]=sr({itemCount:m,visibleItemCount:2}),p=(d||[]).map(((e,t)=>o(Nh,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[g,f]=i>0?[p.slice(0,-i),p.slice(-i)]:[p,[]];return c(b,{className:x("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(S,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m",children:i>0?o(Xa,{renderFoldableSection:({isUnfolded:e})=>c(kh,{controls:u,children:[g,o(Ya,{isUnfolded:e,children:f})]}),renderFoldButton:zr}):o(kh,{controls:u,children:p})})]})})),Ch=d((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>c(b,{className:x("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?Ih():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ve,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Th(l):null,a?o(Me,{__html:a}):null]})]}))),Ih=()=>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"}),Th=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Bh=d((({prefix:e,unit:t,suffix:l})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Ve,{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,l?o("div",{className:"gradient-color-text",children:o(Ve,{size:"text-h2",children:l})}):null]}))),Mh=d((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return o(b,{defaultPadding:"p-0",...a,children:o(Bh,{prefix:t,unit:l,suffix:n})})})),Ph={AdTile:vt,ApplicationForm:fa,BenefitsBlock:ka,BonusBenefitsBlock:Wa,ButtonsBlock:Ga,Calculator:Qi,CardTransfer:rr,Carousel:kr,CarouselBankHistoryCard:Sr,CarouselCard:Tr,CarouselCatalogCard:Mr,CarouselLinks:Dr,CarouselRecommendationCard:_r,CarouselTariffsCard:Wr,ComparisonTable:ls,DepositFiltration:Is,ErrorBlock:Bs,ExchangeRateTile:Js,Footer:bo,Header:Vo,Headline:S,HorizontalLayout:Ao,ImgBlock:Do,LinkDocs:Oo,MobileAppTile:Uo,MortgageFiltration:dc,OfficesAtmsMap:ud,Placeholder:bd,ProductBlock:yt,ProductGallery:yd,RepresentativeOfficeInfo:vd,RichTextBlock:kd,RollupItem:no,SafeDepositRental:Hd,StepsBlock:qd,StickyBottomMenu:Um,Tabs:Ym,TabsLayout:th,TariffsTable:Sh,TextBlock:Ch,UnitBlock:Mh,VerticalLayout:zo},Vh="cookie",Rh=d((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=ml();bm((()=>{globalThis.localStorage?.getItem(Vh)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Vh,"true"),a()}),[]);return l?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",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:c(w,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",o(Er,{isRemote:!0,className:zh(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",o(Er,{isRemote:!0,className:zh(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),o("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:o(sm,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),zh=e=>x("inline mx-2xs",e?"text-green-dark":""),Ah=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=rm({onCloseAll:e,onClose:t}),{close:n}=re(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return ul(globalThis.document,"keydown",r),a((()=>{l.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"))}),[l]),l.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>o("div",{className:x("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Dh=d((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>p.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Kd(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return ul(globalThis.document,"keydown",r),e?o("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),jh="header",Fh="footer",Eh="sticky-footer",Lh={},Oh=d((({className:e,data:t=Lh,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d={key:"",page:{slots:a,blocks:i,fallback:r,...ft(s,r)},blocksRegistry:l,blockDecorator:n,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:x("@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,{...d,slotName:jh})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[P({block:t,options:d,extraProps:{className:"scroll-mt-12"}}),M(a?.footer,{...d,slotName:Fh})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.["sticky-footer"],{...d,slotName:Eh})}):null,o(Ah,{}),o(Dh,{}),o(Rh,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Object.assign(Oh,{childrenTypes:[],slots:()=>[jh,Fh,Eh]});e.Blocks=Ph,e.ContentPage=Oh,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))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=se,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.14.167",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=E,e.useRouter=g,Object.defineProperty(e,"__esModule",{value:!0})}));
|