@redneckz/wildless-cms-uni-blocks 0.14.774 → 0.14.776
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/bundle.umd.js +57 -31
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
- package/bundle/components/Header/useChatBot.d.ts +4 -1
- package/dist/components/Header/HeaderChatBotButton.js +2 -2
- package/dist/components/Header/HeaderChatBotButton.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
- package/dist/components/Header/HeaderSecondaryMenuButton.js +3 -3
- package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/dist/components/Header/useChatBot.d.ts +4 -1
- package/dist/components/Header/useChatBot.js +38 -16
- package/dist/components/Header/useChatBot.js.map +1 -1
- package/dist/hooks/useExternalNS.js +13 -9
- package/dist/hooks/useExternalNS.js.map +1 -1
- package/lib/components/Header/HeaderChatBotButton.js +2 -2
- package/lib/components/Header/HeaderChatBotButton.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
- package/lib/components/Header/HeaderSecondaryMenuButton.js +3 -3
- package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/lib/components/Header/useChatBot.d.ts +4 -1
- package/lib/components/Header/useChatBot.js +39 -17
- package/lib/components/Header/useChatBot.js.map +1 -1
- package/lib/hooks/useExternalNS.js +13 -9
- package/lib/hooks/useExternalNS.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +6 -6
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
- package/mobile/bundle/components/Header/useChatBot.d.ts +4 -1
- package/mobile/dist/components/Header/HeaderChatBotButton.js +2 -2
- package/mobile/dist/components/Header/HeaderChatBotButton.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js +3 -3
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/dist/components/Header/useChatBot.d.ts +4 -1
- package/mobile/dist/components/Header/useChatBot.js +38 -16
- package/mobile/dist/components/Header/useChatBot.js.map +1 -1
- package/mobile/dist/hooks/useExternalNS.js +13 -9
- package/mobile/dist/hooks/useExternalNS.js.map +1 -1
- package/mobile/lib/components/Header/HeaderChatBotButton.js +2 -2
- package/mobile/lib/components/Header/HeaderChatBotButton.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js +3 -3
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/lib/components/Header/useChatBot.d.ts +4 -1
- package/mobile/lib/components/Header/useChatBot.js +39 -17
- package/mobile/lib/components/Header/useChatBot.js.map +1 -1
- package/mobile/lib/hooks/useExternalNS.js +13 -9
- package/mobile/lib/hooks/useExternalNS.js.map +1 -1
- package/mobile/src/components/Header/HeaderChatBotButton.tsx +2 -1
- package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +13 -7
- package/mobile/src/components/Header/useChatBot.ts +58 -26
- package/mobile/src/hooks/useExternalNS.ts +14 -9
- package/package.json +1 -1
- package/src/components/Header/HeaderChatBotButton.tsx +2 -1
- package/src/components/Header/HeaderSecondaryMenuButton.tsx +13 -7
- package/src/components/Header/useChatBot.ts +58 -26
- package/src/hooks/useExternalNS.ts +14 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:h("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),x=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:f(t)}))),f=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=v[n]||"h3";return o(i,{role:"heading",className:h("font-sans m-0",N[t],e),children:l||a})})),k=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=S[n],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(w,{className:h("whitespace-pre-wrap",i),...u?.title,as:r||u?.title.as,title:l}):null,a?o(k,{size:u.descriptionSize,font:u.descriptionWeight,align:i,...p,children:a}):null]})})),I=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),T=[];function B(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=I,blocksRegistry:r={},ancestors:s=T}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:h(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const M=[],P=(e,{key:t,ancestors:n=M,slotName:l=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||M,[r.parent,l]]:n},a)))};function V({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?P(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function R(){return R._impl()}R._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),R.setup=e=>{R._impl=e};const z=["CDN","BASE_PATH"],D=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return z.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),_=e=>Boolean(e?.includes(":")),$=(e,t)=>Boolean(e&&!_(e)&&(!t||"_self"===t)),j=e=>Boolean(e?.startsWith("#")),L=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),A=e=>t=>Boolean(e&&t&&e.startsWith(t)&&("/"===t||e===t||"/"===e[t.length]));var O=Object.freeze({__proto__:null,isURL:_,isLocalURL:$,isHash:j,withoutQuery:e=>(e??"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:L,hasPrefix:A});const E="/api/",F=`${E}v1/storage`,U=[D.CDN,E],W=e=>(t,n)=>{if(H(t))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${F}/${t}/attachment`;const l=t?.startsWith("/");return L(A(t)(n)?"":n,l?"/":(a=e.pathname,a?.split("/").slice(0,-1).join("/")),t);var a},H=e=>!e||_(e)||j(e)||U.some(A(e)),Y={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},K={small:"16",medium:"24",large:"48",xl:"78"},q=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",size:r,width:s=r&&K[r],height:d=s})=>{const m=R(),u="normal"===i?`${n}.svg`:`sprites.svg#${n}`,p=W(m)(L(D.CDN,"/icons/",u));return"normal"===i?o("img",{className:e,style:X(e,d),src:p,alt:l,title:a,"aria-hidden":"true",width:s,height:d}):o(G,{className:e,children:c("svg",{className:h(Y[i],{"w-full h-full":!s,invert:"white"===i},t),width:s,height:d,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:p,xlinkHref:p})]})})})),X=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},G=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Z=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function J(e=""){try{return new URL(e).pathname}catch(e){return""}}const Q=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":J(Z.SITE_URL);return t&&!_(t)?W(e)(t,n):t},ee=(e,t)=>e?.media&&t?.media?e.media-t.media:0,te=d((({className:e="",image:t,imageClassName:n=""})=>{const l=R();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(ee).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:Q(l)(e),type:le(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ne({...t,src:Q(l)(t.src)},n):null]})})),ne=(e,t="")=>o("img",{src:e.src,className:h("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),le=e=>e?`image/${String(e)}`:void 0,ae=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(q,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(te,{className:e,imageClassName:n,image:t}):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:n})=>[oe,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),me=e=>me._impl(e);function he(e,t){const n=s({});return r((()=>new Proxy({},{get:(l,a)=>(n.current||={},n.current[a]||=n=>e.fire(t,{...n??{},type:a}),n.current[a])})),[e,t])}me._impl=e=>e,me.setup=e=>{me._impl=e};class ue{watchers=new Set;subscribersMap={};subjectsStateMap={};emitter=this;observable=this;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}subscribe(e,t){this.subscribersMap[e]||=new Set,this.subscribersMap[e]?.add(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.subscribersMap[e]?.delete(t)}}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(e,t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t??void 0,this.fireSubscribers(e,t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){for(const n of this.subscribersMap[e]??[])n(t??null);for(const n of this.watchers)n({type:e,event:t??null})}}const pe=new ue,ge=()=>he(pe.emitter,"dialog");function xe(){const e=R(),{closeAll:t}=ge();return n=>{const l=W(e)(n.href);return{...n,href:l,"aria-label":n.text,onClick:me((a=>{n.onClick?.(a);const i=J(Z.SITE_URL);fe(l,n.target,i)&&(t(),a?.preventDefault(),e.push(((e,t="")=>e?.replace(t,"")||"/")(l,i)))}))}}}const fe=(e,t,n)=>$(e,t)&&!Z.SUB_PORTALS?.split(",")?.some(A(e))&&A(e)(n||"/"),be=e=>{try{return Array.isArray(e)&&e.length?{"data-aspects":JSON.stringify(e)}:{}}catch(e){return{}}},ye=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=Ne(e)&&"hidden lg:block";return c("div",{className:h(ve(e),"flex gap-xs"),children:[l?o("div",{className:h(r,ce[i]),children:l}):null,Ne(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(r,ce[i]),children:a}):null]})})),ve=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",Ne(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},Ne=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),we=({className:e,rounded:t,version:n})=>["inline-block",oe,n?se[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ke=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[e,t]))({method:n,href:l}),s=xe()({onClick:r,href:l,...a}),c=t??o(ye,{...s});return o(e?Ce:Se,{...s,children:c})})),Se=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:de({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...be(d),children:m}))),Ce=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:we({className:e,rounded:l,version:n}),children:a})));function Ie({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(de({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ae,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(ke,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const Te=()=>{const[e,t]=l(true);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Be={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Me=(e,{className:t,imageAlign:n})=>e?o("div",{className:h("shrink-1/2 justify-self-center",n&&Be[n],t),children:e}):null,Pe=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=Te(),v=R(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=x&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Ie({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Me(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[u,f]}),Re(V({...b,extraProps:{className:"@container-normal"}})),Me(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[Ve(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Ve=e=>h(e?"row-span-2":"@xl:row-span-2"),Re=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,ze=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ae,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((({__html:e="",richVersion:t="",itemSize:n="list-m",isDotted:l=!0,children:a})=>e||a?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(t,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",l?"":"without-dots"),dangerouslySetInnerHTML:e?{__html:e}:void 0,children:a})}):null)),_e=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,$e=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),je=(e,t)=>e?o($e,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Le=(e,t)=>["label"in e?je(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:_e(e.description,t)},String(t)):null,"__html"in e?o(De,{...e},`rte-${t}`):null],Ae=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?ze(n.icon,t):null,o("div",{children:Le(n)})]}))),Oe=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(Ae,{benefitsVersion:t,...e},String(n))))}):null)),Ee=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Le)}):null)),Fe=d((({isTabularBenefits:e,...t})=>o(e?Ee:Oe,{...t}))),Ue=e=>Boolean(e?.src||e?.icon),We=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(He(n))}):null,He=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Ye(a,r),d=Ye(i,r);return l||a?.icon?o(ke,{className:h("basis-full @lg:basis-auto",e),appendLeft:Ke({...a,iconVersion:c}),appendRight:Ke({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Ye=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Ke=e=>Ue(e)&&o(ae,{image:e,width:String(e?.size?.width||24),height:String(24)}),qe=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),Xe=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(Ge)}):null)),Ge=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o($e,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[qe(2)(t)," ",n||"₽"]}):null]},String(l)),Ze=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(Je)}):null)),Je=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o($e,{size:"text-m",font:"font-light",children:e})},String(t)),Qe={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},et=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:I,...T})=>{const B=y?.src?o(ae,{image:y}):null,M=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),P=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Pe,{className:e,padding:t,defaultPadding:n,...g?{title:M}:{insetTitle:M},...tt(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:We(b),backwardButton:S,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(Fe,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,u?o(De,{richVersion:p,__html:u,isDotted:m,itemSize:Qe[i]}):null,I,x?.length?o(Xe,{priceList:x}):null,nt(f)]})})})),tt=(e,t)=>t?{rightImage:e}:{leftImage:e},nt=e=>e?.length?o(Ze,{tags:e}):null;class lt{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof lt?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const at=()=>!0,it=(e,t)=>(...n)=>e(...n)&&t(...n),rt=(...e)=>(...t)=>{const[,n]=function(e){if(!e)throw new Error("Value should be fulfilled");return e}(e.find((([e])=>e(...t))));return n(...t)};const st=e=>Boolean(e&&Array.isArray(e)),ot=e=>Boolean(e&&"object"==typeof e&&!st(e)),ct=e=>e;function dt(e){return e instanceof lt?e._:e}class mt extends lt{from(e){return this.of(e.map(((e=ct)=>([,t])=>e(t))(dt)))}entries(){return(this._??[]).map(((e,t)=>[t,this.of(e)]))}size(){return this._?.length??0}get(e){return this.of("number"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of(st(this._)?Array.from({length:Math.max(this._.length,Number(e)+1)},((n,l)=>l===e?t:this._[l])):Array.from({length:Number(e)+1},((n,l)=>l===e?t:void 0)))}}class ht extends lt{from(){return this}entries(){return[]}size(){return 0}get(e){return this.of(void 0!==e?void 0:this._)}set(e,t){return this.of(t)}}class ut extends lt{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,dt(t)]))))}entries(){return Object.entries(this._??{}).map((([e,t])=>[e,this.of(t)]))}size(){return Object.keys(this._??{}).length}get(e){return this.of("string"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of({...this._,[e]:t})}}class pt extends lt{proto=rt([e=>st(this._)||"number"==typeof e,()=>mt.prototype],[e=>ot(this._)||"string"==typeof e,()=>ut.prototype],[at,()=>ht.prototype]);from(e){return this.proto(void 0).from.call(this,e)}entries(){return this.proto(void 0).entries.call(this)}size(){return this.proto(void 0).size.call(this)}get(e){return this.proto(e).get.call(this,e)}set(e,t){return this.proto(e).set.call(this,e,t)}}const gt=e=>e instanceof lt?e:new pt(e),xt=e=>{const t=(t,...n)=>dt(e(gt(t),...n));return t.fn=e,t},ft=[],bt=e=>e instanceof Function?e:t=>e===t,yt=e=>(t,n,l=ft)=>gt(t).entries().reduce(((t,[n,a])=>yt(e)(a,t,l.concat(n))),e(n,[l,gt(t)])),vt=xt(((e,[t,n])=>{const[l,...a]=t;return e.set(l,a.length?vt(e.get(l),[a,n]):n)})),Nt=xt(((e,t)=>t.reduce(vt.fn,e))),wt=e=>yt(((e,[t,n])=>kt(n)?[...e,[t,dt(n)]]:e))(e,[]),kt=e=>0===e.size();xt(((e,t=ft)=>t.reduce(((e,t)=>e.get(t)),e)));const St=xt(((e,[t,...n])=>n.length?e.set(t,St(e.get(t),n)):e.filter((([e])=>e!==t)))),Ct=(It=["$ref"]).map(((e,t)=>n=>bt(e)(n[t+n.length-It.length]))).reduceRight(it,at);var It;const Tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(Bt,e),Bt=rt([st,(e,t)=>e[parseInt(t,10)]],[ot,(e,t)=>e[t]],[at,ct]),Mt=(e,t)=>((e,t={})=>n=>Nt(t,wt(n).map((t=>e(t)))))((([e,n])=>{return Ct(e)?[(l=e,l.slice(0,-1)),Tt(t(n),n)]:[e,n];var l}))(e),Pt=e=>wt(e).filter(((e=ct)=>([t])=>e(t))(Ct)),Vt=e=>{return t=Pt(e).map((([,e])=>e)),[...new Set(t)];var t};async function Rt(e,t){try{return e?await zt(e,t):null}catch(e){console.error(e)}return null}const zt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),Dt=e=>[...new Set(e)],_t={},$t=["/portal-resources"],jt=(e,t)=>Mt(e,(e=>t?.[e])),Lt=(e,t)=>{const n=Vt(e),[i,r]=l({});return a((()=>{At(n).then(r)}),[n.join()]),n.length?jt(e,{...t,...i}):e},At=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(Dt(e).filter((e=>!$t.some((t=>e.startsWith(t))))).map((async e=>[e,_t[e]||=await zt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),l={...t,...n},a=Object.entries(n).flatMap((([,e])=>Vt(e)));return a.length?At(a,l):l}return t};function Ot(e,t={}){const n=d((t=>{const n=Lt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const Et=Ot((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(et,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),Ft=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>Ut(0,t?.length)),[t]),l=t?.[n];return l?o(Et,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(x,{})})})),Ut=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Wt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},Ht=e=>e?.replace(/[^+\d]/g,""),Yt="/api/v1";const Kt=e=>e?{phone:Ht(e)}:{},qt=(e,t="birthday")=>e?{[t]:Wt(e)}:{},Xt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Zt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Ht(e)}:{},Jt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e??[])t[l??""]?.(n,a)};function Qt(){return Qt._impl()}Qt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Qt.setup=e=>{Qt._impl=e};const en="rshb-query-params";function tn(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(en)||"";return e&&globalThis.sessionStorage?.setItem(en,e),e}const nn=e=>{const t=e.target?.closest("a"),n=Qt();if(_(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=tn();if(!_(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;l&&n.assign(l,t?.target)}};function ln(){return ln._impl()}function an(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}ln._impl=()=>({forwardQuery:nn}),ln.setup=e=>{ln._impl=e};const rn=e=>t=>t&&Object.entries(e??{}).flatMap((([e,n])=>n?n(t[e]):[]))||[],sn=e=>!e?.length,on=e=>t=>n=>e(n)?[]:[t],cn={},dn=[];const mn=(e,t)=>e&&t&&(e===t||Object.keys({...e,...t}).every((n=>e[n]===t[n])));function hn(e,{resetOnSubmit:t,formValidator:n,normalizer:o,onChange:c,onSubmit:d}={}){const[m,h]=function(e,t,n){const[r,s]=l(e),o=i((e=>s((l=>{const a=e instanceof Function?e(l):e,i=t?t(a):a,r=mn(a,i)?a:i;return!mn(l,r)&&n?.(r),r}))),[t,n]);return a((()=>{t&&s(t)}),[t]),[r,o]}(e,o,c),[u,{setTrue:p,setFalse:g}]=an(!1),x=s({}),[f,{isValid:b,errors:y}]=function(e,t){const n=r((()=>t?.(e)??cn),[t,e]),l=r((()=>rn(n)(e)??dn),[n,e]),a=sn(l);return[n,{isValid:a,errors:l}]}(m,n),v=i(((e,t={})=>{const{parse:n,format:l,onChange:a}=t,i=m[e],r=u||x.current?.[String(e)],s=t?.validator??f[e],o=r&&s?s(i):[];return{value:l?l(i):i,isDirty:r,errors:s&&o,error:o[0],onChange:t=>{x.current||={},x.current[String(e)]=!0;const l=n?n(t):t;a?.(l),h((t=>({...t,[e]:l})))}}}),[m,u,f,h]),N=i((e=>{x.current=e,h(e)}),[h]),w=i((()=>{x.current={},g(),h(e)}),[e,h]),k=i((e=>{e.preventDefault(),b?(t&&w(),d?.(m,e)):p()}),[t,m,b,w,d]);return[m,{errors:y,field:v,update:N,reset:w,onSubmit:k}]}const un=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container space-y-lg",children:[n?o(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})}));function pn(e,t={}){const{open:n,close:l,...a}=ge();return{open:i(((a,i={})=>n({dialog:o(e,{...t,...a,onClose:()=>{l(),a.onClose?.()}}),...i})),[e,n,l]),close:l,...a}}function gn(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function xn(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return gn(globalThis.document,"click",n),t}const fn=({label:e,errors:t})=>e&&t?`${e}*`:e,bn=()=>{},yn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",vn=e=>e?o($e,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Nn=d((({key:e,className:t,id:n,name:l,type:r="text",label:d,placeholder:m,value:u="",valid:p=!0,pattern:g,autoFocus:x=!1,isTextarea:f=!1,disabled:b=!1,children:y,onChange:v,onFocus:N,onBlur:w})=>{const k=s(null),S=i((e=>{const t=(e.target?.value??"").trimStart();v&&v(t)}),[v]);a((()=>{x&&k.current?.focus()}),[x,k]);const C=y?"pr-3xl":"",I=(e=>e?yn:"border-error")(p),T=d??l??n;return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[vn(d),f?o("textarea",{className:h("block resize-y min-h-24",wn,I),id:h("textarea",n),value:u,name:l||n,placeholder:m,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e):o("input",{ref:k,className:h("h-14",wn,C,I),id:n,type:r,value:u,name:l||n,placeholder:m,pattern:g,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e)]}),y]})})),wn="w-full border rounded-md text-primary-text outline-none p-m",kn=e=>o("div",{className:"h-6",children:e?o($e,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Sn=d((({className:e,label:t,value:n="",placeholder:l,error:r,errors:s,onChange:d=bn,onBlur:m,isTextarea:u,type:p,isInteger:g=!1,maxLength:x,disabled:f=!1})=>{const[b,{setFalse:y,setTrue:v}]=an(),N=xn(y),w=i((e=>{!b&&v(),x?e.length<=x&&d(e):d(e)}),[b,d]);return a((()=>{g&&n&&d(Cn(n))}),[n]),c("div",{className:h("shrink-0 w-full",e),ref:N,onBlur:y,onFocus:v,children:[o("div",{children:o(Nn,{disabled:f,type:p||"text","aria-label":t,label:fn({label:t,errors:s}),valid:Boolean(!r),value:n,onChange:w,onBlur:m,isTextarea:u,placeholder:In(l,s,t)})}),kn(r)]})})),Cn=(e="")=>e.replace(/[^\d]+/g,""),In=(e,t,n)=>t&&!n?`${e}*`:e,Tn=e=>e?.text||e?.key||"",Bn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Mn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:Bn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:Tn(e)}),o(q,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:h("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));function Pn({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=he(pe.emitter,"popup"),h=i((()=>{m.close(),c&&c()}),[c]),u=i((e=>{h(),r&&r(e)}),[h,r]),p=s(null),g=xn(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.open({popup:o(Mn,{popupRef:g,options:t,value:n,query:l,onChange:u,iconVersion:d}),top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,u]),p}const Vn=d((({className:e,label:t,options:n=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,disabled:u=!1,iconVersion:p="black",onChange:g})=>{const[x,{setFalse:f,setTrue:b}]=an(),[y,v]=l(""),N=Dn(u,n.length),w=x&&!N,k=i((()=>{N||b()}),[N]),S=i((()=>{v(""),f()}),[]),C=Pn({isOpen:x,options:n,value:a,query:y,onChange:g,onClose:S,iconVersion:p});return c("div",{className:h("space-y-xs",e),children:[vn(t),c("div",{className:h("relative",w?"z-20":"z-10"),ref:C,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",zn(s,r,N)),onClick:w?S:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Tn(a)||d}),Rn(w,p)]}),m&&w?o("div",{className:h("absolute top-0 w-full z-20"),children:o(Nn,{type:"text",value:y,autoFocus:!0,disabled:N,onChange:v})}):null]})]})})),Rn=(e,t)=>o(q,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),zn=(e,t,n)=>h(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Dn=(e,t)=>e||0===t,_n=d((({className:e="",label:t,error:n,errors:l,...a})=>c("div",{className:e,children:[o(Vn,{...a,valid:!n,label:fn({label:t,errors:l})}),kn(n)]}))),$n=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],jn=d((({field:e,input:t})=>o(_n,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:$n,...e(t?.name??"")}))),Ln=(e="")=>Boolean("trade"===e||"all"===e),An=e=>null!=e,On=new Map,En=(e,t=On)=>n=>{const l=Un(n),a=t.get(l);if(l&&An(a))return a;const i=e(...n);return l&&An(i)&&t.set(l,Promise.resolve(i)),i},Fn=e=>Boolean(e?.every((e=>Array.isArray(e)?Fn(e):!e||"string"==typeof e))),Un=e=>Fn(e)?e.toString():"",Wn=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function Hn(e,t,{fallback:n,cache:i}={}){const s=r((()=>Yn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(An))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await En(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=n&&Wn(s)&&n[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Yn(e){return Array.isArray(e)?e:e instanceof Function?Yn(e()):[e]}const Kn=`${Yt}/branches`,qn=[];const Xn=async e=>await Rt(e,{method:"GET"})||qn;function Gn(e=!1){const{data:t}=Hn(`${Yt}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,zt);return Array.isArray(t)?t:[]}const Zn=(e="")=>"ULTRASERVICE"===e,Jn=d((({field:e,input:t,params:n})=>{const l=Zn(n?.typeForm),i=e("region"),r=i?.value?.key,s=i?.value?.text,c=l?Gn(l)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=Hn(e?`${Kn}?regionCode=${e}`:null,Xn);return t||qn}(r)?.filter((e=>e?.address));return a((()=>{""!==i?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[i?.value]),o(_n,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...e(t?.name??""),isSearch:!0})})),Qn=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},el=(e,t,n)=>Math.max(t,Math.min(e,n));function tl(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function nl({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:i,onChange:t=>{const n=tl(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const ll=1,al=100,il=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:ll),max:s=(a.length?a.length-1:al),step:d=1,value:m=a[0]||r,disabled:u=!1,onChange:p}=e,g=Qn(e,{normalize:(e=0)=>a.length?rl(a)(e):el(e,r,s),format:qe()}),x=i((e=>{p&&p(tl(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o($e,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",yn,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:x,...g}),nl({list:a,min:r,max:s,step:d,disabled:u,value:m,onChange:p})]}),sl(l)]})})),rl=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),sl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o($e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),ol=["От 1 000 ₽","До 1 000 000 000 ₽"],cl=d((({field:e,input:t})=>o(il,{title:"Сумма, ₽",items:ol,min:1e3,max:1e9,...e(t?.name??"")}))),dl=d((({field:e,input:t})=>o(Sn,{label:"Годовая выручка, ₽",...e(t?.name??"")}))),ml="client",hl=[{key:ml,text:"Клиент"},{key:"representative",text:"Представитель клиента"}],ul=d((({field:e,input:t})=>o(_n,{label:"Тип обратившегося",...t,options:hl,...e("applierType")}))),pl=d((({field:e,input:t})=>o(Sn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e(t?.name??"")}))),gl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>n)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=xl(t,e),c=fl(t,i,r);h.push(o("td",{children:o("div",{className:bl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},xl=(e,t)=>t&&e.toDateString()===t.toDateString(),fl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),bl=(e=!1,t=!1)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),yl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],vl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:i=bn})=>{const{firstDayOfWeek:s,totalDays:d}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:yl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:gl({firstDayOfWeek:s,today:e,totalDays:d,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:i})})]})})),Nl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];const wl=e=>"_"===e,kl=e=>/\d/.test(e),Sl=e=>wl(e)||kl(e),Cl=1940,Il={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Tl=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:i,disabled:r,onChange:d,onClick:m})=>{const u=s(null),[p,g]=l(i||"");return a((()=>{g(i||"")}),[i]),a((()=>{Ml({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d})}),[p]),c("div",{onClick:()=>{null!==u.current&&u.current.focus(),m?.()},className:h("relative",n),children:[o("input",{ref:u,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(function(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const l=[...t],a=l.findIndex(wl),i=l.map(((e,t)=>Sl(e)?l.slice(0,t).filter(Sl).length:-1)),r=l.map(((e,t)=>kl(e)?e:n.charAt(i[t])||e)),s=i.indexOf(n.length-1)+1;return r.slice(0,Math.max(a,s)).join("")}(t,"__.__.____"))},onBlur:()=>{Bl(p)?Ml({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(i||"")},disabled:r}),r?null:o(q,{className:"mr-s",...Il})]})})),Bl=e=>{const[t,n,l]=e.split(".");if((e=>Number(e)>=Cl&&Number(e)<=(new Date).getFullYear())(l)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(l),Number(n)-1,1);let a=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),a++;return Number(t)>0&&Number(t)<=a}return!1},Ml=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:l})=>{if(Bl(e)){const{day:a,month:i,year:r}=(e=>{const[t,n,l]=e.split(".");return{day:Number(t),month:Number(n)-1,year:Number(l)}})(e);t(i),n(r),l?.(new Date(r,i,a))}},Pl=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:l,setSelectedMonth:a,setSelectedYear:i,disabled:r=!1})=>o(Tl,{onChange:l,disabled:r,onClick:e,value:t&&Wt(t),setSelectedMonth:a,setSelectedYear:i,className:h("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),Vl=Nl.map((e=>({key:e}))),Rl=Array.from({length:(new Date).getFullYear()-Cl+1},((e,t)=>Cl+t)).reverse().map((e=>({key:String(e)}))),zl=(e,t)=>{const n=new Date(e,t,1);let l=0;for(;n.getMonth()===t;)l++,n.setDate(n.getDate()+1);return l},Dl=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:l,onChange:a})=>{l&&a?.(new Date(t,n,Math.min(e,l.getDate())))},_l={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},$l={className:"min-w-32",iconVersion:"black",isBorder:!1},jl=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:u})=>{const[p,{setValue:g,setFalse:x}]=an(!1),[f,b]=l(n?.getMonth()||(new Date).getMonth()),[y,v]=l(n?.getFullYear()??(new Date).getFullYear()),N=i((e=>{u?.(e),x()}),[u]),{handlePrevMonth:w,handleNextMonth:k,handleSelectMonth:S,handleSelectYear:C,monthsOptions:I,yearsOptions:T,handleChangeVisibleCalendar:B,ref:M}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r,onChange:s,value:o})=>{const c=xn(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>{l(Nl.indexOf(e));const t=zl(r,Nl.indexOf(e));Dl({maxDateOfMonth:t,selectedYear:r,selectedMonth:Nl.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:i((({key:e})=>{a(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:Vl,yearsOptions:Rl,ref:c}})({onYearSelect:v,onMonthSelect:b,onShowCalendar:g,selectedYear:y,selectedMonth:f,showCalendar:p,onChange:u,value:n}),P=((e,t)=>{const[n,i]=l(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();i(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(M,370);return c("div",{className:h("space-y-xs",e),ref:M,children:[vn(t),c("div",{className:"relative",children:[Pl({handleChangeVisibleCalendar:B,value:n,valid:r,onChange:u,disabled:m,setSelectedMonth:b,setSelectedYear:v}),p&&!m?c("div",{className:h("absolute bg-white z-20 select-none",{"bottom-full":P}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:w,children:o(q,{..._l,className:"-rotate-90 cursor-pointer"})}),o(Vn,{onChange:S,value:{key:Nl[f]},options:I,...$l}),o(Vn,{onChange:C,value:{key:String(y)},options:T,...$l}),o("div",{className:"my-auto",onClick:k,children:o(q,{..._l,className:"rotate-90 cursor-pointer"})})]}),o(vl,{today:n,currentMonth:f,currentYear:y,min:s,max:d,onDateSelect:N})]}):null]})]})})),Ll=d((({className:e,label:t,error:n,errors:l,...a})=>c("div",{className:h("shrink-0 w-full",e),children:[o(jl,{label:fn({label:t,errors:l}),valid:Boolean(!n),...a}),kn(n)]}))),Al=d((({field:e,input:t})=>o(Ll,{label:t?.label||"Дата рождения",...e(t?.name??"")}))),Ol=d((({field:e,input:t})=>o(Sn,{label:"Количество объектов инкассации",isInteger:!0,...e(t?.name??"")}))),El=d((({field:e,input:t})=>o(Sn,{className:"col-span-2",...e(t?.name??""),placeholder:"Ваше сообщение",isTextarea:!0}))),Fl=d((({field:e,input:t})=>o(Ll,{label:"Желаемая дата встречи",...e(t?.name??"")}))),Ul=d((({field:e,input:t})=>o(Sn,{label:"Электронная почта",...e(t?.name??""),...t}))),Wl=[{key:"ULTRASERVICE",text:"Ультра"}],Hl=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Yl=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Kl=d((({field:e,input:t})=>o(_n,{label:"Способ получения ответа",options:Yl,...e(t?.name??"")}))),ql=d((({field:e,input:t})=>o(Sn,{label:"ФИО",...e(t?.name??""),...t}))),Xl=d((({field:e,input:t})=>o(Sn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??"")}))),Gl=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Zl="appearance-none w-5 h-5 border-solid flex-none",Jl=[{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"}],Ql=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Gl,{paths:Jl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:h("flex items-center relative group/box",ta(l)),onClick:s,children:[o("div",{className:h(Zl,"m-0",a?"rounded-full border-2":la(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:na(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,ea(n)]})})})),ea=e=>e?o("div",{className:"ml-s",children:o($e,{size:"text-l",font:"font-light",children:e})}):null,ta=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",na=(e=!1)=>e?"radio":"checkbox",la=(e=!1)=>h("rounded border",{"bg-primary-main":e}),aa=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:h("shrink-0",e),children:[o(Ql,{text:t,value:n,disabled:a,onChange:r},l),kn(i)]}))),ia=d((({field:e,input:t})=>o(aa,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),ra=`${Yt}/outservice`,sa=[];async function oa(){const e=await Rt(`${ra}/outserviceregions`);return e&&Array.isArray(e)?e:sa}const ca=d((({field:e,input:t})=>{const n=e("region"),l=n?.value?.key,{data:i}=Hn("outServiceRegions",oa),s=r((()=>i?.find((e=>e.code===l))?.localities?.map((e=>({key:e,text:e})))),[i,l]);return a((()=>{""!==l&&e?.(t?.name??"")?.onChange?.("")}),[l,t?.name??""]),o(_n,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:s,...e(t?.name??""),isSearch:!0})})),da=d((({field:e,input:t})=>o(Sn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,...e(t?.name??""),...t}))),ma=d((({field:e,input:t})=>o(Sn,{label:"Имя",maxLength:60,...e(t?.name??""),...t}))),ha=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:h("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o($e,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),ua=d((({field:e,input:t})=>Ln(e("acquiringType")?.value?.key)?o(ha,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),pa=d((({field:e,input:t})=>o(Sn,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),ga=e=>"_"===e,xa=e=>/\d/.test(e),fa=e=>ga(e)||xa(e),ba=[..."+7 (___) ___-__-__"],ya=ba.findIndex(ga),va=ba.map(((e,t)=>fa(e)?ba.slice(0,t).filter(fa).length:-1));const Na=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=ba.map(((e,n)=>xa(e)?e:t.charAt(va[n])||e)),l=va.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(ya,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(Nn,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),wa=d((({className:e,label:t,error:n,...l})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Na,{"aria-label":t,label:fn({label:t,errors:l?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...l}),kn(n)]}))),ka=d((({field:e,input:t})=>o(wa,{label:"Телефон",...e(t?.name||"phone"),...t}))),Sa=d((({field:e})=>Ln(e("acquiringType")?.value?.key)?o(ha,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Ca=Ot((({field:e,input:t,source:n})=>o(_n,{placeholder:"Выберите продукт",label:"Продукт",options:Ia(n?.productList),...e(t?.name??"")}))),Ia=e=>(e??[]).map((e=>({key:e,value:e}))),Ta=`${Yt}/regions`,Ba=[];function Ma(e=Ta){const{data:t}=Hn(e,zt);return Array.isArray(t)?t:Ba}const Pa=`${Yt}/outservice/outserviceregions`,Va=d((({field:e,input:t,params:n})=>{var l;const a=Ma((l=n?.typeForm,"OUTSERVICE"===l?Pa:void 0));return o(_n,{label:t?.label||"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>a?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[a]),...e(t?.name??"")})})),Ra=d((({field:e,input:t})=>{const n=Gn(!0),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(_n,{label:"Регион",placeholder:"Выберите регион",options:l,...e(t?.name??"")})})),za=d((({field:e,input:t})=>o(Sn,{label:"ФИО представителя",...t,...e("representativeName")}))),Da=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},_a=/^[\u0400-\u04FF\d\s]+$/u,$a=on((e=>null!=e&&""!==e)),ja="Некорректно заполненное поле",La=e=>$a(e??ja),Aa=e=>on((e=>e?.key&&""!==e?.key))(e??ja),Oa=e=>on((e=>"string"==typeof e&&e.length>1&&((e="")=>_a.test(e))(e)))(e??ja),Ea=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),Fa=e=>on(Ea)(e),Ua=on((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Wa={fullName:La(),addressBranch:Aa(),desiredMeetingDate:La(),product:La(),localities:La(),partnerComments:La(),collectionCount:La(),acquiringType:Aa(),serviceType:Aa(),annualRevenue:La(),feedbackMethod:Aa(),serviceDirection:Aa(),secondaryPhone:Fa("Укажите номер телефона"),region:Aa(),situationDescription:La(),sufferedFrom:La(),applierType:La(),surname:Oa("Укажите свою фамилию на кириллице"),name:Oa("Укажите своё имя на кириллице"),middleName:Oa("Укажите своё отчество на кириллице"),birthday:La("Укажите дату рождения"),phone:Fa("Укажите номер телефона"),email:(Ha="Укажите электронную почту",on((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(Ha)),inn:(e=>on((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:La(),typeForm:La(),consentToReceiveMaterials:Ua,consentDataProcessing:Ua};var Ha;const Ya=(e={})=>({name:t})=>Boolean(e[t??""]),Ka=e=>t=>!t?.condition||t.condition.values.find((n=>{const l=e?.[t?.condition?.name??""];return n===(l?.key??l)})),qa=d((({field:e})=>{const t=e("secondaryPhone");return o(wa,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Da(t,Wa.secondaryPhone):t})})),Xa=d((({field:e,input:t})=>o(_n,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Hl,...e(t?.name??"")}))),Ga=d((({field:e,input:t})=>o(Sn,{label:"Описание ситуации",...t,...e("situationDescription")}))),Za=[{key:"blg",text:"Белгородской области"},{key:"brnsk",text:"Брянской области"},{key:"krsk",text:"Курской области"},{key:"chs",text:"От стихийного бедствия ЧС"}],Ja=d((({field:e,input:t})=>o(_n,{label:"Пострадал в",...t,options:Za,...e("sufferedFrom")}))),Qa=d((({field:e,input:t})=>o(Sn,{label:"Фамилия",maxLength:60,...e(t?.name??""),...t}))),ei=["От 1 мес","До 15 лет"],ti=d((({field:e})=>o(il,{title:"Срок, месяцев",items:ei,min:1,max:180,...e("term")}))),ni=d((({field:e,input:t})=>o(_n,{label:"Тип обслуживания",options:Wl,...e(t?.name??"")}))),li={horizontal:"@lg:flex-row",vertical:""},ai=d((({label:e,items:t,value:n,className:l,disabled:a=!1,orientation:i="horizontal",onChange:r})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o($e,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:h("flex flex-col gap-s",li[i],l),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Ql,{isRadio:!0,text:t,value:n===e,onChange:()=>r?.(e),disabled:a},String(e))))})]}))),ii=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],ri=d((({field:e,input:t})=>{const n=i((t=>{"currencyControl"!==t&&(e("inn").onChange?.(""),e("region").onChange?.(""))}),[]);return o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(ai,{className:"whitespace-normal",orientation:"horizontal",items:ii,...e(t?.name??"",{onChange:n})})})})),si=d((({field:e,input:t})=>o(Ql,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...e(t?.name??"")})));const oi={$ref:"/wcms-resources/outservice-productlist.json"},ci={fullName:ql,addressBranch:Jn,desiredMeetingDate:Fl,product:e=>o(Ca,{...e,source:oi}),localities:ca,isClient:ia,partnerComments:pa,collectionCount:Ol,acquiringType:jn,onlineCheckout:ua,posTerminal:Sa,serviceType:ni,term:ti,amount:cl,annualRevenue:dl,vedTypes:ri,feedbackMethod:Kl,serviceDirection:Xa,bankEmpolee:pl,secondaryPhone:qa,applicationDate:e=>o(Sn,{label:"Дата и время обращения в Банк",...e}),region:e=>Zn(e?.params?.typeForm)?o(Ra,{...e}):o(Va,{...e}),consentToReceiveMaterials:si,sufferedFrom:Ja,situationDescription:Ga,representativeName:za,applierType:ul,surname:Qa,name:ma,middleName:da,birthday:Al,phone:ka,email:Ul,inn:Xl,comment:El},di=(e,t,n={})=>(l,a)=>{const i={...ci,...n}[String(l.name)];return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:l,field:e})&&i?o("div",{children:o(i,{field:e,input:l,params:t})},a):null},mi=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o($e,{size:"text-h6",children:e})}):null,hi={primary:h("text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:h("text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","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")},ui=h("group/btn-embedded","bg-transparent border border-transparent outline-none"),pi=h("bg-main-gray text-main-disabled cursor-not-allowed"),gi=d((({className:e,type:t="button",version:n="primary",shape:l="default",embedded:a,disabled:s,role:c,ariaLabel:d,data:m,dataTheme:u,children:p,onClick:g=bn})=>{const x=i("tab"!==c?me(g):g,[c,g]),f=r((()=>be(m)),[m]),b="round"===l;return o("button",{className:h("font-sans flex items-center gap-xs",{[hi[n]]:!s&&!a,[ui]:a,[pi]:s},a?"justify-between":"justify-center",a||b?"p-0":"px-9 py-4",{"rounded-md":"default"===l,"rounded-full":b},e),type:t,role:c,"aria-label":d,disabled:s,"aria-disabled":s?"true":void 0,"data-theme":u,...f,onClick:x,children:p})})),xi=d((({className:e,onClose:t})=>o("button",{className:h("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(q,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),fi=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>c("div",{className:h("relative bg-white pt-0 p-lg",e),role:"dialog",title:"Диалог",onClick:a,children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(xi,{className:"absolute top-0 right-0",onClose:l}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),bi=d((({ok:e,typeForm:t,onClose:n})=>{const l="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(fi,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ae,{image:{icon:e?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?l:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(gi,{type:"button",onClick:n,children:"Хорошо"})]})})})),yi=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,inn:d,sufferedFrom:m,situationDescription:h,applierType:u,...p}=e,g=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Ln(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,x={...p,...ki(o),...wi(c),...d&&{inn:d},...g?{partnerComments:g}:{},...s?{typeForm:s}:{},...Ni(m?.text,h),...vi(u)};return Object.fromEntries(Object.entries(x)?.map((([e,t])=>[e,t?.key||t])))},vi=e=>e?.key?{isClient:e?.key===ml}:{},Ni=(e,t)=>e||t?{comment:`${e||""};${t||""}`}:{},wi=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},ki=e=>e?{vedTypes:Object.fromEntries(ii.map((({id:t})=>[t,t===e])))}:{},Si={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:$n[0],serviceType:Wl[0],feedbackMethod:Yl[0],serviceDirection:Hl[0],vedTypes:ii[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},Ci=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"vedTypes"===e?.name&&e?.defaultValue||Si[e.name||""]]))),typeForm:{key:t,text:""}}),Ii=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0,size:l="big"})=>o("div",{className:h("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:h("inline-block","animate-spin rounded-full","border-solid border-current","border-r-transparent","small"===l?"border-4 h-8 w-8":"border-8 h-28 w-28",e),role:"status"})}))),Ti=d((({isLoading:e,disabled:t,children:n,className:l,...a})=>c(gi,{type:"submit",className:h("relative",l),disabled:e||t,...a,children:[e?o(Ii,{blur:!0,size:"small"}):null,n]}))),Bi={primary:hi.primary,secondary:hi.secondary,white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",gray:hi.secondary,transparent:"","":""},Mi=d((e=>{const t=xe(),{className:n,href:l,target:a,text:i,aboveText:r,version:s="link",rel:c,ariaLabel:d,data:m,children:u,onClick:p}=t(e),g="link"!==s;return o("a",{className:h("group/btn inline-flex items-center h-fit","font-sans no-underline select-none","border border-transparent focus:border-primary-text focus:border","cursor-pointer",{[Bi[s]]:Boolean(s),[r?"px-9 py-2.5":"px-9 py-4"]:g,"rounded-md":g},n),href:l,target:a,rel:c,"aria-label":d??`Ссылка на ${i}`,role:l?"link":"button",onClick:p,...be(m),children:u??Pi(i,r)})})),Pi=(e,t)=>e||t?c("div",{className:"whitespace-pre",children:[t?o("div",{className:"font-light text-left text-xs",children:t}):null,o("div",{className:h("text-left",{"text-s -mt-3xs":Boolean(t)}),children:e})]}):null,Vi=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o($e,{children:e}):null,t?o(Mi,{...t,ariaLabel:"условия передачи данных",children:t.text}):null]}))),Ri=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Ql,{...e}),o(Vi,{link:t})]}),kn(Da(e,Ua).error)]}):o(Vi,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),o(Ti,{className:"w-full @xl:w-auto",children:n?.text?n.text:"Отправить заявку"})]}),zi={send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=`${Yt}${g?"/lead":"/sendcorporatelead"}`,f={typeForm:n,...Xt(l,g),...Gt(i,g),...Kt(a),...qt(s,"desiredMeetingDate"),...g?qt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...Zt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},Di=d((({className:e,title:t,typeForm:n="",sections:l=[],button:a,link:s,endpoint:d,additionalParams:m,isContacts:u,data:p,...g})=>{const x=r((()=>l?.flatMap((e=>e?.inputs))||[]),[l]),f=r((()=>Ci(x,n)),[x,n]),b=r((()=>((e,t={})=>{const n=e.filter((e=>Boolean(e?.required&&e?.name))),l={...Wa,...t},a=n.some((e=>e.condition?.values)),i=Object.fromEntries(n.filter(Ya(l)).map((({name:e})=>[e,l[e??""]])));return e=>a?Object.fromEntries(n.filter(Ya(l)).filter(Ka(e)).map((({name:e})=>[e,l[e??""]]))):i})(x)),[x]),y=pn(bi),v=ln(),N=i((async(e,t)=>{const l=yi({...e,...m}),a=Boolean(await zi.send(l,"lead"===d));y.open({ok:a,typeForm:n}),a&&Jt({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:k,onSubmit:S}]=hn(f,{resetOnSubmit:!0,formValidator:b,onSubmit:N}),C=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return c(un,{className:h("container space-y-m",e),title:t,...g,children:[c("form",{onSubmit:S,children:[l.map(((e,t)=>{return c("div",{className:h((l=e.columns,2===l?"@xl:grid-cols-2":""),"grid gap-x-m"),children:[mi(e.title),(e?.inputs||[])?.map(di(k,{typeForm:n}))]},`section-${t}`);var l})),Ri(C?k("consentDataProcessing"):void 0,s,a)]}),u?c("div",{className:"space-y-m",children:[o(w,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ae,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ae,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),_i=d((({title:e,description:t})=>{const n=Te();return 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(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),$i=e=>e%2!=0,ji=d((({className:e,children:t})=>o("span",{className:h("inline-flex items-center text-start gap-s group-[]/btn-embedded:text-primary-main",e),children:t}))),Li=d((({isUnfolded:e,...t})=>o(q,{name:e?"ArrowUpIcon":"ArrowDownIcon",size:"small",iconVersion:"",...t}))),Ai=d((({className:e,isUnfolded:t,short:n,label:l=(t?"Скрыть":"Развернуть"),embedded:a,...i})=>c(gi,{className:h({"w-full":!n},e),embedded:a,shape:n?"default":"square",role:"tab","aria-label":"Кнопка сворачивающейся секции",...i,children:[o(ji,{children:l}),o(Li,{isUnfolded:t,iconVersion:a?"color":""})]}))),Oi=d((({className:e,role:t="tablist",children:n})=>o("div",{className:h(e),role:t,children:n})));const Ei=d((({className:e,isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:h("transition-max-h duration-300 overflow-hidden",{"max-h-0":Boolean(l.current||!t)}),role:"tabpanel","aria-label":"Сворачивающаяся секция",children:o("div",{className:e,ref:i,children:n})})})),Fi="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Ui=d((({topItemsCount:e=0,label:t,block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]],[s,{toggle:d}]=an(!1);return c("div",{className:h("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:h(Fi),children:[P(i,{...a.options,parent:n}),$i(i.length)?o(Ft,{className:"col-span-6",...a}):null]}),c(Oi,{children:[c(Ei,{className:h(Fi),isUnfolded:s,children:[P(r,{...a.options,parent:n}),$i(r.length)?o(Ft,{className:"col-span-6",...a}):null]}),o(Ai,{className:h("text-h4",{hidden:e<1}),label:t,isUnfolded:s,disabled:!r?.length,dataTheme:a.options?.page?.colorPalette,onClick:d})]})]})})),Wi=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Hi=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Yi=10;function Ki(e=0){const t=Math.round(e*Yi);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const qi=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:c,children:d,onIntersection:m})=>{const u=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:Ki(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}(i((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:u,role:"listitem",children:d})})),Xi=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Gi=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),x&&x(Ji(n))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Zi(c,v):{},...N?Hi(u):{},gap:`${r}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(qi,{className:h(m,a?Xi[a-1]:"",{"h-full":N},t),style:w?Zi(c/4):{},activeIndex:l,idx:n,observerOptions:f,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Zi=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Ji=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Qi={"horizontal-list":"w-6","vertical-list":"h-6"},er=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?Qi[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),tr=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:h("text-secondary-text font-light",s),children:n?.description})]},String(l))},nr=e=>e,lr=(e=nr)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),ar=lr(),ir=(e=nr)=>lr((t=>-e(t))),rr=ir(),sr=e=>t=>e.scrollWidth/t,or=e=>(t,n)=>{e.scrollBy({left:n*sr(e)(t),behavior:"smooth"})},cr=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[ir()(a),lr()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;n.current&&(m?or(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(h?or(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},dr={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},mr=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=Te(),[u,p]=cr({itemCount:s.length}),g=hr(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const x=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Gi,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(tr({activeIndex:t,onClick:x}))}):n?o("div",{className:h("flex gap-xs",dr[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(er({activeIndex:t,onClick:x,listType:l}))}):null})),hr=(e=!1)=>({behavior:e?"auto":"smooth"}),ur=d((({className:e,name:t,...n})=>o(gi,{className:h("w-12 h-12 min-w-12 min-h-12",e),shape:"round",...n,children:o(q,{name:t,iconVersion:"",size:"small"})}))),pr=d((e=>o(ur,{name:"ArrowLeftIcon",version:"secondary",ariaLabel:"Пролистать влево",...e}))),gr=d((e=>o(ur,{name:"ArrowRightIcon",version:"secondary",ariaLabel:"Пролистать вправо",...e}))),xr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",fr=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?br(t):null,i?o(pr,{className:h(yr(a),m?"left-1":"left-0"),onClick:s}):null,r?o(gr,{className:h(yr(a),m?"right-1":"right-0"),onClick:d}):null]})})),br=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(xr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(xr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),yr=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),vr=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:x,navButtons:f})=>{const b=Array.isArray(g)?g.length:0,[y,v]=cr({itemCount:b,onVisibleIndicesChange:x}),[N]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===i?"relative h-full":""),children:[o(Gi,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(fr,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(mr,{className:h(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),Nr=({blocksToRender:e,...t})=>o(vr,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:h("relative min-w-80",Wi(!0)),children:B(e,t)},String(n))})}),wr=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[kr(n,t),o(Ui,{...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[kr(n,t),Nr({...l,blocksToRender:t})]});default:return null}})),kr=(e,t)=>e&&!t.length?o(_i,{...e}):null,Sr=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),Cr=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(ha,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),Ir=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,Sr(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Tr(l)).filter(Boolean))]}),n?o("div",{children:o(gi,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),Tr=e=>([t,n])=>{const l=n?.type;return"array"===l?Br(t,e)(n):null},Br=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o($e,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(Cr,{items:l,multiple:!n?.single,...t(e)})]},e)},Mr=e=>e;function Pr(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Vr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Rr=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Vr(t[e])||Vr(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Vr(t[e])||Vr(n[e])||zr(t[e])<=zr(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Vr(t[e])||Vr(n[e])||zr(t[e]?.min)>=zr(n[e]?.min)&&zr(t[e]?.min)<=zr(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Vr(t[e])||Vr(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Vr(t[e])||Vr(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),zr=e=>Number(e||0),Dr=(e,{block:t,page:n,normalize:l=Mr})=>{const a=t?.blocks||[],[i,s]=hn(e),o=r((()=>Pr(a,a.map((e=>jt(e.content,n?.fallback))))),[a,n?.fallback]),c=i===e?a:((e,t)=>(n=Mr)=>e?.filter((([,e])=>Rr(t,n(e)||{}))).map((([e])=>e)))(o,i)(l);return[i,{blocksToRender:c,blocksWithProps:o},s]},_r={},$r={},jr=Ot((({className:e,filtrationSchema:t=_r,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Dr($r,{block:a.block,page:a.options?.page}),d=o(Vn,{className:"w-64",label:n?.title,options:Lr(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Lr(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Ir,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(gi,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(wr,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Lr=e=>Pr(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Ar=(e=!1)=>e?"text-left":"text-center",Or={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Er=d((({className:e,iconBgVersion:t="primary",size:n,icon:l,...a})=>{const i=`${n?.width??44}px`;return l?o("div",{className:h("rounded-icon object-fit flex justify-center items-center",Or[t],e),style:{width:i,height:i},role:"figure",children:o(q,{name:l,width:"54%",...a})}):null})),Fr=d((({className:e="",title:t,benefitList:n,...l})=>{const a=Te();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(w,{headingType:"h3",as:"h2",className:Ar(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Ur)}):null]})})),Ur=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(Er,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ae,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(w,{headingType:"h6",children:e}),o($e,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(De,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),Wr=(e,t,n)=>{return o(vr,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>c("div",{className:h("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o($e,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?o(ae,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o($e,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},Hr=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:h("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Wr(e,0,t):null]}))),Yr={start:"justify-start",center:"justify-center",end:"justify-end"},Kr=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&h("flex",Yr[n]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:We(e)})})),qr=d((({className:e,title:t,children:n,...l})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(w,{className:"text-center",title:t}):null,n]}))),Xr="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",Gr="flex flex-col lg:w-1/2 gap-2xl",Zr="flex flex-col gap-y-xl min-w-52",Jr=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o($e,{size:"text-h3",children:"number"==typeof e?[l,qe(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),Qr=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o($e,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(Jr,{value:n,...a}):o($e,{size:"text-h3",children:"-"})]}))),es=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,ts=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o($e,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:qe(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),ns=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o($e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(q,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),ls=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,color:a="text-secondary-text",children:i,...r})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o(ts,{title:e,rate:t,unit:n,fractionDigits:l,color:a,...r})}),o(Qr,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:a,...r}),i]}):o(ns,{title:e,...r}),as=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(il,{items:e?[`От ${qe(1)(l.min||0)} ${n}`,`До ${qe(1)(l.max||0)} ${n}`]:[],step:t,...l}),is={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},rs={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ss=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=is.prefMonthsNum,prefTravelBonusRate:i=is.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||rs,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},os=Ot((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=hn({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:x}=ss(r,n);return o(qr,{className:e,title:t,...i,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[as({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),as({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?ls({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:Zr,children:[x>=0?o(Qr,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,We(l,{isVertical:!0}),es(a)]})]})})})),cs=Math.round(29.5),ds=(e,t=0)=>e?.sum?e.sum:t,ms=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,hs=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,us=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o($e,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o($e,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(ai,{orientation:l,items:e,value:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),ps=e=>us({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),gs=" (c капитализацией)",xs=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:Zr,children:[o(Qr,{title:`Доход в конце срока${i?gs:""}`,value:e,postfix:n,prefix:"+"}),o(Qr,{title:`Сумма в конце срока${i?gs:""}`,value:t,postfix:n}),We(l,{isVertical:!0}),a?.map(es)]}),fs=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:bs([e,t],l),bs=([e,t],n=[])=>({[e]:n.length?rr(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?ar(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ys=(e,[t,n],l)=>e>=l[t]&&e<=l[n],vs={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Ns={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},ws=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?vs[e?.rateType]:"",{data:n}=Hn(t?`${Yt}/depositrates/${t}`:null,zt);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&ks(s,e)&&ys(l,["minSum","maxSum"],e)&&ys(n,["minDays","maxDays"],e)))||Ns,{rate:m}=d,h=Ss(m,e),u=l+h,p=c||[Ns];return{...d,...bs(["minSum","maxSum"],p),...bs(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},ks=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ss=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},Cs=Ot((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:u}]=hn({moneyValue:ds(r,1e5),daysValue:ms(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=ws(m,s),{income:g,finalSum:x,rate:f,depositeName:b}=p;return o(qr,{className:e,title:t,...d,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[as({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(il,{items:[`От ${hs(y.min||0)}`,`До ${hs(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Is(p,u),ps({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),ls({rate:f,depositeName:b,isShowDepositeName:i}),xs({income:g,finalSum:x,buttons:n,footnotes:[l,a]})]})});var y})),Is=(e,t)=>c("div",{className:"space-y-s",children:[o($e,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Ql,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Ql,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Ts=e=>Ms([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],e),Bs=(e=[],t=!1)=>Ms([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Ms=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Ps=({min:e=0,max:t=0,availableMonths:n,...l})=>o(il,{items:[`От ${Vs(e)}`,`До ${Vs(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),Vs=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Rs=e=>us({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),zs=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(el(t?.[a],n.minMonths,n.maxMonths))},Ds=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},_s={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},$s=e=>js({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&js({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&js({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&js({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),js=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Ls=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[_s],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>$s({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=fs(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=fs(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>$s({row:e,userInputParams:t,paramsViewSettings:n})&&ys(l,["minSum","maxSum"],e)&&ys(a,["minMonths","maxMonths"],e)))||_s)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:h}=m,u=Ds(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:u}},As=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Os={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Es=Ot((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const u=Ts(n?.rateRows),[p,{field:g}]=hn({moneyValue:ds(s,2e5),monthsValue:ms(s,cs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),x=Ls(p,n,r),f=Rs({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(el(p.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(el(p.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!As(s)&&u&&zs({field:g,defParams:u,calcParams:x,map:Os,monthsValue:"minMonths"})}),[n,s]),o(qr,{className:e,title:t,...m,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[as({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),Ps({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),Fs({...x,...r},g),o("div",{className:"sm:hidden",children:f})]}),c("div",{className:h(Zr,"@4xl:w-1/2"),children:[o(Qr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Qr,{title:"Ставка от",value:u?.rate,fractionDigits:2,postfix:"%"}),o(Qr,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),We(l,{isVertical:!0}),es(i)]})]})})})),Fs=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Ql,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Ql,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Ql,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Ql,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Us=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},Ws={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Hs=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?qs(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Ks({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Ks({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Ks({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Ks({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,ys(l,["minSum","maxSum"],t),ys(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||Ws,{rate:h}=m,u=Ys(h,e),p=l+u,g=t||[Ws];return{...m,...bs(["minSum","maxSum"],g),...bs(["minMonths","maxMonths"],g),availableMonths:Us(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:u,finalSum:p}},Ys=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},Ks=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],qs=(e,t)=>e+Math.round((t-e)/2),Xs=(e="rub")=>"rub"===e,Gs=(e,t)=>{const{minMonths:n,maxMonths:l}=bs(["minMonths","maxMonths"],eo(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:el(a,n,l)}},Zs=(e,t)=>{const{minSum:n,maxSum:l}=bs(["minSum","maxSum"],eo(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:el(a,n,l)}},Js=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),Qs=e=>{const t=Xs(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},eo=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},to=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?us({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?us({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),no(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?ps({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},us({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),no(e.isShowNewClient),e.isShowNewClient?o(Ql,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},no=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,lo={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},ao={text:"₽",key:"rub"},io=Ot((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=n??{},p=u?.map((e=>e.currency))??[ao],g=i((e=>t=>e?{...t,...Qs(t),...Zs(t,e),...Gs(t,e),...Js(t,e)}:t)(u),[u]),[x,{field:f}]=hn({moneyValue:ds(d,2e4),monthsValue:ms(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:ao},{normalizer:g}),b=f?.("currency")?.value??ao,y=f?.("isNewClient")?.value,v=eo(u,b),N=Hs(x,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,I=i((()=>{zs({field:f,defParams:Bs(v,y),calcParams:N,monthsValue:"minMonths",map:lo})}),[f,u]);a((()=>{!As(d)&&v&&I()}),[d,u]);const T=w===Bs(v,y)?.rate;return o(qr,{className:e,title:t,...m,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[c("div",{className:"flex gap-m",children:[as({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...f("moneyValue"),value:N.moneyValue,postfix:b?.text,step:ro(b?.key)}),u&&u?.length>1?o(_n,{label:"Валюта",options:p,...f("currency")}):null]}),Ps({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...f("monthsValue"),value:N.monthsValue}),to({...N,...s},f)]}),ls({rate:w,children:oo(I,T)}),xs({income:k,finalSum:S,buttons:[...l,so(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:f("isMonthlyInterestPayment").value})]})})})),ro=(e="")=>Xs(e)?1e3:100,so=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},oo=(e,t=!1)=>t?null:o(gi,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),co=e=>mo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&mo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),mo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],ho={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},uo=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[ho],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>co({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=fs(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=fs(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>co({row:e,userInputParams:t,paramsViewSettings:n})&&ys(l+r,["minSum","maxSum"],e)&&ys(i,["minSumOld","maxSumOld"],e)&&ys(r,["minSumExtra","maxSumExtra"],e)&&ys(a,["minMonths","maxMonths"],e)))||ho)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=Ds(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},po=Ot((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...s})=>{const[d,{field:m}]=hn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),u=uo(d,n,i),p=r((()=>Ts(n?.rateRows)?.rate),[n?.rateRows]),g=Rs({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...m("isAnnuity")});return o(qr,{className:e,title:t,...s,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[as({title:"Остаток долга в других банках, ₽ ",step:500,min:u.minSum,max:u.maxSum-u.maxSumExtra,...m("moneyValue"),value:u.moneyValue}),as({title:"Ежемесячный платёж в других банках, ₽",step:500,min:u.minSumOld,max:u.maxSumOld,...m("oldMonthlyPayment"),value:u.oldMonthlyPayment}),Ps({title:"Новый срок кредита, месяцев",min:u.minMonths,max:u.maxMonths,...m("monthsValue"),value:u.monthsValue}),go({...u,...i},m),u.isExtraMoney?as({title:"Дополнительная сумма, ₽ ",step:500,min:u.minSumExtra,max:u.maxSumExtra,...m("moneyExtra"),value:u.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:g})]}),c("div",{className:h(Zr,"@4xl:w-1/2"),children:[o(Qr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Qr,{title:"Ставка от",value:p,fractionDigits:2,postfix:"%"}),o(Qr,{title:"Ежемесячный платёж",value:u.monthlyPayment,postfix:"₽"}),u.benefit>0?o(Qr,{title:"Выгода в месяц",value:u.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:g}),We(l,{isVertical:!0}),es(a)]})]})})})),go=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Ql,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Ql,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Ql,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),xo=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Qn(e,{normalize:(e=a)=>n&&l?String(el(Number(fo(e)),n,l)):fo(e),format:qe(r)}),d=i((e=>t&&t(fo(e))),[t]);return o(Nn,{onChange:d,...s,...c})})),fo=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),bo=d((e=>o(xo,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o($e,{size:"text-xl",font:"font-light",children:"₽"})})})));function yo(e,t){for(const[n,l]of e.entries())null!=l?t.setItem(n,l):t.removeItem(n)}function vo(e,t){return yo(e,t),yo(t,e),e.bus.watch((({type:e,event:n})=>{null!=n?t.setItem(e,n):t.removeItem(e)}))}class No{storage;bus;get size(){return this.storage?.length??0}constructor(e,t=new ue){this.storage=e,this.bus=t}hasItem(e){return Boolean(this.storage?.getItem(String(e)))}getItem(e){const t=this.storage?.getItem(String(e))??null;try{return JSON.parse(String(t))}catch(e){return null}}entries(){return Array.from({length:this.size},((e,t)=>{const n=String(this.storage?.key(t));return[n,this.getItem(n)]}))}setItem(e,t){null!==t?this.storage?.setItem(String(e),JSON.stringify(t)):this.storage?.removeItem(String(e)),this.bus?.subject(e,t)}removeItem(e){this.storage?.removeItem(String(e)),this.bus?.subject(e,null)}}class wo{bus;store=new Map;get size(){return this.store.size}constructor(e=new ue){this.bus=e}hasItem(e){return this.store.has(e)}getItem(e){return this.store.get(e)}entries(){return this.store.entries()}setItem(e,t){this.store.set(e,t),this.bus.subject(e,t)}removeItem(e){this.store.delete(e),this.bus.subject(e,null)}}const ko={};function So(e,t=ko){const n=s(null),o=function(){const[,e]=l(0);return i((()=>e((e=>(e+1)%65536))),[])}();return a((()=>e.bus.watch((e=>{n.current?.has(String(e.type))&&o()}))),[e,o]),r((()=>new Proxy(t,{get:(t,l)=>(n.current||=new Set,n.current.add(l),e.getItem(l)),has:(t,l)=>(n.current||=new Set,n.current.add(l),e.hasItem(l)),set:(t,n,l)=>(e.setItem(n,l),!0),deleteProperty:(t,n)=>(e.removeItem(n),!0)})),[e])}const Co=new wo;function Io(){return So(Co)}vo(Co,new No(globalThis?.sessionStorage));const To={private:"p2p/registerP2P",business:"b2c/registerB2C"},Bo=({onClose:e,errorCode:t,errorMessage:n})=>{const l=t?`Код ошибки - ${t}`:"Пожалуйста, повторите позднее";return o(fi,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ae,{image:{icon:"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:"Ошибка перевода",description:l,headlineVersion:"XS",isEmbedded:!0}),n?c("div",{className:"bg-secondary-dark rounded-xl px-4 pt-4 pb-8 grid gap-4 grid-cols-12",children:[c("div",{className:"col-span-8",children:[" ",n]}),o("div",{className:"col-span-4",children:o(ae,{image:{icon:"ResponseFailIcon",iconVersion:"normal"}})})]}):null]})})},Mo=e=>{const t=pn(Bo),n=Io(),l=Qt(),a="private"===e?"p2p":"b2c";return i((async({amount:i})=>{const r=await(async(e,t)=>{const n=Qt(),l={amount:String(t),currency:"643",returnUrl:`${n.origin}/p2p/success`,failUrl:`${n.origin}/p2p/failed`,language:"ru"},a=`${Yt}/payment/${To[e]}`;try{const e=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(l)});return e.ok?await e.json():null}catch(e){return null}})(e,i);(e=>Boolean(e?.formUrl)&&Boolean(e?.orderId))(r)&&(n.transaction={orderId:r.orderId,type:a,url:l.href},l.assign(`${a}/?formUrl=${encodeURIComponent(r.formUrl)}`)),(e=>Boolean(e?.errorMessage)&&0!==e?.errorCode)(r)&&t.open({errorCode:r.errorCode,errorMessage:r.errorMessage})}),[e])},Po={amount:1500},Vo=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:i="private",...r})=>{const[s,{setValue:d}]=an(!1),m=Mo(i),[{amount:u},{field:p,onSubmit:x}]=hn(Po,{onSubmit:m});return a((()=>{d(u<=0)}),[u]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?o(w,{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",onSubmit:x,children:[o(bo,{valid:!s,label:n,max:3e5,min:1,...p("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:u}),l?.text?o(Ti,{className:"w-full mt-lg",disabled:s,children:l.text}):null]})]})})),Ro=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(q,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),zo="relative h-full",Do={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},_o=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(Lo),r=n?{defaultPadding:"p-6xl pb-m"}:{};return V({...l,renderProps:(n,l,a)=>c("div",{className:$o(n,{someCardsHighlighted:i}),children:[B(n,l,{className:jo(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),Lo(n)?Ro({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},$o=(e,{someCardsHighlighted:t})=>h(zo,t&&(Lo(e)?"pt-3xl":"pt-3xl sm:pt-16")),jo=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>h(zo,"min-w-80",Do[l],t&&(Lo(e)?"pt-3xl sm:pt-16":"pt-3xl"),Wi(n),n&&"h-full"),Lo=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Ao=Ot((({className:e,visibleItemCount:t=0,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(vr,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?Oo(s?.block?.blocks):[],hasBlur:!0,children:_o({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Oo=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Eo="z-10 border border-solid w-full h-full",Fo=h(Eo,"absolute hidden @xl:block border-transparent"),Uo=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:h("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:h(Fo,"top-9 right-12 bg-green-dark")}),o("div",{className:h(Fo,"top-6 right-8 bg-green")}),o("div",{className:h(Fo,"top-3 right-4 bg-green-light")}),c("div",{className:h(Eo,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),We([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Wo={black:"bg-black",white:"bg-white"},Ho=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Pe,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ae,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:We([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($e,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Yo)]}):null,a?c($e,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Yo=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Wo[e]}`},String(t)),Ko=d((({icon:e,...t})=>{const n=xe(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ae,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),qo=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?Xo(l):null]})}))),Xo=e=>o("div",{className:h("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(Ko,{...e},String(t))))}),Go=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Zo=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=xe()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:h("block",e),...t?r:{},role:t?"link":"none",...be(a),children:i})})),Jo=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],Qo=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>Jo.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ue(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},ec(a));return c("div",{className:h("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:We(m,{className:tc(s??!1,a??!1,n),buttonClassName:u})}),r?o($e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),ec=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",tc=(e,t,n=!1)=>h(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),nc=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:x,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(Zo,{href:a,target:m,className:"h-full",data:Go(v),children:c(Pe,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:u,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...tt(Ue(i)?o(ae,{image:i}):null,f),buttons:d.length?o(Qo,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Fe,{benefits:x}),s?o(De,{__html:s,isDotted:r,itemSize:"list-s"}):null,lc(l,p)]})})}))),lc=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,ac=new ue,ic=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o($e,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o($e,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:We(a)}):null]},String(t))},rc=d((({className:e="",title:t,align:n="text-center",icon:s,button:d,visibleCellsCount:m=1,cardCells:u=[],options:p,data:x,...f})=>{const b=r((()=>u.map(ic)),[u]),[y,v]=r((()=>m>0?[b.slice(0,m),b.slice(m)]:[b,[]]),[m,b]),[N,k]=l(!1);a((()=>ac.subscribe("fold",(e=>{e&&p?.parent&&e.parent===p?.parent&&k(e.isUnfolded)}))),[p?.parent]);const S=i((()=>{ac.fire("fold",{type:"fold",isUnfolded:!N,parent:p?.parent})}),[N,p?.parent]);return c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...f,children:[o(ae,{className:"self-center",image:s}),t?o(w,{className:h("pt-xs",n),headingType:"h5",title:t}):null,d?.text?o(ke,{className:"w-full mt-m mb-lg",...d}):null,v.length?c(Oi,{children:[c("div",{children:[y,o(Ei,{isUnfolded:N,children:v})]}),u.length>=m?o(Ai,{className:"mt-m",label:N?"Скрыть":"Подробнее о тарифе",isUnfolded:N,embedded:!0,data:x,onClick:S}):null]}):o("div",{children:y})]})})),sc=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,oc=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),cc=1e9,dc={sum:{min:1e4,max:cc},period:3},mc=Ot((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Dr(dc,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:hc(e)})}),u=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=uc(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Ir,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(bo,{label:l?.title,min:500,max:cc,...d("sum",{parse:e=>({min:Number(e),max:cc}),format:({min:e})=>String(e)})}),o(il,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(wr,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),hc=e=>Dt((e?.paramsSource?.rateRows||[]).filter(sc).flatMap((e=>oc(e.minMonths,e.maxMonths)))),uc=e=>Dt(e.flatMap((e=>e||[])).filter(sc).flatMap((e=>oc(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],pc=[{key:"10"},{key:"50"},{key:"100"}],gc=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(Vn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:pc,iconVersion:"black"})]})},xc="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",fc=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:xc,"aria-label":`Страница ${i}`,children:i},String(t)):null},bc={width:"24",height:"24"},yc=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(q,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:vc(1===e),...bc})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:xc,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(fc),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:xc,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(q,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:vc(e===n),...bc})})]})},vc=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Nc=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(yc,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(gc,{itemCount:l,onItemCountChange:a}):null]}),wc=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ae,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",yn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),kc=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(wc,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(jl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(jl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(gi,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Sc=d((({title:e,timestamp:t,publicId:n})=>{const l=xe(),{href:a}=l({href:`${Yt}/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[o(Er,{className:"shrink-0",icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o($e,{size:"text-m","font-weight":"font-light",children:Wt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),Cc=`${Yt}/depository`,Ic={startDate:void 0,endDate:void 0,query:""},Tc=Ot((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:u}]=hn(Ic),{totalPages:p=0,items:x=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?Wt(l,!0):"",r=a?Wt(a,!0):"",s=new URLSearchParams(Cc);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=Hn(Cc+o,zt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),f=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o(kc,{filtrationState:d,field:m,onClearFilter:u}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o($e,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o($e,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),x.length?x.map((e=>o(Sc,{...e},String(e.publicId)))):o(_i,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Nc,{currentPage:n+1,onPageChange:f,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),Bc=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,Mc=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Bc(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(ke,{version:a?.version,text:a?.text,...a}):null]}))),Pc=new wo;function Vc(e){return So(Pc,e)}vo(Pc,new No(globalThis?.localStorage));const Rc=`${Yt}/region`;function zc(e="Москва"){return Vc().location??{name:e}}function Dc(e="Москва"){const t=Vc(),n=i((async()=>{if(!t.location){const n=await Rt(Rc);t.location=n??{name:e}}}),[t,e]);return Hn(Rc,n),t}var _c;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(_c||(_c={}));const $c=new Intl.NumberFormat("ru",{style:"currency",currency:_c.RUB}),jc=e=>e?$c.format(e):"",Lc="text-m font-light text-secondary-text ",Ac=`${Lc} text-left`,Oc=`${Lc} pl-5xl text-center`,Ec=`${Lc} pl-5xl text-right`,Fc={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Uc=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Ac,children:o($e,{size:"text-m",children:"Валюта"})}),o("th",{className:Oc,children:o($e,{size:"text-m",children:"Купить"})}),o("th",{className:Ec,children:o($e,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Wc)})]}))),Wc=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ae,{image:{icon:Fc[t]},width:"24",height:"24"}):null,o($e,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o($e,{size:"text-h6",children:jc(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o($e,{size:"text-h6",children:jc(e?.buyExchangeRate)})})]},t)},Hc={icon:"GpsIcon"},Yc=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Er,{...Hc,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Kc=(e,t,n)=>{const l=Number(qc(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},qc=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function Xc(e){if(!e)throw new Error("Value should be fulfilled");return e}const Gc=e=>t=>{const[,n]=Xc(e.find((([e])=>e(t))));return n(t)},Zc=e=>Gc(e.map((([e,t])=>[e,()=>t])));Zc.if=e=>new Jc(void 0,e);class Jc{parent;predicate;unit;get entry(){return[Xc(this.predicate),Xc(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Jc(this,e)}then(e){return new Jc(this.parent,this.predicate,e)}else(e){return Gc([...Qc(this),[()=>!0,e]])}}const Qc=e=>[...e?.parent?Qc(e.parent):[],e.entry],ed=e=>Zc([[e=>e.value!==_c.RUB&&e.oppositeValue!==_c.RUB,()=>e.handleConvert(e.value,_c.RUB)],[e=>e.value===_c.RUB&&e.oppositeValue===_c.RUB,()=>e.handleConvert(e.value,_c.USD)],[e=>e.value===_c.RUB&&e.oppositeValue===_c.RUB,()=>e.handleConvert(e.value,_c.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function td(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(Nn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(Vn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const nd=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||_c.RUB,selectBuy:n?.[0]?.currency?.currency||_c.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[td({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:ld(r,d,n),value:r.inputSell,setValue:e=>id(d,n)(e,r.selectSell,r.selectBuy)}),td({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:ad(r,d,t),value:r.inputBuy,setValue:e=>rd(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(ke,{text:a.text,version:a?.version,...a}):null]})})),ld=(e,t,n)=>l=>{t({selectSell:l}),ed({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{id(t,n)(e.inputSell,l,a)}})},ad=(e,t,n)=>l=>{t({selectBuy:l}),ed({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>rd(t,n)(e.inputBuy,l,a)})},id=(e,t)=>(n,l,a)=>{e({inputSell:qc(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(Kc(n,i,l===_c.RUB)||"")})},rd=(e,t)=>(n,l,a)=>{e({inputBuy:qc(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(Kc(n,i,l===_c.RUB)||"")})},sd=`${Yt}/exchangerates`;const od=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const a=function(e){const t=e?.code||"000",{data:n}=Hn(sd+`?regionCode=${t}`,zt);return n||{}}(zc()),i=cd(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:_c.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:_c.RUB}}),o(g,{className:h("box-border min-h-80",e),...l,children:o(Pe,{className:"h-full",title:o(w,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[i?o(Uc,{className:"mb-xl",exchangeCurrencyItems:i}):null,o(Yc,{address:a?.address})]}),o(nd,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),cd=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],dd=d((({className:e="",items:t})=>{const n=xe();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(md(n))})})),md=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...be(t),children:a||null})},String(l)):null},hd=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:ud(e)}))),ud=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(pd,{className:"w-full border-0 border-b border-solid border-main-divider last:border-b-0",item:e},String(t)))),pd=d((({className:e,item:t})=>{const[n,{toggle:l}]=an(!1);return c(Oi,{className:e,role:"menuitem",children:[c(gi,{className:h("w-full",t.icon?.icon?"py-xs":"py-lg"),embedded:!0,onClick:l,children:[c(ji,{children:[o(Er,{className:"shrink-0",...t.icon}),o($e,{size:"text-h6",font:"font-normal",color:"text-primary-text",children:t.text})]}),o(Li,{iconVersion:"color",size:"medium",isUnfolded:n})]}),o(Ei,{className:"flex flex-wrap gap-lg group-last:last:pb-0",isUnfolded:n,children:t.items?o(dd,{items:t.items}):null})]})})),gd=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(xd)}):null)),xd=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o($e,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(fd)})]},String(t)),fd=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:bd(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),bd=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${yd(t)}`,children:o($e,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},yd=e=>e.replaceAll(/\D/g,""),vd=d((({className:e="",index:t,text:n,...l})=>{const a=xe(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:h("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),Nd=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o($e,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(vd,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),wd=d((({className:e="",index:t,...n})=>{const l=xe(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),kd=d((({className:e="",links:t,license:n})=>c("div",{className:h("@container space-y-lg",e),children:[n?o("div",{children:o($e,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(wd,{index:t,...e},String(t))))}):null]}))),Sd=Ot((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{};n.options;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:u,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(hd,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(gd,{items:r}),m?o(ke,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(Qo,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(Mi,{className:"text-s font-light",...e},`${e.href}_${t}`)))]})]}),o(Nd,{title:d,links:i}),o(kd,{links:a,license:u})]})})),Cd=Ot((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],u=m?.find((e=>e.name===s.key))?.href;return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container space-y-m",children:[t?o(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(_n,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,u?o("div",{className:"text-center",children:o(Mi,{className:h("w-full @xl:w-auto"),href:u,target:"_blank",version:n?.version??"primary",data:Go(i,s?.key),children:n?.text?n.text:"Перейти"})}):null]})})})),Id={width:"103",height:"21"},Td={"bg-white":"color",transparent:"white"},Bd={"bg-white":"text-primary-main",transparent:"text-white"},Md=(e,t,n)=>o(ae,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Td[e]},className:Bd[e],width:n?.width,height:n?.height}),Pd={"bg-white":"text-primary-text",transparent:"text-white"},Vd=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...be(s),children:[Md(i,n?.image,Id),r?l??o("div",{className:"ml-s",children:o($e,{font:"font-medium",color:Pd[i],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),Rd={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},zd=d((({version:e,text:t,mobileText:n,...l})=>{const a=Te()?n:t;return a?o(ke,{className:h("py-s px-lg font-light whitespace-nowrap",Rd["transparent"===e?"transparent":"default"]),...l,children:a}):null})),Dd=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:l,version:a,backwardButton:r})=>{const s=R(),d="/"===s.pathname,{dataFooter:m,dataHeader:h,...u}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(Vd,{className:"my-2xs",bgColor:e,logo:u,data:h,showTitle:!1})}):_d(p,r),o(zd,{version:a,...l})]})})),_d=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(q,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,$d={"bg-white":"primary",transparent:"transparent"},jd=Ot((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=$d[e],portal:l,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=l||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:n,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(Dd,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...i})})})})),Ld=(e=!1)=>e?{}:{padding:"p-0"},Ad={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Od=Ot((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=R();return o(g,{className:h("relative flex flex-col",Ad[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:V({...c,extraProps:{className:h("w-full",Wi(r)),...Ld(l)}})})}),{childrenTypes:[]}),Ed=Ot((e=>o(Od,{...e})),{childrenTypes:[]}),Fd=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?h("flex",Yr[n]):"";return o(g,{className:h(i,t),defaultPadding:"p-0",...a,children:o(ae,{image:l})})})),Ud=["байт","Кб","Мб","Гб","Тб","Пб"],Wd=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...be(i),children:[e,t?c($e,{size:"text-l",font:"font-light",children:[t," ",Hd(d,m),o($e,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Hd=(e,t)=>e||t?o("span",{children:", "}):"",Yd=(e,t)=>(n,l)=>{const a=W(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Ud[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?qd(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(Wd,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:Kd(t),data:n?.data}),o(De,{__html:n?.__html})]},String(l))},Kd=e=>e?o(ae,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,qd=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},Xd=d((({href:e,__html:t,target:n,onClose:l})=>c(fi,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:l,children:[t?o(De,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(Mi,{href:e,target:n,version:"primary",ariaLabel:"Ссылка на согласие",onClick:l,children:"Я согласен"}),o(gi,{type:"button",version:"secondary",onClick:l,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]}))),Gd=d((({text:e,href:t,target:n,__html:l,icon:a})=>{const{open:r}=pn(Xd),s=i((()=>r({__html:l,href:t,target:n})),[l,t,n]);return e?c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[Kd(a),o($e,{font:"font-light",children:e})]}):null})),Zd={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Jd=Ot((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=R();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Zd[r]),role:"list",children:a.map(Qd(d,i))}):null]})})),Qd=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?em(t)(n,l):Yd(e,t)(n,l)},em=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(Gd,{...l,icon:e,href:tm(t)?t?.href:t?.attachment?.src}),o(De,{__html:t?.__html})]},String(n)):null},tm=e=>"href"in e,nm=Ot((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...x})=>{const f="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ae,{className:"hidden lg:block",image:i}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...x,children:c(Pe,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:u,className:h("whitespace-pre-wrap",n)}),rightImage:b,buttons:We(l,{className:"flex-wrap"}),children:[a?o($e,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(De,{__html:r,itemSize:"list-m"}):null,o($e,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ae,{className:"w-fit",image:d})}):null,i?.src?o(ae,{className:"lg:hidden",image:i}):null]})]})})})),lm=(e,t)=>e&&"underlined"!==t?"primary":"secondary",am=(e=[],t={})=>e.filter((({content:e={}})=>Rr(t,e))).length,im=(e,t)=>e===t;const rm=(e=>(t,n)=>t===n||Boolean(t&&n&&Object.keys(t).length===Object.keys(n).length&&Object.entries(t).every((([t,l])=>e(l,n[t])))))(function(...e){return(t,n)=>e.some((e=>e(t,n)))}(im,((e=im)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))())),sm=[],om={},cm={primary:"bg-white/30",secondary:"bg-main-divider"},dm={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},mm=d((({count:e,version:t="secondary"})=>{const n=Te(),l=n?"bg-main-divider":cm[t],a=dm[t][n?"mobile":"desktop"];return o("div",{className:h("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o($e,{size:"text-xs",color:a,children:e})})})),hm=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ae,{className:h("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},um={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},pm={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},gm={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},xm={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},fm=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:u,...p}=t;return o(i,{className:h("h-12","block flex-1","cursor-pointer",um[l],n?xm[l]:gm[l]),"aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?pm[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[hm({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(mm,{count:m,version:lm(n,l)})}):null]})})})),bm=d((e=>o(e?.item?.href?ym:vm,{...e}))),ym=d((e=>{const t=xe(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(fm,{...e,tag:"a",item:a,onClick:l})})),vm=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(fm,{item:e,onClick:l,...n})})),Nm=(e,t,n)=>(l,a)=>o(bm,{isActive:l===e,onClick:t,type:n,item:l},String(a)),wm=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:h("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(Nm(l,a,t))}))),km={categories:[],extraOptions:[],propertyType:[],stage:[]},Sm=Ot((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=Dr(km,{block:a.block,page:a.options?.page}),x=i(((e=km)=>p(e)),[]),f=(({hotFilters:e=sm,filtrationState:t=om,blocks:n=sm,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>rm(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:am(n,t.filter),version:lm(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:x});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(wm,{...f}),o(Ir,{filtrationSchema:n,resetButton:l,field:m,reset:u}),o(wr,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Cm=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Im=d((({children:e})=>Cm?e:null)),Tm="/icons/MapMarkerClusterIcon.svg",Bm="/icons/MapMarkerClusterYellowIcon.svg";function Mm({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=Pm("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=Pm("workplaces",e,a),r=Vm(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=Vm(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=Vm(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Pm=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Tm:Bm,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),Vm=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?Tm:Bm,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),Rm={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},zm={...Rm,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},Dm=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(zm).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(q,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),_m=e=>globalThis[e];function $m(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return((e,t,n=!1)=>{const l=document.getElementById(t);if(l){const t=_m(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(_m(e))}))}))}return new Promise(((l,a)=>{const i=document.createElement("script");i.src=t,i.async=!0,i.id=t,n&&(i.type="module"),i.addEventListener("load",(()=>{l(_m(e))})),i.addEventListener("error",(e=>{a(e)})),document.head.appendChild(i)}))})(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}const jm={...Rm,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Lm=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(jm).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(q,{name:n,width:"20",height:"16"})})})),Am=[55.753995,37.614069],Om=d((({points:e,className:t="",zoom:n=5,isLoad:l,selectedAddress:i})=>{const r=s(null),d=s(null),m=$m("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${D.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{r.current?Mm({yandexMaps:m,map:r.current,points:e,isLoad:l}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:Em(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),Mm({yandexMaps:m,map:r.current,points:e,isLoad:l})})),r.current&&i&&m?.geocode(i).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();r.current.setCenter(t),r.current.setZoom(18)}))}),[m,e,n,l,i]),!m)return null;const u="z-10";return c("div",{ref:d,className:h("relative","w-full",t),children:[l?o(Ii,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",u),children:[o(Lm,{yandexMaps:r}),o(Lm,{yandexMaps:r,direction:"out"})]}),Dm(r,m,h("right-2 top-80",u))]})})),Em=e=>{const t=[Um(Fm(e,0)),Um(Fm(e,1))];return t.every((e=>e))?t:Am},Fm=(e,t)=>e.map((e=>e.coords?.[t])),Um=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Wm={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Hm={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Ym={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},Km="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",qm=d((({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(Ql,{text:a[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]],[m,{toggle:h}]=an(!1);return o("div",{children:e?.length?o("div",{children:c(Oi,{children:[c("div",{children:[o("div",{className:Km,children:s}),o(Ei,{className:Km,isUnfolded:m,children:d})]}),c("div",{className:"flex space-x-lg",children:[l?o(Ai,{label:m?"Меньше фильтров":"Больше фильтров",isUnfolded:m,embedded:!0,short:!0,onClick:h}):null,c(gi,{embedded:!0,onClick:n,children:[o(ji,{children:"Очистить фильтр"}),o(q,{name:"CloseIcon",size:"small"})]})]})]})}):null})})),Xm=(e,t,n)=>{const l=lm("all"===t),a=lm("business"===t),i=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?r(l):l;return n(t),a},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(gi,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(gi,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Gm=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(De,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ae,{image:e.image}):null,e?.text?o($e,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Zm=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o($e,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Jm=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Ym[t](e)))))},Qm=()=>{},eh=()=>{},th=e=>"all"===e?"block":"hidden",nh=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=eh,renderRemoteWorkplaceCard:s=eh,getBalloon:d=eh,getBalloonRemoteWorkplaces:m=eh,descriptionData:u,title:p})=>{const g=p?.includes("Офис"),[x,{field:f,reset:b}]=hn(Wm),{filteredItems:y,points:v,filteredRemoteWorkplaces:N,lengthItems:w}=(({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:l=Qm,getBalloonRemoteWorkplaces:a=Qm})=>{const[i,s,o,c]=r((()=>{const i=Jm(e,n),r=Jm(t,n),s=[...i.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:l(e)}))),...r.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[i,s,r,i.length+r?.length]}),[e,t,n,l,a]);return{filteredItems:i,points:s,filteredRemoteWorkplaces:o,lengthItems:c}})({data:t,remoteWorkplaces:a,filtrationState:x,getBalloon:d,getBalloonRemoteWorkplaces:m}),[k,S]=l("all");return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Zm(p,w),u?Gm(u):null,g&&Xm(t,k,S),o("div",{className:h("pb-3xl",th(k)),children:o(qm,{filters:lh([...t,...a]),field:{field:f,reset:b},onlyOffice:g,labels:Hm})})]}),o("div",{className:"h-[600px]",children:o(Im,{children:o(Om,{points:v,isLoad:n,className:"h-full"})})})]}),c(Im,{children:[y.map(i),N.map(s)]})]})})),lh=e=>Object.keys(Wm).filter((t=>e.filter((e=>Ym[t](e))).length)),ah=e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:"",ih={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"}},rh=d((({className:e,children:t,color:n="gray"})=>c("div",{className:h("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",ih[n].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($e,{size:"text-m",color:ih[n].text,children:t})]}))),sh=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:oh({textItems:i,subText:t,children:n,isPhone:l,...a})})),oh=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o($e,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||ch(n,s),a?o($e,{color:l,size:"text-m",children:a}):null]}),ch=(e,t)=>e.filter(Boolean).map(((e,n)=>o($e,{size:"text-l",children:t?o("a",{href:`tel:${dh(e)}`,children:e.trim()}):e.trim()},String(n)))),dh=e=>e.replace(/\D/g,""),mh=d((({className:e,children:t})=>o("div",{className:h("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),hh=d((({children:e})=>{const[t,{toggle:n}]=an(!1);return c("div",{children:[o("div",{className:"hidden sm:block",children:e}),c(Oi,{className:"block sm:hidden",children:[o(Ei,{isUnfolded:t,children:e}),o(Ai,{className:"my-m mr-m border-b border-solid border-main-divider",label:t?"Скрыть":"Подробнее",isUnfolded:t,embedded:!0,onClick:n})]})]})})),uh=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:ah(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o($e,{size:"text-h4",children:ah(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(rh,{color:"green",children:ah(s)})})]}),o(hh,{children:o(mh,{className:"flex-wrap",children:m?.map(((e,t)=>o(sh,{...e},String(t))))})})]},String(d))},ph=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${ah(t)} №${n}`,body:e.toUpperCase()}),gh=[];const xh=async e=>{const t=await Rt(e,{method:"GET"});return Array.isArray(t)?t:gh},fh={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},bh={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},yh=d((({descriptionData:e,className:t})=>{const n=zc(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=Hn(`${Yt}/atms?regionCode=${e}`,xh);return{data:t||gh,isLoad:!t&&!n}}(l);return o(nh,{className:t,filterItems:vh,data:a,isLoad:i,initFilterState:fh,renderCard:uh,getBalloon:ph,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),vh=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>bh[t](e))),n=!l.length||l.some((t=>bh[t](e)));return t&&n}))},Nh=e=>{const t=kh(e);return o(sh,{label:"Режим работы",value:t,className:"max-w-none"})},wh=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",kh=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[wh({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),wh({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},Sh=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Ch=e=>Sh.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Ih=e=>{if(!e)return null;const t=Th(e);return c(mh,{className:"border-none",children:[o(sh,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Bh)})}),o(sh,{label:"Режим работы",className:"max-w-none",children:o($e,{children:e})})]})},Th=e=>{const t=Sh.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},Bh=({short:e,status:t},n)=>o("div",{className:h("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o($e,{size:"text-xs",children:e})},String(n)),Mh=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(sh,{label:"Валюта",value:e.currency}):null,t?o(sh,{label:"Купить",value:String(t)}):null,n?o(sh,{label:"Продать",value:String(n)}):null]},String(l)),Ph=(new Date).getDay(),Vh=e=>{const[t]=e?.slice(Ph-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(rh,{color:"green",children:a}):null,n&&i?o(rh,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(rh,{color:"red",children:"Выходной"})},Rh=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",zh=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(sh,{label:e,value:t&&n?n:"",subText:Rh({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Dh=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,_h=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,$h=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,jh=(e,t)=>{if(!e.workSchedule)return null;const n=Ch(e.workSchedule);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($e,{size:"text-h4",children:e.name}),e.address?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:e.address})]}):null]}),Vh(n)]}),o(hh,{children:Lh(e)})]},String(t))},Lh=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Ch(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(mh,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(sh,{label:"Факс",value:t,isPhone:!0}),o(sh,{label:"Телефон филиала",value:e,isPhone:!0}),o(sh,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(sh,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(sh,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(sh,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(mh,{children:o(sh,{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(zh)})})}):c(mh,{children:[o(sh,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Bh)})}),Nh(d)]}),r?.businessScheduleVisibleTag?Ih(r?.businessScheduleDescription):null,s?.currencies?.length?o(mh,{className:"flex-wrap",children:s?.currencies?.map(Mh)}):null]})},Ah=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Ch(e),n=e?kh(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?Dh(n):$h(n,l):_h(n):""})(n)}`;return{header:l,body:i}},Oh=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o($e,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:e})]}):null]})}),o(hh,{children:Eh(t)})]},String(n)):null,Eh=e=>c("div",{children:[c(mh,{className:"flex",children:[o(sh,{label:"Операции для физических лиц",children:o($e,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(sh,{label:"Операции для физических лиц",children:o($e,{children:"Оформление и обслуживание банковских карт"})}),o(sh,{label:"Операции для физических лиц",children:o($e,{children:"Инвестиционное и накопительное страхование"})}),o(sh,{label:"Операции для физических лиц",children:o($e,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(sh,{label:"Режим работы",className:"max-w-none",children:o($e,{children:e})})]}),Fh=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Uh={branches:[],remoteWorkplaces:[]};const Wh=async e=>await Rt(e,{method:"GET"})||Uh,Hh=d((({className:e})=>{const t=zc(),n=t?.code??"000",{data:l,isLoad:a}=function(e="000"){const{data:t,error:n}=Hn(`${Yt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,Wh);return{data:t||Uh,isLoad:!t&&!n}}(n);return o(nh,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:jh,renderRemoteWorkplaceCard:Oh,getBalloon:Ah,getBalloonRemoteWorkplaces:Fh,title:`Офисы филиала ${t?.name}`})})),Yh=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:h(t),defaultPadding:"p-0",...n,children:"offices"===l?o(Hh,{}):o(yh,{descriptionData:e})})})),Kh=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:h("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),qh=d((({className:e,padding:t,slides:n=[],...l})=>o(g,{className:h("overflow-hidden relative",e),padding:t,...l,children:o(vr,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(et,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),Xh=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ue(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ae,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Gh({__html:i,richVersion:r}):null,Zh({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Zh({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Zh({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?We([l]):null]})]}))),Gh=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{...e,itemSize:"list-s"})}),Zh=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(q,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o($e,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o($e,{size:"text-xl",color:l,children:t})]})]}):null,Jh=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(De,{__html:t,richVersion:n})})})),Qh=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",eu=Ot((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,foldButtonVersion:l="default",label:a,version:i,role:r,...s})=>{const d=Te(),[m,{toggle:u}]=an(t),p=o(Ei,{className:h("gap-lg",Qh(d)),isUnfolded:m,children:V({...s,extraProps:{className:"w-full",padding:"p-0"}})}),x="accordion"===l,f=o(Ai,{className:h(x?"text-h6 my-lg":"text-h4"),label:a,isUnfolded:m,embedded:x,onClick:u});return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:r,...s,children:c(Oi,{children:[n?f:p,n?p:f]})})}),{childrenTypes:{exclude:["RollupItem"]}}),tu=d((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:h(yn.split(" ").filter((e=>"rounded"!==e)),Zl,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o($e,{color:"text-primary-text",children:t}):null]})}))),nu=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(tu,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(tu,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),lu=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(Vn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),au=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(lu,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(lu,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),iu=["От 1 дня","До 365 дней"],ru=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o($e,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(il,{min:1,max:365,value:e,items:iu,onChange:t})]}))),su=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(lu,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(lu,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),ou=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(au,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:cu(m)}),o(ru,{days:a,setDays:e=>m({days:e})}),o(su,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:du(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o($e,{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(nu,{}),o(gi,{className:"order-6",version:"primary",onClick:h,children:"Офисы на карте"})]})]}))),cu=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},du=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},mu=d((({days:e,tariffs:t=[]})=>{const n=uu(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[hu("Аренда за",e),hu("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(q,{className:"@xl:h-60",name:"PackA4Icon"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(k,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),hu=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o($e,{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})]}),uu=(e,t)=>{const n=pu(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},pu=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},gu=(e,t)=>e.find((e=>e.branchCode===t)),xu=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=gu(l,n.selectedBranch),d=fu(s?.safeBoxCaseVolumes),m=bu(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,h=yu(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(ou,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(mu,{days:n.days,tariffs:h})]})})),fu=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],bu=(e,t)=>e?.find((e=>e.volume===t)),yu=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,vu=`${Yt}/safeboxes`,Nu=[];const wu=async e=>await Rt(e,{method:"GET"})||Nu,ku=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,h]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Ma(),p=Su(m.selectedRegion,u),x=function(e){const{data:t}=Hn(e?`${vu}?regionCode=${e}`:null,wu);return t||Nu}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=gu(x,m.selectedBranch)||x,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(xu,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Om,{points:b,className:"h-[640px]"}):null]})})),Su=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Cu={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"},Iu=(e,t,n)=>(l,a)=>{const{button:i}=l;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Tu(e,n)(l,a)}),c("div",{className:h("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[Bu(l),i?.text?o(ke,{className:"box-border py-s w-full mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},Tu=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=Mu(e,i),s=i?"transparent"===t:t;return o(g,{className:h("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:Pu({step:n,iconVersion:a,i:l,stepVersion:t})})})},Bu=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:h("text-s font-light text-left",Cu.description),children:e.description}):null,o(De,{__html:e.__html})]}),Mu=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",Pu=({step:e,iconVersion:t,i:n,stepVersion:l})=>{return Ue(e?.icon)?o(ae,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:h("text-h4","transparent"===l?Cu.iconText:(a=l,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var a},Vu=d((({className:e="",title:t,description:n,steps:l=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=l.length>3;return c(g,{className:h("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:l.map(Iu(d,r,i))}):null,We(a,{isVertical:!0})]})})),Ru=d((({isActive:e,item:t,onClick:n})=>c("div",{className:h(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(q,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),zu=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>c("div",{onClick:a,className:h("relative bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(xi,{className:"absolute top-1.5 right-0",onClose:l}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})));function Du(e,t,n){a((()=>e.subscribe(t,(e=>{const t=e?.type;if(t&&"string"==typeof t){const l=n[t];l&&l(e)}}))),[e,t,...Object.values(n)])}const _u=()=>{const[e,{push:t,pop:n,clear:a}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}();return Du(pe.observable,"dialog",{open:t,close:n,closeAll:a}),[e,{close:n,closeAll:a}]},$u=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const ju=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($e,{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(Lu,{...e},String(t))))})]}):null,Lu=d((({icon:e,...t})=>{const n=xe(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ae,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o($e,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Au=(e,t)=>n=>n.name?o(Zo,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Go(e,n.name),children:o($e,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Ou=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:h(yn,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Eu=d((({defaultLocation:e})=>{const t=zc(e),n=xe(),{href:l}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Zo,{href:l,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),Fu=d((({foreignOffices:e,branches:t,onClose:n})=>{const a=Dc(t?.default),[s,d]=l(""),m=Ma(),h=r((()=>Wu(m).sort(((e,t)=>e.name.localeCompare(t.name)))),[m]),u=r((()=>((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(h,Uu)),[h]),p=i((e=>{a.location=e,n?.()}),[a,n]);return c(fi,{className:"pb-20",head:c("div",{children:[o($e,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Eu,{defaultLocation:t?.default}),o(Ou,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:h.filter((({name:e})=>e&&$u(e.toLowerCase())(s.toLowerCase())>=.8)).map(Au(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((g=p,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o($e,{size:"text-h6",children:e})}),t.map(Au(x,g))]},e)))}),ju(e)]});var g,x})),Uu=e=>e.name?.charAt(0)??"",Wu=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),Hu=d((({menuRef:e,menuItem:t,locationDialogProps:n,onClose:l})=>{const i=pn(Fu,n),{name:r}=zc(),s=e?.current?.getBoundingClientRect(),c=J(Z.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open({}),"reload"===e.data.type&&l?.(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[l]),o(zu,{head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),onClick:e=>e.stopPropagation(),onClose:l,children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),Yu="burgerMenuDialog",Ku=({menuRef:e,centralMenuItem:t,locationDialogProps:n,onClose:l=bn})=>{const{open:a}=pn(Hu),[r]=_u(),s=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Yu,r),o=i((()=>a({menuRef:e,locationDialogProps:n,menuItem:t,onClose:l},{id:Yu})),[e,n,t,l]);return[s,{toggle:s?l:o}]},qu=[],Xu=Ot((({sticky:e,...t})=>{const{menuItems:n=qu}=e??{},a=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),h=r.slice(d),[u,p]=l(-1),[x,f]=l(""),{closeAll:b}=ge(),y=i((()=>{p(-1),f(""),b()}),[b]),v=xn(y),N=s(null),[k,{toggle:S}]=Ku({menuRef:N,centralMenuItem:a,locationDialogProps:t.header,onClose:y}),C=(({menuRef:e,dialogRef:t,leftItems:n,rightItems:l,onClose:a})=>{const{open:r,close:s}=ge(),c=i((()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=`${e?.contentWindow?.document.body.offsetHeight}px`}),[]);return i(((i,d)=>{const m="left"===d?n:l,h=e?.current?.getBoundingClientRect();r({id:"left"===d?n[i].title:l[i].title,dialog:o(zu,{className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:m[i].description||m[i].title})}),onClick:e=>e.stopPropagation(),onClose:()=>{s(),a?.()},children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",src:m[i]?.src,width:h?.width??0,onLoad:c})})})})}),[c,n,l,a])})({menuRef:N,dialogRef:v,leftItems:m,rightItems:h,onClose:y}),I=i((e=>{e.stopPropagation(),y(),S()}),[y,S]),T=i(((e,t)=>{f(t),p(e),b(),C(e,t)}),[b,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(Gu(T,"left",{activeIndex:u,currentItemPosition:x})),o(Ru,{item:a,isActive:k,onClick:e=>I(e)}),h.map(Gu(T,"right",{activeIndex:u,currentItemPosition:x}))]})})})),Gu=(e,t,n)=>(l,a,i)=>o(Ru,{item:l,isActive:i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t,onClick:r=>{i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t||r.stopPropagation(),e(a,t)}},l.title||String(a)),Zu="hidden sm:flex absolute z-40",Ju={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Qu=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=cr({itemCount:t?.length||0});return a((()=>ep(r.current,t,n)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(Gi,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Ju[i].item,gap:Ju[i].gap,children:t.map(Nm(n,l,i))}),s.canScrollLeft?o(pr,{className:h("left-6",Zu,Ju[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(gr,{className:h("right-6",Zu,Ju[i].buttonTop),onClick:s.scrollRight}):null]})})),ep=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},tp={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},np=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:h(tp[t].wrapper,e),children:o(Qu,{className:tp[t].component,tabsType:t,...n})}):null,lp=Ot((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=ap(n??{}),p=R(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(sp(f,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(u))),N=f[y],w=f.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[u]?f.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[u])):w;v(-1===e?0:e)}),[b,w,u]);const k=rp(f[y],y),S=i((e=>{const t=f.indexOf(e),n=f[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(u,e?.tabName??String(t)):n.delete(u),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[f]);return c(g,{className:h({"sticky top-1 z-20":d&&x},e),defaultPadding:"p-0",block:n,...m,children:[np({className:h({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!x}),items:ip(t,f),activeItem:N,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>P(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(rp)?.filter(Boolean)||[]}),ap=({__id:e,anchor:t})=>t??e??"tabs",ip=(e,t)=>t?.length?t:e,rp=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",sp=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),op={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},cp=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:op[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),dp=d((({className:e="",isOpen:t,onClick:n})=>o(Ai,{className:e,label:t?"Скрыть":"Показать",isUnfolded:t,version:"secondary",short:!0,onClick:n}))),mp={Buttons:({buttons:e})=>We(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ae,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(De,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o($e,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o($e,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(dp,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},hp=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return up({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),up=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in mp))return null;return o(mp[n],{...t,...l})},pp=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(hp,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),gp=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),xp=(e,t)=>e?.length>0?o("div",{className:h("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o($e,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,fp=d((({rows:e})=>{return o(Gi,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=h("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o($e,{size:"text-xl",font:"font-light",children:l.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${gp(a,t)}px)`},children:a?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o($e,{size:"text-xl",children:e.data}):null,e?.cols?xp(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),bp=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o($e,{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(fp,{rows:t.rowsData})})})]},l)}))}))),yp=(e=!1)=>""+(e?"text-white":"text-secondary-text"),vp=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:h("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o($e,{size:"text-xl",font:"font-light",color:yp(t===n),children:e||t+1})},e)))}):null,t?o(ke,{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]}))),Np=Ot((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(vp,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(bp,{activeTabIndex:r,items:m}),o(dp,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o($e,{size:"text-h6",children:"Данных нет"}),o(dp,{onClick:n,isOpen:!0})]})})),wp=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:h("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(Np,{...t,onClick:n})}):null]}))),kp=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[u,p]=l(void 0),g=i((e=>p(e)),[]);return c(wp,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ae,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o($e,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(cp,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(pp,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),Sp=({className:e,btnClass:t,canDec:n,canInc:l,dec:a,inc:i})=>n||l?c("div",{children:[n?o(pr,{className:h("absolute z-40",t[0],e),onClick:a}):null,l?o(gr,{className:h("absolute z-40",t[1],e),onClick:i}):null]}):null,Cp=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,Sp({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Ip=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],u=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[x,f]=((e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:p,visibleItemCount:2}),b=(u||[]).map(((e,t)=>o(kp,{row:e,activeIndex:x,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]],[N,{toggle:w}]=an(!1);return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?c(Oi,{children:[c(Cp,{controls:f,children:[y,o(Ei,{isUnfolded:N,children:v})]}),o(Ai,{className:"text-h4",isUnfolded:N,onClick:w})]}):o(Cp,{controls:f,children:b})})]})})),Tp=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:h("flex gap-s sm:gap-m group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?Bp():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o($e,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?Mp(n):null,a?o(De,{richVersion:i,__html:a}):null]})]}))),Bp=()=>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"}),Mp=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Pp=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o($e,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o($e,{size:"text-h2",children:n})}):null]}))),Vp=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Pp,{prefix:t,unit:n,suffix:l})})})),Rp={AdTile:Ft,ApplicationForm:Di,BankAccountFiltration:jr,BenefitsBlock:Fr,BonusBenefitsBlock:Hr,ButtonsBlock:Kr,CalculatorBonus:os,CalculatorBusinessDeposit:Cs,CalculatorCredit:Es,CalculatorDeposit:io,CalculatorRefinancing:po,CardTransfer:Vo,Carousel:Ao,CarouselCard:Uo,CarouselCatalogCard:Ho,CarouselLinks:qo,CarouselRecommendationCard:nc,CarouselTariffsCard:rc,DepositFiltration:mc,Depository:Tc,ErrorBlock:Mc,ExchangeRateTile:od,Footer:Sd,GrantSupport:Cd,Header:jd,Headline:C,HorizontalLayout:Ed,ImgBlock:Fd,LinkDocs:Jd,MobileAppTile:nm,MortgageFiltration:Sm,OfficesAtmsMap:Yh,Placeholder:Kh,ProductBlock:Et,ProductGallery:qh,RepresentativeOfficeInfo:Xh,RichTextBlock:Jh,RollupItem:eu,SafeDepositRental:ku,StepsBlock:Vu,StickyBottomMenu:Xu,TabsLayout:lp,TariffsTable:Ip,TextBlock:Tp,UnitBlock:Vp,VerticalLayout:Od},zp=me((()=>{a((()=>{tn()}),[]);const e=ln();gn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");Jt({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const Dp="cookie",_p=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=an();!function(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(Dp)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Dp,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(De,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(xi,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null}));function $p(e){const t=i((({key:t})=>{"Escape"===t&&e()}),[e]);gn(globalThis.document,"keydown",t)}const jp=d((()=>{const[e,{close:t}]=_u(),n=Boolean(e.length);return $p(t),a((()=>{n?globalThis.document?.body.classList.add("no-scrollbar","overflow-hidden"):globalThis.document?.body.classList.remove("no-scrollbar","overflow-hidden")}),[n]),n?o("div",{className:"fixed inset-0 z-50",children:e.map((({dialog:t,id:n},l)=>o("div",{className:h("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==e.length-1}),children:t},String(n||l))))}):null})),Lp=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);return Du(pe.observable,"popup",{open:t,close:n}),$p(n),e?o("div",{className:h("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",title:"Всплывающее окно",children:e.popup}):null})),Ap="header",Op="footer",Ep="sticky-footer",Fp={},Up=d((({className:e,data:t=Fp,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=Lt(s,r);zp(),Dc();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.[Ap]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(a?.[Ap],{...m,slotName:Ap})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[V({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(a?.[Op],{...m,slotName:Op})]})]}),a?.[Ep]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(a?.[Ep],{...m,slotName:Ep})}):null,o(jp,{}),o(Lp,{}),o(_p,{__html:d?.cookieContent?.__html})]})}));Object.assign(Up,{childrenTypes:[],slots:()=>[Ap,Op,Ep]});e.Blocks=Rp,e.ContentPage=Up,e.handlerDecorator=me,e.joinList=Sr,e.locationNavigator=Qt,e.packageVersion="0.14.773",e.projectSettings=D,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=O,e.useRouter=R,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:h("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),x=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:f(t)}))),f=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=v[n]||"h3";return o(i,{role:"heading",className:h("font-sans m-0",N[t],e),children:l||a})})),k=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=S[n],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(w,{className:h("whitespace-pre-wrap",i),...u?.title,as:r||u?.title.as,title:l}):null,a?o(k,{size:u.descriptionSize,font:u.descriptionWeight,align:i,...p,children:a}):null]})})),I=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),T=[];function B(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=I,blocksRegistry:r={},ancestors:s=T}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:h(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const M=[],P=(e,{key:t,ancestors:n=M,slotName:l=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||M,[r.parent,l]]:n},a)))};function V({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?P(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function R(){return R._impl()}R._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),R.setup=e=>{R._impl=e};const z=["CDN","BASE_PATH"],D=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return z.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),_=e=>Boolean(e?.includes(":")),$=(e,t)=>Boolean(e&&!_(e)&&(!t||"_self"===t)),j=e=>Boolean(e?.startsWith("#")),L=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),A=e=>t=>Boolean(e&&t&&e.startsWith(t)&&("/"===t||e===t||"/"===e[t.length]));var O=Object.freeze({__proto__:null,isURL:_,isLocalURL:$,isHash:j,withoutQuery:e=>(e??"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:L,hasPrefix:A});const E="/api/",F=`${E}v1/storage`,U=[D.CDN,E],W=e=>(t,n)=>{if(H(t))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${F}/${t}/attachment`;const l=t?.startsWith("/");return L(A(t)(n)?"":n,l?"/":(a=e.pathname,a?.split("/").slice(0,-1).join("/")),t);var a},H=e=>!e||_(e)||j(e)||U.some(A(e)),Y={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},K={small:"16",medium:"24",large:"48",xl:"78"},q=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",size:r,width:s=r&&K[r],height:d=s})=>{const m=R(),u="normal"===i?`${n}.svg`:`sprites.svg#${n}`,p=W(m)(L(D.CDN,"/icons/",u));return"normal"===i?o("img",{className:e,style:X(e,d),src:p,alt:l,title:a,"aria-hidden":"true",width:s,height:d}):o(G,{className:e,children:c("svg",{className:h(Y[i],{"w-full h-full":!s,invert:"white"===i},t),width:s,height:d,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:p,xlinkHref:p})]})})})),X=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},G=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Z=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function J(e=""){try{return new URL(e).pathname}catch(e){return""}}const Q=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":J(Z.SITE_URL);return t&&!_(t)?W(e)(t,n):t},ee=(e,t)=>e?.media&&t?.media?e.media-t.media:0,te=d((({className:e="",image:t,imageClassName:n=""})=>{const l=R();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(ee).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:Q(l)(e),type:le(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ne({...t,src:Q(l)(t.src)},n):null]})})),ne=(e,t="")=>o("img",{src:e.src,className:h("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),le=e=>e?`image/${String(e)}`:void 0,ae=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(q,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(te,{className:e,imageClassName:n,image:t}):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:n})=>[oe,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),me=e=>me._impl(e);function he(e,t){const n=s({});return r((()=>new Proxy({},{get:(l,a)=>(n.current||={},n.current[a]||=n=>e.fire(t,{...n??{},type:a}),n.current[a])})),[e,t])}me._impl=e=>e,me.setup=e=>{me._impl=e};class ue{watchers=new Set;subscribersMap={};subjectsStateMap={};emitter=this;observable=this;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}subscribe(e,t){this.subscribersMap[e]||=new Set,this.subscribersMap[e]?.add(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.subscribersMap[e]?.delete(t)}}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(e,t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t??void 0,this.fireSubscribers(e,t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){for(const n of this.subscribersMap[e]??[])n(t??null);for(const n of this.watchers)n({type:e,event:t??null})}}const pe=new ue,ge=()=>he(pe.emitter,"dialog");function xe(){const e=R(),{closeAll:t}=ge();return n=>{const l=W(e)(n.href);return{...n,href:l,"aria-label":n.text,onClick:me((a=>{n.onClick?.(a);const i=J(Z.SITE_URL);fe(l,n.target,i)&&(t(),a?.preventDefault(),e.push(((e,t="")=>e?.replace(t,"")||"/")(l,i)))}))}}}const fe=(e,t,n)=>$(e,t)&&!Z.SUB_PORTALS?.split(",")?.some(A(e))&&A(e)(n||"/"),be=e=>{try{return Array.isArray(e)&&e.length?{"data-aspects":JSON.stringify(e)}:{}}catch(e){return{}}},ye=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=Ne(e)&&"hidden lg:block";return c("div",{className:h(ve(e),"flex gap-xs"),children:[l?o("div",{className:h(r,ce[i]),children:l}):null,Ne(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(r,ce[i]),children:a}):null]})})),ve=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",Ne(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},Ne=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),we=({className:e,rounded:t,version:n})=>["inline-block",oe,n?se[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ke=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[e,t]))({method:n,href:l}),s=xe()({onClick:r,href:l,...a}),c=t??o(ye,{...s});return o(e?Ce:Se,{...s,children:c})})),Se=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:de({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...be(d),children:m}))),Ce=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:we({className:e,rounded:l,version:n}),children:a})));function Ie({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(de({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ae,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(ke,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const Te=()=>{const[e,t]=l(true);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Be={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Me=(e,{className:t,imageAlign:n})=>e?o("div",{className:h("shrink-1/2 justify-self-center",n&&Be[n],t),children:e}):null,Pe=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=Te(),v=R(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=x&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Ie({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Me(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[u,f]}),Re(V({...b,extraProps:{className:"@container-normal"}})),Me(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[Ve(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Ve=e=>h(e?"row-span-2":"@xl:row-span-2"),Re=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,ze=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ae,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((({__html:e="",richVersion:t="",itemSize:n="list-m",isDotted:l=!0,children:a})=>e||a?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(t,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",l?"":"without-dots"),dangerouslySetInnerHTML:e?{__html:e}:void 0,children:a})}):null)),_e=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,$e=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),je=(e,t)=>e?o($e,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Le=(e,t)=>["label"in e?je(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:_e(e.description,t)},String(t)):null,"__html"in e?o(De,{...e},`rte-${t}`):null],Ae=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?ze(n.icon,t):null,o("div",{children:Le(n)})]}))),Oe=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(Ae,{benefitsVersion:t,...e},String(n))))}):null)),Ee=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Le)}):null)),Fe=d((({isTabularBenefits:e,...t})=>o(e?Ee:Oe,{...t}))),Ue=e=>Boolean(e?.src||e?.icon),We=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(He(n))}):null,He=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Ye(a,r),d=Ye(i,r);return l||a?.icon?o(ke,{className:h("basis-full @lg:basis-auto",e),appendLeft:Ke({...a,iconVersion:c}),appendRight:Ke({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Ye=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Ke=e=>Ue(e)&&o(ae,{image:e,width:String(e?.size?.width||24),height:String(24)}),qe=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),Xe=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(Ge)}):null)),Ge=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o($e,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[qe(2)(t)," ",n||"₽"]}):null]},String(l)),Ze=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(Je)}):null)),Je=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o($e,{size:"text-m",font:"font-light",children:e})},String(t)),Qe={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},et=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:I,...T})=>{const B=y?.src?o(ae,{image:y}):null,M=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),P=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Pe,{className:e,padding:t,defaultPadding:n,...g?{title:M}:{insetTitle:M},...tt(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:We(b),backwardButton:S,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(Fe,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,u?o(De,{richVersion:p,__html:u,isDotted:m,itemSize:Qe[i]}):null,I,x?.length?o(Xe,{priceList:x}):null,nt(f)]})})})),tt=(e,t)=>t?{rightImage:e}:{leftImage:e},nt=e=>e?.length?o(Ze,{tags:e}):null;class lt{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof lt?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const at=()=>!0,it=(e,t)=>(...n)=>e(...n)&&t(...n),rt=(...e)=>(...t)=>{const[,n]=function(e){if(!e)throw new Error("Value should be fulfilled");return e}(e.find((([e])=>e(...t))));return n(...t)};const st=e=>Boolean(e&&Array.isArray(e)),ot=e=>Boolean(e&&"object"==typeof e&&!st(e)),ct=e=>e;function dt(e){return e instanceof lt?e._:e}class mt extends lt{from(e){return this.of(e.map(((e=ct)=>([,t])=>e(t))(dt)))}entries(){return(this._??[]).map(((e,t)=>[t,this.of(e)]))}size(){return this._?.length??0}get(e){return this.of("number"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of(st(this._)?Array.from({length:Math.max(this._.length,Number(e)+1)},((n,l)=>l===e?t:this._[l])):Array.from({length:Number(e)+1},((n,l)=>l===e?t:void 0)))}}class ht extends lt{from(){return this}entries(){return[]}size(){return 0}get(e){return this.of(void 0!==e?void 0:this._)}set(e,t){return this.of(t)}}class ut extends lt{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,dt(t)]))))}entries(){return Object.entries(this._??{}).map((([e,t])=>[e,this.of(t)]))}size(){return Object.keys(this._??{}).length}get(e){return this.of("string"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of({...this._,[e]:t})}}class pt extends lt{proto=rt([e=>st(this._)||"number"==typeof e,()=>mt.prototype],[e=>ot(this._)||"string"==typeof e,()=>ut.prototype],[at,()=>ht.prototype]);from(e){return this.proto(void 0).from.call(this,e)}entries(){return this.proto(void 0).entries.call(this)}size(){return this.proto(void 0).size.call(this)}get(e){return this.proto(e).get.call(this,e)}set(e,t){return this.proto(e).set.call(this,e,t)}}const gt=e=>e instanceof lt?e:new pt(e),xt=e=>{const t=(t,...n)=>dt(e(gt(t),...n));return t.fn=e,t},ft=[],bt=e=>e instanceof Function?e:t=>e===t,yt=e=>(t,n,l=ft)=>gt(t).entries().reduce(((t,[n,a])=>yt(e)(a,t,l.concat(n))),e(n,[l,gt(t)])),vt=xt(((e,[t,n])=>{const[l,...a]=t;return e.set(l,a.length?vt(e.get(l),[a,n]):n)})),Nt=xt(((e,t)=>t.reduce(vt.fn,e))),wt=e=>yt(((e,[t,n])=>kt(n)?[...e,[t,dt(n)]]:e))(e,[]),kt=e=>0===e.size();xt(((e,t=ft)=>t.reduce(((e,t)=>e.get(t)),e)));const St=xt(((e,[t,...n])=>n.length?e.set(t,St(e.get(t),n)):e.filter((([e])=>e!==t)))),Ct=(It=["$ref"]).map(((e,t)=>n=>bt(e)(n[t+n.length-It.length]))).reduceRight(it,at);var It;const Tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(Bt,e),Bt=rt([st,(e,t)=>e[parseInt(t,10)]],[ot,(e,t)=>e[t]],[at,ct]),Mt=(e,t)=>((e,t={})=>n=>Nt(t,wt(n).map((t=>e(t)))))((([e,n])=>{return Ct(e)?[(l=e,l.slice(0,-1)),Tt(t(n),n)]:[e,n];var l}))(e),Pt=e=>wt(e).filter(((e=ct)=>([t])=>e(t))(Ct)),Vt=e=>{return t=Pt(e).map((([,e])=>e)),[...new Set(t)];var t};async function Rt(e,t){try{return e?await zt(e,t):null}catch(e){console.error(e)}return null}const zt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),Dt=e=>[...new Set(e)],_t={},$t=["/portal-resources"],jt=(e,t)=>Mt(e,(e=>t?.[e])),Lt=(e,t)=>{const n=Vt(e),[i,r]=l({});return a((()=>{At(n).then(r)}),[n.join()]),n.length?jt(e,{...t,...i}):e},At=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(Dt(e).filter((e=>!$t.some((t=>e.startsWith(t))))).map((async e=>[e,_t[e]||=await zt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),l={...t,...n},a=Object.entries(n).flatMap((([,e])=>Vt(e)));return a.length?At(a,l):l}return t};function Ot(e,t={}){const n=d((t=>{const n=Lt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const Et=Ot((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(et,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),Ft=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>Ut(0,t?.length)),[t]),l=t?.[n];return l?o(Et,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(x,{})})})),Ut=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Wt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},Ht=e=>e?.replace(/[^+\d]/g,""),Yt="/api/v1";const Kt=e=>e?{phone:Ht(e)}:{},qt=(e,t="birthday")=>e?{[t]:Wt(e)}:{},Xt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Zt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Ht(e)}:{},Jt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e??[])t[l??""]?.(n,a)};function Qt(){return Qt._impl()}Qt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Qt.setup=e=>{Qt._impl=e};const en="rshb-query-params";function tn(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(en)||"";return e&&globalThis.sessionStorage?.setItem(en,e),e}const nn=e=>{const t=e.target?.closest("a"),n=Qt();if(_(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=tn();if(!_(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;l&&n.assign(l,t?.target)}};function ln(){return ln._impl()}function an(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}ln._impl=()=>({forwardQuery:nn}),ln.setup=e=>{ln._impl=e};const rn=e=>t=>t&&Object.entries(e??{}).flatMap((([e,n])=>n?n(t[e]):[]))||[],sn=e=>!e?.length,on=e=>t=>n=>e(n)?[]:[t],cn={},dn=[];const mn=(e,t)=>e&&t&&(e===t||Object.keys({...e,...t}).every((n=>e[n]===t[n])));function hn(e,{resetOnSubmit:t,formValidator:n,normalizer:o,onChange:c,onSubmit:d}={}){const[m,h]=function(e,t,n){const[r,s]=l(e),o=i((e=>s((l=>{const a=e instanceof Function?e(l):e,i=t?t(a):a,r=mn(a,i)?a:i;return!mn(l,r)&&n?.(r),r}))),[t,n]);return a((()=>{t&&s(t)}),[t]),[r,o]}(e,o,c),[u,{setTrue:p,setFalse:g}]=an(!1),x=s({}),[f,{isValid:b,errors:y}]=function(e,t){const n=r((()=>t?.(e)??cn),[t,e]),l=r((()=>rn(n)(e)??dn),[n,e]),a=sn(l);return[n,{isValid:a,errors:l}]}(m,n),v=i(((e,t={})=>{const{parse:n,format:l,onChange:a}=t,i=m[e],r=u||x.current?.[String(e)],s=t?.validator??f[e],o=r&&s?s(i):[];return{value:l?l(i):i,isDirty:r,errors:s&&o,error:o[0],onChange:t=>{x.current||={},x.current[String(e)]=!0;const l=n?n(t):t;a?.(l),h((t=>({...t,[e]:l})))}}}),[m,u,f,h]),N=i((e=>{x.current=e,h(e)}),[h]),w=i((()=>{x.current={},g(),h(e)}),[e,h]),k=i((e=>{e.preventDefault(),b?(t&&w(),d?.(m,e)):p()}),[t,m,b,w,d]);return[m,{errors:y,field:v,update:N,reset:w,onSubmit:k}]}const un=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container space-y-lg",children:[n?o(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})}));function pn(e,t={}){const{open:n,close:l,...a}=ge();return{open:i(((a,i={})=>n({dialog:o(e,{...t,...a,onClose:()=>{l(),a.onClose?.()}}),...i})),[e,n,l]),close:l,...a}}function gn(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function xn(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return gn(globalThis.document,"click",n),t}const fn=({label:e,errors:t})=>e&&t?`${e}*`:e,bn=()=>{},yn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",vn=e=>e?o($e,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Nn=d((({key:e,className:t,id:n,name:l,type:r="text",label:d,placeholder:m,value:u="",valid:p=!0,pattern:g,autoFocus:x=!1,isTextarea:f=!1,disabled:b=!1,children:y,onChange:v,onFocus:N,onBlur:w})=>{const k=s(null),S=i((e=>{const t=(e.target?.value??"").trimStart();v&&v(t)}),[v]);a((()=>{x&&k.current?.focus()}),[x,k]);const C=y?"pr-3xl":"",I=(e=>e?yn:"border-error")(p),T=d??l??n;return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[vn(d),f?o("textarea",{className:h("block resize-y min-h-24",wn,I),id:h("textarea",n),value:u,name:l||n,placeholder:m,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e):o("input",{ref:k,className:h("h-14",wn,C,I),id:n,type:r,value:u,name:l||n,placeholder:m,pattern:g,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e)]}),y]})})),wn="w-full border rounded-md text-primary-text outline-none p-m",kn=e=>o("div",{className:"h-6",children:e?o($e,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Sn=d((({className:e,label:t,value:n="",placeholder:l,error:r,errors:s,onChange:d=bn,onBlur:m,isTextarea:u,type:p,isInteger:g=!1,maxLength:x,disabled:f=!1})=>{const[b,{setFalse:y,setTrue:v}]=an(),N=xn(y),w=i((e=>{!b&&v(),x?e.length<=x&&d(e):d(e)}),[b,d]);return a((()=>{g&&n&&d(Cn(n))}),[n]),c("div",{className:h("shrink-0 w-full",e),ref:N,onBlur:y,onFocus:v,children:[o("div",{children:o(Nn,{disabled:f,type:p||"text","aria-label":t,label:fn({label:t,errors:s}),valid:Boolean(!r),value:n,onChange:w,onBlur:m,isTextarea:u,placeholder:In(l,s,t)})}),kn(r)]})})),Cn=(e="")=>e.replace(/[^\d]+/g,""),In=(e,t,n)=>t&&!n?`${e}*`:e,Tn=e=>e?.text||e?.key||"",Bn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Mn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:Bn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:Tn(e)}),o(q,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:h("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));function Pn({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=he(pe.emitter,"popup"),h=i((()=>{m.close(),c&&c()}),[c]),u=i((e=>{h(),r&&r(e)}),[h,r]),p=s(null),g=xn(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.open({popup:o(Mn,{popupRef:g,options:t,value:n,query:l,onChange:u,iconVersion:d}),top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,u]),p}const Vn=d((({className:e,label:t,options:n=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,disabled:u=!1,iconVersion:p="black",onChange:g})=>{const[x,{setFalse:f,setTrue:b}]=an(),[y,v]=l(""),N=Dn(u,n.length),w=x&&!N,k=i((()=>{N||b()}),[N]),S=i((()=>{v(""),f()}),[]),C=Pn({isOpen:x,options:n,value:a,query:y,onChange:g,onClose:S,iconVersion:p});return c("div",{className:h("space-y-xs",e),children:[vn(t),c("div",{className:h("relative",w?"z-20":"z-10"),ref:C,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",zn(s,r,N)),onClick:w?S:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Tn(a)||d}),Rn(w,p)]}),m&&w?o("div",{className:h("absolute top-0 w-full z-20"),children:o(Nn,{type:"text",value:y,autoFocus:!0,disabled:N,onChange:v})}):null]})]})})),Rn=(e,t)=>o(q,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),zn=(e,t,n)=>h(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Dn=(e,t)=>e||0===t,_n=d((({className:e="",label:t,error:n,errors:l,...a})=>c("div",{className:e,children:[o(Vn,{...a,valid:!n,label:fn({label:t,errors:l})}),kn(n)]}))),$n=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],jn=d((({field:e,input:t})=>o(_n,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:$n,...e(t?.name??"")}))),Ln=(e="")=>Boolean("trade"===e||"all"===e),An=e=>null!=e,On=new Map,En=(e,t=On)=>n=>{const l=Un(n),a=t.get(l);if(l&&An(a))return a;const i=e(...n);return l&&An(i)&&t.set(l,Promise.resolve(i)),i},Fn=e=>Boolean(e?.every((e=>Array.isArray(e)?Fn(e):!e||"string"==typeof e))),Un=e=>Fn(e)?e.toString():"",Wn=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function Hn(e,t,{fallback:n,cache:i}={}){const s=r((()=>Yn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(An))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await En(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=n&&Wn(s)&&n[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Yn(e){return Array.isArray(e)?e:e instanceof Function?Yn(e()):[e]}const Kn=`${Yt}/branches`,qn=[];const Xn=async e=>await Rt(e,{method:"GET"})||qn;function Gn(e=!1){const{data:t}=Hn(`${Yt}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,zt);return Array.isArray(t)?t:[]}const Zn=(e="")=>"ULTRASERVICE"===e,Jn=d((({field:e,input:t,params:n})=>{const l=Zn(n?.typeForm),i=e("region"),r=i?.value?.key,s=i?.value?.text,c=l?Gn(l)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=Hn(e?`${Kn}?regionCode=${e}`:null,Xn);return t||qn}(r)?.filter((e=>e?.address));return a((()=>{""!==i?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[i?.value]),o(_n,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...e(t?.name??""),isSearch:!0})})),Qn=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},el=(e,t,n)=>Math.max(t,Math.min(e,n));function tl(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function nl({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:i,onChange:t=>{const n=tl(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const ll=1,al=100,il=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:ll),max:s=(a.length?a.length-1:al),step:d=1,value:m=a[0]||r,disabled:u=!1,onChange:p}=e,g=Qn(e,{normalize:(e=0)=>a.length?rl(a)(e):el(e,r,s),format:qe()}),x=i((e=>{p&&p(tl(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o($e,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",yn,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:x,...g}),nl({list:a,min:r,max:s,step:d,disabled:u,value:m,onChange:p})]}),sl(l)]})})),rl=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),sl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o($e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),ol=["От 1 000 ₽","До 1 000 000 000 ₽"],cl=d((({field:e,input:t})=>o(il,{title:"Сумма, ₽",items:ol,min:1e3,max:1e9,...e(t?.name??"")}))),dl=d((({field:e,input:t})=>o(Sn,{label:"Годовая выручка, ₽",...e(t?.name??"")}))),ml="client",hl=[{key:ml,text:"Клиент"},{key:"representative",text:"Представитель клиента"}],ul=d((({field:e,input:t})=>o(_n,{label:"Тип обратившегося",...t,options:hl,...e("applierType")}))),pl=d((({field:e,input:t})=>o(Sn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e(t?.name??"")}))),gl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>n)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=xl(t,e),c=fl(t,i,r);h.push(o("td",{children:o("div",{className:bl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},xl=(e,t)=>t&&e.toDateString()===t.toDateString(),fl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),bl=(e=!1,t=!1)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),yl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],vl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:i=bn})=>{const{firstDayOfWeek:s,totalDays:d}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:yl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:gl({firstDayOfWeek:s,today:e,totalDays:d,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:i})})]})})),Nl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];const wl=e=>"_"===e,kl=e=>/\d/.test(e),Sl=e=>wl(e)||kl(e),Cl=1940,Il={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Tl=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:i,disabled:r,onChange:d,onClick:m})=>{const u=s(null),[p,g]=l(i||"");return a((()=>{g(i||"")}),[i]),a((()=>{Ml({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d})}),[p]),c("div",{onClick:()=>{null!==u.current&&u.current.focus(),m?.()},className:h("relative",n),children:[o("input",{ref:u,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(function(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const l=[...t],a=l.findIndex(wl),i=l.map(((e,t)=>Sl(e)?l.slice(0,t).filter(Sl).length:-1)),r=l.map(((e,t)=>kl(e)?e:n.charAt(i[t])||e)),s=i.indexOf(n.length-1)+1;return r.slice(0,Math.max(a,s)).join("")}(t,"__.__.____"))},onBlur:()=>{Bl(p)?Ml({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(i||"")},disabled:r}),r?null:o(q,{className:"mr-s",...Il})]})})),Bl=e=>{const[t,n,l]=e.split(".");if((e=>Number(e)>=Cl&&Number(e)<=(new Date).getFullYear())(l)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(l),Number(n)-1,1);let a=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),a++;return Number(t)>0&&Number(t)<=a}return!1},Ml=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:l})=>{if(Bl(e)){const{day:a,month:i,year:r}=(e=>{const[t,n,l]=e.split(".");return{day:Number(t),month:Number(n)-1,year:Number(l)}})(e);t(i),n(r),l?.(new Date(r,i,a))}},Pl=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:l,setSelectedMonth:a,setSelectedYear:i,disabled:r=!1})=>o(Tl,{onChange:l,disabled:r,onClick:e,value:t&&Wt(t),setSelectedMonth:a,setSelectedYear:i,className:h("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),Vl=Nl.map((e=>({key:e}))),Rl=Array.from({length:(new Date).getFullYear()-Cl+1},((e,t)=>Cl+t)).reverse().map((e=>({key:String(e)}))),zl=(e,t)=>{const n=new Date(e,t,1);let l=0;for(;n.getMonth()===t;)l++,n.setDate(n.getDate()+1);return l},Dl=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:l,onChange:a})=>{l&&a?.(new Date(t,n,Math.min(e,l.getDate())))},_l={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},$l={className:"min-w-32",iconVersion:"black",isBorder:!1},jl=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:u})=>{const[p,{setValue:g,setFalse:x}]=an(!1),[f,b]=l(n?.getMonth()||(new Date).getMonth()),[y,v]=l(n?.getFullYear()??(new Date).getFullYear()),N=i((e=>{u?.(e),x()}),[u]),{handlePrevMonth:w,handleNextMonth:k,handleSelectMonth:S,handleSelectYear:C,monthsOptions:I,yearsOptions:T,handleChangeVisibleCalendar:B,ref:M}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r,onChange:s,value:o})=>{const c=xn(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>{l(Nl.indexOf(e));const t=zl(r,Nl.indexOf(e));Dl({maxDateOfMonth:t,selectedYear:r,selectedMonth:Nl.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:i((({key:e})=>{a(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:Vl,yearsOptions:Rl,ref:c}})({onYearSelect:v,onMonthSelect:b,onShowCalendar:g,selectedYear:y,selectedMonth:f,showCalendar:p,onChange:u,value:n}),P=((e,t)=>{const[n,i]=l(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();i(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(M,370);return c("div",{className:h("space-y-xs",e),ref:M,children:[vn(t),c("div",{className:"relative",children:[Pl({handleChangeVisibleCalendar:B,value:n,valid:r,onChange:u,disabled:m,setSelectedMonth:b,setSelectedYear:v}),p&&!m?c("div",{className:h("absolute bg-white z-20 select-none",{"bottom-full":P}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:w,children:o(q,{..._l,className:"-rotate-90 cursor-pointer"})}),o(Vn,{onChange:S,value:{key:Nl[f]},options:I,...$l}),o(Vn,{onChange:C,value:{key:String(y)},options:T,...$l}),o("div",{className:"my-auto",onClick:k,children:o(q,{..._l,className:"rotate-90 cursor-pointer"})})]}),o(vl,{today:n,currentMonth:f,currentYear:y,min:s,max:d,onDateSelect:N})]}):null]})]})})),Ll=d((({className:e,label:t,error:n,errors:l,...a})=>c("div",{className:h("shrink-0 w-full",e),children:[o(jl,{label:fn({label:t,errors:l}),valid:Boolean(!n),...a}),kn(n)]}))),Al=d((({field:e,input:t})=>o(Ll,{label:t?.label||"Дата рождения",...e(t?.name??"")}))),Ol=d((({field:e,input:t})=>o(Sn,{label:"Количество объектов инкассации",isInteger:!0,...e(t?.name??"")}))),El=d((({field:e,input:t})=>o(Sn,{className:"col-span-2",...e(t?.name??""),placeholder:"Ваше сообщение",isTextarea:!0}))),Fl=d((({field:e,input:t})=>o(Ll,{label:"Желаемая дата встречи",...e(t?.name??"")}))),Ul=d((({field:e,input:t})=>o(Sn,{label:"Электронная почта",...e(t?.name??""),...t}))),Wl=[{key:"ULTRASERVICE",text:"Ультра"}],Hl=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Yl=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Kl=d((({field:e,input:t})=>o(_n,{label:"Способ получения ответа",options:Yl,...e(t?.name??"")}))),ql=d((({field:e,input:t})=>o(Sn,{label:"ФИО",...e(t?.name??""),...t}))),Xl=d((({field:e,input:t})=>o(Sn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??"")}))),Gl=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Zl="appearance-none w-5 h-5 border-solid flex-none",Jl=[{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"}],Ql=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Gl,{paths:Jl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:h("flex items-center relative group/box",ta(l)),onClick:s,children:[o("div",{className:h(Zl,"m-0",a?"rounded-full border-2":la(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:na(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,ea(n)]})})})),ea=e=>e?o("div",{className:"ml-s",children:o($e,{size:"text-l",font:"font-light",children:e})}):null,ta=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",na=(e=!1)=>e?"radio":"checkbox",la=(e=!1)=>h("rounded border",{"bg-primary-main":e}),aa=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:h("shrink-0",e),children:[o(Ql,{text:t,value:n,disabled:a,onChange:r},l),kn(i)]}))),ia=d((({field:e,input:t})=>o(aa,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),ra=`${Yt}/outservice`,sa=[];async function oa(){const e=await Rt(`${ra}/outserviceregions`);return e&&Array.isArray(e)?e:sa}const ca=d((({field:e,input:t})=>{const n=e("region"),l=n?.value?.key,{data:i}=Hn("outServiceRegions",oa),s=r((()=>i?.find((e=>e.code===l))?.localities?.map((e=>({key:e,text:e})))),[i,l]);return a((()=>{""!==l&&e?.(t?.name??"")?.onChange?.("")}),[l,t?.name??""]),o(_n,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:s,...e(t?.name??""),isSearch:!0})})),da=d((({field:e,input:t})=>o(Sn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,...e(t?.name??""),...t}))),ma=d((({field:e,input:t})=>o(Sn,{label:"Имя",maxLength:60,...e(t?.name??""),...t}))),ha=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:h("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o($e,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),ua=d((({field:e,input:t})=>Ln(e("acquiringType")?.value?.key)?o(ha,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),pa=d((({field:e,input:t})=>o(Sn,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),ga=e=>"_"===e,xa=e=>/\d/.test(e),fa=e=>ga(e)||xa(e),ba=[..."+7 (___) ___-__-__"],ya=ba.findIndex(ga),va=ba.map(((e,t)=>fa(e)?ba.slice(0,t).filter(fa).length:-1));const Na=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=ba.map(((e,n)=>xa(e)?e:t.charAt(va[n])||e)),l=va.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(ya,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(Nn,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),wa=d((({className:e,label:t,error:n,...l})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Na,{"aria-label":t,label:fn({label:t,errors:l?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...l}),kn(n)]}))),ka=d((({field:e,input:t})=>o(wa,{label:"Телефон",...e(t?.name||"phone"),...t}))),Sa=d((({field:e})=>Ln(e("acquiringType")?.value?.key)?o(ha,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Ca=Ot((({field:e,input:t,source:n})=>o(_n,{placeholder:"Выберите продукт",label:"Продукт",options:Ia(n?.productList),...e(t?.name??"")}))),Ia=e=>(e??[]).map((e=>({key:e,value:e}))),Ta=`${Yt}/regions`,Ba=[];function Ma(e=Ta){const{data:t}=Hn(e,zt);return Array.isArray(t)?t:Ba}const Pa=`${Yt}/outservice/outserviceregions`,Va=d((({field:e,input:t,params:n})=>{var l;const a=Ma((l=n?.typeForm,"OUTSERVICE"===l?Pa:void 0));return o(_n,{label:t?.label||"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>a?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[a]),...e(t?.name??"")})})),Ra=d((({field:e,input:t})=>{const n=Gn(!0),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(_n,{label:"Регион",placeholder:"Выберите регион",options:l,...e(t?.name??"")})})),za=d((({field:e,input:t})=>o(Sn,{label:"ФИО представителя",...t,...e("representativeName")}))),Da=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},_a=/^[\u0400-\u04FF\d\s]+$/u,$a=on((e=>null!=e&&""!==e)),ja="Некорректно заполненное поле",La=e=>$a(e??ja),Aa=e=>on((e=>e?.key&&""!==e?.key))(e??ja),Oa=e=>on((e=>"string"==typeof e&&e.length>1&&((e="")=>_a.test(e))(e)))(e??ja),Ea=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),Fa=e=>on(Ea)(e),Ua=on((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Wa={fullName:La(),addressBranch:Aa(),desiredMeetingDate:La(),product:La(),localities:La(),partnerComments:La(),collectionCount:La(),acquiringType:Aa(),serviceType:Aa(),annualRevenue:La(),feedbackMethod:Aa(),serviceDirection:Aa(),secondaryPhone:Fa("Укажите номер телефона"),region:Aa(),situationDescription:La(),sufferedFrom:La(),applierType:La(),surname:Oa("Укажите свою фамилию на кириллице"),name:Oa("Укажите своё имя на кириллице"),middleName:Oa("Укажите своё отчество на кириллице"),birthday:La("Укажите дату рождения"),phone:Fa("Укажите номер телефона"),email:(Ha="Укажите электронную почту",on((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(Ha)),inn:(e=>on((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:La(),typeForm:La(),consentToReceiveMaterials:Ua,consentDataProcessing:Ua};var Ha;const Ya=(e={})=>({name:t})=>Boolean(e[t??""]),Ka=e=>t=>!t?.condition||t.condition.values.find((n=>{const l=e?.[t?.condition?.name??""];return n===(l?.key??l)})),qa=d((({field:e})=>{const t=e("secondaryPhone");return o(wa,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Da(t,Wa.secondaryPhone):t})})),Xa=d((({field:e,input:t})=>o(_n,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Hl,...e(t?.name??"")}))),Ga=d((({field:e,input:t})=>o(Sn,{label:"Описание ситуации",...t,...e("situationDescription")}))),Za=[{key:"blg",text:"Белгородской области"},{key:"brnsk",text:"Брянской области"},{key:"krsk",text:"Курской области"},{key:"chs",text:"От стихийного бедствия ЧС"}],Ja=d((({field:e,input:t})=>o(_n,{label:"Пострадал в",...t,options:Za,...e("sufferedFrom")}))),Qa=d((({field:e,input:t})=>o(Sn,{label:"Фамилия",maxLength:60,...e(t?.name??""),...t}))),ei=["От 1 мес","До 15 лет"],ti=d((({field:e})=>o(il,{title:"Срок, месяцев",items:ei,min:1,max:180,...e("term")}))),ni=d((({field:e,input:t})=>o(_n,{label:"Тип обслуживания",options:Wl,...e(t?.name??"")}))),li={horizontal:"@lg:flex-row",vertical:""},ai=d((({label:e,items:t,value:n,className:l,disabled:a=!1,orientation:i="horizontal",onChange:r})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o($e,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:h("flex flex-col gap-s",li[i],l),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Ql,{isRadio:!0,text:t,value:n===e,onChange:()=>r?.(e),disabled:a},String(e))))})]}))),ii=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],ri=d((({field:e,input:t})=>{const n=i((t=>{"currencyControl"!==t&&(e("inn").onChange?.(""),e("region").onChange?.(""))}),[]);return o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(ai,{className:"whitespace-normal",orientation:"horizontal",items:ii,...e(t?.name??"",{onChange:n})})})})),si=d((({field:e,input:t})=>o(Ql,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...e(t?.name??"")})));const oi={$ref:"/wcms-resources/outservice-productlist.json"},ci={fullName:ql,addressBranch:Jn,desiredMeetingDate:Fl,product:e=>o(Ca,{...e,source:oi}),localities:ca,isClient:ia,partnerComments:pa,collectionCount:Ol,acquiringType:jn,onlineCheckout:ua,posTerminal:Sa,serviceType:ni,term:ti,amount:cl,annualRevenue:dl,vedTypes:ri,feedbackMethod:Kl,serviceDirection:Xa,bankEmpolee:pl,secondaryPhone:qa,applicationDate:e=>o(Sn,{label:"Дата и время обращения в Банк",...e}),region:e=>Zn(e?.params?.typeForm)?o(Ra,{...e}):o(Va,{...e}),consentToReceiveMaterials:si,sufferedFrom:Ja,situationDescription:Ga,representativeName:za,applierType:ul,surname:Qa,name:ma,middleName:da,birthday:Al,phone:ka,email:Ul,inn:Xl,comment:El},di=(e,t,n={})=>(l,a)=>{const i={...ci,...n}[String(l.name)];return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:l,field:e})&&i?o("div",{children:o(i,{field:e,input:l,params:t})},a):null},mi=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o($e,{size:"text-h6",children:e})}):null,hi={primary:h("text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:h("text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","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")},ui=h("group/btn-embedded","bg-transparent border border-transparent outline-none"),pi=h("bg-main-gray text-main-disabled cursor-not-allowed"),gi=d((({className:e,type:t="button",version:n="primary",shape:l="default",embedded:a,disabled:s,role:c,ariaLabel:d,data:m,dataTheme:u,children:p,onClick:g=bn})=>{const x=i("tab"!==c?me(g):g,[c,g]),f=r((()=>be(m)),[m]),b="round"===l;return o("button",{className:h("font-sans flex items-center gap-xs",{[hi[n]]:!s&&!a,[ui]:a,[pi]:s},a?"justify-between":"justify-center",a||b?"p-0":"px-9 py-4",{"rounded-md":"default"===l,"rounded-full":b},e),type:t,role:c,"aria-label":d,disabled:s,"aria-disabled":s?"true":void 0,"data-theme":u,...f,onClick:x,children:p})})),xi=d((({className:e,onClose:t})=>o("button",{className:h("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(q,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),fi=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>c("div",{className:h("relative bg-white pt-0 p-lg",e),role:"dialog",title:"Диалог",onClick:a,children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(xi,{className:"absolute top-0 right-0",onClose:l}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),bi=d((({ok:e,typeForm:t,onClose:n})=>{const l="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(fi,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ae,{image:{icon:e?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?l:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(gi,{type:"button",onClick:n,children:"Хорошо"})]})})})),yi=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,inn:d,sufferedFrom:m,situationDescription:h,applierType:u,...p}=e,g=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Ln(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,x={...p,...ki(o),...wi(c),...d&&{inn:d},...g?{partnerComments:g}:{},...s?{typeForm:s}:{},...Ni(m?.text,h),...vi(u)};return Object.fromEntries(Object.entries(x)?.map((([e,t])=>[e,t?.key||t])))},vi=e=>e?.key?{isClient:e?.key===ml}:{},Ni=(e,t)=>e||t?{comment:`${e||""};${t||""}`}:{},wi=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},ki=e=>e?{vedTypes:Object.fromEntries(ii.map((({id:t})=>[t,t===e])))}:{},Si={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:$n[0],serviceType:Wl[0],feedbackMethod:Yl[0],serviceDirection:Hl[0],vedTypes:ii[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},Ci=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"vedTypes"===e?.name&&e?.defaultValue||Si[e.name||""]]))),typeForm:{key:t,text:""}}),Ii=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0,size:l="big"})=>o("div",{className:h("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:h("inline-block","animate-spin rounded-full","border-solid border-current","border-r-transparent","small"===l?"border-4 h-8 w-8":"border-8 h-28 w-28",e),role:"status"})}))),Ti=d((({isLoading:e,disabled:t,children:n,className:l,...a})=>c(gi,{type:"submit",className:h("relative",l),disabled:e||t,...a,children:[e?o(Ii,{blur:!0,size:"small"}):null,n]}))),Bi={primary:hi.primary,secondary:hi.secondary,white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",gray:hi.secondary,transparent:"","":""},Mi=d((e=>{const t=xe(),{className:n,href:l,target:a,text:i,aboveText:r,version:s="link",rel:c,ariaLabel:d,data:m,children:u,onClick:p}=t(e),g="link"!==s;return o("a",{className:h("group/btn inline-flex items-center h-fit","font-sans no-underline select-none","border border-transparent focus:border-primary-text focus:border","cursor-pointer",{[Bi[s]]:Boolean(s),[r?"px-9 py-2.5":"px-9 py-4"]:g,"rounded-md":g},n),href:l,target:a,rel:c,"aria-label":d??`Ссылка на ${i}`,role:l?"link":"button",onClick:p,...be(m),children:u??Pi(i,r)})})),Pi=(e,t)=>e||t?c("div",{className:"whitespace-pre",children:[t?o("div",{className:"font-light text-left text-xs",children:t}):null,o("div",{className:h("text-left",{"text-s -mt-3xs":Boolean(t)}),children:e})]}):null,Vi=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o($e,{children:e}):null,t?o(Mi,{...t,ariaLabel:"условия передачи данных",children:t.text}):null]}))),Ri=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Ql,{...e}),o(Vi,{link:t})]}),kn(Da(e,Ua).error)]}):o(Vi,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),o(Ti,{className:"w-full @xl:w-auto",children:n?.text?n.text:"Отправить заявку"})]}),zi={send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=`${Yt}${g?"/lead":"/sendcorporatelead"}`,f={typeForm:n,...Xt(l,g),...Gt(i,g),...Kt(a),...qt(s,"desiredMeetingDate"),...g?qt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...Zt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},Di=d((({className:e,title:t,typeForm:n="",sections:l=[],button:a,link:s,endpoint:d,additionalParams:m,isContacts:u,data:p,...g})=>{const x=r((()=>l?.flatMap((e=>e?.inputs))||[]),[l]),f=r((()=>Ci(x,n)),[x,n]),b=r((()=>((e,t={})=>{const n=e.filter((e=>Boolean(e?.required&&e?.name))),l={...Wa,...t},a=n.some((e=>e.condition?.values)),i=Object.fromEntries(n.filter(Ya(l)).map((({name:e})=>[e,l[e??""]])));return e=>a?Object.fromEntries(n.filter(Ya(l)).filter(Ka(e)).map((({name:e})=>[e,l[e??""]]))):i})(x)),[x]),y=pn(bi),v=ln(),N=i((async(e,t)=>{const l=yi({...e,...m}),a=Boolean(await zi.send(l,"lead"===d));y.open({ok:a,typeForm:n}),a&&Jt({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:k,onSubmit:S}]=hn(f,{resetOnSubmit:!0,formValidator:b,onSubmit:N}),C=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return c(un,{className:h("container space-y-m",e),title:t,...g,children:[c("form",{onSubmit:S,children:[l.map(((e,t)=>{return c("div",{className:h((l=e.columns,2===l?"@xl:grid-cols-2":""),"grid gap-x-m"),children:[mi(e.title),(e?.inputs||[])?.map(di(k,{typeForm:n}))]},`section-${t}`);var l})),Ri(C?k("consentDataProcessing"):void 0,s,a)]}),u?c("div",{className:"space-y-m",children:[o(w,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ae,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ae,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),_i=d((({title:e,description:t})=>{const n=Te();return 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(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),$i=e=>e%2!=0,ji=d((({className:e,children:t})=>o("span",{className:h("inline-flex items-center text-start gap-s group-[]/btn-embedded:text-primary-main",e),children:t}))),Li=d((({isUnfolded:e,...t})=>o(q,{name:e?"ArrowUpIcon":"ArrowDownIcon",size:"small",iconVersion:"",...t}))),Ai=d((({className:e,isUnfolded:t,short:n,label:l=(t?"Скрыть":"Развернуть"),embedded:a,...i})=>c(gi,{className:h({"w-full":!n},e),embedded:a,shape:n?"default":"square",role:"tab","aria-label":"Кнопка сворачивающейся секции",...i,children:[o(ji,{children:l}),o(Li,{isUnfolded:t,iconVersion:a?"color":""})]}))),Oi=d((({className:e,role:t="tablist",children:n})=>o("div",{className:h(e),role:t,children:n})));const Ei=d((({className:e,isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:h("transition-max-h duration-300 overflow-hidden",{"max-h-0":Boolean(l.current||!t)}),role:"tabpanel","aria-label":"Сворачивающаяся секция",children:o("div",{className:e,ref:i,children:n})})})),Fi="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Ui=d((({topItemsCount:e=0,label:t,block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]],[s,{toggle:d}]=an(!1);return c("div",{className:h("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:h(Fi),children:[P(i,{...a.options,parent:n}),$i(i.length)?o(Ft,{className:"col-span-6",...a}):null]}),c(Oi,{children:[c(Ei,{className:h(Fi),isUnfolded:s,children:[P(r,{...a.options,parent:n}),$i(r.length)?o(Ft,{className:"col-span-6",...a}):null]}),o(Ai,{className:h("text-h4",{hidden:e<1}),label:t,isUnfolded:s,disabled:!r?.length,dataTheme:a.options?.page?.colorPalette,onClick:d})]})]})})),Wi=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Hi=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Yi=10;function Ki(e=0){const t=Math.round(e*Yi);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const qi=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:c,children:d,onIntersection:m})=>{const u=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:Ki(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}(i((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:u,role:"listitem",children:d})})),Xi=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Gi=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),x&&x(Ji(n))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Zi(c,v):{},...N?Hi(u):{},gap:`${r}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(qi,{className:h(m,a?Xi[a-1]:"",{"h-full":N},t),style:w?Zi(c/4):{},activeIndex:l,idx:n,observerOptions:f,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Zi=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Ji=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Qi={"horizontal-list":"w-6","vertical-list":"h-6"},er=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?Qi[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),tr=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:h("text-secondary-text font-light",s),children:n?.description})]},String(l))},nr=e=>e,lr=(e=nr)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),ar=lr(),ir=(e=nr)=>lr((t=>-e(t))),rr=ir(),sr=e=>t=>e.scrollWidth/t,or=e=>(t,n)=>{e.scrollBy({left:n*sr(e)(t),behavior:"smooth"})},cr=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[ir()(a),lr()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;n.current&&(m?or(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(h?or(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},dr={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},mr=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=Te(),[u,p]=cr({itemCount:s.length}),g=hr(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const x=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Gi,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(tr({activeIndex:t,onClick:x}))}):n?o("div",{className:h("flex gap-xs",dr[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(er({activeIndex:t,onClick:x,listType:l}))}):null})),hr=(e=!1)=>({behavior:e?"auto":"smooth"}),ur=d((({className:e,name:t,...n})=>o(gi,{className:h("w-12 h-12 min-w-12 min-h-12",e),shape:"round",...n,children:o(q,{name:t,iconVersion:"",size:"small"})}))),pr=d((e=>o(ur,{name:"ArrowLeftIcon",version:"secondary",ariaLabel:"Пролистать влево",...e}))),gr=d((e=>o(ur,{name:"ArrowRightIcon",version:"secondary",ariaLabel:"Пролистать вправо",...e}))),xr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",fr=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?br(t):null,i?o(pr,{className:h(yr(a),m?"left-1":"left-0"),onClick:s}):null,r?o(gr,{className:h(yr(a),m?"right-1":"right-0"),onClick:d}):null]})})),br=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(xr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(xr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),yr=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),vr=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:x,navButtons:f})=>{const b=Array.isArray(g)?g.length:0,[y,v]=cr({itemCount:b,onVisibleIndicesChange:x}),[N]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===i?"relative h-full":""),children:[o(Gi,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(fr,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(mr,{className:h(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),Nr=({blocksToRender:e,...t})=>o(vr,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:h("relative min-w-80",Wi(!0)),children:B(e,t)},String(n))})}),wr=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[kr(n,t),o(Ui,{...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[kr(n,t),Nr({...l,blocksToRender:t})]});default:return null}})),kr=(e,t)=>e&&!t.length?o(_i,{...e}):null,Sr=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),Cr=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(ha,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),Ir=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,Sr(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Tr(l)).filter(Boolean))]}),n?o("div",{children:o(gi,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),Tr=e=>([t,n])=>{const l=n?.type;return"array"===l?Br(t,e)(n):null},Br=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o($e,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(Cr,{items:l,multiple:!n?.single,...t(e)})]},e)},Mr=e=>e;function Pr(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Vr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Rr=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Vr(t[e])||Vr(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Vr(t[e])||Vr(n[e])||zr(t[e])<=zr(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Vr(t[e])||Vr(n[e])||zr(t[e]?.min)>=zr(n[e]?.min)&&zr(t[e]?.min)<=zr(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Vr(t[e])||Vr(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Vr(t[e])||Vr(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),zr=e=>Number(e||0),Dr=(e,{block:t,page:n,normalize:l=Mr})=>{const a=t?.blocks||[],[i,s]=hn(e),o=r((()=>Pr(a,a.map((e=>jt(e.content,n?.fallback))))),[a,n?.fallback]),c=i===e?a:((e,t)=>(n=Mr)=>e?.filter((([,e])=>Rr(t,n(e)||{}))).map((([e])=>e)))(o,i)(l);return[i,{blocksToRender:c,blocksWithProps:o},s]},_r={},$r={},jr=Ot((({className:e,filtrationSchema:t=_r,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Dr($r,{block:a.block,page:a.options?.page}),d=o(Vn,{className:"w-64",label:n?.title,options:Lr(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Lr(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Ir,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(gi,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(wr,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Lr=e=>Pr(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Ar=(e=!1)=>e?"text-left":"text-center",Or={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Er=d((({className:e,iconBgVersion:t="primary",size:n,icon:l,...a})=>{const i=`${n?.width??44}px`;return l?o("div",{className:h("rounded-icon object-fit flex justify-center items-center",Or[t],e),style:{width:i,height:i},role:"figure",children:o(q,{name:l,width:"54%",...a})}):null})),Fr=d((({className:e="",title:t,benefitList:n,...l})=>{const a=Te();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(w,{headingType:"h3",as:"h2",className:Ar(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Ur)}):null]})})),Ur=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(Er,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ae,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(w,{headingType:"h6",children:e}),o($e,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(De,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),Wr=(e,t,n)=>{return o(vr,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>c("div",{className:h("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o($e,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?o(ae,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o($e,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},Hr=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:h("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Wr(e,0,t):null]}))),Yr={start:"justify-start",center:"justify-center",end:"justify-end"},Kr=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&h("flex",Yr[n]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:We(e)})})),qr=d((({className:e,title:t,children:n,...l})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(w,{className:"text-center",title:t}):null,n]}))),Xr="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",Gr="flex flex-col lg:w-1/2 gap-2xl",Zr="flex flex-col gap-y-xl min-w-52",Jr=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o($e,{size:"text-h3",children:"number"==typeof e?[l,qe(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),Qr=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o($e,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(Jr,{value:n,...a}):o($e,{size:"text-h3",children:"-"})]}))),es=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,ts=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o($e,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:qe(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),ns=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o($e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(q,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),ls=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,color:a="text-secondary-text",children:i,...r})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o(ts,{title:e,rate:t,unit:n,fractionDigits:l,color:a,...r})}),o(Qr,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:a,...r}),i]}):o(ns,{title:e,...r}),as=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(il,{items:e?[`От ${qe(1)(l.min||0)} ${n}`,`До ${qe(1)(l.max||0)} ${n}`]:[],step:t,...l}),is={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},rs={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ss=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=is.prefMonthsNum,prefTravelBonusRate:i=is.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||rs,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},os=Ot((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=hn({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:x}=ss(r,n);return o(qr,{className:e,title:t,...i,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[as({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),as({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?ls({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:Zr,children:[x>=0?o(Qr,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,We(l,{isVertical:!0}),es(a)]})]})})})),cs=Math.round(29.5),ds=(e,t=0)=>e?.sum?e.sum:t,ms=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,hs=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,us=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o($e,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o($e,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(ai,{orientation:l,items:e,value:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),ps=e=>us({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),gs=" (c капитализацией)",xs=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:Zr,children:[o(Qr,{title:`Доход в конце срока${i?gs:""}`,value:e,postfix:n,prefix:"+"}),o(Qr,{title:`Сумма в конце срока${i?gs:""}`,value:t,postfix:n}),We(l,{isVertical:!0}),a?.map(es)]}),fs=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:bs([e,t],l),bs=([e,t],n=[])=>({[e]:n.length?rr(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?ar(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ys=(e,[t,n],l)=>e>=l[t]&&e<=l[n],vs={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Ns={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},ws=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?vs[e?.rateType]:"",{data:n}=Hn(t?`${Yt}/depositrates/${t}`:null,zt);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&ks(s,e)&&ys(l,["minSum","maxSum"],e)&&ys(n,["minDays","maxDays"],e)))||Ns,{rate:m}=d,h=Ss(m,e),u=l+h,p=c||[Ns];return{...d,...bs(["minSum","maxSum"],p),...bs(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},ks=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ss=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},Cs=Ot((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:u}]=hn({moneyValue:ds(r,1e5),daysValue:ms(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=ws(m,s),{income:g,finalSum:x,rate:f,depositeName:b}=p;return o(qr,{className:e,title:t,...d,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[as({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(il,{items:[`От ${hs(y.min||0)}`,`До ${hs(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Is(p,u),ps({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),ls({rate:f,depositeName:b,isShowDepositeName:i}),xs({income:g,finalSum:x,buttons:n,footnotes:[l,a]})]})});var y})),Is=(e,t)=>c("div",{className:"space-y-s",children:[o($e,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Ql,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Ql,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Ts=e=>Ms([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],e),Bs=(e=[],t=!1)=>Ms([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Ms=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Ps=({min:e=0,max:t=0,availableMonths:n,...l})=>o(il,{items:[`От ${Vs(e)}`,`До ${Vs(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),Vs=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Rs=e=>us({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),zs=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(el(t?.[a],n.minMonths,n.maxMonths))},Ds=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},_s={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},$s=e=>js({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&js({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&js({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&js({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),js=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Ls=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[_s],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>$s({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=fs(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=fs(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>$s({row:e,userInputParams:t,paramsViewSettings:n})&&ys(l,["minSum","maxSum"],e)&&ys(a,["minMonths","maxMonths"],e)))||_s)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:h}=m,u=Ds(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:u}},As=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Os={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Es=Ot((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const u=Ts(n?.rateRows),[p,{field:g}]=hn({moneyValue:ds(s,2e5),monthsValue:ms(s,cs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),x=Ls(p,n,r),f=Rs({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(el(p.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(el(p.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!As(s)&&u&&zs({field:g,defParams:u,calcParams:x,map:Os,monthsValue:"minMonths"})}),[n,s]),o(qr,{className:e,title:t,...m,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[as({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),Ps({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),Fs({...x,...r},g),o("div",{className:"sm:hidden",children:f})]}),c("div",{className:h(Zr,"@4xl:w-1/2"),children:[o(Qr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Qr,{title:"Ставка от",value:u?.rate,fractionDigits:2,postfix:"%"}),o(Qr,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),We(l,{isVertical:!0}),es(i)]})]})})})),Fs=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Ql,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Ql,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Ql,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Ql,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Us=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},Ws={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Hs=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?qs(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Ks({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Ks({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Ks({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Ks({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,ys(l,["minSum","maxSum"],t),ys(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||Ws,{rate:h}=m,u=Ys(h,e),p=l+u,g=t||[Ws];return{...m,...bs(["minSum","maxSum"],g),...bs(["minMonths","maxMonths"],g),availableMonths:Us(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:u,finalSum:p}},Ys=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},Ks=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],qs=(e,t)=>e+Math.round((t-e)/2),Xs=(e="rub")=>"rub"===e,Gs=(e,t)=>{const{minMonths:n,maxMonths:l}=bs(["minMonths","maxMonths"],eo(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:el(a,n,l)}},Zs=(e,t)=>{const{minSum:n,maxSum:l}=bs(["minSum","maxSum"],eo(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:el(a,n,l)}},Js=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),Qs=e=>{const t=Xs(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},eo=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},to=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?us({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?us({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),no(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?ps({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},us({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),no(e.isShowNewClient),e.isShowNewClient?o(Ql,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},no=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,lo={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},ao={text:"₽",key:"rub"},io=Ot((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=n??{},p=u?.map((e=>e.currency))??[ao],g=i((e=>t=>e?{...t,...Qs(t),...Zs(t,e),...Gs(t,e),...Js(t,e)}:t)(u),[u]),[x,{field:f}]=hn({moneyValue:ds(d,2e4),monthsValue:ms(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:ao},{normalizer:g}),b=f?.("currency")?.value??ao,y=f?.("isNewClient")?.value,v=eo(u,b),N=Hs(x,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,I=i((()=>{zs({field:f,defParams:Bs(v,y),calcParams:N,monthsValue:"minMonths",map:lo})}),[f,u]);a((()=>{!As(d)&&v&&I()}),[d,u]);const T=w===Bs(v,y)?.rate;return o(qr,{className:e,title:t,...m,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[c("div",{className:"flex gap-m",children:[as({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...f("moneyValue"),value:N.moneyValue,postfix:b?.text,step:ro(b?.key)}),u&&u?.length>1?o(_n,{label:"Валюта",options:p,...f("currency")}):null]}),Ps({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...f("monthsValue"),value:N.monthsValue}),to({...N,...s},f)]}),ls({rate:w,children:oo(I,T)}),xs({income:k,finalSum:S,buttons:[...l,so(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:f("isMonthlyInterestPayment").value})]})})})),ro=(e="")=>Xs(e)?1e3:100,so=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},oo=(e,t=!1)=>t?null:o(gi,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),co=e=>mo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&mo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),mo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],ho={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},uo=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[ho],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>co({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=fs(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=fs(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>co({row:e,userInputParams:t,paramsViewSettings:n})&&ys(l+r,["minSum","maxSum"],e)&&ys(i,["minSumOld","maxSumOld"],e)&&ys(r,["minSumExtra","maxSumExtra"],e)&&ys(a,["minMonths","maxMonths"],e)))||ho)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=Ds(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},po=Ot((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...s})=>{const[d,{field:m}]=hn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),u=uo(d,n,i),p=r((()=>Ts(n?.rateRows)?.rate),[n?.rateRows]),g=Rs({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...m("isAnnuity")});return o(qr,{className:e,title:t,...s,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[as({title:"Остаток долга в других банках, ₽ ",step:500,min:u.minSum,max:u.maxSum-u.maxSumExtra,...m("moneyValue"),value:u.moneyValue}),as({title:"Ежемесячный платёж в других банках, ₽",step:500,min:u.minSumOld,max:u.maxSumOld,...m("oldMonthlyPayment"),value:u.oldMonthlyPayment}),Ps({title:"Новый срок кредита, месяцев",min:u.minMonths,max:u.maxMonths,...m("monthsValue"),value:u.monthsValue}),go({...u,...i},m),u.isExtraMoney?as({title:"Дополнительная сумма, ₽ ",step:500,min:u.minSumExtra,max:u.maxSumExtra,...m("moneyExtra"),value:u.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:g})]}),c("div",{className:h(Zr,"@4xl:w-1/2"),children:[o(Qr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Qr,{title:"Ставка от",value:p,fractionDigits:2,postfix:"%"}),o(Qr,{title:"Ежемесячный платёж",value:u.monthlyPayment,postfix:"₽"}),u.benefit>0?o(Qr,{title:"Выгода в месяц",value:u.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:g}),We(l,{isVertical:!0}),es(a)]})]})})})),go=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Ql,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Ql,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Ql,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),xo=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Qn(e,{normalize:(e=a)=>n&&l?String(el(Number(fo(e)),n,l)):fo(e),format:qe(r)}),d=i((e=>t&&t(fo(e))),[t]);return o(Nn,{onChange:d,...s,...c})})),fo=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),bo=d((e=>o(xo,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o($e,{size:"text-xl",font:"font-light",children:"₽"})})})));function yo(e,t){for(const[n,l]of e.entries())null!=l?t.setItem(n,l):t.removeItem(n)}function vo(e,t){return yo(e,t),yo(t,e),e.bus.watch((({type:e,event:n})=>{null!=n?t.setItem(e,n):t.removeItem(e)}))}class No{storage;bus;get size(){return this.storage?.length??0}constructor(e,t=new ue){this.storage=e,this.bus=t}hasItem(e){return Boolean(this.storage?.getItem(String(e)))}getItem(e){const t=this.storage?.getItem(String(e))??null;try{return JSON.parse(String(t))}catch(e){return null}}entries(){return Array.from({length:this.size},((e,t)=>{const n=String(this.storage?.key(t));return[n,this.getItem(n)]}))}setItem(e,t){null!==t?this.storage?.setItem(String(e),JSON.stringify(t)):this.storage?.removeItem(String(e)),this.bus?.subject(e,t)}removeItem(e){this.storage?.removeItem(String(e)),this.bus?.subject(e,null)}}class wo{bus;store=new Map;get size(){return this.store.size}constructor(e=new ue){this.bus=e}hasItem(e){return this.store.has(e)}getItem(e){return this.store.get(e)}entries(){return this.store.entries()}setItem(e,t){this.store.set(e,t),this.bus.subject(e,t)}removeItem(e){this.store.delete(e),this.bus.subject(e,null)}}const ko={};function So(e,t=ko){const n=s(null),o=function(){const[,e]=l(0);return i((()=>e((e=>(e+1)%65536))),[])}();return a((()=>e.bus.watch((e=>{n.current?.has(String(e.type))&&o()}))),[e,o]),r((()=>new Proxy(t,{get:(t,l)=>(n.current||=new Set,n.current.add(l),e.getItem(l)),has:(t,l)=>(n.current||=new Set,n.current.add(l),e.hasItem(l)),set:(t,n,l)=>(e.setItem(n,l),!0),deleteProperty:(t,n)=>(e.removeItem(n),!0)})),[e])}const Co=new wo;function Io(){return So(Co)}vo(Co,new No(globalThis?.sessionStorage));const To={private:"p2p/registerP2P",business:"b2c/registerB2C"},Bo=({onClose:e,errorCode:t,errorMessage:n})=>{const l=t?`Код ошибки - ${t}`:"Пожалуйста, повторите позднее";return o(fi,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ae,{image:{icon:"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:"Ошибка перевода",description:l,headlineVersion:"XS",isEmbedded:!0}),n?c("div",{className:"bg-secondary-dark rounded-xl px-4 pt-4 pb-8 grid gap-4 grid-cols-12",children:[c("div",{className:"col-span-8",children:[" ",n]}),o("div",{className:"col-span-4",children:o(ae,{image:{icon:"ResponseFailIcon",iconVersion:"normal"}})})]}):null]})})},Mo=e=>{const t=pn(Bo),n=Io(),l=Qt(),a="private"===e?"p2p":"b2c";return i((async({amount:i})=>{const r=await(async(e,t)=>{const n=Qt(),l={amount:String(t),currency:"643",returnUrl:`${n.origin}/p2p/success`,failUrl:`${n.origin}/p2p/failed`,language:"ru"},a=`${Yt}/payment/${To[e]}`;try{const e=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(l)});return e.ok?await e.json():null}catch(e){return null}})(e,i);(e=>Boolean(e?.formUrl)&&Boolean(e?.orderId))(r)&&(n.transaction={orderId:r.orderId,type:a,url:l.href},l.assign(`${a}/?formUrl=${encodeURIComponent(r.formUrl)}`)),(e=>Boolean(e?.errorMessage)&&0!==e?.errorCode)(r)&&t.open({errorCode:r.errorCode,errorMessage:r.errorMessage})}),[e])},Po={amount:1500},Vo=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:i="private",...r})=>{const[s,{setValue:d}]=an(!1),m=Mo(i),[{amount:u},{field:p,onSubmit:x}]=hn(Po,{onSubmit:m});return a((()=>{d(u<=0)}),[u]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?o(w,{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",onSubmit:x,children:[o(bo,{valid:!s,label:n,max:3e5,min:1,...p("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:u}),l?.text?o(Ti,{className:"w-full mt-lg",disabled:s,children:l.text}):null]})]})})),Ro=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(q,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),zo="relative h-full",Do={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},_o=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(Lo),r=n?{defaultPadding:"p-6xl pb-m"}:{};return V({...l,renderProps:(n,l,a)=>c("div",{className:$o(n,{someCardsHighlighted:i}),children:[B(n,l,{className:jo(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),Lo(n)?Ro({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},$o=(e,{someCardsHighlighted:t})=>h(zo,t&&(Lo(e)?"pt-3xl":"pt-3xl sm:pt-16")),jo=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>h(zo,"min-w-80",Do[l],t&&(Lo(e)?"pt-3xl sm:pt-16":"pt-3xl"),Wi(n),n&&"h-full"),Lo=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Ao=Ot((({className:e,visibleItemCount:t=0,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(vr,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?Oo(s?.block?.blocks):[],hasBlur:!0,children:_o({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Oo=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Eo="z-10 border border-solid w-full h-full",Fo=h(Eo,"absolute hidden @xl:block border-transparent"),Uo=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:h("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:h(Fo,"top-9 right-12 bg-green-dark")}),o("div",{className:h(Fo,"top-6 right-8 bg-green")}),o("div",{className:h(Fo,"top-3 right-4 bg-green-light")}),c("div",{className:h(Eo,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),We([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Wo={black:"bg-black",white:"bg-white"},Ho=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Pe,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ae,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:We([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($e,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Yo)]}):null,a?c($e,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Yo=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Wo[e]}`},String(t)),Ko=d((({icon:e,...t})=>{const n=xe(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ae,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),qo=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?Xo(l):null]})}))),Xo=e=>o("div",{className:h("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(Ko,{...e},String(t))))}),Go=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Zo=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=xe()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:h("block",e),...t?r:{},role:t?"link":"none",...be(a),children:i})})),Jo=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],Qo=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>Jo.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ue(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},ec(a));return c("div",{className:h("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:We(m,{className:tc(s??!1,a??!1,n),buttonClassName:u})}),r?o($e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),ec=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",tc=(e,t,n=!1)=>h(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),nc=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:x,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(Zo,{href:a,target:m,className:"h-full",data:Go(v),children:c(Pe,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:u,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...tt(Ue(i)?o(ae,{image:i}):null,f),buttons:d.length?o(Qo,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Fe,{benefits:x}),s?o(De,{__html:s,isDotted:r,itemSize:"list-s"}):null,lc(l,p)]})})}))),lc=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,ac=new ue,ic=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o($e,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o($e,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:We(a)}):null]},String(t))},rc=d((({className:e="",title:t,align:n="text-center",icon:s,button:d,visibleCellsCount:m=1,cardCells:u=[],options:p,data:x,...f})=>{const b=r((()=>u.map(ic)),[u]),[y,v]=r((()=>m>0?[b.slice(0,m),b.slice(m)]:[b,[]]),[m,b]),[N,k]=l(!1);a((()=>ac.subscribe("fold",(e=>{e&&p?.parent&&e.parent===p?.parent&&k(e.isUnfolded)}))),[p?.parent]);const S=i((()=>{ac.fire("fold",{type:"fold",isUnfolded:!N,parent:p?.parent})}),[N,p?.parent]);return c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...f,children:[o(ae,{className:"self-center",image:s}),t?o(w,{className:h("pt-xs",n),headingType:"h5",title:t}):null,d?.text?o(ke,{className:"w-full mt-m mb-lg",...d}):null,v.length?c(Oi,{children:[c("div",{children:[y,o(Ei,{isUnfolded:N,children:v})]}),u.length>=m?o(Ai,{className:"mt-m",label:N?"Скрыть":"Подробнее о тарифе",isUnfolded:N,embedded:!0,data:x,onClick:S}):null]}):o("div",{children:y})]})})),sc=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,oc=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),cc=1e9,dc={sum:{min:1e4,max:cc},period:3},mc=Ot((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Dr(dc,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:hc(e)})}),u=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=uc(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Ir,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(bo,{label:l?.title,min:500,max:cc,...d("sum",{parse:e=>({min:Number(e),max:cc}),format:({min:e})=>String(e)})}),o(il,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(wr,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),hc=e=>Dt((e?.paramsSource?.rateRows||[]).filter(sc).flatMap((e=>oc(e.minMonths,e.maxMonths)))),uc=e=>Dt(e.flatMap((e=>e||[])).filter(sc).flatMap((e=>oc(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],pc=[{key:"10"},{key:"50"},{key:"100"}],gc=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(Vn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:pc,iconVersion:"black"})]})},xc="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",fc=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:xc,"aria-label":`Страница ${i}`,children:i},String(t)):null},bc={width:"24",height:"24"},yc=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(q,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:vc(1===e),...bc})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:xc,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(fc),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:xc,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(q,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:vc(e===n),...bc})})]})},vc=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Nc=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(yc,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(gc,{itemCount:l,onItemCountChange:a}):null]}),wc=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ae,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",yn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),kc=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(wc,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(jl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(jl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(gi,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Sc=d((({title:e,timestamp:t,publicId:n})=>{const l=xe(),{href:a}=l({href:`${Yt}/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[o(Er,{className:"shrink-0",icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o($e,{size:"text-m","font-weight":"font-light",children:Wt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),Cc=`${Yt}/depository`,Ic={startDate:void 0,endDate:void 0,query:""},Tc=Ot((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:u}]=hn(Ic),{totalPages:p=0,items:x=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?Wt(l,!0):"",r=a?Wt(a,!0):"",s=new URLSearchParams(Cc);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=Hn(Cc+o,zt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),f=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o(kc,{filtrationState:d,field:m,onClearFilter:u}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o($e,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o($e,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),x.length?x.map((e=>o(Sc,{...e},String(e.publicId)))):o(_i,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Nc,{currentPage:n+1,onPageChange:f,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),Bc=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,Mc=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Bc(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(ke,{version:a?.version,text:a?.text,...a}):null]}))),Pc=new wo;function Vc(e){return So(Pc,e)}vo(Pc,new No(globalThis?.localStorage));const Rc=`${Yt}/region`;function zc(e="Москва"){return Vc().location??{name:e}}function Dc(e="Москва"){const t=Vc(),n=i((async()=>{if(!t.location){const n=await Rt(Rc);t.location=n??{name:e}}}),[t,e]);return Hn(Rc,n),t}var _c;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(_c||(_c={}));const $c=new Intl.NumberFormat("ru",{style:"currency",currency:_c.RUB}),jc=e=>e?$c.format(e):"",Lc="text-m font-light text-secondary-text ",Ac=`${Lc} text-left`,Oc=`${Lc} pl-5xl text-center`,Ec=`${Lc} pl-5xl text-right`,Fc={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Uc=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Ac,children:o($e,{size:"text-m",children:"Валюта"})}),o("th",{className:Oc,children:o($e,{size:"text-m",children:"Купить"})}),o("th",{className:Ec,children:o($e,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Wc)})]}))),Wc=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ae,{image:{icon:Fc[t]},width:"24",height:"24"}):null,o($e,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o($e,{size:"text-h6",children:jc(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o($e,{size:"text-h6",children:jc(e?.buyExchangeRate)})})]},t)},Hc={icon:"GpsIcon"},Yc=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Er,{...Hc,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Kc=(e,t,n)=>{const l=Number(qc(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},qc=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function Xc(e){if(!e)throw new Error("Value should be fulfilled");return e}const Gc=e=>t=>{const[,n]=Xc(e.find((([e])=>e(t))));return n(t)},Zc=e=>Gc(e.map((([e,t])=>[e,()=>t])));Zc.if=e=>new Jc(void 0,e);class Jc{parent;predicate;unit;get entry(){return[Xc(this.predicate),Xc(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Jc(this,e)}then(e){return new Jc(this.parent,this.predicate,e)}else(e){return Gc([...Qc(this),[()=>!0,e]])}}const Qc=e=>[...e?.parent?Qc(e.parent):[],e.entry],ed=e=>Zc([[e=>e.value!==_c.RUB&&e.oppositeValue!==_c.RUB,()=>e.handleConvert(e.value,_c.RUB)],[e=>e.value===_c.RUB&&e.oppositeValue===_c.RUB,()=>e.handleConvert(e.value,_c.USD)],[e=>e.value===_c.RUB&&e.oppositeValue===_c.RUB,()=>e.handleConvert(e.value,_c.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function td(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(Nn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(Vn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const nd=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||_c.RUB,selectBuy:n?.[0]?.currency?.currency||_c.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[td({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:ld(r,d,n),value:r.inputSell,setValue:e=>id(d,n)(e,r.selectSell,r.selectBuy)}),td({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:ad(r,d,t),value:r.inputBuy,setValue:e=>rd(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(ke,{text:a.text,version:a?.version,...a}):null]})})),ld=(e,t,n)=>l=>{t({selectSell:l}),ed({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{id(t,n)(e.inputSell,l,a)}})},ad=(e,t,n)=>l=>{t({selectBuy:l}),ed({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>rd(t,n)(e.inputBuy,l,a)})},id=(e,t)=>(n,l,a)=>{e({inputSell:qc(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(Kc(n,i,l===_c.RUB)||"")})},rd=(e,t)=>(n,l,a)=>{e({inputBuy:qc(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(Kc(n,i,l===_c.RUB)||"")})},sd=`${Yt}/exchangerates`;const od=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const a=function(e){const t=e?.code||"000",{data:n}=Hn(sd+`?regionCode=${t}`,zt);return n||{}}(zc()),i=cd(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:_c.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:_c.RUB}}),o(g,{className:h("box-border min-h-80",e),...l,children:o(Pe,{className:"h-full",title:o(w,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[i?o(Uc,{className:"mb-xl",exchangeCurrencyItems:i}):null,o(Yc,{address:a?.address})]}),o(nd,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),cd=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],dd=d((({className:e="",items:t})=>{const n=xe();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(md(n))})})),md=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...be(t),children:a||null})},String(l)):null},hd=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:ud(e)}))),ud=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(pd,{className:"w-full border-0 border-b border-solid border-main-divider last:border-b-0",item:e},String(t)))),pd=d((({className:e,item:t})=>{const[n,{toggle:l}]=an(!1);return c(Oi,{className:e,role:"menuitem",children:[c(gi,{className:h("w-full",t.icon?.icon?"py-xs":"py-lg"),embedded:!0,onClick:l,children:[c(ji,{children:[o(Er,{className:"shrink-0",...t.icon}),o($e,{size:"text-h6",font:"font-normal",color:"text-primary-text",children:t.text})]}),o(Li,{iconVersion:"color",size:"medium",isUnfolded:n})]}),o(Ei,{className:"flex flex-wrap gap-lg group-last:last:pb-0",isUnfolded:n,children:t.items?o(dd,{items:t.items}):null})]})})),gd=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(xd)}):null)),xd=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o($e,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(fd)})]},String(t)),fd=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:bd(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),bd=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${yd(t)}`,children:o($e,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},yd=e=>e.replaceAll(/\D/g,""),vd=d((({className:e="",index:t,text:n,...l})=>{const a=xe(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:h("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),Nd=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o($e,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(vd,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),wd=d((({className:e="",index:t,...n})=>{const l=xe(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),kd=d((({className:e="",links:t,license:n})=>c("div",{className:h("@container space-y-lg",e),children:[n?o("div",{children:o($e,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(wd,{index:t,...e},String(t))))}):null]}))),Sd=Ot((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{};n.options;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:u,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(hd,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(gd,{items:r}),m?o(ke,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(Qo,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(Mi,{className:"text-s font-light",...e},`${e.href}_${t}`)))]})]}),o(Nd,{title:d,links:i}),o(kd,{links:a,license:u})]})})),Cd=Ot((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],u=m?.find((e=>e.name===s.key))?.href;return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container space-y-m",children:[t?o(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(_n,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,u?o("div",{className:"text-center",children:o(Mi,{className:h("w-full @xl:w-auto"),href:u,target:"_blank",version:n?.version??"primary",data:Go(i,s?.key),children:n?.text?n.text:"Перейти"})}):null]})})})),Id={width:"103",height:"21"},Td={"bg-white":"color",transparent:"white"},Bd={"bg-white":"text-primary-main",transparent:"text-white"},Md=(e,t,n)=>o(ae,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Td[e]},className:Bd[e],width:n?.width,height:n?.height}),Pd={"bg-white":"text-primary-text",transparent:"text-white"},Vd=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...be(s),children:[Md(i,n?.image,Id),r?l??o("div",{className:"ml-s",children:o($e,{font:"font-medium",color:Pd[i],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),Rd={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},zd=d((({version:e,text:t,mobileText:n,...l})=>{const a=Te()?n:t;return a?o(ke,{className:h("py-s px-lg font-light whitespace-nowrap",Rd["transparent"===e?"transparent":"default"]),...l,children:a}):null})),Dd=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:l,version:a,backwardButton:r})=>{const s=R(),d="/"===s.pathname,{dataFooter:m,dataHeader:h,...u}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(Vd,{className:"my-2xs",bgColor:e,logo:u,data:h,showTitle:!1})}):_d(p,r),o(zd,{version:a,...l})]})})),_d=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(q,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,$d={"bg-white":"primary",transparent:"transparent"},jd=Ot((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=$d[e],portal:l,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=l||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:n,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(Dd,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...i})})})})),Ld=(e=!1)=>e?{}:{padding:"p-0"},Ad={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Od=Ot((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=R();return o(g,{className:h("relative flex flex-col",Ad[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:V({...c,extraProps:{className:h("w-full",Wi(r)),...Ld(l)}})})}),{childrenTypes:[]}),Ed=Ot((e=>o(Od,{...e})),{childrenTypes:[]}),Fd=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?h("flex",Yr[n]):"";return o(g,{className:h(i,t),defaultPadding:"p-0",...a,children:o(ae,{image:l})})})),Ud=["байт","Кб","Мб","Гб","Тб","Пб"],Wd=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...be(i),children:[e,t?c($e,{size:"text-l",font:"font-light",children:[t," ",Hd(d,m),o($e,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Hd=(e,t)=>e||t?o("span",{children:", "}):"",Yd=(e,t)=>(n,l)=>{const a=W(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Ud[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?qd(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(Wd,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:Kd(t),data:n?.data}),o(De,{__html:n?.__html})]},String(l))},Kd=e=>e?o(ae,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,qd=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},Xd=d((({href:e,__html:t,target:n,onClose:l})=>c(fi,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:l,children:[t?o(De,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(Mi,{href:e,target:n,version:"primary",ariaLabel:"Ссылка на согласие",onClick:l,children:"Я согласен"}),o(gi,{type:"button",version:"secondary",onClick:l,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]}))),Gd=d((({text:e,href:t,target:n,__html:l,icon:a})=>{const{open:r}=pn(Xd),s=i((()=>r({__html:l,href:t,target:n})),[l,t,n]);return e?c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[Kd(a),o($e,{font:"font-light",children:e})]}):null})),Zd={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Jd=Ot((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=R();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Zd[r]),role:"list",children:a.map(Qd(d,i))}):null]})})),Qd=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?em(t)(n,l):Yd(e,t)(n,l)},em=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(Gd,{...l,icon:e,href:tm(t)?t?.href:t?.attachment?.src}),o(De,{__html:t?.__html})]},String(n)):null},tm=e=>"href"in e,nm=Ot((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...x})=>{const f="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ae,{className:"hidden lg:block",image:i}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...x,children:c(Pe,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:u,className:h("whitespace-pre-wrap",n)}),rightImage:b,buttons:We(l,{className:"flex-wrap"}),children:[a?o($e,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(De,{__html:r,itemSize:"list-m"}):null,o($e,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ae,{className:"w-fit",image:d})}):null,i?.src?o(ae,{className:"lg:hidden",image:i}):null]})]})})})),lm=(e,t)=>e&&"underlined"!==t?"primary":"secondary",am=(e=[],t={})=>e.filter((({content:e={}})=>Rr(t,e))).length,im=(e,t)=>e===t;const rm=(e=>(t,n)=>t===n||Boolean(t&&n&&Object.keys(t).length===Object.keys(n).length&&Object.entries(t).every((([t,l])=>e(l,n[t])))))(function(...e){return(t,n)=>e.some((e=>e(t,n)))}(im,((e=im)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))())),sm=[],om={},cm={primary:"bg-white/30",secondary:"bg-main-divider"},dm={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},mm=d((({count:e,version:t="secondary"})=>{const n=Te(),l=n?"bg-main-divider":cm[t],a=dm[t][n?"mobile":"desktop"];return o("div",{className:h("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o($e,{size:"text-xs",color:a,children:e})})})),hm=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ae,{className:h("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},um={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},pm={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},gm={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},xm={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},fm=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:u,...p}=t;return o(i,{className:h("h-12","block flex-1","cursor-pointer",um[l],n?xm[l]:gm[l]),"aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?pm[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[hm({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(mm,{count:m,version:lm(n,l)})}):null]})})})),bm=d((e=>o(e?.item?.href?ym:vm,{...e}))),ym=d((e=>{const t=xe(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(fm,{...e,tag:"a",item:a,onClick:l})})),vm=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(fm,{item:e,onClick:l,...n})})),Nm=(e,t,n)=>(l,a)=>o(bm,{isActive:l===e,onClick:t,type:n,item:l},String(a)),wm=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:h("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(Nm(l,a,t))}))),km={categories:[],extraOptions:[],propertyType:[],stage:[]},Sm=Ot((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=Dr(km,{block:a.block,page:a.options?.page}),x=i(((e=km)=>p(e)),[]),f=(({hotFilters:e=sm,filtrationState:t=om,blocks:n=sm,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>rm(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:am(n,t.filter),version:lm(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:x});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(wm,{...f}),o(Ir,{filtrationSchema:n,resetButton:l,field:m,reset:u}),o(wr,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Cm=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Im=d((({children:e})=>Cm?e:null)),Tm="/icons/MapMarkerClusterIcon.svg",Bm="/icons/MapMarkerClusterYellowIcon.svg";function Mm({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=Pm("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=Pm("workplaces",e,a),r=Vm(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=Vm(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=Vm(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Pm=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Tm:Bm,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),Vm=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?Tm:Bm,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),Rm={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},zm={...Rm,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},Dm=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(zm).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(q,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),_m=e=>globalThis[e];function $m(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return((e,t,n=!1)=>{const l=globalThis.document.getElementById(t);if(l){const t=_m(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(_m(e))}))}))}return new Promise(((l,a)=>{const i=globalThis.document.createElement("script");i.src=t,i.async=!0,i.id=t,n&&(i.type="module"),i.addEventListener("load",(()=>{l(_m(e))})),i.addEventListener("error",(e=>{a(e)})),globalThis.document.head.appendChild(i)}))})(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=globalThis.document.getElementById(t);e&&globalThis.document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}const jm={...Rm,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Lm=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(jm).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(q,{name:n,width:"20",height:"16"})})})),Am=[55.753995,37.614069],Om=d((({points:e,className:t="",zoom:n=5,isLoad:l,selectedAddress:i})=>{const r=s(null),d=s(null),m=$m("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${D.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{r.current?Mm({yandexMaps:m,map:r.current,points:e,isLoad:l}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:Em(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),Mm({yandexMaps:m,map:r.current,points:e,isLoad:l})})),r.current&&i&&m?.geocode(i).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();r.current.setCenter(t),r.current.setZoom(18)}))}),[m,e,n,l,i]),!m)return null;const u="z-10";return c("div",{ref:d,className:h("relative","w-full",t),children:[l?o(Ii,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",u),children:[o(Lm,{yandexMaps:r}),o(Lm,{yandexMaps:r,direction:"out"})]}),Dm(r,m,h("right-2 top-80",u))]})})),Em=e=>{const t=[Um(Fm(e,0)),Um(Fm(e,1))];return t.every((e=>e))?t:Am},Fm=(e,t)=>e.map((e=>e.coords?.[t])),Um=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Wm={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Hm={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Ym={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},Km="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",qm=d((({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(Ql,{text:a[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]],[m,{toggle:h}]=an(!1);return o("div",{children:e?.length?o("div",{children:c(Oi,{children:[c("div",{children:[o("div",{className:Km,children:s}),o(Ei,{className:Km,isUnfolded:m,children:d})]}),c("div",{className:"flex space-x-lg",children:[l?o(Ai,{label:m?"Меньше фильтров":"Больше фильтров",isUnfolded:m,embedded:!0,short:!0,onClick:h}):null,c(gi,{embedded:!0,onClick:n,children:[o(ji,{children:"Очистить фильтр"}),o(q,{name:"CloseIcon",size:"small"})]})]})]})}):null})})),Xm=(e,t,n)=>{const l=lm("all"===t),a=lm("business"===t),i=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?r(l):l;return n(t),a},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(gi,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(gi,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Gm=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(De,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ae,{image:e.image}):null,e?.text?o($e,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Zm=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o($e,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Jm=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Ym[t](e)))))},Qm=()=>{},eh=()=>{},th=e=>"all"===e?"block":"hidden",nh=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=eh,renderRemoteWorkplaceCard:s=eh,getBalloon:d=eh,getBalloonRemoteWorkplaces:m=eh,descriptionData:u,title:p})=>{const g=p?.includes("Офис"),[x,{field:f,reset:b}]=hn(Wm),{filteredItems:y,points:v,filteredRemoteWorkplaces:N,lengthItems:w}=(({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:l=Qm,getBalloonRemoteWorkplaces:a=Qm})=>{const[i,s,o,c]=r((()=>{const i=Jm(e,n),r=Jm(t,n),s=[...i.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:l(e)}))),...r.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[i,s,r,i.length+r?.length]}),[e,t,n,l,a]);return{filteredItems:i,points:s,filteredRemoteWorkplaces:o,lengthItems:c}})({data:t,remoteWorkplaces:a,filtrationState:x,getBalloon:d,getBalloonRemoteWorkplaces:m}),[k,S]=l("all");return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Zm(p,w),u?Gm(u):null,g&&Xm(t,k,S),o("div",{className:h("pb-3xl",th(k)),children:o(qm,{filters:lh([...t,...a]),field:{field:f,reset:b},onlyOffice:g,labels:Hm})})]}),o("div",{className:"h-[600px]",children:o(Im,{children:o(Om,{points:v,isLoad:n,className:"h-full"})})})]}),c(Im,{children:[y.map(i),N.map(s)]})]})})),lh=e=>Object.keys(Wm).filter((t=>e.filter((e=>Ym[t](e))).length)),ah=e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:"",ih={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"}},rh=d((({className:e,children:t,color:n="gray"})=>c("div",{className:h("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",ih[n].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($e,{size:"text-m",color:ih[n].text,children:t})]}))),sh=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:oh({textItems:i,subText:t,children:n,isPhone:l,...a})})),oh=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o($e,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||ch(n,s),a?o($e,{color:l,size:"text-m",children:a}):null]}),ch=(e,t)=>e.filter(Boolean).map(((e,n)=>o($e,{size:"text-l",children:t?o("a",{href:`tel:${dh(e)}`,children:e.trim()}):e.trim()},String(n)))),dh=e=>e.replace(/\D/g,""),mh=d((({className:e,children:t})=>o("div",{className:h("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),hh=d((({children:e})=>{const[t,{toggle:n}]=an(!1);return c("div",{children:[o("div",{className:"hidden sm:block",children:e}),c(Oi,{className:"block sm:hidden",children:[o(Ei,{isUnfolded:t,children:e}),o(Ai,{className:"my-m mr-m border-b border-solid border-main-divider",label:t?"Скрыть":"Подробнее",isUnfolded:t,embedded:!0,onClick:n})]})]})})),uh=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:ah(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o($e,{size:"text-h4",children:ah(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(rh,{color:"green",children:ah(s)})})]}),o(hh,{children:o(mh,{className:"flex-wrap",children:m?.map(((e,t)=>o(sh,{...e},String(t))))})})]},String(d))},ph=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${ah(t)} №${n}`,body:e.toUpperCase()}),gh=[];const xh=async e=>{const t=await Rt(e,{method:"GET"});return Array.isArray(t)?t:gh},fh={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},bh={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},yh=d((({descriptionData:e,className:t})=>{const n=zc(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=Hn(`${Yt}/atms?regionCode=${e}`,xh);return{data:t||gh,isLoad:!t&&!n}}(l);return o(nh,{className:t,filterItems:vh,data:a,isLoad:i,initFilterState:fh,renderCard:uh,getBalloon:ph,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),vh=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>bh[t](e))),n=!l.length||l.some((t=>bh[t](e)));return t&&n}))},Nh=e=>{const t=kh(e);return o(sh,{label:"Режим работы",value:t,className:"max-w-none"})},wh=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",kh=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[wh({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),wh({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},Sh=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Ch=e=>Sh.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Ih=e=>{if(!e)return null;const t=Th(e);return c(mh,{className:"border-none",children:[o(sh,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Bh)})}),o(sh,{label:"Режим работы",className:"max-w-none",children:o($e,{children:e})})]})},Th=e=>{const t=Sh.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},Bh=({short:e,status:t},n)=>o("div",{className:h("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o($e,{size:"text-xs",children:e})},String(n)),Mh=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(sh,{label:"Валюта",value:e.currency}):null,t?o(sh,{label:"Купить",value:String(t)}):null,n?o(sh,{label:"Продать",value:String(n)}):null]},String(l)),Ph=(new Date).getDay(),Vh=e=>{const[t]=e?.slice(Ph-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(rh,{color:"green",children:a}):null,n&&i?o(rh,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(rh,{color:"red",children:"Выходной"})},Rh=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",zh=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(sh,{label:e,value:t&&n?n:"",subText:Rh({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Dh=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,_h=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,$h=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,jh=(e,t)=>{if(!e.workSchedule)return null;const n=Ch(e.workSchedule);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($e,{size:"text-h4",children:e.name}),e.address?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:e.address})]}):null]}),Vh(n)]}),o(hh,{children:Lh(e)})]},String(t))},Lh=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Ch(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(mh,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(sh,{label:"Факс",value:t,isPhone:!0}),o(sh,{label:"Телефон филиала",value:e,isPhone:!0}),o(sh,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(sh,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(sh,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(sh,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(mh,{children:o(sh,{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(zh)})})}):c(mh,{children:[o(sh,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Bh)})}),Nh(d)]}),r?.businessScheduleVisibleTag?Ih(r?.businessScheduleDescription):null,s?.currencies?.length?o(mh,{className:"flex-wrap",children:s?.currencies?.map(Mh)}):null]})},Ah=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Ch(e),n=e?kh(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?Dh(n):$h(n,l):_h(n):""})(n)}`;return{header:l,body:i}},Oh=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o($e,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:e})]}):null]})}),o(hh,{children:Eh(t)})]},String(n)):null,Eh=e=>c("div",{children:[c(mh,{className:"flex",children:[o(sh,{label:"Операции для физических лиц",children:o($e,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(sh,{label:"Операции для физических лиц",children:o($e,{children:"Оформление и обслуживание банковских карт"})}),o(sh,{label:"Операции для физических лиц",children:o($e,{children:"Инвестиционное и накопительное страхование"})}),o(sh,{label:"Операции для физических лиц",children:o($e,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(sh,{label:"Режим работы",className:"max-w-none",children:o($e,{children:e})})]}),Fh=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Uh={branches:[],remoteWorkplaces:[]};const Wh=async e=>await Rt(e,{method:"GET"})||Uh,Hh=d((({className:e})=>{const t=zc(),n=t?.code??"000",{data:l,isLoad:a}=function(e="000"){const{data:t,error:n}=Hn(`${Yt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,Wh);return{data:t||Uh,isLoad:!t&&!n}}(n);return o(nh,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:jh,renderRemoteWorkplaceCard:Oh,getBalloon:Ah,getBalloonRemoteWorkplaces:Fh,title:`Офисы филиала ${t?.name}`})})),Yh=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:h(t),defaultPadding:"p-0",...n,children:"offices"===l?o(Hh,{}):o(yh,{descriptionData:e})})})),Kh=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:h("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),qh=d((({className:e,padding:t,slides:n=[],...l})=>o(g,{className:h("overflow-hidden relative",e),padding:t,...l,children:o(vr,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(et,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),Xh=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ue(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ae,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Gh({__html:i,richVersion:r}):null,Zh({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Zh({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Zh({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?We([l]):null]})]}))),Gh=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{...e,itemSize:"list-s"})}),Zh=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(q,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o($e,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o($e,{size:"text-xl",color:l,children:t})]})]}):null,Jh=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(De,{__html:t,richVersion:n})})})),Qh=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",eu=Ot((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,foldButtonVersion:l="default",label:a,version:i,role:r,...s})=>{const d=Te(),[m,{toggle:u}]=an(t),p=o(Ei,{className:h("gap-lg",Qh(d)),isUnfolded:m,children:V({...s,extraProps:{className:"w-full",padding:"p-0"}})}),x="accordion"===l,f=o(Ai,{className:h(x?"text-h6 my-lg":"text-h4"),label:a,isUnfolded:m,embedded:x,onClick:u});return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:r,...s,children:c(Oi,{children:[n?f:p,n?p:f]})})}),{childrenTypes:{exclude:["RollupItem"]}}),tu=d((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:h(yn.split(" ").filter((e=>"rounded"!==e)),Zl,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o($e,{color:"text-primary-text",children:t}):null]})}))),nu=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(tu,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(tu,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),lu=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(Vn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),au=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(lu,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(lu,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),iu=["От 1 дня","До 365 дней"],ru=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o($e,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(il,{min:1,max:365,value:e,items:iu,onChange:t})]}))),su=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(lu,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(lu,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),ou=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(au,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:cu(m)}),o(ru,{days:a,setDays:e=>m({days:e})}),o(su,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:du(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o($e,{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(nu,{}),o(gi,{className:"order-6",version:"primary",onClick:h,children:"Офисы на карте"})]})]}))),cu=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},du=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},mu=d((({days:e,tariffs:t=[]})=>{const n=uu(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[hu("Аренда за",e),hu("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(q,{className:"@xl:h-60",name:"PackA4Icon"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(k,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),hu=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o($e,{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})]}),uu=(e,t)=>{const n=pu(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},pu=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},gu=(e,t)=>e.find((e=>e.branchCode===t)),xu=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=gu(l,n.selectedBranch),d=fu(s?.safeBoxCaseVolumes),m=bu(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,h=yu(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(ou,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(mu,{days:n.days,tariffs:h})]})})),fu=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],bu=(e,t)=>e?.find((e=>e.volume===t)),yu=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,vu=`${Yt}/safeboxes`,Nu=[];const wu=async e=>await Rt(e,{method:"GET"})||Nu,ku=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,h]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Ma(),p=Su(m.selectedRegion,u),x=function(e){const{data:t}=Hn(e?`${vu}?regionCode=${e}`:null,wu);return t||Nu}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=gu(x,m.selectedBranch)||x,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(xu,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Om,{points:b,className:"h-[640px]"}):null]})})),Su=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Cu={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"},Iu=(e,t,n)=>(l,a)=>{const{button:i}=l;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Tu(e,n)(l,a)}),c("div",{className:h("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[Bu(l),i?.text?o(ke,{className:"box-border py-s w-full mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},Tu=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=Mu(e,i),s=i?"transparent"===t:t;return o(g,{className:h("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:Pu({step:n,iconVersion:a,i:l,stepVersion:t})})})},Bu=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:h("text-s font-light text-left",Cu.description),children:e.description}):null,o(De,{__html:e.__html})]}),Mu=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",Pu=({step:e,iconVersion:t,i:n,stepVersion:l})=>{return Ue(e?.icon)?o(ae,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:h("text-h4","transparent"===l?Cu.iconText:(a=l,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var a},Vu=d((({className:e="",title:t,description:n,steps:l=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=l.length>3;return c(g,{className:h("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:l.map(Iu(d,r,i))}):null,We(a,{isVertical:!0})]})})),Ru=d((({isActive:e,item:t,onClick:n})=>c("div",{className:h(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(q,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),zu=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>c("div",{onClick:a,className:h("relative bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(xi,{className:"absolute top-1.5 right-0",onClose:l}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})));function Du(e,t,n){a((()=>e.subscribe(t,(e=>{const t=e?.type;if(t&&"string"==typeof t){const l=n[t];l&&l(e)}}))),[e,t,...Object.values(n)])}const _u=()=>{const[e,{push:t,pop:n,clear:a}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}();return Du(pe.observable,"dialog",{open:t,close:n,closeAll:a}),[e,{close:n,closeAll:a}]},$u=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const ju=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($e,{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(Lu,{...e},String(t))))})]}):null,Lu=d((({icon:e,...t})=>{const n=xe(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ae,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o($e,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Au=(e,t)=>n=>n.name?o(Zo,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Go(e,n.name),children:o($e,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Ou=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:h(yn,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Eu=d((({defaultLocation:e})=>{const t=zc(e),n=xe(),{href:l}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Zo,{href:l,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),Fu=d((({foreignOffices:e,branches:t,onClose:n})=>{const a=Dc(t?.default),[s,d]=l(""),m=Ma(),h=r((()=>Wu(m).sort(((e,t)=>e.name.localeCompare(t.name)))),[m]),u=r((()=>((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(h,Uu)),[h]),p=i((e=>{a.location=e,n?.()}),[a,n]);return c(fi,{className:"pb-20",head:c("div",{children:[o($e,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Eu,{defaultLocation:t?.default}),o(Ou,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:h.filter((({name:e})=>e&&$u(e.toLowerCase())(s.toLowerCase())>=.8)).map(Au(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((g=p,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o($e,{size:"text-h6",children:e})}),t.map(Au(x,g))]},e)))}),ju(e)]});var g,x})),Uu=e=>e.name?.charAt(0)??"",Wu=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),Hu=d((({menuRef:e,menuItem:t,locationDialogProps:n,onClose:l})=>{const i=pn(Fu,n),{name:r}=zc(),s=e?.current?.getBoundingClientRect(),c=J(Z.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open({}),"reload"===e.data.type&&l?.(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[l]),o(zu,{head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),onClick:e=>e.stopPropagation(),onClose:l,children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),Yu="burgerMenuDialog",Ku=({menuRef:e,centralMenuItem:t,locationDialogProps:n,onClose:l=bn})=>{const{open:a}=pn(Hu),[r]=_u(),s=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Yu,r),o=i((()=>a({menuRef:e,locationDialogProps:n,menuItem:t,onClose:l},{id:Yu})),[e,n,t,l]);return[s,{toggle:s?l:o}]},qu=[],Xu=Ot((({sticky:e,...t})=>{const{menuItems:n=qu}=e??{},a=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),h=r.slice(d),[u,p]=l(-1),[x,f]=l(""),{closeAll:b}=ge(),y=i((()=>{p(-1),f(""),b()}),[b]),v=xn(y),N=s(null),[k,{toggle:S}]=Ku({menuRef:N,centralMenuItem:a,locationDialogProps:t.header,onClose:y}),C=(({menuRef:e,dialogRef:t,leftItems:n,rightItems:l,onClose:a})=>{const{open:r,close:s}=ge(),c=i((()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=`${e?.contentWindow?.document.body.offsetHeight}px`}),[]);return i(((i,d)=>{const m="left"===d?n:l,h=e?.current?.getBoundingClientRect();r({id:"left"===d?n[i].title:l[i].title,dialog:o(zu,{className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:m[i].description||m[i].title})}),onClick:e=>e.stopPropagation(),onClose:()=>{s(),a?.()},children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",src:m[i]?.src,width:h?.width??0,onLoad:c})})})})}),[c,n,l,a])})({menuRef:N,dialogRef:v,leftItems:m,rightItems:h,onClose:y}),I=i((e=>{e.stopPropagation(),y(),S()}),[y,S]),T=i(((e,t)=>{f(t),p(e),b(),C(e,t)}),[b,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(Gu(T,"left",{activeIndex:u,currentItemPosition:x})),o(Ru,{item:a,isActive:k,onClick:e=>I(e)}),h.map(Gu(T,"right",{activeIndex:u,currentItemPosition:x}))]})})})),Gu=(e,t,n)=>(l,a,i)=>o(Ru,{item:l,isActive:i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t,onClick:r=>{i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t||r.stopPropagation(),e(a,t)}},l.title||String(a)),Zu="hidden sm:flex absolute z-40",Ju={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Qu=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=cr({itemCount:t?.length||0});return a((()=>ep(r.current,t,n)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(Gi,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Ju[i].item,gap:Ju[i].gap,children:t.map(Nm(n,l,i))}),s.canScrollLeft?o(pr,{className:h("left-6",Zu,Ju[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(gr,{className:h("right-6",Zu,Ju[i].buttonTop),onClick:s.scrollRight}):null]})})),ep=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},tp={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},np=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:h(tp[t].wrapper,e),children:o(Qu,{className:tp[t].component,tabsType:t,...n})}):null,lp=Ot((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=ap(n??{}),p=R(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(sp(f,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(u))),N=f[y],w=f.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[u]?f.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[u])):w;v(-1===e?0:e)}),[b,w,u]);const k=rp(f[y],y),S=i((e=>{const t=f.indexOf(e),n=f[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(u,e?.tabName??String(t)):n.delete(u),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[f]);return c(g,{className:h({"sticky top-1 z-20":d&&x},e),defaultPadding:"p-0",block:n,...m,children:[np({className:h({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!x}),items:ip(t,f),activeItem:N,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>P(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(rp)?.filter(Boolean)||[]}),ap=({__id:e,anchor:t})=>t??e??"tabs",ip=(e,t)=>t?.length?t:e,rp=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",sp=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),op={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},cp=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:op[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),dp=d((({className:e="",isOpen:t,onClick:n})=>o(Ai,{className:e,label:t?"Скрыть":"Показать",isUnfolded:t,version:"secondary",short:!0,onClick:n}))),mp={Buttons:({buttons:e})=>We(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ae,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(De,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o($e,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o($e,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(dp,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},hp=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return up({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),up=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in mp))return null;return o(mp[n],{...t,...l})},pp=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(hp,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),gp=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),xp=(e,t)=>e?.length>0?o("div",{className:h("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o($e,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,fp=d((({rows:e})=>{return o(Gi,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=h("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o($e,{size:"text-xl",font:"font-light",children:l.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${gp(a,t)}px)`},children:a?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o($e,{size:"text-xl",children:e.data}):null,e?.cols?xp(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),bp=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o($e,{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(fp,{rows:t.rowsData})})})]},l)}))}))),yp=(e=!1)=>""+(e?"text-white":"text-secondary-text"),vp=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:h("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o($e,{size:"text-xl",font:"font-light",color:yp(t===n),children:e||t+1})},e)))}):null,t?o(ke,{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]}))),Np=Ot((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(vp,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(bp,{activeTabIndex:r,items:m}),o(dp,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o($e,{size:"text-h6",children:"Данных нет"}),o(dp,{onClick:n,isOpen:!0})]})})),wp=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:h("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(Np,{...t,onClick:n})}):null]}))),kp=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[u,p]=l(void 0),g=i((e=>p(e)),[]);return c(wp,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ae,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o($e,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(cp,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(pp,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),Sp=({className:e,btnClass:t,canDec:n,canInc:l,dec:a,inc:i})=>n||l?c("div",{children:[n?o(pr,{className:h("absolute z-40",t[0],e),onClick:a}):null,l?o(gr,{className:h("absolute z-40",t[1],e),onClick:i}):null]}):null,Cp=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,Sp({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Ip=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],u=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[x,f]=((e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:p,visibleItemCount:2}),b=(u||[]).map(((e,t)=>o(kp,{row:e,activeIndex:x,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]],[N,{toggle:w}]=an(!1);return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?c(Oi,{children:[c(Cp,{controls:f,children:[y,o(Ei,{isUnfolded:N,children:v})]}),o(Ai,{className:"text-h4",isUnfolded:N,onClick:w})]}):o(Cp,{controls:f,children:b})})]})})),Tp=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:h("flex gap-s sm:gap-m group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?Bp():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o($e,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?Mp(n):null,a?o(De,{richVersion:i,__html:a}):null]})]}))),Bp=()=>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"}),Mp=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Pp=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o($e,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o($e,{size:"text-h2",children:n})}):null]}))),Vp=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Pp,{prefix:t,unit:n,suffix:l})})})),Rp={AdTile:Ft,ApplicationForm:Di,BankAccountFiltration:jr,BenefitsBlock:Fr,BonusBenefitsBlock:Hr,ButtonsBlock:Kr,CalculatorBonus:os,CalculatorBusinessDeposit:Cs,CalculatorCredit:Es,CalculatorDeposit:io,CalculatorRefinancing:po,CardTransfer:Vo,Carousel:Ao,CarouselCard:Uo,CarouselCatalogCard:Ho,CarouselLinks:qo,CarouselRecommendationCard:nc,CarouselTariffsCard:rc,DepositFiltration:mc,Depository:Tc,ErrorBlock:Mc,ExchangeRateTile:od,Footer:Sd,GrantSupport:Cd,Header:jd,Headline:C,HorizontalLayout:Ed,ImgBlock:Fd,LinkDocs:Jd,MobileAppTile:nm,MortgageFiltration:Sm,OfficesAtmsMap:Yh,Placeholder:Kh,ProductBlock:Et,ProductGallery:qh,RepresentativeOfficeInfo:Xh,RichTextBlock:Jh,RollupItem:eu,SafeDepositRental:ku,StepsBlock:Vu,StickyBottomMenu:Xu,TabsLayout:lp,TariffsTable:Ip,TextBlock:Tp,UnitBlock:Vp,VerticalLayout:Od},zp=me((()=>{a((()=>{tn()}),[]);const e=ln();gn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");Jt({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const Dp="cookie",_p=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=an();!function(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(Dp)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Dp,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(De,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(xi,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null}));function $p(e){const t=i((({key:t})=>{"Escape"===t&&e()}),[e]);gn(globalThis.document,"keydown",t)}const jp=d((()=>{const[e,{close:t}]=_u(),n=Boolean(e.length);return $p(t),a((()=>{n?globalThis.document?.body.classList.add("no-scrollbar","overflow-hidden"):globalThis.document?.body.classList.remove("no-scrollbar","overflow-hidden")}),[n]),n?o("div",{className:"fixed inset-0 z-50",children:e.map((({dialog:t,id:n},l)=>o("div",{className:h("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==e.length-1}),children:t},String(n||l))))}):null})),Lp=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);return Du(pe.observable,"popup",{open:t,close:n}),$p(n),e?o("div",{className:h("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",title:"Всплывающее окно",children:e.popup}):null})),Ap="header",Op="footer",Ep="sticky-footer",Fp={},Up=d((({className:e,data:t=Fp,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=Lt(s,r);zp(),Dc();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.[Ap]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(a?.[Ap],{...m,slotName:Ap})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[V({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(a?.[Op],{...m,slotName:Op})]})]}),a?.[Ep]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(a?.[Ep],{...m,slotName:Ep})}):null,o(jp,{}),o(Lp,{}),o(_p,{__html:d?.cookieContent?.__html})]})}));Object.assign(Up,{childrenTypes:[],slots:()=>[Ap,Op,Ep]});e.Blocks=Rp,e.ContentPage=Up,e.handlerDecorator=me,e.joinList=Sr,e.locationNavigator=Qt,e.packageVersion="0.14.775",e.projectSettings=D,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=O,e.useRouter=R,Object.defineProperty(e,"__esModule",{value:!0})}));
|