@redneckz/wildless-cms-uni-blocks 0.14.205 → 0.14.207

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.
Files changed (51) hide show
  1. package/bundle/bundle.umd.js +23 -9
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/utils/isUUID.d.ts +1 -1
  4. package/dist/components/Footer/Contacts.js +1 -1
  5. package/dist/components/Footer/Contacts.js.map +1 -1
  6. package/dist/hooks/useNavigateHandler.js +13 -4
  7. package/dist/hooks/useNavigateHandler.js.map +1 -1
  8. package/dist/utils/adjustHref.js +7 -2
  9. package/dist/utils/adjustHref.js.map +1 -1
  10. package/dist/utils/isUUID.d.ts +1 -1
  11. package/dist/utils/isUUID.js +1 -1
  12. package/dist/utils/isUUID.js.map +1 -1
  13. package/lib/components/Footer/Contacts.js +1 -1
  14. package/lib/components/Footer/Contacts.js.map +1 -1
  15. package/lib/hooks/useNavigateHandler.js +13 -4
  16. package/lib/hooks/useNavigateHandler.js.map +1 -1
  17. package/lib/utils/adjustHref.js +8 -3
  18. package/lib/utils/adjustHref.js.map +1 -1
  19. package/lib/utils/isUUID.d.ts +1 -1
  20. package/lib/utils/isUUID.js +1 -1
  21. package/lib/utils/isUUID.js.map +1 -1
  22. package/mobile/bundle/bundle.umd.js +23 -9
  23. package/mobile/bundle/bundle.umd.min.js +1 -1
  24. package/mobile/bundle/utils/isUUID.d.ts +1 -1
  25. package/mobile/dist/components/Footer/Contacts.js +1 -1
  26. package/mobile/dist/components/Footer/Contacts.js.map +1 -1
  27. package/mobile/dist/hooks/useNavigateHandler.js +13 -4
  28. package/mobile/dist/hooks/useNavigateHandler.js.map +1 -1
  29. package/mobile/dist/utils/adjustHref.js +7 -2
  30. package/mobile/dist/utils/adjustHref.js.map +1 -1
  31. package/mobile/dist/utils/isUUID.d.ts +1 -1
  32. package/mobile/dist/utils/isUUID.js +1 -1
  33. package/mobile/dist/utils/isUUID.js.map +1 -1
  34. package/mobile/lib/components/Footer/Contacts.js +1 -1
  35. package/mobile/lib/components/Footer/Contacts.js.map +1 -1
  36. package/mobile/lib/hooks/useNavigateHandler.js +13 -4
  37. package/mobile/lib/hooks/useNavigateHandler.js.map +1 -1
  38. package/mobile/lib/utils/adjustHref.js +8 -3
  39. package/mobile/lib/utils/adjustHref.js.map +1 -1
  40. package/mobile/lib/utils/isUUID.d.ts +1 -1
  41. package/mobile/lib/utils/isUUID.js +1 -1
  42. package/mobile/lib/utils/isUUID.js.map +1 -1
  43. package/mobile/src/components/Footer/Contacts.tsx +1 -1
  44. package/mobile/src/hooks/useNavigateHandler.ts +14 -4
  45. package/mobile/src/utils/adjustHref.ts +10 -3
  46. package/mobile/src/utils/isUUID.ts +1 -1
  47. package/package.json +1 -1
  48. package/src/components/Footer/Contacts.tsx +1 -1
  49. package/src/hooks/useNavigateHandler.ts +14 -4
  50. package/src/utils/adjustHref.ts +10 -3
  51. package/src/utils/isUUID.ts +1 -1
