@redneckz/wildless-cms-uni-blocks 0.14.261 → 0.14.263
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 +6 -4
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/StickyBottomMenu/StickyBottomMenuDialog.d.ts +9 -0
- package/bundle/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +19 -0
- package/bundle/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +0 -1
- package/bundle/data/StickyMobileData.d.ts +2 -2
- package/dist/components/OfficesAtmsMap/renderWorkSchedule.js +5 -3
- package/dist/components/OfficesAtmsMap/renderWorkSchedule.js.map +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +22 -42
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenuDialog.d.ts +9 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js +17 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -0
- package/dist/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +19 -0
- package/dist/components/StickyBottomMenu/useBottomMenuItemDialog.js +15 -0
- package/dist/components/StickyBottomMenu/useBottomMenuItemDialog.js.map +1 -0
- package/dist/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +0 -1
- package/dist/components/StickyBottomMenu/useBurgerMenuDialog.js +1 -1
- package/dist/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -1
- package/dist/data/StickyMobileData.d.ts +2 -2
- package/lib/common.css +1 -1
- package/lib/components/OfficesAtmsMap/renderWorkSchedule.js +5 -3
- package/lib/components/OfficesAtmsMap/renderWorkSchedule.js.map +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +23 -43
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenuDialog.d.ts +9 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js +15 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -0
- package/lib/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +19 -0
- package/lib/components/StickyBottomMenu/useBottomMenuItemDialog.js +12 -0
- package/lib/components/StickyBottomMenu/useBottomMenuItemDialog.js.map +1 -0
- package/lib/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +0 -1
- package/lib/components/StickyBottomMenu/useBurgerMenuDialog.js +1 -1
- package/lib/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -1
- package/lib/data/StickyMobileData.d.ts +2 -2
- package/mobile/bundle/bundle.umd.js +54 -52
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/StickyBottomMenu/StickyBottomMenuDialog.d.ts +9 -0
- package/mobile/bundle/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +19 -0
- package/mobile/bundle/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +0 -1
- package/mobile/bundle/data/StickyMobileData.d.ts +2 -2
- package/mobile/dist/components/OfficesAtmsMap/renderWorkSchedule.js +5 -3
- package/mobile/dist/components/OfficesAtmsMap/renderWorkSchedule.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +22 -42
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuDialog.d.ts +9 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js +17 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +19 -0
- package/mobile/dist/components/StickyBottomMenu/useBottomMenuItemDialog.js +15 -0
- package/mobile/dist/components/StickyBottomMenu/useBottomMenuItemDialog.js.map +1 -0
- package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +0 -1
- package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.js +1 -1
- package/mobile/dist/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -1
- package/mobile/dist/data/StickyMobileData.d.ts +2 -2
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderWorkSchedule.js +5 -3
- package/mobile/lib/components/OfficesAtmsMap/renderWorkSchedule.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +23 -43
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuDialog.d.ts +9 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js +15 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/useBottomMenuItemDialog.d.ts +19 -0
- package/mobile/lib/components/StickyBottomMenu/useBottomMenuItemDialog.js +12 -0
- package/mobile/lib/components/StickyBottomMenu/useBottomMenuItemDialog.js.map +1 -0
- package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.d.ts +0 -1
- package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.js +1 -1
- package/mobile/lib/components/StickyBottomMenu/useBurgerMenuDialog.js.map +1 -1
- package/mobile/lib/data/StickyMobileData.d.ts +2 -2
- package/mobile/src/components/OfficesAtmsMap/renderWorkSchedule.tsx +12 -5
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +27 -67
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenuDialog.tsx +39 -0
- package/mobile/src/components/StickyBottomMenu/useBottomMenuItemDialog.tsx +54 -0
- package/mobile/src/components/StickyBottomMenu/useBurgerMenuDialog.tsx +1 -2
- package/mobile/src/data/StickyMobileData.ts +2 -2
- package/package.json +1 -1
- package/src/components/OfficesAtmsMap/renderWorkSchedule.tsx +12 -5
- package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +27 -67
- package/src/components/StickyBottomMenu/StickyBottomMenuDialog.tsx +39 -0
- package/src/components/StickyBottomMenu/useBottomMenuItemDialog.tsx +54 -0
- package/src/components/StickyBottomMenu/useBurgerMenuDialog.tsx +1 -2
- package/src/data/StickyMobileData.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const 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};const h=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 u(){return u._impl()}u._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),u.setup=e=>{u._impl=e};const p=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),g={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","":""},x=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:x})=>{const f=c,b=u(),[y,v]=n(!1);a((()=>h.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(f,{className:p("@container font-sans",N?"group":"",g[t],y?"hidden":"",r||i,e),...N?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:d,style:x,children:m})})),f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=d((({children:e})=>f?e:null)),y=d((({className:e,size:t})=>o("figure",{className:p("m-0 mt-xl min-w-[80%]",e),children:v(t)}))),v=(e=3)=>w(100,e).map((e=>Math.floor(e))).map(N),N=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),w=(e,t)=>[e].concat(t>0?w(e/1.618,t-1):[]),k={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"},S=d((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=k[l]||"h3";return o(i,{role:"heading",className:p("font-sans m-0",C[t],e),children:n||a})})),T=d((({children:e,...t})=>o("p",{className:p("font-sans",Object.values(t)),children:e}))),I={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"}},B=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=I[l],u={marginTop:h.descriptionStyle};return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[n?o(S,{className:p("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:n}):null,a?o(T,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...u,children:a}):null]})})),M=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),R=[];function V(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=M,blocksRegistry:r={},ancestors:s=R}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:p(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 P=[],z=(e,{key:t,ancestors:l=P,slotName:n=null,extraProps:a,renderProps:i=V,...r})=>{const s=a?(e,t)=>V(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||P,[r.parent,n]]:l},a)))};function A({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?z(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const D=e=>e&&!e.endsWith("/")?`${e}/`:e,j=["CDN","BASE_PATH"],E=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return j.includes(t)?D(l):l}}),$=e=>Boolean(e?.includes(":")),L=(e,t)=>Boolean(e&&!$(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),_=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),F=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var U=Object.freeze({__proto__:null,isURL:$,isLocalURL:L,isHash:O,withoutQuery:_,joinPath:F});const H="/api/",W=`${H}v1/storage`,K=e=>(t,l=E.BASE_PATH)=>{if([!t,$(t),O(t),[E.CDN,H].some((e=>q(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${W}/${t}/attachment`;const n=t?.startsWith("/");return F(q(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},q=(e,t)=>t&&e&&e.startsWith(t),Y={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},G=d((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const d=u(),m="normal"===i?`${l}.svg`:`sprites.svg#${l}`,h=K(d)(F(E.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:X(e,s)}):o(J,{className:e,children:c("svg",{className:p(Z(r),Y[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})]})})})),X=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},Z=e=>e?"":"w-full h-full",J=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Q=(e,t)=>l=>l&&!$(l)?K(e)(F(t,l)):l,ee=(e,t)=>e?.media&&t?.media?e.media-t.media:0,te=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=u();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(ee).map((({src:e,format:l,media:i},r)=>o("source",{srcSet:Q(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:Q(a,n)(t.src)},l):null]})})),le=(e,t="")=>o("img",{src:e.src,className:p("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=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?o(G,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):o(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={})=>h.fire("dialog",{type:"open",dialog:e,...t}),close:()=>h.fire("dialog",{type:"close"}),closeAll:()=>h.fire("dialog",{type:"close",all:!0})}),he=e=>he._impl(e);function ue(e={}){const{isRemote:t,basePath:l}=e,n=u(),{closeAll:a}=me();return e=>({...e,href:t&&!l?e.href:K(n)(e.href,l),"aria-label":e.text,onClick:he(i(e))});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&L(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}he._impl=e=>e,he.setup=e=>{he._impl=e};const pe=(e={})=>Object.entries(e).reduce(((e,[t,l])=>({...e,[`data-${t.toLowerCase()}`]:l})),{}),ge=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=fe(e)?"hidden lg:block":"";return c("div",{className:p(xe(e),"flex gap-xs"),children:[n?o("div",{className:p(r,ce[i]),children:n}):null,fe(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:p(r,ce[i]),children:a}):null]})})),xe=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 p("group/btn items-center justify-center",fe(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},fe=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),be=({className:e,rounded:t,version:l})=>["inline-block",oe,l?se[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ye=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(),l.stopPropagation();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=ue()({onClick:r,href:n,...a}),c=t??o(ge,{...s});return o(e?Ne:ve,{...s,children:c})})),ve=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m})=>o("a",{className:de({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,type:c,...pe(d),children:m}))),Ne=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:be({className:e,rounded:n,version:l}),children:a})));function we(e,t,l=!1){const n="primary"===e?"white":"black",a="Вернуться назад";return c("div",{className:p(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("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:o(ae,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:n}})}),o(ye,{version:"link",className:"group-data-secondary:text-white/80",text:a,ariaLabel:a,onClick:t,type:"button"})]})}const ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Ce=d((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:r="",buttons:s,leftImage:d,rightImage:m,imageAlign:h,isImageAlwaysOnRight:g=!1,isImageSecondary:x=!1,backwardButton:f,children:b,...y})=>{const v=u(),N=i((()=>{v.back()}),[]);return c("div",{className:Se(n,l,e),children:[f?we(t,N):null,a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:p("grow relative flex flex-col @xl:flex-row gap-3xl w-full",d?"self-start @xl:w-auto":""),children:[Re(d,{imageAlign:h,className:"mx-auto"}),c("div",{className:p("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]}),Me(A({...y,extraProps:{className:"@container-normal"}})),Re(m,{className:p("@xl:justify-self-end @xl:col-start-2",s?Te(g):"",Ie(g),Ve(x)),imageAlign:h}),Be(s)]})]})]})})),Se=(e="",t="",l="")=>p("relative flex flex-col gap-3xl overflow-hidden",e||t,l),Te=e=>e?"row-span-2":"@xl:row-span-2",Ie=e=>e?"col-start-2 self-center":"",Be=e=>e?o("div",{className:"self-end",children:e}):null,Me=e=>e&&e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Re=(e,{className:t,imageAlign:l})=>e?o("div",{className:p("shrink-1/2 justify-self-center",l&&ke[l],t),children:e}):null,Ve=e=>e?"hidden @xl:block":"",Pe=(e=[])=>e.reduce(((e,t)=>e+t),0),ze=(e=[])=>e?.length?Pe(e)/e.length:0,Ae=(e,t="normal")=>e?o("div",{className:p("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(ae,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:p(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),je=(e,t)=>e?o(T,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ee=d((({children:e,...t})=>o("span",{className:p("font-sans",Object.values(t)),children:e}))),$e=(e,t)=>e?o(Ee,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Le=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?o(De,{...e},`rte-${t}`):["label"in e?$e(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:je(e.description,t)},String(t)):null],Oe=d((({className:e,benefitsVersion:t,...l})=>c("div",{className:p("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in l?Ae(l.icon,t):null,o("div",{children:Le(l)})]}))),_e=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Fe=e=>{return((t=e.map(_e))?.length?Math.sqrt(Math.abs(ze(t.map((e=>e**2)))-ze(t)**2)):0)>16;var t},Ue=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),He=e=>!e.some(Ue),We=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:p("flex gap-x-m gap-y-s",Fe(l)||He(l)?"flex-col":"flex-wrap",e),role:"list",children:l.map(((e,l)=>o(Oe,{benefitsVersion:t,...e},String(l))))}):null)),Ke=d((({className:e,benefits:t})=>t?.length?o("div",{className:p("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Le)}):null)),qe=d((({isTabularBenefits:e,...t})=>o(e?Ke:We,{...t}))),Ye=e=>Boolean(e?.src||e?.icon),Ge=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:p("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),role:"group",children:e.map(Xe(l))}):null,Xe=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=Ze(a,r),d=Ze(i,r);return n||a?.icon?o(ye,{className:p("basis-full @lg:basis-auto",e),appendLeft:Je({...a,iconVersion:c}),appendRight:Je({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},Ze=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Je=e=>Ye(e)?o(ae,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Qe=d((({className:e,isDotted:t,dotClassName:l,children:n})=>c("div",{className:p("font-sans flex",e),role:"listitem",children:[t?o("div",{className:"shrink-0",children:o("div",{className:p("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,o("span",{children:n})]}))),et={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"}},tt=d((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=et[n];return l?.length?o("section",{className:p("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(Qe,{isDotted:t,dotClassName:p(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),lt=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),nt=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(at)}):null)),at=({label:e,amount:t},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Ee,{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:[lt(2)(t)," ₽"]}):null]},String(l)),it=d((({className:e,tags:t})=>t?.length?o("div",{className:p("flex flex-wrap gap-xs",e),role:"list",children:t.map(rt)}):null)),rt=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ee,{size:"text-m",font:"font-light",children:e})},String(t)),st={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},ot=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:S,...T})=>{const I=y?.src?o(ae,{image:y}):null,M=o(B,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),R=m?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return o(Ce,{className:e,padding:t,defaultPadding:l,...u?{title:M}:{insetTitle:M},...ct(I,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ge(b),backwardButton:C,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?o(qe,{benefitsVersion:s,isTabularBenefits:d,benefits:R}):null,h?o(De,{__html:h}):null,p?.length?o(tt,{items:p,isDotted:g,listItemSize:st[i]}):null,S,x?.length?o(nt,{priceList:x}):null,dt(f)]})})})),ct=(e,t)=>t?{rightImage:e}:{leftImage:e},dt=e=>e?.length?o(it,{tags:e}):null,mt=e=>Boolean(e&&Array.isArray(e)),ht=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),ut=(e,t)=>{return l=e,Boolean(ht(l)&&"string"==typeof l.$ref)?t.ref(e):ht(e)?t.record(e):mt(e)?t.array(e):t.scalar?t.scalar(e):e;var l},pt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(gt,e),gt=(e,t)=>e&&t?ht(e)?e[t]:mt(e)?e[parseInt(t,10)]:e:e,xt=(e,t)=>ut(e,{ref:({$ref:e,...l})=>xt(e?pt(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:xt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>xt(e,t)))}),ft=(e,t,l=[])=>{ut(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)ft(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)ft(e[n],t,[...l,n])}})};async function bt(e,t){try{return e?await yt(e,t):null}catch(e){console.error(e)}return null}const yt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),vt=e=>[...new Set(e)],Nt={},wt=["/portal-resources"],kt=(e,t)=>xt(e,(e=>t?.[e])),Ct=(e,t)=>{const l=(e=>{const t=[];return ft(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(vt(e).filter((e=>!wt.some((t=>e.startsWith(t))))).map((async e=>[e,Nt[e]||=await yt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?kt(e,{...t,...i}):e};function St(e,t={}){const l=d((t=>{const l=Ct((({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 Tt=St((({className:e,padding:t,...l})=>o(x,{className:p("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(ot,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),It=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>Bt(0,t?.length)),[t]),n=t?.[l];return n?o(b,{children:o(Tt,{...n,...e})}):o(x,{...e,children:o(y,{})})})),Bt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Mt=e=>e?.replace(/[^+\d]/g,"");function Rt(){return{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?"email":"mail"]:r,...Vt(i),...t?{birthday:s?.toLocaleString()}:{inn:o,fullName:c},..."FEEDBACK"===n?{}:{addressBranch:d,bankEmpolee:h,applicationDate:u,...Pt(m)},...p};try{const e=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(g)});if(!e?.ok)return null;return await e.json()}catch(e){return null}}}}const Vt=(e,t)=>e?{[t?"phoneNumber":"phone"]:Mt(e)}:{},Pt=e=>e&&"+7 ("!==e?{secondaryPhoneNumber:Mt(e)}:{},zt=d((({responseType:e})=>{const t="OK"===e,l=t?"ResponseOKIcon":"ResponseFailIcon";return c("div",{className:p("flex items-center p-lg rounded-md space-x-m",t?"bg-ok":"bg-fail"),children:[o(ae,{image:{icon:l,iconVersion:"normal"},width:"42",height:"42"}),c("div",{children:[o(S,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),At=e=>e,Dt=(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=At,format:n=At}=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}]},jt=e=>o("div",{className:"h-6",children:e?o(Ee,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null});function Et(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 $t=(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}`}},Lt=e=>e?o(Ee,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Ot=d((({key:e,className:t="",id:l,name:n,type:r="text",label:d,placeholder:m,value:h="",valid:u=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&w.current?.focus()}),[v,w]);const C="w-full border rounded-md text-primary-text outline-none p-m",S=g?"pr-3xl":"",T=_t(u);return c("div",{className:p("relative",t),children:[c("label",{className:"space-y-xs",children:[Lt(d),N?o("textarea",{className:p("block resize-y min-h-24",C,T),id:p("textarea",l),name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:p("h-14",C,S,T),ref:w,id:l,name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),_t=e=>e?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error",Ft=e=>e?.text||e?.key||"";function Ut(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function Ht(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return Ut(globalThis.document,"click",l),t}const Wt=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Kt=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 shadow-2xl",role:"list",ref:e,children:Wt(t,n).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:Ft(e)}),o(G,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:p("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function qt({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>h.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>h.fire("popup",{type:"update",popup:e,...t}),close:()=>h.fire("popup",{type:"close"})},u=i((()=>{m.close(),c&&c()}),[c]),p=i((e=>{u(),r&&r(e)}),[u,r]),g=s(null),x=Ht(u);return a((()=>{if(!e||!g.current)return;const a=g.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(Kt,{popupRef:x,options:t,value:l,query:n,onChange:p,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,l,n,p]),g}const Yt=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:h="black",onChange:u,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=Et(),[y,v]=n(""),N=g||0===l.length,w=x&&!N,k=i((()=>{v(""),f()}),[]),C=qt({isOpen:x,options:l,value:a,query:y,onChange:u,onClose:k,iconVersion:h});return c("div",{className:p("space-y-xs",e),children:[Lt(t),c("div",{className:p("relative",w?"z-20":"z-10"),ref:C,children:[c("div",{className:p("h-14 [&>*]:p-m pr-8 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",Xt(s,r,N)),onClick:w?k:b,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Ft(a)||d}),Gt(w,h)]}),m&&w?o("div",{className:p("absolute top-0 w-full z-20"),children:o(Ot,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),Gt=(e,t)=>o(G,{className:p("absolute right-3 flex self-center",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Xt=(e,t,l)=>p(e?"border rounded-md ":"",e&&!l?"hover:border-primary-hover":"",l?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Zt=()=>{},Jt=({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=Qt(t,e),c=el(t,i,r);h.push(o("td",{children:o("div",{className:tl(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},Qt=(e,t)=>t&&e.toDateString()===t.toDateString(),el=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),tl=(e,t)=>p("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),ll=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],nl=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=Zt})=>{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:ll.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Jt({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),al=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],il=al.map((e=>({key:e}))),rl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),sl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},ol={className:"min-w-32",iconVersion:"black",isBorder:!1},cl=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=Et(!1),[u,g]=n(l?.getMonth()||(new Date).getMonth()),[x,f]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:C,ref:S}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=Ht(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(al.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:il,yearsOptions:rl,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:h,selectedYear:x,selectedMonth:u,showCalendar:m});return c("div",{className:p("space-y-xs",e),ref:S,children:[Lt(t),c("div",{className:"relative",children:[dl(C,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(G,{...sl,className:"-rotate-90 cursor-pointer"})}),o(Yt,{onChange:v,value:{key:al[u]},options:w,...ol}),o(Yt,{onChange:N,value:{key:String(x)},options:k,...ol}),o("div",{className:"my-auto",onClick:y,children:o(G,{...sl,className:"rotate-90 cursor-pointer"})})]}),o(nl,{today:l,currentMonth:u,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),dl=(e,t,l)=>c("div",{onClick:e,className:p("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(T,{children:t&&$t(t)}),o(G,{...sl,name:"CalendarIcon"})]}),ml=d((({className:e,label:t,error:l,...n})=>c("div",{className:p("shrink-0 w-full",e),children:[o(cl,{label:t&&n?.errors?`${t}*`:t,valid:Boolean(!l),...n}),jt(l)]}))),hl=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,type:d,...m})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Ot,{type:d||"text","aria-label":t,label:t&&m?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:m?.errors&&!t?`${n}*`:n}),jt(a)]}))),ul=e=>"_"===e,pl=e=>/\d/.test(e),gl=e=>ul(e)||pl(e),xl=[..."+7 (___) ___-__-__"],fl=xl.findIndex(ul),bl=xl.map(((e,t)=>gl(e)?xl.slice(0,t).filter(gl).length:-1));const yl=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=xl.map(((e,l)=>pl(e)?e:t.charAt(bl[l])||e)),n=bl.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(fl,n)):l).join("")}(e))),[t]);return o(Ot,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),vl=d((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(yl,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),jt(n)]}))),Nl=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(Yt,{...n,valid:!l,label:n?.errors?`${t}*`:t}),jt(l)]}))),wl=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],kl=e=>!e?.length,Cl=e=>t=>l=>e(l)?[]:[t],Sl=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Tl=e=>null!=e,Il=new Map,Bl=e=>Boolean(e?.every((e=>Array.isArray(e)?Bl(e):!e||"string"==typeof e))),Ml=e=>Bl(e)?e.toString():"";function Rl(e,t,{fallback:l,cache:i}={}){const s=r((()=>Vl(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(Tl))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=Il)=>l=>{const n=Ml(l),a=t.get(n);if(n&&Tl(a))return a;const i=e(...l);return n&&Tl(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 Vl(e){return Array.isArray(e)?e:e instanceof Function?Vl(e()):[e]}const Pl=[];const zl=async e=>await bt(e,{method:"GET"})||Pl;function Al(){const{data:e}=Rl("/api/v1/branchesByRegions",yt);return Array.isArray(e)?e:[]}const Dl=e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)),jl="Некорректно заполненное поле",El=Cl((e=>null!=e&&""!==e))(jl),$l=Cl((e=>e?.key&&""!==e?.key))(jl),Ll=Cl((e=>"string"==typeof e&&e.length>1))(jl),Ol=Cl((e=>"string"==typeof e&&(10===e.length||12===e.length)))(jl),_l=(Fl=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Cl((e=>"string"==typeof e&&Fl.test(e))))(jl);var Fl;const Ul=Cl((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Hl={typeForm:El,surname:Ll,name:Ll,region:$l,addressBranch:$l,phone:_l,birthday:El,email:El,fullName:Ll,inn:Ol,partnerComments:El,collectionCount:El,comment:El,acquiringType:$l,serviceType:$l,consentDataProcessing:Ul,annualRevenue:El},Wl=(e,t,l=!1)=>l?Sl(e,t):e,Kl=d((({field:e,input:t,isPremium:l=!1})=>{const n=e("region")?.value?.key,i=e("region")?.value?.text,r=l?Al()?.find((e=>e?.region===i))?.branches:function(e){const{data:t}=Rl(e?`/api/v1/branches?regionCode=${e}`:null,zl);return t||Pl}(n)?.filter((e=>e?.address));return a((()=>{""!==e("region")?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[e("region")?.value]),o(Nl,{label:"Адрес",placeholder:"Выберите адрес",options:(r||[]).map((({address:e=""})=>({key:e,text:e}))),...Wl(e("addressBranch"),Hl.addressBranch,t?.required)})}));function ql(){const{data:e}=Rl("/api/v1/regions",yt);return Array.isArray(e)?e:[]}const Yl=d((({field:e,input:t})=>{const l=ql();return o(Nl,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...Wl(e("region"),Hl.region,t?.required)})})),Gl=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)}))}))),Xl=[{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"}],Zl=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(Gl,{paths:Xl,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:p("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Ql(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Jl(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?d:null,l?o("div",{className:"ml-s",children:o(Ee,{size:"text-l",font:"font-light",children:l})}):null]})})})),Jl=e=>e?"radio":"checkbox",Ql=e=>p("rounded border",e?"bg-primary-main":""),en=d((({text:e,link:t})=>c(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[o(Ee,{children:e}),t?o(ye,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:o(Ee,{children:t.text})}):null]})));function tn({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const ln={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"},nn={primary:p("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:p("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")},an=d((({children:e,...t})=>{const l=e=>({...e,onClick:he(tn(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:p("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?"":p(ln[a],nn[a]),c?"rounded-md":"",n),type:s,role:d,onClick:m,children:e})})),rn=(e,t)=>o(an,{className:p("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),sn=(e,t,l)=>c("div",{className:"flex col-span-2 gap-m flex-col lg:flex-row w-full justify-between items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3",children:[o(Zl,{...e}),o(en,{link:t})]}),jt(Sl(e,Ul).error)]}):o(en,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),rn(l)]}),on=d((({title:e,children:t})=>c("fieldset",{className:"grid @xl:flex @xl:justify-between gap-m border-b border-b-main-divider @xl:border-none",children:[e?o("legend",{className:"w-full",children:o(S,{title:e,headingType:"h6",className:"@xl:text-center"})}):null,t]}))),cn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],dn=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],mn=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],hn={surname:"",name:"",middleName:"",typeForm:{key:"FEEDBACK",text:"Задать вопрос по продуктам и услугам"},serviceDirection:{key:"Физическое лицо"},birthday:void 0,feedbackMethod:{key:"Телефонный звонок"},phone:"",email:"",comment:"",consentDataProcessing:!1},un={typeForm:El,region:El,surname:El,name:Ll,feedbackMethod:El,phone:_l,email:El,comment:El,consentDataProcessing:Ul},pn=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{gn(e,l)}),[l]),[,{field:a,...r}]=Dt(hn,{onSubmit:n}),s="FEEDBACK_QS"===a("typeForm").value?.key,d=fn(a("typeForm").value?.key,a("serviceDirection").value?.key);return o("form",{className:"container space-y-m",onSubmit:r.onSubmit,children:o(on,{children:c("div",{className:"w-full max-w-xl space-y-s m-auto",children:[o(Nl,{label:"Тема",placeholder:"Выберите тему",options:cn,...Sl(a("typeForm"),El)}),s?o(Nl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:mn,...Sl(a("serviceDirection"),El)}):null,o(Yl,{field:a}),s?o(Kl,{field:a}):null,c("div",{className:"space-y-s",children:[o(hl,{label:"Фамилия",...Sl(a("surname"),Ll)}),o(hl,{label:"Имя",...Sl(a("name"),Ll)}),o(hl,{label:"Отчество (Обязательно, при наличии)",...a("middleName")}),o(ml,{label:"Дата рождения",...Sl(a("birthday"),El)})]}),d?c("div",{children:[o(hl,{label:"ИНН",...Sl(a("inn"),Ol)}),o(hl,{label:"Наименование организации",...a("fullName")})]}):null,o(Nl,{label:"Способ получения ответа",options:dn,...Sl(a("feedbackMethod"),El)}),o(vl,{label:"Телефон",...Sl(a("phone"),_l)}),s?c("div",{children:[o(vl,{label:"Дополнительный телефон",...a("secondaryPhone").value&&"+7 ("!==a("secondaryPhone").value?Sl(a("secondaryPhone"),_l):a("secondaryPhone")}),o(hl,{label:"Электронная почта",...Sl(a("email"),El)}),o(hl,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...a("bankEmpolee")}),o(hl,{label:"Дата и время обращения в Банк",...a("applicationDate")})]}):o(hl,{label:"Электронная почта",...Sl(a("email"),El)}),o(hl,{...Sl(a("comment"),El),placeholder:"Ваше сообщение",isTextarea:!0}),sn(a("consentDataProcessing"),t,e)]})})})})),gn=(e,t)=>{const l=fn(e?.typeForm.key,e?.serviceDirection?.key),n=wl({...un,...xn(e,l)});kl(n(e))&&t(e,!l)},xn=(e,t)=>t?{addressBranch:El,inn:Ol}:"FEEDBACK"===e.typeForm.key?{birthday:El}:{addressBranch:El},fn=(e="",t="")=>"FEEDBACK_QS"===e&&"Юридическое лицо / ИП"===t,bn={ApplicationFormFeedback:pn},yn=Rt(),vn=St((({className:e,formBlock:t,...l})=>{const[a,r]=n(""),s=i((async(e,t=!1)=>{const l=wn(e),n=await yn.send(l,t)?"OK":"Fail";return r(n),n}),[]);return o(x,{className:e,defaultPadding:"p-6xl",...l,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?.title?o(S,{headingType:"h3",title:t.title,className:"@xl:text-center"}):null,t?Nn(t,s):null,a?o(zt,{responseType:a}):null]})})})),Nn=(e,t)=>{const l=e?.formType;if(!l||!(l in bn))return null;return o(bn[l],{...e,onSubmit:t})},wn=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(t?.region?t?.text:t?.key)||t]))),kn=d((e=>{const{className:t,title:l,responseType:n,children:a,...i}=e;return o(x,{className:t,defaultPadding:"p-6xl",...i,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[l?o(S,{headingType:"h3",title:l,className:"@xl:text-center"}):null,a,n?o(zt,{responseType:n}):null]})})})),Cn=d((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Zl,{text:t,value:l,disabled:a,onChange:r},n),jt(i)]}))),Sn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Tn=d((({field:e,input:t})=>o(Nl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Sn,...Wl(e("acquiringType"),Hl.acquiringType,t?.required)}))),In=(e="")=>Boolean("trade"===e||"all"===e),Bn=(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}},Mn=(e,t,l)=>Math.max(t,Math.min(e,l));function Rn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function Vn({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:p("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=Rn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const Pn=1,zn=100,An=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:Pn),max:s=(a.length?a.length-1:zn),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:u}=e,g=Bn(e,{normalize:(e=0)=>a.length?Dn(a)(e):Mn(e,r,s),format:lt()}),x=i((e=>{u&&u(Rn(e.target?.value))}),[u]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,o("input",{className:p("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:x,...g}),Vn({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:u})]}),jn(n)]})})),Dn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),jn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),En=["От 1 000 ₽","До 1 000 000 000 ₽"],$n=d((({field:e})=>o(An,{title:"Сумма, ₽",items:En,min:1e3,max:1e9,...e("amount")}))),Ln=d((({field:e,input:t})=>o(hl,{className:"col-span-2",...Wl(e("comment"),Hl.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),On=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:p("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:p("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),_n=d((({field:e})=>In(e("acquiringType")?.value?.key)?o(On,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Fn=d((({field:e})=>In(e("acquiringType")?.value?.key)?o(On,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Un=d((({field:e,input:t})=>{const l=Al(),n=r((()=>l?.map((({region:e})=>({key:e,text:e})))),[l]);return o(Nl,{label:"Регион",placeholder:"Выберите регион",options:n,...Wl(e("region"),Hl.region,t?.required)})})),Hn=["От 1 мес","До 15 лет"],Wn=d((({field:e})=>o(An,{title:"Срок, месяцев",items:Hn,min:1,max:180,...e("term")}))),Kn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],qn=d((({field:e})=>o(Nl,{label:"Тип обслуживания",options:Kn,...Sl(e("serviceType"),El)}))),Yn=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),role:"radio"}),t?o(Ee,{color:"text-primary-text",children:t}):null]})}))),Gn=["currencyControl","documentOperations","conversionTransactions","otherIssues"],Xn=d((({field:e})=>{const{value:t,onChange:l}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m space-x-m grid @xl:flex @xl:items-center",children:[o(Yn,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:l}),o(Yn,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:l}),o(Yn,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:l}),o(Yn,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:l})]})})),Zn=(e,t)=>(l,n)=>{const{required:a,...i}=l,r="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,s={surname:o(hl,{label:"Фамилия",...Wl(e("surname"),Hl.surname,a)}),name:o(hl,{label:"Имя",...Wl(e("name"),Hl.name,a),...i}),middleName:o(hl,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),phone:o(vl,{label:"Телефон",...Wl(e("phone"),Hl.phone,a)}),email:o(hl,{label:"Электронная почта",...Wl(e("email"),Hl.email,a)}),fullName:o(hl,{label:"ФИО",...Wl(e("fullName"),Hl.fullName,a),...i}),inn:o(hl,{label:"ИНН",type:"number",...Wl(e("inn"),Hl.inn,a)}),comment:o(Ln,{field:e,input:l}),region:r?o(Un,{field:e}):o(Yl,{field:e,input:l}),addressBranch:o(Kl,{field:e,input:l,isPremium:r}),birthday:o(ml,{label:"Дата рождения",...Wl(e("birthday"),Hl.birthday,a)}),isClient:o(Cn,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}),consentToReceiveMaterials:o(Cn,{...e("consentToReceiveMaterials"),text:"Согласен на получение информационных и аналитических материалов по электронной почте"}),partnerComments:o(hl,{...Wl(e("partnerComments"),Hl.partnerComments,a),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...i}),collectionCount:o(hl,{label:"Количество объектов инкассации",type:"number",...Wl(e("collectionCount"),Hl.collectionCount,a)}),acquiringType:o(Tn,{field:e,input:l}),onlineCheckout:o(_n,{field:e}),posTerminal:o(Fn,{field:e}),serviceType:o(qn,{field:e}),term:o(Wn,{field:e}),amount:o($n,{field:e}),annualRevenue:o(hl,{label:"Годовая выручка, ₽",...Wl(e("annualRevenue"),Hl.annualRevenue,a)}),vedTypes:o(Xn,{field:e})};return function({input:e,field:t}){const{condition:l}=e,{value:n}=t(l?.name||"");return!l||l?.values?.find((e=>e===n))}({input:l,field:e})?o("div",{children:s[l?.name]},String(n)):null};const Jn=e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:n,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:l=!1,posTerminal:n=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${In(t?.key)?`/Онлайн касса=${l}/POS-терминал=${n}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,h={...d,...ea(o),...Qn(c),...m?{partnerComments:m}:{}};return Object.fromEntries(Object.entries(h)?.map((([e,t])=>[e,t?.key||t])))},Qn=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},ea=e=>e?{vedTypes:Object.fromEntries(Gn.map((t=>[t,t===e])))}:{},ta={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",middleName:"",phone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e3,acquiringType:Sn[0],serviceType:Kn[0],vedTypes:Gn[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},la=(e,t="")=>{const l=Object.fromEntries(Dl(e).map((e=>[e,ta[e]])));return l?.serviceType&&"PREMIUMSERVICE"===t&&(l.serviceType=Kn[1]),{...l,typeForm:{key:t,text:""}}},na=Rt(),aa=d((({className:e,title:t,typeForm:l="",sections:a=[],button:r,link:s,endpoint:d,additionalParams:m,isContacts:h,...u})=>{const g=a?.flatMap((e=>e?.inputs))||[],x=la(g,l),[f,b]=n(""),y=i((async e=>{const t=sa(g,e),l=wl((e=>{const t=Dl(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Hl?.[e]])))})(t));if(!kl(l(e)))return"Fail";const n=Jn({...e,...m}),a=await na.send(n,"lead"===d)?"OK":"Fail";return b(a),a}),[]),[,{field:v,onSubmit:N}]=Dt(x,{onSubmit:y}),w=ra(g)?.name;return c(kn,{className:p("container space-y-m",e),title:t,responseType:f,...u,children:[c("form",{onSubmit:N,children:[a.map(((e,t)=>c("div",{className:p(ia(e.columns),"grid gap-x-m"),children:[e?.title?o("div",{className:"@xl:text-center @xl:col-span-2",children:e.title}):null,(e?.inputs||[])?.map(Zn(v,l))]},`section-${t}`))),sn(w?v("consentDataProcessing"):void 0,s,r)]}),h?c("div",{className:"space-y-m",children:[o(S,{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(ae,{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(ae,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),ia=e=>2===e?"@xl:grid-cols-2":"",ra=e=>e?.find((e=>"consentDataProcessing"===e?.name)),sa=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((l=>l===t?.[e?.condition?.name])))),oa="text-left",ca={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},da=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:p("rounded-icon object-fit flex justify-center items-center",ca[l],e),children:o(G,{...i,width:"54%",height:"54%",name:a})}):null})),ma=d((({className:e="",title:t,benefitList:l,...n})=>c(x,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(S,{headingType:"h3",as:"h2",className:oa,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(ha)}):null]}))),ha=({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(da,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?o(ae,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(S,{headingType:"h6",children:e}),o(Ee,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),o(tt,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),ua=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function pa(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 ga=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:pa(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:p("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:h,role:"listitem",children:d})})),xa=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],fa=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:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:l},b=s([]),y=i(((e,t)=>{const l=[...b.current||[]];l[e]=t,b.current=l,g&&g(l),x&&x(ya(l))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?ba(c,v):{},...N?ua(h):{},gap:`${r}px`};return o("div",{className:p("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,role:"list",children:(C=(e,l)=>o(ga,{className:p(m,a?xa[a-1]:"",N?"h-full":"",t),style:w?ba(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(C):C(e,0))(u)});var C})),ba=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),ya=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),va={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Na={"horizontal-list":"w-6","vertical-list":"h-6"},wa=d((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?o("div",{className:p("flex gap-xs",va[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?Na[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)),ka=e=>e,Ca=(e=ka)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Sa=Ca(),Ta=(e=ka)=>Ca((t=>-e(t))),Ia=Ta(),Ba=e=>t=>e.scrollWidth/t,Ma=e=>(t,l)=>{e.scrollBy({left:l*Ba(e)(t),behavior:"smooth"})},Ra=({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?[Ta()(a),Ca()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Ma(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Ma(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}]},Va=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]=Ra({itemCount:m,onVisibleIndicesChange:s}),[g]=u.visibleIndicesRange;return c("div",{className:p(e,"vertical-list"===d?"relative h-full":""),children:[o(fa,{containerRef:h,activeIndex:g,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:u.handleVisibleIndicesChange,listType:d,minHeight:i,children:r}),a?o(wa,{containerRef:h,activeIndex:g,dotCount:m,listType:d,version:t}):null]})})),Pa=(e,t,l)=>{return o(Va,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>c("div",{className:p("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?o(Ee,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?o(ae,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?o(Ee,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},za=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>c(x,{className:p("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[o(B,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Pa(e,0,t):null]}))),Aa={start:"justify-start",center:"justify-center",end:"justify-end"},Da=d((({buttons:e,className:t="",align:l,...n})=>{const a=l?p("flex",Aa[l]):"";return o(x,{className:p("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Ge(e)})})),ja=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,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const Ea=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})})})),$a=d((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r})=>c("div",{className:p("flex justify-between @xl:flex-col",e),children:[t?o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,o("div",l?{children:o(Ee,{size:"text-h3",children:[i,lt(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:o(Ee,{size:"text-h3",children:"-"})})]}))),La=Math.round(29.5),Oa={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},_a={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Fa={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Ua={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Ha={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Wa=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,[a,i]=((e,t,l)=>{const{maxBonus:n=5e3,prefMonthsNum:a=Fa.prefMonthsNum,prefTravelBonusRate:i=Fa.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*l),n);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*l),n)*(12-a)]})(t||Fa,l,n);return{...t,...e,monthBonus:a,yearBonus:i}},Ka=e=>e?o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,qa=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>c("div",{children:[o(Ee,{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:lt(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]})]}))),Ya=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(G,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Ga=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?o(Ya,{title:e,...i}):c("div",{children:[o("div",{className:"hidden @xl:block",children:o(qa,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),o("div",{className:"@xl:hidden",children:o($a,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function Xa({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${lt(2)(l.min||0)} ₽`,`До ${lt(2)(l.max||0)} ₽`];return o(An,{items:e?n:[],step:t,...l})}const Za=d((({className:e="",calcSource:t,buttons:l,footnote:n})=>{const[a,{field:i}]=Dt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:d,maxSumOther:m,monthBonus:h,yearBonus:u}=Wa(a,t);return c("section",{className:p("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:[Xa({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Xa({title:"Сумма покупок в остальных категориях, ₽",min:d,max:m,step:500,isShowItems:!1,...i("restExpenseValue")})]}),h>=0?Ga({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($a,{title:"Баллов за год",value:u}):null,Ge(l,{isVertical:!0}),Ka(n)]})]})})),Ja=d((({className:e,inputChildren:t,rateChildren:l,resultChildren:n})=>c("section",{className:p("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})]}))),Qa=(e,t=0)=>e?.sum?e.sum:t,ei=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,ti=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,li={horizontal:"gap-5xl",vertical:"flex-col gap-s"},ni=d((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>o("div",{className:p(`flex ${li[a]}`,l),role:"radiogroup",children:e?.map((({id:e,text:l})=>o(Zl,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),ai=({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(Ee,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",children:o(Ee,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(ni,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:p("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),ii=e=>ai({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),ri=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:si([e,t],n),si=([e,t],l=[])=>({[e]:l.length?Ia(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Sa(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),oi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],ci={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const di=(e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=l<90||l>730,c=function(e){const t=e?.rateType?ci[e?.rateType]:"",{data:l}=Rl(t?`/api/v1/depositrates/${t}`:null,yt);return Array.isArray(l)?l:[]}(t);if(l<=30)return{...Ha,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&mi(s,e)&&oi(n,["minSum","maxSum"],e)&&oi(l,["minDays","maxDays"],e)))||Ha,{rate:m}=d,h=hi(m,e),u=n+h,p=c||[Ha];return{...d,...si(["minSum","maxSum"],p),...si(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},mi=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,hi=(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)},ui=d((({className:e="",buttons:t,footnote:l,bottomFootnote:n,isShowDepositeName:a,defaultParams:i,rateParams:r})=>{const[s,{field:d}]=Dt({moneyValue:Qa(i,1e5),daysValue:ei(i,60),isReplenished:Boolean(i?.isReplenished),isPartialWithdrawal:Boolean(i?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(i?.isMonthlyInterestPayment)}),m=di(s,r),{income:h,finalSum:u,rate:p,isUnavailableByTerm:g,depositeName:x}=m;return o(Ja,{className:e,inputChildren:c("div",{children:[Xa({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(An,{items:[`От ${ti(f.min||0)}`,`До ${ti(f.max||0)}`],step:1,...f})),c("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[pi(m,d),ii({title:"Выплата процентов",orientation:"vertical",...d("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),rateChildren:Ga({rate:p,depositeName:x,isShowDepositeName:a,isUnavailableByTerm:g}),resultChildren:c("div",{children:[gi(u,h),Ge(t,{isVertical:!0}),Ka(l),Ka(n)]})});var f})),pi=(e,t)=>c("div",{className:"space-y-s",children:[o(Ee,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[o(Zl,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Zl,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),gi=(e,t)=>c("div",{className:"flex flex-col gap-2xl sm:gap-0 mb-lg",children:[o($a,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),o($a,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),xi=e=>fi({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&fi({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&fi({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&fi({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),fi=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],bi=(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)},yi=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows||[Oa],r=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>xi({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:s,maxSum:o}=ri(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=ri(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>xi({row:e,userInputParams:t,paramsViewSettings:l})&&oi(n,["minSum","maxSum"],e)&&oi(a,["minMonths","maxMonths"],e)))||Oa)({rateRows:i,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:h}=m,u=bi(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:n,monthsValue:a,monthlyPayment:u}},vi=({min:e=0,max:t=0,availableMonths:l,...n})=>o(An,{items:[`От ${Ni(e)}`,`До ${Ni(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Ni=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,wi=e=>ai({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),ki=d((({className:e,calcSource:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:d}]=Dt({moneyValue:Qa(r,2e5),monthsValue:ei(r,La),isAnnuity:Boolean(r?.isAnnuity),isInsurance:Boolean(r?.isEnableInsurance),isSalaryClient:Boolean(r?.isEnableSalaryClient),isPensionClient:Boolean(r?.isEnablePensionClient),isStateEmployee:Boolean(r?.isEnableStateEmployee)}),m=yi(s,t,i),h=wi({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")}),{onChange:u}=d("moneyValue"),{onChange:p}=d("monthsValue");return a((()=>{u&&u(Mn(s.moneyValue,m.minSum,m.maxSum))}),[m.minSum,m.maxSum]),a((()=>{p&&p(Mn(s.monthsValue,m.minMonths,m.maxMonths))}),[m.minMonths,m.maxMonths]),o(Ja,{className:e,inputChildren:c("div",{children:[Xa({title:"Сумма кредита, ₽",step:500,min:m.minSum,max:m.maxSum,...d("moneyValue"),value:m.moneyValue}),vi({title:"Срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Ci({...m,...i},d),o("div",{className:"sm:hidden",children:h})]}),rateChildren:Ga({rate:m.rate}),resultChildren:c("div",{children:[o($a,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:h}),Ge(l,{isVertical:!0}),Ka(n)]})})})),Ci=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Zl,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Zl,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Zl,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Zl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Si=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},Ti=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows?.[0]?Mi(t.rateRows[0].minMonths,t.rateRows[0].maxMonths):0,r=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=t?.rateRows?.find((t=>Bi({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r})&&Bi({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&oi(n,["minSum","maxSum"],t)&&oi(a||i,["minMonths","maxMonths"],t)))||Ua,{rate:c}=o,d=Ii(c,e),m=n+d,h=t?.rateRows||[Ua];return{...o,...si(["minSum","maxSum"],h),...si(["minMonths","maxMonths"],h),availableMonths:Si(h.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:i,income:d,finalSum:m}},Ii=(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)},Bi=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Mi=(e,t)=>e+Math.round((t-e)/2),Ri=d((e=>{const{className:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s}=e,[d,{field:m}]=Dt({moneyValue:Qa(s,2e4),monthsValue:ei(s),isMonthlyInterestPayment:Boolean(s?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(s?.isRemoteRegistration)}),h=Ti(d,l,r),{defaultMonth:u,rate:p,income:g,finalSum:x}=h,{onChange:f}=m("monthsValue"),{onChange:b}=m("moneyValue");return a((()=>{!d.monthsValue&&f&&f(u)}),[u]),a((()=>{b&&b(Mn(d.moneyValue,h.minSum,h.maxSum))}),[h.minSum,h.maxSum]),o(Ja,{className:t,inputChildren:c("div",{children:[Xa({title:"Сумма, ₽",min:h.minSum,max:h.maxSum,...m("moneyValue"),value:h.moneyValue}),vi({title:"Срок, месяцев",min:h.minMonths,max:h.maxMonths,availableMonths:h.availableMonths,...m("monthsValue"),value:h.monthsValue}),Vi({...h,...r},m)]}),rateChildren:Ga({rate:p}),resultChildren:c("div",{children:[o($a,{title:"Доход в конце срока",value:g,postfix:"₽",prefix:"+"}),o($a,{title:"Сумма в конце срока",value:x,postfix:"₽"}),Ge(n,{isVertical:!0}),Ka(i)]})})})),Vi=(e,t)=>{return c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?ii({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},ai({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Pi=e=>zi({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&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,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[_a],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Pi({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=ri(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=ri(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Pi({row:e,userInputParams:t,paramsViewSettings:l})&&oi(n+r,["minSum","maxSum"],e)&&oi(i,["minSumOld","maxSumOld"],e)&&oi(r,["minSumExtra","maxSumExtra"],e)&&oi(a,["minMonths","maxMonths"],e)))||_a)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=bi(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},Di=d((({className:e,calcSource:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=Dt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Ai(i,t,a),d=wi({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return o(Ja,{className:e,inputChildren:c("div",{children:[Xa({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),Xa({title:"Ежемесячный платёж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),vi({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),ji({...s,...a},r),s.isExtraMoney?Xa({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:Ga({rate:s.rate,fractionDigits:1}),resultChildren:c("div",{children:[o($a,{title:"Ежемесячный платёж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?o($a,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:d}),Ge(l,{isVertical:!0}),Ka(n)]})})})),ji=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Zl,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Zl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Zl,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Ei={CreditCalculatorForm:ki,DepositCalculatorForm:Ri,BusinessDepositCalculatorForm:ui,BonusCalculatorForm:Za,RefinancingCalculatorForm:Di},$i=St((({className:e,calculatorTabs:t=[],...l})=>o(x,{className:e,defaultPadding:"p-0",...l,children:Oi(t)}))),Li=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in Ei))return null;const l=Ei[t];return c("div",{className:"p-xl",children:[e?.calculatorBlock?.title?o(S,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,o(l,{...e.calculatorBlock,isMobile:!0})]})},Oi=e=>{if(!e||!e.length)return null;return 1===e.length?Li(e[0]):e.map(((e,t)=>o(ja,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>o(Ea,{isUnfolded:t,children:Li(e)}),renderFoldButton:_i(e)},t.toString())))},_i=e=>({isUnfolded:t,onToggle:l})=>{const n=e.nav?.align||"text-left";return c("button",{type:"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(G,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),c("div",{className:"flex-1 flex flex-col pl-s",children:[o(Ee,{align:n,color:"text-white",children:e.nav?.title}),o(Ee,{align:n,size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),o(G,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]})},Fi=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Bn(e,{normalize:(e=a)=>l&&n?String(Mn(Number(Ui(e)),l,n)):Ui(e),format:lt(r)}),d=i((e=>t&&t(Ui(e))),[t]);return o(Ot,{onChange:d,...s,...c})})),Ui=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Hi=d((e=>o(Fi,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ee,{size:"text-xl",font:"font-light",children:"₽"})})}))),Wi={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Ki={amount:1500},qi=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...d})=>{const[{amount:m},{field:h}]=Dt(Ki),[u,g]=n(!1);return a((()=>{g(m<=0)}),[m]),c(x,{className:p("flex flex-col items-center",e),defaultPadding:"p-6xl",...d,children:[t?o(S,{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:Wi[s],children:[o(Hi,{valid:!u,placeholder:i,label:l,max:3e5,min:1,...h("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:m}),r?.text?o(an,{className:"w-full mt-lg",type:"submit",disabled:u,children:r.text}):null]})]})})),Yi=(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}]},Gi=d((({className:e,disabled:t,...l})=>o(ye,{rounded:!0,className:p("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(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"})}))),Xi=d((e=>o(Gi,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Zi=d((e=>o(Gi,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Ji="absolute top-[calc(50%-24px)] z-40",Qi="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",er=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,g=a?t>0:d,x=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:"m:hidden block",children:[tr(e),g?o(Xi,{className:p(Ji,n?"left-1 m:left-8":"left-0"),onClick:f}):null,x?o(Zi,{className:p(Ji,n?"right-1 m:right-8":"right-0"),onClick:b}):null]})})),tr=e=>c("div",{children:[e.canScrollLeft?o("div",{className:p(Qi,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:p(Qi,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),lr=(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="ХИТ"}={})=>c("div",{className:p("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(G,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(T,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),ar="relative h-full",ir={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},rr=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(cr);return A({...n,renderProps:(n,a,r)=>c("div",{className:sr(n,{someCardsHighlighted:i}),children:[V(n,a,{className:or(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),cr(n)?nr({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},sr=(e,{someCardsHighlighted:t})=>p(ar,t&&(cr(e)?"pt-3xl":"pt-3xl sm:pt-16")),or=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>p(ar,"min-w-80",ir[n],t&&(cr(e)?"pt-3xl sm:pt-16":"pt-3xl"),lr(l),l&&"h-full"),cr=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,dr=St((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,isEmbedded:s=!1,cardSize:d="normal",...m})=>{const{blocks:h=[]}=m.block||{},u=t||h?.length,[g,{inc:f,dec:b}]=Yi({itemCount:u,visibleItemCount:l},Math.floor(l/2)),[y,v]=Ra({itemCount:u}),[N]=v.visibleIndicesRange,w=h&&"CarouselBankHistoryCard"===h[0]?.type;return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:"p-6xl",...m,children:[c("div",{className:p(a?"flex justify-center":"","relative max-w-full"),children:[o(fa,{containerRef:y,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:rr({noCardBorder:n,activeIndex:g,cardSize:d,...m})}),o(er,{scroll:v,arrowsPadded:i,onScrollLeft:b,onScrollRight:f,hasEdgeBlocks:w,activeIndex:g,itemCount:u})]}),o(wa,{className:"@5xl:hidden",containerRef:y,activeIndex:N,dotCount:u,listType:"horizontal-list"})]})}),{childrenTypes:["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),mr=d((({title:e,description:t,className:l})=>o(x,{className:l,defaultPadding:"p-6xl",children:o(B,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),hr="z-10 border border-solid w-full h-full",ur=p(hr,"absolute hidden @xl:block border-transparent"),pr=d((({className:e,title:t,description:l,button:n,...a})=>o(x,{className:p("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:p(ur,"top-9 right-12 bg-green-dark")}),o("div",{className:p(ur,"top-6 right-8 bg-green")}),o("div",{className:p(ur,"top-3 right-4 bg-green-light")}),c("div",{className:p(hr,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(B,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ge([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),gr={black:"bg-black",white:"bg-white"},xr=d((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(x,{className:p("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ce,{className:"h-full",padding:d,title:o(B,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(ae,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Ge([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(Ee,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(fr)]}):null,a?c(Ee,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),fr=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${gr[e]}`},String(t)),br="20",yr="absolute w-full h-full border border-white",vr=d((({className:e="",icon:t,...l})=>{const n=ue(),{text:a,href:i,target:r,onClick:s}=n(l);return a?o("div",{className:p("flex relative group/link pl-s pb-s sm:pr-2xs min-w-64 sm:min-w-72",e),children:c("div",{className:"relative min-h-16 w-full pb-lg sm:pb-0",children:[c("a",{className:p("absolute border\n bg-white flex items-center justify-between group-hover/link:text-primary-main","flex rounded-md lg:rounded-none w-full w-full p-lg whitespace-nowrap z-10"),role:"link",href:i,target:r,onClick:s,children:[c("div",{className:"flex items-center space-x-lg",children:[t?o(ae,{imageClassName:"text-green-dark",image:t,width:br,height:br}):null,o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})]}),o(ae,{className:"group-hover/link:brightness-100 sm:ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"color"},imageClassName:"group-hover/link:text-primary-main",width:br,height:br})]}),o("div",{className:p(yr,"-bottom-1 -left-1")}),o("div",{className:p(yr,"-bottom-2 -left-2")})]})}):null})),Nr=d((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>o(x,{defaultPadding:"p-5xl",className:p("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row sm:items-center gap-s justify-between",children:[c("div",{children:[o(B,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),o(B,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?wr(n,"sm:self-end sm:pt-s"):null]})}))),wr=(e,t="")=>{const l=Math.ceil(e.length/3);return o(dr,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",visibleItemCount:0,isEmbedded:!0,children:Array.from({length:l}).fill(null).map(((t,l)=>o("div",{className:"flex flex-wrap gap-2xs sm:gap-0 sm:justify-center",children:e.slice(3*l,3*(l+1)).map(((e,t)=>o(vr,{...e},String(t))))},String(l))))})},kr=d((({className:e="",href:t,target:l,isRemote:n=!1,onClick:a,children:i})=>{const r=ue({isRemote:n})({href:t,target:l,onClick:a});return o(t?"a":"div",{className:p("block",e),...t?r:{},role:t?"link":"none",children:i})})),Cr=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Sr=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}=(e=>Cr.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ye(n)?n:r,c=l?{text:a}:{text:""};return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:"color"},version:e?.version??i}})),h=p("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:p("flex flex-col gap-xs",e),children:[o("div",{className:"flex gap-xs",children:Ge(m,{className:p(a||s?"basis-full":""),buttonClassName:h})}),r?o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Tr=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:g,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},...v})=>o(x,{className:p("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...v,children:o(kr,{href:a,target:m,className:"h-full",children:c(Ce,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(B,{title:h,description:l,headlineVersion:"XS",isEmbedded:!0,align:u}),...ct(Ye(i)?o(ae,{image:i}):null,f),buttons:d.length?o(Sr,{media:d,showButtonText:!0,version:v?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(qe,{benefits:g}),o(tt,{items:r,isDotted:s,listItemSize:"S"}),Ir(n,u)]})})}))),Ir=(e,t)=>e?o(T,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Br=(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(Ee,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(Ee,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:Ge(a)}):null]},String(t))},Mr=d((({className:e="",title:t,align:l="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,...u})=>{const g=d.map(Br),[f,b]=s>0?[g.slice(0,s),g.slice(s)]:[g,[]],[y,v]=n(!1);return a((()=>h.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[]),c(x,{className:p("flex flex-col",e),defaultPadding:"p-2xl",...u,children:[Ye(i)?o("div",{className:"self-center",children:o(ae,{image:i})}):null,t?o(S,{className:p("pt-xs",l),headingType:"h5",title:t}):null,r?.text?o(ye,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(ja,{renderFoldableSection:()=>c("div",{children:[f,o(Ea,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>1?Rr(y,m?.parent):null}):o("div",{children:f})]})})),Rr=(e,t)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&h.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(G,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Vr=(e=!1)=>e?"text-white":"",Pr=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),zr=d((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>c("th",{className:"space-y-4 flex flex-col items-start",children:[e?o(ae,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&o("div",{children:o(ae,{image:t})}),l?o(S,{headingType:"h4",className:Vr(a),title:l}):null,n?o("div",{className:Pr(a),children:n}):null]}))),Ar=d((({cell:e,rowHeader:t,isFillGradient:l=!1})=>o("div",{className:"box-border flex flex-col",role:"cell",children:o("div",{className:p("h-full","border-main-divider border-b"),children:e?e.map(Er(l,t)):null})}))),Dr=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),jr=(e=!1)=>""+(e?"text-white":""),Er=(e,t)=>({label:l,description:n},a)=>c("div",{className:"flex justify-between text-s py-s",children:[o(T,{size:"text-s",color:Dr(e),children:t}),c("div",{className:"basis-1/2",children:[l?o("div",{className:"text-right",children:o(T,{size:"text-s",align:"text-right",color:jr(e),children:l})}):null,n?o("div",{className:"text-right",children:o(T,{size:"text-s",color:Dr(e),children:n})}):null]})]},String(a)),$r=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 o("tr",{className:"mb-m",children:c("td",{className:p("border border-gray rounded-md p-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),children:[o(zr,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>o(Ar,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?o(ye,{href:e.link.href,target:e.link?.target,version:s,ariaLabel:"Подробнее",className:"text-s font-medium mt-m p-s",children:e.link.text}):null,Lr({onToggleColumn:i,isFillGradient:n,showRow:a})]})})})),Lr=({onToggleColumn:e,isFillGradient:t,showRow:l})=>o("td",{className:"pt-lg",children:o("a",{role:"link",onClick:e,className:"cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:o(Ee,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),Or=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(S,{headingType:"h3",className:"font-medium text-center",title:l}):null,o("table",{className:"border-separate",children:o(_r,{...e})})]})})),_r=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($r,{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 o("tbody","horizontal"===r?{children:o(Va,{onVisibleIndicesChange:h,children:u})}:{children:u})})),Fr=e=>e%2!=0,Ur=d((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,role:r,...s})=>c(l,{tag:l,className:p("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Hr=d((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>o(Ur,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",role:"button",className:p("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(Ee,{size:"text-h4",children:t}),iconNode:l?o(ae,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Wr=({isUnfolded:e,onToggle:t})=>o(Hr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Kr=d((({title:e,description:t})=>c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ae,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(B,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:oa})]}))),qr=["ArrowDownIcon","ArrowUpIcon"],Yr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",Gr=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:p(t.length?"hidden":"block"),children:a?o(Kr,{...a}):null}),c("div",{className:p("space-y-2xs",t.length?"":"hidden"),children:[c("div",{className:p(Yr),children:[z(r,{...i.options,parent:n}),Fr(r.length)?o(It,{className:"col-span-6",...i}):null]}),o(ja,{renderFoldableSection:({isUnfolded:e})=>c(Ea,{className:p(Yr),isUnfolded:e,children:[z(s,{...i.options,parent:n}),Fr(s.length)?o(It,{className:"col-span-6",...i}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>o(Hr,{className:p(l<1?"hidden":""),disabled:!s?.length,label:e,icon:qr[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),Xr=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),Zr=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(On,{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))))),Jr=d((({children:e,filtrationSchema:t,resetButton:l,field:n,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,Xr(o("div",{className:"h-full w-px bg-gray"}))(Object.entries(t).map(Qr(n)).filter(Boolean))]}),l?o("div",{children:o(an,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:l?.text})}):null]}))),Qr=e=>([t,l])=>{const n=l?.type;return"array"===n?es(t,e)(l):null},es=(e,t)=>l=>"dropdown"!==l?.ui?ts(e,t)(l):null,ts=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[l?.title?o("div",{className:"mb-m",children:o(Ee,{size:"text-m",font:"font-medium",color:"text-primary-text",children:l.title})}):null,o(Zr,{items:n,multiple:!l?.single,...t(e)})]},e)};const ls=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,ns=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>ls(t[e])||ls(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>ls(t[e])||ls(l[e])||as(t[e])<=as(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>ls(t[e])||ls(l[e])||as(t[e]?.min)>=as(l[e]?.min)&&as(t[e]?.min)<=as(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>ls(t[e])||ls(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>ls(t[e])||ls(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),as=e=>Number(e||0),is=(e,{block:t,page:l,normalize:n=At})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=Dt(e),d=r((()=>function(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}(a,a.map((e=>kt(e.content,l?.fallback))))),[a,l?.fallback]),m=i===e?a:((e,t)=>(l=At)=>e?.filter((([,e])=>ns(t,l(e)||{}))).map((([e])=>e)))(d,i)(n);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},rs=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,ss=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),os=1e9,cs={sum:{min:1e4,max:os},period:3},ds=St((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=is(cs,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:ms(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),u=hs(h);return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Jr,{filtrationSchema:t,resetButton:l,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs",children:[o(Hi,{label:n?.title,min:500,max:os,...d("sum",{parse:e=>({min:Number(e),max:os}),format:({min:e})=>String(e)})}),o(An,{title:a?.title,items:["От 3 мес","До 5 лет"],list:u,...d("period")})]})}),o(Gr,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),ms=e=>vt((e?.paramsSource?.rateRows||[]).filter(rs).flatMap((e=>ss(e.minMonths,e.maxMonths)))),hs=e=>vt(e.flatMap((e=>e||[])).filter(rs).flatMap((e=>ss(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],us=e=>"Image"===e?.contentType&&e?.image?o(ae,{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,ps=d((({className:e="",title:t,description:l,error:n,button:a,...i})=>c(x,{className:p("flex flex-col justify-center items-center",e),defaultPadding:p("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:us(n)}),o(B,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(ye,{version:a?.version,text:a?.text,...a}):null]}))),gs="location";function xs(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])]})(h,"location",bs()??{name:e}),r=i((e=>{ys(e),l(e)}),[]),{data:s}=Rl(fs()?null:"/api/v1/region",yt);return a((()=>{s&&!fs()&&l(s)}),[s]),[t??{name:e},r]}const fs=()=>Boolean(globalThis.localStorage?.getItem(gs)),bs=()=>{try{const e=globalThis.localStorage?.getItem(gs);return e&&JSON.parse(e)}catch(e){return null}},ys=e=>{try{globalThis.localStorage?.setItem(gs,JSON.stringify(e))}catch(e){}};var vs;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(vs||(vs={}));const Ns=new Intl.NumberFormat("ru",{style:"currency",currency:vs.RUB}),ws=e=>e?Ns.format(e):"",ks="text-left text-m font-light text-secondary-text",Cs=`${ks} pl-5xl`,Ss={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Ts=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:`h-fit w-fit ${e}`,children:[o("thead",{children:c("tr",{children:[o("th",{className:ks,children:o(Ee,{size:"text-m",children:"Валюта"})}),o("th",{className:Cs,children:o(Ee,{size:"text-m",children:"Купить"})}),o("th",{className:Cs,children:o(Ee,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Is)})]}))),Is=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(ae,{image:{icon:Ss[t]},width:"24",height:"24"}):null,o(Ee,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl",children:o(Ee,{size:"text-h6",children:ws(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl",children:o(Ee,{size:"text-h6",children:ws(e?.buyExchangeRate)})})]},t)},Bs={icon:"GpsIcon"},Ms=d((({className:e="",address:t})=>c("div",{className:`flex gap-s ${e}`,children:[o(da,{...Bs,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(T,{size:"text-l",color:"text-primary-main",children:t}):null,o(T,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Rs=(e,t,l)=>{const n=Number(Vs(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)},Vs=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Ps=e=>t=>{const[,l]=e.find((([e])=>e(t)))||[];return l},zs=e=>Ps([[e=>e.value!==vs.RUB&&e.oppositeValue!==vs.RUB,()=>e.handleConvert(e.value,vs.RUB)],[e=>e.value===vs.RUB&&e.oppositeValue===vs.RUB,()=>e.handleConvert(e.value,vs.USD)],[e=>e.value===vs.RUB&&e.oppositeValue===vs.RUB,()=>e.handleConvert(e.value,vs.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function As(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(Ot,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(Yt,{isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Ds=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||vs.RUB,selectBuy:l?.[0]?.currency?.currency||vs.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[As({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:js(r,d,l),value:r.inputSell,setValue:e=>$s(d,l)(e,r.selectSell,r.selectBuy)}),As({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Es(r,d,t),value:r.inputBuy,setValue:e=>Ls(d,t)(e,r.selectBuy,r.selectSell)}),a?.text?o(ye,{text:a.text,version:a?.version,...a}):null]})})),js=(e,t,l)=>n=>{t({selectSell:n}),zs({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{$s(t,l)(e.inputSell,n,a)}})},Es=(e,t,l)=>n=>{t({selectBuy:n}),zs({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Ls(t,l)(e.inputBuy,n,a)})},$s=(e,t)=>(l,n,a)=>{e({inputSell:Vs(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputBuy:String(Rs(l,i,n===vs.RUB)||"")})},Ls=(e,t)=>(l,n,a)=>{e({inputBuy:Vs(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputSell:String(Rs(l,i,n===vs.RUB)||"")})};const Os=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=xs(),i=function(e){const t=e?.code||"000",{data:l}=Rl(`/api/v1/exchangerates?regionCode=${t}`,yt);return l||{}}(a),r=_s(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:vs.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:vs.RUB}}),o(x,{className:p("box-border min-h-80",e),...n,children:o(Ce,{className:"h-full",title:o(S,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap sm:flex-nowrap",children:[c("div",{className:"max-w-1/2",children:[r?o(Ts,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Ms,{address:i?.address})]}),r.length&&s.length&&d.length?o(Ds,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:l}):null]})})})})),_s=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Fs=(e,t)=>o(da,{...e,iconBgVersion:t,className:"shrink-0"}),Us=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(Ur,{tag:"button",className:p("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:[Fs(a,t),e?o(Ee,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(G,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),Hs=St((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>o(x,{className:p("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(ja,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Ea,{className:p("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:A({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ws({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),Ws=({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(Us,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):o(Hr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Ks=d((({className:e="",items:t})=>c("div",{className:e,children:[t?.length?t.map(qs):null,o(ye,{version:"primary",className:"w-full",href:"https://www.rshb.ru/natural/feedback/question",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),qs=(e,t)=>c("div",{className:"mb-m space-y-m",children:[o("div",{children:o(Ee,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(Ys)})]},String(t)),Ys=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Gs(e.type,e.text)}),o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Gs=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Xs(t)}`,children:o(Ee,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Xs=e=>e.replaceAll(/\D/g,""),Zs=["split_version","New","Old"],Js=d((({className:e="",index:t,text:l,...n})=>{const a=ue(),{href:i,target:r,onClick:s}=a(n);return o("a",{className:p("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),Qs=d((({title:e,links:t,className:l=""})=>c("div",{className:p("flex flex-col gap-4",l),children:[o(Ee,{size:"text-l",font:"font-normal",children:e}),t?.length?o("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>o(Js,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),eo=d((({className:e="",items:t,basePath:l})=>t?.length?o("ul",{className:p("flex flex-col",e),children:t.map(to(l))}):null)),to=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: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)}`)},lo=d((({className:e="",index:t,...l})=>{const n=ue({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}`})})),no=d((({className:e="",links:t})=>c("div",{className:p("@container",e),children:[o("div",{className:"pt-lg",children:o(Ee,{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(lo,{index:t,...e},String(t))))}):null]}))),ao=St((({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]=Zs;((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(x,{tag:"footer",className:e,defaultPadding:"p-4xl pb-24",...l,children:[o("div",{className:"mb-lg pb-xs border-b border-main-divider",role:"menu",children:io(n)}),o(Ks,{className:"overflow-hidden",items:r}),c("div",{className:"mt-xl",children:[o(Sr,{className:"mb-xl",media:s,stretched:!0,children:"Соцсети"}),c("div",{className:"mb-xl",children:[o(Sr,{className:"mb-m",media:d,stretched:!0,showButtonText:!1}),o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),o("div",{className:"py-lg border-t border-main-divider",children:o(Js,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:u})}),o(Qs,{className:"py-lg border-y border-main-divider",title:m,links:a}),o(no,{links:h})]})})),io=e=>e?.filter((e=>e.icon)).map(((e,t)=>o(Hs,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:o(eo,{items:e.items,basePath:D(e.href)})},String(t)))),ro={width:"34",height:"34"},so={"bg-white":"color",transparent:"white"},oo={"bg-white":"text-primary-main",transparent:"text-white"},co=(e,t,l)=>o(ae,t?.src?{image:t,className:oo[e],width:l?.width,height:l?.height}:{image:{icon:t?.icon||"LogoIcon",iconVersion:so[e]},className:oo[e],width:l?.width,height:l?.height}),mo={"bg-white":"text-primary-text",transparent:"text-white"},ho=d((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>c("a",{className:p("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",children:[co(i,l?.image,ro),r?n??o("div",{className:"ml-s",children:o(Ee,{font:"font-medium",color:mo[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),uo={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},po=d((({bgColor:e,logo:t,alwaysShowLogo:l,internetBankUrl:n,version:a})=>{const r=u(),s=E.BASE_PATH?.startsWith(r.pathname),d=i((()=>{r.back()}),[]);return c("div",{className:"flex items-center justify-between w-full",children:[l||s?o("div",{children:o(ho,{className:"my-2xs",bgColor:e,logo:t})}):go(d),n?o("div",{children:o(ye,{href:n,ariaLabel:"Войти",target:"_blank",className:p("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",uo["transparent"===a?"transparent":"default"]),children:"Войти"})}):null]})})),go=e=>o("div",{children:c("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,type:"button",children:[o(ae,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),xo={"bg-white":"primary",transparent:"transparent"},fo=St((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:l=xo[e],portal:n,...a})=>{const{logo:i}=a.options?.page?.sitemap??{},{internetBankUrl:r}=n||{};return o(x,{tag:"header",defaultPadding:"",version:l,...a,children:o("div",{className:"container px-lg py-2xs box-border",children:o(po,{bgColor:e,logo:i,alwaysShowLogo:t,internetBankUrl:r,version:l,...a})})})})),bo={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},yo=St((({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=u();return o(x,{className:p("relative flex flex-col",bo[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:A({...c,extraProps:{className:p("w-full",lr(r)),padding:n?"":"p-0"}})})}),{childrenTypes:[]}),vo=St((e=>o(yo,{...e})),{childrenTypes:[]}),No=d((e=>{const{className:t,align:l,image:n,...a}=e,i=l?p("flex",Aa[l]):"";return o(x,{className:p(i,t),defaultPadding:"p-0",...a,children:o(ae,{image:n})})})),wo=["байт","Кб","Мб","Гб","Тб","Пб"],ko=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",href:l,target:n,children:[e,t?c(Ee,{size:"text-l",font:"font-light",children:[t," ",Co(s,d),o(Ee,{color:"text-secondary-text",children:l&&`${s+r+d}`})]}):null]})})),Co=(e,t)=>e||t?o("span",{children:", "}):"",So={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},To=d((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=u();return c(x,{className:p("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(B,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:p("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",So[r]),role:"list",children:a.map(Io(d,i))}):null]})})),Io=(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))} ${wo[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?Bo(a):l?.fileFormat;return o("div",{role:"listitem",children:o(ko,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?o(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))},Bo=e=>{if(!e)return"";const t=e.lastIndexOf("."),l=new RegExp(/\/(.*)/),n=-1!==t?e.substring(t+1):"";return n.includes("/")?n.replace(l,""):n},Mo=St((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,headingType:d,additionalDescription:m="",title:h="Мобильное приложение",version:u="primary",...g})=>{const f="secondary"===u?"p-m min-w-32":"min-w-24",b=i?.src?o(ae,{className:"hidden lg:block",image:i}):null;return o(x,{className:p("min-h-80",e),padding:"p-0",version:u,...g,children:c(Ce,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(S,{headingType:d,title:h,className:p("whitespace-pre-wrap",l)}),rightImage:b,buttons:Ge(n,{className:"flex-wrap"}),children:[a?o(Ee,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:p("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[o(tt,{items:r,listItemSize:"M"}),o(Ee,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),s?.src?o("div",{className:p("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ae,{className:"w-fit",image:s})}):null,i?.src?o(ae,{className:"lg:hidden",image:i}):null]})]})})})),Ro={primary:"bg-white/30",secondary:"bg-main-divider"},Vo={primary:"text-white",secondary:"text-secondary-text"},Po=d((({count:e,version:t="secondary"})=>o("div",{className:p("w-6 h-6 rounded-full flex items-center justify-center",Ro[t]),role:"status",children:o(Ee,{size:"text-xs",color:Vo[t],children:e})}))),zo=(e=[],t={})=>e.filter((({content:e={}})=>ns(t,e))).length,Ao=(e,t)=>e===t;const Do=(jo=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Ao,((e=Ao)=>(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])=>jo(l,t[e])))));var jo;const Eo=[],$o={},Lo={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Oo={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},_o={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Fo={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Uo=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:p("h-12","block flex-1","cursor-pointer",Lo[n],l?Fo[n]:_o[n]),role:"tab","aria-selected":l,onClick:a,...d,children:c("div",{className:p("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Oo[n]:"text-secondary-text hover:text-primary-main"),children:[o(Ee,{size:"text-m",children:r}),s?o("div",{className:"ml-xs",children:s}):null]})})})),Ho=d((e=>o(e?.item?.href?Wo:Ko,{...e}))),Wo=d((e=>{const t=ue(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(Uo,{...e,tag:"a",item:a,onClick:n})})),Ko=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(Uo,{item:e,onClick:n,...l})})),qo=(e,t,l)=>(n,a)=>o(Ho,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Yo=d((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>o("div",{className:p("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(qo(n,a,t))}))),Go={categories:[],extraOptions:[],propertyType:[],stage:[]},Xo=St((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:u}]=is(Go,{block:a.block,page:a.options?.page}),g=i(((e=Go)=>u(e)),[]),f=(({hotFilters:e=Eo,filtrationState:t=$o,blocks:l=Eo,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Do(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:o(Po,{version:t===e[a]?"primary":"secondary",count:zo(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:g});return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Yo,{...f}),o(Jr,{filtrationSchema:l,resetButton:n,field:m,reset:h}),o(Gr,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}});function Zo(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((({coords:t,content:l})=>new e.Placemark(t,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{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.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Jo={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"},Qo=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Jo).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:o(G,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),ec=e=>globalThis[e],tc=(e,t)=>{const l=document.getElementById(t);if(l){const t=ec(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(ec(e))}))}))}return new Promise(((l,n)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{l(ec(e))})),a.addEventListener("error",(e=>{n(e)})),document.head.appendChild(a)}))};const lc=()=>function(e,t,l=!0){const[i,r]=n(void 0);return a((()=>{let n=!0;return tc(e,t).then((e=>{n&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(n=!1,l){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,l]),i}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${E.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),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"},ac=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(nc).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(G,{name:l,width:"20",height:"16"})})})),ic={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"},rc=[55.753995,37.614069],sc=d((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=lc(),[d,m]=n();if(a((()=>{i?.current?r&&(Zo(r,i.current,e),e?.length||i.current.setCenter(rc)):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:e?oc(e):rc,zoom:l,controls:[],suppressMapOpenBlock:!0}),Zo(r,i.current,e))}))}),[r,i,e,l]),!r)return null;const h=d?"z-[100000]":"z-10";return c("div",{id:"map",className:p(!d&&"relative","w-full",t),children:[o("div",{className:p(Object.values(ic),h,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;d?e.exitFullscreen():e.enterFullscreen(),m(e.isFullscreen())},children:o(G,{name:"FullScreenIcon",width:"16",height:"16"})}),c("div",{className:p("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(ac,{yandexMaps:i}),o(ac,{yandexMaps:i,direction:"out"})]}),Qo(i.current,r,p("right-2 top-80",h))]})})),oc=e=>[dc(cc(e,0)),dc(cc(e,1))],cc=(e,t)=>e.map((e=>e.coords[t])),dc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,mc={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему"},hc="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",uc=(e,{field:t,reset:l},n=3)=>{const a=(e||[]).map((e=>o(Zl,{text:mc[e],...t(e)},e))),[i,r]=n>0?[a.slice(0,n),a.slice(n)]:[a,[]];return o("div",{children:e?.length?o("div",{children:r.length>0?o(ja,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:hc,children:i}),o(Ea,{className:hc,isUnfolded:e,children:r})]}),renderFoldButton:pc(l)}):o("div",{className:hc,children:i})}):null})},pc=e=>({isUnfolded:t,onToggle:l})=>c("div",{className:"flex",children:[o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0 mr-lg",appendRight:o(G,{name:["ArrowDownIcon","ArrowUpIcon"][Number(t)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(t)],onClick:l}),o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,text:"Очистить фильтр",appendRight:o(G,{name:"CloseIcon",width:"16",height:"16"})})]}),gc=()=>{},xc=()=>[],fc=e=>"all"===e?"block":"hidden",bc=d((({className:e,data:t=[],renderCard:l=gc,filterItems:a=xc,getBalloon:i=gc,initFilterState:s={},descriptionData:d,title:m})=>{const[h,{field:u,reset:g}]=Dt(s),[x,f,y]=r((()=>{const e=a(t,h),l=e.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:i(e)}))).filter((e=>e.coords&&2===e.coords.length));return[e,l,e.length]}),[t,h]),[v,N]=n("all");return c("div",{className:p("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(S,{headingType:"h2",children:m}),y?o(Ee,{size:"text-h2",color:"text-secondary-text",children:`(${y})`}):null]}),d?vc(d):null,yc(t,v,N),o("div",{className:p("pb-2xl",fc(v)),children:uc(Object.keys(s),{field:u,reset:g})})]}),o("div",{className:"h-[600px]",children:o(b,{children:o(sc,{points:f,className:"h-full"})})})]}),x.map(l)]})})),yc=(e,t,l)=>{const n="business"===t?"primary":"secondary",a=(e,t,n)=>(e.currentTarget===e.target&&"business"===t&&n.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),l(t),n);return c("div",{className:"flex pb-lg",children:[o(an,{className:"mr-m","data-id":"all",onClick:t=>a(t,"all",e),version:"all"===t?"primary":"secondary",children:"Для физических лиц"}),o(an,{"data-id":"business",onClick:t=>a(t,"business",e),version:n,children:"Для юридических лиц"})]})},vc=({__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(De,{__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(ae,{image:e.image}):null,e?.text?o(Ee,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Nc={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"}},wc=d((({className:e,children:t,color:l="gray"})=>c("div",{className:p("sm:p-s sm:border sm:border-gray rounded-md flex items-center",Nc[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ae,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Ee,{size:"text-m",color:Nc[l].text,children:t})]}))),kc=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:Cc({textItems:a,subText:t,children:l,...n})})),Cc=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>c("div",{className:p("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Ee,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>o(Ee,{size:"text-l",children:e.trim()},String(t)))),a?o(Ee,{color:n,size:"text-m",children:a}):null]}),Sc=d((({className:e,children:t})=>o("div",{className:p("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Tc=["ArrowDownIcon","ArrowUpIcon"],Ic=["Подробнее","Скрыть"],Bc=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:Ic[Number(e)]}),o(G,{className:"text-primary-text",name:Tc[Number(e)],width:"16",height:"16"})]}),Mc=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Pc(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(Ee,{size:"text-h4",children:Pc(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(G,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),o(wc,{color:"green",children:Pc(s)})]}),o("div",{className:"hidden sm:block",children:o(Sc,{className:"flex-wrap",children:m?.map(Vc)})}),o(ja,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ea,{isUnfolded:e,children:o(Sc,{className:"flex-wrap",children:m?.map(Vc)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Bc({isUnfolded:e,onToggle:t})})]},String(d))},Rc=({address:e="",terminalType:t,atmCode:l=""})=>({header:`${Pc(t)} №${l}`,body:e.toUpperCase()}),Vc=(e,t)=>o(kc,{...e},String(t)),Pc=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",zc=[];const Ac=async e=>{const t=await bt(e,{method:"GET"});return Array.isArray(t)?t:zc},Dc={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},jc={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Ec=d((({data:e,className:t})=>{const[l]=xs(),n=function(e){const{data:t=zc}=Rl(`/api/v1/atms?regionCode=${e}`,Ac);return t}(l?.code??"000");return o(bc,{className:t,filterItems:$c,data:n,initFilterState:Dc,renderCard:Mc,getBalloon:Rc,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),$c=(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=>jc[t](e))),l=!n.length||n.some((t=>jc[t](e)));return t&&l}))},Lc=e=>{const t=_c(e);return o(kc,{label:"Режим работы",value:t,className:"max-w-none"})},Oc=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",_c=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(", ");return[Oc({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Oc({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean)},Fc=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Uc=e=>Fc.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??"")}}))),Hc=e=>{if(!e)return null;const t=Wc(e);return c(Sc,{className:"border-none",children:[o(kc,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Kc)})}),o(kc,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]})},Wc=e=>{const t=Fc.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},Kc=({short:e,status:t},l)=>o("div",{className:p("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(Ee,{size:"text-xs",children:e})},String(l)),qc=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(kc,{label:"Валюта",value:e.currency}):null,t?o(kc,{label:"Купить",value:String(t)}):null,l?o(kc,{label:"Продать",value:String(l)}):null]},String(n)),Yc=(new Date).getDay(),Gc=e=>{const[t]=e?.slice(Yc-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(wc,{color:"green",children:a}):null,l&&i?o(wc,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(wc,{color:"red",children:"Выходной"})},Xc=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",Zc=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(kc,{label:e,value:t&&l?l:"",subText:Xc({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Jc=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,Qc=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${e}</p>`,ed=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,td=({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=Uc(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(Ee,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(G,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),Gc(u)]}),o("div",{className:"hidden sm:block",children:ld({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(ja,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ea,{isUnfolded:e,children:ld({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Bc({isUnfolded:e,onToggle:t})})]},String(h))},ld=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Uc(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Sc,{className:"flex-wrap",children:[o(kc,{label:"Факс",value:t}),o(kc,{label:"Телефон филиала",value:e}),o(kc,{label:"Для обращений юридических лиц",value:l}),o(kc,{label:"Обслуживание физических лиц",value:n}),o(kc,{label:"Для консультаций по валютному контролю",value:i}),o(kc,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?o(Sc,{children:o(kc,{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(Zc)})})}):c(Sc,{children:[o(kc,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Kc)})}),Lc(d)]}),r?.businessScheduleVisibleTag?Hc(r?.businessScheduleDescription):null,s?.currencies?.length?o(Sc,{className:"flex-wrap",children:s?.currencies?.map(qc)}):null]})},nd=({name:e="",address:t="",workSchedule:l})=>{const n=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Uc(e),l=e?_c(t):"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&!e.businessScheduleDescription?Jc(l):Qc(l):ed(l):null})(l)}`;return{header:n,body:i}},ad=[];const id=async e=>{const t=await bt(e,{method:"GET"});return Array.isArray(t)?t:ad},rd={workingSaturday:!1,premiumService:!1,privateBanking:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},sd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday),premiumService:e=>Boolean(e.premiumService),privateBanking:e=>Boolean(e.privateBanking),sellingCoins:e=>Boolean(e.sellingCoins),buyingCoins:e=>Boolean(e.buyingCoins),bullionOperations:e=>Boolean(e.bullionOperations),preciousMetalsOperations:e=>Boolean(e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean(e.transferringDataToBiometricSystem)},od=d((({className:e})=>{const[t]=xs(),l=function(e){const{data:t=ad}=Rl(`/api/v1/branches?regionCode=${e}`,id);return t}(t?.code??"000");return o(bc,{className:e,filterItems:cd,data:l,initFilterState:rd,renderCard:td,getBalloon:nd,title:`Офисы филиала ${t?.name}`})})),cd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>sd[t](e)))))},dd=d((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return o(x,{version:"transparent",className:p(t),defaultPadding:"p-0",...l,children:"offices"===n?o(od,{}):o(Ec,{data:e})})})),md=d((({className:e,title:t,description:l="Блок в разработке...",...n})=>c(x,{className:p("box-border",e),...n,children:[o(B,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(y,{})]}))),hd=d((({className:e,padding:t,slides:l=[],...n})=>o(x,{className:p("overflow-hidden relative",e),padding:t,...n,children:o(Va,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(ot,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),ud=d((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:d="primary",...m})=>c(x,{className:p("box-border text-left space-y-s",a),version:d,...m,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ye(r)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ae,{image:r})}):null,s?o(S,{headingType:"h3",as:"h3",title:s}):null]}),c("div",{className:"w-full space-y-m",children:[i?pd(i):null,gd({label:"Адрес",data:e,iconName:"GeolocationIcon"}),gd({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),gd({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Ge([n]):null]})]}))),pd=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{__html:e})}),gd=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(G,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Ee,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ee,{size:"text-xl",color:n,children:t})]})]}):null,xd=d((e=>{const{__html:t,richVersion:l,...n}=e;return o(x,{defaultPadding:"p-0",...n,children:o(De,{__html:t,richVersion:l})})})),fd=d((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return c("div",{className:p("order-4",e),role:"radiogroup",children:[o(Yn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Yn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),bd=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(Yt,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),yd=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(bd,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(bd,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),vd=["От 1 дня","До 365 дней"],Nd=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ee,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(An,{min:1,max:365,value:e,items:vd,onChange:t})]}))),wd=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(bd,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(bd,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),kd=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(yd,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Cd(m)}),o(Nd,{days:a,setDays:e=>m({days:e})}),o(wd,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Sd(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ee,{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(fd,{}),o(ye,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),Cd=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Sd=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Td=d((({days:e,tariffs:t=[]})=>{const l=Bd(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:[Id("Аренда за",e),Id("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(T,{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(ae,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(T,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),Id=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ee,{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})]}),Bd=(e,t)=>{const l=Md(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Md=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},Rd=(e,t)=>e.find((e=>e.branchCode===t)),Vd=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Rd(n,l.selectedBranch),d=Pd(s?.safeBoxCaseVolumes),m=zd(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=Ad(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(kd,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Td,{days:l.days,tariffs:h})]})})),Pd=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],zd=(e,t)=>e?.find((e=>e.volume===t)),Ad=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Dd=[];const jd=async e=>await bt(e,{method:"GET"})||Dd,Ed=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=ql(),p=$d(m.selectedRegion,u),g=function(e){const{data:t}=Rl(e?`/api/v1/safeboxes?regionCode=${e}`:null,jd);return t||Dd}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=Rd(g,m.selectedBranch)||g,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(x,{className:l,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(S,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Vd,{regions:u,branches:g,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(T,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(sc,{points:b,className:"h-[640px]"}):null]})})),$d=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Ld(e){throw new Error(e)}const Od={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},_d={normal:"",small:"min-h-6xl"},Fd={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"},Ud=d((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",stepVersion:r="gray",version:s="primary",...d})=>c(x,{className:p("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...d,children:[o(B,{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(Hd(i,r))})}):null,Ge(a,{isVertical:!0})]}))),Hd=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Wd(e,t)(l,n);case"rte":return o(De,{__html:l.__html});default:Ld(l)}},Wd=(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:Kd(e,t)(l,n)}),c("div",{className:p("flex flex-col justify-center h-fit",_d[e]),children:[l.label?o(T,{size:"text-l",align:"text-left",children:l.label}):null,l.description?o("div",{className:p("text-s font-light text-left",Fd.description),children:l.description}):null]})]})},String(n)),Kd=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=Od[e][i?"image":"icon"],s=i?"transparent"===t:t;return o(x,{className:p(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:Ye(l?.icon)?o(ae,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:qd(e),height:qd(e)}):o("span",{className:p("text-h4","transparent"===t?Fd.iconText:(c=t,"secondary"===c?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var c},qd=e=>"normal"===e?"38":"24",Yd=d((({className:e,onClose:t})=>o("button",{className:p("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(ae,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),Gd=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=me(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Yd,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),Xd=d((({isActive:e,onClick:t})=>c("button",{className:p(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:t,type:"button",children:[o(G,{className:"w-6 h-6",name:"BurgerIcon",iconVersion:e?"color":"black"}),"Меню"]}))),Zd=d((({isActive:e,item:t,onClick:l})=>c("div",{className:p(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:l,children:[o(G,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]})));const Jd=({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((()=>h.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Ld(e)}}))),[c,d]),l},Qd=e=>({href:t})=>!!t&&_(em(t,e)).startsWith(_(t)),em=(e,t)=>$(e)?t.href:t.pathname;function tm(e=[]){const t=u(),l=e.findIndex((e=>Qd(E.BASE_PATH?{pathname:E.BASE_PATH}:e))(t));return[l,e[l]]}const lm=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 nm=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(Ee,{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(am,{...e},String(t))))})]}):null,am=d((({icon:e,...t})=>{const l=ue(),{text:n,target:a,href:i,onClick:r}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ae,{pathPrefix:"/wcms-resources/",image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),im=e=>t=>t.name?o(kr,{isRemote:!0,href:`/branches/${t.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>{e&&e(t)},children:o(Ee,{size:"text-l",font:"font-light",children:t.name})},String(t.id)):null,rm=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"})]}))),sm=d((({foreignOffices:e,defaultLocation:t})=>{const[l,a]=xs(t),r=ue({isRemote:!0}),{href:s}=r({href:`/branches/${l.slug}`}),[d,m]=n(""),h=cm(ql()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((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})(h,om),{close:p}=me(),g=i((e=>{a(e),p()}),[]);return c(Gd,{className:"pb-20",head:c("div",{children:[o(Ee,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?o("div",{className:"mb-s",children:c(T,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(kr,{isRemote:!0,href:s,className:"inline mx-2xs text-primary-main",children:l.name})]})}):null,o(rm,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&lm(e.toLowerCase())(d.toLowerCase())>=.8)).map(im(g))}):o("div",{className:"columns-1 sm:columns-5",children:Array.from(u.entries()).map((x=g,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ee,{size:"text-h6",children:e})}),t.map(im(x))]},e)))}),nm(e)]});var x})),om=e=>e.name?.charAt(0)||"",cm=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),dm=d((({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=u(),s=Qd(r)({href:n});return o("div",{className:"mt-3",children:c("a",{className:p(s?"text-primary-main":"text-primary-text","p-4 text-h5 font-light flex justify-between cursor-pointer","shadow-main-black","rounded-xl"),href:n,target:a,onClick:i,children:[e.text,o(ae,{image:{icon:"ArrowRightIcon",iconVersion:"color"},width:"24",height:"24",className:"text-secondary-text opacity-30"})]})})})),mm=({item:e,isActive:t,onClick:l})=>o("div",{className:p("relative rounded-2xl p-2",t?"bg-primary-main":"bg-main-gray"),children:o("button",{type:"button",className:"relative",onClick:l,children:o("span",{className:p("whitespace-nowrap",t?"text-white":""),children:e.text})})}),hm=d((e=>{const{topItems:t,defaultLocation:l,officesLink:s}=e,[d]=xs(l),m=(e=>{const{open:t,close:l}=me();return{open:(l={})=>t(o(sm,{...e}),l),close:l}})(e),[h,u]=Ra({itemCount:t?.length??0}),[p]=tm(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(Gd,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center",children:o(S,{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(fa,{containerRef:h,visibleItemCount:0,gap:10,className:"pb-3",children:t?.map(((e,t)=>o(mm,{item:e,isActive:g===t,onClick:()=>y(t)},String(t))))})}),c("div",{className:"relative grow",children:[um(b,f?.href),pm(s),gm(d,(()=>m.open()))]})]})})})),um=(e,t)=>e?o("div",{children:e.map(((e,l)=>o(dm,{item:e,basePath:t},String(l))))}):null,pm=e=>e?o("div",{className:"mt-3",children:c("a",{className:p("text-primary-text","p-4 text-h5 font-light flex justify-between cursor-pointer","shadow-main-black","rounded-xl"),href:e,rel:"noopener noreferrer","aria-label":"Отделения и банкоматы",children:[o("span",{children:"Офисы и банкоматы"}),o(ae,{image:{icon:"ArrowRightIcon",iconVersion:"color"},width:"24",height:"24",className:"text-secondary-text opacity-30"})]})}):null,gm=(e,t)=>c("div",{className:p("text-primary-text","p-4 text-h5 font-light flex justify-between cursor-pointer","shadow-main-black","rounded-xl","mt-3"),onClick:t,children:[o("div",{className:"flex flex-col items-start",children:c("span",{children:["Ваша локация - ",e.name]})}),o(ae,{image:{icon:"ArrowRightIcon",iconVersion:"color"},width:"24",height:"24",className:"text-secondary-text opacity-30"})]}),xm="burgerMenuDialog",fm=e=>{const{open:t,closeAll:l,close:n}=me(),a=Jd(),i=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(xm,a),r=()=>t(o(hm,{...e}),{id:xm});return[i,{open:r,close:n,toggle:()=>{i?l():r()},openDialog:t}]},bm=[],ym=St((({sticky:e,...t})=>{const{menuItems:l=bm}=e??{},[r,{toggle:d,close:m,openDialog:h}]=fm(t.options?.page?.sitemap??{}),u=Math.floor(l.length/2),p=l.slice(0,u),g=l.slice(u),[f,b]=n(-1),[y,v]=n(""),[N,{setFalse:w,setTrue:k}]=Et(),C=i((()=>{w(),b(-1),v(""),m()}),[m]),T=s(null),I=Ht(C),B=i(((e,t)=>{k(),m(),h(o(Gd,{onClick:e=>e.stopPropagation(),className:"mt-[20%]",onClose:C,head:o("div",{className:"flex items-center",children:o(S,{as:"h4",title:"left"===t?p[e].title:g[e].title})}),children:o("div",{className:"bg-white pb-24 pt-1 text-l",ref:I})}),{id:"left"===t?p[e].title:g[e].title})}),[m,C]),M=i(((e,t)=>{v(t),b(e),B(e,t)}),[B]);return a((()=>{if(!I.current)return;I.current.shadowRoot||I.current?.attachShadow({mode:"open"});const e=I.current.shadowRoot;e&&(e.innerHTML="left"===y?p[f]?.__html||"":g[f]?.__html||"")}),[f,y,N]),o(x,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:T,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[p.map(vm(M,"left",{activeIndex:f,currentItemPosition:y})),o(Xd,{isActive:r,onClick:e=>{C(),e.stopPropagation(),d()}}),g.map(vm(M,"right",{activeIndex:f,currentItemPosition:y}))]})})})),vm=(e,t,l)=>(n,a,i)=>o(Zd,{item:n,isActive:i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t,onClick:l=>{l.stopPropagation(),e(a,t)}},n.title||String(a)),Nm="hidden sm:flex absolute z-40 top-0",wm=d((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Ra({itemCount:t?.length||0});return c("div",{className:p("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[o(fa,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(qo(l,n,a))}),r.canScrollLeft?o(Xi,{className:p("left-6",Nm),onClick:r.scrollLeft}):null,r.canScrollRight?o(Zi,{className:p("right-6",Nm),onClick:r.scrollRight}):null]})})),km=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return o(Yo,{...t});case"centered":return o("div",{className:"flex",children:o(Yo,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return o("div",{className:"flex",children:o(wm,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Cm="tab",Sm=d((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...c})=>{const d=u(),{isReady:m}=d,g=r((()=>l.map(Im)),[l]),[f,b]=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];b(e),Tm(t)}),[m]),a((()=>{const e=l[f];"group"===e?.type&&h.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,f]);const y=i((e=>{const t=g.indexOf(e),n=l[t];b(t),Tm(n),"group"===n.type&&(e=>{const t=new URLSearchParams(d.query);e.name?t.set(Cm,e.name):t.delete(Cm),d.replace(`${d.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,g]);return o(x,{className:p(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...c,children:km({items:g,value:g[f],tabsMode:s,onChange:y})})})),Tm=e=>{"group"===e.type&&h.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&h.fire("tab",{type:e.type,label:e.href})},Im=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,Bm={start:"text-start",center:"text-center",end:"text-end"},Mm=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:p("border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs",a.btn,t),children:[e?.icon?o(ae,{className:p("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]})]})}));function Rm(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const Vm=d((({tab:e})=>{const t=ue(),{onClick:l}=t({...e,onClick:()=>{e.href&&!L(e.href)&&(globalThis.location.href=e.href)}});return Rm(l,[],800),o(y,{className:"col-span-12 p-xl",size:5})})),Pm=St((({className:e="",tabs:t=[],block:l,tabAlign:a,...i})=>{const[r,s]=n(Am(t)),d=zm(t[r],r),m=t.length,[h,{inc:u,dec:g}]=Yi({itemCount:m},r),[f,b]=Ra({itemCount:m});return c(x,{className:p(e),defaultPadding:"p-0",...i,children:[c("div",{className:"relative border-b-8 border-primary-main",children:[o(fa,{itemClassName:"flex",containerRef:f,snapAlign:"snap-end",gap:8,onVisibleIndicesChange:b.handleVisibleIndicesChange,children:t.map(Dm(r,s,a))}),o(er,{scroll:b,arrowsPadded:!0,onScrollLeft:g,onScrollRight:u,activeIndex:h,itemCount:m})]}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:t[r]?.href?o(Vm,{tab:t[r]}):z(l?.slots?.[d],{...i?.options,slotName:d,parent:l})})]})}),{slots:({tabs:e})=>e?.filter((e=>!e.href)).map(zm)||[],childrenTypes:{exclude:["TabsLayout"]}}),zm=(e,t)=>e?.title||`Слот №${t}`,Am=e=>e.reduce(((e,t,l)=>t.selected?l:e),0),Dm=(e,t,l="start")=>(n,a)=>o(Mm,{className:Bm[l],tab:n,isActive:e===a,onClick:()=>t(a)},String(a)),jm={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Em=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:jm[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),$m=d((({className:e="",isOpen:t,onClick:l})=>o(ye,{className:e,appendRight:o(ae,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),Lm={Buttons:({buttons:e})=>Ge(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ae,{image:e}):null,List:({isDotted:e,...t})=>o(tt,{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(Ee,{size:"text-h6",children:e})}):null,t?o("div",{children:o(Ee,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?o($m,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},Om=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 _m({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),_m=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in Lm))return null;return o(Lm[l],{...t,...n})},Fm=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(Om,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Um=(e,t)=>140*Pe(e.slice(0,t).map((e=>e?.cols?.length??1))),Hm=(e,t)=>e?.length>0?o("div",{className:p("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Ee,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Wm=d((({rows:e})=>{return o(fa,{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=p("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(Ee,{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(-${Um(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(Ee,{size:"text-xl",children:e.data}):null,e?.cols?Hm(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),Km=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(Ee,{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(Wm,{rows:t.rowsData})})})]},n)}))}))),qm=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Ym=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:p("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:o(Ee,{size:"text-xl",font:"font-light",color:qm(t===l),children:e||t+1})},e)))}):null,t?o(ye,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(G,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function Gm(e){const t=await fetch(e);return await t.json()}const Xm=d((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=Rl(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),Gm);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(Ym,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Km,{activeTabIndex:r,items:m}),o($m,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ee,{size:"text-h6",children:"Данных нет"}),o($m,{onClick:l,isOpen:!0})]})})),Zm=d((({children:e,tableInner:t,onHideContentClick:l})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:p("@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(Xm,{...t,onClick:l})}):null]}))),Jm=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),g=i((e=>u(e)),[]);return c(Zm,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:p("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ae,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Em,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Fm,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function Qm({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(Gi,{className:p("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(Gi,{className:p("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const eh=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return c("div",{role:"table",children:[c("div",{className:"relative space-y-xs",children:[e,Qm({...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]})})),th=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]=Yi({itemCount:m,visibleItemCount:2}),g=(d||[]).map(((e,t)=>o(Jm,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[f,b]=i>0?[g.slice(0,-i),g.slice(-i)]:[g,[]];return c(x,{className:p("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(B,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m",children:i>0?o(ja,{renderFoldableSection:({isUnfolded:e})=>c(eh,{controls:u,children:[f,o(Ea,{isUnfolded:e,children:b})]}),renderFoldButton:Wr}):o(eh,{controls:u,children:g})})]})})),lh=d((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>c(x,{className:p("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?nh():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ee,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?ah(l):null,a?o(De,{__html:a}):null]})]}))),nh=()=>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"}),ah=e=>o(T,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),ih=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(Ee,{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(Ee,{size:"text-h2",children:l})}):null]}))),rh=d((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return o(x,{defaultPadding:"p-0",...a,children:o(ih,{prefix:t,unit:l,suffix:n})})})),sh={AdTile:It,ApplicationForm:vn,ApplicationFormCustom:aa,BenefitsBlock:ma,BonusBenefitsBlock:za,ButtonsBlock:Da,Calculator:$i,CardTransfer:qi,Carousel:dr,CarouselBankHistoryCard:mr,CarouselCard:pr,CarouselCatalogCard:xr,CarouselLinks:Nr,CarouselRecommendationCard:Tr,CarouselTariffsCard:Mr,ComparisonTable:Or,DepositFiltration:ds,ErrorBlock:ps,ExchangeRateTile:Os,Footer:ao,Header:fo,Headline:B,HorizontalLayout:vo,ImgBlock:No,LinkDocs:To,MobileAppTile:Mo,MortgageFiltration:Xo,OfficesAtmsMap:dd,Placeholder:md,ProductBlock:Tt,ProductGallery:hd,RepresentativeOfficeInfo:ud,RichTextBlock:xd,RollupItem:Hs,SafeDepositRental:Ed,StepsBlock:Ud,StickyBottomMenu:ym,Tabs:Sm,TabsLayout:Pm,TariffsTable:th,TextBlock:lh,UnitBlock:rh,VerticalLayout:yo},oh="chatbot",ch="text-page__btn-chat",dh={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},mh="rshb-query-params";function hh(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(mh)||"";return e&&globalThis.sessionStorage?.setItem(mh,e),e}const uh=he((()=>{a((()=>{hh()}),[]);const e=(e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=dh[e??""];return l=>{if(t)if("personal"!==e)tc(oh,t);else{const e=l.target;e?.classList.contains(ch)||e?.classList.add(ch),document.getElementById("webchat-js-container:webchat_rshb")||tc(oh,t)}}})(E.CHAT_BOT);Ut(globalThis,"click",ph({loadBot:e,reachGoalYM:e=>{const[t]=E.YANDEX_METRIKA_ID?.split(",").reverse()??[];[t,e,globalThis.ym].every(Boolean)&&globalThis.ym(t,"reachGoal",e)}}))})),ph=e=>t=>{const l=gh(t.target);for(const t in l?.dataset)fh(t)?.(l,e);if($(l?.href)&&!l?.href?.startsWith(globalThis.location?.origin)){t.preventDefault(),t.stopPropagation();const e=(e=>{const t=hh();if(!$(e)||!t)return e;const l=new URL(e);for(const[e,n]of new URLSearchParams(t))l.searchParams.set(e,n);return l.toString()})(l?.href)||l?.href;if(e){xh(l?.target)?.(e)}}},gh=e=>{let t=e;for(;Boolean(t)&&"A"!==t.tagName;)t=t?.parentNode;return t},xh=Ps([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]),fh=Ps([[e=>"ymtarget"===e,(e,t)=>t?.reachGoalYM(e?.dataset?.ymtarget)],[e=>"chatbot"===e,(e,t)=>t?.loadBot({target:e})]]),bh="cookie",yh=d((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=Et();Rm((()=>{globalThis.localStorage?.getItem(bh)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(bh,"true"),a()}),[]);return l?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:c(T,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",o(kr,{isRemote:!0,className:vh(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",o(kr,{isRemote:!0,className:vh(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),o("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:o(Yd,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),vh=e=>p("inline mx-2xs",e?"text-green-dark":""),Nh=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Jd({onCloseAll:e,onClose:t}),{close:n}=me(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return Ut(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:p("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),wh=d((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>h.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Ld(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return Ut(globalThis.document,"keydown",r),e?o("div",{className:p("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),kh="header",Ch="footer",Sh="sticky-footer",Th={},Ih=d((({className:e,data:t=Th,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=Ct(s,r);uh();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:l,blockDecorator:n,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:p("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:z(a?.header,{...m,slotName:kh})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[A({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),z(a?.footer,{...m,slotName:Ch})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:z(a?.["sticky-footer"],{...m,slotName:Sh})}):null,o(Nh,{}),o(wh,{}),o(yh,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Object.assign(Ih,{childrenTypes:[],slots:()=>[kh,Ch,Sh]});e.Blocks=sh,e.ContentPage=Ih,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=Xr,e.packageVersion="0.14.260",e.projectSettings=E,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=U,e.useRouter=u,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};const h=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 u(){return u._impl()}u._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),u.setup=e=>{u._impl=e};const p=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),g={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","":""},x=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:x})=>{const f=c,b=u(),[y,v]=n(!1);a((()=>h.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(f,{className:p("@container font-sans",N?"group":"",g[t],y?"hidden":"",r||i,e),...N?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:d,style:x,children:m})})),f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=d((({children:e})=>f?e:null)),y=d((({className:e,size:t})=>o("figure",{className:p("m-0 mt-xl min-w-[80%]",e),children:v(t)}))),v=(e=3)=>w(100,e).map((e=>Math.floor(e))).map(N),N=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),w=(e,t)=>[e].concat(t>0?w(e/1.618,t-1):[]),k={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"},S=d((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=k[l]||"h3";return o(i,{role:"heading",className:p("font-sans m-0",C[t],e),children:n||a})})),T=d((({children:e,...t})=>o("p",{className:p("font-sans",Object.values(t)),children:e}))),I={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"}},B=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=I[l],u={marginTop:h.descriptionStyle};return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[n?o(S,{className:p("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:n}):null,a?o(T,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...u,children:a}):null]})})),M=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),R=[];function V(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=M,blocksRegistry:r={},ancestors:s=R}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:p(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 P=[],z=(e,{key:t,ancestors:l=P,slotName:n=null,extraProps:a,renderProps:i=V,...r})=>{const s=a?(e,t)=>V(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||P,[r.parent,n]]:l},a)))};function A({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?z(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const D=e=>e&&!e.endsWith("/")?`${e}/`:e,j=["CDN","BASE_PATH"],E=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return j.includes(t)?D(l):l}}),$=e=>Boolean(e?.includes(":")),L=(e,t)=>Boolean(e&&!$(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),_=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),F=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var U=Object.freeze({__proto__:null,isURL:$,isLocalURL:L,isHash:O,withoutQuery:_,joinPath:F});const H="/api/",W=`${H}v1/storage`,K=e=>(t,l=E.BASE_PATH)=>{if([!t,$(t),O(t),[E.CDN,H].some((e=>q(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${W}/${t}/attachment`;const n=t?.startsWith("/");return F(q(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},q=(e,t)=>t&&e&&e.startsWith(t),Y={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},G=d((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const d=u(),m="normal"===i?`${l}.svg`:`sprites.svg#${l}`,h=K(d)(F(E.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:X(e,s)}):o(J,{className:e,children:c("svg",{className:p(Z(r),Y[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})]})})})),X=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},Z=e=>e?"":"w-full h-full",J=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Q=(e,t)=>l=>l&&!$(l)?K(e)(F(t,l)):l,ee=(e,t)=>e?.media&&t?.media?e.media-t.media:0,te=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=u();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(ee).map((({src:e,format:l,media:i},r)=>o("source",{srcSet:Q(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:Q(a,n)(t.src)},l):null]})})),le=(e,t="")=>o("img",{src:e.src,className:p("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=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?o(G,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):o(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={})=>h.fire("dialog",{type:"open",dialog:e,...t}),close:()=>h.fire("dialog",{type:"close"}),closeAll:()=>h.fire("dialog",{type:"close",all:!0})}),he=e=>he._impl(e);function ue(e={}){const{isRemote:t,basePath:l}=e,n=u(),{closeAll:a}=me();return e=>({...e,href:t&&!l?e.href:K(n)(e.href,l),"aria-label":e.text,onClick:he(i(e))});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&L(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}he._impl=e=>e,he.setup=e=>{he._impl=e};const pe=(e={})=>Object.entries(e).reduce(((e,[t,l])=>({...e,[`data-${t.toLowerCase()}`]:l})),{}),ge=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=fe(e)?"hidden lg:block":"";return c("div",{className:p(xe(e),"flex gap-xs"),children:[n?o("div",{className:p(r,ce[i]),children:n}):null,fe(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:p(r,ce[i]),children:a}):null]})})),xe=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 p("group/btn items-center justify-center",fe(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},fe=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),be=({className:e,rounded:t,version:l})=>["inline-block",oe,l?se[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ye=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(),l.stopPropagation();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=ue()({onClick:r,href:n,...a}),c=t??o(ge,{...s});return o(e?Ne:ve,{...s,children:c})})),ve=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m})=>o("a",{className:de({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,type:c,...pe(d),children:m}))),Ne=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:be({className:e,rounded:n,version:l}),children:a})));function we(e,t,l=!1){const n="primary"===e?"white":"black",a="Вернуться назад";return c("div",{className:p(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("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:o(ae,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:n}})}),o(ye,{version:"link",className:"group-data-secondary:text-white/80",text:a,ariaLabel:a,onClick:t,type:"button"})]})}const ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Ce=d((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:r="",buttons:s,leftImage:d,rightImage:m,imageAlign:h,isImageAlwaysOnRight:g=!1,isImageSecondary:x=!1,backwardButton:f,children:b,...y})=>{const v=u(),N=i((()=>{v.back()}),[]);return c("div",{className:Se(n,l,e),children:[f?we(t,N):null,a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:p("grow relative flex flex-col @xl:flex-row gap-3xl w-full",d?"self-start @xl:w-auto":""),children:[Re(d,{imageAlign:h,className:"mx-auto"}),c("div",{className:p("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]}),Me(A({...y,extraProps:{className:"@container-normal"}})),Re(m,{className:p("@xl:justify-self-end @xl:col-start-2",s?Te(g):"",Ie(g),Ve(x)),imageAlign:h}),Be(s)]})]})]})})),Se=(e="",t="",l="")=>p("relative flex flex-col gap-3xl overflow-hidden",e||t,l),Te=e=>e?"row-span-2":"@xl:row-span-2",Ie=e=>e?"col-start-2 self-center":"",Be=e=>e?o("div",{className:"self-end",children:e}):null,Me=e=>e&&e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Re=(e,{className:t,imageAlign:l})=>e?o("div",{className:p("shrink-1/2 justify-self-center",l&&ke[l],t),children:e}):null,Ve=e=>e?"hidden @xl:block":"",Pe=(e=[])=>e.reduce(((e,t)=>e+t),0),ze=(e=[])=>e?.length?Pe(e)/e.length:0,Ae=(e,t="normal")=>e?o("div",{className:p("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(ae,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:p(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),je=(e,t)=>e?o(T,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ee=d((({children:e,...t})=>o("span",{className:p("font-sans",Object.values(t)),children:e}))),$e=(e,t)=>e?o(Ee,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Le=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?o(De,{...e},`rte-${t}`):["label"in e?$e(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:je(e.description,t)},String(t)):null],Oe=d((({className:e,benefitsVersion:t,...l})=>c("div",{className:p("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in l?Ae(l.icon,t):null,o("div",{children:Le(l)})]}))),_e=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Fe=e=>{return((t=e.map(_e))?.length?Math.sqrt(Math.abs(ze(t.map((e=>e**2)))-ze(t)**2)):0)>16;var t},Ue=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),He=e=>!e.some(Ue),We=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:p("flex gap-x-m gap-y-s",Fe(l)||He(l)?"flex-col":"flex-wrap",e),role:"list",children:l.map(((e,l)=>o(Oe,{benefitsVersion:t,...e},String(l))))}):null)),Ke=d((({className:e,benefits:t})=>t?.length?o("div",{className:p("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Le)}):null)),qe=d((({isTabularBenefits:e,...t})=>o(e?Ke:We,{...t}))),Ye=e=>Boolean(e?.src||e?.icon),Ge=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:p("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),role:"group",children:e.map(Xe(l))}):null,Xe=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=Ze(a,r),d=Ze(i,r);return n||a?.icon?o(ye,{className:p("basis-full @lg:basis-auto",e),appendLeft:Je({...a,iconVersion:c}),appendRight:Je({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},Ze=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Je=e=>Ye(e)?o(ae,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Qe=d((({className:e,isDotted:t,dotClassName:l,children:n})=>c("div",{className:p("font-sans flex",e),role:"listitem",children:[t?o("div",{className:"shrink-0",children:o("div",{className:p("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,o("span",{children:n})]}))),et={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"}},tt=d((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=et[n];return l?.length?o("section",{className:p("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(Qe,{isDotted:t,dotClassName:p(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),lt=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),nt=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(at)}):null)),at=({label:e,amount:t},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Ee,{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:[lt(2)(t)," ₽"]}):null]},String(l)),it=d((({className:e,tags:t})=>t?.length?o("div",{className:p("flex flex-wrap gap-xs",e),role:"list",children:t.map(rt)}):null)),rt=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ee,{size:"text-m",font:"font-light",children:e})},String(t)),st={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},ot=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:S,...T})=>{const I=y?.src?o(ae,{image:y}):null,M=o(B,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),R=m?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return o(Ce,{className:e,padding:t,defaultPadding:l,...u?{title:M}:{insetTitle:M},...ct(I,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ge(b),backwardButton:C,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?o(qe,{benefitsVersion:s,isTabularBenefits:d,benefits:R}):null,h?o(De,{__html:h}):null,p?.length?o(tt,{items:p,isDotted:g,listItemSize:st[i]}):null,S,x?.length?o(nt,{priceList:x}):null,dt(f)]})})})),ct=(e,t)=>t?{rightImage:e}:{leftImage:e},dt=e=>e?.length?o(it,{tags:e}):null,mt=e=>Boolean(e&&Array.isArray(e)),ht=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),ut=(e,t)=>{return l=e,Boolean(ht(l)&&"string"==typeof l.$ref)?t.ref(e):ht(e)?t.record(e):mt(e)?t.array(e):t.scalar?t.scalar(e):e;var l},pt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(gt,e),gt=(e,t)=>e&&t?ht(e)?e[t]:mt(e)?e[parseInt(t,10)]:e:e,xt=(e,t)=>ut(e,{ref:({$ref:e,...l})=>xt(e?pt(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:xt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>xt(e,t)))}),ft=(e,t,l=[])=>{ut(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)ft(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)ft(e[n],t,[...l,n])}})};async function bt(e,t){try{return e?await yt(e,t):null}catch(e){console.error(e)}return null}const yt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),vt=e=>[...new Set(e)],Nt={},wt=["/portal-resources"],kt=(e,t)=>xt(e,(e=>t?.[e])),Ct=(e,t)=>{const l=(e=>{const t=[];return ft(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(vt(e).filter((e=>!wt.some((t=>e.startsWith(t))))).map((async e=>[e,Nt[e]||=await yt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?kt(e,{...t,...i}):e};function St(e,t={}){const l=d((t=>{const l=Ct((({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 Tt=St((({className:e,padding:t,...l})=>o(x,{className:p("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(ot,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),It=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>Bt(0,t?.length)),[t]),n=t?.[l];return n?o(b,{children:o(Tt,{...n,...e})}):o(x,{...e,children:o(y,{})})})),Bt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Mt=e=>e?.replace(/[^+\d]/g,"");function Rt(){return{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?"email":"mail"]:r,...Vt(i),...t?{birthday:s?.toLocaleString()}:{inn:o,fullName:c},..."FEEDBACK"===n?{}:{addressBranch:d,bankEmpolee:h,applicationDate:u,...Pt(m)},...p};try{const e=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(g)});if(!e?.ok)return null;return await e.json()}catch(e){return null}}}}const Vt=(e,t)=>e?{[t?"phoneNumber":"phone"]:Mt(e)}:{},Pt=e=>e&&"+7 ("!==e?{secondaryPhoneNumber:Mt(e)}:{},zt=d((({responseType:e})=>{const t="OK"===e,l=t?"ResponseOKIcon":"ResponseFailIcon";return c("div",{className:p("flex items-center p-lg rounded-md space-x-m",t?"bg-ok":"bg-fail"),children:[o(ae,{image:{icon:l,iconVersion:"normal"},width:"42",height:"42"}),c("div",{children:[o(S,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),At=e=>e,Dt=(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=At,format:n=At}=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}]},jt=e=>o("div",{className:"h-6",children:e?o(Ee,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null});function Et(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 $t=(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}`}},Lt=e=>e?o(Ee,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Ot=d((({key:e,className:t="",id:l,name:n,type:r="text",label:d,placeholder:m,value:h="",valid:u=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&w.current?.focus()}),[v,w]);const C="w-full border rounded-md text-primary-text outline-none p-m",S=g?"pr-3xl":"",T=_t(u);return c("div",{className:p("relative",t),children:[c("label",{className:"space-y-xs",children:[Lt(d),N?o("textarea",{className:p("block resize-y min-h-24",C,T),id:p("textarea",l),name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:p("h-14",C,S,T),ref:w,id:l,name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),_t=e=>e?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error",Ft=e=>e?.text||e?.key||"";function Ut(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function Ht(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return Ut(globalThis.document,"click",l),t}const Wt=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Kt=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 shadow-2xl",role:"list",ref:e,children:Wt(t,n).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:Ft(e)}),o(G,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:p("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function qt({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>h.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>h.fire("popup",{type:"update",popup:e,...t}),close:()=>h.fire("popup",{type:"close"})},u=i((()=>{m.close(),c&&c()}),[c]),p=i((e=>{u(),r&&r(e)}),[u,r]),g=s(null),x=Ht(u);return a((()=>{if(!e||!g.current)return;const a=g.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(Kt,{popupRef:x,options:t,value:l,query:n,onChange:p,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,l,n,p]),g}const Yt=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:h="black",onChange:u,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=Et(),[y,v]=n(""),N=g||0===l.length,w=x&&!N,k=i((()=>{v(""),f()}),[]),C=qt({isOpen:x,options:l,value:a,query:y,onChange:u,onClose:k,iconVersion:h});return c("div",{className:p("space-y-xs",e),children:[Lt(t),c("div",{className:p("relative",w?"z-20":"z-10"),ref:C,children:[c("div",{className:p("h-14 [&>*]:p-m pr-8 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",Xt(s,r,N)),onClick:w?k:b,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Ft(a)||d}),Gt(w,h)]}),m&&w?o("div",{className:p("absolute top-0 w-full z-20"),children:o(Ot,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),Gt=(e,t)=>o(G,{className:p("absolute right-3 flex self-center",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Xt=(e,t,l)=>p(e?"border rounded-md ":"",e&&!l?"hover:border-primary-hover":"",l?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Zt=()=>{},Jt=({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=Qt(t,e),c=el(t,i,r);h.push(o("td",{children:o("div",{className:tl(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},Qt=(e,t)=>t&&e.toDateString()===t.toDateString(),el=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),tl=(e,t)=>p("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),ll=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],nl=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=Zt})=>{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:ll.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Jt({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),al=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],il=al.map((e=>({key:e}))),rl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),sl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},ol={className:"min-w-32",iconVersion:"black",isBorder:!1},cl=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=Et(!1),[u,g]=n(l?.getMonth()||(new Date).getMonth()),[x,f]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:C,ref:S}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=Ht(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(al.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:il,yearsOptions:rl,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:h,selectedYear:x,selectedMonth:u,showCalendar:m});return c("div",{className:p("space-y-xs",e),ref:S,children:[Lt(t),c("div",{className:"relative",children:[dl(C,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(G,{...sl,className:"-rotate-90 cursor-pointer"})}),o(Yt,{onChange:v,value:{key:al[u]},options:w,...ol}),o(Yt,{onChange:N,value:{key:String(x)},options:k,...ol}),o("div",{className:"my-auto",onClick:y,children:o(G,{...sl,className:"rotate-90 cursor-pointer"})})]}),o(nl,{today:l,currentMonth:u,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),dl=(e,t,l)=>c("div",{onClick:e,className:p("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(T,{children:t&&$t(t)}),o(G,{...sl,name:"CalendarIcon"})]}),ml=d((({className:e,label:t,error:l,...n})=>c("div",{className:p("shrink-0 w-full",e),children:[o(cl,{label:t&&n?.errors?`${t}*`:t,valid:Boolean(!l),...n}),jt(l)]}))),hl=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,type:d,...m})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Ot,{type:d||"text","aria-label":t,label:t&&m?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:m?.errors&&!t?`${n}*`:n}),jt(a)]}))),ul=e=>"_"===e,pl=e=>/\d/.test(e),gl=e=>ul(e)||pl(e),xl=[..."+7 (___) ___-__-__"],fl=xl.findIndex(ul),bl=xl.map(((e,t)=>gl(e)?xl.slice(0,t).filter(gl).length:-1));const yl=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=xl.map(((e,l)=>pl(e)?e:t.charAt(bl[l])||e)),n=bl.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(fl,n)):l).join("")}(e))),[t]);return o(Ot,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),vl=d((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(yl,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),jt(n)]}))),Nl=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(Yt,{...n,valid:!l,label:n?.errors?`${t}*`:t}),jt(l)]}))),wl=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],kl=e=>!e?.length,Cl=e=>t=>l=>e(l)?[]:[t],Sl=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Tl=e=>null!=e,Il=new Map,Bl=e=>Boolean(e?.every((e=>Array.isArray(e)?Bl(e):!e||"string"==typeof e))),Ml=e=>Bl(e)?e.toString():"";function Rl(e,t,{fallback:l,cache:i}={}){const s=r((()=>Vl(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(Tl))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=Il)=>l=>{const n=Ml(l),a=t.get(n);if(n&&Tl(a))return a;const i=e(...l);return n&&Tl(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 Vl(e){return Array.isArray(e)?e:e instanceof Function?Vl(e()):[e]}const Pl=[];const zl=async e=>await bt(e,{method:"GET"})||Pl;function Al(){const{data:e}=Rl("/api/v1/branchesByRegions",yt);return Array.isArray(e)?e:[]}const Dl=e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)),jl="Некорректно заполненное поле",El=Cl((e=>null!=e&&""!==e))(jl),$l=Cl((e=>e?.key&&""!==e?.key))(jl),Ll=Cl((e=>"string"==typeof e&&e.length>1))(jl),Ol=Cl((e=>"string"==typeof e&&(10===e.length||12===e.length)))(jl),_l=(Fl=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Cl((e=>"string"==typeof e&&Fl.test(e))))(jl);var Fl;const Ul=Cl((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Hl={typeForm:El,surname:Ll,name:Ll,region:$l,addressBranch:$l,phone:_l,birthday:El,email:El,fullName:Ll,inn:Ol,partnerComments:El,collectionCount:El,comment:El,acquiringType:$l,serviceType:$l,consentDataProcessing:Ul,annualRevenue:El},Wl=(e,t,l=!1)=>l?Sl(e,t):e,Kl=d((({field:e,input:t,isPremium:l=!1})=>{const n=e("region")?.value?.key,i=e("region")?.value?.text,r=l?Al()?.find((e=>e?.region===i))?.branches:function(e){const{data:t}=Rl(e?`/api/v1/branches?regionCode=${e}`:null,zl);return t||Pl}(n)?.filter((e=>e?.address));return a((()=>{""!==e("region")?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[e("region")?.value]),o(Nl,{label:"Адрес",placeholder:"Выберите адрес",options:(r||[]).map((({address:e=""})=>({key:e,text:e}))),...Wl(e("addressBranch"),Hl.addressBranch,t?.required)})}));function ql(){const{data:e}=Rl("/api/v1/regions",yt);return Array.isArray(e)?e:[]}const Yl=d((({field:e,input:t})=>{const l=ql();return o(Nl,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...Wl(e("region"),Hl.region,t?.required)})})),Gl=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)}))}))),Xl=[{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"}],Zl=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(Gl,{paths:Xl,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:p("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Ql(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Jl(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?d:null,l?o("div",{className:"ml-s",children:o(Ee,{size:"text-l",font:"font-light",children:l})}):null]})})})),Jl=e=>e?"radio":"checkbox",Ql=e=>p("rounded border",e?"bg-primary-main":""),en=d((({text:e,link:t})=>c(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[o(Ee,{children:e}),t?o(ye,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:o(Ee,{children:t.text})}):null]})));function tn({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const ln={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"},nn={primary:p("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:p("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")},an=d((({children:e,...t})=>{const l=e=>({...e,onClick:he(tn(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:p("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?"":p(ln[a],nn[a]),c?"rounded-md":"",n),type:s,role:d,onClick:m,children:e})})),rn=(e,t)=>o(an,{className:p("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),sn=(e,t,l)=>c("div",{className:"flex col-span-2 gap-m flex-col lg:flex-row w-full justify-between items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3",children:[o(Zl,{...e}),o(en,{link:t})]}),jt(Sl(e,Ul).error)]}):o(en,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),rn(l)]}),on=d((({title:e,children:t})=>c("fieldset",{className:"grid @xl:flex @xl:justify-between gap-m border-b border-b-main-divider @xl:border-none",children:[e?o("legend",{className:"w-full",children:o(S,{title:e,headingType:"h6",className:"@xl:text-center"})}):null,t]}))),cn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],dn=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],mn=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],hn={surname:"",name:"",middleName:"",typeForm:{key:"FEEDBACK",text:"Задать вопрос по продуктам и услугам"},serviceDirection:{key:"Физическое лицо"},birthday:void 0,feedbackMethod:{key:"Телефонный звонок"},phone:"",email:"",comment:"",consentDataProcessing:!1},un={typeForm:El,region:El,surname:El,name:Ll,feedbackMethod:El,phone:_l,email:El,comment:El,consentDataProcessing:Ul},pn=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{gn(e,l)}),[l]),[,{field:a,...r}]=Dt(hn,{onSubmit:n}),s="FEEDBACK_QS"===a("typeForm").value?.key,d=fn(a("typeForm").value?.key,a("serviceDirection").value?.key);return o("form",{className:"container space-y-m",onSubmit:r.onSubmit,children:o(on,{children:c("div",{className:"w-full max-w-xl space-y-s m-auto",children:[o(Nl,{label:"Тема",placeholder:"Выберите тему",options:cn,...Sl(a("typeForm"),El)}),s?o(Nl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:mn,...Sl(a("serviceDirection"),El)}):null,o(Yl,{field:a}),s?o(Kl,{field:a}):null,c("div",{className:"space-y-s",children:[o(hl,{label:"Фамилия",...Sl(a("surname"),Ll)}),o(hl,{label:"Имя",...Sl(a("name"),Ll)}),o(hl,{label:"Отчество (Обязательно, при наличии)",...a("middleName")}),o(ml,{label:"Дата рождения",...Sl(a("birthday"),El)})]}),d?c("div",{children:[o(hl,{label:"ИНН",...Sl(a("inn"),Ol)}),o(hl,{label:"Наименование организации",...a("fullName")})]}):null,o(Nl,{label:"Способ получения ответа",options:dn,...Sl(a("feedbackMethod"),El)}),o(vl,{label:"Телефон",...Sl(a("phone"),_l)}),s?c("div",{children:[o(vl,{label:"Дополнительный телефон",...a("secondaryPhone").value&&"+7 ("!==a("secondaryPhone").value?Sl(a("secondaryPhone"),_l):a("secondaryPhone")}),o(hl,{label:"Электронная почта",...Sl(a("email"),El)}),o(hl,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...a("bankEmpolee")}),o(hl,{label:"Дата и время обращения в Банк",...a("applicationDate")})]}):o(hl,{label:"Электронная почта",...Sl(a("email"),El)}),o(hl,{...Sl(a("comment"),El),placeholder:"Ваше сообщение",isTextarea:!0}),sn(a("consentDataProcessing"),t,e)]})})})})),gn=(e,t)=>{const l=fn(e?.typeForm.key,e?.serviceDirection?.key),n=wl({...un,...xn(e,l)});kl(n(e))&&t(e,!l)},xn=(e,t)=>t?{addressBranch:El,inn:Ol}:"FEEDBACK"===e.typeForm.key?{birthday:El}:{addressBranch:El},fn=(e="",t="")=>"FEEDBACK_QS"===e&&"Юридическое лицо / ИП"===t,bn={ApplicationFormFeedback:pn},yn=Rt(),vn=St((({className:e,formBlock:t,...l})=>{const[a,r]=n(""),s=i((async(e,t=!1)=>{const l=wn(e),n=await yn.send(l,t)?"OK":"Fail";return r(n),n}),[]);return o(x,{className:e,defaultPadding:"p-6xl",...l,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?.title?o(S,{headingType:"h3",title:t.title,className:"@xl:text-center"}):null,t?Nn(t,s):null,a?o(zt,{responseType:a}):null]})})})),Nn=(e,t)=>{const l=e?.formType;if(!l||!(l in bn))return null;return o(bn[l],{...e,onSubmit:t})},wn=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(t?.region?t?.text:t?.key)||t]))),kn=d((e=>{const{className:t,title:l,responseType:n,children:a,...i}=e;return o(x,{className:t,defaultPadding:"p-6xl",...i,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[l?o(S,{headingType:"h3",title:l,className:"@xl:text-center"}):null,a,n?o(zt,{responseType:n}):null]})})})),Cn=d((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Zl,{text:t,value:l,disabled:a,onChange:r},n),jt(i)]}))),Sn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Tn=d((({field:e,input:t})=>o(Nl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Sn,...Wl(e("acquiringType"),Hl.acquiringType,t?.required)}))),In=(e="")=>Boolean("trade"===e||"all"===e),Bn=(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}},Mn=(e,t,l)=>Math.max(t,Math.min(e,l));function Rn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function Vn({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:p("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=Rn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const Pn=1,zn=100,An=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:Pn),max:s=(a.length?a.length-1:zn),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:u}=e,g=Bn(e,{normalize:(e=0)=>a.length?Dn(a)(e):Mn(e,r,s),format:lt()}),x=i((e=>{u&&u(Rn(e.target?.value))}),[u]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,o("input",{className:p("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:x,...g}),Vn({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:u})]}),jn(n)]})})),Dn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),jn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),En=["От 1 000 ₽","До 1 000 000 000 ₽"],$n=d((({field:e})=>o(An,{title:"Сумма, ₽",items:En,min:1e3,max:1e9,...e("amount")}))),Ln=d((({field:e,input:t})=>o(hl,{className:"col-span-2",...Wl(e("comment"),Hl.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),On=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:p("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:p("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),_n=d((({field:e})=>In(e("acquiringType")?.value?.key)?o(On,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Fn=d((({field:e})=>In(e("acquiringType")?.value?.key)?o(On,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Un=d((({field:e,input:t})=>{const l=Al(),n=r((()=>l?.map((({region:e})=>({key:e,text:e})))),[l]);return o(Nl,{label:"Регион",placeholder:"Выберите регион",options:n,...Wl(e("region"),Hl.region,t?.required)})})),Hn=["От 1 мес","До 15 лет"],Wn=d((({field:e})=>o(An,{title:"Срок, месяцев",items:Hn,min:1,max:180,...e("term")}))),Kn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],qn=d((({field:e})=>o(Nl,{label:"Тип обслуживания",options:Kn,...Sl(e("serviceType"),El)}))),Yn=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),role:"radio"}),t?o(Ee,{color:"text-primary-text",children:t}):null]})}))),Gn=["currencyControl","documentOperations","conversionTransactions","otherIssues"],Xn=d((({field:e})=>{const{value:t,onChange:l}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m space-x-m grid @xl:flex @xl:items-center",children:[o(Yn,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:l}),o(Yn,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:l}),o(Yn,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:l}),o(Yn,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:l})]})})),Zn=(e,t)=>(l,n)=>{const{required:a,...i}=l,r="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,s={surname:o(hl,{label:"Фамилия",...Wl(e("surname"),Hl.surname,a)}),name:o(hl,{label:"Имя",...Wl(e("name"),Hl.name,a),...i}),middleName:o(hl,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),phone:o(vl,{label:"Телефон",...Wl(e("phone"),Hl.phone,a)}),email:o(hl,{label:"Электронная почта",...Wl(e("email"),Hl.email,a)}),fullName:o(hl,{label:"ФИО",...Wl(e("fullName"),Hl.fullName,a),...i}),inn:o(hl,{label:"ИНН",type:"number",...Wl(e("inn"),Hl.inn,a)}),comment:o(Ln,{field:e,input:l}),region:r?o(Un,{field:e}):o(Yl,{field:e,input:l}),addressBranch:o(Kl,{field:e,input:l,isPremium:r}),birthday:o(ml,{label:"Дата рождения",...Wl(e("birthday"),Hl.birthday,a)}),isClient:o(Cn,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}),consentToReceiveMaterials:o(Cn,{...e("consentToReceiveMaterials"),text:"Согласен на получение информационных и аналитических материалов по электронной почте"}),partnerComments:o(hl,{...Wl(e("partnerComments"),Hl.partnerComments,a),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...i}),collectionCount:o(hl,{label:"Количество объектов инкассации",type:"number",...Wl(e("collectionCount"),Hl.collectionCount,a)}),acquiringType:o(Tn,{field:e,input:l}),onlineCheckout:o(_n,{field:e}),posTerminal:o(Fn,{field:e}),serviceType:o(qn,{field:e}),term:o(Wn,{field:e}),amount:o($n,{field:e}),annualRevenue:o(hl,{label:"Годовая выручка, ₽",...Wl(e("annualRevenue"),Hl.annualRevenue,a)}),vedTypes:o(Xn,{field:e})};return function({input:e,field:t}){const{condition:l}=e,{value:n}=t(l?.name||"");return!l||l?.values?.find((e=>e===n))}({input:l,field:e})?o("div",{children:s[l?.name]},String(n)):null};const Jn=e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:n,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:l=!1,posTerminal:n=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${In(t?.key)?`/Онлайн касса=${l}/POS-терминал=${n}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,h={...d,...ea(o),...Qn(c),...m?{partnerComments:m}:{}};return Object.fromEntries(Object.entries(h)?.map((([e,t])=>[e,t?.key||t])))},Qn=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},ea=e=>e?{vedTypes:Object.fromEntries(Gn.map((t=>[t,t===e])))}:{},ta={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",middleName:"",phone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e3,acquiringType:Sn[0],serviceType:Kn[0],vedTypes:Gn[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},la=(e,t="")=>{const l=Object.fromEntries(Dl(e).map((e=>[e,ta[e]])));return l?.serviceType&&"PREMIUMSERVICE"===t&&(l.serviceType=Kn[1]),{...l,typeForm:{key:t,text:""}}},na=Rt(),aa=d((({className:e,title:t,typeForm:l="",sections:a=[],button:r,link:s,endpoint:d,additionalParams:m,isContacts:h,...u})=>{const g=a?.flatMap((e=>e?.inputs))||[],x=la(g,l),[f,b]=n(""),y=i((async e=>{const t=sa(g,e),l=wl((e=>{const t=Dl(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Hl?.[e]])))})(t));if(!kl(l(e)))return"Fail";const n=Jn({...e,...m}),a=await na.send(n,"lead"===d)?"OK":"Fail";return b(a),a}),[]),[,{field:v,onSubmit:N}]=Dt(x,{onSubmit:y}),w=ra(g)?.name;return c(kn,{className:p("container space-y-m",e),title:t,responseType:f,...u,children:[c("form",{onSubmit:N,children:[a.map(((e,t)=>c("div",{className:p(ia(e.columns),"grid gap-x-m"),children:[e?.title?o("div",{className:"@xl:text-center @xl:col-span-2",children:e.title}):null,(e?.inputs||[])?.map(Zn(v,l))]},`section-${t}`))),sn(w?v("consentDataProcessing"):void 0,s,r)]}),h?c("div",{className:"space-y-m",children:[o(S,{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(ae,{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(ae,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),ia=e=>2===e?"@xl:grid-cols-2":"",ra=e=>e?.find((e=>"consentDataProcessing"===e?.name)),sa=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((l=>l===t?.[e?.condition?.name])))),oa="text-left",ca={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},da=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:p("rounded-icon object-fit flex justify-center items-center",ca[l],e),children:o(G,{...i,width:"54%",height:"54%",name:a})}):null})),ma=d((({className:e="",title:t,benefitList:l,...n})=>c(x,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(S,{headingType:"h3",as:"h2",className:oa,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(ha)}):null]}))),ha=({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(da,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?o(ae,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(S,{headingType:"h6",children:e}),o(Ee,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),o(tt,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),ua=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function pa(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 ga=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:pa(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:p("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:h,role:"listitem",children:d})})),xa=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],fa=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:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:l},b=s([]),y=i(((e,t)=>{const l=[...b.current||[]];l[e]=t,b.current=l,g&&g(l),x&&x(ya(l))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?ba(c,v):{},...N?ua(h):{},gap:`${r}px`};return o("div",{className:p("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,role:"list",children:(C=(e,l)=>o(ga,{className:p(m,a?xa[a-1]:"",N?"h-full":"",t),style:w?ba(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(C):C(e,0))(u)});var C})),ba=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),ya=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),va={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Na={"horizontal-list":"w-6","vertical-list":"h-6"},wa=d((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?o("div",{className:p("flex gap-xs",va[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?Na[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)),ka=e=>e,Ca=(e=ka)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Sa=Ca(),Ta=(e=ka)=>Ca((t=>-e(t))),Ia=Ta(),Ba=e=>t=>e.scrollWidth/t,Ma=e=>(t,l)=>{e.scrollBy({left:l*Ba(e)(t),behavior:"smooth"})},Ra=({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?[Ta()(a),Ca()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Ma(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Ma(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}]},Va=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]=Ra({itemCount:m,onVisibleIndicesChange:s}),[g]=u.visibleIndicesRange;return c("div",{className:p(e,"vertical-list"===d?"relative h-full":""),children:[o(fa,{containerRef:h,activeIndex:g,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:u.handleVisibleIndicesChange,listType:d,minHeight:i,children:r}),a?o(wa,{containerRef:h,activeIndex:g,dotCount:m,listType:d,version:t}):null]})})),Pa=(e,t,l)=>{return o(Va,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>c("div",{className:p("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?o(Ee,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?o(ae,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?o(Ee,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},za=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>c(x,{className:p("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[o(B,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Pa(e,0,t):null]}))),Aa={start:"justify-start",center:"justify-center",end:"justify-end"},Da=d((({buttons:e,className:t="",align:l,...n})=>{const a=l?p("flex",Aa[l]):"";return o(x,{className:p("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Ge(e)})})),ja=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,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const Ea=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})})})),$a=d((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r})=>c("div",{className:p("flex justify-between @xl:flex-col",e),children:[t?o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,o("div",l?{children:o(Ee,{size:"text-h3",children:[i,lt(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:o(Ee,{size:"text-h3",children:"-"})})]}))),La=Math.round(29.5),Oa={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},_a={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Fa={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Ua={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Ha={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Wa=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,[a,i]=((e,t,l)=>{const{maxBonus:n=5e3,prefMonthsNum:a=Fa.prefMonthsNum,prefTravelBonusRate:i=Fa.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*l),n);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*l),n)*(12-a)]})(t||Fa,l,n);return{...t,...e,monthBonus:a,yearBonus:i}},Ka=e=>e?o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,qa=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>c("div",{children:[o(Ee,{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:lt(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]})]}))),Ya=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(G,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Ga=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?o(Ya,{title:e,...i}):c("div",{children:[o("div",{className:"hidden @xl:block",children:o(qa,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),o("div",{className:"@xl:hidden",children:o($a,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function Xa({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${lt(2)(l.min||0)} ₽`,`До ${lt(2)(l.max||0)} ₽`];return o(An,{items:e?n:[],step:t,...l})}const Za=d((({className:e="",calcSource:t,buttons:l,footnote:n})=>{const[a,{field:i}]=Dt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:d,maxSumOther:m,monthBonus:h,yearBonus:u}=Wa(a,t);return c("section",{className:p("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:[Xa({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Xa({title:"Сумма покупок в остальных категориях, ₽",min:d,max:m,step:500,isShowItems:!1,...i("restExpenseValue")})]}),h>=0?Ga({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($a,{title:"Баллов за год",value:u}):null,Ge(l,{isVertical:!0}),Ka(n)]})]})})),Ja=d((({className:e,inputChildren:t,rateChildren:l,resultChildren:n})=>c("section",{className:p("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})]}))),Qa=(e,t=0)=>e?.sum?e.sum:t,ei=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,ti=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,li={horizontal:"gap-5xl",vertical:"flex-col gap-s"},ni=d((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>o("div",{className:p(`flex ${li[a]}`,l),role:"radiogroup",children:e?.map((({id:e,text:l})=>o(Zl,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),ai=({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(Ee,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",children:o(Ee,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(ni,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:p("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),ii=e=>ai({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),ri=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:si([e,t],n),si=([e,t],l=[])=>({[e]:l.length?Ia(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Sa(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),oi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],ci={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const di=(e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=l<90||l>730,c=function(e){const t=e?.rateType?ci[e?.rateType]:"",{data:l}=Rl(t?`/api/v1/depositrates/${t}`:null,yt);return Array.isArray(l)?l:[]}(t);if(l<=30)return{...Ha,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&mi(s,e)&&oi(n,["minSum","maxSum"],e)&&oi(l,["minDays","maxDays"],e)))||Ha,{rate:m}=d,h=hi(m,e),u=n+h,p=c||[Ha];return{...d,...si(["minSum","maxSum"],p),...si(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},mi=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,hi=(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)},ui=d((({className:e="",buttons:t,footnote:l,bottomFootnote:n,isShowDepositeName:a,defaultParams:i,rateParams:r})=>{const[s,{field:d}]=Dt({moneyValue:Qa(i,1e5),daysValue:ei(i,60),isReplenished:Boolean(i?.isReplenished),isPartialWithdrawal:Boolean(i?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(i?.isMonthlyInterestPayment)}),m=di(s,r),{income:h,finalSum:u,rate:p,isUnavailableByTerm:g,depositeName:x}=m;return o(Ja,{className:e,inputChildren:c("div",{children:[Xa({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(An,{items:[`От ${ti(f.min||0)}`,`До ${ti(f.max||0)}`],step:1,...f})),c("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[pi(m,d),ii({title:"Выплата процентов",orientation:"vertical",...d("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),rateChildren:Ga({rate:p,depositeName:x,isShowDepositeName:a,isUnavailableByTerm:g}),resultChildren:c("div",{children:[gi(u,h),Ge(t,{isVertical:!0}),Ka(l),Ka(n)]})});var f})),pi=(e,t)=>c("div",{className:"space-y-s",children:[o(Ee,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[o(Zl,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Zl,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),gi=(e,t)=>c("div",{className:"flex flex-col gap-2xl sm:gap-0 mb-lg",children:[o($a,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),o($a,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),xi=e=>fi({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&fi({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&fi({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&fi({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),fi=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],bi=(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)},yi=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows||[Oa],r=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>xi({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:s,maxSum:o}=ri(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=ri(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>xi({row:e,userInputParams:t,paramsViewSettings:l})&&oi(n,["minSum","maxSum"],e)&&oi(a,["minMonths","maxMonths"],e)))||Oa)({rateRows:i,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:h}=m,u=bi(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:n,monthsValue:a,monthlyPayment:u}},vi=({min:e=0,max:t=0,availableMonths:l,...n})=>o(An,{items:[`От ${Ni(e)}`,`До ${Ni(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Ni=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,wi=e=>ai({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),ki=d((({className:e,calcSource:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:d}]=Dt({moneyValue:Qa(r,2e5),monthsValue:ei(r,La),isAnnuity:Boolean(r?.isAnnuity),isInsurance:Boolean(r?.isEnableInsurance),isSalaryClient:Boolean(r?.isEnableSalaryClient),isPensionClient:Boolean(r?.isEnablePensionClient),isStateEmployee:Boolean(r?.isEnableStateEmployee)}),m=yi(s,t,i),h=wi({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")}),{onChange:u}=d("moneyValue"),{onChange:p}=d("monthsValue");return a((()=>{u&&u(Mn(s.moneyValue,m.minSum,m.maxSum))}),[m.minSum,m.maxSum]),a((()=>{p&&p(Mn(s.monthsValue,m.minMonths,m.maxMonths))}),[m.minMonths,m.maxMonths]),o(Ja,{className:e,inputChildren:c("div",{children:[Xa({title:"Сумма кредита, ₽",step:500,min:m.minSum,max:m.maxSum,...d("moneyValue"),value:m.moneyValue}),vi({title:"Срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Ci({...m,...i},d),o("div",{className:"sm:hidden",children:h})]}),rateChildren:Ga({rate:m.rate}),resultChildren:c("div",{children:[o($a,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:h}),Ge(l,{isVertical:!0}),Ka(n)]})})})),Ci=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Zl,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Zl,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Zl,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Zl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Si=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},Ti=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows?.[0]?Mi(t.rateRows[0].minMonths,t.rateRows[0].maxMonths):0,r=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=t?.rateRows?.find((t=>Bi({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r})&&Bi({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&oi(n,["minSum","maxSum"],t)&&oi(a||i,["minMonths","maxMonths"],t)))||Ua,{rate:c}=o,d=Ii(c,e),m=n+d,h=t?.rateRows||[Ua];return{...o,...si(["minSum","maxSum"],h),...si(["minMonths","maxMonths"],h),availableMonths:Si(h.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:i,income:d,finalSum:m}},Ii=(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)},Bi=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Mi=(e,t)=>e+Math.round((t-e)/2),Ri=d((e=>{const{className:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s}=e,[d,{field:m}]=Dt({moneyValue:Qa(s,2e4),monthsValue:ei(s),isMonthlyInterestPayment:Boolean(s?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(s?.isRemoteRegistration)}),h=Ti(d,l,r),{defaultMonth:u,rate:p,income:g,finalSum:x}=h,{onChange:f}=m("monthsValue"),{onChange:b}=m("moneyValue");return a((()=>{!d.monthsValue&&f&&f(u)}),[u]),a((()=>{b&&b(Mn(d.moneyValue,h.minSum,h.maxSum))}),[h.minSum,h.maxSum]),o(Ja,{className:t,inputChildren:c("div",{children:[Xa({title:"Сумма, ₽",min:h.minSum,max:h.maxSum,...m("moneyValue"),value:h.moneyValue}),vi({title:"Срок, месяцев",min:h.minMonths,max:h.maxMonths,availableMonths:h.availableMonths,...m("monthsValue"),value:h.monthsValue}),Vi({...h,...r},m)]}),rateChildren:Ga({rate:p}),resultChildren:c("div",{children:[o($a,{title:"Доход в конце срока",value:g,postfix:"₽",prefix:"+"}),o($a,{title:"Сумма в конце срока",value:x,postfix:"₽"}),Ge(n,{isVertical:!0}),Ka(i)]})})})),Vi=(e,t)=>{return c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?ii({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},ai({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Pi=e=>zi({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&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,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[_a],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Pi({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=ri(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=ri(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Pi({row:e,userInputParams:t,paramsViewSettings:l})&&oi(n+r,["minSum","maxSum"],e)&&oi(i,["minSumOld","maxSumOld"],e)&&oi(r,["minSumExtra","maxSumExtra"],e)&&oi(a,["minMonths","maxMonths"],e)))||_a)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=bi(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},Di=d((({className:e,calcSource:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=Dt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Ai(i,t,a),d=wi({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return o(Ja,{className:e,inputChildren:c("div",{children:[Xa({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),Xa({title:"Ежемесячный платёж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),vi({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),ji({...s,...a},r),s.isExtraMoney?Xa({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:Ga({rate:s.rate,fractionDigits:1}),resultChildren:c("div",{children:[o($a,{title:"Ежемесячный платёж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?o($a,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:d}),Ge(l,{isVertical:!0}),Ka(n)]})})})),ji=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Zl,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Zl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Zl,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Ei={CreditCalculatorForm:ki,DepositCalculatorForm:Ri,BusinessDepositCalculatorForm:ui,BonusCalculatorForm:Za,RefinancingCalculatorForm:Di},$i=St((({className:e,calculatorTabs:t=[],...l})=>o(x,{className:e,defaultPadding:"p-0",...l,children:Oi(t)}))),Li=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in Ei))return null;const l=Ei[t];return c("div",{className:"p-xl",children:[e?.calculatorBlock?.title?o(S,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,o(l,{...e.calculatorBlock,isMobile:!0})]})},Oi=e=>{if(!e||!e.length)return null;return 1===e.length?Li(e[0]):e.map(((e,t)=>o(ja,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>o(Ea,{isUnfolded:t,children:Li(e)}),renderFoldButton:_i(e)},t.toString())))},_i=e=>({isUnfolded:t,onToggle:l})=>{const n=e.nav?.align||"text-left";return c("button",{type:"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(G,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),c("div",{className:"flex-1 flex flex-col pl-s",children:[o(Ee,{align:n,color:"text-white",children:e.nav?.title}),o(Ee,{align:n,size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),o(G,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]})},Fi=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Bn(e,{normalize:(e=a)=>l&&n?String(Mn(Number(Ui(e)),l,n)):Ui(e),format:lt(r)}),d=i((e=>t&&t(Ui(e))),[t]);return o(Ot,{onChange:d,...s,...c})})),Ui=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Hi=d((e=>o(Fi,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ee,{size:"text-xl",font:"font-light",children:"₽"})})}))),Wi={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Ki={amount:1500},qi=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...d})=>{const[{amount:m},{field:h}]=Dt(Ki),[u,g]=n(!1);return a((()=>{g(m<=0)}),[m]),c(x,{className:p("flex flex-col items-center",e),defaultPadding:"p-6xl",...d,children:[t?o(S,{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:Wi[s],children:[o(Hi,{valid:!u,placeholder:i,label:l,max:3e5,min:1,...h("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:m}),r?.text?o(an,{className:"w-full mt-lg",type:"submit",disabled:u,children:r.text}):null]})]})})),Yi=(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}]},Gi=d((({className:e,disabled:t,...l})=>o(ye,{rounded:!0,className:p("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(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"})}))),Xi=d((e=>o(Gi,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Zi=d((e=>o(Gi,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Ji="absolute top-[calc(50%-24px)] z-40",Qi="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",er=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,g=a?t>0:d,x=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:"m:hidden block",children:[tr(e),g?o(Xi,{className:p(Ji,n?"left-1 m:left-8":"left-0"),onClick:f}):null,x?o(Zi,{className:p(Ji,n?"right-1 m:right-8":"right-0"),onClick:b}):null]})})),tr=e=>c("div",{children:[e.canScrollLeft?o("div",{className:p(Qi,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:p(Qi,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),lr=(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="ХИТ"}={})=>c("div",{className:p("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(G,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(T,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),ar="relative h-full",ir={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},rr=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(cr);return A({...n,renderProps:(n,a,r)=>c("div",{className:sr(n,{someCardsHighlighted:i}),children:[V(n,a,{className:or(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),cr(n)?nr({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},sr=(e,{someCardsHighlighted:t})=>p(ar,t&&(cr(e)?"pt-3xl":"pt-3xl sm:pt-16")),or=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>p(ar,"min-w-80",ir[n],t&&(cr(e)?"pt-3xl sm:pt-16":"pt-3xl"),lr(l),l&&"h-full"),cr=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,dr=St((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,isEmbedded:s=!1,cardSize:d="normal",...m})=>{const{blocks:h=[]}=m.block||{},u=t||h?.length,[g,{inc:f,dec:b}]=Yi({itemCount:u,visibleItemCount:l},Math.floor(l/2)),[y,v]=Ra({itemCount:u}),[N]=v.visibleIndicesRange,w=h&&"CarouselBankHistoryCard"===h[0]?.type;return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:"p-6xl",...m,children:[c("div",{className:p(a?"flex justify-center":"","relative max-w-full"),children:[o(fa,{containerRef:y,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:rr({noCardBorder:n,activeIndex:g,cardSize:d,...m})}),o(er,{scroll:v,arrowsPadded:i,onScrollLeft:b,onScrollRight:f,hasEdgeBlocks:w,activeIndex:g,itemCount:u})]}),o(wa,{className:"@5xl:hidden",containerRef:y,activeIndex:N,dotCount:u,listType:"horizontal-list"})]})}),{childrenTypes:["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),mr=d((({title:e,description:t,className:l})=>o(x,{className:l,defaultPadding:"p-6xl",children:o(B,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),hr="z-10 border border-solid w-full h-full",ur=p(hr,"absolute hidden @xl:block border-transparent"),pr=d((({className:e,title:t,description:l,button:n,...a})=>o(x,{className:p("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:p(ur,"top-9 right-12 bg-green-dark")}),o("div",{className:p(ur,"top-6 right-8 bg-green")}),o("div",{className:p(ur,"top-3 right-4 bg-green-light")}),c("div",{className:p(hr,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(B,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ge([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),gr={black:"bg-black",white:"bg-white"},xr=d((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(x,{className:p("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ce,{className:"h-full",padding:d,title:o(B,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(ae,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Ge([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(Ee,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(fr)]}):null,a?c(Ee,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),fr=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${gr[e]}`},String(t)),br="20",yr="absolute w-full h-full border border-white",vr=d((({className:e="",icon:t,...l})=>{const n=ue(),{text:a,href:i,target:r,onClick:s}=n(l);return a?o("div",{className:p("flex relative group/link pl-s pb-s sm:pr-2xs min-w-64 sm:min-w-72",e),children:c("div",{className:"relative min-h-16 w-full pb-lg sm:pb-0",children:[c("a",{className:p("absolute border\n bg-white flex items-center justify-between group-hover/link:text-primary-main","flex rounded-md lg:rounded-none w-full w-full p-lg whitespace-nowrap z-10"),role:"link",href:i,target:r,onClick:s,children:[c("div",{className:"flex items-center space-x-lg",children:[t?o(ae,{imageClassName:"text-green-dark",image:t,width:br,height:br}):null,o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})]}),o(ae,{className:"group-hover/link:brightness-100 sm:ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"color"},imageClassName:"group-hover/link:text-primary-main",width:br,height:br})]}),o("div",{className:p(yr,"-bottom-1 -left-1")}),o("div",{className:p(yr,"-bottom-2 -left-2")})]})}):null})),Nr=d((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>o(x,{defaultPadding:"p-5xl",className:p("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row sm:items-center gap-s justify-between",children:[c("div",{children:[o(B,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),o(B,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?wr(n,"sm:self-end sm:pt-s"):null]})}))),wr=(e,t="")=>{const l=Math.ceil(e.length/3);return o(dr,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",visibleItemCount:0,isEmbedded:!0,children:Array.from({length:l}).fill(null).map(((t,l)=>o("div",{className:"flex flex-wrap gap-2xs sm:gap-0 sm:justify-center",children:e.slice(3*l,3*(l+1)).map(((e,t)=>o(vr,{...e},String(t))))},String(l))))})},kr=d((({className:e="",href:t,target:l,isRemote:n=!1,onClick:a,children:i})=>{const r=ue({isRemote:n})({href:t,target:l,onClick:a});return o(t?"a":"div",{className:p("block",e),...t?r:{},role:t?"link":"none",children:i})})),Cr=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Sr=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}=(e=>Cr.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ye(n)?n:r,c=l?{text:a}:{text:""};return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:"color"},version:e?.version??i}})),h=p("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:p("flex flex-col gap-xs",e),children:[o("div",{className:"flex gap-xs",children:Ge(m,{className:p(a||s?"basis-full":""),buttonClassName:h})}),r?o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Tr=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:g,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},...v})=>o(x,{className:p("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...v,children:o(kr,{href:a,target:m,className:"h-full",children:c(Ce,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(B,{title:h,description:l,headlineVersion:"XS",isEmbedded:!0,align:u}),...ct(Ye(i)?o(ae,{image:i}):null,f),buttons:d.length?o(Sr,{media:d,showButtonText:!0,version:v?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(qe,{benefits:g}),o(tt,{items:r,isDotted:s,listItemSize:"S"}),Ir(n,u)]})})}))),Ir=(e,t)=>e?o(T,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Br=(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(Ee,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(Ee,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:Ge(a)}):null]},String(t))},Mr=d((({className:e="",title:t,align:l="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,...u})=>{const g=d.map(Br),[f,b]=s>0?[g.slice(0,s),g.slice(s)]:[g,[]],[y,v]=n(!1);return a((()=>h.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[]),c(x,{className:p("flex flex-col",e),defaultPadding:"p-2xl",...u,children:[Ye(i)?o("div",{className:"self-center",children:o(ae,{image:i})}):null,t?o(S,{className:p("pt-xs",l),headingType:"h5",title:t}):null,r?.text?o(ye,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(ja,{renderFoldableSection:()=>c("div",{children:[f,o(Ea,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>1?Rr(y,m?.parent):null}):o("div",{children:f})]})})),Rr=(e,t)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&h.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(G,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Vr=(e=!1)=>e?"text-white":"",Pr=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),zr=d((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>c("th",{className:"space-y-4 flex flex-col items-start",children:[e?o(ae,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&o("div",{children:o(ae,{image:t})}),l?o(S,{headingType:"h4",className:Vr(a),title:l}):null,n?o("div",{className:Pr(a),children:n}):null]}))),Ar=d((({cell:e,rowHeader:t,isFillGradient:l=!1})=>o("div",{className:"box-border flex flex-col",role:"cell",children:o("div",{className:p("h-full","border-main-divider border-b"),children:e?e.map(Er(l,t)):null})}))),Dr=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),jr=(e=!1)=>""+(e?"text-white":""),Er=(e,t)=>({label:l,description:n},a)=>c("div",{className:"flex justify-between text-s py-s",children:[o(T,{size:"text-s",color:Dr(e),children:t}),c("div",{className:"basis-1/2",children:[l?o("div",{className:"text-right",children:o(T,{size:"text-s",align:"text-right",color:jr(e),children:l})}):null,n?o("div",{className:"text-right",children:o(T,{size:"text-s",color:Dr(e),children:n})}):null]})]},String(a)),$r=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 o("tr",{className:"mb-m",children:c("td",{className:p("border border-gray rounded-md p-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),children:[o(zr,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>o(Ar,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?o(ye,{href:e.link.href,target:e.link?.target,version:s,ariaLabel:"Подробнее",className:"text-s font-medium mt-m p-s",children:e.link.text}):null,Lr({onToggleColumn:i,isFillGradient:n,showRow:a})]})})})),Lr=({onToggleColumn:e,isFillGradient:t,showRow:l})=>o("td",{className:"pt-lg",children:o("a",{role:"link",onClick:e,className:"cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:o(Ee,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),Or=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(S,{headingType:"h3",className:"font-medium text-center",title:l}):null,o("table",{className:"border-separate",children:o(_r,{...e})})]})})),_r=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($r,{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 o("tbody","horizontal"===r?{children:o(Va,{onVisibleIndicesChange:h,children:u})}:{children:u})})),Fr=e=>e%2!=0,Ur=d((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,role:r,...s})=>c(l,{tag:l,className:p("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Hr=d((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>o(Ur,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",role:"button",className:p("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(Ee,{size:"text-h4",children:t}),iconNode:l?o(ae,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Wr=({isUnfolded:e,onToggle:t})=>o(Hr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Kr=d((({title:e,description:t})=>c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ae,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(B,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:oa})]}))),qr=["ArrowDownIcon","ArrowUpIcon"],Yr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",Gr=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:p(t.length?"hidden":"block"),children:a?o(Kr,{...a}):null}),c("div",{className:p("space-y-2xs",t.length?"":"hidden"),children:[c("div",{className:p(Yr),children:[z(r,{...i.options,parent:n}),Fr(r.length)?o(It,{className:"col-span-6",...i}):null]}),o(ja,{renderFoldableSection:({isUnfolded:e})=>c(Ea,{className:p(Yr),isUnfolded:e,children:[z(s,{...i.options,parent:n}),Fr(s.length)?o(It,{className:"col-span-6",...i}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>o(Hr,{className:p(l<1?"hidden":""),disabled:!s?.length,label:e,icon:qr[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),Xr=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),Zr=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(On,{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))))),Jr=d((({children:e,filtrationSchema:t,resetButton:l,field:n,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,Xr(o("div",{className:"h-full w-px bg-gray"}))(Object.entries(t).map(Qr(n)).filter(Boolean))]}),l?o("div",{children:o(an,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:l?.text})}):null]}))),Qr=e=>([t,l])=>{const n=l?.type;return"array"===n?es(t,e)(l):null},es=(e,t)=>l=>"dropdown"!==l?.ui?ts(e,t)(l):null,ts=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[l?.title?o("div",{className:"mb-m",children:o(Ee,{size:"text-m",font:"font-medium",color:"text-primary-text",children:l.title})}):null,o(Zr,{items:n,multiple:!l?.single,...t(e)})]},e)};const ls=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,ns=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>ls(t[e])||ls(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>ls(t[e])||ls(l[e])||as(t[e])<=as(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>ls(t[e])||ls(l[e])||as(t[e]?.min)>=as(l[e]?.min)&&as(t[e]?.min)<=as(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>ls(t[e])||ls(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>ls(t[e])||ls(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),as=e=>Number(e||0),is=(e,{block:t,page:l,normalize:n=At})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=Dt(e),d=r((()=>function(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}(a,a.map((e=>kt(e.content,l?.fallback))))),[a,l?.fallback]),m=i===e?a:((e,t)=>(l=At)=>e?.filter((([,e])=>ns(t,l(e)||{}))).map((([e])=>e)))(d,i)(n);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},rs=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,ss=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),os=1e9,cs={sum:{min:1e4,max:os},period:3},ds=St((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=is(cs,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:ms(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),u=hs(h);return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Jr,{filtrationSchema:t,resetButton:l,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs",children:[o(Hi,{label:n?.title,min:500,max:os,...d("sum",{parse:e=>({min:Number(e),max:os}),format:({min:e})=>String(e)})}),o(An,{title:a?.title,items:["От 3 мес","До 5 лет"],list:u,...d("period")})]})}),o(Gr,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),ms=e=>vt((e?.paramsSource?.rateRows||[]).filter(rs).flatMap((e=>ss(e.minMonths,e.maxMonths)))),hs=e=>vt(e.flatMap((e=>e||[])).filter(rs).flatMap((e=>ss(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],us=e=>"Image"===e?.contentType&&e?.image?o(ae,{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,ps=d((({className:e="",title:t,description:l,error:n,button:a,...i})=>c(x,{className:p("flex flex-col justify-center items-center",e),defaultPadding:p("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:us(n)}),o(B,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(ye,{version:a?.version,text:a?.text,...a}):null]}))),gs="location";function xs(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])]})(h,"location",bs()??{name:e}),r=i((e=>{ys(e),l(e)}),[]),{data:s}=Rl(fs()?null:"/api/v1/region",yt);return a((()=>{s&&!fs()&&l(s)}),[s]),[t??{name:e},r]}const fs=()=>Boolean(globalThis.localStorage?.getItem(gs)),bs=()=>{try{const e=globalThis.localStorage?.getItem(gs);return e&&JSON.parse(e)}catch(e){return null}},ys=e=>{try{globalThis.localStorage?.setItem(gs,JSON.stringify(e))}catch(e){}};var vs;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(vs||(vs={}));const Ns=new Intl.NumberFormat("ru",{style:"currency",currency:vs.RUB}),ws=e=>e?Ns.format(e):"",ks="text-left text-m font-light text-secondary-text",Cs=`${ks} pl-5xl`,Ss={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Ts=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:`h-fit w-fit ${e}`,children:[o("thead",{children:c("tr",{children:[o("th",{className:ks,children:o(Ee,{size:"text-m",children:"Валюта"})}),o("th",{className:Cs,children:o(Ee,{size:"text-m",children:"Купить"})}),o("th",{className:Cs,children:o(Ee,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Is)})]}))),Is=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(ae,{image:{icon:Ss[t]},width:"24",height:"24"}):null,o(Ee,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl",children:o(Ee,{size:"text-h6",children:ws(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl",children:o(Ee,{size:"text-h6",children:ws(e?.buyExchangeRate)})})]},t)},Bs={icon:"GpsIcon"},Ms=d((({className:e="",address:t})=>c("div",{className:`flex gap-s ${e}`,children:[o(da,{...Bs,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(T,{size:"text-l",color:"text-primary-main",children:t}):null,o(T,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Rs=(e,t,l)=>{const n=Number(Vs(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)},Vs=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Ps=e=>t=>{const[,l]=e.find((([e])=>e(t)))||[];return l},zs=e=>Ps([[e=>e.value!==vs.RUB&&e.oppositeValue!==vs.RUB,()=>e.handleConvert(e.value,vs.RUB)],[e=>e.value===vs.RUB&&e.oppositeValue===vs.RUB,()=>e.handleConvert(e.value,vs.USD)],[e=>e.value===vs.RUB&&e.oppositeValue===vs.RUB,()=>e.handleConvert(e.value,vs.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function As(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(Ot,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(Yt,{isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Ds=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||vs.RUB,selectBuy:l?.[0]?.currency?.currency||vs.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[As({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:js(r,d,l),value:r.inputSell,setValue:e=>$s(d,l)(e,r.selectSell,r.selectBuy)}),As({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Es(r,d,t),value:r.inputBuy,setValue:e=>Ls(d,t)(e,r.selectBuy,r.selectSell)}),a?.text?o(ye,{text:a.text,version:a?.version,...a}):null]})})),js=(e,t,l)=>n=>{t({selectSell:n}),zs({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{$s(t,l)(e.inputSell,n,a)}})},Es=(e,t,l)=>n=>{t({selectBuy:n}),zs({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Ls(t,l)(e.inputBuy,n,a)})},$s=(e,t)=>(l,n,a)=>{e({inputSell:Vs(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputBuy:String(Rs(l,i,n===vs.RUB)||"")})},Ls=(e,t)=>(l,n,a)=>{e({inputBuy:Vs(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputSell:String(Rs(l,i,n===vs.RUB)||"")})};const Os=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=xs(),i=function(e){const t=e?.code||"000",{data:l}=Rl(`/api/v1/exchangerates?regionCode=${t}`,yt);return l||{}}(a),r=_s(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:vs.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:vs.RUB}}),o(x,{className:p("box-border min-h-80",e),...n,children:o(Ce,{className:"h-full",title:o(S,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap sm:flex-nowrap",children:[c("div",{className:"max-w-1/2",children:[r?o(Ts,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Ms,{address:i?.address})]}),r.length&&s.length&&d.length?o(Ds,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:l}):null]})})})})),_s=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Fs=(e,t)=>o(da,{...e,iconBgVersion:t,className:"shrink-0"}),Us=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(Ur,{tag:"button",className:p("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:[Fs(a,t),e?o(Ee,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(G,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),Hs=St((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>o(x,{className:p("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(ja,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Ea,{className:p("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:A({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ws({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),Ws=({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(Us,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):o(Hr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Ks=d((({className:e="",items:t})=>c("div",{className:e,children:[t?.length?t.map(qs):null,o(ye,{version:"primary",className:"w-full",href:"https://www.rshb.ru/natural/feedback/question",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),qs=(e,t)=>c("div",{className:"mb-m space-y-m",children:[o("div",{children:o(Ee,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(Ys)})]},String(t)),Ys=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Gs(e.type,e.text)}),o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Gs=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Xs(t)}`,children:o(Ee,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Xs=e=>e.replaceAll(/\D/g,""),Zs=["split_version","New","Old"],Js=d((({className:e="",index:t,text:l,...n})=>{const a=ue(),{href:i,target:r,onClick:s}=a(n);return o("a",{className:p("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),Qs=d((({title:e,links:t,className:l=""})=>c("div",{className:p("flex flex-col gap-4",l),children:[o(Ee,{size:"text-l",font:"font-normal",children:e}),t?.length?o("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>o(Js,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),eo=d((({className:e="",items:t,basePath:l})=>t?.length?o("ul",{className:p("flex flex-col",e),children:t.map(to(l))}):null)),to=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: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)}`)},lo=d((({className:e="",index:t,...l})=>{const n=ue({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}`})})),no=d((({className:e="",links:t})=>c("div",{className:p("@container",e),children:[o("div",{className:"pt-lg",children:o(Ee,{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(lo,{index:t,...e},String(t))))}):null]}))),ao=St((({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]=Zs;((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(x,{tag:"footer",className:e,defaultPadding:"p-4xl pb-24",...l,children:[o("div",{className:"mb-lg pb-xs border-b border-main-divider",role:"menu",children:io(n)}),o(Ks,{className:"overflow-hidden",items:r}),c("div",{className:"mt-xl",children:[o(Sr,{className:"mb-xl",media:s,stretched:!0,children:"Соцсети"}),c("div",{className:"mb-xl",children:[o(Sr,{className:"mb-m",media:d,stretched:!0,showButtonText:!1}),o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),o("div",{className:"py-lg border-t border-main-divider",children:o(Js,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:u})}),o(Qs,{className:"py-lg border-y border-main-divider",title:m,links:a}),o(no,{links:h})]})})),io=e=>e?.filter((e=>e.icon)).map(((e,t)=>o(Hs,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:o(eo,{items:e.items,basePath:D(e.href)})},String(t)))),ro={width:"34",height:"34"},so={"bg-white":"color",transparent:"white"},oo={"bg-white":"text-primary-main",transparent:"text-white"},co=(e,t,l)=>o(ae,t?.src?{image:t,className:oo[e],width:l?.width,height:l?.height}:{image:{icon:t?.icon||"LogoIcon",iconVersion:so[e]},className:oo[e],width:l?.width,height:l?.height}),mo={"bg-white":"text-primary-text",transparent:"text-white"},ho=d((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>c("a",{className:p("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",children:[co(i,l?.image,ro),r?n??o("div",{className:"ml-s",children:o(Ee,{font:"font-medium",color:mo[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),uo={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},po=d((({bgColor:e,logo:t,alwaysShowLogo:l,internetBankUrl:n,version:a})=>{const r=u(),s=E.BASE_PATH?.startsWith(r.pathname),d=i((()=>{r.back()}),[]);return c("div",{className:"flex items-center justify-between w-full",children:[l||s?o("div",{children:o(ho,{className:"my-2xs",bgColor:e,logo:t})}):go(d),n?o("div",{children:o(ye,{href:n,ariaLabel:"Войти",target:"_blank",className:p("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",uo["transparent"===a?"transparent":"default"]),children:"Войти"})}):null]})})),go=e=>o("div",{children:c("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,type:"button",children:[o(ae,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),xo={"bg-white":"primary",transparent:"transparent"},fo=St((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:l=xo[e],portal:n,...a})=>{const{logo:i}=a.options?.page?.sitemap??{},{internetBankUrl:r}=n||{};return o(x,{tag:"header",defaultPadding:"",version:l,...a,children:o("div",{className:"container px-lg py-2xs box-border",children:o(po,{bgColor:e,logo:i,alwaysShowLogo:t,internetBankUrl:r,version:l,...a})})})})),bo={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},yo=St((({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=u();return o(x,{className:p("relative flex flex-col",bo[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:A({...c,extraProps:{className:p("w-full",lr(r)),padding:n?"":"p-0"}})})}),{childrenTypes:[]}),vo=St((e=>o(yo,{...e})),{childrenTypes:[]}),No=d((e=>{const{className:t,align:l,image:n,...a}=e,i=l?p("flex",Aa[l]):"";return o(x,{className:p(i,t),defaultPadding:"p-0",...a,children:o(ae,{image:n})})})),wo=["байт","Кб","Мб","Гб","Тб","Пб"],ko=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",href:l,target:n,children:[e,t?c(Ee,{size:"text-l",font:"font-light",children:[t," ",Co(s,d),o(Ee,{color:"text-secondary-text",children:l&&`${s+r+d}`})]}):null]})})),Co=(e,t)=>e||t?o("span",{children:", "}):"",So={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},To=d((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=u();return c(x,{className:p("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(B,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:p("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",So[r]),role:"list",children:a.map(Io(d,i))}):null]})})),Io=(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))} ${wo[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?Bo(a):l?.fileFormat;return o("div",{role:"listitem",children:o(ko,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?o(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))},Bo=e=>{if(!e)return"";const t=e.lastIndexOf("."),l=new RegExp(/\/(.*)/),n=-1!==t?e.substring(t+1):"";return n.includes("/")?n.replace(l,""):n},Mo=St((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,headingType:d,additionalDescription:m="",title:h="Мобильное приложение",version:u="primary",...g})=>{const f="secondary"===u?"p-m min-w-32":"min-w-24",b=i?.src?o(ae,{className:"hidden lg:block",image:i}):null;return o(x,{className:p("min-h-80",e),padding:"p-0",version:u,...g,children:c(Ce,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(S,{headingType:d,title:h,className:p("whitespace-pre-wrap",l)}),rightImage:b,buttons:Ge(n,{className:"flex-wrap"}),children:[a?o(Ee,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:p("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[o(tt,{items:r,listItemSize:"M"}),o(Ee,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),s?.src?o("div",{className:p("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ae,{className:"w-fit",image:s})}):null,i?.src?o(ae,{className:"lg:hidden",image:i}):null]})]})})})),Ro={primary:"bg-white/30",secondary:"bg-main-divider"},Vo={primary:"text-white",secondary:"text-secondary-text"},Po=d((({count:e,version:t="secondary"})=>o("div",{className:p("w-6 h-6 rounded-full flex items-center justify-center",Ro[t]),role:"status",children:o(Ee,{size:"text-xs",color:Vo[t],children:e})}))),zo=(e=[],t={})=>e.filter((({content:e={}})=>ns(t,e))).length,Ao=(e,t)=>e===t;const Do=(jo=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Ao,((e=Ao)=>(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])=>jo(l,t[e])))));var jo;const Eo=[],$o={},Lo={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Oo={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},_o={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Fo={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Uo=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:p("h-12","block flex-1","cursor-pointer",Lo[n],l?Fo[n]:_o[n]),role:"tab","aria-selected":l,onClick:a,...d,children:c("div",{className:p("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Oo[n]:"text-secondary-text hover:text-primary-main"),children:[o(Ee,{size:"text-m",children:r}),s?o("div",{className:"ml-xs",children:s}):null]})})})),Ho=d((e=>o(e?.item?.href?Wo:Ko,{...e}))),Wo=d((e=>{const t=ue(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(Uo,{...e,tag:"a",item:a,onClick:n})})),Ko=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(Uo,{item:e,onClick:n,...l})})),qo=(e,t,l)=>(n,a)=>o(Ho,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Yo=d((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>o("div",{className:p("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(qo(n,a,t))}))),Go={categories:[],extraOptions:[],propertyType:[],stage:[]},Xo=St((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:u}]=is(Go,{block:a.block,page:a.options?.page}),g=i(((e=Go)=>u(e)),[]),f=(({hotFilters:e=Eo,filtrationState:t=$o,blocks:l=Eo,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Do(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:o(Po,{version:t===e[a]?"primary":"secondary",count:zo(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:g});return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Yo,{...f}),o(Jr,{filtrationSchema:l,resetButton:n,field:m,reset:h}),o(Gr,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}});function Zo(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((({coords:t,content:l})=>new e.Placemark(t,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{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.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Jo={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"},Qo=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Jo).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:o(G,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),ec=e=>globalThis[e],tc=(e,t)=>{const l=document.getElementById(t);if(l){const t=ec(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(ec(e))}))}))}return new Promise(((l,n)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{l(ec(e))})),a.addEventListener("error",(e=>{n(e)})),document.head.appendChild(a)}))};const lc=()=>function(e,t,l=!0){const[i,r]=n(void 0);return a((()=>{let n=!0;return tc(e,t).then((e=>{n&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(n=!1,l){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,l]),i}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${E.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),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"},ac=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(nc).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(G,{name:l,width:"20",height:"16"})})})),ic={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"},rc=[55.753995,37.614069],sc=d((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=lc(),[d,m]=n();if(a((()=>{i?.current?r&&(Zo(r,i.current,e),e?.length||i.current.setCenter(rc)):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:e?oc(e):rc,zoom:l,controls:[],suppressMapOpenBlock:!0}),Zo(r,i.current,e))}))}),[r,i,e,l]),!r)return null;const h=d?"z-[100000]":"z-10";return c("div",{id:"map",className:p(!d&&"relative","w-full",t),children:[o("div",{className:p(Object.values(ic),h,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;d?e.exitFullscreen():e.enterFullscreen(),m(e.isFullscreen())},children:o(G,{name:"FullScreenIcon",width:"16",height:"16"})}),c("div",{className:p("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(ac,{yandexMaps:i}),o(ac,{yandexMaps:i,direction:"out"})]}),Qo(i.current,r,p("right-2 top-80",h))]})})),oc=e=>[dc(cc(e,0)),dc(cc(e,1))],cc=(e,t)=>e.map((e=>e.coords[t])),dc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,mc={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему"},hc="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",uc=(e,{field:t,reset:l},n=3)=>{const a=(e||[]).map((e=>o(Zl,{text:mc[e],...t(e)},e))),[i,r]=n>0?[a.slice(0,n),a.slice(n)]:[a,[]];return o("div",{children:e?.length?o("div",{children:r.length>0?o(ja,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:hc,children:i}),o(Ea,{className:hc,isUnfolded:e,children:r})]}),renderFoldButton:pc(l)}):o("div",{className:hc,children:i})}):null})},pc=e=>({isUnfolded:t,onToggle:l})=>c("div",{className:"flex",children:[o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0 mr-lg",appendRight:o(G,{name:["ArrowDownIcon","ArrowUpIcon"][Number(t)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(t)],onClick:l}),o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,text:"Очистить фильтр",appendRight:o(G,{name:"CloseIcon",width:"16",height:"16"})})]}),gc=()=>{},xc=()=>[],fc=e=>"all"===e?"block":"hidden",bc=d((({className:e,data:t=[],renderCard:l=gc,filterItems:a=xc,getBalloon:i=gc,initFilterState:s={},descriptionData:d,title:m})=>{const[h,{field:u,reset:g}]=Dt(s),[x,f,y]=r((()=>{const e=a(t,h),l=e.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:i(e)}))).filter((e=>e.coords&&2===e.coords.length));return[e,l,e.length]}),[t,h]),[v,N]=n("all");return c("div",{className:p("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(S,{headingType:"h2",children:m}),y?o(Ee,{size:"text-h2",color:"text-secondary-text",children:`(${y})`}):null]}),d?vc(d):null,yc(t,v,N),o("div",{className:p("pb-2xl",fc(v)),children:uc(Object.keys(s),{field:u,reset:g})})]}),o("div",{className:"h-[600px]",children:o(b,{children:o(sc,{points:f,className:"h-full"})})})]}),x.map(l)]})})),yc=(e,t,l)=>{const n="business"===t?"primary":"secondary",a=(e,t,n)=>(e.currentTarget===e.target&&"business"===t&&n.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),l(t),n);return c("div",{className:"flex pb-lg",children:[o(an,{className:"mr-m","data-id":"all",onClick:t=>a(t,"all",e),version:"all"===t?"primary":"secondary",children:"Для физических лиц"}),o(an,{"data-id":"business",onClick:t=>a(t,"business",e),version:n,children:"Для юридических лиц"})]})},vc=({__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(De,{__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(ae,{image:e.image}):null,e?.text?o(Ee,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Nc={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"}},wc=d((({className:e,children:t,color:l="gray"})=>c("div",{className:p("sm:p-s sm:border sm:border-gray rounded-md flex items-center",Nc[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ae,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Ee,{size:"text-m",color:Nc[l].text,children:t})]}))),kc=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:Cc({textItems:a,subText:t,children:l,...n})})),Cc=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>c("div",{className:p("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Ee,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>o(Ee,{size:"text-l",children:e.trim()},String(t)))),a?o(Ee,{color:n,size:"text-m",children:a}):null]}),Sc=d((({className:e,children:t})=>o("div",{className:p("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Tc=["ArrowDownIcon","ArrowUpIcon"],Ic=["Подробнее","Скрыть"],Bc=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:Ic[Number(e)]}),o(G,{className:"text-primary-text",name:Tc[Number(e)],width:"16",height:"16"})]}),Mc=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Pc(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(Ee,{size:"text-h4",children:Pc(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(G,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),o(wc,{color:"green",children:Pc(s)})]}),o("div",{className:"hidden sm:block",children:o(Sc,{className:"flex-wrap",children:m?.map(Vc)})}),o(ja,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ea,{isUnfolded:e,children:o(Sc,{className:"flex-wrap",children:m?.map(Vc)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Bc({isUnfolded:e,onToggle:t})})]},String(d))},Rc=({address:e="",terminalType:t,atmCode:l=""})=>({header:`${Pc(t)} №${l}`,body:e.toUpperCase()}),Vc=(e,t)=>o(kc,{...e},String(t)),Pc=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",zc=[];const Ac=async e=>{const t=await bt(e,{method:"GET"});return Array.isArray(t)?t:zc},Dc={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},jc={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Ec=d((({data:e,className:t})=>{const[l]=xs(),n=function(e){const{data:t=zc}=Rl(`/api/v1/atms?regionCode=${e}`,Ac);return t}(l?.code??"000");return o(bc,{className:t,filterItems:$c,data:n,initFilterState:Dc,renderCard:Mc,getBalloon:Rc,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),$c=(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=>jc[t](e))),l=!n.length||n.some((t=>jc[t](e)));return t&&l}))},Lc=e=>{const t=_c(e);return o(kc,{label:"Режим работы",value:t,className:"max-w-none"})},Oc=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",_c=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(", ");return[Oc({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Oc({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean)},Fc=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Uc=e=>Fc.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??"")}}))),Hc=e=>{if(!e)return null;const t=Wc(e);return c(Sc,{className:"border-none",children:[o(kc,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Kc)})}),o(kc,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]})},Wc=e=>{const t=Fc.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},Kc=({short:e,status:t},l)=>o("div",{className:p("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(Ee,{size:"text-xs",children:e})},String(l)),qc=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(kc,{label:"Валюта",value:e.currency}):null,t?o(kc,{label:"Купить",value:String(t)}):null,l?o(kc,{label:"Продать",value:String(l)}):null]},String(n)),Yc=(new Date).getDay(),Gc=e=>{const[t]=e?.slice(Yc-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(wc,{color:"green",children:a}):null,l&&i?o(wc,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(wc,{color:"red",children:"Выходной"})},Xc=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",Zc=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(kc,{label:e,value:t&&l?l:"",subText:Xc({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Jc=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,Qc=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,ed=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,td=({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=Uc(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(Ee,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(G,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),Gc(u)]}),o("div",{className:"hidden sm:block",children:ld({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(ja,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ea,{isUnfolded:e,children:ld({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Bc({isUnfolded:e,onToggle:t})})]},String(h))},ld=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Uc(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Sc,{className:"flex-wrap",children:[o(kc,{label:"Факс",value:t}),o(kc,{label:"Телефон филиала",value:e}),o(kc,{label:"Для обращений юридических лиц",value:l}),o(kc,{label:"Обслуживание физических лиц",value:n}),o(kc,{label:"Для консультаций по валютному контролю",value:i}),o(kc,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?o(Sc,{children:o(kc,{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(Zc)})})}):c(Sc,{children:[o(kc,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Kc)})}),Lc(d)]}),r?.businessScheduleVisibleTag?Hc(r?.businessScheduleDescription):null,s?.currencies?.length?o(Sc,{className:"flex-wrap",children:s?.currencies?.map(qc)}):null]})},nd=({name:e="",address:t="",workSchedule:l})=>{const n=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Uc(e),l=e?_c(t):"",n=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?Jc(l):ed(l,n):Qc(l):null})(l)}`;return{header:n,body:i}},ad=[];const id=async e=>{const t=await bt(e,{method:"GET"});return Array.isArray(t)?t:ad},rd={workingSaturday:!1,premiumService:!1,privateBanking:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},sd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday),premiumService:e=>Boolean(e.premiumService),privateBanking:e=>Boolean(e.privateBanking),sellingCoins:e=>Boolean(e.sellingCoins),buyingCoins:e=>Boolean(e.buyingCoins),bullionOperations:e=>Boolean(e.bullionOperations),preciousMetalsOperations:e=>Boolean(e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean(e.transferringDataToBiometricSystem)},od=d((({className:e})=>{const[t]=xs(),l=function(e){const{data:t=ad}=Rl(`/api/v1/branches?regionCode=${e}`,id);return t}(t?.code??"000");return o(bc,{className:e,filterItems:cd,data:l,initFilterState:rd,renderCard:td,getBalloon:nd,title:`Офисы филиала ${t?.name}`})})),cd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>sd[t](e)))))},dd=d((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return o(x,{version:"transparent",className:p(t),defaultPadding:"p-0",...l,children:"offices"===n?o(od,{}):o(Ec,{data:e})})})),md=d((({className:e,title:t,description:l="Блок в разработке...",...n})=>c(x,{className:p("box-border",e),...n,children:[o(B,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(y,{})]}))),hd=d((({className:e,padding:t,slides:l=[],...n})=>o(x,{className:p("overflow-hidden relative",e),padding:t,...n,children:o(Va,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(ot,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),ud=d((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:d="primary",...m})=>c(x,{className:p("box-border text-left space-y-s",a),version:d,...m,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ye(r)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ae,{image:r})}):null,s?o(S,{headingType:"h3",as:"h3",title:s}):null]}),c("div",{className:"w-full space-y-m",children:[i?pd(i):null,gd({label:"Адрес",data:e,iconName:"GeolocationIcon"}),gd({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),gd({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Ge([n]):null]})]}))),pd=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{__html:e})}),gd=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(G,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Ee,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ee,{size:"text-xl",color:n,children:t})]})]}):null,xd=d((e=>{const{__html:t,richVersion:l,...n}=e;return o(x,{defaultPadding:"p-0",...n,children:o(De,{__html:t,richVersion:l})})})),fd=d((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return c("div",{className:p("order-4",e),role:"radiogroup",children:[o(Yn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Yn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),bd=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(Yt,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),yd=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(bd,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(bd,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),vd=["От 1 дня","До 365 дней"],Nd=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ee,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(An,{min:1,max:365,value:e,items:vd,onChange:t})]}))),wd=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(bd,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(bd,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),kd=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(yd,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Cd(m)}),o(Nd,{days:a,setDays:e=>m({days:e})}),o(wd,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Sd(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ee,{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(fd,{}),o(ye,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),Cd=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Sd=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Td=d((({days:e,tariffs:t=[]})=>{const l=Bd(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:[Id("Аренда за",e),Id("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(T,{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(ae,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(T,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),Id=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ee,{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})]}),Bd=(e,t)=>{const l=Md(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Md=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},Rd=(e,t)=>e.find((e=>e.branchCode===t)),Vd=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Rd(n,l.selectedBranch),d=Pd(s?.safeBoxCaseVolumes),m=zd(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=Ad(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(kd,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Td,{days:l.days,tariffs:h})]})})),Pd=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],zd=(e,t)=>e?.find((e=>e.volume===t)),Ad=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Dd=[];const jd=async e=>await bt(e,{method:"GET"})||Dd,Ed=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=ql(),p=$d(m.selectedRegion,u),g=function(e){const{data:t}=Rl(e?`/api/v1/safeboxes?regionCode=${e}`:null,jd);return t||Dd}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=Rd(g,m.selectedBranch)||g,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(x,{className:l,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(S,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Vd,{regions:u,branches:g,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(T,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(sc,{points:b,className:"h-[640px]"}):null]})})),$d=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Ld(e){throw new Error(e)}const Od={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},_d={normal:"",small:"min-h-6xl"},Fd={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"},Ud=d((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",stepVersion:r="gray",version:s="primary",...d})=>c(x,{className:p("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...d,children:[o(B,{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(Hd(i,r))})}):null,Ge(a,{isVertical:!0})]}))),Hd=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Wd(e,t)(l,n);case"rte":return o(De,{__html:l.__html});default:Ld(l)}},Wd=(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:Kd(e,t)(l,n)}),c("div",{className:p("flex flex-col justify-center h-fit",_d[e]),children:[l.label?o(T,{size:"text-l",align:"text-left",children:l.label}):null,l.description?o("div",{className:p("text-s font-light text-left",Fd.description),children:l.description}):null]})]})},String(n)),Kd=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=Od[e][i?"image":"icon"],s=i?"transparent"===t:t;return o(x,{className:p(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:Ye(l?.icon)?o(ae,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:qd(e),height:qd(e)}):o("span",{className:p("text-h4","transparent"===t?Fd.iconText:(c=t,"secondary"===c?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var c},qd=e=>"normal"===e?"38":"24",Yd=d((({isActive:e,onClick:t})=>c("button",{className:p(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:t,type:"button",children:[o(G,{className:"w-6 h-6",name:"BurgerIcon",iconVersion:e?"color":"black"}),"Меню"]}))),Gd=d((({isActive:e,item:t,onClick:l})=>c("div",{className:p(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:l,children:[o(G,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),Xd=d((({className:e,onClose:t})=>o("button",{className:p("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(ae,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),Zd=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=me(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white p-0 rounded-xl mt-[20%]",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(Xd,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})}));const Jd=({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((()=>h.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Ld(e)}}))),[c,d]),l},Qd=e=>({href:t})=>!!t&&_(em(t,e)).startsWith(_(t)),em=(e,t)=>$(e)?t.href:t.pathname;function tm(e=[]){const t=u(),l=e.findIndex((e=>Qd(E.BASE_PATH?{pathname:E.BASE_PATH}:e))(t));return[l,e[l]]}const lm=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=me(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Xd,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),nm=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 am=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(Ee,{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(im,{...e},String(t))))})]}):null,im=d((({icon:e,...t})=>{const l=ue(),{text:n,target:a,href:i,onClick:r}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ae,{pathPrefix:"/wcms-resources/",image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),rm=e=>t=>t.name?o(kr,{isRemote:!0,href:`/branches/${t.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>{e&&e(t)},children:o(Ee,{size:"text-l",font:"font-light",children:t.name})},String(t.id)):null,sm=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"})]}))),om=d((({foreignOffices:e,defaultLocation:t})=>{const[l,a]=xs(t),r=ue({isRemote:!0}),{href:s}=r({href:`/branches/${l.slug}`}),[d,m]=n(""),h=dm(ql()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((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})(h,cm),{close:p}=me(),g=i((e=>{a(e),p()}),[]);return c(lm,{className:"pb-20",head:c("div",{children:[o(Ee,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?o("div",{className:"mb-s",children:c(T,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(kr,{isRemote:!0,href:s,className:"inline mx-2xs text-primary-main",children:l.name})]})}):null,o(sm,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&nm(e.toLowerCase())(d.toLowerCase())>=.8)).map(rm(g))}):o("div",{className:"columns-1 sm:columns-5",children:Array.from(u.entries()).map((x=g,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ee,{size:"text-h6",children:e})}),t.map(rm(x))]},e)))}),am(e)]});var x})),cm=e=>e.name?.charAt(0)||"",dm=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),mm=d((({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=u(),s=Qd(r)({href:n});return o("div",{className:"mt-3",children:c("a",{className:p(s?"text-primary-main":"text-primary-text","p-4 text-h5 font-light flex justify-between cursor-pointer","shadow-main-black","rounded-xl"),href:n,target:a,onClick:i,children:[e.text,o(ae,{image:{icon:"ArrowRightIcon",iconVersion:"color"},width:"24",height:"24",className:"text-secondary-text opacity-30"})]})})})),hm=({item:e,isActive:t,onClick:l})=>o("div",{className:p("relative rounded-2xl p-2",t?"bg-primary-main":"bg-main-gray"),children:o("button",{type:"button",className:"relative",onClick:l,children:o("span",{className:p("whitespace-nowrap",t?"text-white":""),children:e.text})})}),um=d((e=>{const{topItems:t,defaultLocation:l,officesLink:s}=e,[d]=xs(l),m=(e=>{const{open:t,close:l}=me();return{open:(l={})=>t(o(om,{...e}),l),close:l}})(e),[h,u]=Ra({itemCount:t?.length??0}),[p]=tm(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(lm,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center",children:o(S,{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(fa,{containerRef:h,visibleItemCount:0,gap:10,className:"pb-3",children:t?.map(((e,t)=>o(hm,{item:e,isActive:g===t,onClick:()=>y(t)},String(t))))})}),c("div",{className:"relative grow",children:[pm(b,f?.href),gm(s),xm(d,(()=>m.open()))]})]})})})),pm=(e,t)=>e?o("div",{children:e.map(((e,l)=>o(mm,{item:e,basePath:t},String(l))))}):null,gm=e=>e?o("div",{className:"mt-3",children:c("a",{className:p("text-primary-text","p-4 text-h5 font-light flex justify-between cursor-pointer","shadow-main-black","rounded-xl"),href:e,rel:"noopener noreferrer","aria-label":"Отделения и банкоматы",children:[o("span",{children:"Офисы и банкоматы"}),o(ae,{image:{icon:"ArrowRightIcon",iconVersion:"color"},width:"24",height:"24",className:"text-secondary-text opacity-30"})]})}):null,xm=(e,t)=>c("div",{className:p("text-primary-text","p-4 text-h5 font-light flex justify-between cursor-pointer","shadow-main-black","rounded-xl","mt-3"),onClick:t,children:[o("div",{className:"flex flex-col items-start",children:c("span",{children:["Ваша локация - ",e.name]})}),o(ae,{image:{icon:"ArrowRightIcon",iconVersion:"color"},width:"24",height:"24",className:"text-secondary-text opacity-30"})]}),fm="burgerMenuDialog",bm=e=>{const{open:t,closeAll:l,close:n}=me(),a=Jd(),i=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(fm,a);return[i,{close:n,toggle:()=>{i?l():t(o(um,{...e}),{id:fm})},openDialog:t}]},ym=[],vm=St((({sticky:e,...t})=>{const{menuItems:l=ym}=e??{},[a,{toggle:r,close:d,openDialog:m}]=bm(t.options?.page?.sitemap??{}),h=Math.floor(l.length/2),u=l.slice(0,h),p=l.slice(h),[g,f]=n(-1),[b,y]=n(""),v=i((()=>{f(-1),y(""),d()}),[d]),N=s(null),w=Ht(v),[{openBottomMenuItemDialog:k}]=(({menuRef:e,dialogRef:t,closeDialog:l,openDialog:n,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();n(o(Zd,{onClick:e=>e.stopPropagation(),onClose:l,head:o("div",{className:"flex items-center px-xl",children:o(S,{as:"h4",title:c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{src:c[r]?.src,className:"min-h-[90vh]",width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}])({menuRef:N,dialogRef:w,closeDialog:v,openDialog:m,leftItems:u,rightItems:p}),C=i((e=>{v(),e.stopPropagation(),r()}),[v,r]),T=i(((e,t)=>{y(t),f(e),d(),k(e,t)}),[d,k]);return o(x,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[u.map(Nm(T,"left",{activeIndex:g,currentItemPosition:b})),o(Yd,{isActive:a,onClick:e=>C(e)}),p.map(Nm(T,"right",{activeIndex:g,currentItemPosition:b}))]})})})),Nm=(e,t,l)=>(n,a,i)=>o(Gd,{item:n,isActive:i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t,onClick:l=>{l.stopPropagation(),e(a,t)}},n.title||String(a)),wm="hidden sm:flex absolute z-40 top-0",km=d((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Ra({itemCount:t?.length||0});return c("div",{className:p("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[o(fa,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(qo(l,n,a))}),r.canScrollLeft?o(Xi,{className:p("left-6",wm),onClick:r.scrollLeft}):null,r.canScrollRight?o(Zi,{className:p("right-6",wm),onClick:r.scrollRight}):null]})})),Cm=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return o(Yo,{...t});case"centered":return o("div",{className:"flex",children:o(Yo,{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}},Sm="tab",Tm=d((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...c})=>{const d=u(),{isReady:m}=d,g=r((()=>l.map(Bm)),[l]),[f,b]=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];b(e),Im(t)}),[m]),a((()=>{const e=l[f];"group"===e?.type&&h.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,f]);const y=i((e=>{const t=g.indexOf(e),n=l[t];b(t),Im(n),"group"===n.type&&(e=>{const t=new URLSearchParams(d.query);e.name?t.set(Sm,e.name):t.delete(Sm),d.replace(`${d.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,g]);return o(x,{className:p(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...c,children:Cm({items:g,value:g[f],tabsMode:s,onChange:y})})})),Im=e=>{"group"===e.type&&h.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&h.fire("tab",{type:e.type,label:e.href})},Bm=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,Mm={start:"text-start",center:"text-center",end:"text-end"},Rm=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:p("border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs",a.btn,t),children:[e?.icon?o(ae,{className:p("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]})]})}));function Vm(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const Pm=d((({tab:e})=>{const t=ue(),{onClick:l}=t({...e,onClick:()=>{e.href&&!L(e.href)&&(globalThis.location.href=e.href)}});return Vm(l,[],800),o(y,{className:"col-span-12 p-xl",size:5})})),zm=St((({className:e="",tabs:t=[],block:l,tabAlign:a,...i})=>{const[r,s]=n(Dm(t)),d=Am(t[r],r),m=t.length,[h,{inc:u,dec:g}]=Yi({itemCount:m},r),[f,b]=Ra({itemCount:m});return c(x,{className:p(e),defaultPadding:"p-0",...i,children:[c("div",{className:"relative border-b-8 border-primary-main",children:[o(fa,{itemClassName:"flex",containerRef:f,snapAlign:"snap-end",gap:8,onVisibleIndicesChange:b.handleVisibleIndicesChange,children:t.map(jm(r,s,a))}),o(er,{scroll:b,arrowsPadded:!0,onScrollLeft:g,onScrollRight:u,activeIndex:h,itemCount:m})]}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:t[r]?.href?o(Pm,{tab:t[r]}):z(l?.slots?.[d],{...i?.options,slotName:d,parent:l})})]})}),{slots:({tabs:e})=>e?.filter((e=>!e.href)).map(Am)||[],childrenTypes:{exclude:["TabsLayout"]}}),Am=(e,t)=>e?.title||`Слот №${t}`,Dm=e=>e.reduce(((e,t,l)=>t.selected?l:e),0),jm=(e,t,l="start")=>(n,a)=>o(Rm,{className:Mm[l],tab:n,isActive:e===a,onClick:()=>t(a)},String(a)),Em={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},$m=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Em[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),Lm=d((({className:e="",isOpen:t,onClick:l})=>o(ye,{className:e,appendRight:o(ae,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),Om={Buttons:({buttons:e})=>Ge(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ae,{image:e}):null,List:({isDotted:e,...t})=>o(tt,{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(Ee,{size:"text-h6",children:e})}):null,t?o("div",{children:o(Ee,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?o(Lm,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},_m=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 Fm({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Fm=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in Om))return null;return o(Om[l],{...t,...n})},Um=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(_m,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Hm=(e,t)=>140*Pe(e.slice(0,t).map((e=>e?.cols?.length??1))),Wm=(e,t)=>e?.length>0?o("div",{className:p("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Ee,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Km=d((({rows:e})=>{return o(fa,{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=p("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(Ee,{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(-${Hm(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(Ee,{size:"text-xl",children:e.data}):null,e?.cols?Wm(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),qm=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(Ee,{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(Km,{rows:t.rowsData})})})]},n)}))}))),Ym=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Gm=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:p("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:o(Ee,{size:"text-xl",font:"font-light",color:Ym(t===l),children:e||t+1})},e)))}):null,t?o(ye,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(G,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function Xm(e){const t=await fetch(e);return await t.json()}const Zm=d((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=Rl(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),Xm);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(Gm,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(qm,{activeTabIndex:r,items:m}),o(Lm,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ee,{size:"text-h6",children:"Данных нет"}),o(Lm,{onClick:l,isOpen:!0})]})})),Jm=d((({children:e,tableInner:t,onHideContentClick:l})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:p("@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(Zm,{...t,onClick:l})}):null]}))),Qm=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),g=i((e=>u(e)),[]);return c(Jm,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:p("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ae,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o($m,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Um,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function eh({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(Gi,{className:p("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(Gi,{className:p("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const th=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return c("div",{role:"table",children:[c("div",{className:"relative space-y-xs",children:[e,eh({...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]})})),lh=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]=Yi({itemCount:m,visibleItemCount:2}),g=(d||[]).map(((e,t)=>o(Qm,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[f,b]=i>0?[g.slice(0,-i),g.slice(-i)]:[g,[]];return c(x,{className:p("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(B,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m",children:i>0?o(ja,{renderFoldableSection:({isUnfolded:e})=>c(th,{controls:u,children:[f,o(Ea,{isUnfolded:e,children:b})]}),renderFoldButton:Wr}):o(th,{controls:u,children:g})})]})})),nh=d((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>c(x,{className:p("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?ah():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ee,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?ih(l):null,a?o(De,{__html:a}):null]})]}))),ah=()=>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"}),ih=e=>o(T,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),rh=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(Ee,{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(Ee,{size:"text-h2",children:l})}):null]}))),sh=d((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return o(x,{defaultPadding:"p-0",...a,children:o(rh,{prefix:t,unit:l,suffix:n})})})),oh={AdTile:It,ApplicationForm:vn,ApplicationFormCustom:aa,BenefitsBlock:ma,BonusBenefitsBlock:za,ButtonsBlock:Da,Calculator:$i,CardTransfer:qi,Carousel:dr,CarouselBankHistoryCard:mr,CarouselCard:pr,CarouselCatalogCard:xr,CarouselLinks:Nr,CarouselRecommendationCard:Tr,CarouselTariffsCard:Mr,ComparisonTable:Or,DepositFiltration:ds,ErrorBlock:ps,ExchangeRateTile:Os,Footer:ao,Header:fo,Headline:B,HorizontalLayout:vo,ImgBlock:No,LinkDocs:To,MobileAppTile:Mo,MortgageFiltration:Xo,OfficesAtmsMap:dd,Placeholder:md,ProductBlock:Tt,ProductGallery:hd,RepresentativeOfficeInfo:ud,RichTextBlock:xd,RollupItem:Hs,SafeDepositRental:Ed,StepsBlock:Ud,StickyBottomMenu:vm,Tabs:Tm,TabsLayout:zm,TariffsTable:lh,TextBlock:nh,UnitBlock:sh,VerticalLayout:yo},ch="chatbot",dh="text-page__btn-chat",mh={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},hh="rshb-query-params";function uh(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(hh)||"";return e&&globalThis.sessionStorage?.setItem(hh,e),e}const ph=he((()=>{a((()=>{uh()}),[]);const e=(e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=mh[e??""];return l=>{if(t)if("personal"!==e)tc(ch,t);else{const e=l.target;e?.classList.contains(dh)||e?.classList.add(dh),document.getElementById("webchat-js-container:webchat_rshb")||tc(ch,t)}}})(E.CHAT_BOT);Ut(globalThis,"click",gh({loadBot:e,reachGoalYM:e=>{const[t]=E.YANDEX_METRIKA_ID?.split(",").reverse()??[];[t,e,globalThis.ym].every(Boolean)&&globalThis.ym(t,"reachGoal",e)}}))})),gh=e=>t=>{const l=xh(t.target);for(const t in l?.dataset)bh(t)?.(l,e);if($(l?.href)&&!l?.href?.startsWith(globalThis.location?.origin)){t.preventDefault(),t.stopPropagation();const e=(e=>{const t=uh();if(!$(e)||!t)return e;const l=new URL(e);for(const[e,n]of new URLSearchParams(t))l.searchParams.set(e,n);return l.toString()})(l?.href)||l?.href;if(e){fh(l?.target)?.(e)}}},xh=e=>{let t=e;for(;Boolean(t)&&"A"!==t.tagName;)t=t?.parentNode;return t},fh=Ps([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]),bh=Ps([[e=>"ymtarget"===e,(e,t)=>t?.reachGoalYM(e?.dataset?.ymtarget)],[e=>"chatbot"===e,(e,t)=>t?.loadBot({target:e})]]),yh="cookie",vh=d((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=Et();Vm((()=>{globalThis.localStorage?.getItem(yh)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(yh,"true"),a()}),[]);return l?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:c(T,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",o(kr,{isRemote:!0,className:Nh(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",o(kr,{isRemote:!0,className:Nh(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),o("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:o(Xd,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),Nh=e=>p("inline mx-2xs",e?"text-green-dark":""),wh=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Jd({onCloseAll:e,onClose:t}),{close:n}=me(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return Ut(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:p("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),kh=d((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>h.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Ld(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return Ut(globalThis.document,"keydown",r),e?o("div",{className:p("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Ch="header",Sh="footer",Th="sticky-footer",Ih={},Bh=d((({className:e,data:t=Ih,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=Ct(s,r);ph();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:l,blockDecorator:n,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:p("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:z(a?.header,{...m,slotName:Ch})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[A({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),z(a?.footer,{...m,slotName:Sh})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:z(a?.["sticky-footer"],{...m,slotName:Th})}):null,o(wh,{}),o(kh,{}),o(vh,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Object.assign(Bh,{childrenTypes:[],slots:()=>[Ch,Sh,Th]});e.Blocks=oh,e.ContentPage=Bh,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=Xr,e.packageVersion="0.14.262",e.projectSettings=E,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=U,e.useRouter=u,Object.defineProperty(e,"__esModule",{value:!0})}));
|