@@ -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"},S={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},C=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",S[t],e),children:n||a})})),I=d((({children:e,...t})=>o("p",{className:p("font-sans",Object.values(t)),children:e}))),T={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=T[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(C,{className:p("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:n}):null,a?o(I,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...u,children:a}):null]})})),M=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),V=[];function P(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=M,blocksRegistry:r={},ancestors:s=V}=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 R=[],z=(e,{key:t,ancestors:l=R,slotName:n=null,extraProps:a,renderProps:i=P,...r})=>{const s=a?(e,t)=>P(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||R,[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"],F=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return j.includes(t)?D(l):l}}),E=e=>Boolean(e?.includes(":")),L=(e,t)=>Boolean(e&&!E(e)&&(!t||"_self"===t)),$=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),O=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var _=Object.freeze({__proto__:null,isURL:E,isLocalURL:L,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:$,joinPath:O});const U="/api/",H=`${U}v1/storage`,W=e=>(t,l=F.BASE_PATH)=>{if(!t||E(t)||[F.CDN,U].some((e=>K(t,e))))return t;if(/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(t))return`${H}/${t}/file`;const n=t.startsWith("/");return O(K(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},K=(e,t)=>t&&e&&e.startsWith(t),G={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},Y=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=W(d)(O(F.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:q(e,s)}):o(Q,{className:e,children:c("svg",{className:p(X(r),G[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})]})})})),q=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},X=e=>e?"":"w-full h-full",Q=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Z=(e,t)=>l=>l&&!E(l)?W(e)(O(t,l)):l,J=(e,t)=>e?.media&&t?.media?e.media-t.media:0,ee=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(J).map((({src:e,format:l,media:i},r)=>o("source",{srcSet:Z(a,n)(e),type:le(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?te({...t,src:Z(a,n)(t.src)},l):null]})})),te=(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}),le=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?o(Y,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):o(ee,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),ae={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","":""},ie="bg-main-divider text-main-disabled",re={primary:ie,secondary:ie,white:ie,link:"",transparent:"",gray:ie,"":""},se="text-center font-sans select-none",oe={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","":""},ce=({className:e,rounded:t,version:l})=>[se,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?ae[l]:"",t?"rounded-full":"rounded-md",e].join(" "),de=()=>({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})}),me=(e,t)=>me._impl(e,t);function he(e={}){const{isRemote:t,basePath:l}=e,n=u(),{closeAll:a}=de();return e=>({...e,href:t&&!l?e.href:W(n)(e.href,l),"aria-label":e.text,onClick:me(i(e),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))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const ue=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=ge(e)?"hidden lg:block":"";return c("div",{className:p(pe(e),"flex gap-xs"),children:[n?o("div",{className:p(r,oe[i]),children:n}):null,ge(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,oe[i]),children:a}):null]})})),pe=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",ge(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},ge=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),xe=({className:e,rounded:t,version:l})=>["inline-block",se,l?re[l]:"",t?"rounded-full":"rounded-md",e].join(" "),fe=d((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=he()({onClick:r,href:n,...a}),c=t??o(ue,{...s});return o(e?ye:be,{...s,children:c})})),be=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,children:d})=>o("a",{className:ce({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,type:c,children:d}))),ye=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:xe({className:e,rounded:n,version:l}),children:a})));function ve(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return c("div",{className:"hidden sm:flex items-center gap-s",children:[o("div",{className:ce({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),o(fe,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const Ne={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},we=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:ke(n,l,e),children:[f?ve(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:[Be(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]}),Te(A({...y,extraProps:{className:"@container-normal"}})),Be(m,{className:p("@xl:justify-self-end @xl:col-start-2",s?Se(g):"",Ce(g),Me(x)),imageAlign:h}),Ie(s)]})]})]})})),ke=(e="",t="",l="")=>p("relative flex flex-col gap-3xl overflow-hidden",e||t,l),Se=e=>e?"row-span-2":"@xl:row-span-2",Ce=e=>e?"col-start-2 self-center":"",Ie=e=>e?o("div",{className:"self-end",children:e}):null,Te=e=>e&&e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Be=(e,{className:t,imageAlign:l})=>e?o("div",{className:p("shrink-1/2 justify-self-center",l&&Ne[l],t),children:e}):null,Me=e=>e?"hidden @xl:block":"",Ve=(e=[])=>e.reduce(((e,t)=>e+t),0),Pe=(e=[])=>e?.length?Ve(e)/e.length:0,Re=(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(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,ze=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})),Ae=(e,t)=>e?o(I,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,De=d((({children:e,...t})=>o("span",{className:p("font-sans",Object.values(t)),children:e}))),je=(e,t)=>e?o(De,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Fe=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?o(ze,{...e},`rte-${t}`):["label"in e?je(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Ae(e.description,t)},String(t)):null],Ee=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?Re(l.icon,t):null,o("div",{children:Fe(l)})]}))),Le=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),$e=e=>{return((t=e.map(Le))?.length?Math.sqrt(Math.abs(Pe(t.map((e=>e**2)))-Pe(t)**2)):0)>16;var t},Oe=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),_e=e=>!e.some(Oe),Ue=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:p("flex gap-x-m gap-y-s",$e(l)||_e(l)?"flex-col":"flex-wrap",e),role:"list",children:l.map(((e,l)=>o(Ee,{benefitsVersion:t,...e},String(l))))}):null)),He=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(Fe)}):null)),We=d((({isTabularBenefits:e,...t})=>o(e?He:Ue,{...t}))),Ke=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(Ye(l))}):null,Ye=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=qe(a,r),d=qe(i,r);return n||a?.icon?o(fe,{className:p("basis-full @lg:basis-auto",e),appendLeft:Xe({...a,iconVersion:c}),appendRight:Xe({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},qe=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Xe=e=>Ke(e)?o(ne,{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})]}))),Ze={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"}},Je=d((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=Ze[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})),et=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),tt=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(lt)}):null)),lt=({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(De,{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:[et(2)(t)," ₽"]}):null]},String(l)),nt=d((({className:e,tags:t})=>t?.length?o("div",{className:p("flex flex-wrap gap-xs",e),role:"list",children:t.map(at)}):null)),at=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(De,{size:"text-m",font:"font-light",children:e})},String(t)),it={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},rt=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:S,children:C,...I})=>{const T=y?.src?o(ne,{image:y}):null,M=o(B,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),V=m?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return o(we,{className:e,padding:t,defaultPadding:l,...u?{title:M}:{insetTitle:M},...st(T,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ge(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[V?.length?o(We,{benefitsVersion:s,isTabularBenefits:d,benefits:V}):null,h?o(ze,{__html:h}):null,p?.length?o(Je,{items:p,isDotted:g,listItemSize:it[i]}):null,C,x?.length?o(tt,{priceList:x}):null,ot(f)]})})})),st=(e,t)=>t?{rightImage:e}:{leftImage:e},ot=e=>e?.length?o(nt,{tags:e}):null,ct=e=>Boolean(e&&Array.isArray(e)),dt=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),mt=(e,t)=>{return l=e,Boolean(dt(l)&&"string"==typeof l.$ref)?t.ref(e):dt(e)?t.record(e):ct(e)?t.array(e):t.scalar?t.scalar(e):e;var l},ht=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(ut,e),ut=(e,t)=>e&&t?dt(e)?e[t]:ct(e)?e[parseInt(t,10)]:e:e,pt=(e,t)=>mt(e,{ref:({$ref:e,...l})=>pt(e?ht(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:pt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>pt(e,t)))}),gt=(e,t,l=[])=>{mt(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)gt(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)gt(e[n],t,[...l,n])}})};async function xt(e,t){try{return e?await ft(e,t):null}catch(e){console.error(e)}return null}const ft=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),bt=e=>[...new Set(e)],yt={},vt=["/portal-resources"],Nt=(e,t)=>pt(e,(e=>t?.[e])),wt=(e,t)=>{const l=(e=>{const t=[];return gt(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(bt(e).filter((e=>!vt.some((t=>e.startsWith(t))))).map((async e=>[e,yt[e]||=await ft(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?Nt(e,{...t,...i}):e};function kt(e,t={}){const l=d((t=>{const l=wt((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...l})}));return Object.assign(l,t),l}const St=kt((({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(rt,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),Ct=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>It(0,t?.length)),[t]),n=t?.[l];return n?o(b,{children:o(St,{...n,...e})}):o(x,{...e,children:o(y,{})})})),It=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Tt=e=>e?.replace(/[^+\d]/g,"");function Bt(){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?"phoneNumber":"phone"]:Tt(i),[t?"email":"mail"]:r,...t?{birthday:s}:{inn:o,fullName:c},..."FEEDBACK"===n?{}:{addressBranch:d,bankEmpolee:h,applicationDate:u,...Mt(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 Mt=e=>e&&"+7 ("!==e?{secondaryPhoneNumber:Tt(e)}:{},Vt=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(ne,{image:{icon:l,iconVersion:"normal"},width:"42",height:"42"}),c("div",{children:[o(C,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),o(De,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Pt=e=>e,Rt=(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=Pt,format:n=Pt}=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}]},zt=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(De,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),At=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],Dt=e=>!e?.length,jt=e=>t=>l=>e(l)?[]:[t],Ft=d((({text:e,link:t})=>c(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[o(De,{children:e}),t?o(fe,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:o(De,{children:t.text})}):null]}))),Et="container space-y-m",Lt="w-full max-w-xl space-y-s m-auto",$t=e=>e?o(De,{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 S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",I=_t(u);return c("div",{className:p("relative",t),children:[c("label",{className:"space-y-xs",children:[$t(d),N?o("textarea",{className:p("block resize-y min-h-24",S,I),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",S,C,I),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",Ut=e=>o("div",{className:"h-6",children:e?o(De,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Ht=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,...d})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Ot,{type:"text","aria-label":t,label:t&&d?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:d?.errors&&!t?`${n}*`:n}),Ut(a)]}))),Wt=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Kt=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(C,{title:e,headingType:"h6",className:"@xl:text-center"})}):null,t]}))),Gt="@xl:w-1/2 space-y-s",Yt=e=>"_"===e,qt=e=>/\d/.test(e),Xt=e=>Yt(e)||qt(e),Qt=[..."+7 (___) ___-__-__"],Zt=Qt.findIndex(Yt),Jt=Qt.map(((e,t)=>Xt(e)?Qt.slice(0,t).filter(Xt).length:-1));const el=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Qt.map(((e,l)=>qt(e)?e:t.charAt(Jt[l])||e)),n=Jt.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Zt,n)):l).join("")}(e))),[t]);return o(Ot,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),tl=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(el,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Ut(n)]}))),ll="Некорректно заполненное поле",nl=jt((e=>null!=e&&""!==e))(ll),al=jt((e=>e?.key&&""!==e?.key))(ll),il=jt((e=>"string"==typeof e&&e.length>1))(ll),rl=jt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(ll),sl=(ol=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,jt((e=>"string"==typeof e&&ol.test(e))))(ll);var ol;const cl=jt((e=>"boolean"==typeof e&&e))(ll),dl=(e,t)=>c(Kt,{title:t,children:[c("div",{className:Gt,children:[o(Ht,{label:"Наименование организации",...Wt(e("fullName"),nl)}),o(Ht,{label:"Контактное лицо",...Wt(e("name"),il)})]}),c("div",{className:Gt,children:[o(Ht,{label:"ИНН",...Wt(e("inn"),rl)}),o(tl,{label:"Телефон",...Wt(e("phone"),sl)})]})]});function ml(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const hl=e=>e?.text||e?.key||"";function ul(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function pl(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return ul(globalThis.document,"click",l),t}const gl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,xl=d((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"list",ref:e,children:gl(t,n).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:hl(e)}),o(Y,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:p("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function fl({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>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=pl(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(xl,{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 bl=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:h,onChange:u,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=ml(),[y,v]=n(""),N=g||0===l.length,w=x&&!N,k=i((()=>{v(""),f()}),[]),S=fl({isOpen:x,options:l,value:a,query:y,onChange:u,onClose:k,iconVersion:h});return c("div",{className:p("space-y-xs",e),children:[$t(t),c("div",{className:p("relative",w?"z-20":"z-10"),ref:S,children:[c("div",{className:p("h-14 text-l flex justify-between items-center text-primary-text relative z-10",vl(s,r,N)),onClick:w?k:b,children:[o("p",{className:"p-m pr-8 flex items-center overflow-hidden text-ellipsis",children:hl(a)||d}),yl(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]})]})})),yl=(e,t)=>o(Y,{className:p("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),vl=(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"),Nl=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(bl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),Ut(l)]}))),wl=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],kl=e=>null!=e,Sl=new Map,Cl=e=>Boolean(e?.every((e=>Array.isArray(e)?Cl(e):!e||"string"==typeof e))),Il=e=>Cl(e)?e.toString():"";function Tl(e,t,{fallback:l,cache:i}={}){const s=r((()=>Bl(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(kl))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=Sl)=>l=>{const n=Il(l),a=t.get(n);if(n&&kl(a))return a;const i=e(...l);return n&&kl(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 Bl(e){return Array.isArray(e)?e:e instanceof Function?Bl(e()):[e]}function Ml(){const{data:e}=Tl("/api/v1/regions",ft);return e||[]}const Vl=e=>Object.values(e).map((e=>e.name)),Pl={typeForm:nl,surname:il,name:il,region:al,phone:sl,birthday:nl,email:nl,fullName:nl,inn:rl,partnerComments:nl,comment:nl,consentDataProcessing:cl},Rl=d((({field:e})=>{const t=Ml();return o(Nl,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...Wt(e("region"),Pl.region)})})),zl=({field:e,title:t})=>c(Kt,{title:t,children:[o("div",{className:Gt,children:o(Nl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:wl,...Wt(e("acquiringType"),nl)})}),o("div",{className:Gt,children:o(Rl,{field:e})})]});function Al({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const Dl={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"},jl={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")},Fl=d((({children:e,...t})=>{const l=e=>({...e,onClick:me(Al(e),e)}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=l(t);return o("button",{className: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(Dl[a],jl[a]),c?"rounded-md":"",n),type:s,role:d,onClick:m,children:e})})),El=(e,t)=>o(Fl,{className:p("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Ll={typeForm:{key:"acqr",text:"Предупреждение о мошенничестве"},acquiringType:{key:"trade",text:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},$l=At({acquiringType:nl,region:nl,fullName:nl,inn:rl,name:il,phone:sl}),Ol=d((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:a,...i}=e,r=_l(t?.key),s={partnerComments:`Вид эквайринга=${t?.text||""}${r?`/Онлайн касса=${l}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`,...i};Dt($l(e))&&n(s,!1)}),[n]),[,{field:r,...s}]=Rt(Ll,{onSubmit:a}),d=_l(r("acquiringType").value?.key);return c("form",{className:Et,onSubmit:s.onSubmit,children:[zl({field:r,title:"Вид эквайринга и регион"}),dl(r,"Данные организации"),d?c("div",{role:"radiogroup",children:[o(zt,{type:"radio",text:"Хочу онлайн-кассу",...r("onlineCheckout")}),o(zt,{type:"radio",text:"Хочу купить POS-терминал",...r("posTerminal")})]}):null,El(t),o(Ft,{link:l})]})})),_l=e=>"all"===e||"trade"===e,Ul=[];const Hl=async e=>await xt(e,{method:"GET"})||Ul;function Wl(){const{data:e}=Tl("/api/v1/premiumBranchesByRegions",ft);return e||[]}const Kl=d((({field:e,isPremium:t=!1})=>{const l=e("region")?.value?.key,n=t?Wl().find((e=>e?.region===l))?.branches:function(e){const{data:t}=Tl(e?`/api/v1/branches?regionCode=${e}`:null,Hl);return t||Ul}(l).filter((e=>e?.address));return o(Nl,{label:"Адрес",placeholder:"Выберите адрес",options:(n||[]).map((({address:e=""})=>({key:e,text:e}))),...Wt(e("addressBranch"),al)})})),Gl=["От 1 000 ₽","До 1 000 000 000 ₽"],Yl=["От 1 мес","До 15 лет"],ql=(e,t)=>c(Kt,{title:t,children:[c("div",{className:Gt,children:[o(Ht,{label:"Наименование организации",...Wt(e("fullName"),nl)}),o(Ht,{label:"ИНН",...Wt(e("inn"),rl)}),o(tl,{label:"Телефон",...Wt(e("phone"),sl)})]}),c("div",{className:Gt,children:[o(Ht,{label:"Годовая выручка, ₽",...Wt(e("annualRevenue"),nl)}),o(Ht,{label:"Контактное лицо",...Wt(e("name"),il)}),o(Ht,{label:"Электронная почта",...Wt(e("email"),nl)})]})]}),Xl=(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}},Ql=(e,t,l)=>Math.max(t,Math.min(e,l));function Zl(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function Jl({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=Zl(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const en=1,tn=100,ln=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:en),max:s=(a.length?a.length-1:tn),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:u}=e,g=Xl(e,{normalize:(e=0)=>a.length?nn(a)(e):Ql(e,r,s),format:et()}),x=i((e=>{u&&u(Zl(e.target?.value))}),[u]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(De,{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}),Jl({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:u})]}),an(n)]})})),nn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),an=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(De,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),rn=(e,t)=>c(Kt,{title:t,children:[o("div",{className:Gt,children:o(ln,{title:"Сумма, ₽",items:Gl,min:1e3,max:1e9,...e("amount")})}),o("div",{className:Gt,children:o(ln,{title:"Срок, месяцев",items:Yl,min:1,max:180,...e("term")})})]}),sn={typeForm:{key:"cred",text:"Кредит"},amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",email:"",annualRevenue:""},on=At({fullName:nl,annualRevenue:nl,inn:rl,name:il,phone:sl,region:nl}),cn=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,addressBranch:a,annualRevenue:i,...r}=e;Dt(on(e))&&l({...r,addressBranch:a?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${i}`})}),[l]),[a,{field:r,...s}]=Rt(sn,{onSubmit:n});return c("form",{className:Et,onSubmit:s.onSubmit,children:[rn(r,"Параметры"),ql(r,"Данные организации"),c(Kt,{title:"Офис банка",children:[o("div",{className:Gt,children:o(Rl,{field:r})}),o("div",{className:Gt,children:o(Kl,{field:r,regionKey:a.region?.key})})]}),El(e),o(Ft,{link:t})]})})),dn={typeForm:{key:"dpst",text:"Заявка на депозит"},name:"",phone:""},mn=At({name:il,phone:sl}),hn=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{Dt(mn(e))&&l(e)}),[l]),[,{field:a,...r}]=Rt(dn,{onSubmit:n,resetOnSubmit:!1});return o("form",{className:Et,onSubmit:r.onSubmit,children:o(Kt,{title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",children:c("div",{className:Lt,children:[o(Ht,{label:"Имя",...Wt(a("name"),il)}),o(tl,{label:"Телефон",...Wt(a("phone"),sl)}),El(e),o(Ft,{link:t})]})})})})),un=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],pn=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],gn=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],xn=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)}))}))),fn=[{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"}],bn=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(xn,{paths:fn,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":vn(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:yn(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?d:null,l?o("div",{className:"ml-s",children:o(De,{size:"text-l",font:"font-light",children:l})}):null]})})})),yn=e=>e?"radio":"checkbox",vn=e=>p("rounded border",e?"bg-primary-main":""),Nn=(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(bn,{...e}),o(Ft,{link:t})]}),Ut(Wt(e,cl).error)]}):o(Ft,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),El(l)]}),wn=(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}`}},kn=()=>{},Sn=({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=Cn(t,e),c=In(t,i,r);h.push(o("td",{children:o("div",{className:Tn(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},Cn=(e,t)=>t&&e.toDateString()===t.toDateString(),In=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Tn=(e,t)=>p("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Bn=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Mn=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=kn})=>{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:Bn.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Sn({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),Vn=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Pn=Vn.map((e=>({key:e}))),Rn=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),zn={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},An={className:"min-w-32",iconVersion:"black",isBorder:!1},Dn=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=ml(!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:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=pl(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Vn.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Pn,yearsOptions:Rn,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:h,selectedYear:x,selectedMonth:u,showCalendar:m});return c("div",{className:p("space-y-xs",e),ref:C,children:[$t(t),c("div",{className:"relative",children:[jn(S,l,a),m?c("div",{className:"absolute bg-white z-20 select-none",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(Y,{...zn,className:"-rotate-90 cursor-pointer"})}),o(bl,{onChange:v,value:{key:Vn[u]},options:w,...An}),o(bl,{onChange:N,value:{key:String(x)},options:k,...An}),o("div",{className:"my-auto",onClick:y,children:o(Y,{...zn,className:"rotate-90 cursor-pointer"})})]}),o(Mn,{today:l,currentMonth:u,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),jn=(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(I,{children:t&&wn(t)}),o(Y,{...zn,name:"CalendarIcon"})]}),Fn=d((({className:e,label:t,error:l,...n})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Dn,{label:t&&n?.errors?`${t}*`:t,valid:Boolean(!l),...n}),Ut(l)]}))),En={surname:"",name:"",middleName:""},Ln=(e,t=!0)=>c("div",{className:"space-y-s",children:[o(Ht,{label:"Фамилия",...Wt(e("surname"),il)}),o(Ht,{label:"Имя",...Wt(e("name"),il)}),o(Ht,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),t?o(Fn,{label:"Дата рождения",...Wt(e("birthday"),nl)}):null]}),$n={...En,typeForm:{key:"FEEDBACK",text:"Задать вопрос по продуктам и услугам"},serviceDirection:{key:"Физическое лицо"},birthday:void 0,feedbackMethod:{key:"Телефонный звонок"},phone:"",email:"",comment:"",consentDataProcessing:!1},On={typeForm:nl,region:nl,surname:nl,name:il,feedbackMethod:nl,phone:sl,email:nl,comment:nl,consentDataProcessing:cl},_n=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{Un(e,l)}),[l]),[a,{field:r,...s}]=Rt($n,{onSubmit:n}),d="FEEDBACK_QS"===r("typeForm").value?.key,m=Wn(r("typeForm").value?.key,r("serviceDirection").value?.key);return o("form",{className:Et,onSubmit:s.onSubmit,children:o(Kt,{children:c("div",{className:Lt,children:[o(Nl,{label:"Тема",placeholder:"Выберите тему",options:un,...Wt(r("typeForm"),nl)}),d?o(Nl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:gn,...Wt(r("serviceDirection"),nl)}):null,o(Rl,{field:r}),d?o(Kl,{field:r,regionKey:a?.region?.key}):null,Ln(r,!0),m?c("div",{children:[o(Ht,{label:"ИНН",...Wt(r("inn"),rl)}),o(Ht,{label:"Наименование организации",...r("fullName")})]}):null,o(Nl,{label:"Способ получения ответа",options:pn,...Wt(r("feedbackMethod"),nl)}),o(tl,{label:"Телефон",...Wt(r("phone"),sl)}),d?c("div",{children:[o(tl,{label:"Дополнительный телефон",...r("secondaryPhone").value&&"+7 ("!==r("secondaryPhone").value?Wt(r("secondaryPhone"),sl):r("secondaryPhone")}),o(Ht,{label:"Электронная почта",...Wt(r("email"),nl)}),o(Ht,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...r("bankEmpolee")}),o(Ht,{label:"Дата и время обращения в Банк",...r("applicationDate")})]}):o(Ht,{label:"Электронная почта",...Wt(r("email"),nl)}),o(Ht,{...Wt(r("comment"),nl),placeholder:"Ваше сообщение",isTextarea:!0}),Nn(r("consentDataProcessing"),t,e)]})})})})),Un=(e,t)=>{const l=Wn(e?.typeForm.key,e?.serviceDirection?.key),n=At({...On,...Hn(e,l)});Dt(n(e))&&t(e,!l)},Hn=(e,t)=>t?{addressBranch:nl,inn:rl}:"FEEDBACK"===e.typeForm.key?{birthday:nl}:{addressBranch:nl},Wn=(e="",t="")=>"FEEDBACK_QS"===e&&"Юридическое лицо / ИП"===t,Kn=d((e=>{const{button:t,regionSource:l}=e,[a,i]=n({key:""}),r=l?.regions??[],s=ce({className:"text-white",version:t?.version}),d=r?.find((e=>e.name===a.key))?.href;return c("div",{className:"container space-y-s",children:[r?o(Nl,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:r.map((({name:e=""})=>({key:e,text:e}))),value:a,onChange:i}):null,d?o("div",{className:"text-center",children:o(fe,{href:d,target:"_blank",className:p("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Gn={...En,phone:"",email:"",birthday:void 0,consentDataProcessing:!1},Yn=At({surname:il,name:il,phone:sl,email:nl,birthday:nl,consentDataProcessing:cl}),qn=d((e=>{const{button:t,link:l,product:n="",onSubmit:a}=e,r=i((e=>{Dt(Yn(e))&&a({...e,product:n},!0)}),[a]),[,{field:s,...d}]=Rt(Gn,{onSubmit:r});return c("form",{className:Et,onSubmit:d.onSubmit,children:[c(Kt,{children:[c("div",{className:Gt,children:[o(Ht,{label:"Фамилия",...Wt(s("surname"),il)}),o(Ht,{label:"Отчество (Обязательно, при наличии)",...s("middleName")}),o(tl,{label:"Телефон",...Wt(s("phone"),sl)})]}),c("div",{className:Gt,children:[o(Ht,{label:"Имя",...Wt(s("name"),il)}),o(Fn,{label:"Дата рождения",...Wt(s("birthday"),nl)}),o(Ht,{label:"Электронная почта",...Wt(s("email"),nl)})]})]}),Nn(s("consentDataProcessing"),l,t)]})})),Xn=d((({field:e})=>{const t=Wl().map((({region:e})=>({key:e,text:e})));return o(Nl,{label:"Регион",placeholder:"Выберите регион",options:t,...Wt(e("region"),nl)})})),Qn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Zn={typeForm:Qn[0],...En,email:"",phone:"",comment:"",consentDataProcessing:!1},Jn=At({typeForm:nl,surname:nl,name:il,phone:sl,email:nl,addressBranch:nl,consentDataProcessing:cl}),ea=d((({button:e,link:t,onSubmit:l,defaultType:n="PREMIUMSERVICE"})=>{const a=i((e=>{Dt(Jn(e))&&l(e,!0)}),[l]),[r,{field:s,...d}]=Rt({...Zn,typeForm:ta(n)},{onSubmit:a}),m=r?.region?.key;return c("form",{className:Et,onSubmit:d.onSubmit,children:[c(Kt,{title:"Ваши данные",children:[c("div",{className:Gt,children:[o(Ht,{label:"Фамилия",...Wt(s("surname"),il)}),o(Ht,{label:"Отчество (Обязательно, при наличии)",...s("middleName")}),o(Ht,{label:"Электронная почта",...Wt(s("email"),nl)})]}),c("div",{className:Gt,children:[o(Ht,{label:"Имя",...Wt(s("name"),il)}),o(tl,{label:"Телефон",...Wt(s("phone"),sl)}),o(Nl,{label:"Тип обслуживания",options:Qn,...Wt(s("typeForm"),nl)})]})]}),c(Kt,{title:"Офис банка",children:[o("div",{className:Gt,children:o(Xn,{field:s})}),o("div",{className:Gt,children:o(Kl,{field:s,regionKey:m,isPremium:!0})})]}),o(Ht,{...s("comment"),placeholder:"Комментарий, удобное время и прочее",isTextarea:!0}),Nn(s("consentDataProcessing"),t,e)]})})),ta=e=>Qn.find((t=>t.key===e)),la=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(De,{color:"text-primary-text",children:t}):null]})}))),na=e=>{const{value:t,onChange:l}=e("vedTypes");return o(Kt,{children:c("div",{className:"gap-m grid @xl:flex @xl:items-center",children:[o(la,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),o(la,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),o(la,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),o(la,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},aa=({field:e})=>{const t="currencyControl"===e("vedTypes").value;return c("div",{className:"space-y-s",children:[t?o(Rl,{field:e}):null,c("div",{className:"grid @xl:grid-cols-2 @xl:gap-x-m gap-s",children:[t?o(Ht,{label:"ИНН",...Wt(e("inn"),rl)}):null,o(Ht,{label:"Наименование организации",...Wt(e("fullName"),nl)}),o(Ht,{label:"ФИО",...Wt(e("name"),il)}),o(tl,{label:"Телефон",...Wt(e("phone"),sl)}),t?null:o(Ht,{label:"Электронная почта",...e("email")})]})]})},ia={typeForm:{key:"KVED",text:"Заявка на консультацию ВЭД"},vedTypes:"currencyControl",fullName:"",name:"",phone:"",inn:"",email:"",partnerComments:""},ra={fullName:nl,name:il,phone:sl},sa=At({...ra}),oa=At({...ra,inn:rl,region:nl}),ca=e=>"currencyControl"===e,da=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),ma={ApplicationFormWed:d((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{typeForm:t,fullName:l,name:a,phone:i,email:r,inn:s,region:o,vedTypes:c,partnerComments:d}=e,m={typeForm:t,fullName:l,name:a,phone:i,vedTypes:da(c),partnerComments:d,...ca(c)?{inn:s,region:o}:{email:r}};Dt((e=>ca(e)?oa:sa)(c)(e))&&n(m)}),[n]),[,{field:r,...s}]=Rt(ia,{onSubmit:a});return c("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[na(r),o(C,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),aa({field:r}),o(Ht,{label:"Обращение",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",...r("partnerComments"),isTextarea:!0}),El(t),o(Ft,{link:l}),o(C,{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(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:hn,ApplicationFormCredit:cn,ApplicationFormAcquiring:Ol,ApplicationFormGrantSupport:Kn,ApplicationFormIndividuals:qn,ApplicationFormFeedback:_n,ApplicationFormUltraPremium:ea},ha=Bt(),ua=kt((({className:e,formBlock:t,...l})=>{const[a,r]=n(""),s=i((async(e,t=!1)=>{const l=ga(e),n=await ha.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(C,{headingType:"h3",title:t.title,className:"@xl:text-center"}):null,t?pa(t,s):null,a?o(Vt,{responseType:a}):null]})})})),pa=(e,t)=>{const l=e?.formType;if(!l||!(l in ma))return null;return o(ma[l],{...e,onSubmit:t})},ga=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(t?.region?t?.text:t?.key)||t]))),xa=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(C,{headingType:"h3",title:l,className:"@xl:text-center"}):null,a,n?o(Vt,{responseType:n}):null]})})})),fa=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(bn,{text:t,value:l,disabled:a,onChange:r},n),Ut(i)]}))),ba=e=>(t,l)=>{const{required:n,...a}=t,i={surname:o(Ht,{label:"Фамилия",...ya(e("surname"),Pl.surname,n)}),name:o(Ht,{label:"Имя",...ya(e("name"),Pl.name,n),...a}),middleName:o(Ht,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),phone:o(tl,{label:"Телефон",...ya(e("phone"),Pl.phone,n)}),email:o(Ht,{label:"Электронная почта",...ya(e("email"),Pl.email,n)}),fullName:o(Ht,{label:"ФИО",...ya(e("fullName"),Pl.fullName,n),...a}),inn:o(Ht,{label:"ИНН",...ya(e("inn"),Pl.inn,n)}),comment:o(Ht,{className:"col-span-2",...ya(e("comment"),Pl.comment,n),placeholder:"Ваше сообщение",isTextarea:!0}),region:o(Rl,{field:e,input:t}),birthday:o(Fn,{label:"Дата рождения",...ya(e("birthday"),Pl.birthday,n)}),isClient:o(fa,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}),partnerComments:o(Ht,{label:"Количество объектов инкассации",...ya(e("partnerComments"),Pl.partnerComments,n)})};return o("div",{children:i[t.name]},String(l))},ya=(e,t,l=!1)=>l?Wt(e,t):e,va={typeForm:{key:"",text:""},region:{key:"",text:""},surname:"",name:"",middleName:"",phone:"",email:"",birthday:void 0,comment:"",consentDataProcessing:!1,product:""},Na=(e,t="")=>({...Object.fromEntries(Vl(e).map((e=>[e,va[e]]))),typeForm:{key:t,text:""}}),wa=Bt(),ka=d((({className:e,title:t,typeForm:l="",sections:a=[],button:r,link:s,endpoint:d})=>{const m=a?.flatMap((e=>e?.inputs))||[],h=Na(m,l),[u,g]=n(""),x=At((e=>{const t=Vl(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Pl?.[e]])))})(m)),f=i((async e=>{if(!Dt(x(e)))return"Fail";const t=(e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,("region"===e?t?.text:t?.key)||t]))))(e),l=await wa.send(t,"lead"===d)?"OK":"Fail";return g(l),l}),[]),[,{field:b,onSubmit:y}]=Rt(h,{onSubmit:f}),v=Ca(m)?.name;return o(xa,{className:p(Et,e),title:t,responseType:u,children:c("form",{className:"",onSubmit:y,children:[a.map(((e,t)=>c("div",{className:p(Sa(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(ba(b))]},`section-${t}`))),Nn(v?b("consentDataProcessing"):void 0,s,r)]})})})),Sa=e=>2===e?"@xl:grid-cols-2":"",Ca=e=>e.find((e=>"consentDataProcessing"===e?.name)),Ia="text-left",Ta={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Ba=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",Ta[l],e),children:o(Y,{...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(C,{headingType:"h3",as:"h2",className:Ia,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(Va)}):null]}))),Va=({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(Ba,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?o(ne,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(C,{headingType:"h6",children:e}),o(De,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),o(Je,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Pa=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Ra(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const za=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:Ra(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})})),Aa=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],Da=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(Fa(l))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?ja(c,v):{},...N?Pa(h):{},gap:`${r}px`};return o("div",{className:p("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,role:"list",children:(S=(e,l)=>o(za,{className:p(m,a?Aa[a-1]:"",N?"h-full":"",t),style:w?ja(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(u)});var S})),ja=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Fa=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Ea={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},La={"horizontal-list":"w-6","vertical-list":"h-6"},$a=d((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?o("div",{className:p("flex gap-xs",Ea[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?La[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Oa=e=>e,_a=(e=Oa)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Ua=_a(),Ha=(e=Oa)=>_a((t=>-e(t))),Wa=Ha(),Ka=e=>t=>e.scrollWidth/t,Ga=e=>(t,l)=>{e.scrollBy({left:l*Ka(e)(t),behavior:"smooth"})},Ya=({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?[Ha()(a),_a()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Ga(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Ga(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}]},qa=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]=Ya({itemCount:m,onVisibleIndicesChange:s}),[g]=u.visibleIndicesRange;return c("div",{className:p(e,"vertical-list"===d?"relative h-full":""),children:[o(Da,{containerRef:h,activeIndex:g,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:u.handleVisibleIndicesChange,listType:d,minHeight:i,children:r}),a?o($a,{containerRef:h,activeIndex:g,dotCount:m,listType:d,version:t}):null]})})),Xa=(e,t,l)=>{return o(qa,{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(De,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?o(De,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},Qa=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?Xa(e,0,t):null]}))),Za={start:"justify-start",center:"justify-center",end:"justify-end"},Ja=d((({buttons:e,className:t="",align:l,...n})=>{const a=l?p("flex",Za[l]):"";return o(x,{className:p("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Ge(e)})})),ei=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 ti=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})})})),li=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(De,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,o("div",l?{children:o(De,{size:"text-h3",children:[i,et(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:o(De,{size:"text-h3",children:"-"})})]}))),ni=Math.round(29.5),ai={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},ii={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},ri={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},si={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},oi={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},ci=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,[a,i]=((e,t,l)=>{const{maxBonus:n=5e3,prefMonthsNum:a=ri.prefMonthsNum,prefTravelBonusRate:i=ri.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||ri,l,n);return{...t,...e,monthBonus:a,yearBonus:i}},di=e=>e?o(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,mi=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>c("div",{children:[o(De,{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:et(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]})]}))),hi=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s",children:[o(De,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(Y,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),ui=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?o(hi,{title:e,...i}):c("div",{children:[o("div",{className:"hidden @xl:block",children:o(mi,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),o("div",{className:"@xl:hidden",children:o(li,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function pi({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${et(2)(l.min||0)} ₽`,`До ${et(2)(l.max||0)} ₽`];return o(ln,{items:e?n:[],step:t,...l})}const gi=d((({className:e="",calcSource:t,buttons:l,footnote:n})=>{const[a,{field:i}]=Rt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:d,maxSumOther:m,monthBonus:h,yearBonus:u}=ci(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:[pi({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),pi({title:"Сумма покупок в остальных категориях, ₽",min:d,max:m,step:500,isShowItems:!1,...i("restExpenseValue")})]}),h>=0?ui({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(li,{title:"Баллов за год",value:u}):null,Ge(l,{isVertical:!0}),di(n)]})]})})),xi=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})]}))),fi=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:bi([e,t],n),bi=([e,t],l=[])=>({[e]:l.length?Wa(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Ua(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),yi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],vi=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ni=(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)},wi=(e,t=0)=>e?.sum?e.sum:t,ki=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Si=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Ci={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Ii=d((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>o("div",{className:p(`flex ${Ci[a]}`,l),role:"radiogroup",children:e?.map((({id:e,text:l})=>o(bn,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Ti=({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(De,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",children:o(De,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(Ii,{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)})]}),Bi=e=>Ti({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Mi=d((({className:e="",buttons:t,footnote:l,bottomFootnote:n,isShowDepositeName:a,defaultParams:i,calcSource:r})=>{const[s,{field:d}]=Rt({moneyValue:wi(i,1e5),daysValue:ki(i,60),isReplenished:Boolean(i?.isReplenished),isPartialWithdrawal:Boolean(i?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(i?.isMonthlyInterestPayment)}),m=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=l<90||l>730;if(l<=30)return{...oi,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const c=t?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&vi(s,e)&&yi(n,["minSum","maxSum"],e)&&yi(l,["minDays","maxDays"],e)))||oi,{rate:d}=c,m=Ni(d,e),h=n+m,u=t?.rateRows||[oi];return{...c,...bi(["minSum","maxSum"],u),...bi(["minDays","maxDays"],u),...e,isDisabledOperatingDeposit:o,income:m,finalSum:h}})(s,r),{income:h,finalSum:u,rate:p,isUnavailableByTerm:g,depositeName:x}=m;return o(xi,{className:e,inputChildren:c("div",{children:[pi({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(ln,{items:[`От ${Si(f.min||0)}`,`До ${Si(f.max||0)}`],step:1,...f})),c("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[Vi(m,d),Bi({title:"Выплата процентов",orientation:"vertical",...d("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),rateChildren:ui({rate:p,depositeName:x,isShowDepositeName:a,isUnavailableByTerm:g}),resultChildren:c("div",{children:[Pi(u,h),Ge(t,{isVertical:!0}),di(l),di(n)]})});var f})),Vi=(e,t)=>c("div",{className:"space-y-s",children:[o(De,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[o(bn,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(bn,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Pi=(e,t)=>c("div",{className:"flex flex-col gap-2xl sm:gap-0 mb-lg",children:[o(li,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),o(li,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),Ri=e=>zi({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&zi({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&zi({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&zi({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),zi=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Ai=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},Di=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows||[ai],r=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Ri({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:s,maxSum:o}=fi(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=fi(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>Ri({row:e,userInputParams:t,paramsViewSettings:l})&&yi(n,["minSum","maxSum"],e)&&yi(a,["minMonths","maxMonths"],e)))||ai)({rateRows:i,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:h}=m,u=Ai(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:n,monthsValue:a,monthlyPayment:u}},ji=({min:e=0,max:t=0,availableMonths:l,...n})=>o(ln,{items:[`От ${Fi(e)}`,`До ${Fi(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Fi=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Ei=e=>Ti({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Li=d((({className:e,calcSource:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=Rt({moneyValue:wi(i,2e5),monthsValue:ki(i,ni),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),d=Di(r,t,a),m=Ei({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return o(xi,{className:e,inputChildren:c("div",{children:[pi({title:"Сумма кредита, ₽",step:500,min:d.minSum,max:d.maxSum,...s("moneyValue"),value:d.moneyValue}),ji({title:"Срок кредита, месяцев",min:d.minMonths,max:d.maxMonths,...s("monthsValue"),value:d.monthsValue}),$i({...d,...a},s),o("div",{className:"sm:hidden",children:m})]}),rateChildren:ui({rate:d.rate}),resultChildren:c("div",{children:[o(li,{title:"Ежемесячный платёж",value:d.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:m}),Ge(l,{isVertical:!0}),di(n)]})})})),$i=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(bn,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(bn,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(bn,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(bn,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Oi=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},_i=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows?.[0]?Wi(t.rateRows[0].minMonths,t.rateRows[0].maxMonths):0,r=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=t?.rateRows?.find((t=>Hi({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r})&&Hi({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&yi(n,["minSum","maxSum"],t)&&yi(a||i,["minMonths","maxMonths"],t)))||si,{rate:c}=o,d=Ui(c,e),m=n+d,h=t?.rateRows||[si];return{...o,...bi(["minSum","maxSum"],h),...bi(["minMonths","maxMonths"],h),availableMonths:Oi(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}},Ui=(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)},Hi=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Wi=(e,t)=>e+Math.round((t-e)/2),Ki=d((e=>{const{className:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s}=e,[d,{field:m}]=Rt({moneyValue:wi(s,2e4),monthsValue:ki(s),isMonthlyInterestPayment:Boolean(s?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(s?.isRemoteRegistration)}),h=_i(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(Ql(d.moneyValue,h.minSum,h.maxSum))}),[h.minSum,h.maxSum]),o(xi,{className:t,inputChildren:c("div",{children:[pi({title:"Сумма, ₽",min:h.minSum,max:h.maxSum,...m("moneyValue"),value:h.moneyValue}),ji({title:"Срок, месяцев",min:h.minMonths,max:h.maxMonths,availableMonths:h.availableMonths,...m("monthsValue"),value:h.monthsValue}),Gi({...h,...r},m)]}),rateChildren:ui({rate:p}),resultChildren:c("div",{children:[o(li,{title:"Доход в конце срока",value:g,postfix:"₽",prefix:"+"}),o(li,{title:"Сумма в конце срока",value:x,postfix:"₽"}),Ge(n,{isVertical:!0}),di(i)]})})})),Gi=(e,t)=>{return c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?Bi({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Ti({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Yi=e=>qi({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&qi({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),qi=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Xi=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[ii],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Yi({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=fi(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=fi(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Yi({row:e,userInputParams:t,paramsViewSettings:l})&&yi(n+r,["minSum","maxSum"],e)&&yi(i,["minSumOld","maxSumOld"],e)&&yi(r,["minSumExtra","maxSumExtra"],e)&&yi(a,["minMonths","maxMonths"],e)))||ii)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=Ai(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}},Qi=d((({className:e,calcSource:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=Rt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Xi(i,t,a),d=Ei({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return o(xi,{className:e,inputChildren:c("div",{children:[pi({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),pi({title:"Ежемесячный платёж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),ji({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Zi({...s,...a},r),s.isExtraMoney?pi({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:ui({rate:s.rate,fractionDigits:1}),resultChildren:c("div",{children:[o(li,{title:"Ежемесячный платёж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?o(li,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:d}),Ge(l,{isVertical:!0}),di(n)]})})})),Zi=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(bn,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(bn,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(bn,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Ji={CreditCalculatorForm:Li,DepositCalculatorForm:Ki,BusinessDepositCalculatorForm:Mi,BonusCalculatorForm:gi,RefinancingCalculatorForm:Qi},er=kt((({className:e,calculatorTabs:t=[],...l})=>o(x,{className:e,defaultPadding:"p-0",...l,children:lr(t)}))),tr=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in Ji))return null;const l=Ji[t];return c("div",{className:"p-xl",children:[e?.calculatorBlock?.title?o(C,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,o(l,{...e.calculatorBlock,isMobile:!0})]})},lr=e=>{if(!e||!e.length)return null;return 1===e.length?tr(e[0]):e.map(((e,t)=>o(ei,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>o(ti,{isUnfolded:t,children:tr(e)}),renderFoldButton:nr(e)},t.toString())))},nr=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(Y,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),c("div",{className:"flex-1 flex flex-col pl-s",children:[o(De,{align:n,color:"text-white",children:e.nav?.title}),o(De,{align:n,size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),o(Y,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]})},ar=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Xl(e,{normalize:(e=a)=>l&&n?String(Ql(Number(ir(e)),l,n)):ir(e),format:et(r)}),d=i((e=>t&&t(ir(e))),[t]);return o(Ot,{onChange:d,...s,...c})})),ir=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),rr=d((e=>o(ar,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(De,{size:"text-xl",font:"font-light",children:"₽"})})}))),sr={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},or={amount:1500},cr=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...d})=>{const[{amount:m},{field:h}]=Rt(or),[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(C,{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:sr[s],children:[o(rr,{valid:!u,placeholder:i,label:l,...h("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:m}),r?.text?o(Fl,{className:"w-full mt-lg",type:"submit",disabled:u,children:r.text}):null]})]})})),dr=(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}]},mr=d((({className:e,disabled:t,...l})=>o(fe,{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(ne,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),hr=d((e=>o(mr,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),ur=d((e=>o(mr,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),pr="absolute top-[calc(50%-24px)] z-40",gr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",xr=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:"hidden @lg:block",children:[fr(e),g?o(hr,{className:p(pr,n?"left-1 @lg:left-8":"left-0"),onClick:f}):null,x?o(ur,{className:p(pr,n?"right-1 @lg:right-8":"right-0"),onClick:b}):null]})})),fr=e=>c("div",{children:[e.canScrollLeft?o("div",{className:p(gr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:p(gr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),br=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",yr=({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(Y,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(I,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),vr="relative h-full",Nr={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},wr=({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:kr(n,{someCardsHighlighted:i}),children:[P(n,a,{className:Sr(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Cr(n)?yr({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},kr=(e,{someCardsHighlighted:t})=>p(vr,t&&(Cr(e)?"pt-3xl":"pt-3xl sm:pt-16")),Sr=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>p(vr,"min-w-80",Nr[n],t&&(Cr(e)?"pt-3xl sm:pt-16":"pt-3xl"),br(l),l&&"h-full"),Cr=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Ir=kt((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...d})=>{const{blocks:m=[]}=d.block||{},h=t||m?.length,[u,{inc:g,dec:f}]=dr({itemCount:h,visibleItemCount:l},Math.floor(l/2)),[b,y]=Ya({itemCount:h}),[v]=y.visibleIndicesRange,N=m&&"CarouselBankHistoryCard"===m[0]?.type;return c(x,{className:e,defaultPadding:"p-6xl",...d,children:[c("div",{className:p(a?"flex justify-center":"","relative max-w-full"),children:[o(Da,{containerRef:b,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:wr({noCardBorder:n,activeIndex:u,cardSize:s,...d})}),o(xr,{scroll:y,arrowsPadded:i,onScrollLeft:f,onScrollRight:g,hasEdgeBlocks:N,activeIndex:u,itemCount:h})]}),o($a,{className:"@5xl:hidden",containerRef:b,activeIndex:v,dotCount:h,listType:"horizontal-list"})]})}),{childrenTypes:["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Tr=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})}))),Br="z-10 border border-solid w-full h-full",Mr=p(Br,"absolute hidden @xl:block border-transparent"),Vr=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(Mr,"top-9 right-12 bg-green-dark")}),o("div",{className:p(Mr,"top-6 right-8 bg-green")}),o("div",{className:p(Mr,"top-3 right-4 bg-green-light")}),c("div",{className:p(Br,"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})]})]})}))),Pr={black:"bg-black",white:"bg-white"},Rr=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(we,{className:"h-full",padding:d,title:o(B,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(ne,{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(De,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(zr)]}):null,a?c(De,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),zr=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Pr[e]}`},String(t)),Ar=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]}))),Dr=d((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>o(Ar,{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(De,{size:"text-h4",children:t}),iconNode:l?o(ne,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),jr=({isUnfolded:e,onToggle:t})=>o(Dr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Fr=d((({className:e="",icon:t,...l})=>{const n=he(),{text:a,href:i,target:r,onClick:s}=n(l);return a?o("div",{className:p("w-full pb-lg",e),children:c("a",{className:"bg-white flex justify-between rounded-md w-full p-lg whitespace-nowrap",role:"link",href:i,target:r,onClick:s,children:[c("div",{className:"flex items-center space-x-lg",children:[t?o(ne,{imageClassName:"text-green-dark",image:t,width:"20",height:"20"}):null,o(De,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})]}),o(Y,{className:"text-green",name:"ArrowRightIcon",width:"20",height:"20"})]})}):null})),Er=d((({className:e,additionalDescription:t,description:l,links:n=[],title:a,...i})=>c(x,{className:e,...i,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?Lr(n):null]}))),Lr=(e,t=3)=>{const l=(e||[]).map(((e,t)=>o(Fr,{...e},String(t)))),[n,a]=t>0?[l.slice(0,t),l.slice(t)]:[l,[]];return o("div",{className:"mt-4xl",children:a.length>0?o(ei,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:"mb-1",children:n}),o(ti,{isUnfolded:e,children:a})]}),renderFoldButton:$r}):o("div",{children:n})})},$r=({isUnfolded:e,onToggle:t})=>e?null:o(Dr,{className:"border-t-main-divider/50",icon:"PlusIcon",label:"Показать еще",onClick:t}),Or=d((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=he({isRemote:n})({href:t,target:l});return o(t?"a":"div",{className:p("block",e),...t?i:{},role:t?"link":"none",children:a})})),_r=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Ur=e=>_r.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},Hr=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}=Ur(t),o=Ke(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(De,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Wr=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(Or,{href:a,target:m,className:"h-full",children:c(we,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(B,{title:h,description:l,headlineVersion:"XS",isEmbedded:!0,align:u}),...st(Ke(i)?o(ne,{image:i}):null,f),buttons:d.length?o(Hr,{media:d,showButtonText:!0,version:v?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(We,{benefits:g}),o(Je,{items:r,isDotted:s,listItemSize:"S"}),Kr(n,u)]})})}))),Kr=(e,t)=>e?o(I,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Gr=(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(De,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(De,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:Ge(a)}):null]},String(t))},Yr=d((({className:e="",title:t,align:l="text-center",icon:n,button:a,visibleCellsCount:i=1,cardCells:r=[],...s})=>{const d=r.map(Gr),[m,h]=i>0?[d.slice(0,i),d.slice(i)]:[d,[]];return c(x,{className:p("flex flex-col",e),defaultPadding:"p-2xl",...s,children:[Ke(n)?o("div",{className:"self-center",children:o(ne,{image:n})}):null,t?o(C,{className:p("pt-xs",l),headingType:"h5",title:t}):null,a?.text?o(fe,{className:"w-full mt-m mb-lg",...a}):null,h.length?o(ei,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[m,o(ti,{isUnfolded:e,children:h})]}),renderFoldButton:r.length>1?qr:null}):o("div",{children:m})]})})),qr=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,type:"button",children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(Y,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Xr=(e=!1)=>e?"text-white":"",Qr=(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(ne,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&o("div",{children:o(ne,{image:t})}),l?o(C,{headingType:"h4",className:Xr(a),title:l}):null,n?o("div",{className:Qr(a),children:n}):null]}))),Jr=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(ls(l,t)):null})}))),es=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),ts=(e=!1)=>""+(e?"text-white":""),ls=(e,t)=>({label:l,description:n},a)=>c("div",{className:"flex justify-between text-s py-s",children:[o(I,{size:"text-s",color:es(e),children:t}),c("div",{className:"basis-1/2",children:[l?o("div",{className:"text-right",children:o(I,{size:"text-s",align:"text-right",color:ts(e),children:l})}):null,n?o("div",{className:"text-right",children:o(I,{size:"text-s",color:es(e),children:n})}):null]})]},String(a)),ns=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(Jr,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?o(fe,{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,as({onToggleColumn:i,isFillGradient:n,showRow:a})]})})})),as=({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(De,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),is=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(C,{headingType:"h3",className:"font-medium text-center",title:l}):null,o("table",{className:"border-separate",children:o(rs,{...e})})]})})),rs=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(ns,{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(qa,{onVisibleIndicesChange:h,children:u})}:{children:u})})),ss=e=>e%2!=0,os=d((({title:e,description:t})=>c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(B,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:Ia})]}))),cs=["ArrowDownIcon","ArrowUpIcon"],ds="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",ms=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(os,{...a}):null}),c("div",{className:p("space-y-2xs",t.length?"":"hidden"),children:[c("div",{className:p(ds),children:[z(r,{...i.options,parent:n}),ss(r.length)?o(Ct,{className:"col-span-6",...i}):null]}),o(ei,{renderFoldableSection:({isUnfolded:e})=>c(ti,{className:p(ds),isUnfolded:e,children:[z(s,{...i.options,parent:n}),ss(s.length)?o(Ct,{className:"col-span-6",...i}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>o(Dr,{className:p(l<1?"hidden":""),disabled:!s?.length,label:e,icon:cs[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),hs=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(zt,{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))))),us=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(ps(e))]}),n?o("div",{children:o(Fl,{type:"reset",className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,children:n?.text})}):null]}),ps=e=>([t,l])=>{const n=l?.type;return"array"===n?gs(t,e)(l):null},gs=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{children:[l?.title?o("div",{className:"mb-m",children:o(De,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,o(hs,{items:n,multiple:!l?.single,...t(e)})]},e)};function xs(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const fs=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,bs=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>fs(t[e])||fs(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>fs(t[e])||fs(l[e])||ys(t[e])<=ys(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>fs(t[e])||fs(l[e])||ys(t[e]?.min)>=ys(l[e]?.min)&&ys(t[e]?.min)<=ys(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>fs(t[e])||fs(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>fs(t[e])||fs(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),ys=e=>Number(e||0),vs=(e,{block:t,page:l,normalize:n=Pt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=Rt(e),d=r((()=>xs(a,a.map((e=>Nt(e.content,l?.fallback))))),[a,l?.fallback]),m=i===e?a:((e,t)=>(l=Pt)=>e?.filter((([,e])=>bs(t,l(e)||{}))).map((([e])=>e)))(d,i)(n);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},Ns=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,ws=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),ks=1e9,Ss={sum:{min:1e4,max:ks},period:3},Cs=kt((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=vs(Ss,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:Is(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),u=Ts(h),g=c("div",{children:[o(rr,{label:n?.title,min:500,max:ks,...d("sum",{parse:e=>({min:Number(e),max:ks}),format:({min:e})=>String(e)})}),o(ln,{title:a?.title,items:["От 3 мес","До 5 лет"],list:u,...d("period")})]});return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[us({field:d,reset:m,filtrationSchema:t,resetButton:l,children:g}),o(ms,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Is=e=>bt((e?.paramsSource?.rateRows||[]).filter(Ns).flatMap((e=>ws(e.minMonths,e.maxMonths)))),Ts=e=>bt(e.flatMap((e=>e||[])).filter(Ns).flatMap((e=>ws(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Bs=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Ms=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:Bs(n)}),o(B,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(fe,{version:a?.version,text:a?.text,...a}):null]}))),Vs="location";function Ps(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(h,"location",zs()??{name:e}),r=i((e=>{As(e),l(e)}),[]),{data:s}=Tl(Rs()?null:"/api/v1/region",ft);return a((()=>{s&&!Rs()&&l(s)}),[s]),[t??{name:e},r]}const Rs=()=>Boolean(globalThis.localStorage?.getItem(Vs)),zs=()=>{try{const e=globalThis.localStorage?.getItem(Vs);return e&&JSON.parse(e)}catch(e){return null}},As=e=>{try{globalThis.localStorage?.setItem(Vs,JSON.stringify(e))}catch(e){}};var Ds;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Ds||(Ds={}));const js=new Intl.NumberFormat("ru",{style:"currency",currency:Ds.RUB}),Fs=e=>e?js.format(e):"",Es="text-left text-m font-light text-secondary-text",Ls=`${Es} pl-5xl`,$s={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Os=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:`h-fit w-fit ${e}`,children:[o("thead",{children:c("tr",{children:[o("th",{className:Es,children:o(De,{size:"text-m",children:"Валюта"})}),o("th",{className:Ls,children:o(De,{size:"text-m",children:"Купить"})}),o("th",{className:Ls,children:o(De,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(_s)})]}))),_s=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:$s[t]},width:"24",height:"24"}):null,o(De,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl",children:o(De,{size:"text-h6",children:Fs(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl",children:o(De,{size:"text-h6",children:Fs(e?.buyExchangeRate)})})]},t)},Us={icon:"GpsIcon"},Hs=d((({className:e="",address:t})=>c("div",{className:`flex gap-s ${e}`,children:[o(Ba,{...Us,iconBgVersion:"primary"}),c("div",{className:"space-y-2xs",children:[t?o(I,{size:"text-l",color:"text-primary-main",children:t}):null,o(I,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Ws=(e,t,l)=>{const n=Number(Ks(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)},Ks=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Gs=e=>{return(t=[[e=>e.value!==Ds.RUB&&e.oppositeValue!==Ds.RUB,()=>e.handleConvert(e.value,Ds.RUB)],[e=>e.value===Ds.RUB&&e.oppositeValue===Ds.RUB,()=>e.handleConvert(e.value,Ds.USD)],[e=>e.value===Ds.RUB&&e.oppositeValue===Ds.RUB,()=>e.handleConvert(e.value,Ds.CNY)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Ys(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(bl,{isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const qs=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Ds.RUB,selectBuy:l?.[0]?.currency?.currency||Ds.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`grid gap-m pt-2xl ${e}`,children:[Ys({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Xs(r,d,l),value:r.inputSell,setValue:e=>Zs(d,l)(e,r.selectSell,r.selectBuy)}),Ys({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Qs(r,d,t),value:r.inputBuy,setValue:e=>Js(d,t)(e,r.selectBuy,r.selectSell)}),a?.text?o(fe,{text:a.text,version:a?.version,...a}):null]})})),Xs=(e,t,l)=>n=>{t({selectSell:n}),Gs({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Zs(t,l)(e.inputSell,n,a)}})},Qs=(e,t,l)=>n=>{t({selectBuy:n}),Gs({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Js(t,l)(e.inputBuy,n,a)})},Zs=(e,t)=>(l,n,a)=>{e({inputSell:Ks(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(Ws(l,i,n===Ds.RUB)||"")})},Js=(e,t)=>(l,n,a)=>{e({inputBuy:Ks(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(Ws(l,i,n===Ds.RUB)||"")})};const eo=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=Ps(),i=function(e){const t=e?.code||"000",{data:l}=Tl(`/api/v1/exchangerates?regionCode=${t}`,ft);return l||{}}(a),r=to(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Ds.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:Ds.RUB}}),o(x,{className:p("box-border min-h-80",e),...n,children:o(we,{className:"h-full",title:o(C,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex gap-6xl flex-wrap",children:[c("div",{children:[r?o(Os,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Hs,{address:i?.address})]}),r.length&&s.length&&d.length?o(qs,{className:"grow",currencyRatesBuy:s,currencyRatesSell:d,button:l}):null]})})})})),to=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],lo=(e,t)=>o(Ba,{...e,iconBgVersion:t,className:"shrink-0"}),no=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(Ar,{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:[lo(a,t),e?o(De,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(Y,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),ao=kt((({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(ei,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(ti,{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})=>io({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),io=({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(no,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):o(Dr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},ro=d((({className:e="",items:t})=>c("div",{className:e,children:[t?.length?t.map(so):null,o(fe,{version:"primary",className:"w-full",href:"https://beta.rshb.ru/natural/feedback/question",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),so=(e,t)=>c("div",{className:"mb-m space-y-m",children:[o("div",{children:o(De,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(oo)})]},String(t)),oo=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:co(e.type,e.text)}),o(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),co=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${mo(t)}`,children:o(De,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},mo=e=>e.replaceAll(/\D/g,""),ho=["split_version","New","Old"],uo=d((({className:e="",index:t,text:l,...n})=>{const a=he(),{href:i,target:r,onClick:s}=a(n);return o("a",{className:p("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),po=d((({title:e,links:t,className:l=""})=>c("div",{className:p("flex flex-col gap-4",l),children:[o(De,{size:"text-l",font:"font-normal",children:e}),t?.length?o("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>o(uo,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),go=d((({className:e="",items:t,basePath:l})=>t?.length?o("ul",{className:p("flex flex-col",e),children:t.map(xo(l))}):null)),xo=e=>(t,l)=>{const{text:n,...a}=t,i=he({isRemote:!(!F.BASE_PATH||!e)&&!F.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)}`)},fo=d((({className:e="",index:t,...l})=>{const n=he({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}`})})),bo=d((({className:e="",links:t})=>c("div",{className:p("@container",e),children:[o("div",{className:"pt-lg",children:o(De,{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(fo,{index:t,...e},String(t))))}):null]}))),yo=kt((({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]=ho;((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:vo(n)}),o(ro,{className:"overflow-hidden",items:r}),c("div",{className:"mt-xl",children:[o(Hr,{className:"mb-xl",media:s,stretched:!0,children:"Соцсети"}),c("div",{className:"mb-xl",children:[o("div",{className:"flex flex-col gap-4 mb-xs",children:d?.map(No)}),o(De,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),o("div",{className:"py-lg border-t border-main-divider",children:o(uo,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:u})}),o(po,{className:"py-lg border-y border-main-divider",title:m,links:a}),o(bo,{links:h})]})})),vo=e=>e?.map(((e,t)=>o(ao,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:o(go,{items:e.items,basePath:D(e.href)})},String(t)))),No=({href:e="/",text:t},l)=>{const{label:n}=Ur(e);return o(fe,{className:"w-full",text:t||n,version:"secondary",href:e,target:"_blank"},String(l))},wo={width:"34",height:"34"},ko={"bg-white":"color",transparent:"white"},So={"bg-white":"text-primary-main",transparent:"text-white"},Co=(e,t,l)=>o(ne,t?.src?{image:t,className:So[e],width:l?.width,height:l?.height}:{image:{icon:t?.icon||"LogoIcon",iconVersion:ko[e]},className:So[e],width:l?.width,height:l?.height}),Io={"bg-white":"text-primary-text",transparent:"text-white"},To=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,wo),r?n??o("div",{className:"ml-s",children:o(De,{font:"font-medium",color:Io[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),Bo={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Mo=d((({bgColor:e,logo:t,alwaysShowLogo:l,internetBankUrl:n,version:a})=>{const r=u(),s=F.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(To,{className:"my-2xs",bgColor:e,logo:t})}):Vo(d),n?o("div",{children:o(fe,{href:n,ariaLabel:"Войти",target:"_blank",className:p("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",Bo["transparent"===a?"transparent":"default"]),children:"Войти"})}):null]})})),Vo=e=>o("div",{children:c("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,type:"button",children:[o(ne,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),Po={"bg-white":"primary",transparent:"transparent"},Ro=kt((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:l=Po[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(Mo,{bgColor:e,logo:i,alwaysShowLogo:t,internetBankUrl:r,version:l,...a})})})})),zo={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Ao=kt((({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",zo[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Z(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:A({...c,extraProps:{className:p("w-full",br(r)),padding:n?"":"p-0"}})})}),{childrenTypes:[]}),Do=kt((e=>o(Ao,{...e})),{childrenTypes:[]}),jo=d((e=>{const{className:t,image:l,...n}=e;return o(x,{className:t,defaultPadding:"p-0",...n,children:o(ne,{image:l})})})),Fo=["байт","Кб","Мб","Гб","Тб","Пб"],Eo=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(De,{size:"text-l",font:"font-light",children:[t," ",Lo(s,d),o(De,{color:"text-secondary-text",children:l&&`${s+r+d}`})]}):null]})})),Lo=(e,t)=>e||t?o("span",{children:", "}):"",$o={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Oo=d((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=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",$o[r]),role:"list",children:a.map(_o(d,i))}):null]})})),_o=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a="Attachment"===l?.docType?W(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))} ${Fo[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?Uo(a):l?.fileFormat;return o("div",{role:"listitem",children:o(Eo,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?o(ne,{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))},Uo=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},Ho=d((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,additionalDescription:d="",title:m="Мобильное приложение",version:h="primary",...u})=>{const g="secondary"===h?"p-m min-w-32":"min-w-24",f=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(x,{className:p("min-h-80",e),padding:"p-0",version:h,...u,children:c(we,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(C,{headingType:"h3",title:m,className:p("whitespace-pre-wrap",l)}),rightImage:f,buttons:Ge(n,{className:"flex-wrap"}),children:[a?o(De,{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(Je,{items:r,listItemSize:"M"}),o(De,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:d}),s?.src?o("div",{className:p("flex justify-center bg-white rounded-md @xl:-order-1",g),children:o(ne,{className:"w-fit",image:s})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),Wo={primary:"bg-white/30",secondary:"bg-main-divider"},Ko={primary:"text-white",secondary:"text-secondary-text"},Go=d((({count:e,version:t="secondary"})=>o("div",{className:p("w-6 h-6 rounded-full flex items-center justify-center",Wo[t]),role:"status",children:o(De,{size:"text-xs",color:Ko[t],children:e})}))),Yo=(e=[],t={})=>e.filter((({content:e={}})=>bs(t,e))).length,qo=(e,t)=>e===t;const Xo=(Qo=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(qo,((e=qo)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Qo(l,t[e])))));var Qo;const Zo=[],Jo={},ec={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},tc={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},lc={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},nc={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},ac=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",ec[n],l?nc[n]:lc[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?tc[n]:"text-secondary-text hover:text-primary-main"),children:[o(De,{size:"text-m",children:r}),s?o("div",{className:"ml-xs",children:s}):null]})})})),ic=d((e=>o(e?.item?.href?rc:sc,{...e}))),rc=d((e=>{const t=he(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(ac,{...e,tag:"a",item:a,onClick:n})})),sc=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(ac,{item:e,onClick:n,...l})})),oc=(e,t,l)=>(n,a)=>o(ic,{isActive:n===e,onClick:t,type:l,item:n},String(a)),cc=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(oc(n,a,t))}))),dc={categories:[],extraOptions:[],propertyType:[],stage:[]},mc=kt((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:u}]=vs(dc,{block:a.block,page:a.options?.page}),g=i(((e=dc)=>u(e)),[]),f=(({hotFilters:e=Zo,filtrationState:t=Jo,blocks:l=Zo,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Xo(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:o(Go,{version:t===e[a]?"primary":"secondary",count:Yo(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(cc,{...f}),us({field:m,reset:h,filtrationSchema:l,resetButton:n}),o(ms,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}});function hc(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 uc={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"},pc=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(uc).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:o(Y,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),gc=e=>globalThis[e];const xc=()=>function(e,t){const[l,r]=n(),s=i((()=>r(gc(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!gc(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${F.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),fc={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"},bc=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(fc).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(Y,{name:l,width:"20",height:"16"})})})),yc={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"},vc=[55.753995,37.614069],Nc=d((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=xc(),[d,m]=n();if(a((()=>{i?.current?r&&(hc(r,i.current,e),e?.length||i.current.setCenter(vc)):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:e?wc(e):vc,zoom:l,controls:[],suppressMapOpenBlock:!0}),hc(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(yc),h,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;d?e.exitFullscreen():e.enterFullscreen(),m(e.isFullscreen())},children:o(Y,{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(bc,{yandexMaps:i}),o(bc,{yandexMaps:i,direction:"out"})]}),pc(i.current,r,p("right-2 top-80",h))]})})),wc=e=>[Sc(kc(e,0)),Sc(kc(e,1))],kc=(e,t)=>e.map((e=>e.coords[t])),Sc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Cc={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},Ic=(e,{field:t,reset:l})=>c("div",{className:"pb-2xl",children:[e?.length?o("div",{className:"flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",children:e.map((e=>o(bn,{text:Cc[e],...t(e)},e)))}):null,o(fe,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:o(Y,{name:"CloseIcon",width:"16",height:"16"})})]}),Tc=()=>{},Bc=()=>[],Mc=d((({className:e,data:t=[],renderCard:l=Tc,filterItems:n=Bc,getBalloon:a=Tc,initFilterState:i={},descriptionData:s,title:d})=>{const[m,{field:h,reset:u}]=Rt(i),[g,x,f]=r((()=>{const e=n(t,m),l=e.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:a(e)}))).filter((e=>e.coords&&2===e.coords.length));return[e,l,e.length]}),[t,m]);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(C,{headingType:"h2",children:d}),f?o(De,{size:"text-h2",color:"text-secondary-text",children:`(${f})`}):null]}),s?Vc(s):null,Ic(Object.keys(i),{field:h,reset:u})]}),o("div",{className:"h-[600px]",children:o(b,{children:o(Nc,{points:x,className:"h-full"})})})]}),g.map(l)]})})),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(ze,{__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(ne,{image:e.image}):null,e?.text?o(De,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Pc={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Rc=d((({className:e,children:t,color:l="gray"})=>c("div",{className:p("pt-2xl sm:p-s sm:border sm:border-gray rounded-md flex items-center",Pc[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(De,{size:"text-m",color:Pc[l].text,children:t})]}))),zc=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:Ac({textItems:a,subText:t,children:l,...n})})),Ac=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>c("div",{className:p("flex gap-2xl sm:gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(De,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>o(De,{size:"text-l",children:e.trim()},String(t)))),a?o(De,{color:n,size:"text-m",children:a}):null]}),Dc=d((({className:e,children:t})=>o("div",{className:p("sm:flex sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),jc=["ArrowDownIcon","ArrowUpIcon"],Fc=["Подробнее","Скрыть"],Ec=({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:Fc[Number(e)]}),o(Y,{className:"text-primary-text",name:jc[Number(e)],width:"16",height:"16"})]}),Lc=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:_c(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(De,{size:"text-h4",children:_c(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(Y,{name:"GeolocationIcon",width:"24",height:"24"}),o(De,{size:"text-l",children:t})]}):null]}),o(Rc,{color:"green",children:_c(s)})]}),o("div",{className:"hidden sm:block",children:o(Dc,{className:"flex-wrap",children:m?.map(Oc)})}),o(ei,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(ti,{isUnfolded:e,children:o(Dc,{className:"flex-wrap",children:m?.map(Oc)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ec({isUnfolded:e,onToggle:t})})]},String(d))},$c=({address:e="",terminalType:t,atmCode:l=""})=>({header:`${_c(t)} №${l}`,body:e.toUpperCase()}),Oc=(e,t)=>o(zc,{...e},String(t)),_c=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Uc=[];const Hc=async e=>await xt(e,{method:"GET"})||Uc,Wc={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Kc={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Gc=d((({data:e,className:t})=>{const[l]=Ps(),n=function(e){const{data:t=Uc}=Tl(`/api/v1/atms?regionCode=${e}`,Hc);return t}(l?.code??"000");return o(Mc,{className:t,filterItems:Yc,data:n,initFilterState:Wc,renderCard:Lc,getBalloon:$c,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),Yc=(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=>Kc[t](e))),l=!n.length||n.some((t=>Kc[t](e)));return t&&l}))},qc=e=>{const t=Qc(e);return o(zc,{label:"Режим работы",value:t,className:"max-w-none"})},Xc=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",Qc=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[Xc({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Xc({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean)},Zc=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Jc=e=>Zc.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??"")}}))),ed=e=>{if(!e)return null;const t=td(e);return c(Dc,{className:"border-none",children:[o(zc,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(ld)})}),o(zc,{label:"Режим работы",className:"max-w-none",children:o(De,{children:e})})]})},td=e=>{const t=Zc.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},ld=({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(De,{size:"text-xs",children:e})},String(l)),nd=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(zc,{label:"Валюта",value:e.currency}):null,t?o(zc,{label:"Купить",value:String(t)}):null,l?o(zc,{label:"Продать",value:String(l)}):null]},String(n)),ad=(new Date).getDay(),id=e=>{const[t]=e?.slice(ad-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(Rc,{color:"green",children:a}):null,l&&i?o(Rc,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(Rc,{color:"red",children:"Выходной"})},rd=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",sd=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(zc,{label:e,value:t&&l?l:"",subText:rd({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),od=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,cd=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${e}</p>`,dd=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,md=({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=Jc(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(De,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(Y,{name:"GeolocationIcon",width:"24",height:"24"}),o(De,{size:"text-l",children:t})]}):null]}),id(u)]}),o("div",{className:"hidden sm:block",children:hd({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(ei,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(ti,{isUnfolded:e,children:hd({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ec({isUnfolded:e,onToggle:t})})]},String(h))},hd=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Jc(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Dc,{className:"flex-wrap",children:[o(zc,{label:"Факс",value:t}),o(zc,{label:"Телефон филиала",value:e}),o(zc,{label:"Для обращений юридических лиц",value:l}),o(zc,{label:"Обслуживание физических лиц",value:n}),o(zc,{label:"Для консультаций по валютному контролю",value:i}),o(zc,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?o(Dc,{children:o(zc,{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(sd)})})}):c(Dc,{children:[o(zc,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(ld)})}),qc(d)]}),r?.businessScheduleVisibleTag?ed(r?.businessScheduleDescription):null,s?.currencies?.length?o(Dc,{className:"flex-wrap",children:s?.currencies?.map(nd)}):null]})},ud=({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=Jc(e),l=e?Qc(t):"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&!e.businessScheduleDescription?od(l):cd(l):dd(l):null})(l)}`;return{header:n,body:i}},pd=[];const gd=async e=>await xt(e,{method:"GET"})||pd,xd={workingSaturday:!1},fd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},bd=d((({className:e})=>{const[t]=Ps(),l=function(e){const{data:t=pd}=Tl(`/api/v1/branches?regionCode=${e}`,gd);return t}(t?.code??"000");return o(Mc,{className:e,filterItems:yd,data:l,initFilterState:xd,renderCard:md,getBalloon:ud,title:`Офисы филиала ${t?.name}`})})),yd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>fd[t](e)))))},vd=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(bd,{}):o(Gc,{data:e})})})),Nd=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,{})]}))),wd=d((({className:e,padding:t,slides:l=[],...n})=>o(x,{className:p("overflow-hidden relative",e),padding:t,...n,children:o(qa,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(rt,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),kd=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:[Ke(r)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:r})}):null,s?o(C,{headingType:"h3",as:"h3",title:s}):null]}),c("div",{className:"w-full space-y-m",children:[i?Sd(i):null,Cd({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Cd({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Cd({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Ge([n]):null]})]}))),Sd=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(ze,{__html:e})}),Cd=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(Y,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(De,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(De,{size:"text-xl",color:n,children:t})]})]}):null,Id=d((e=>{const{__html:t,richVersion:l,...n}=e;return o(x,{defaultPadding:"p-0",...n,children:o(ze,{__html:t,richVersion:l})})})),Td=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(la,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(la,{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(bl,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),Md=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 дней"],Pd=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(De,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(ln,{min:1,max:365,value:e,items:Vd,onChange:t})]}))),Rd=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:"Выберите параметр ячейки"})})]}))),zd=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(Md,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Ad(m)}),o(Pd,{days:a,setDays:e=>m({days:e})}),o(Rd,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Dd(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(De,{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(Td,{}),o(fe,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),Ad=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Dd=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},jd=d((({days:e,tariffs:t=[]})=>{const l=Ed(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:[Fd("Аренда за",e),Fd("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(I,{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(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(I,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),Fd=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(De,{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})]}),Ed=(e,t)=>{const l=Ld(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Ld=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},$d=(e,t)=>e.find((e=>e.branchCode===t)),Od=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=$d(n,l.selectedBranch),d=_d(s?.safeBoxCaseVolumes),m=Ud(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=Hd(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(zd,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(jd,{days:l.days,tariffs:h})]})})),_d=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Ud=(e,t)=>e?.find((e=>e.volume===t)),Hd=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Wd=[];const Kd=async e=>await xt(e,{method:"GET"})||Wd,Gd=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=Ml(),p=Yd(m.selectedRegion,u),g=function(e){const{data:t}=Tl(e?`/api/v1/safeboxes?regionCode=${e}`:null,Kd);return t||Wd}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=$d(g,m.selectedBranch)||g,Array.isArray(y)?y.map((e=>({coords:[e.gpsLatitude,e.gpsLongitude].filter(Boolean)}))).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(C,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Od,{regions:u,branches:g,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(I,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Nc,{points:b,className:"h-[640px]"}):null]})})),Yd=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function qd(e){throw new Error(e)}const Xd={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Qd={normal:"",small:"min-h-6xl"},Zd={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"},Jd=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(em(i,r))})}):null,Ge(a,{isVertical:!0})]}))),em=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return tm(e,t)(l,n);case"rte":return o(ze,{__html:l.__html});default:qd(l)}},tm=(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:lm(e,t)(l,n)}),c("div",{className:p("flex flex-col justify-center h-fit",Qd[e]),children:[l.label?o(I,{size:"text-l",align:"text-left",children:l.label}):null,l.description?o("div",{className:p("text-s font-light text-left",Zd.description),children:l.description}):null]})]})},String(n)),lm=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=Xd[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:Ke(l?.icon)?o(ne,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:nm(e),height:nm(e)}):o("span",{className:p("text-h4","transparent"===t?Zd.iconText:(c=t,"secondary"===c?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var c},nm=e=>"normal"===e?"38":"24",am=e=>({href:t})=>!!t&&$(im(t,e)).startsWith($(t)),im=(e,t)=>E(e)?t.href:t.pathname;function rm(e=[]){const t=u(),l=e.findIndex((e=>am(F.BASE_PATH?{pathname:F.BASE_PATH}:e))(t));return[l,e[l]]}const sm=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(Y,{className:"w-6 h-6",name:"BurgerIcon",iconVersion:e?"color":"black"}),"Меню"]}))),om=d((({isActive:e,item:t,onClick:l})=>{const n=he({isRemote:!0}),{href:a,onClick:i}=n({href:t?.href,onClick:l});return c("a",{className:p(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),href:a,target:"_self",title:t?.title||"",onClick:i,children:[o(Y,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]})}));const cm=({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:qd(e)}}))),[c,d]),l},dm=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(ne,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),mm=d((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=de(),r=i((()=>{a(),n&&n()}),[n]);return c("div",{className:p("relative min-h-full bg-white pt-0 p-5",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(dm,{className:"absolute top-0 right-0",onClose:r}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),hm=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 um=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(De,{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(pm,{...e},String(t))))})]}):null,pm=d((({icon:e,...t})=>{const l=he(),{text:n,target:a,href:i,onClick:r}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{pathPrefix:"/wcms-resources/",image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(De,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),gm=e=>t=>o("div",{className:"mb-xs sm:mb-2xs",children:o("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},type:"button",children:o(De,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),xm=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"})]}))),fm=d((({foreignOffices:e,defaultLocation:t})=>{const[l,a]=Ps(t),[r,s]=n(""),d=ym(Ml()).sort(((e,t)=>e.name.localeCompare(t.name))),m=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(d,bm),{close:h}=de(),u=i((e=>{a(e),h()}),[]);return c(mm,{className:"pb-20",head:c("div",{children:[o(De,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?c("div",{className:"mb-s",children:[o(De,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),o("button",{type:"button",onClick:()=>a(l),children:o(De,{color:"text-primary-main",children:l.name})})]}):null,o(xm,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?o("div",{children:d.filter((({name:e})=>e&&hm(e.toLowerCase())(r.toLowerCase())>=.8)).map(gm(u))}):o("div",{className:"columns-1 sm:columns-5",children:Array.from(m.entries()).map((p=u,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(De,{size:"text-h6",children:e})}),t.map(gm(p))]},e)))}),um(e)]});var p})),bm=e=>e.name?.charAt(0)||"",ym=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),vm=d((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return c("div",{className:p("font-sans relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:p("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})}));function Nm(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const wm=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},km=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Sm=e=>t=>e.map((([e,l])=>[hm(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>Im(t,e))).reduce(wm(Math.max,0),new Map),Cm=e=>t=>{return xs(t,t.map((({title:e})=>e)).map((e=>t=>{const l=km(t||"");return l.length?Ve(e.map((e=>Ua(l.map(hm(e)))))):0})(e))).sort((e=>(t,l)=>-e(t,l))((l=([,e])=>e,(e,t)=>l(e)-l(t)))).map((([e])=>e));var l},Im=(e,t)=>new Map(e.map((e=>[e,t]))),Tm=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=Tl(e?.length?e:null,Bm),[s,o]=n(null);return Nm((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=km(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(Sm(i)).reduce(wm(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return Cm(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},Bm=async(...e)=>(await Promise.allSettled(e.map((e=>xt(O(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Mm=d((({className:e,topItems:t})=>{const l=he({isRemote:!0});return o("div",{className:p("flex items-start justify-between",e),children:t?.map(l).map(Pm)})})),Vm=["all","footer"],Pm=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||Vm.includes(e.displayArea.toLowerCase())));return c("div",{className:"flex flex-col gap-s w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>o(Rm,{...e,basePath:D(a),index:t},String(t))))]},String(t))},Rm=d((({text:e,index:t,basePath:l,...n})=>{const a=he({isRemote:!(!F.BASE_PATH||!l)&&!F.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return o("a",{className:p("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),zm=d((({initialQuery:e,topItems:t})=>{const l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,a]=Tm({basePathList:l,initialQuery:e}),i=r((()=>Am(t)(n)),[t,n]);return o(mm,{head:o(vm,{autoFocus:!0,...a}),children:o(Mm,{topItems:i})})})),Am=e=>t=>e?.length&&t?.length?xs(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:O("/",t)})))}))):[],Dm=d((({className:e,...t})=>{const[l,a]=n(""),r=i((()=>a("")),[]),s=((e={})=>{const{open:t,close:l}=de();return{open:(l={},n={})=>t(o(zm,{...e,...l}),n),close:l}})(t),d=i((e=>{a(e),jm(e)&&s.open({initialQuery:e},{onClose:r})}),[r,s]);return c("div",{className:p("relative",e),role:"search",children:[o(vm,{value:l,onChange:d}),o(dm,{className:"absolute top-0 right-0 sm:hidden",onClose:r})]})})),jm=e=>e&&e.length>=3,Fm=d((({item:e,basePath:t})=>{const l=he({isRemote:!(!F.BASE_PATH||!t)&&!F.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=u(),s=am(r)({href:n});return c("a",{className:p(s?"text-primary-main":"text-primary-text","py-3 text-h5 font-light flex justify-between cursor-pointer"),href:n,target:a,onClick:i,children:[e.text,o(ne,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]})})),Em=({item:e,isActive:t,onClick:l})=>c("button",{type:"button",className:"relative",onClick:l,children:[o("span",{className:p("whitespace-nowrap",t?"text-primary-main":""),children:e.text}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]}),Lm=d((e=>{const{topItems:t,defaultLocation:l,officesLink:s}=e,[d]=Ps(l),m=(e=>{const{open:t,close:l}=de();return{open:(l={})=>t(o(fm,{...e}),l),close:l}})(e),[h,u]=Ya({itemCount:t?.length??0}),[p]=rm(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(mm,{head:o("div",{className:"flex items-center",children:o(C,{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(Da,{containerRef:h,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>o(Em,{item:e,isActive:g===t,onClick:()=>y(t)},String(t))))})}),c("div",{className:"relative grow overflow-auto",children:[$m(b,f?.href),o(Dm,{className:"grow mb-5",...e}),Om(s),_m(d,(()=>m.open()))]})]})})})),$m=(e,t)=>e?o("div",{children:e.map(((e,l)=>o(Fm,{item:e,basePath:t},String(l))))}):null,Om=e=>e?c("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[o(ne,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),o("span",{children:"Офисы и банкоматы"})]}):null,_m=(e,t)=>c("div",{className:"flex items-center text-s cursor-pointer",onClick:t,children:[o(ne,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),c("div",{className:"flex flex-col items-start",children:[o(De,{size:"text-h5",children:e.name}),o(De,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]}),Um="burgerMenuDialog",Hm=e=>{const{open:t,closeAll:l,close:n}=de(),a=cm(),i=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Um,a),r=()=>t(o(Lm,{...e}),{id:Um});return[i,{open:r,close:n,toggle:()=>{i?l():r()}}]},Wm=[],Km=kt((({sticky:e,...t})=>{const{menuItems:l=Wm}=e??{},[n,{toggle:a,close:i}]=Hm(t.options?.page?.sitemap??{}),[,r]=rm(l),s=Math.floor(l.length/2),d=l.slice(0,s),m=l.slice(s);return o(x,{className:"h-[74px]",defaultPadding:"p-0",...t,children:c("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[d.map(Gm(r,i)),o(sm,{isActive:n,onClick:a}),m.map(Gm(r,i))]})})})),Gm=(e,t)=>(l,n)=>o(om,{isActive:l===e,item:l,onClick:t},l.href||String(n)),Ym="hidden sm:flex absolute z-40 top-0",qm=d((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Ya({itemCount:t?.length||0});return c("div",{className:p("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[o(Da,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(oc(l,n,a))}),r.canScrollLeft?o(hr,{className:p("left-6",Ym),onClick:r.scrollLeft}):null,r.canScrollRight?o(ur,{className:p("right-6",Ym),onClick:r.scrollRight}):null]})})),Xm=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return o(cc,{...t});case"centered":return o("div",{className:"flex",children:o(cc,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return o("div",{className:"flex",children:o(qm,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Qm="tab",Zm=d((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...c})=>{const d=u(),{isReady:m}=d,g=r((()=>l.map(eh)),[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),Jm(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),Jm(n),"group"===n.type&&(e=>{const t=new URLSearchParams(d.query);e.name?t.set(Qm,e.name):t.delete(Qm),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:Xm({items:g,value:g[f],tabsMode:s,onChange:y})})})),Jm=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})},eh=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,th={start:"text-start",center:"text-center",end:"text-end"},lh=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(ne,{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]})]})})),nh=d((({tab:e})=>{const t=he(),{onClick:l}=t({...e,onClick:()=>{e.href&&!L(e.href)&&(globalThis.location.href=e.href)}});return Nm(l,[],800),o(y,{className:"col-span-12 p-xl",size:5})})),ah=kt((({className:e="",tabs:t=[],block:l,tabAlign:a,...i})=>{const[r,s]=n(rh(t)),d=ih(t[r],r),m=t.length,[h,{inc:u,dec:g}]=dr({itemCount:m},r),[f,b]=Ya({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(Da,{itemClassName:"flex",containerRef:f,snapAlign:"snap-end",gap:8,onVisibleIndicesChange:b.handleVisibleIndicesChange,children:t.map(sh(r,s,a))}),o(xr,{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(nh,{tab:t[r]}):z(l?.slots?.[d],{...i?.options,slotName:d,parent:l})})]})}),{slots:({tabs:e})=>e?.filter((e=>!e.href)).map(ih)||[],childrenTypes:{exclude:["TabsLayout"]}}),ih=(e,t)=>e?.title||`Слот №${t}`,rh=e=>e.reduce(((e,t,l)=>t.selected?l:e),0),sh=(e,t,l="start")=>(n,a)=>o(lh,{className:th[l],tab:n,isActive:e===a,onClick:()=>t(a)},String(a)),oh={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},ch=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:oh[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),dh=d((({className:e="",isOpen:t,onClick:l})=>o(fe,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),mh={Buttons:({buttons:e})=>Ge(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,List:({isDotted:e,...t})=>o(Je,{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(De,{size:"text-h6",children:e})}):null,t?o("div",{children:o(De,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?o(dh,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},hh=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 uh({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),uh=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in mh))return null;return o(mh[l],{...t,...n})},ph=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(hh,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),gh=(e,t)=>140*Ve(e.slice(0,t).map((e=>e?.cols?.length??1))),xh=(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(De,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,fh=d((({rows:e})=>{return o(Da,{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(De,{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(-${gh(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(De,{size:"text-xl",children:e.data}):null,e?.cols?xh(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),bh=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(De,{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(fh,{rows:t.rowsData})})})]},n)}))}))),yh=(e=!1)=>""+(e?"text-white":"text-secondary-text"),vh=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(De,{size:"text-xl",font:"font-light",color:yh(t===l),children:e||t+1})},e)))}):null,t?o(fe,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(Y,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function Nh(e){const t=await fetch(e);return await t.json()}const wh=d((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=Tl(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),Nh);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(vh,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(bh,{activeTabIndex:r,items:m}),o(dh,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(De,{size:"text-h6",children:"Данных нет"}),o(dh,{onClick:l,isOpen:!0})]})})),kh=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(wh,{...t,onClick:l})}):null]}))),Sh=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(kh,{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(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(De,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(ch,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(ph,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function Ch({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(mr,{className:p("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(mr,{className:p("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Ih=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return c("div",{role:"table",children:[c("div",{className:"relative space-y-xs",children:[e,Ch({...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]=dr({itemCount:m,visibleItemCount:2}),g=(d||[]).map(((e,t)=>o(Sh,{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(ei,{renderFoldableSection:({isUnfolded:e})=>c(Ih,{controls:u,children:[f,o(ti,{isUnfolded:e,children:b})]}),renderFoldButton:jr}):o(Ih,{controls:u,children:g})})]})})),Bh=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?Mh():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(De,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Vh(l):null,a?o(ze,{__html:a}):null]})]}))),Mh=()=>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"}),Vh=e=>o(I,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Ph=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(De,{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(De,{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(Ph,{prefix:t,unit:l,suffix:n})})})),zh={AdTile:Ct,ApplicationForm:ua,ApplicationFormCustom:ka,BenefitsBlock:Ma,BonusBenefitsBlock:Qa,ButtonsBlock:Ja,Calculator:er,CardTransfer:cr,Carousel:Ir,CarouselBankHistoryCard:Tr,CarouselCard:Vr,CarouselCatalogCard:Rr,CarouselLinks:Er,CarouselRecommendationCard:Wr,CarouselTariffsCard:Yr,ComparisonTable:is,DepositFiltration:Cs,ErrorBlock:Ms,ExchangeRateTile:eo,Footer:yo,Header:Ro,Headline:B,HorizontalLayout:Do,ImgBlock:jo,LinkDocs:Oo,MobileAppTile:Ho,MortgageFiltration:mc,OfficesAtmsMap:vd,Placeholder:Nd,ProductBlock:St,ProductGallery:wd,RepresentativeOfficeInfo:kd,RichTextBlock:Id,RollupItem:ao,SafeDepositRental:Gd,StepsBlock:Jd,StickyBottomMenu:Km,Tabs:Zm,TabsLayout:ah,TariffsTable:Th,TextBlock:Bh,UnitBlock:Rh,VerticalLayout:Ao},Ah="rshb-query-params";function Dh(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Ah)||"";return e&&globalThis.sessionStorage?.setItem(Ah,e),e}const jh=e=>{const t=e.target;if("A"===t?.tagName&&E(t.href)){e.preventDefault();const l=(e=>{const t=Dh();if(!E(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()})(t.href)||t.href;globalThis.location.href=l}},Fh="cookie",Eh=d((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=ml();Nm((()=>{globalThis.localStorage?.getItem(Fh)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Fh,"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(I,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",o(Or,{isRemote:!0,className:Lh(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",o(Or,{isRemote:!0,className:Lh(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),o("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:o(dm,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),Lh=e=>p("inline mx-2xs",e?"text-green-dark":""),$h=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=cm({onCloseAll:e,onClose:t}),{close:n}=de(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return ul(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>o("div",{className:p("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Oh=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:qd(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return ul(globalThis.document,"keydown",r),e?o("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),_h="header",Uh="footer",Hh="sticky-footer",Wh={},Kh=d((({className:e,data:t=Wh,blocksRegistry:l,blockDecorator:n})=>{const{slots:i,blocks:r,fallback:s,...d}=t,m=wt(d,s);a((()=>{Dh()}),[]),ul(globalThis,"click",jh);const h={key:"",page:{slots:i,blocks:r,fallback:s,...m},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:[i?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:z(i?.header,{...h,slotName:_h})}):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:h,extraProps:{className:"scroll-mt-12"}}),z(i?.footer,{...h,slotName:Uh})]})]}),i?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:z(i?.["sticky-footer"],{...h,slotName:Hh})}):null,o($h,{}),o(Oh,{}),o(Eh,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Object.assign(Kh,{childrenTypes:[],slots:()=>[_h,Uh,Hh]});e.Blocks=zh,e.ContentPage=Kh,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=me,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.14.204",e.projectSettings=F,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=_,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"},S={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},C=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",S[t],e),children:n||a})})),I=d((({children:e,...t})=>o("p",{className:p("font-sans",Object.values(t)),children:e}))),T={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=T[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(C,{className:p("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:n}):null,a?o(I,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...u,children:a}):null]})})),M=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),V=[];function P(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=M,blocksRegistry:r={},ancestors:s=V}=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 R=[],z=(e,{key:t,ancestors:l=R,slotName:n=null,extraProps:a,renderProps:i=P,...r})=>{const s=a?(e,t)=>P(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||R,[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"],F=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return j.includes(t)?D(l):l}}),E=e=>Boolean(e?.includes(":")),L=(e,t)=>Boolean(e&&!E(e)&&(!t||"_self"===t)),$=e=>Boolean(e?.startsWith("#")),O=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),_=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var U=Object.freeze({__proto__:null,isURL:E,isLocalURL:L,isHash:$,withoutQuery:O,joinPath:_});const H="/api/",W=`${H}v1/storage`,K=e=>(t,l=F.BASE_PATH)=>{if([!t,E(t),$(t),[F.CDN,H].some((e=>G(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}/file`;const n=t?.startsWith("/");return _(G(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},G=(e,t)=>t&&e&&e.startsWith(t),Y={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},q=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.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(Z,{className:e,children:c("svg",{className:p(Q(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},Q=e=>e?"":"w-full h-full",Z=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),J=(e,t)=>l=>l&&!E(l)?K(e)(_(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:J(a,n)(e),type:ne(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?le({...t,src:J(a,n)(t.src)},l):null]})})),le=(e,t="")=>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(q,{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,t)=>he._impl(e,t);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),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=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=xe(e)?"hidden lg:block":"";return c("div",{className:p(ge(e),"flex gap-xs"),children:[n?o("div",{className:p(r,ce[i]),children:n}):null,xe(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]})})),ge=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return p("group/btn items-center justify-center",xe(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},xe=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),fe=({className:e,rounded:t,version:l})=>["inline-block",oe,l?se[l]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=ue()({onClick:r,href:n,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,children:d})=>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,children:d}))),ve=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:fe({className:e,rounded:n,version:l}),children:a})));function Ne(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return c("div",{className:"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:l}})}),o(be,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const we={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},ke=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?Ne(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:[Me(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]}),Be(A({...y,extraProps:{className:"@container-normal"}})),Me(m,{className:p("@xl:justify-self-end @xl:col-start-2",s?Ce(g):"",Ie(g),Ve(x)),imageAlign:h}),Te(s)]})]})]})})),Se=(e="",t="",l="")=>p("relative flex flex-col gap-3xl overflow-hidden",e||t,l),Ce=e=>e?"row-span-2":"@xl:row-span-2",Ie=e=>e?"col-start-2 self-center":"",Te=e=>e?o("div",{className:"self-end",children:e}):null,Be=e=>e&&e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Me=(e,{className:t,imageAlign:l})=>e?o("div",{className:p("shrink-1/2 justify-self-center",l&&we[l],t),children:e}):null,Ve=e=>e?"hidden @xl:block":"",Pe=(e=[])=>e.reduce(((e,t)=>e+t),0),Re=(e=[])=>e?.length?Pe(e)/e.length:0,ze=(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,Ae=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})),De=(e,t)=>e?o(I,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,je=d((({children:e,...t})=>o("span",{className:p("font-sans",Object.values(t)),children:e}))),Fe=(e,t)=>e?o(je,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ee=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?o(Ae,{...e},`rte-${t}`):["label"in e?Fe(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:De(e.description,t)},String(t)):null],Le=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?ze(l.icon,t):null,o("div",{children:Ee(l)})]}))),$e=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Oe=e=>{return((t=e.map($e))?.length?Math.sqrt(Math.abs(Re(t.map((e=>e**2)))-Re(t)**2)):0)>16;var t},_e=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Ue=e=>!e.some(_e),He=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:p("flex gap-x-m gap-y-s",Oe(l)||Ue(l)?"flex-col":"flex-wrap",e),role:"list",children:l.map(((e,l)=>o(Le,{benefitsVersion:t,...e},String(l))))}):null)),We=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(Ee)}):null)),Ke=d((({isTabularBenefits:e,...t})=>o(e?We:He,{...t}))),Ge=e=>Boolean(e?.src||e?.icon),Ye=(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(qe(l))}):null,qe=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=Xe(a,r),d=Xe(i,r);return n||a?.icon?o(be,{className:p("basis-full @lg:basis-auto",e),appendLeft:Qe({...a,iconVersion:c}),appendRight:Qe({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},Xe=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Qe=e=>Ge(e)?o(ae,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Ze=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})]}))),Je={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},et=d((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=Je[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(Ze,{isDotted:t,dotClassName:p(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),tt=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),lt=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(nt)}):null)),nt=({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(je,{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:[tt(2)(t)," ₽"]}):null]},String(l)),at=d((({className:e,tags:t})=>t?.length?o("div",{className:p("flex flex-wrap gap-xs",e),role:"list",children:t.map(it)}):null)),it=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(je,{size:"text-m",font:"font-light",children:e})},String(t)),rt={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},st=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:S,children:C,...I})=>{const T=y?.src?o(ae,{image:y}):null,M=o(B,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),V=m?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return o(ke,{className:e,padding:t,defaultPadding:l,...u?{title:M}:{insetTitle:M},...ot(T,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ye(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[V?.length?o(Ke,{benefitsVersion:s,isTabularBenefits:d,benefits:V}):null,h?o(Ae,{__html:h}):null,p?.length?o(et,{items:p,isDotted:g,listItemSize:rt[i]}):null,C,x?.length?o(lt,{priceList:x}):null,ct(f)]})})})),ot=(e,t)=>t?{rightImage:e}:{leftImage:e},ct=e=>e?.length?o(at,{tags:e}):null,dt=e=>Boolean(e&&Array.isArray(e)),mt=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),ht=(e,t)=>{return l=e,Boolean(mt(l)&&"string"==typeof l.$ref)?t.ref(e):mt(e)?t.record(e):dt(e)?t.array(e):t.scalar?t.scalar(e):e;var l},ut=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(pt,e),pt=(e,t)=>e&&t?mt(e)?e[t]:dt(e)?e[parseInt(t,10)]:e:e,gt=(e,t)=>ht(e,{ref:({$ref:e,...l})=>gt(e?ut(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:gt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>gt(e,t)))}),xt=(e,t,l=[])=>{ht(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)xt(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)xt(e[n],t,[...l,n])}})};async function ft(e,t){try{return e?await bt(e,t):null}catch(e){console.error(e)}return null}const bt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),yt=e=>[...new Set(e)],vt={},Nt=["/portal-resources"],wt=(e,t)=>gt(e,(e=>t?.[e])),kt=(e,t)=>{const l=(e=>{const t=[];return xt(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(yt(e).filter((e=>!Nt.some((t=>e.startsWith(t))))).map((async e=>[e,vt[e]||=await bt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?wt(e,{...t,...i}):e};function St(e,t={}){const l=d((t=>{const l=kt((({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 Ct=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(st,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),It=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>Tt(0,t?.length)),[t]),n=t?.[l];return n?o(b,{children:o(Ct,{...n,...e})}):o(x,{...e,children:o(y,{})})})),Tt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Bt=e=>e?.replace(/[^+\d]/g,"");function Mt(){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?"phoneNumber":"phone"]:Bt(i),[t?"email":"mail"]:r,...t?{birthday:s}:{inn:o,fullName:c},..."FEEDBACK"===n?{}:{addressBranch:d,bankEmpolee:h,applicationDate:u,...Vt(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=>e&&"+7 ("!==e?{secondaryPhoneNumber:Bt(e)}:{},Pt=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(C,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),o(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Rt=e=>e,zt=(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=Rt,format:n=Rt}=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}]},At=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(je,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Dt=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],jt=e=>!e?.length,Ft=e=>t=>l=>e(l)?[]:[t],Et=d((({text:e,link:t})=>c(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[o(je,{children:e}),t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:o(je,{children:t.text})}):null]}))),Lt="container space-y-m",$t="w-full max-w-xl space-y-s m-auto",Ot=e=>e?o(je,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,_t=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 S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",I=Ut(u);return c("div",{className:p("relative",t),children:[c("label",{className:"space-y-xs",children:[Ot(d),N?o("textarea",{className:p("block resize-y min-h-24",S,I),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",S,C,I),ref:w,id:l,name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),Ut=e=>e?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error",Ht=e=>o("div",{className:"h-6",children:e?o(je,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Wt=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,...d})=>c("div",{className:p("shrink-0 w-full",e),children:[o(_t,{type:"text","aria-label":t,label:t&&d?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:d?.errors&&!t?`${n}*`:n}),Ht(a)]}))),Kt=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Gt=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(C,{title:e,headingType:"h6",className:"@xl:text-center"})}):null,t]}))),Yt="@xl:w-1/2 space-y-s",qt=e=>"_"===e,Xt=e=>/\d/.test(e),Qt=e=>qt(e)||Xt(e),Zt=[..."+7 (___) ___-__-__"],Jt=Zt.findIndex(qt),el=Zt.map(((e,t)=>Qt(e)?Zt.slice(0,t).filter(Qt).length:-1));const tl=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Zt.map(((e,l)=>Xt(e)?e:t.charAt(el[l])||e)),n=el.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Jt,n)):l).join("")}(e))),[t]);return o(_t,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),ll=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(tl,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Ht(n)]}))),nl="Некорректно заполненное поле",al=Ft((e=>null!=e&&""!==e))(nl),il=Ft((e=>e?.key&&""!==e?.key))(nl),rl=Ft((e=>"string"==typeof e&&e.length>1))(nl),sl=Ft((e=>"string"==typeof e&&(10===e.length||12===e.length)))(nl),ol=(cl=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Ft((e=>"string"==typeof e&&cl.test(e))))(nl);var cl;const dl=Ft((e=>"boolean"==typeof e&&e))(nl),ml=(e,t)=>c(Gt,{title:t,children:[c("div",{className:Yt,children:[o(Wt,{label:"Наименование организации",...Kt(e("fullName"),al)}),o(Wt,{label:"Контактное лицо",...Kt(e("name"),rl)})]}),c("div",{className:Yt,children:[o(Wt,{label:"ИНН",...Kt(e("inn"),sl)}),o(ll,{label:"Телефон",...Kt(e("phone"),ol)})]})]});function hl(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 ul=e=>e?.text||e?.key||"";function pl(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function gl(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return pl(globalThis.document,"click",l),t}const xl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,fl=d((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"list",ref:e,children:xl(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:ul(e)}),o(q,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:p("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function bl({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=gl(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(fl,{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 yl=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:h,onChange:u,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=hl(),[y,v]=n(""),N=g||0===l.length,w=x&&!N,k=i((()=>{v(""),f()}),[]),S=bl({isOpen:x,options:l,value:a,query:y,onChange:u,onClose:k,iconVersion:h});return c("div",{className:p("space-y-xs",e),children:[Ot(t),c("div",{className:p("relative",w?"z-20":"z-10"),ref:S,children:[c("div",{className:p("h-14 text-l flex justify-between items-center text-primary-text relative z-10",Nl(s,r,N)),onClick:w?k:b,children:[o("p",{className:"p-m pr-8 flex items-center overflow-hidden text-ellipsis",children:ul(a)||d}),vl(w,h)]}),m&&w?o("div",{className:p("absolute top-0 w-full z-20"),children:o(_t,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),vl=(e,t)=>o(q,{className:p("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Nl=(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"),wl=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(yl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),Ht(l)]}))),kl=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Sl=e=>null!=e,Cl=new Map,Il=e=>Boolean(e?.every((e=>Array.isArray(e)?Il(e):!e||"string"==typeof e))),Tl=e=>Il(e)?e.toString():"";function Bl(e,t,{fallback:l,cache:i}={}){const s=r((()=>Ml(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(Sl))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=Cl)=>l=>{const n=Tl(l),a=t.get(n);if(n&&Sl(a))return a;const i=e(...l);return n&&Sl(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 Ml(e){return Array.isArray(e)?e:e instanceof Function?Ml(e()):[e]}function Vl(){const{data:e}=Bl("/api/v1/regions",bt);return e||[]}const Pl=e=>Object.values(e).map((e=>e.name)),Rl={typeForm:al,surname:rl,name:rl,region:il,phone:ol,birthday:al,email:al,fullName:al,inn:sl,partnerComments:al,comment:al,consentDataProcessing:dl},zl=d((({field:e})=>{const t=Vl();return o(wl,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...Kt(e("region"),Rl.region)})})),Al=({field:e,title:t})=>c(Gt,{title:t,children:[o("div",{className:Yt,children:o(wl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:kl,...Kt(e("acquiringType"),al)})}),o("div",{className:Yt,children:o(zl,{field:e})})]});function Dl({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const jl={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"},Fl={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")},El=d((({children:e,...t})=>{const l=e=>({...e,onClick:he(Dl(e),e)}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=l(t);return o("button",{className: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(jl[a],Fl[a]),c?"rounded-md":"",n),type:s,role:d,onClick:m,children:e})})),Ll=(e,t)=>o(El,{className:p("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),$l={typeForm:{key:"acqr",text:"Предупреждение о мошенничестве"},acquiringType:{key:"trade",text:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},Ol=Dt({acquiringType:al,region:al,fullName:al,inn:sl,name:rl,phone:ol}),_l=d((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:a,...i}=e,r=Ul(t?.key),s={partnerComments:`Вид эквайринга=${t?.text||""}${r?`/Онлайн касса=${l}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`,...i};jt(Ol(e))&&n(s,!1)}),[n]),[,{field:r,...s}]=zt($l,{onSubmit:a}),d=Ul(r("acquiringType").value?.key);return c("form",{className:Lt,onSubmit:s.onSubmit,children:[Al({field:r,title:"Вид эквайринга и регион"}),ml(r,"Данные организации"),d?c("div",{role:"radiogroup",children:[o(At,{type:"radio",text:"Хочу онлайн-кассу",...r("onlineCheckout")}),o(At,{type:"radio",text:"Хочу купить POS-терминал",...r("posTerminal")})]}):null,Ll(t),o(Et,{link:l})]})})),Ul=e=>"all"===e||"trade"===e,Hl=[];const Wl=async e=>await ft(e,{method:"GET"})||Hl;function Kl(){const{data:e}=Bl("/api/v1/premiumBranchesByRegions",bt);return e||[]}const Gl=d((({field:e,isPremium:t=!1})=>{const l=e("region")?.value?.key,n=t?Kl().find((e=>e?.region===l))?.branches:function(e){const{data:t}=Bl(e?`/api/v1/branches?regionCode=${e}`:null,Wl);return t||Hl}(l).filter((e=>e?.address));return o(wl,{label:"Адрес",placeholder:"Выберите адрес",options:(n||[]).map((({address:e=""})=>({key:e,text:e}))),...Kt(e("addressBranch"),il)})})),Yl=["От 1 000 ₽","До 1 000 000 000 ₽"],ql=["От 1 мес","До 15 лет"],Xl=(e,t)=>c(Gt,{title:t,children:[c("div",{className:Yt,children:[o(Wt,{label:"Наименование организации",...Kt(e("fullName"),al)}),o(Wt,{label:"ИНН",...Kt(e("inn"),sl)}),o(ll,{label:"Телефон",...Kt(e("phone"),ol)})]}),c("div",{className:Yt,children:[o(Wt,{label:"Годовая выручка, ₽",...Kt(e("annualRevenue"),al)}),o(Wt,{label:"Контактное лицо",...Kt(e("name"),rl)}),o(Wt,{label:"Электронная почта",...Kt(e("email"),al)})]})]}),Ql=(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}},Zl=(e,t,l)=>Math.max(t,Math.min(e,l));function Jl(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function en({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=Jl(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const tn=1,ln=100,nn=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:tn),max:s=(a.length?a.length-1:ln),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:u}=e,g=Ql(e,{normalize:(e=0)=>a.length?an(a)(e):Zl(e,r,s),format:tt()}),x=i((e=>{u&&u(Jl(e.target?.value))}),[u]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(je,{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}),en({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:u})]}),rn(n)]})})),an=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),rn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(je,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),sn=(e,t)=>c(Gt,{title:t,children:[o("div",{className:Yt,children:o(nn,{title:"Сумма, ₽",items:Yl,min:1e3,max:1e9,...e("amount")})}),o("div",{className:Yt,children:o(nn,{title:"Срок, месяцев",items:ql,min:1,max:180,...e("term")})})]}),on={typeForm:{key:"cred",text:"Кредит"},amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",email:"",annualRevenue:""},cn=Dt({fullName:al,annualRevenue:al,inn:sl,name:rl,phone:ol,region:al}),dn=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,addressBranch:a,annualRevenue:i,...r}=e;jt(cn(e))&&l({...r,addressBranch:a?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${i}`})}),[l]),[a,{field:r,...s}]=zt(on,{onSubmit:n});return c("form",{className:Lt,onSubmit:s.onSubmit,children:[sn(r,"Параметры"),Xl(r,"Данные организации"),c(Gt,{title:"Офис банка",children:[o("div",{className:Yt,children:o(zl,{field:r})}),o("div",{className:Yt,children:o(Gl,{field:r,regionKey:a.region?.key})})]}),Ll(e),o(Et,{link:t})]})})),mn={typeForm:{key:"dpst",text:"Заявка на депозит"},name:"",phone:""},hn=Dt({name:rl,phone:ol}),un=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{jt(hn(e))&&l(e)}),[l]),[,{field:a,...r}]=zt(mn,{onSubmit:n,resetOnSubmit:!1});return o("form",{className:Lt,onSubmit:r.onSubmit,children:o(Gt,{title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",children:c("div",{className:$t,children:[o(Wt,{label:"Имя",...Kt(a("name"),rl)}),o(ll,{label:"Телефон",...Kt(a("phone"),ol)}),Ll(e),o(Et,{link:t})]})})})})),pn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],gn=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],xn=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],fn=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)}))}))),bn=[{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"}],yn=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(fn,{paths:bn,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":Nn(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:vn(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?d:null,l?o("div",{className:"ml-s",children:o(je,{size:"text-l",font:"font-light",children:l})}):null]})})})),vn=e=>e?"radio":"checkbox",Nn=e=>p("rounded border",e?"bg-primary-main":""),wn=(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(yn,{...e}),o(Et,{link:t})]}),Ht(Kt(e,dl).error)]}):o(Et,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),Ll(l)]}),kn=(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}`}},Sn=()=>{},Cn=({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=In(t,e),c=Tn(t,i,r);h.push(o("td",{children:o("div",{className:Bn(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},In=(e,t)=>t&&e.toDateString()===t.toDateString(),Tn=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Bn=(e,t)=>p("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Mn=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Vn=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=Sn})=>{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:Mn.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Cn({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),Pn=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Rn=Pn.map((e=>({key:e}))),zn=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),An={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Dn={className:"min-w-32",iconVersion:"black",isBorder:!1},jn=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=hl(!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:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=gl(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(Pn.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Rn,yearsOptions:zn,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:h,selectedYear:x,selectedMonth:u,showCalendar:m});return c("div",{className:p("space-y-xs",e),ref:C,children:[Ot(t),c("div",{className:"relative",children:[Fn(S,l,a),m?c("div",{className:"absolute bg-white z-20 select-none",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(q,{...An,className:"-rotate-90 cursor-pointer"})}),o(yl,{onChange:v,value:{key:Pn[u]},options:w,...Dn}),o(yl,{onChange:N,value:{key:String(x)},options:k,...Dn}),o("div",{className:"my-auto",onClick:y,children:o(q,{...An,className:"rotate-90 cursor-pointer"})})]}),o(Vn,{today:l,currentMonth:u,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),Fn=(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(I,{children:t&&kn(t)}),o(q,{...An,name:"CalendarIcon"})]}),En=d((({className:e,label:t,error:l,...n})=>c("div",{className:p("shrink-0 w-full",e),children:[o(jn,{label:t&&n?.errors?`${t}*`:t,valid:Boolean(!l),...n}),Ht(l)]}))),Ln={surname:"",name:"",middleName:""},$n=(e,t=!0)=>c("div",{className:"space-y-s",children:[o(Wt,{label:"Фамилия",...Kt(e("surname"),rl)}),o(Wt,{label:"Имя",...Kt(e("name"),rl)}),o(Wt,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),t?o(En,{label:"Дата рождения",...Kt(e("birthday"),al)}):null]}),On={...Ln,typeForm:{key:"FEEDBACK",text:"Задать вопрос по продуктам и услугам"},serviceDirection:{key:"Физическое лицо"},birthday:void 0,feedbackMethod:{key:"Телефонный звонок"},phone:"",email:"",comment:"",consentDataProcessing:!1},_n={typeForm:al,region:al,surname:al,name:rl,feedbackMethod:al,phone:ol,email:al,comment:al,consentDataProcessing:dl},Un=d((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{Hn(e,l)}),[l]),[a,{field:r,...s}]=zt(On,{onSubmit:n}),d="FEEDBACK_QS"===r("typeForm").value?.key,m=Kn(r("typeForm").value?.key,r("serviceDirection").value?.key);return o("form",{className:Lt,onSubmit:s.onSubmit,children:o(Gt,{children:c("div",{className:$t,children:[o(wl,{label:"Тема",placeholder:"Выберите тему",options:pn,...Kt(r("typeForm"),al)}),d?o(wl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:xn,...Kt(r("serviceDirection"),al)}):null,o(zl,{field:r}),d?o(Gl,{field:r,regionKey:a?.region?.key}):null,$n(r,!0),m?c("div",{children:[o(Wt,{label:"ИНН",...Kt(r("inn"),sl)}),o(Wt,{label:"Наименование организации",...r("fullName")})]}):null,o(wl,{label:"Способ получения ответа",options:gn,...Kt(r("feedbackMethod"),al)}),o(ll,{label:"Телефон",...Kt(r("phone"),ol)}),d?c("div",{children:[o(ll,{label:"Дополнительный телефон",...r("secondaryPhone").value&&"+7 ("!==r("secondaryPhone").value?Kt(r("secondaryPhone"),ol):r("secondaryPhone")}),o(Wt,{label:"Электронная почта",...Kt(r("email"),al)}),o(Wt,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...r("bankEmpolee")}),o(Wt,{label:"Дата и время обращения в Банк",...r("applicationDate")})]}):o(Wt,{label:"Электронная почта",...Kt(r("email"),al)}),o(Wt,{...Kt(r("comment"),al),placeholder:"Ваше сообщение",isTextarea:!0}),wn(r("consentDataProcessing"),t,e)]})})})})),Hn=(e,t)=>{const l=Kn(e?.typeForm.key,e?.serviceDirection?.key),n=Dt({..._n,...Wn(e,l)});jt(n(e))&&t(e,!l)},Wn=(e,t)=>t?{addressBranch:al,inn:sl}:"FEEDBACK"===e.typeForm.key?{birthday:al}:{addressBranch:al},Kn=(e="",t="")=>"FEEDBACK_QS"===e&&"Юридическое лицо / ИП"===t,Gn=d((e=>{const{button:t,regionSource:l}=e,[a,i]=n({key:""}),r=l?.regions??[],s=de({className:"text-white",version:t?.version}),d=r?.find((e=>e.name===a.key))?.href;return c("div",{className:"container space-y-s",children:[r?o(wl,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:r.map((({name:e=""})=>({key:e,text:e}))),value:a,onChange:i}):null,d?o("div",{className:"text-center",children:o(be,{href:d,target:"_blank",className:p("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Yn={...Ln,phone:"",email:"",birthday:void 0,consentDataProcessing:!1},qn=Dt({surname:rl,name:rl,phone:ol,email:al,birthday:al,consentDataProcessing:dl}),Xn=d((e=>{const{button:t,link:l,product:n="",onSubmit:a}=e,r=i((e=>{jt(qn(e))&&a({...e,product:n},!0)}),[a]),[,{field:s,...d}]=zt(Yn,{onSubmit:r});return c("form",{className:Lt,onSubmit:d.onSubmit,children:[c(Gt,{children:[c("div",{className:Yt,children:[o(Wt,{label:"Фамилия",...Kt(s("surname"),rl)}),o(Wt,{label:"Отчество (Обязательно, при наличии)",...s("middleName")}),o(ll,{label:"Телефон",...Kt(s("phone"),ol)})]}),c("div",{className:Yt,children:[o(Wt,{label:"Имя",...Kt(s("name"),rl)}),o(En,{label:"Дата рождения",...Kt(s("birthday"),al)}),o(Wt,{label:"Электронная почта",...Kt(s("email"),al)})]})]}),wn(s("consentDataProcessing"),l,t)]})})),Qn=d((({field:e})=>{const t=Kl().map((({region:e})=>({key:e,text:e})));return o(wl,{label:"Регион",placeholder:"Выберите регион",options:t,...Kt(e("region"),al)})})),Zn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Jn={typeForm:Zn[0],...Ln,email:"",phone:"",comment:"",consentDataProcessing:!1},ea=Dt({typeForm:al,surname:al,name:rl,phone:ol,email:al,addressBranch:al,consentDataProcessing:dl}),ta=d((({button:e,link:t,onSubmit:l,defaultType:n="PREMIUMSERVICE"})=>{const a=i((e=>{jt(ea(e))&&l(e,!0)}),[l]),[r,{field:s,...d}]=zt({...Jn,typeForm:la(n)},{onSubmit:a}),m=r?.region?.key;return c("form",{className:Lt,onSubmit:d.onSubmit,children:[c(Gt,{title:"Ваши данные",children:[c("div",{className:Yt,children:[o(Wt,{label:"Фамилия",...Kt(s("surname"),rl)}),o(Wt,{label:"Отчество (Обязательно, при наличии)",...s("middleName")}),o(Wt,{label:"Электронная почта",...Kt(s("email"),al)})]}),c("div",{className:Yt,children:[o(Wt,{label:"Имя",...Kt(s("name"),rl)}),o(ll,{label:"Телефон",...Kt(s("phone"),ol)}),o(wl,{label:"Тип обслуживания",options:Zn,...Kt(s("typeForm"),al)})]})]}),c(Gt,{title:"Офис банка",children:[o("div",{className:Yt,children:o(Qn,{field:s})}),o("div",{className:Yt,children:o(Gl,{field:s,regionKey:m,isPremium:!0})})]}),o(Wt,{...s("comment"),placeholder:"Комментарий, удобное время и прочее",isTextarea:!0}),wn(s("consentDataProcessing"),t,e)]})})),la=e=>Zn.find((t=>t.key===e)),na=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(je,{color:"text-primary-text",children:t}):null]})}))),aa=e=>{const{value:t,onChange:l}=e("vedTypes");return o(Gt,{children:c("div",{className:"gap-m grid @xl:flex @xl:items-center",children:[o(na,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),o(na,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),o(na,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),o(na,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},ia=({field:e})=>{const t="currencyControl"===e("vedTypes").value;return c("div",{className:"space-y-s",children:[t?o(zl,{field:e}):null,c("div",{className:"grid @xl:grid-cols-2 @xl:gap-x-m gap-s",children:[t?o(Wt,{label:"ИНН",...Kt(e("inn"),sl)}):null,o(Wt,{label:"Наименование организации",...Kt(e("fullName"),al)}),o(Wt,{label:"ФИО",...Kt(e("name"),rl)}),o(ll,{label:"Телефон",...Kt(e("phone"),ol)}),t?null:o(Wt,{label:"Электронная почта",...e("email")})]})]})},ra={typeForm:{key:"KVED",text:"Заявка на консультацию ВЭД"},vedTypes:"currencyControl",fullName:"",name:"",phone:"",inn:"",email:"",partnerComments:""},sa={fullName:al,name:rl,phone:ol},oa=Dt({...sa}),ca=Dt({...sa,inn:sl,region:al}),da=e=>"currencyControl"===e,ma=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),ha={ApplicationFormWed:d((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{typeForm:t,fullName:l,name:a,phone:i,email:r,inn:s,region:o,vedTypes:c,partnerComments:d}=e,m={typeForm:t,fullName:l,name:a,phone:i,vedTypes:ma(c),partnerComments:d,...da(c)?{inn:s,region:o}:{email:r}};jt((e=>da(e)?ca:oa)(c)(e))&&n(m)}),[n]),[,{field:r,...s}]=zt(ra,{onSubmit:a});return c("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[aa(r),o(C,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),ia({field:r}),o(Wt,{label:"Обращение",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",...r("partnerComments"),isTextarea:!0}),Ll(t),o(Et,{link:l}),o(C,{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"})]})]})]})})),ApplicationFormDeposit:un,ApplicationFormCredit:dn,ApplicationFormAcquiring:_l,ApplicationFormGrantSupport:Gn,ApplicationFormIndividuals:Xn,ApplicationFormFeedback:Un,ApplicationFormUltraPremium:ta},ua=Mt(),pa=St((({className:e,formBlock:t,...l})=>{const[a,r]=n(""),s=i((async(e,t=!1)=>{const l=xa(e),n=await ua.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(C,{headingType:"h3",title:t.title,className:"@xl:text-center"}):null,t?ga(t,s):null,a?o(Pt,{responseType:a}):null]})})})),ga=(e,t)=>{const l=e?.formType;if(!l||!(l in ha))return null;return o(ha[l],{...e,onSubmit:t})},xa=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(t?.region?t?.text:t?.key)||t]))),fa=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(C,{headingType:"h3",title:l,className:"@xl:text-center"}):null,a,n?o(Pt,{responseType:n}):null]})})})),ba=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(yn,{text:t,value:l,disabled:a,onChange:r},n),Ht(i)]}))),ya=e=>(t,l)=>{const{required:n,...a}=t,i={surname:o(Wt,{label:"Фамилия",...va(e("surname"),Rl.surname,n)}),name:o(Wt,{label:"Имя",...va(e("name"),Rl.name,n),...a}),middleName:o(Wt,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),phone:o(ll,{label:"Телефон",...va(e("phone"),Rl.phone,n)}),email:o(Wt,{label:"Электронная почта",...va(e("email"),Rl.email,n)}),fullName:o(Wt,{label:"ФИО",...va(e("fullName"),Rl.fullName,n),...a}),inn:o(Wt,{label:"ИНН",...va(e("inn"),Rl.inn,n)}),comment:o(Wt,{className:"col-span-2",...va(e("comment"),Rl.comment,n),placeholder:"Ваше сообщение",isTextarea:!0}),region:o(zl,{field:e,input:t}),birthday:o(En,{label:"Дата рождения",...va(e("birthday"),Rl.birthday,n)}),isClient:o(ba,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}),partnerComments:o(Wt,{label:"Количество объектов инкассации",...va(e("partnerComments"),Rl.partnerComments,n)})};return o("div",{children:i[t.name]},String(l))},va=(e,t,l=!1)=>l?Kt(e,t):e,Na={typeForm:{key:"",text:""},region:{key:"",text:""},surname:"",name:"",middleName:"",phone:"",email:"",birthday:void 0,comment:"",consentDataProcessing:!1,product:""},wa=(e,t="")=>({...Object.fromEntries(Pl(e).map((e=>[e,Na[e]]))),typeForm:{key:t,text:""}}),ka=Mt(),Sa=d((({className:e,title:t,typeForm:l="",sections:a=[],button:r,link:s,endpoint:d})=>{const m=a?.flatMap((e=>e?.inputs))||[],h=wa(m,l),[u,g]=n(""),x=Dt((e=>{const t=Pl(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Rl?.[e]])))})(m)),f=i((async e=>{if(!jt(x(e)))return"Fail";const t=(e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,("region"===e?t?.text:t?.key)||t]))))(e),l=await ka.send(t,"lead"===d)?"OK":"Fail";return g(l),l}),[]),[,{field:b,onSubmit:y}]=zt(h,{onSubmit:f}),v=Ia(m)?.name;return o(fa,{className:p(Lt,e),title:t,responseType:u,children:c("form",{className:"",onSubmit:y,children:[a.map(((e,t)=>c("div",{className:p(Ca(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(ya(b))]},`section-${t}`))),wn(v?b("consentDataProcessing"):void 0,s,r)]})})})),Ca=e=>2===e?"@xl:grid-cols-2":"",Ia=e=>e.find((e=>"consentDataProcessing"===e?.name)),Ta="text-left",Ba={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Ma=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",Ba[l],e),children:o(q,{...i,width:"54%",height:"54%",name:a})}):null})),Va=d((({className:e="",title:t,benefitList:l,...n})=>c(x,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(C,{headingType:"h3",as:"h2",className:Ta,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(Pa)}):null]}))),Pa=({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(Ma,{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(C,{headingType:"h6",children:e}),o(je,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),o(et,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Ra=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function za(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 Aa=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:za(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})})),Da=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],ja=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(Ea(l))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Fa(c,v):{},...N?Ra(h):{},gap:`${r}px`};return o("div",{className:p("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,role:"list",children:(S=(e,l)=>o(Aa,{className:p(m,a?Da[a-1]:"",N?"h-full":"",t),style:w?Fa(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(u)});var S})),Fa=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Ea=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),La={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},$a={"horizontal-list":"w-6","vertical-list":"h-6"},Oa=d((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?o("div",{className:p("flex gap-xs",La[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?$a[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)),_a=e=>e,Ua=(e=_a)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Ha=Ua(),Wa=(e=_a)=>Ua((t=>-e(t))),Ka=Wa(),Ga=e=>t=>e.scrollWidth/t,Ya=e=>(t,l)=>{e.scrollBy({left:l*Ga(e)(t),behavior:"smooth"})},qa=({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?[Wa()(a),Ua()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Ya(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Ya(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}]},Xa=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]=qa({itemCount:m,onVisibleIndicesChange:s}),[g]=u.visibleIndicesRange;return c("div",{className:p(e,"vertical-list"===d?"relative h-full":""),children:[o(ja,{containerRef:h,activeIndex:g,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:u.handleVisibleIndicesChange,listType:d,minHeight:i,children:r}),a?o(Oa,{containerRef:h,activeIndex:g,dotCount:m,listType:d,version:t}):null]})})),Qa=(e,t,l)=>{return o(Xa,{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(je,{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(je,{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?Qa(e,0,t):null]}))),Ja={start:"justify-start",center:"justify-center",end:"justify-end"},ei=d((({buttons:e,className:t="",align:l,...n})=>{const a=l?p("flex",Ja[l]):"";return o(x,{className:p("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Ye(e)})})),ti=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 li=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})})})),ni=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(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,o("div",l?{children:o(je,{size:"text-h3",children:[i,tt(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:o(je,{size:"text-h3",children:"-"})})]}))),ai=Math.round(29.5),ii={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},ri={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},si={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},oi={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},ci={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},di=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,[a,i]=((e,t,l)=>{const{maxBonus:n=5e3,prefMonthsNum:a=si.prefMonthsNum,prefTravelBonusRate:i=si.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||si,l,n);return{...t,...e,monthBonus:a,yearBonus:i}},mi=e=>e?o(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,hi=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>c("div",{children:[o(je,{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:tt(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]})]}))),ui=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s",children:[o(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(q,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),pi=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?o(ui,{title:e,...i}):c("div",{children:[o("div",{className:"hidden @xl:block",children:o(hi,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),o("div",{className:"@xl:hidden",children:o(ni,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function gi({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${tt(2)(l.min||0)} ₽`,`До ${tt(2)(l.max||0)} ₽`];return o(nn,{items:e?n:[],step:t,...l})}const xi=d((({className:e="",calcSource:t,buttons:l,footnote:n})=>{const[a,{field:i}]=zt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:d,maxSumOther:m,monthBonus:h,yearBonus:u}=di(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:[gi({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),gi({title:"Сумма покупок в остальных категориях, ₽",min:d,max:m,step:500,isShowItems:!1,...i("restExpenseValue")})]}),h>=0?pi({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(ni,{title:"Баллов за год",value:u}):null,Ye(l,{isVertical:!0}),mi(n)]})]})})),fi=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})]}))),bi=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:yi([e,t],n),yi=([e,t],l=[])=>({[e]:l.length?Ka(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Ha(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),vi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Ni=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,wi=(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)},ki=(e,t=0)=>e?.sum?e.sum:t,Si=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Ci=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Ii={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Ti=d((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>o("div",{className:p(`flex ${Ii[a]}`,l),role:"radiogroup",children:e?.map((({id:e,text:l})=>o(yn,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Bi=({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(je,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",children:o(je,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(Ti,{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)})]}),Mi=e=>Bi({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Vi=d((({className:e="",buttons:t,footnote:l,bottomFootnote:n,isShowDepositeName:a,defaultParams:i,calcSource:r})=>{const[s,{field:d}]=zt({moneyValue:ki(i,1e5),daysValue:Si(i,60),isReplenished:Boolean(i?.isReplenished),isPartialWithdrawal:Boolean(i?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(i?.isMonthlyInterestPayment)}),m=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=l<90||l>730;if(l<=30)return{...ci,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const c=t?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&Ni(s,e)&&vi(n,["minSum","maxSum"],e)&&vi(l,["minDays","maxDays"],e)))||ci,{rate:d}=c,m=wi(d,e),h=n+m,u=t?.rateRows||[ci];return{...c,...yi(["minSum","maxSum"],u),...yi(["minDays","maxDays"],u),...e,isDisabledOperatingDeposit:o,income:m,finalSum:h}})(s,r),{income:h,finalSum:u,rate:p,isUnavailableByTerm:g,depositeName:x}=m;return o(fi,{className:e,inputChildren:c("div",{children:[gi({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(nn,{items:[`От ${Ci(f.min||0)}`,`До ${Ci(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),Mi({title:"Выплата процентов",orientation:"vertical",...d("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),rateChildren:pi({rate:p,depositeName:x,isShowDepositeName:a,isUnavailableByTerm:g}),resultChildren:c("div",{children:[Ri(u,h),Ye(t,{isVertical:!0}),mi(l),mi(n)]})});var f})),Pi=(e,t)=>c("div",{className:"space-y-s",children:[o(je,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[o(yn,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(yn,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Ri=(e,t)=>c("div",{className:"flex flex-col gap-2xl sm:gap-0 mb-lg",children:[o(ni,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),o(ni,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),zi=e=>Ai({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Ai({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Ai({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Ai({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Ai=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Di=(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)},ji=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows||[ii],r=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>zi({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:s,maxSum:o}=bi(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=bi(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>zi({row:e,userInputParams:t,paramsViewSettings:l})&&vi(n,["minSum","maxSum"],e)&&vi(a,["minMonths","maxMonths"],e)))||ii)({rateRows:i,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:h}=m,u=Di(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:n,monthsValue:a,monthlyPayment:u}},Fi=({min:e=0,max:t=0,availableMonths:l,...n})=>o(nn,{items:[`От ${Ei(e)}`,`До ${Ei(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Ei=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Li=e=>Bi({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),$i=d((({className:e,calcSource:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=zt({moneyValue:ki(i,2e5),monthsValue:Si(i,ai),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),d=ji(r,t,a),m=Li({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return o(fi,{className:e,inputChildren:c("div",{children:[gi({title:"Сумма кредита, ₽",step:500,min:d.minSum,max:d.maxSum,...s("moneyValue"),value:d.moneyValue}),Fi({title:"Срок кредита, месяцев",min:d.minMonths,max:d.maxMonths,...s("monthsValue"),value:d.monthsValue}),Oi({...d,...a},s),o("div",{className:"sm:hidden",children:m})]}),rateChildren:pi({rate:d.rate}),resultChildren:c("div",{children:[o(ni,{title:"Ежемесячный платёж",value:d.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:m}),Ye(l,{isVertical:!0}),mi(n)]})})})),Oi=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(yn,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(yn,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(yn,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(yn,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),_i=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},Ui=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows?.[0]?Ki(t.rateRows[0].minMonths,t.rateRows[0].maxMonths):0,r=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=t?.rateRows?.find((t=>Wi({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r})&&Wi({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&vi(n,["minSum","maxSum"],t)&&vi(a||i,["minMonths","maxMonths"],t)))||oi,{rate:c}=o,d=Hi(c,e),m=n+d,h=t?.rateRows||[oi];return{...o,...yi(["minSum","maxSum"],h),...yi(["minMonths","maxMonths"],h),availableMonths:_i(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}},Hi=(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)},Wi=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Ki=(e,t)=>e+Math.round((t-e)/2),Gi=d((e=>{const{className:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s}=e,[d,{field:m}]=zt({moneyValue:ki(s,2e4),monthsValue:Si(s),isMonthlyInterestPayment:Boolean(s?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(s?.isRemoteRegistration)}),h=Ui(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(Zl(d.moneyValue,h.minSum,h.maxSum))}),[h.minSum,h.maxSum]),o(fi,{className:t,inputChildren:c("div",{children:[gi({title:"Сумма, ₽",min:h.minSum,max:h.maxSum,...m("moneyValue"),value:h.moneyValue}),Fi({title:"Срок, месяцев",min:h.minMonths,max:h.maxMonths,availableMonths:h.availableMonths,...m("monthsValue"),value:h.monthsValue}),Yi({...h,...r},m)]}),rateChildren:pi({rate:p}),resultChildren:c("div",{children:[o(ni,{title:"Доход в конце срока",value:g,postfix:"₽",prefix:"+"}),o(ni,{title:"Сумма в конце срока",value:x,postfix:"₽"}),Ye(n,{isVertical:!0}),mi(i)]})})})),Yi=(e,t)=>{return c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?Mi({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Bi({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},qi=e=>Xi({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Xi({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Xi=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Qi=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[ri],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>qi({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=bi(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=bi(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>qi({row:e,userInputParams:t,paramsViewSettings:l})&&vi(n+r,["minSum","maxSum"],e)&&vi(i,["minSumOld","maxSumOld"],e)&&vi(r,["minSumExtra","maxSumExtra"],e)&&vi(a,["minMonths","maxMonths"],e)))||ri)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=Di(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}},Zi=d((({className:e,calcSource:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=zt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Qi(i,t,a),d=Li({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return o(fi,{className:e,inputChildren:c("div",{children:[gi({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),gi({title:"Ежемесячный платёж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),Fi({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Ji({...s,...a},r),s.isExtraMoney?gi({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:pi({rate:s.rate,fractionDigits:1}),resultChildren:c("div",{children:[o(ni,{title:"Ежемесячный платёж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?o(ni,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:d}),Ye(l,{isVertical:!0}),mi(n)]})})})),Ji=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(yn,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(yn,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(yn,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),er={CreditCalculatorForm:$i,DepositCalculatorForm:Gi,BusinessDepositCalculatorForm:Vi,BonusCalculatorForm:xi,RefinancingCalculatorForm:Zi},tr=St((({className:e,calculatorTabs:t=[],...l})=>o(x,{className:e,defaultPadding:"p-0",...l,children:nr(t)}))),lr=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in er))return null;const l=er[t];return c("div",{className:"p-xl",children:[e?.calculatorBlock?.title?o(C,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,o(l,{...e.calculatorBlock,isMobile:!0})]})},nr=e=>{if(!e||!e.length)return null;return 1===e.length?lr(e[0]):e.map(((e,t)=>o(ti,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>o(li,{isUnfolded:t,children:lr(e)}),renderFoldButton:ar(e)},t.toString())))},ar=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(q,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),c("div",{className:"flex-1 flex flex-col pl-s",children:[o(je,{align:n,color:"text-white",children:e.nav?.title}),o(je,{align:n,size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),o(q,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]})},ir=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Ql(e,{normalize:(e=a)=>l&&n?String(Zl(Number(rr(e)),l,n)):rr(e),format:tt(r)}),d=i((e=>t&&t(rr(e))),[t]);return o(_t,{onChange:d,...s,...c})})),rr=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),sr=d((e=>o(ir,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(je,{size:"text-xl",font:"font-light",children:"₽"})})}))),or={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},cr={amount:1500},dr=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...d})=>{const[{amount:m},{field:h}]=zt(cr),[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(C,{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:or[s],children:[o(sr,{valid:!u,placeholder:i,label:l,...h("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:m}),r?.text?o(El,{className:"w-full mt-lg",type:"submit",disabled:u,children:r.text}):null]})]})})),mr=(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}]},hr=d((({className:e,disabled:t,...l})=>o(be,{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"})}))),ur=d((e=>o(hr,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),pr=d((e=>o(hr,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),gr="absolute top-[calc(50%-24px)] z-40",xr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",fr=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:"hidden @lg:block",children:[br(e),g?o(ur,{className:p(gr,n?"left-1 @lg:left-8":"left-0"),onClick:f}):null,x?o(pr,{className:p(gr,n?"right-1 @lg:right-8":"right-0"),onClick:b}):null]})})),br=e=>c("div",{children:[e.canScrollLeft?o("div",{className:p(xr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:p(xr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),yr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",vr=({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(q,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(I,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Nr="relative h-full",wr={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},kr=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(Ir);return A({...n,renderProps:(n,a,r)=>c("div",{className:Sr(n,{someCardsHighlighted:i}),children:[P(n,a,{className:Cr(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Ir(n)?vr({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},Sr=(e,{someCardsHighlighted:t})=>p(Nr,t&&(Ir(e)?"pt-3xl":"pt-3xl sm:pt-16")),Cr=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>p(Nr,"min-w-80",wr[n],t&&(Ir(e)?"pt-3xl sm:pt-16":"pt-3xl"),yr(l),l&&"h-full"),Ir=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Tr=St((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...d})=>{const{blocks:m=[]}=d.block||{},h=t||m?.length,[u,{inc:g,dec:f}]=mr({itemCount:h,visibleItemCount:l},Math.floor(l/2)),[b,y]=qa({itemCount:h}),[v]=y.visibleIndicesRange,N=m&&"CarouselBankHistoryCard"===m[0]?.type;return c(x,{className:e,defaultPadding:"p-6xl",...d,children:[c("div",{className:p(a?"flex justify-center":"","relative max-w-full"),children:[o(ja,{containerRef:b,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:kr({noCardBorder:n,activeIndex:u,cardSize:s,...d})}),o(fr,{scroll:y,arrowsPadded:i,onScrollLeft:f,onScrollRight:g,hasEdgeBlocks:N,activeIndex:u,itemCount:h})]}),o(Oa,{className:"@5xl:hidden",containerRef:b,activeIndex:v,dotCount:h,listType:"horizontal-list"})]})}),{childrenTypes:["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Br=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})}))),Mr="z-10 border border-solid w-full h-full",Vr=p(Mr,"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(Vr,"top-9 right-12 bg-green-dark")}),o("div",{className:p(Vr,"top-6 right-8 bg-green")}),o("div",{className:p(Vr,"top-3 right-4 bg-green-light")}),c("div",{className:p(Mr,"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}),Ye([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Rr={black:"bg-black",white:"bg-white"},zr=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(ke,{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:Ye([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(je,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Ar)]}):null,a?c(je,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Ar=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Rr[e]}`},String(t)),Dr=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]}))),jr=d((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>o(Dr,{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(je,{size:"text-h4",children:t}),iconNode:l?o(ae,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Fr=({isUnfolded:e,onToggle:t})=>o(jr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Er=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("w-full pb-lg",e),children:c("a",{className:"bg-white flex justify-between rounded-md w-full p-lg whitespace-nowrap",role:"link",href:i,target:r,onClick:s,children:[c("div",{className:"flex items-center space-x-lg",children:[t?o(ae,{imageClassName:"text-green-dark",image:t,width:"20",height:"20"}):null,o(je,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})]}),o(q,{className:"text-green",name:"ArrowRightIcon",width:"20",height:"20"})]})}):null})),Lr=d((({className:e,additionalDescription:t,description:l,links:n=[],title:a,...i})=>c(x,{className:e,...i,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?$r(n):null]}))),$r=(e,t=3)=>{const l=(e||[]).map(((e,t)=>o(Er,{...e},String(t)))),[n,a]=t>0?[l.slice(0,t),l.slice(t)]:[l,[]];return o("div",{className:"mt-4xl",children:a.length>0?o(ti,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:"mb-1",children:n}),o(li,{isUnfolded:e,children:a})]}),renderFoldButton:Or}):o("div",{children:n})})},Or=({isUnfolded:e,onToggle:t})=>e?null:o(jr,{className:"border-t-main-divider/50",icon:"PlusIcon",label:"Показать еще",onClick:t}),_r=d((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=ue({isRemote:n})({href:t,target:l});return o(t?"a":"div",{className:p("block",e),...t?i:{},role:t?"link":"none",children:a})})),Ur=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Hr=e=>Ur.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},Wr=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}=Hr(t),o=Ge(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:Ye(m,{className:p(a||s?"basis-full":""),buttonClassName:h})}),r?o(je,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Kr=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(_r,{href:a,target:m,className:"h-full",children:c(ke,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(B,{title:h,description:l,headlineVersion:"XS",isEmbedded:!0,align:u}),...ot(Ge(i)?o(ae,{image:i}):null,f),buttons:d.length?o(Wr,{media:d,showButtonText:!0,version:v?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Ke,{benefits:g}),o(et,{items:r,isDotted:s,listItemSize:"S"}),Gr(n,u)]})})}))),Gr=(e,t)=>e?o(I,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Yr=(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(je,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(je,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:Ye(a)}):null]},String(t))},qr=d((({className:e="",title:t,align:l="text-center",icon:n,button:a,visibleCellsCount:i=1,cardCells:r=[],...s})=>{const d=r.map(Yr),[m,h]=i>0?[d.slice(0,i),d.slice(i)]:[d,[]];return c(x,{className:p("flex flex-col",e),defaultPadding:"p-2xl",...s,children:[Ge(n)?o("div",{className:"self-center",children:o(ae,{image:n})}):null,t?o(C,{className:p("pt-xs",l),headingType:"h5",title:t}):null,a?.text?o(be,{className:"w-full mt-m mb-lg",...a}):null,h.length?o(ti,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[m,o(li,{isUnfolded:e,children:h})]}),renderFoldButton:r.length>1?Xr:null}):o("div",{children:m})]})})),Xr=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,type:"button",children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(q,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Qr=(e=!1)=>e?"text-white":"",Zr=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),Jr=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(C,{headingType:"h4",className:Qr(a),title:l}):null,n?o("div",{className:Zr(a),children:n}):null]}))),es=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(ns(l,t)):null})}))),ts=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),ls=(e=!1)=>""+(e?"text-white":""),ns=(e,t)=>({label:l,description:n},a)=>c("div",{className:"flex justify-between text-s py-s",children:[o(I,{size:"text-s",color:ts(e),children:t}),c("div",{className:"basis-1/2",children:[l?o("div",{className:"text-right",children:o(I,{size:"text-s",align:"text-right",color:ls(e),children:l})}):null,n?o("div",{className:"text-right",children:o(I,{size:"text-s",color:ts(e),children:n})}):null]})]},String(a)),as=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(Jr,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>o(es,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?o(be,{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,is({onToggleColumn:i,isFillGradient:n,showRow:a})]})})})),is=({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(je,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),rs=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(C,{headingType:"h3",className:"font-medium text-center",title:l}):null,o("table",{className:"border-separate",children:o(ss,{...e})})]})})),ss=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(as,{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(Xa,{onVisibleIndicesChange:h,children:u})}:{children:u})})),os=e=>e%2!=0,cs=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:Ta})]}))),ds=["ArrowDownIcon","ArrowUpIcon"],ms="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",hs=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(cs,{...a}):null}),c("div",{className:p("space-y-2xs",t.length?"":"hidden"),children:[c("div",{className:p(ms),children:[z(r,{...i.options,parent:n}),os(r.length)?o(It,{className:"col-span-6",...i}):null]}),o(ti,{renderFoldableSection:({isUnfolded:e})=>c(li,{className:p(ms),isUnfolded:e,children:[z(s,{...i.options,parent:n}),os(s.length)?o(It,{className:"col-span-6",...i}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>o(jr,{className:p(l<1?"hidden":""),disabled:!s?.length,label:e,icon:ds[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),us=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(At,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),ps=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(gs(e))]}),n?o("div",{children:o(El,{type:"reset",className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,children:n?.text})}):null]}),gs=e=>([t,l])=>{const n=l?.type;return"array"===n?xs(t,e)(l):null},xs=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{children:[l?.title?o("div",{className:"mb-m",children:o(je,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,o(us,{items:n,multiple:!l?.single,...t(e)})]},e)};function fs(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const bs=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,ys=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>bs(t[e])||bs(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>bs(t[e])||bs(l[e])||vs(t[e])<=vs(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>bs(t[e])||bs(l[e])||vs(t[e]?.min)>=vs(l[e]?.min)&&vs(t[e]?.min)<=vs(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>bs(t[e])||bs(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>bs(t[e])||bs(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),vs=e=>Number(e||0),Ns=(e,{block:t,page:l,normalize:n=Rt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=zt(e),d=r((()=>fs(a,a.map((e=>wt(e.content,l?.fallback))))),[a,l?.fallback]),m=i===e?a:((e,t)=>(l=Rt)=>e?.filter((([,e])=>ys(t,l(e)||{}))).map((([e])=>e)))(d,i)(n);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},ws=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,ks=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),Ss=1e9,Cs={sum:{min:1e4,max:Ss},period:3},Is=St((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Ns(Cs,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:Ts(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),u=Bs(h),g=c("div",{children:[o(sr,{label:n?.title,min:500,max:Ss,...d("sum",{parse:e=>({min:Number(e),max:Ss}),format:({min:e})=>String(e)})}),o(nn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:u,...d("period")})]});return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[ps({field:d,reset:m,filtrationSchema:t,resetButton:l,children:g}),o(hs,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Ts=e=>yt((e?.paramsSource?.rateRows||[]).filter(ws).flatMap((e=>ks(e.minMonths,e.maxMonths)))),Bs=e=>yt(e.flatMap((e=>e||[])).filter(ws).flatMap((e=>ks(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Ms=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,Vs=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:Ms(n)}),o(B,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),Ps="location";function Rs(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",As()??{name:e}),r=i((e=>{Ds(e),l(e)}),[]),{data:s}=Bl(zs()?null:"/api/v1/region",bt);return a((()=>{s&&!zs()&&l(s)}),[s]),[t??{name:e},r]}const zs=()=>Boolean(globalThis.localStorage?.getItem(Ps)),As=()=>{try{const e=globalThis.localStorage?.getItem(Ps);return e&&JSON.parse(e)}catch(e){return null}},Ds=e=>{try{globalThis.localStorage?.setItem(Ps,JSON.stringify(e))}catch(e){}};var js;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(js||(js={}));const Fs=new Intl.NumberFormat("ru",{style:"currency",currency:js.RUB}),Es=e=>e?Fs.format(e):"",Ls="text-left text-m font-light text-secondary-text",$s=`${Ls} pl-5xl`,Os={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},_s=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:`h-fit w-fit ${e}`,children:[o("thead",{children:c("tr",{children:[o("th",{className:Ls,children:o(je,{size:"text-m",children:"Валюта"})}),o("th",{className:$s,children:o(je,{size:"text-m",children:"Купить"})}),o("th",{className:$s,children:o(je,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Us)})]}))),Us=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:Os[t]},width:"24",height:"24"}):null,o(je,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl",children:o(je,{size:"text-h6",children:Es(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl",children:o(je,{size:"text-h6",children:Es(e?.buyExchangeRate)})})]},t)},Hs={icon:"GpsIcon"},Ws=d((({className:e="",address:t})=>c("div",{className:`flex gap-s ${e}`,children:[o(Ma,{...Hs,iconBgVersion:"primary"}),c("div",{className:"space-y-2xs",children:[t?o(I,{size:"text-l",color:"text-primary-main",children:t}):null,o(I,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Ks=(e,t,l)=>{const n=Number(Gs(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)},Gs=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Ys=e=>{return(t=[[e=>e.value!==js.RUB&&e.oppositeValue!==js.RUB,()=>e.handleConvert(e.value,js.RUB)],[e=>e.value===js.RUB&&e.oppositeValue===js.RUB,()=>e.handleConvert(e.value,js.USD)],[e=>e.value===js.RUB&&e.oppositeValue===js.RUB,()=>e.handleConvert(e.value,js.CNY)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function qs(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(_t,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(yl,{isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Xs=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||js.RUB,selectBuy:l?.[0]?.currency?.currency||js.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`grid gap-m pt-2xl ${e}`,children:[qs({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Qs(r,d,l),value:r.inputSell,setValue:e=>Js(d,l)(e,r.selectSell,r.selectBuy)}),qs({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Zs(r,d,t),value:r.inputBuy,setValue:e=>eo(d,t)(e,r.selectBuy,r.selectSell)}),a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),Qs=(e,t,l)=>n=>{t({selectSell:n}),Ys({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Js(t,l)(e.inputSell,n,a)}})},Zs=(e,t,l)=>n=>{t({selectBuy:n}),Ys({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>eo(t,l)(e.inputBuy,n,a)})},Js=(e,t)=>(l,n,a)=>{e({inputSell:Gs(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(Ks(l,i,n===js.RUB)||"")})},eo=(e,t)=>(l,n,a)=>{e({inputBuy:Gs(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(Ks(l,i,n===js.RUB)||"")})};const to=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=Rs(),i=function(e){const t=e?.code||"000",{data:l}=Bl(`/api/v1/exchangerates?regionCode=${t}`,bt);return l||{}}(a),r=lo(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:js.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:js.RUB}}),o(x,{className:p("box-border min-h-80",e),...n,children:o(ke,{className:"h-full",title:o(C,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex gap-6xl flex-wrap",children:[c("div",{children:[r?o(_s,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Ws,{address:i?.address})]}),r.length&&s.length&&d.length?o(Xs,{className:"grow",currencyRatesBuy:s,currencyRatesSell:d,button:l}):null]})})})})),lo=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],no=(e,t)=>o(Ma,{...e,iconBgVersion:t,className:"shrink-0"}),ao=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(Dr,{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:[no(a,t),e?o(je,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(q,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),io=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(ti,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(li,{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})=>ro({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),ro=({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(ao,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):o(jr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},so=d((({className:e="",items:t})=>c("div",{className:e,children:[t?.length?t.map(oo):null,o(be,{version:"primary",className:"w-full",href:"https://www.rshb.ru/natural/feedback/question",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),oo=(e,t)=>c("div",{className:"mb-m space-y-m",children:[o("div",{children:o(je,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(co)})]},String(t)),co=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:mo(e.type,e.text)}),o(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),mo=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${ho(t)}`,children:o(je,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},ho=e=>e.replaceAll(/\D/g,""),uo=["split_version","New","Old"],po=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}`})})),go=d((({title:e,links:t,className:l=""})=>c("div",{className:p("flex flex-col gap-4",l),children:[o(je,{size:"text-l",font:"font-normal",children:e}),t?.length?o("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>o(po,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),xo=d((({className:e="",items:t,basePath:l})=>t?.length?o("ul",{className:p("flex flex-col",e),children:t.map(fo(l))}):null)),fo=e=>(t,l)=>{const{text:n,...a}=t,i=ue({isRemote:!(!F.BASE_PATH||!e)&&!F.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)}`)},bo=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}`})})),yo=d((({className:e="",links:t})=>c("div",{className:p("@container",e),children:[o("div",{className:"pt-lg",children:o(je,{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(bo,{index:t,...e},String(t))))}):null]}))),vo=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]=uo;((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:No(n)}),o(so,{className:"overflow-hidden",items:r}),c("div",{className:"mt-xl",children:[o(Wr,{className:"mb-xl",media:s,stretched:!0,children:"Соцсети"}),c("div",{className:"mb-xl",children:[o("div",{className:"flex flex-col gap-4 mb-xs",children:d?.map(wo)}),o(je,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),o("div",{className:"py-lg border-t border-main-divider",children:o(po,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:u})}),o(go,{className:"py-lg border-y border-main-divider",title:m,links:a}),o(yo,{links:h})]})})),No=e=>e?.map(((e,t)=>o(io,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:o(xo,{items:e.items,basePath:D(e.href)})},String(t)))),wo=({href:e="/",text:t},l)=>{const{label:n}=Hr(e);return o(be,{className:"w-full",text:t||n,version:"secondary",href:e,target:"_blank"},String(l))},ko={width:"34",height:"34"},So={"bg-white":"color",transparent:"white"},Co={"bg-white":"text-primary-main",transparent:"text-white"},Io=(e,t,l)=>o(ae,t?.src?{image:t,className:Co[e],width:l?.width,height:l?.height}:{image:{icon:t?.icon||"LogoIcon",iconVersion:So[e]},className:Co[e],width:l?.width,height:l?.height}),To={"bg-white":"text-primary-text",transparent:"text-white"},Bo=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:[Io(i,l?.image,ko),r?n??o("div",{className:"ml-s",children:o(je,{font:"font-medium",color:To[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),Mo={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Vo=d((({bgColor:e,logo:t,alwaysShowLogo:l,internetBankUrl:n,version:a})=>{const r=u(),s=F.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(Bo,{className:"my-2xs",bgColor:e,logo:t})}):Po(d),n?o("div",{children:o(be,{href:n,ariaLabel:"Войти",target:"_blank",className:p("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",Mo["transparent"===a?"transparent":"default"]),children:"Войти"})}):null]})})),Po=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"}),"Вернуться назад"]})}),Ro={"bg-white":"primary",transparent:"transparent"},zo=St((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:l=Ro[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(Vo,{bgColor:e,logo:i,alwaysShowLogo:t,internetBankUrl:r,version:l,...a})})})})),Ao={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Do=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",Ao[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:A({...c,extraProps:{className:p("w-full",yr(r)),padding:n?"":"p-0"}})})}),{childrenTypes:[]}),jo=St((e=>o(Do,{...e})),{childrenTypes:[]}),Fo=d((e=>{const{className:t,image:l,...n}=e;return o(x,{className:t,defaultPadding:"p-0",...n,children:o(ae,{image:l})})})),Eo=["байт","Кб","Мб","Гб","Тб","Пб"],Lo=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(je,{size:"text-l",font:"font-light",children:[t," ",$o(s,d),o(je,{color:"text-secondary-text",children:l&&`${s+r+d}`})]}):null]})})),$o=(e,t)=>e||t?o("span",{children:", "}):"",Oo={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},_o=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",Oo[r]),role:"list",children:a.map(Uo(d,i))}):null]})})),Uo=(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))} ${Eo[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?Ho(a):l?.fileFormat;return o("div",{role:"listitem",children:o(Lo,{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))},Ho=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},Wo=d((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,additionalDescription:d="",title:m="Мобильное приложение",version:h="primary",...u})=>{const g="secondary"===h?"p-m min-w-32":"min-w-24",f=i?.src?o(ae,{className:"hidden lg:block",image:i}):null;return o(x,{className:p("min-h-80",e),padding:"p-0",version:h,...u,children:c(ke,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(C,{headingType:"h3",title:m,className:p("whitespace-pre-wrap",l)}),rightImage:f,buttons:Ye(n,{className:"flex-wrap"}),children:[a?o(je,{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(et,{items:r,listItemSize:"M"}),o(je,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:d}),s?.src?o("div",{className:p("flex justify-center bg-white rounded-md @xl:-order-1",g),children:o(ae,{className:"w-fit",image:s})}):null,i?.src?o(ae,{className:"lg:hidden",image:i}):null]})]})})})),Ko={primary:"bg-white/30",secondary:"bg-main-divider"},Go={primary:"text-white",secondary:"text-secondary-text"},Yo=d((({count:e,version:t="secondary"})=>o("div",{className:p("w-6 h-6 rounded-full flex items-center justify-center",Ko[t]),role:"status",children:o(je,{size:"text-xs",color:Go[t],children:e})}))),qo=(e=[],t={})=>e.filter((({content:e={}})=>ys(t,e))).length,Xo=(e,t)=>e===t;const Qo=(Zo=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Xo,((e=Xo)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Zo(l,t[e])))));var Zo;const Jo=[],ec={},tc={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},lc={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},nc={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},ac={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},ic=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",tc[n],l?ac[n]:nc[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?lc[n]:"text-secondary-text hover:text-primary-main"),children:[o(je,{size:"text-m",children:r}),s?o("div",{className:"ml-xs",children:s}):null]})})})),rc=d((e=>o(e?.item?.href?sc:oc,{...e}))),sc=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(ic,{...e,tag:"a",item:a,onClick:n})})),oc=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(ic,{item:e,onClick:n,...l})})),cc=(e,t,l)=>(n,a)=>o(rc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),dc=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(cc(n,a,t))}))),mc={categories:[],extraOptions:[],propertyType:[],stage:[]},hc=St((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:u}]=Ns(mc,{block:a.block,page:a.options?.page}),g=i(((e=mc)=>u(e)),[]),f=(({hotFilters:e=Jo,filtrationState:t=ec,blocks:l=Jo,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Qo(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:o(Yo,{version:t===e[a]?"primary":"secondary",count:qo(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(dc,{...f}),ps({field:m,reset:h,filtrationSchema:l,resetButton:n}),o(hs,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}});function uc(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 pc={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"},gc=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(pc).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:o(q,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),xc=e=>globalThis[e];const fc=()=>function(e,t){const[l,r]=n(),s=i((()=>r(xc(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!xc(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${F.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),bc={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"},yc=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(bc).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(q,{name:l,width:"20",height:"16"})})})),vc={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"},Nc=[55.753995,37.614069],wc=d((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=fc(),[d,m]=n();if(a((()=>{i?.current?r&&(uc(r,i.current,e),e?.length||i.current.setCenter(Nc)):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:e?kc(e):Nc,zoom:l,controls:[],suppressMapOpenBlock:!0}),uc(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(vc),h,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;d?e.exitFullscreen():e.enterFullscreen(),m(e.isFullscreen())},children:o(q,{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(yc,{yandexMaps:i}),o(yc,{yandexMaps:i,direction:"out"})]}),gc(i.current,r,p("right-2 top-80",h))]})})),kc=e=>[Cc(Sc(e,0)),Cc(Sc(e,1))],Sc=(e,t)=>e.map((e=>e.coords[t])),Cc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Ic={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},Tc=(e,{field:t,reset:l})=>c("div",{className:"pb-2xl",children:[e?.length?o("div",{className:"flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",children:e.map((e=>o(yn,{text:Ic[e],...t(e)},e)))}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:o(q,{name:"CloseIcon",width:"16",height:"16"})})]}),Bc=()=>{},Mc=()=>[],Vc=d((({className:e,data:t=[],renderCard:l=Bc,filterItems:n=Mc,getBalloon:a=Bc,initFilterState:i={},descriptionData:s,title:d})=>{const[m,{field:h,reset:u}]=zt(i),[g,x,f]=r((()=>{const e=n(t,m),l=e.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:a(e)}))).filter((e=>e.coords&&2===e.coords.length));return[e,l,e.length]}),[t,m]);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(C,{headingType:"h2",children:d}),f?o(je,{size:"text-h2",color:"text-secondary-text",children:`(${f})`}):null]}),s?Pc(s):null,Tc(Object.keys(i),{field:h,reset:u})]}),o("div",{className:"h-[600px]",children:o(b,{children:o(wc,{points:x,className:"h-full"})})})]}),g.map(l)]})})),Pc=({__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(Ae,{__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(je,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Rc={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"}},zc=d((({className:e,children:t,color:l="gray"})=>c("div",{className:p("pt-2xl sm:p-s sm:border sm:border-gray rounded-md flex items-center",Rc[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(je,{size:"text-m",color:Rc[l].text,children:t})]}))),Ac=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:Dc({textItems:a,subText:t,children:l,...n})})),Dc=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>c("div",{className:p("flex gap-2xl sm:gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(je,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>o(je,{size:"text-l",children:e.trim()},String(t)))),a?o(je,{color:n,size:"text-m",children:a}):null]}),jc=d((({className:e,children:t})=>o("div",{className:p("sm:flex sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Fc=["ArrowDownIcon","ArrowUpIcon"],Ec=["Подробнее","Скрыть"],Lc=({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:Ec[Number(e)]}),o(q,{className:"text-primary-text",name:Fc[Number(e)],width:"16",height:"16"})]}),$c=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Uc(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(je,{size:"text-h4",children:Uc(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(je,{size:"text-l",children:t})]}):null]}),o(zc,{color:"green",children:Uc(s)})]}),o("div",{className:"hidden sm:block",children:o(jc,{className:"flex-wrap",children:m?.map(_c)})}),o(ti,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(li,{isUnfolded:e,children:o(jc,{className:"flex-wrap",children:m?.map(_c)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Lc({isUnfolded:e,onToggle:t})})]},String(d))},Oc=({address:e="",terminalType:t,atmCode:l=""})=>({header:`${Uc(t)} №${l}`,body:e.toUpperCase()}),_c=(e,t)=>o(Ac,{...e},String(t)),Uc=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Hc=[];const Wc=async e=>await ft(e,{method:"GET"})||Hc,Kc={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Gc={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Yc=d((({data:e,className:t})=>{const[l]=Rs(),n=function(e){const{data:t=Hc}=Bl(`/api/v1/atms?regionCode=${e}`,Wc);return t}(l?.code??"000");return o(Vc,{className:t,filterItems:qc,data:n,initFilterState:Kc,renderCard:$c,getBalloon:Oc,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),qc=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Gc[t](e))),l=!n.length||n.some((t=>Gc[t](e)));return t&&l}))},Xc=e=>{const t=Zc(e);return o(Ac,{label:"Режим работы",value:t,className:"max-w-none"})},Qc=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",Zc=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Qc({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Qc({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean)},Jc=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],ed=e=>Jc.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??"")}}))),td=e=>{if(!e)return null;const t=ld(e);return c(jc,{className:"border-none",children:[o(Ac,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(nd)})}),o(Ac,{label:"Режим работы",className:"max-w-none",children:o(je,{children:e})})]})},ld=e=>{const t=Jc.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},nd=({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(je,{size:"text-xs",children:e})},String(l)),ad=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Ac,{label:"Валюта",value:e.currency}):null,t?o(Ac,{label:"Купить",value:String(t)}):null,l?o(Ac,{label:"Продать",value:String(l)}):null]},String(n)),id=(new Date).getDay(),rd=e=>{const[t]=e?.slice(id-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(zc,{color:"green",children:a}):null,l&&i?o(zc,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(zc,{color:"red",children:"Выходной"})},sd=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",od=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(Ac,{label:e,value:t&&l?l:"",subText:sd({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),cd=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,dd=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${e}</p>`,md=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,hd=({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=ed(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(je,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(je,{size:"text-l",children:t})]}):null]}),rd(u)]}),o("div",{className:"hidden sm:block",children:ud({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(ti,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(li,{isUnfolded:e,children:ud({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Lc({isUnfolded:e,onToggle:t})})]},String(h))},ud=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=ed(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(jc,{className:"flex-wrap",children:[o(Ac,{label:"Факс",value:t}),o(Ac,{label:"Телефон филиала",value:e}),o(Ac,{label:"Для обращений юридических лиц",value:l}),o(Ac,{label:"Обслуживание физических лиц",value:n}),o(Ac,{label:"Для консультаций по валютному контролю",value:i}),o(Ac,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?o(jc,{children:o(Ac,{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(od)})})}):c(jc,{children:[o(Ac,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(nd)})}),Xc(d)]}),r?.businessScheduleVisibleTag?td(r?.businessScheduleDescription):null,s?.currencies?.length?o(jc,{className:"flex-wrap",children:s?.currencies?.map(ad)}):null]})},pd=({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=ed(e),l=e?Zc(t):"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&!e.businessScheduleDescription?cd(l):dd(l):md(l):null})(l)}`;return{header:n,body:i}},gd=[];const xd=async e=>await ft(e,{method:"GET"})||gd,fd={workingSaturday:!1},bd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},yd=d((({className:e})=>{const[t]=Rs(),l=function(e){const{data:t=gd}=Bl(`/api/v1/branches?regionCode=${e}`,xd);return t}(t?.code??"000");return o(Vc,{className:e,filterItems:vd,data:l,initFilterState:fd,renderCard:hd,getBalloon:pd,title:`Офисы филиала ${t?.name}`})})),vd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>bd[t](e)))))},Nd=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(yd,{}):o(Yc,{data:e})})})),wd=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,{})]}))),kd=d((({className:e,padding:t,slides:l=[],...n})=>o(x,{className:p("overflow-hidden relative",e),padding:t,...n,children:o(Xa,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(st,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),Sd=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:[Ge(r)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ae,{image:r})}):null,s?o(C,{headingType:"h3",as:"h3",title:s}):null]}),c("div",{className:"w-full space-y-m",children:[i?Cd(i):null,Id({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Id({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Id({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Ye([n]):null]})]}))),Cd=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Ae,{__html:e})}),Id=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(q,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(je,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(je,{size:"text-xl",color:n,children:t})]})]}):null,Td=d((e=>{const{__html:t,richVersion:l,...n}=e;return o(x,{defaultPadding:"p-0",...n,children:o(Ae,{__html:t,richVersion:l})})})),Bd=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(na,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(na,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Md=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(yl,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),Vd=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(Md,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Md,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Pd=["От 1 дня","До 365 дней"],Rd=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(je,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(nn,{min:1,max:365,value:e,items:Pd,onChange:t})]}))),zd=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(Md,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Md,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Ad=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(Vd,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Dd(m)}),o(Rd,{days:a,setDays:e=>m({days:e})}),o(zd,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:jd(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(je,{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(Bd,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),Dd=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},jd=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Fd=d((({days:e,tariffs:t=[]})=>{const l=Ld(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:[Ed("Аренда за",e),Ed("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(I,{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(I,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),Ed=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(je,{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})]}),Ld=(e,t)=>{const l=$d(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},$d=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},Od=(e,t)=>e.find((e=>e.branchCode===t)),_d=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Od(n,l.selectedBranch),d=Ud(s?.safeBoxCaseVolumes),m=Hd(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=Wd(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Ad,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Fd,{days:l.days,tariffs:h})]})})),Ud=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Hd=(e,t)=>e?.find((e=>e.volume===t)),Wd=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Kd=[];const Gd=async e=>await ft(e,{method:"GET"})||Kd,Yd=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=Vl(),p=qd(m.selectedRegion,u),g=function(e){const{data:t}=Bl(e?`/api/v1/safeboxes?regionCode=${e}`:null,Gd);return t||Kd}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=Od(g,m.selectedBranch)||g,Array.isArray(y)?y.map((e=>({coords:[e.gpsLatitude,e.gpsLongitude].filter(Boolean)}))).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(C,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(_d,{regions:u,branches:g,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(I,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(wc,{points:b,className:"h-[640px]"}):null]})})),qd=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Xd(e){throw new Error(e)}const Qd={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Zd={normal:"",small:"min-h-6xl"},Jd={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"},em=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(tm(i,r))})}):null,Ye(a,{isVertical:!0})]}))),tm=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return lm(e,t)(l,n);case"rte":return o(Ae,{__html:l.__html});default:Xd(l)}},lm=(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:nm(e,t)(l,n)}),c("div",{className:p("flex flex-col justify-center h-fit",Zd[e]),children:[l.label?o(I,{size:"text-l",align:"text-left",children:l.label}):null,l.description?o("div",{className:p("text-s font-light text-left",Jd.description),children:l.description}):null]})]})},String(n)),nm=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=Qd[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:Ge(l?.icon)?o(ae,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:am(e),height:am(e)}):o("span",{className:p("text-h4","transparent"===t?Jd.iconText:(c=t,"secondary"===c?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var c},am=e=>"normal"===e?"38":"24",im=e=>({href:t})=>!!t&&O(rm(t,e)).startsWith(O(t)),rm=(e,t)=>E(e)?t.href:t.pathname;function sm(e=[]){const t=u(),l=e.findIndex((e=>im(F.BASE_PATH?{pathname:F.BASE_PATH}:e))(t));return[l,e[l]]}const om=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(q,{className:"w-6 h-6",name:"BurgerIcon",iconVersion:e?"color":"black"}),"Меню"]}))),cm=d((({isActive:e,item:t,onClick:l})=>{const n=ue({isRemote:!0}),{href:a,onClick:i}=n({href:t?.href,onClick:l});return c("a",{className:p(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),href:a,target:"_self",title:t?.title||"",onClick:i,children:[o(q,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]})}));const dm=({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:Xd(e)}}))),[c,d]),l},mm=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"})}))),hm=d((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=me(),r=i((()=>{a(),n&&n()}),[n]);return c("div",{className:p("relative min-h-full bg-white pt-0 p-5",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(mm,{className:"absolute top-0 right-0",onClose:r}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),um=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 pm=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(je,{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(gm,{...e},String(t))))})]}):null,gm=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(je,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),xm=e=>t=>o("div",{className:"mb-xs sm:mb-2xs",children:o("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},type:"button",children:o(je,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),fm=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"})]}))),bm=d((({foreignOffices:e,defaultLocation:t})=>{const[l,a]=Rs(t),[r,s]=n(""),d=vm(Vl()).sort(((e,t)=>e.name.localeCompare(t.name))),m=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(d,ym),{close:h}=me(),u=i((e=>{a(e),h()}),[]);return c(hm,{className:"pb-20",head:c("div",{children:[o(je,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?c("div",{className:"mb-s",children:[o(je,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),o("button",{type:"button",onClick:()=>a(l),children:o(je,{color:"text-primary-main",children:l.name})})]}):null,o(fm,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?o("div",{children:d.filter((({name:e})=>e&&um(e.toLowerCase())(r.toLowerCase())>=.8)).map(xm(u))}):o("div",{className:"columns-1 sm:columns-5",children:Array.from(m.entries()).map((p=u,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(je,{size:"text-h6",children:e})}),t.map(xm(p))]},e)))}),pm(e)]});var p})),ym=e=>e.name?.charAt(0)||"",vm=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Nm=d((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return c("div",{className:p("font-sans relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ae,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:p("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})}));function wm(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const km=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},Sm=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Cm=e=>t=>e.map((([e,l])=>[um(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>Tm(t,e))).reduce(km(Math.max,0),new Map),Im=e=>t=>{return fs(t,t.map((({title:e})=>e)).map((e=>t=>{const l=Sm(t||"");return l.length?Pe(e.map((e=>Ha(l.map(um(e)))))):0})(e))).sort((e=>(t,l)=>-e(t,l))((l=([,e])=>e,(e,t)=>l(e)-l(t)))).map((([e])=>e));var l},Tm=(e,t)=>new Map(e.map((e=>[e,t]))),Bm=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=Bl(e?.length?e:null,Mm),[s,o]=n(null);return wm((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=Sm(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(Cm(i)).reduce(km(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return Im(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},Mm=async(...e)=>(await Promise.allSettled(e.map((e=>ft(_(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Vm=d((({className:e,topItems:t})=>{const l=ue({isRemote:!0});return o("div",{className:p("flex items-start justify-between",e),children:t?.map(l).map(Rm)})})),Pm=["all","footer"],Rm=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||Pm.includes(e.displayArea.toLowerCase())));return c("div",{className:"flex flex-col gap-s w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>o(zm,{...e,basePath:D(a),index:t},String(t))))]},String(t))},zm=d((({text:e,index:t,basePath:l,...n})=>{const a=ue({isRemote:!(!F.BASE_PATH||!l)&&!F.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return o("a",{className:p("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),Am=d((({initialQuery:e,topItems:t})=>{const l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,a]=Bm({basePathList:l,initialQuery:e}),i=r((()=>Dm(t)(n)),[t,n]);return o(hm,{head:o(Nm,{autoFocus:!0,...a}),children:o(Vm,{topItems:i})})})),Dm=e=>t=>e?.length&&t?.length?fs(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:_("/",t)})))}))):[],jm=d((({className:e,...t})=>{const[l,a]=n(""),r=i((()=>a("")),[]),s=((e={})=>{const{open:t,close:l}=me();return{open:(l={},n={})=>t(o(Am,{...e,...l}),n),close:l}})(t),d=i((e=>{a(e),Fm(e)&&s.open({initialQuery:e},{onClose:r})}),[r,s]);return c("div",{className:p("relative",e),role:"search",children:[o(Nm,{value:l,onChange:d}),o(mm,{className:"absolute top-0 right-0 sm:hidden",onClose:r})]})})),Fm=e=>e&&e.length>=3,Em=d((({item:e,basePath:t})=>{const l=ue({isRemote:!(!F.BASE_PATH||!t)&&!F.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=u(),s=im(r)({href:n});return c("a",{className:p(s?"text-primary-main":"text-primary-text","py-3 text-h5 font-light flex justify-between cursor-pointer"),href:n,target:a,onClick:i,children:[e.text,o(ae,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]})})),Lm=({item:e,isActive:t,onClick:l})=>c("button",{type:"button",className:"relative",onClick:l,children:[o("span",{className:p("whitespace-nowrap",t?"text-primary-main":""),children:e.text}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]}),$m=d((e=>{const{topItems:t,defaultLocation:l,officesLink:s}=e,[d]=Rs(l),m=(e=>{const{open:t,close:l}=me();return{open:(l={})=>t(o(bm,{...e}),l),close:l}})(e),[h,u]=qa({itemCount:t?.length??0}),[p]=sm(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(hm,{head:o("div",{className:"flex items-center",children:o(C,{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(ja,{containerRef:h,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>o(Lm,{item:e,isActive:g===t,onClick:()=>y(t)},String(t))))})}),c("div",{className:"relative grow overflow-auto",children:[Om(b,f?.href),o(jm,{className:"grow mb-5",...e}),_m(s),Um(d,(()=>m.open()))]})]})})})),Om=(e,t)=>e?o("div",{children:e.map(((e,l)=>o(Em,{item:e,basePath:t},String(l))))}):null,_m=e=>e?c("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[o(ae,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),o("span",{children:"Офисы и банкоматы"})]}):null,Um=(e,t)=>c("div",{className:"flex items-center text-s cursor-pointer",onClick:t,children:[o(ae,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),c("div",{className:"flex flex-col items-start",children:[o(je,{size:"text-h5",children:e.name}),o(je,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]}),Hm="burgerMenuDialog",Wm=e=>{const{open:t,closeAll:l,close:n}=me(),a=dm(),i=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Hm,a),r=()=>t(o($m,{...e}),{id:Hm});return[i,{open:r,close:n,toggle:()=>{i?l():r()}}]},Km=[],Gm=St((({sticky:e,...t})=>{const{menuItems:l=Km}=e??{},[n,{toggle:a,close:i}]=Wm(t.options?.page?.sitemap??{}),[,r]=sm(l),s=Math.floor(l.length/2),d=l.slice(0,s),m=l.slice(s);return o(x,{className:"h-[74px]",defaultPadding:"p-0",...t,children:c("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[d.map(Ym(r,i)),o(om,{isActive:n,onClick:a}),m.map(Ym(r,i))]})})})),Ym=(e,t)=>(l,n)=>o(cm,{isActive:l===e,item:l,onClick:t},l.href||String(n)),qm="hidden sm:flex absolute z-40 top-0",Xm=d((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=qa({itemCount:t?.length||0});return c("div",{className:p("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[o(ja,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(cc(l,n,a))}),r.canScrollLeft?o(ur,{className:p("left-6",qm),onClick:r.scrollLeft}):null,r.canScrollRight?o(pr,{className:p("right-6",qm),onClick:r.scrollRight}):null]})})),Qm=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return o(dc,{...t});case"centered":return o("div",{className:"flex",children:o(dc,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return o("div",{className:"flex",children:o(Xm,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Zm="tab",Jm=d((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...c})=>{const d=u(),{isReady:m}=d,g=r((()=>l.map(th)),[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),eh(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),eh(n),"group"===n.type&&(e=>{const t=new URLSearchParams(d.query);e.name?t.set(Zm,e.name):t.delete(Zm),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:Qm({items:g,value:g[f],tabsMode:s,onChange:y})})})),eh=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})},th=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,lh={start:"text-start",center:"text-center",end:"text-end"},nh=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]})]})})),ah=d((({tab:e})=>{const t=ue(),{onClick:l}=t({...e,onClick:()=>{e.href&&!L(e.href)&&(globalThis.location.href=e.href)}});return wm(l,[],800),o(y,{className:"col-span-12 p-xl",size:5})})),ih=St((({className:e="",tabs:t=[],block:l,tabAlign:a,...i})=>{const[r,s]=n(sh(t)),d=rh(t[r],r),m=t.length,[h,{inc:u,dec:g}]=mr({itemCount:m},r),[f,b]=qa({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(ja,{itemClassName:"flex",containerRef:f,snapAlign:"snap-end",gap:8,onVisibleIndicesChange:b.handleVisibleIndicesChange,children:t.map(oh(r,s,a))}),o(fr,{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(ah,{tab:t[r]}):z(l?.slots?.[d],{...i?.options,slotName:d,parent:l})})]})}),{slots:({tabs:e})=>e?.filter((e=>!e.href)).map(rh)||[],childrenTypes:{exclude:["TabsLayout"]}}),rh=(e,t)=>e?.title||`Слот №${t}`,sh=e=>e.reduce(((e,t,l)=>t.selected?l:e),0),oh=(e,t,l="start")=>(n,a)=>o(nh,{className:lh[l],tab:n,isActive:e===a,onClick:()=>t(a)},String(a)),ch={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},dh=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:ch[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),mh=d((({className:e="",isOpen:t,onClick:l})=>o(be,{className:e,appendRight:o(ae,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),hh={Buttons:({buttons:e})=>Ye(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ae,{image:e}):null,List:({isDotted:e,...t})=>o(et,{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(je,{size:"text-h6",children:e})}):null,t?o("div",{children:o(je,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?o(mh,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},uh=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 ph({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),ph=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in hh))return null;return o(hh[l],{...t,...n})},gh=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(uh,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),xh=(e,t)=>140*Pe(e.slice(0,t).map((e=>e?.cols?.length??1))),fh=(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(je,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,bh=d((({rows:e})=>{return o(ja,{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(je,{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(-${xh(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(je,{size:"text-xl",children:e.data}):null,e?.cols?fh(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),yh=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(je,{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(bh,{rows:t.rowsData})})})]},n)}))}))),vh=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Nh=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(je,{size:"text-xl",font:"font-light",color:vh(t===l),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(q,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function wh(e){const t=await fetch(e);return await t.json()}const kh=d((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=Bl(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),wh);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(Nh,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(yh,{activeTabIndex:r,items:m}),o(mh,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(je,{size:"text-h6",children:"Данных нет"}),o(mh,{onClick:l,isOpen:!0})]})})),Sh=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(kh,{...t,onClick:l})}):null]}))),Ch=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(Sh,{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(je,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(dh,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(gh,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function Ih({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(hr,{className:p("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(hr,{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,Ih({...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]})})),Bh=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]=mr({itemCount:m,visibleItemCount:2}),g=(d||[]).map(((e,t)=>o(Ch,{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(ti,{renderFoldableSection:({isUnfolded:e})=>c(Th,{controls:u,children:[f,o(li,{isUnfolded:e,children:b})]}),renderFoldButton:Fr}):o(Th,{controls:u,children:g})})]})})),Mh=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?Vh():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(je,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Ph(l):null,a?o(Ae,{__html:a}):null]})]}))),Vh=()=>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"}),Ph=e=>o(I,{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(je,{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(je,{size:"text-h2",children:l})}):null]}))),zh=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})})})),Ah={AdTile:It,ApplicationForm:pa,ApplicationFormCustom:Sa,BenefitsBlock:Va,BonusBenefitsBlock:Za,ButtonsBlock:ei,Calculator:tr,CardTransfer:dr,Carousel:Tr,CarouselBankHistoryCard:Br,CarouselCard:Pr,CarouselCatalogCard:zr,CarouselLinks:Lr,CarouselRecommendationCard:Kr,CarouselTariffsCard:qr,ComparisonTable:rs,DepositFiltration:Is,ErrorBlock:Vs,ExchangeRateTile:to,Footer:vo,Header:zo,Headline:B,HorizontalLayout:jo,ImgBlock:Fo,LinkDocs:_o,MobileAppTile:Wo,MortgageFiltration:hc,OfficesAtmsMap:Nd,Placeholder:wd,ProductBlock:Ct,ProductGallery:kd,RepresentativeOfficeInfo:Sd,RichTextBlock:Td,RollupItem:io,SafeDepositRental:Yd,StepsBlock:em,StickyBottomMenu:Gm,Tabs:Jm,TabsLayout:ih,TariffsTable:Bh,TextBlock:Mh,UnitBlock:zh,VerticalLayout:Do},Dh="rshb-query-params";function jh(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Dh)||"";return e&&globalThis.sessionStorage?.setItem(Dh,e),e}const Fh=e=>{const t=Eh(e.target);if(E(t?.href)){e.preventDefault();const l=(e=>{const t=jh();if(!E(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()})(t?.href)||t?.href;l&&(globalThis.location.href=l)}},Eh=e=>{let t=e;for(;Boolean(t)&&"A"!==t.tagName;)t=t?.parentNode;return t},Lh="cookie",$h=d((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=hl();wm((()=>{globalThis.localStorage?.getItem(Lh)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Lh,"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(I,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",o(_r,{isRemote:!0,className:Oh(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",o(_r,{isRemote:!0,className:Oh(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),o("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:o(mm,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),Oh=e=>p("inline mx-2xs",e?"text-green-dark":""),_h=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=dm({onCloseAll:e,onClose:t}),{close:n}=me(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return pl(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})),Uh=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:Xd(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return pl(globalThis.document,"keydown",r),e?o("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Hh="header",Wh="footer",Kh="sticky-footer",Gh={},Yh=d((({className:e,data:t=Gh,blocksRegistry:l,blockDecorator:n})=>{const{slots:i,blocks:r,fallback:s,...d}=t,m=kt(d,s);a((()=>{jh()}),[]),pl(globalThis,"click",Fh);const h={key:"",page:{slots:i,blocks:r,fallback:s,...m},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:[i?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:z(i?.header,{...h,slotName:Hh})}):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:h,extraProps:{className:"scroll-mt-12"}}),z(i?.footer,{...h,slotName:Wh})]})]}),i?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:z(i?.["sticky-footer"],{...h,slotName:Kh})}):null,o(_h,{}),o(Uh,{}),o($h,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Object.assign(Yh,{childrenTypes:[],slots:()=>[Hh,Wh,Kh]});e.Blocks=Ah,e.ContentPage=Yh,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=he,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.14.206",e.projectSettings=F,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})}));