@redneckz/wildless-cms-uni-blocks 0.14.161 → 0.14.162
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 +2 -2
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Footer/Contacts.js +1 -1
- package/dist/components/Footer/Contacts.js.map +1 -1
- package/lib/components/Footer/Contacts.js +1 -1
- package/lib/components/Footer/Contacts.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +2 -2
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Footer/Contacts.js +1 -1
- package/mobile/dist/components/Footer/Contacts.js.map +1 -1
- package/mobile/lib/components/Footer/Contacts.js +1 -1
- package/mobile/lib/components/Footer/Contacts.js.map +1 -1
- package/mobile/src/components/Footer/Contacts.tsx +1 -1
- package/package.json +1 -1
- package/src/components/Footer/Contacts.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=g((({children:e})=>f?e:null));const y=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}};function v(){return v._impl()}v._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),v.setup=e=>{v._impl=e};const N=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),w={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},k=g((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:i="p-xl",padding:r,block:s,tag:o="section",role:c,children:d,style:m})=>{const h=o,p=v(),[g,x]=n(!1);a((()=>y.subscribe("tab",(e=>{e.groupName&&e.groupName!==s?.labelGroup||x(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s,p]);const f=t&&l;return u(h,{className:N("@container font-sans",f?"group":"",w[t],g?"hidden":"",r||i,e),...f?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:c,style:m,children:d})})),S={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},C={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=g((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=S[l]||"h3";return u(i,{className:N("font-sans m-0",C[t],e),children:n||a})})),I=g((({children:e,...t})=>u("p",{className:N("font-sans",Object.values(t)),children:e}))),B={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},M=g((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=B[l],m={marginTop:d.descriptionStyle};return p(k,{className:N(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(T,{className:N("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(I,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),P=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),R=[];function A(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=P,blocksRegistry:r={},ancestors:s=R}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:N(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const V=[],z=(e,{key:t,ancestors:l=V,slotName:n=null,extraProps:a,renderProps:i=A,...r})=>{const s=a?(e,t)=>A(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||V,[r.parent,n]]:l},a)))};function D({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?z(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const _=e=>Boolean(e?.includes(":")),E=(e,t)=>Boolean(e&&!_(e)&&(!t||"_self"===t)),j=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),F=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var O=Object.freeze({__proto__:null,isURL:_,isLocalURL:E,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:j,joinPath:F});const L="/api/",$=`${L}v1/storage`,U=e=>(t,l=d.BASE_PATH)=>{if(!t||_(t)||[d.CDN,L].some((e=>H(t,e))))return t;if(/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(t))return`${$}/${t}/file`;const n=t.startsWith("/");return F(H(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},H=(e,t)=>t&&e&&e.startsWith(t),K={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},W=g((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const o=v(),c="normal"===i?`${l}.svg`:`sprites.svg#${l}`,m=U(o)(F(d.CDN,"/icons/",c));return"normal"===i?u("img",{className:e,src:m,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:Y(e,s)}):u(X,{className:e,children:p("svg",{className:N(G(r),K[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:m,xlinkHref:m})]})})})),Y=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},G=e=>e?"":"w-full h-full",X=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),q=(e,t)=>l=>l&&!_(l)?U(e)(F(t,l)):l,J=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=v();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(J).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:q(a,n)(e),type:ee(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?Z({...t,src:q(a,n)(t.src)},l):null]})})),Z=(e,t="")=>u("img",{src:e.src,className:N("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),ee=e=>e?`image/${String(e)}`:void 0,te=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(W,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(Q,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),le={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ne="bg-main-divider text-main-disabled",ae={primary:ne,secondary:ne,white:ne,link:"",transparent:"",gray:ne,"":""},ie="text-center font-sans select-none",re={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","":""},se=({className:e,rounded:t,version:l})=>[ie,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?le[l]:"",t?"rounded-full":"rounded-md",e].join(" "),oe=()=>({open:(e,t={})=>y.fire("dialog",{type:"open",dialog:e,...t}),close:()=>y.fire("dialog",{type:"close"}),closeAll:()=>y.fire("dialog",{type:"close",all:!0})}),ce=(e,t)=>ce._impl(e,t);function de(e={}){const{isRemote:t,basePath:l}=e,n=v(),{closeAll:a}=oe();return e=>({...e,href:t&&!l?e.href:U(n)(e.href,l),"aria-label":e.text,onClick:ce(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&E(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}ce._impl=e=>e,ce.setup=e=>{ce._impl=e};const me=g((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=ue(e)?"hidden lg:block":"";return p("div",{className:N(he(e),"flex gap-xs"),children:[n?u("div",{className:N(r,re[i]),children:n}):null,ue(e)?p("div",{className:"whitespace-pre",children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:N(r,re[i]),children:a}):null]})})),he=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return N("group/btn items-center justify-center",ue(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},ue=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),pe=({className:e,rounded:t,version:l})=>["inline-block",ie,l?ae[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ge=g((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=de()({onClick:r,href:n,...a}),o=t??u(me,{...s});return u(e?fe:xe,{...s,children:o})})),xe=g((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:se({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),fe=g((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:pe({className:e,rounded:n,version:l}),children:a})));function be(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"hidden sm:flex items-center gap-s",children:[u("div",{className:se({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(te,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(ge,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const ye={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},ve=g((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:r="",buttons:s,leftImage:o,rightImage:c,imageAlign:d,isImageAlwaysOnRight:m=!1,isImageSecondary:h=!1,backwardButton:g,children:x,...f})=>{const b=v(),y=i((e=>{e?.preventDefault(),b.back()}),[]);return p("div",{className:Ne(n,l,e),children:[g?be(t,y):null,a?u("div",{className:"relative h-full",children:a}):null,p("div",{className:N("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[Te(o,{imageAlign:d,className:"mx-auto"}),p("div",{className:N("grid gap-3xl",c?"@xl:grid-cols-2":"",o?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[p("div",{className:"grow space-y-lg min-w-fit",children:[r,x]}),Ce(D({...f,extraProps:{className:"@container-normal"}})),Te(c,{className:N("@xl:justify-self-end @xl:col-start-2",s?we(m):"",ke(m),Ie(h)),imageAlign:d}),Se(s)]})]})]})})),Ne=(e="",t="",l="")=>N("relative flex flex-col gap-3xl overflow-hidden",e||t,l),we=e=>e?"row-span-2":"@xl:row-span-2",ke=e=>e?"col-start-2 self-center":"",Se=e=>e?u("div",{className:"self-end",children:e}):null,Ce=e=>e&&e?.length?u("div",{className:"flex items-start justify-end",children:e}):null,Te=(e,{className:t,imageAlign:l})=>e?u("div",{className:N("shrink-1/2 justify-self-center",l&&ye[l],t),children:e}):null,Ie=e=>e?"hidden @xl:block":"",Be=(e=[])=>e.reduce(((e,t)=>e+t),0),Me=(e=[])=>e?.length?Be(e)/e.length:0,Pe=(e,t="normal")=>e?u("div",{className:N("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:u(te,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Re=g((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?u("div",{"data-component":"rich-text-container",children:u("div",{className:N(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Ae=(e,t)=>e?u(I,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ve=g((({children:e,...t})=>u("span",{className:N("font-sans",Object.values(t)),children:e}))),ze=(e,t)=>e?u(Ve,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,De=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Re,{...e},`rte-${t}`):["label"in e?ze(e.label,t):null,"description"in e?u("span",{className:e.descriptionClassName,children:Ae(e.description,t)},String(t)):null],_e=g((({className:e,benefitsVersion:t,...l})=>p("div",{className:N("flex gap-m min-w-56 items-center",e),children:["icon"in l?Pe(l.icon,t):null,u("div",{children:De(l)})]}))),Ee=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),je=e=>{return((t=e.map(Ee))?.length?Math.sqrt(Math.abs(Me(t.map((e=>e**2)))-Me(t)**2)):0)>16;var t},Fe=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Oe=e=>!e.some(Fe),Le=g((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:N("flex gap-x-m gap-y-s",je(l)||Oe(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(_e,{benefitsVersion:t,...e},String(l))))}):null)),$e=g((({className:e,benefits:t})=>t?.length?u("div",{className:N("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(De)}):null)),Ue=g((({isTabularBenefits:e,...t})=>u(e?$e:Le,{...t}))),He=e=>Boolean(e?.src||e?.icon),Ke=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:N("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map(We(l))}):null,We=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o=Ye(a,r),c=Ye(i,r);return n||a?.icon?u(ge,{className:N("basis-full @lg:basis-auto",e),appendLeft:Ge({...a,iconVersion:o}),appendRight:Ge({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Ye=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Ge=e=>He(e)?u(te,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Xe=g((({className:e,isDotted:t,dotClassName:l,children:n})=>p("div",{className:N("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:N("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,u("span",{children:n})]}))),qe={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},Je=g((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=qe[n];return l?.length?u("section",{className:N("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>u(Xe,{isDotted:t,dotClassName:N(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),Qe=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),Ze=g((({priceList:e})=>e?.length?u("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:e.map(et)}):null)),et=({label:e,amount:t})=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",children:[u(Ve,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?p("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Qe(2)(t)," ₽"]}):null]}),tt=g((({className:e,tags:t})=>t?.length?u("div",{className:N("flex flex-wrap gap-xs",e),role:"list",children:t.map(lt)}):null)),lt=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(Ve,{size:"text-m",font:"font-light",children:e})},String(t)),nt={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},at=g((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m,items:h,isDotted:g=!0,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:C,...T})=>{const I=y?.src?u(te,{image:y}):null,B=u(M,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),P=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(ve,{className:e,padding:t,defaultPadding:l,...m?{title:B}:{insetTitle:B},...it(I,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ke(b),backwardButton:S,...T,children:p("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?u(Ue,{benefitsVersion:s,isTabularBenefits:o,benefits:P}):null,d?u(Re,{__html:d}):null,h?.length?u(Je,{items:h,isDotted:g,listItemSize:nt[i]}):null,C,x?.length?u(Ze,{priceList:x}):null,rt(f)]})})})),it=(e,t)=>t?{rightImage:e}:{leftImage:e},rt=e=>e?.length?u(tt,{tags:e}):null,st=g((({className:e,padding:t,...l})=>u(k,{className:N("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:u(at,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})));st.childrenTypes=["UnitBlock"];const ot=e=>null!=e,ct=new Map,dt=e=>Boolean(e?.every((e=>Array.isArray(e)?dt(e):!e||"string"==typeof e))),mt=e=>dt(e)?e.toString():"";function ht(e,t,{fallback:l,cache:i}={}){const s=r((()=>ut(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(ot))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=ct)=>l=>{const n=mt(l),a=t.get(n);if(n&&ot(a))return a;const i=e(...l);return n&&ot(i)&&t.set(n,Promise.resolve(i)),i})(t,i)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function ut(e){return Array.isArray(e)?e:e instanceof Function?ut(e()):[e]}async function pt(e,t){try{return e?await gt(e,t):null}catch(e){console.error(e)}return null}const gt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),xt={},ft="/wcms-resources";function bt(e,t={}){const{fallback:l=xt,pathDir:n=ft}=t,{data:a}=ht(e?`${n}/${e}.json`:null,gt,{fallback:l});return a||xt}const yt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),vt=g((e=>{const t=((e="reklamnaya-plitka")=>{const t=bt(e),l=r((()=>yt(0,t?.items?.length)),[t]);return t?.items?.[l]})(e.options?.page?.adSourceBook);return t?u(b,{children:u(st,{...t,...e})}):null})),Nt=e=>e?.replace(/[^+\d]/g,"");const wt=e=>e&&"+7 ("!==e?{secondaryPhoneNumber:Nt(e)}:{},kt=e=>e,St=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[a,r]=n(e),[o,c]=n(!1),[d,m]=n({}),h=s({}),u=i(((e,t)=>{const{parse:l=kt,format:n=kt}=t||{};return h.current||(h.current={}),h.current[e]||=t=>{r((n=>({...n,[e]:l(t)}))),m((t=>({...t,[e]:!0})))},{value:n(a[e]),isDirty:o||d[e],onChange:h.current[e]}}),[a,o,d]),p=i((e=>{r(e),m(e)}),[]),g=i((()=>{r(e),c(!1),m({})}),[e]),x=i((e=>{e.preventDefault(),t?g():c(!0),l&&l(a)}),[l,a]);return[a,{isDirty:o||Object.values(d).some(Boolean),field:u,update:p,reset:g,onSubmit:x}]},Ct=g((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:N("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:N("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?u(Ve,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Tt=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],It=e=>!e?.length,Bt=e=>t=>l=>e(l)?[]:[t],Mt=g((({text:e,link:t})=>p(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(Ve,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?u(ge,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:u(Ve,{children:t.text})}):null]}))),Pt="container space-y-lg",Rt="w-full max-w-xl space-y-s m-auto",At=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Vt=g((({title:e,children:t})=>p("fieldset",{className:"grid @xl:flex @xl:justify-between gap-lg border-b border-b-main-divider @xl:border-none",children:[e?u("legend",{className:"w-full",children:u(T,{title:e,headingType:"h6",className:"@xl:text-center"})}):null,t]}))),zt="@xl:w-1/2 space-y-s",Dt=g((({key:e,className:t="",id:l,name:n,type:r="text",label:o,placeholder:c,value:d="",valid:m=!0,children:h,onChange:g,onFocus:x,onBlur:f,pattern:b,autoFocus:y=!1,isTextarea:v=!1})=>{const w=s(null),k=i((e=>{g&&g(e.target?.value||"")}),[g]);a((()=>{y&&w.current?.focus()}),[y,w]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=h?"pr-3xl":"",T=Et(m);return p("div",{className:N("relative",t),children:[p("label",{children:[o?_t(o):null,v?u("textarea",{className:N("block resize-y min-h-24",S,T),id:N("textarea",l),name:n||l,placeholder:c,value:d,onInput:k,onFocus:x,onBlur:f},e):u("input",{type:r,className:N("h-14",S,C,T),ref:w,id:l,name:n||l,placeholder:c,value:d,onInput:k,onFocus:x,onBlur:f,pattern:b},e)]}),h]})})),_t=e=>u("div",{className:"mb-xs",children:u(Ve,{size:"text-m",font:"font-light",children:e})}),Et=e=>e?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error",jt=e=>u("div",{className:"h-4",children:e?u(Ve,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Ft=g((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,...o})=>p("div",{className:N("shrink-0 w-full",e),children:[u(Dt,{type:"text","aria-label":t,label:t&&o?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:o?.errors&&!t?`${n}*`:n}),jt(a)]}))),Ot=e=>"_"===e,Lt=e=>/\d/.test(e),$t=e=>Ot(e)||Lt(e),Ut=[..."+7 (___) ___-__-__"],Ht=Ut.findIndex(Ot),Kt=Ut.map(((e,t)=>$t(e)?Ut.slice(0,t).filter($t).length:-1));const Wt=g((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Ut.map(((e,l)=>Lt(e)?e:t.charAt(Kt[l])||e)),n=Kt.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Ht,n)):l).join("")}(e))),[t]);return u(Dt,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Yt=g((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>p("div",{className:N("shrink-0 w-full",e),children:[u(Wt,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),jt(n)]}))),Gt="Некорректно заполненное поле",Xt=Bt((e=>null!=e&&""!==e))(Gt),qt=Bt((e=>"string"==typeof e&&e.length>1))(Gt),Jt=Bt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Gt),Qt=(Zt=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Bt((e=>"string"==typeof e&&Zt.test(e))))(Gt);var Zt;const el=Bt((e=>"boolean"==typeof e&&e))(Gt),tl=(e,t)=>p(Vt,{title:t,children:[p("div",{className:zt,children:[u(Ft,{label:"Наименование организации",...At(e("fullName"),Xt)}),u(Ft,{label:"Контактное лицо",...At(e("name"),qt)})]}),p("div",{className:zt,children:[u(Ft,{label:"ИНН",...At(e("inn"),Jt)}),u(Yt,{label:"Телефон",...At(e("phone"),Qt)})]})]}),ll=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}];function nl(){const{data:e}=ht("/api/v1/regions",gt);return e||[]}function al(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const il=e=>e?.text||e?.key||"";function rl(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function sl(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return rl(globalThis.document,"click",l),t}const ol=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,cl=g((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:ol(t,n).map((e=>p("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[u("span",{className:"min-h-6",children:il(e)}),u(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:N("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function dl({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:o,iconVersion:c}){const d={open:(e,t)=>y.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>y.fire("popup",{type:"update",popup:e,...t}),close:()=>y.fire("popup",{type:"close"})},m=i((()=>{d.close(),o&&o()}),[o]),h=i((e=>{m(),r&&r(e)}),[m,r]),p=s(null),g=sl(m);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:o}=a.getBoundingClientRect();d.update(u(cl,{popupRef:g,options:t,value:l,query:n,onChange:h,iconVersion:c}),{top:i+window.scrollY+o,left:r,width:s})}),[e,t,l,n,h]),p}const ml=g((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:o="",isSearch:c=!1,iconVersion:d,onChange:m})=>{const[h,{setFalse:g,setTrue:x}]=al(),[f,b]=n(""),y=i((()=>{b(""),g()}),[]),v=dl({isOpen:h,options:l,value:a,query:f,onChange:m,onClose:y,iconVersion:d});return p("div",{className:e,children:[hl(t),p("div",{className:N("relative",h?"z-20":"z-10"),ref:v,children:[p("div",{className:N("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",pl(s,r)),onClick:h?y:x,children:[u("p",{className:"p-m pr-8 flex items-center overflow-hidden text-ellipsis",children:il(a)||o}),ul(h,d)]}),c&&h?u("div",{className:N("absolute top-0 w-full z-20"),children:u(Dt,{type:"text",autoFocus:!0,value:f,onChange:b})}):null]})]})})),hl=e=>e?u("div",{className:"mb-xs",children:u(Ve,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,ul=(e,t)=>u(W,{className:N("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),pl=(e,t)=>N(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),gl=g((({className:e="",label:t,error:l,...n})=>p("div",{className:e,children:[u(ml,{...n,valid:!l,label:n?.errors?`${t}*`:t}),jt(l)]}))),xl=g((({field:e})=>{const t=nl();return u(gl,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...At(e("region"),Xt)})})),fl=({field:e,title:t})=>p(Vt,{title:t,children:[u("div",{className:zt,children:u(gl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:ll,...At(e("acquiringType"),Xt)})}),u("div",{className:zt,children:u(xl,{field:e})})]});function bl({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const yl={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"},vl={primary:N("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:N("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},Nl=g((({children:e,...t})=>{const l=e=>({...e,onClick:ce(bl(e),e)}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:o=!0,role:c,onClick:d}=l(t);return u("button",{className:N("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":N(yl[a],vl[a]),o?"rounded-md":"",n),type:s,role:c,onClick:d,children:e})})),wl=(e,t)=>u(Nl,{className:N("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),kl={typeForm:{key:"acqr",text:"Предупреждение о мошенничестве"},acquiringType:{key:"trade",text:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},Sl=Tt({acquiringType:Xt,region:Xt,fullName:Xt,inn:Jt,name:qt,phone:Qt}),Cl=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:a,...i}=e,r=Tl(t?.key),s={partnerComments:`Вид эквайринга=${t?.text||""}${r?`/Онлайн касса=${l}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`,...i};It(Sl(e))&&n(s,!1)}),[n]),[,{field:r,...s}]=St(kl,{onSubmit:a}),o=Tl(r("acquiringType").value?.key);return p("form",{className:Pt,onSubmit:s.onSubmit,children:[fl({field:r,title:"Вид эквайринга и регион"}),tl(r,"Данные организации"),o?p("div",{children:[u(Ct,{text:"Хочу купить онлайн-кассу",...r("onlineCheckout")}),u(Ct,{text:"Хочу купить POS-терминал",...r("posTerminal")})]}):null,wl(t),u(Mt,{link:l})]})})),Tl=e=>"all"===e||"trade"===e,Il=g((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return u("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),Bl=[{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"}],Ml=g((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Il,{paths:Bl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:N("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Pl(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(Ve,{size:"text-l",font:"font-light",children:l})}):null]})})})),Pl=e=>N("rounded border",e?"bg-primary-main":""),Rl=g((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>p("div",{className:N("shrink-0 w-full",e),children:[u(Ml,{text:t,value:l,disabled:a,onChange:r},n),jt(i)]}))),Al=(e,t,l)=>p("div",{className:"flex gap-m flex-col lg:flex-row w-full justify-between items-baseline",children:[p("div",{children:[p("div",{className:"flex gap-3",children:[u(Ml,{...e}),u(Mt,{text:"Согласен с ",link:t})]}),jt(At(e,el).error)]}),wl(l)]}),Vl=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},zl=()=>{},Dl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const o=[];let c=1;for(let d=0;d<6;d++){const m=[];for(let o=0;o<7;o++)if(0===d&&o<t)m.push(u("td",{},`empty-${o}`));else if(c>l)m.push(u("td",{},`empty-${o}`));else{const t=new Date(a,n,c),l=_l(t,e),o=El(t,i,r);m.push(u("td",{children:u("div",{className:jl(l,o),onClick:()=>!o&&s(t),children:c})},`day-${c}`)),c++}o.push(u("tr",{children:m},`row-${d}`))}return o},_l=(e,t)=>t&&e.toDateString()===t.toDateString(),El=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),jl=(e,t)=>N("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Fl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Ol=g((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=zl})=>{const o=i((e=>s(e)),[]),{firstDayOfWeek:c,totalDays:d}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return p("table",{className:"mx-auto",children:[u("thead",{className:"text-gray font-light",children:u("tr",{children:Fl.map(((e,t)=>u("th",{className:"p-s",children:e},String(t))))})}),u("tbody",{children:Dl({firstDayOfWeek:c,today:e,totalDays:d,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:o})})]})})),Ll=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],$l=Ll.map((e=>({key:e}))),Ul=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Hl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Kl={className:"min-w-32",iconVersion:"black",isBorder:!1},Wl=g((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:o})=>{const[c,{setValue:d}]=al(!1),[m,h]=n(l?.getMonth()||(new Date).getMonth()),[g,x]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:f,handleNextMonth:b,handleSelectMonth:y,handleSelectYear:v,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=sl(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Ll.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:$l,yearsOptions:Ul,ref:s}})({onYearSelect:x,onMonthSelect:h,onShowCalendar:d,selectedYear:g,selectedMonth:m,showCalendar:c});return p("div",{className:N(e,"relative"),ref:C,children:[u(Ve,{size:"text-m","font-weight":"font-light",children:t}),Yl(S,l,a),c?p("div",{className:"absolute bg-white z-20 select-none",children:[p("div",{className:"flex gap-s",children:[u("div",{className:"my-auto",onClick:f,children:u(W,{...Hl,className:"-rotate-90 cursor-pointer"})}),u(ml,{onChange:y,value:{key:Ll[m]},options:w,...Kl}),u(ml,{onChange:v,value:{key:String(g)},options:k,...Kl}),u("div",{className:"my-auto",onClick:b,children:u(W,{...Hl,className:"rotate-90 cursor-pointer"})})]}),u(Ol,{today:l,currentMonth:m,currentYear:g,onDateSelect:o,min:r,max:s})]}):null]})})),Yl=(e,t,l)=>p("div",{onClick:e,className:N("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[u(I,{children:t&&Vl(t)}),u(W,{...Hl,name:"CalendarIcon"})]}),Gl=g((({className:e,label:t,value:l,error:n,onChange:a,...i})=>p("div",{className:N("shrink-0 w-full",e),children:[t?u("div",{className:"mb-xs",children:u(Ve,{size:"text-m",font:"font-light",children:i?.errors?`${t}*`:t})}):null,u(Wl,{value:l,onChange:a,valid:Boolean(!n)}),jt(n)]}))),Xl={surname:"",name:"",middleName:""},ql=(e,t=!0)=>p("div",{className:"space-y-s",children:[u(Ft,{label:"Фамилия",...At(e("surname"),qt)}),u(Ft,{label:"Имя",...At(e("name"),qt)}),u(Ft,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),t?u(Gl,{label:"Дата рождения",...At(e("birthday"),Xt)}):null]}),Jl={...Xl,typeForm:{key:"ANTIFRAUD",text:"Предупреждение о мошенничестве"},phone:"",birthday:void 0,isClient:!1,comment:"",consentDataProcessing:!1},Ql=Tt({typeForm:Xt,surname:Xt,name:qt,birthday:Xt,phone:Qt,comment:Xt,consentDataProcessing:el}),Zl=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{It(Ql(e))&&l(e,!0)}),[l]),[,{field:a,...r}]=St(Jl,{onSubmit:n});return u("form",{className:Pt,onSubmit:r.onSubmit,children:u(Vt,{children:p("div",{className:Rt,children:[ql(a,!0),u(Yt,{label:"Телефон",...At(a("phone"),Qt)}),u(Rl,{...a("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}),u(Ft,{...At(a("comment"),Xt),placeholder:"Комментарий",isTextarea:!0}),Al(a("consentDataProcessing"),t,e)]})})})})),en={typeForm:{key:"bcrd",text:"Заявка на бизнес-карту"},name:"",phone:"",inn:"",email:""},tn=Tt({region:Xt,name:qt,phone:Qt,inn:Jt,email:Xt}),ln=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{It(tn(e))&&n(e)}),[n]),[,{field:r,...s}]=St(en,{onSubmit:a});return p("form",{className:Pt,onSubmit:s.onSubmit,children:[u(xl,{field:r}),p(Vt,{children:[p("div",{className:zt,children:[u(Ft,{label:"Контактное лицо",...At(r("name"),qt)}),u(Ft,{label:"ИНН",...At(r("inn"),Jt)})]}),p("div",{className:zt,children:[u(Yt,{label:"Телефон",...At(r("phone"),Qt)}),u(Ft,{label:"Электронная почта",...At(r("email"),Xt)})]})]}),wl(t),u(Mt,{link:l})]})})),nn={typeForm:{key:"CORRUPTION",text:"Факты коррупции"},...Xl,phone:"",email:"",comment:"",consentDataProcessing:!1},an=Tt({typeForm:Xt,surname:Xt,name:qt,region:Xt,phone:Qt,email:Xt,comment:Xt,consentDataProcessing:el}),rn=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{It(an(e))&&l(e,!0)}),[l]),[,{field:a,...r}]=St(nn,{onSubmit:n});return u("form",{className:Pt,onSubmit:r.onSubmit,children:u(Vt,{children:p("div",{className:Rt,children:[ql(a,!1),u(xl,{field:a}),u(Yt,{label:"Телефон",...At(a("phone"),Qt)}),u(Ft,{label:"Электронная почта",...At(a("email"),Xt)}),u(Ft,{...At(a("comment"),Xt),placeholder:"Ваше сообщение",isTextarea:!0}),Al(a("consentDataProcessing"),t,e)]})})})})),sn=[];const on=async e=>await pt(e,{method:"GET"})||sn;function cn(){const{data:e}=ht("/api/v1/premiumBranchesByRegions",gt);return e||[]}const dn=g((({field:e,regionKey:t,isPremium:l=!1})=>{const n=l?cn().find((e=>e?.region===t))?.branches:function(e){const{data:t}=ht(e?`/api/v1/branches?regionCode=${e}`:null,on);return t||sn}(t).filter((e=>e?.address));return u(gl,{label:"Адрес",placeholder:"Выберите адрес",options:(n||[]).map((({address:e=""})=>({key:e,text:e}))),...At(e("addressBranch"),Xt)})})),mn=["От 1 000 ₽","До 1 000 000 000 ₽"],hn=["От 1 мес","До 15 лет"],un=(e,t)=>p(Vt,{title:t,children:[p("div",{className:zt,children:[u(Ft,{label:"Наименование организации",...At(e("fullName"),Xt)}),u(Ft,{label:"ИНН",...At(e("inn"),Jt)}),u(Yt,{label:"Телефон",...At(e("phone"),Qt)})]}),p("div",{className:zt,children:[u(Ft,{label:"Годовая выручка, ₽",...At(e("annualRevenue"),Xt)}),u(Ft,{label:"Контактное лицо",...At(e("name"),qt)}),u(Ft,{label:"Электронная почта",...At(e("email"),Xt)})]})]}),pn=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},gn=(e,t,l)=>Math.max(t,Math.min(e,l));function xn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function fn({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:N("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=xn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const bn=1,yn=100,vn=g((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:bn),max:s=(a.length?a.length-1:yn),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=pn(e,{normalize:(e=0)=>a.length?Nn(a)(e):gn(e,r,s),format:Qe()}),g=i((e=>{m&&m(xn(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(Ve,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:N("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:g,...h}),fn({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),wn(n)]})})),Nn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),wn=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(Ve,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),kn=(e,t)=>p(Vt,{title:t,children:[u("div",{className:zt,children:u(vn,{title:"Сумма, ₽",items:mn,min:1e3,max:1e9,...e("amount")})}),u("div",{className:zt,children:u(vn,{title:"Срок, месяцев",items:hn,min:1,max:180,...e("term")})})]}),Sn={typeForm:{key:"cred",text:"Кредит"},amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",email:"",annualRevenue:""},Cn=Tt({fullName:Xt,annualRevenue:Xt,inn:Jt,name:qt,phone:Qt,region:Xt}),Tn=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,addressBranch:a,annualRevenue:i,...r}=e;It(Cn(e))&&l({...r,addressBranch:a?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${i}`})}),[l]),[a,{field:r,...s}]=St(Sn,{onSubmit:n});return p("form",{className:Pt,onSubmit:s.onSubmit,children:[kn(r,"Параметры"),un(r,"Данные организации"),p(Vt,{title:"Офис банка",children:[u("div",{className:zt,children:u(xl,{field:r})}),u("div",{className:zt,children:u(dn,{field:r,regionKey:a.region?.key})})]}),wl(e),u(Mt,{link:t})]})})),In={typeForm:{key:"dpst",text:"Заявка на депозит"},name:"",phone:""},Bn=Tt({name:qt,phone:Qt}),Mn=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{It(Bn(e))&&l(e)}),[l]),[,{field:a,...r}]=St(In,{onSubmit:n,resetOnSubmit:!1});return u("form",{className:Pt,onSubmit:r.onSubmit,children:u(Vt,{title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",children:p("div",{className:Rt,children:[u(Ft,{label:"Имя",...At(a("name"),qt)}),u(Yt,{label:"Телефон",...At(a("phone"),Qt)}),wl(e),u(Mt,{link:t})]})})})})),Pn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],Rn=[{key:"phone",text:"Телефонный звонок"},{key:"mail",text:"Электронное сообщение"}],An=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Vn={typeForm:Xt,region:Xt,surname:Xt,name:qt,feedbackMethod:Xt,phone:Qt,email:Xt,comment:Xt,consentDataProcessing:el},zn={...Xl,typeForm:{key:"FEEDBACK",text:"Задать вопрос по продуктам и услугам"},serviceDirection:{key:"Физическое лицо"},birthday:void 0,feedbackMethod:{key:"Телефонный звонок"},phone:"",email:"",comment:"",consentDataProcessing:!1},Dn=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{_n(e.typeForm.key,e.serviceDirection?.key)?((e,t)=>{const l=Tt({...Vn,addressBranch:Xt,inn:Jt});It(l(e))&&t(e,!1)})(e,l):"FEEDBACK"===e.typeForm.key?((e,t)=>{const l=Tt({...Vn,birthday:Xt});It(l(e))&&t(e,!0)})(e,l):((e,t)=>{const l=Tt({...Vn,addressBranch:Xt});It(l(e))&&t(e,!0)})(e,l)}),[l]),[a,{field:r,...s}]=St(zn,{onSubmit:n}),o="FEEDBACK_QS"===r("typeForm").value?.key,c=_n(r("typeForm").value?.key,r("serviceDirection").value?.key);return u("form",{className:Pt,onSubmit:s.onSubmit,children:u(Vt,{children:p("div",{className:Rt,children:[u(gl,{label:"Тема",placeholder:"Выберите тему",options:Pn,...At(r("typeForm"),Xt)}),o?u(gl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:An,...At(r("serviceDirection"),Xt)}):null,u(xl,{field:r}),o?u(dn,{field:r,regionKey:a?.region?.key}):null,ql(r,!0),c?p("div",{children:[u(Ft,{label:"ИНН",...At(r("inn"),Jt)}),u(Ft,{label:"Наименование организации",...r("fullName")})]}):null,u(gl,{label:"Способ получения ответа",options:Rn,...At(r("feedbackMethod"),Xt)}),u(Yt,{label:"Телефон",...At(r("phone"),Qt)}),o?p("div",{children:[u(Yt,{label:"Дополнительный телефон",...r("secondaryPhone").value&&"+7 ("!==r("secondaryPhone").value?At(r("secondaryPhone"),Qt):r("secondaryPhone")}),u(Ft,{label:"Электронная почта",...At(r("email"),Xt)}),u(Ft,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...r("bankEmpolee")}),u(Ft,{label:"Дата и время обращения в Банк",...r("applicationDate")})]}):u(Ft,{label:"Электронная почта",...At(r("email"),Xt)}),u(Ft,{...At(r("comment"),Xt),placeholder:"Ваше сообщение",isTextarea:!0}),Al(r("consentDataProcessing"),t,e)]})})})})),_n=(e="",t="")=>"FEEDBACK_QS"===e&&"Юридическое лицо / ИП"===t,En=g((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=bt(l||"regions-grant-support"),[i,r]=n({key:""}),s=se({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s",children:[a?u(gl,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:a.map((({name:e=""})=>({key:e,text:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(ge,{href:o,target:"_blank",className:N("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),jn={...Xl,phone:"",email:"",birthday:void 0,consentDataProcessing:!1},Fn=Tt({surname:qt,name:qt,phone:Qt,email:Xt,birthday:Xt,consentDataProcessing:el}),On=g((e=>{const{button:t,link:l,product:n="",onSubmit:a}=e,r=i((e=>{It(Fn(e))&&a({...e,product:n},!0)}),[a]),[,{field:s,...o}]=St(jn,{onSubmit:r});return p("form",{className:Pt,onSubmit:o.onSubmit,children:[p(Vt,{children:[p("div",{className:zt,children:[u(Ft,{label:"Фамилия",...At(s("surname"),qt)}),u(Ft,{label:"Отчество (Обязательно, при наличии)",...s("middleName")}),u(Yt,{label:"Телефон",...At(s("phone"),Qt)})]}),p("div",{className:zt,children:[u(Ft,{label:"Имя",...At(s("name"),qt)}),u(Gl,{label:"Дата рождения",...At(s("birthday"),Xt)}),u(Ft,{label:"Электронная почта",...At(s("email"),Xt)})]})]}),Al(s("consentDataProcessing"),l,t)]})})),Ln={typeForm:{key:"SELFCOLLECTION",text:"Самоинкассация"},fullName:"",phone:"",consentDataProcessing:!1},$n=Tt({typeForm:Xt,region:Xt,fullName:Xt,phone:Qt}),Un=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{It($n(e))&&l(e,!1)}),[l]),[,{field:a,...r}]=St(Ln,{onSubmit:n});return u("form",{className:Pt,onSubmit:r.onSubmit,children:u(Vt,{children:p("div",{className:Rt,children:[u(Ft,{label:"ФИО",...At(a("fullName"),Xt)}),u(xl,{field:a}),u(Yt,{label:"Телефон",...At(a("phone"),Qt)}),Al(a("consentDataProcessing"),t,e)]})})})})),Hn=g((({field:e})=>{const t=cn().map((({region:e})=>({key:e,text:e})));return u(gl,{label:"Регион",placeholder:"Выберите регион",options:t,...At(e("region"),Xt)})})),Kn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Wn={typeForm:Kn[0],...Xl,email:"",phone:"",comment:"",consentDataProcessing:!1},Yn=Tt({typeForm:Xt,surname:Xt,name:qt,phone:Qt,email:Xt,addressBranch:Xt,consentDataProcessing:el}),Gn=g((({button:e,link:t,onSubmit:l,defaultType:n="PREMIUMSERVICE"})=>{const a=i((e=>{It(Yn(e))&&l(e,!0)}),[l]),[r,{field:s,...o}]=St({...Wn,typeForm:Xn(n)},{onSubmit:a}),c=r?.region?.key;return p("form",{className:Pt,onSubmit:o.onSubmit,children:[p(Vt,{title:"Ваши данные",children:[p("div",{className:zt,children:[u(Ft,{label:"Фамилия",...At(s("surname"),qt)}),u(Ft,{label:"Отчество (Обязательно, при наличии)",...s("middleName")}),u(Ft,{label:"Электронная почта",...At(s("email"),Xt)})]}),p("div",{className:zt,children:[u(Ft,{label:"Имя",...At(s("name"),qt)}),u(Yt,{label:"Телефон",...At(s("phone"),Qt)}),u(gl,{label:"Тип обслуживания",options:Kn,...At(s("typeForm"),Xt)})]})]}),p(Vt,{title:"Офис банка",children:[u("div",{className:zt,children:u(Hn,{field:s})}),u("div",{className:zt,children:u(dn,{field:s,regionKey:c,isPremium:!0})})]}),u(Ft,{...s("comment"),placeholder:"Комментарий, удобное время и прочее",isTextarea:!0}),Al(s("consentDataProcessing"),t,e)]})})),Xn=e=>Kn.find((t=>t.key===e)),qn=g((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u(Ve,{color:"text-primary-text",children:t}):null]})}))),Jn=e=>{const{value:t,onChange:l}=e("vedTypes");return u(Vt,{children:p("div",{className:"gap-xl grid @xl:flex @xl:items-center",children:[u(qn,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),u(qn,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),u(qn,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),u(qn,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},Qn=({field:e})=>{const t="currencyControl"===e("vedTypes").value;return p("div",{className:"space-y-s",children:[t?u(xl,{field:e}):null,p("div",{className:"grid @xl:grid-cols-2 @xl:gap-x-lg gap-s",children:[t?u(Ft,{label:"ИНН",...At(e("inn"),Jt)}):null,u(Ft,{label:"Наименование организации",...At(e("fullName"),Xt)}),u(Ft,{label:"ФИО",...At(e("name"),qt)}),u(Yt,{label:"Телефон",...At(e("phone"),Qt)}),t?null:u(Ft,{label:"Электронная почта",...e("email")})]})]})},Zn={typeForm:{key:"KVED",text:"Заявка на консультацию ВЭД"},vedTypes:"currencyControl",fullName:"",name:"",phone:"",inn:"",email:"",partnerComments:""},ea={fullName:Xt,name:qt,phone:Qt},ta=Tt({...ea}),la=Tt({...ea,inn:Jt,region:Xt}),na=e=>"currencyControl"===e,aa=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),ia={ApplicationFormBusinessCard:ln,ApplicationFormWed:g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{typeForm:t,fullName:l,name:a,phone:i,email:r,inn:s,region:o,vedTypes:c,partnerComments:d}=e,m={typeForm:t,fullName:l,name:a,phone:i,vedTypes:aa(c),partnerComments:d,...na(c)?{inn:s,region:o}:{email:r}};It((e=>na(e)?la:ta)(c)(e))&&n(m)}),[n]),[,{field:r,...s}]=St(Zn,{onSubmit:a});return p("form",{className:"container space-y-lg",onSubmit:s.onSubmit,children:[Jn(r),u(T,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),Qn({field:r}),u(Ft,{label:"Обращение",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",...r("partnerComments"),isTextarea:!0}),wl(t),u(Mt,{link:l}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),p("div",{className:"flex gap-xl",children:[p("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(te,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(te,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Mn,ApplicationFormCredit:Tn,ApplicationFormAcquiring:Cl,ApplicationFormGrantSupport:En,ApplicationFormIndividuals:On,ApplicationFormFeedback:Dn,ApplicationFormAntiFraud:Zl,ApplicationFormCorruption:rn,ApplicationFormSelfCollection:Un,ApplicationFormUltraPremium:Gn},ra=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(te,{image:{icon:(t?"ResponseOKIcon":"ResponseFailIcon")?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"42",height:"42"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),sa={send:async function(e,t=!1){const l=t?"/api/v1/lead":"/api/v1/sendcorporatelead",{typeForm:n,region:a,phone:i="",email:r,birthday:s,inn:o,fullName:c,addressBranch:d,secondaryPhone:m="",bankEmpolee:h,applicationDate:u,...p}=e,g={typeForm:n,[t?"regionBranch":"region"]:a,[t?"phoneNumber":"phone"]:Nt(i),[t?"email":"mail"]:r,...t?{birthday:s}:{inn:o,fullName:c},..."FEEDBACK"===n?{}:{addressBranch:d,bankEmpolee:h,applicationDate:u,...wt(m)},...p};try{const e=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(g)});return e?.ok?await e.json():null}catch(e){return null}}},oa=g((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async(e,t=!1)=>{const l=da(e),n=await sa.send(l,t)?"OK":"Fail";return s(n),n}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(T,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?ca(l,o):null,r?u(ra,{responseType:r}):null]})})})),ca=(e,t)=>{const l=e?.formType;if(!l||!(l in ia))return null;return u(ia[l],{...e,onSubmit:t})},da=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(t?.region?t?.text:t?.key)||t]))),ma="text-left",ha={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},ua=g((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:N("rounded-icon object-fit flex justify-center items-center",ha[l],e),children:u(W,{...i,width:"54%",height:"54%",name:a})}):null})),pa=g((({className:e="",title:t,benefitList:l,...n})=>p(k,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(T,{headingType:"h3",as:"h2",className:ma,title:t}):null,l?.length?u("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(ga)}):null]}))),ga=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>p("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?u(ua,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?u(te,{className:"shrink-0",image:n}):null,e?p("div",{className:"@sm:h-full space-y-xs",children:[u(T,{headingType:"h6",children:e}),u(Ve,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),u(Je,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),xa=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function fa(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const ba=g((({className:e,style:t,idx:l,activeIndex:n,observerOptions:o,children:c,onIntersection:d})=>{const m=function(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:fa(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}(i((e=>{e.length&&d&&d(l||0,e[e.length-1])}),[d,l]),o);return u("div",{className:N("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:m,children:c})})),ya=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],va=g((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:r=0,padding:o=0,listType:c="horizontal-list",snapAlign:d="snap-center",minHeight:m,children:h,onVisibleItemsChange:p,onVisibleIndicesChange:g})=>{const x={sensitivity:1,rootRef:l},f=s([]),b=i(((e,t)=>{const l=[...f.current||[]];l[e]=t,f.current=l,p&&p(l),g&&g(wa(l))}),[p,g]),y=a>0?r*Number(a)-1:0,v="vertical-list"===c,w="horizontal-list"===c,k={...w?Na(o,y):{},...v?xa(m):{},gap:`${r}px`};return u("div",{className:N("box-border overflow-auto no-scrollbar",c,e),style:k,ref:l,children:(S=(e,l)=>u(ba,{className:N(d,a?ya[a-1]:"",v?"h-full":"",t),style:w?Na(o/4):{},activeIndex:n,idx:l,observerOptions:x,onIntersection:b,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(h)});var S})),Na=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),wa=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ka={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Sa={"horizontal-list":"w-6","vertical-list":"h-6"},Ca=g((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?u("div",{className:N("flex gap-xs",ka[a],i?"group":"",e),"data-ver":i,children:Array.from({length:n}).fill(null).map(((e,n)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?Sa[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Ta=e=>e,Ia=(e=Ta)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Ba=Ia(),Ma=(e=Ta)=>Ia((t=>-e(t))),Pa=Ma(),Ra=e=>t=>e.scrollWidth/t,Aa=e=>(t,l)=>{e.scrollBy({left:l*Ra(e)(t),behavior:"smooth"})},Va=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[Ma()(a),Ia()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Aa(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Aa(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},za=g((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=true,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=Va({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:N(e,"vertical-list"===o?"relative h-full":""),children:[u(va,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(Ca,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Da=(e,t,l)=>{return u(za,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>p("div",{className:N("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(Ve,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?u(te,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?u(Ve,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},_a=g((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(k,{className:N("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[u(M,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Da(e,0,t):null]}))),Ea={start:"justify-start",center:"justify-center",end:"justify-end"},ja=g((({buttons:e,className:t="",align:l,...n})=>{const a=l?N("flex",Ea[l]):"";return u(k,{className:N("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Ke(e)})})),Fa=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})}));const Oa=g((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:u("div",{className:e,ref:i,children:l})})})),La=g((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r})=>p("div",{className:N("flex justify-between @xl:flex-col",e),children:[t?u(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,u("div",l?{children:u(Ve,{size:"text-h3",children:[i,Qe(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:u(Ve,{size:"text-h3",children:"-"})})]}))),$a=1e4,Ua=5e6,Ha=Math.round(29.5),Ka={minSum:$a,maxSum:Ua,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Wa={minSum:$a,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ya={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Ga={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Xa={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},qa=e=>e?u(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,Ja=g((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>p("div",{children:[u(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:Qe(n,{fixed:!0})(e)}),l?u("span",{className:"text-7xl",children:l}):null]}),a&&i?u("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Qa=g((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{className:"space-y-s",children:[u(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u(W,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),u("div",{className:"w-64",children:t?p(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Za=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?u(Qa,{title:e,...i}):p("div",{children:[u("div",{className:"hidden @xl:block",children:u(Ja,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),u("div",{className:"@xl:hidden",children:u(La,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function ei({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${Qe(2)(l.min||0)} ₽`,`До ${Qe(2)(l.max||0)} ₽`];return u(vn,{items:e?n:[],step:t,...l})}function ti(e){const{data:t}=ht(`/wcms-resources/${e}.json`,gt);return t}const li=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=ti(t||"bonus-calculator-data")||Ya,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},ni=g((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=St({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=li(a,t);return p("section",{className:N("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[p("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[ei({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),ei({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?Za({title:"Баллов за месяц",rate:d,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,p("div",{className:"flex flex-col gap-y-xl @xl:w-96",children:[m>=0?u(La,{title:"Баллов за год",value:m}):null,Ke(l,{isVertical:!0}),qa(n)]})]})})),ai=g((({className:e,inputChildren:t,rateChildren:l,resultChildren:n})=>p("section",{className:N("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[u("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:t}),u("div",{className:"border-b border-main-divider md:hidden"}),l,u("div",{className:"flex flex-col gap-2xl sm:w-96 max-w-full",children:n})]}))),ii=(e,t=0)=>e?.sum&&e.sum>=$a&&e.sum<=Ua?e.sum:t,ri=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,si=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,oi={horizontal:"gap-5xl",vertical:"flex-col gap-s"},ci=g((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:N(`flex ${oi[a]}`,l),children:e?.map((({id:e,text:l})=>u(Ml,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),di=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>p("div",{className:"space-y-s",children:[t?u("div",{className:"hidden @5xl:block",children:u(Ve,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?u("div",{className:"@5xl:hidden",children:u(Ve,{color:"text-secondary-text",font:"font-light",children:l})}):null,u(ci,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:N("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),mi=e=>di({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),hi=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:ui([e,t],n),ui=([e,t],l=[])=>({[e]:l.length?Pa(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Ba(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),pi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],gi=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,xi=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},fi=g((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r})=>{const[s,{field:o}]=St({moneyValue:ii(r,1e5),daysValue:ri(r,90),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),c=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=ti(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...Xa,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&gi(o,e)&&pi(n,["minSum","maxSum"],e)&&pi(l,["minDays","maxDays"],e)))||Xa,{rate:m}=d,h=xi(m,e),u=n+h,p=s?.rateRows||[Xa];return{...d,...ui(["minSum","maxSum"],p),...ui(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(s,t?.rateType&&t.sourceBookDir),{income:d,finalSum:m,rate:h,isUnavailableByTerm:g,depositeName:x}=c;return u(ai,{className:e,inputChildren:p("div",{children:[ei({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),(f={title:"Срок, дней",min:c.minDays,max:c.maxDays,...o("daysValue"),value:c.daysValue},u(vn,{items:[`От ${si(f.min||0)}`,`До ${si(f.max||0)}`],step:1,...f})),p("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[bi(c,o),mi({title:"Выплата процентов",orientation:"vertical",...o("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),rateChildren:Za({rate:h,depositeName:x,isShowDepositeName:i,isUnavailableByTerm:g}),resultChildren:p("div",{children:[yi(m,d),Ke(l,{isVertical:!0}),qa(n),qa(a)]})});var f})),bi=(e,t)=>p("div",{className:"space-y-s",children:[u(Ve,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(Ml,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(Ml,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),yi=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0 mb-lg",children:[u(La,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(La,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),vi=({min:e=0,max:t=0,availableMonths:l,...n})=>u(vn,{items:[`От ${Ni(e)}`,`До ${Ni(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Ni=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,wi=e=>di({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),ki=e=>Si({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Si({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Si({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Si({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Si=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Ci=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},Ti=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=ti(t||"credit-calculator-data"),s=i?.rateRows||[Ka],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>ki({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=hi(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=hi(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>ki({row:e,userInputParams:t,paramsViewSettings:l})&&pi(n,["minSum","maxSum"],e)&&pi(a,["minMonths","maxMonths"],e)))||Ka)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=Ci(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},Ii=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=St({moneyValue:ii(i,2e5),monthsValue:ri(i,Ha),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),o=Ti(r,t,a),c=wi({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return u(ai,{className:e,inputChildren:p("div",{children:[ei({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),vi({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),Bi({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),rateChildren:Za({rate:o.rate}),resultChildren:p("div",{children:[u(La,{title:"Ежемесячный платёж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block mb-lg",children:c}),Ke(l,{isVertical:!0}),qa(n)]})})})),Bi=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(Ml,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(Ml,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(Ml,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(Ml,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Mi=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},Pi=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=ti(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?Vi(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):0,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>Ai({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&Ai({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&pi(n,["minSum","maxSum"],t)&&pi(a||r,["minMonths","maxMonths"],t)))||Ga,{rate:d}=c,m=Ri(d,e),h=n+m,u=i?.rateRows||[Ga];return{...c,...ui(["minSum","maxSum"],u),...ui(["minMonths","maxMonths"],u),availableMonths:Mi(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},Ri=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},Ai=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Vi=(e,t)=>e+Math.round((t-e)/2),zi=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:o}]=St({moneyValue:ii(r,2e4),monthsValue:ri(r),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(r?.isRemoteRegistration)}),c=Pi(s,t,i),{defaultMonth:d,rate:m,income:h,finalSum:g}=c,{onChange:x}=o("monthsValue");return a((()=>{!s.monthsValue&&x&&x(d)}),[d]),u(ai,{className:e,inputChildren:p("div",{children:[ei({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),vi({title:"Срок, месяцев",min:c.minMonths,max:c.maxMonths,availableMonths:c.availableMonths,...o("monthsValue"),value:c.monthsValue}),Di({...c,...i},o)]}),rateChildren:Za({rate:m}),resultChildren:p("div",{children:[u(La,{title:"Доход в конце срока",value:h,postfix:"₽",prefix:"+"}),u(La,{title:"Сумма в конце срока",value:g,postfix:"₽"}),Ke(l,{isVertical:!0}),qa(n)]})})})),Di=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?mi({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},di({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},_i=e=>Ei({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Ei({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Ei=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],ji=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=ti(t||"refinancing-calculator-data"),c=o?.rateRows||[Wa],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>_i({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=hi(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=hi(["minMonths","maxMonths"],d,c),g=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>_i({row:e,userInputParams:t,paramsViewSettings:l})&&pi(n+r,["minSum","maxSum"],e)&&pi(i,["minSumOld","maxSumOld"],e)&&pi(r,["minSumExtra","maxSumExtra"],e)&&pi(a,["minMonths","maxMonths"],e)))||Wa)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:x}=g,f=Ci(x,e),b=e.oldMonthlyPayment-f;return r((()=>({...g,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},Fi=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=St({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=ji(i,t,a),o=wi({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return u(ai,{className:e,inputChildren:p("div",{children:[ei({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),ei({title:"Ежемесячный платёж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),vi({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Oi({...s,...a},r),s.isExtraMoney?ei({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,u("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:o})]}),rateChildren:Za({rate:s.rate,fractionDigits:1}),resultChildren:p("div",{children:[u(La,{title:"Ежемесячный платёж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(La,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,u("div",{className:"hidden sm:block mb-lg",children:o}),Ke(l,{isVertical:!0}),qa(n)]})})})),Oi=(e,t)=>p("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?u(Ml,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(Ml,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u(Ml,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Li={CreditCalculatorForm:Ii,DepositCalculatorForm:zi,BusinessDepositCalculatorForm:fi,BonusCalculatorForm:ni,RefinancingCalculatorForm:Fi},$i=g((({className:e,calculatorTabs:t=[],...l})=>u(k,{className:e,defaultPadding:"p-0",...l,children:Hi(t)}))),Ui=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in Li))return null;const l=Li[t];return p("div",{className:"p-xl",children:[e?.calculatorBlock?.title?u(T,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,u(l,{...e.calculatorBlock,isMobile:!0})]})},Hi=e=>{if(!e||!e.length)return null;return 1===e.length?Ui(e[0]):e.map(((e,t)=>u(Fa,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(Oa,{isUnfolded:t,children:Ui(e)}),renderFoldButton:Ki(e)},t.toString())))},Ki=e=>({isUnfolded:t,onToggle:l})=>{const n=e.nav?.align||"text-left";return p("button",{onClick:l,className:"w-full p-xl bg-primary-main flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(W,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(Ve,{align:n,color:"text-white",children:e.nav?.title}),u(Ve,{align:n,size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(W,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]})},Wi=g((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=pn(e,{normalize:(e=a)=>l&&n?String(gn(Number(Yi(e)),l,n)):Yi(e),format:Qe(r)}),c=i((e=>t&&t(Yi(e))),[t]);return u(Dt,{onChange:c,...s,...o})})),Yi=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Gi=g((e=>u(Wi,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(Ve,{size:"text-xl",font:"font-light",children:"₽"})})}))),Xi={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},qi={amount:1500},Ji=g((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...o})=>{const[{amount:c},{field:d}]=St(qi),[m,h]=n(!1);return a((()=>{h(c<=0)}),[c]),p(k,{className:N("flex flex-col items-center",e),defaultPadding:"p-6xl",...o,children:[t?u(T,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Xi[s],children:[u(Gi,{valid:!m,placeholder:i,label:l,...d("amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:c}),r?.text?u(Nl,{className:"w-full mt-lg",type:"submit",disabled:m,children:r.text}):null]})]})})),Qi=(e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},Zi=g((({className:e,disabled:t,...l})=>u(ge,{rounded:!0,className:N("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:u(te,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),er=g((e=>u(Zi,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),tr=g((e=>u(Zi,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),lr="absolute top-[calc(50%-24px)] z-40",nr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",ar=g((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<l-1:c,x=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[ir(e),h?u(er,{className:N(lr,n?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(tr,{className:N(lr,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),ir=e=>p("div",{children:[e.canScrollLeft?u("div",{className:N(nr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:N(nr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),rr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",sr=({className:e,text:t="ХИТ"}={})=>p("div",{className:N("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[u(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(I,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),or="relative h-full",cr={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},dr=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(ur);return D({...n,renderProps:(n,a,r)=>p("div",{className:mr(n,{someCardsHighlighted:i}),children:[A(n,a,{className:hr(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),ur(n)?sr({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},mr=(e,{someCardsHighlighted:t})=>N(or,t&&(ur(e)?"pt-3xl":"pt-3xl sm:pt-16")),hr=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>N(or,"min-w-80",cr[n],t&&(ur(e)?"pt-3xl sm:pt-16":"pt-3xl"),rr(l),l&&"h-full"),ur=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,pr=g((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...o})=>{const{blocks:c=[]}=o.block||{},d=t||c?.length,[m,{inc:h,dec:g}]=Qi({itemCount:d,visibleItemCount:l},Math.floor(l/2)),[x,f]=Va({itemCount:d}),[b]=f.visibleIndicesRange,y=c&&"CarouselBankHistoryCard"===c[0]?.type;return p(k,{className:e,defaultPadding:"p-6xl",...o,children:[p("div",{className:N(a?"flex justify-center":"","relative max-w-full"),children:[u(va,{containerRef:x,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:dr({noCardBorder:n,activeIndex:m,cardSize:s,...o})}),u(ar,{scroll:f,arrowsPadded:i,onScrollLeft:g,onScrollRight:h,hasEdgeBlocks:y,activeIndex:m,itemCount:d})]}),u(Ca,{className:"@5xl:hidden",containerRef:x,activeIndex:b,dotCount:d,listType:"horizontal-list"})]})}));pr.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],pr.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const gr=g((({title:e,description:t,className:l})=>u(k,{className:l,defaultPadding:"p-6xl",children:u(M,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),xr="z-10 border border-solid w-full h-full",fr=N(xr,"absolute hidden @xl:block border-transparent"),br=g((({className:e,title:t,description:l,button:n,...a})=>u(k,{className:N("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative h-full",children:[u("div",{className:N(fr,"top-9 right-12 bg-green-dark")}),u("div",{className:N(fr,"top-6 right-8 bg-green")}),u("div",{className:N(fr,"top-3 right-4 bg-green-light")}),p("div",{className:N(xr,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[u(M,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ke([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),yr={black:"bg-black",white:"bg-white"},vr=g((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:o,...c})=>u(k,{className:N("flex flex-col justify-left",e),defaultPadding:"p-2xl",...c,children:p(ve,{className:"h-full",padding:o,title:u(M,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?u(te,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Ke([i],{buttonClassName:"w-full self-end"}),children:[r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(Ve,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Nr)]}):null,a?p(Ve,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Nr=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${yr[e]}`},String(t)),wr=g((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>p(l,{tag:l,className:N("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?u("div",{children:e}):null,t?u("div",{children:t}):null]}))),kr=g((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>u(wr,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:N("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:u(Ve,{size:"text-h4",children:t}),iconNode:l?u(te,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Sr=({isUnfolded:e,onToggle:t})=>u(kr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Cr=g((({className:e="",icon:t,...l})=>{const n=de(),{text:a,href:i,target:r,onClick:s}=n(l);return a?u("div",{className:N("w-full pb-lg",e),children:p("a",{className:"bg-white flex justify-between rounded-md w-full p-lg whitespace-nowrap",role:"link",href:i,target:r,onClick:s,children:[p("div",{className:"flex items-center space-x-lg",children:[t?u(te,{imageClassName:"text-green-dark",image:t,width:"20",height:"20"}):null,u(Ve,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})]}),u(W,{className:"text-green",name:"ArrowRightIcon",width:"20",height:"20"})]})}):null})),Tr=g((({className:e,additionalDescription:t,description:l,links:n=[],title:a,...i})=>p(k,{className:e,...i,children:[p("div",{children:[u(M,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),u(M,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?Ir(n):null]}))),Ir=(e,t=3)=>{const l=(e||[]).map(((e,t)=>u(Cr,{...e},String(t)))),[n,a]=t>0?[l.slice(0,t),l.slice(t)]:[l,[]];return u("div",{className:"mt-4xl",children:a.length>0?u(Fa,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[u("div",{className:"mb-1",children:n}),u(Oa,{isUnfolded:e,children:a})]}),renderFoldButton:Br}):u("div",{children:n})})},Br=({isUnfolded:e,onToggle:t})=>e?null:u(kr,{className:"border-t-main-divider/50",icon:"PlusIcon",label:"Показать еще",onClick:t}),Mr=g((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=de({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:N("block",e),...t?i:{},children:a})})),Pr=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Rr=e=>Pr.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},Ar=g((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,o]=n(),c=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=Rr(t),c=He(n)?n:r,d=l?{text:a}:{text:""};return!s&&a&&o(!0),{...e,...d,icon:{...c,iconVersion:"color"},version:e?.version??i}})),d=N("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",a?"flex-1 justify-center":"");return p("div",{className:N("flex flex-col gap-xs",e),children:[u("div",{className:"flex gap-xs",children:Ke(c,{className:N(a||s?"basis-full":""),buttonClassName:d})}),r?u(Ve,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Vr=g((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:o=[],target:c,title:d,align:m="text-left",benefits:h,imageOptions:{directionRight:g=!0,isImageAlwaysOnRight:x=false,isImageSecondary:f=!1}={},...b})=>u(k,{className:N("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...b,children:u(Mr,{href:a,target:c,className:"h-full",children:p(ve,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:u(M,{title:d,description:l,headlineVersion:"XS",isEmbedded:!0,align:m}),...it(He(i)?u(te,{image:i}):null,g),buttons:o.length?u(Ar,{media:o,showButtonText:!0,version:b?.version}):null,isImageAlwaysOnRight:x,isImageSecondary:f,imageAlign:"center",children:[u(Ue,{benefits:h}),u(Je,{items:r,isDotted:s,listItemSize:"S"}),zr(n,m)]})})}))),zr=(e,t)=>e?u(I,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Dr=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(Ve,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(Ve,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:Ke(a)}):null]},String(t))},_r=g((({className:e="",title:t,align:l="text-center",icon:n,button:a,visibleCellsCount:i=1,cardCells:r=[],...s})=>{const o=r.map(Dr),[c,d]=i>0?[o.slice(0,i),o.slice(i)]:[o,[]];return p(k,{className:N("flex flex-col",e),defaultPadding:"p-2xl",...s,children:[He(n)?u("div",{className:"self-center",children:u(te,{image:n})}):null,t?u(T,{className:N("pt-xs",l),headingType:"h5",title:t}):null,a?.text?u(ge,{className:"w-full mt-m mb-lg",...a}):null,d.length?u(Fa,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[c,u(Oa,{isUnfolded:e,children:d})]}),renderFoldButton:r.length>1?Er:null}):u("div",{children:c})]})})),Er=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(W,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),jr=(e=!1)=>e?"text-white":"",Fr=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),Or=g((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(te,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(te,{image:t})}),l?u(T,{headingType:"h4",className:jr(a),title:l}):null,n?u("div",{className:Fr(a),children:n}):null]}))),Lr=g((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:N("h-full","border-main-divider border-b"),children:e?e.map(Hr(l,t)):null})}))),$r=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),Ur=(e=!1)=>""+(e?"text-white":""),Hr=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u(I,{size:"text-s",color:$r(e),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:"text-right",children:u(I,{size:"text-s",align:"text-right",color:Ur(e),children:l})}):null,n?u("div",{className:"text-right",children:u(I,{size:"text-s",color:$r(e),children:n})}):null]})]},String(a)),Kr=g((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:N("border border-gray rounded-md p-m mb-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),role:"row",children:[u(Or,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(Lr,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(ge,{href:e.link.href,target:e.link?.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,Wr({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),Wr=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:u(Ve,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),Yr=g((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(T,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(Gr,{...e})})]})})),Gr=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(Array.from({length:e.length}).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>Array.from({length:e.length}).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(Kr,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(za,{onVisibleIndicesChange:m,children:h}):h})),Xr=e=>e%2!=0,qr=g((({title:e,description:t})=>p("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[u(te,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),u(M,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:ma})]}))),Jr=["ArrowDownIcon","ArrowUpIcon"],Qr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",Zr=g((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return p("div",{children:[u("div",{className:N(t.length?"hidden":"block"),children:a?u(qr,{...a}):null}),p("div",{className:N("space-y-2xs",t.length?"":"hidden"),children:[p("div",{className:N(Qr),children:[z(r,{...i.options,parent:n}),Xr(r.length)?u(vt,{className:"col-span-6"}):null]}),u(Fa,{renderFoldableSection:({isUnfolded:e})=>p(Oa,{className:N(Qr),isUnfolded:e,children:[z(s,{...i.options,parent:n}),Xr(s.length)?u(vt,{className:"col-span-6"}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(kr,{className:N(l<1?"hidden":""),disabled:!s?.length,label:e,icon:Jr[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),es=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,ts=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>es(t[e])||es(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>es(t[e])||es(l[e])||ls(t[e])<=ls(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>es(t[e])||es(l[e])||ls(t[e]?.min)>=ls(l[e]?.min)&&ls(t[e]?.min)<=ls(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>es(t[e])||es(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>es(t[e])||es(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),ls=e=>Number(e||0),ns=(e,t)=>(l=kt)=>e&&e.filter((e=>ts(t,l(e.content||{})))),as=g((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(Ct,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),is=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(rs(e))]}),n?u("div",{children:u(Nl,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,children:n?.text})}):null]}),rs=e=>([t,l])=>{const n=l?.type;return"array"===n?ss(t,e)(l):null},ss=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(Ve,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(as,{items:n,multiple:!l?.single,...t(e)})]},e)},os=e=>[...new Set(e)],cs=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,ds=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),ms=(e,t)=>os((e[t?.sourceBook]?.rateRows||[]).filter(cs).flatMap((e=>ds(e.minMonths,e.maxMonths)))),hs=(...e)=>{const t=e.map((e=>pt(e)));return Promise.all(t)};function us(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const ps=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function gs(e){const{dirs:t=[],source:l=[]}=r((()=>{const t=(e=>e?.filter(ps).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=ht(t,hs);return{source:Object.fromEntries(us(l,n).filter((([,e])=>Boolean(e)))),months:os(n.flatMap((e=>e?.rateRows||[])).filter(cs).flatMap((e=>ds(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[]}}const xs=1e9,fs={sum:{min:1e4,max:xs},period:3},bs=g((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=gs(i.block?.blocks),[o,{field:c,reset:d}]=St(fs),m=o===fs?i.block?.blocks:ns(i.block?.blocks,o)((e=>({...e,period:ms(r,e||{})||[]}))),h=p("div",{children:[u(Gi,{label:n?.title,min:500,max:xs,...c("sum",{parse:e=>({min:Number(e),max:xs}),format:({min:e})=>String(e)})}),u(vn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...c("period")})]});return p(k,{className:N("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[is({field:c,reset:d,filtrationSchema:t,resetButton:l,children:h}),u(Zr,{blocksToRender:m,...i})]})})),ys={type:"string",title:"Адрес справочника"};bs.childrenTypes=["ProductTile"],bs.childSchema=e=>({...e?.filtrationSchema||{},sourceBook:ys});const vs=e=>"Image"===e?.contentType&&e?.image?u(te,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Ns=g((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(k,{className:N("flex flex-col justify-center items-center",e),defaultPadding:N("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:vs(n)}),u(M,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?u(ge,{version:a?.version,text:a?.text,...a}):null]}))),ws="location";function ks(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(y,"location",Cs()??{name:e}),r=i((e=>{Ts(e),l(e)}),[]),{data:s}=ht(Ss()?null:"/api/v1/region",gt);return a((()=>{s&&!Ss()&&l(s)}),[s]),[t??{name:e},r]}const Ss=()=>Boolean(globalThis.localStorage?.getItem(ws)),Cs=()=>{try{const e=globalThis.localStorage?.getItem(ws);return e&&JSON.parse(e)}catch(e){return null}},Ts=e=>{try{globalThis.localStorage?.setItem(ws,JSON.stringify(e))}catch(e){}};var Is;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(Is||(Is={}));const Bs=new Intl.NumberFormat("ru",{style:"currency",currency:Is.RUB}),Ms=e=>e?Bs.format(e):"",Ps="text-left text-m font-light text-secondary-text",Rs=`${Ps} pl-5xl`,As={USD:"DollarIcon",EUR:"EuroIcon"},Vs=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Ps,children:u(Ve,{size:"text-m",children:"Валюта"})}),u("th",{className:Rs,children:u(Ve,{size:"text-m",children:"Купить"})}),u("th",{className:Rs,children:u(Ve,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(zs)})]}))),zs=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(te,{image:{icon:As[t]},width:"24",height:"24"}):null,u(Ve,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(Ve,{size:"text-h6",children:Ms(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(Ve,{size:"text-h6",children:Ms(e?.buyExchangeRate)})})]},t)},Ds={icon:"GpsIcon"},_s=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(ua,{...Ds,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u(I,{size:"text-l",color:"text-primary-main",children:t}):null,u(I,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Es=(e,t,l)=>{const n=Number(js(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},js=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Fs=e=>{return(t=[[e=>e.value!==Is.RUB&&e.oppositeValue!==Is.RUB,()=>e.handleConvert(e.value,Is.RUB)],[e=>e.value===Is.RUB&&e.oppositeValue===Is.RUB,()=>e.handleConvert(e.value,Is.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Os(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(Dt,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(ml,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const Ls=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Is.RUB,selectBuy:l?.[0]?.currency?.currency||Is.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Os({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:$s(r,o,l),value:r.inputSell,setValue:e=>Hs(o,l)(e,r.selectSell,r.selectBuy)}),Os({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Us(r,o,t),value:r.inputBuy,setValue:e=>Ks(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(ge,{text:a.text,version:a?.version,...a}):null]})})),$s=(e,t,l)=>n=>{t({selectSell:n}),Fs({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Hs(t,l)(e.inputSell,n,a)}})},Us=(e,t,l)=>n=>{t({selectBuy:n}),Fs({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Ks(t,l)(e.inputBuy,n,a)})},Hs=(e,t)=>(l,n,a)=>{e({inputSell:js(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Es(l,i,n===Is.RUB)||"")})},Ks=(e,t)=>(l,n,a)=>{e({inputBuy:js(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Es(l,i,n===Is.RUB)||"")})};const Ws=g((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=ks(),i=function(e){const t=e?.code||"000",{data:l}=ht(`/api/v1/exchangerates?regionCode=${t}`,gt);return l||{}}(a),r=Ys(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Is.RUB}});const o=r.filter((e=>e.saleExchangeRate));return o.push({currency:{currency:Is.RUB}}),u(k,{className:N("box-border min-h-80",e),...n,children:u(ve,{className:"h-full",title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[r?u(Vs,{className:"mb-xl",exchangeCurrencyItems:r}):null,u(_s,{address:i?.address})]}),r.length&&s.length&&o.length?u(Ls,{className:"grow",currencyRatesBuy:s,currencyRatesSell:o,button:l}):null]})})})})),Ys=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Gs=e=>bt(d.SITEMAP||"sitemap",{fallback:e}),Xs=(e,t)=>u(ua,{...e,iconBgVersion:t,className:"shrink-0"}),qs=g((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>u(wr,{tag:"button",className:N("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Xs(a,t),e?u(Ve,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?u(W,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),Js=g((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,...o})=>u(k,{className:N("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...o,children:u(Fa,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(Oa,{className:N("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:D({...o,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Qs({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));Js.childrenTypes={exclude:["RollupItem"]};const Qs=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"accordion"===e?u(qs,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):u(kr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Zs=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(eo):null,u(ge,{version:"primary",className:"w-full",href:"https://old.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),eo=(e,t)=>p("div",{className:"mb-m space-y-m",children:[u("div",{children:u(Ve,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{className:"space-y-m",children:e.items?.map(to)})]},String(t)),to=(e,t)=>p("div",{className:"space-y-2xs",children:[u("div",{children:lo(e.type,e.text)}),u(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),lo=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${no(t)}`,children:u(Ve,{size:"text-h6",children:t})});case"email":return u("a",{className:"no-underline",href:`mailto:${t}`,children:u(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return u("span",{children:t})}},no=e=>e.replaceAll(/\D/g,""),ao=["split_version","New","Old"],io=g((({className:e="",index:t,text:l,...n})=>{const a=de(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:N("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),ro=g((({title:e,links:t,className:l=""})=>p("div",{className:N("flex flex-col gap-4",l),children:[u(Ve,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>u(io,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),so=g((({className:e="",items:t,basePath:l})=>t?.length?u("ul",{className:N("flex flex-col",e),children:t.map(oo(l))}):null)),oo=e=>(t,l)=>{const{text:n,...a}=t,i=de({isRemote:!(!d.BASE_PATH||!e)&&!d.BASE_PATH.startsWith(e),basePath:e}),{href:r,target:s,onClick:o}=i(a);return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",href:r,target:s||"_self",onClick:o,children:n||null})},`list_item_${String(l)}`)},co=g((({className:e="",index:t,...l})=>{const n=de({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),mo=g((({className:e="",links:t})=>p("div",{className:N("@container",e),children:[u("div",{className:"pt-lg",children:u(Ve,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(co,{index:t,...e},String(t))))}):null]}))),ho=g((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=Gs(l),{relatedEnterprises:a,contacts:r,socialMedia:s,mobileApps:c,horizontalNavigationTitle:m,documents:h}=bt(d.FOOTER||"footer",{fallback:l}),g=i((()=>{const[e,t,l]=ao;((e,t)=>{const l=globalThis.document?.cookie.split(";")??[],[,n]=l.map((e=>e.split("="))).find((([t])=>t.trim()===e))||[];t(n)&&(globalThis.document.cookie=`${e}=${t(n)}`)})(e,(e=>e?.replace(t,l)))}),[]);return p(k,{tag:"footer",className:e,defaultPadding:"p-4xl pb-24",...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(Js,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,children:u(so,{items:e.items,basePath:o(e.href)})},String(t))))}),u(Zs,{className:"overflow-hidden",items:r}),p("div",{className:"mt-xl",children:[u(Ar,{className:"mb-xl",media:s,stretched:!0,children:"Соцсети"}),p("div",{className:"mb-xl",children:[u("div",{className:"flex flex-col gap-4 mb-xs",children:c?.map(uo)}),u(Ve,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),u("div",{className:"py-lg border-t border-main-divider",children:u(io,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:g})}),u(ro,{className:"py-lg border-y border-main-divider",title:m,links:a}),u(mo,{links:h})]})})),uo=({href:e="/",text:t},l)=>{const{label:n}=Rr(e);return u(ge,{className:"w-full",text:t||n,version:"secondary",href:e,target:"_blank"},String(l))},po={width:"34",height:"34"},go={"bg-white":"color",transparent:"white"},xo={"bg-white":"text-primary-main",transparent:"text-white"},fo=(e,t,l)=>u(te,t?.src?{image:t,className:xo[e],width:l?.width,height:l?.height}:{image:{icon:t?.icon||"LogoIcon",iconVersion:go[e]},className:xo[e],width:l?.width,height:l?.height}),bo={"bg-white":"text-primary-text",transparent:"text-white"},yo=g((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:N("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",children:[fo(i,l?.image,po),r?n??u("div",{className:"ml-s",children:u(Ve,{font:"font-medium",color:bo[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),vo={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},No=g((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=v(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u("div",{children:u(yo,{className:"my-2xs",bgColor:e,logo:t})}):wo(s),l?u("div",{children:u(ge,{href:l,ariaLabel:"Войти",target:"_blank",className:N("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",vo["transparent"===n?"transparent":"default"]),children:"Войти"})}):null]})})),wo=e=>u("div",{children:p("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(te,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),ko={"bg-white":"primary",transparent:"transparent"},So=g((({bgColor:e="bg-white",version:t=ko[e],...l})=>{const{logo:n}=Gs(l.options?.page?.fallback),{internetBankUrl:a}=bt(d.PORTAL_DATA||"portal-data",{fallback:l.options?.page?.fallback,pathDir:F(d.BASE_PATH,"portal-resources")});return u(k,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(No,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),Co={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},To=g((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...o})=>{const c=v();return u(k,{className:N("relative flex flex-col",Co[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${q(c)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...o,children:D({...o,extraProps:{className:N("w-full",rr(r)),padding:n?"":"p-0"}})})}));To.childrenTypes=[];const Io=g((e=>u(To,{...e})));Io.childrenTypes=[];const Bo=g((e=>{const{className:t,image:l,...n}=e;return u(k,{className:t,defaultPadding:"p-0",...n,children:u(te,{image:l})})})),Mo=["байт","Кб","Мб","Гб","Тб","Пб"],Po=g((({icon:e,text:t,href:l,target:n,fileFormat:a,fileSize:i})=>{const r=i&&a?",":"",s=i??"",o=a?String(a):"";return p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",href:l,target:n,children:[e,t?p(Ve,{size:"text-l",font:"font-light",children:[t," ",Ro(s,o),u(Ve,{color:"text-secondary-text",children:l&&`${s+r+o}`})]}):null]})})),Ro=(e,t)=>e||t?u("span",{children:", "}):"",Ao={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Vo=g((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=v();return p(k,{className:N("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(M,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:N("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Ao[r]),role:"list",children:a.map(zo(o,i))}):null]})})),zo=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a="Attachment"===l?.docType?U(e)(l?.attachment?.src):l?.href,i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Mo[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?Do(a):l?.fileFormat;return u("div",{role:"listitem",children:u(Po,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?u(te,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:t,width:"24",height:"24"}):null})},String(n))},Do=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},_o=g((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,additionalDescription:o="",title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24",g=i?.src?u(te,{className:"hidden lg:block",image:i}):null;return u(k,{className:N("min-h-80",e),padding:"p-0",version:d,...m,children:p(ve,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:u(T,{headingType:"h3",title:c,className:N("whitespace-pre-wrap",l)}),rightImage:g,buttons:Ke(n,{className:"flex-wrap"}),children:[a?u(Ve,{size:"text-xl","font-weight":"font-light",children:a}):null,p("div",{className:N("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[u(Je,{items:r,listItemSize:"M"}),u(Ve,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:o}),s?.src?u("div",{className:N("flex justify-center bg-white rounded-md @xl:-order-1",h),children:u(te,{className:"w-fit",image:s})}):null,i?.src?u(te,{className:"lg:hidden",image:i}):null]})]})})})),Eo={primary:"bg-white/30",secondary:"bg-main-divider"},jo={primary:"text-white",secondary:"text-secondary-text"},Fo=g((({count:e,version:t="secondary"})=>u("div",{className:N("w-6 h-6 rounded-full flex items-center justify-center",Eo[t]),children:u(Ve,{size:"text-xs",color:jo[t],children:e})}))),Oo=(e=[],t={})=>e.filter((({content:e={}})=>ts(t,e))).length,Lo=(e,t)=>e===t;const $o=(Uo=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Lo,((e=Lo)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Uo(l,t[e])))));var Uo;const Ho=[],Ko={},Wo={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Yo={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Go={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Xo={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},qo=g((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:N("h-12","block flex-1","cursor-pointer",Wo[n],l?Xo[n]:Go[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:N("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Yo[n]:"text-secondary-text hover:text-primary-main"),children:[u(Ve,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),Jo=g((e=>u(e?.item?.href?Qo:Zo,{...e}))),Qo=g((e=>{const t=de(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(qo,{...e,tag:"a",item:a,onClick:n})})),Zo=g((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(qo,{item:e,onClick:n,...l})})),ec=(e,t,l)=>(n,a)=>u(Jo,{isActive:n===e,onClick:t,type:l,item:n},String(a)),tc=g((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:N("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(ec(n,a,t))}))),lc={categories:[],extraOptions:[],propertyType:[],stage:[]},nc=g((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:o,reset:c,update:d}]=St(lc),m=s===lc?a.block?.blocks:ns(a.block?.blocks,s)(),h=i(((e=lc)=>d(e)),[]),g=(({hotFilters:e=Ho,filtrationState:t=Ko,blocks:l=Ho,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>$o(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:u(Fo,{version:t===e[a]?"primary":"secondary",count:Oo(l,t.filter)})})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:h});return p(k,{className:N("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(tc,{...g}),is({field:o,reset:c,filtrationSchema:l,resetButton:n}),u(Zr,{blocksToRender:m,...a})]})}));function ac(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}nc.childrenTypes=["ProductTile"],nc.childSchema=e=>e?.filtrationSchema||{};const ic={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},rc=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(ic).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(W,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),sc=e=>globalThis[e];const oc=()=>function(e,t){const[l,r]=n(),s=i((()=>r(sc(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!sc(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),cc={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},dc=g((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(cc).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(W,{name:l,width:"20",height:"16"})})})),mc={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},hc=[55.753995,37.614069],uc=g((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=oc(),[o,c]=n();if(a((()=>{i?.current?r&&(ac(r,i.current,e),e?.length||i.current.setCenter(hc)):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:e?pc(e):hc,zoom:l,controls:[],suppressMapOpenBlock:!0}),ac(r,i.current,e))}))}),[r,i,e,l]),!r)return null;const d=o?"z-[100000]":"z-10";return p("div",{id:"map",className:N(!o&&"relative","w-full",t),children:[u("div",{className:N(Object.values(mc),d,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;o?e.exitFullscreen():e.enterFullscreen(),c(e.isFullscreen())},children:u(W,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:N("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[u(dc,{yandexMaps:i}),u(dc,{yandexMaps:i,direction:"out"})]}),rc(i.current,r,N("right-2 top-80",d))]})})),pc=e=>[xc(gc(e,0)),xc(gc(e,1))],gc=(e,t)=>e.map((e=>e[t])),xc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,fc={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},bc=(e,{field:t,reset:l})=>p("div",{className:"pb-2xl",children:[e?.length?u("div",{className:"flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",children:e.map((e=>u(Ml,{text:fc[e],...t(e)},e)))}):null,u(ge,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:u(W,{name:"CloseIcon",width:"16",height:"16"})})]}),yc=()=>null,vc=()=>[],Nc=g((({className:e,data:t=[],renderCard:l=yc,filterItems:n=vc,initFilterState:a={},descriptionData:i,title:s})=>{const[o,{field:c,reset:d}]=St(a),[m,h,g]=r((()=>{const e=n(t,o),l=e.map((e=>[e.gpsLatitude,e.gpsLongitude].filter(Boolean))).filter((e=>e&&2===e.length));return[e,l,e.length]}),[t,o]);return p("div",{className:N("space-y-1",e),children:[p("div",{className:"bg-white",children:[p("div",{className:"p-6xl pb-0",children:[p("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:[u(T,{headingType:"h2",children:s}),g?u(Ve,{size:"text-h2",color:"text-secondary-text",children:`(${g})`}):null]}),i?wc(i):null,bc(Object.keys(a),{field:c,reset:d})]}),u("div",{className:"h-[600px]",children:u(b,{children:u(uc,{points:h,className:"h-full"})})})]}),m.map(l)]})})),wc=({__html:e,list:t})=>e||t?.length?p("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?u("div",{className:"mb-2xl",children:u(Re,{__html:e})}):null,t?.length?u("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>p("div",{className:"flex gap-xs items-center",children:[e?.image?u(te,{image:e.image}):null,e?.text?u(Ve,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,kc={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"}},Sc=g((({className:e,children:t,color:l="gray"})=>p("div",{className:N("pt-2xl sm:p-s sm:border sm:border-gray rounded-md flex items-center",kc[l].border,e),children:[u("div",{className:"block pr-m sm:pr-0 sm:hidden",children:u(te,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),u(Ve,{size:"text-m",color:kc[l].text,children:t})]}))),Cc=g((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:Tc({textItems:a,subText:t,children:l,...n})})),Tc=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>p("div",{className:N("flex gap-2xl sm:gap-2xs flex-col h-full max-w-[300px]",i),children:[e?u(Ve,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>u(Ve,{size:"text-l",children:e.trim()},String(t)))),a?u(Ve,{color:n,size:"text-m",children:a}):null]}),Ic=g((({className:e,children:t})=>u("div",{className:N("sm:flex sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Bc=["ArrowDownIcon","ArrowUpIcon"],Mc=["Подробнее","Скрыть"],Pc=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,children:[u("div",{className:"pr-m",children:Mc[Number(e)]}),u(W,{className:"text-primary-text",name:Bc[Number(e)],width:"16",height:"16"})]}),Rc=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},o)=>{const c=[{label:"Устройство",value:Vc(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return p("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[p("div",{className:"sm:flex sm:justify-between",children:[p("div",{children:[u(Ve,{size:"text-h4",children:Vc(e)}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(W,{name:"GeolocationIcon",width:"24",height:"24"}),u(Ve,{size:"text-l",children:t})]}):null]}),u(Sc,{color:"green",children:Vc(s)})]}),u("div",{className:"hidden sm:block",children:u(Ic,{className:"flex-wrap",children:c?.map(Ac)})}),u(Fa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>u(Oa,{isUnfolded:e,children:u(Ic,{className:"flex-wrap",children:c?.map(Ac)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Pc({isUnfolded:e,onToggle:t})})]},String(o))},Ac=(e,t)=>u(Cc,{...e},String(t)),Vc=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",zc=[];const Dc=async e=>await pt(e,{method:"GET"})||zc,_c={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Ec={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},jc=g((({data:e,className:t})=>{const[l]=ks(),n=function(e){const{data:t=zc}=ht(`/api/v1/atms?regionCode=${e}`,Dc);return t}(l?.code??"000");return u(Nc,{className:t,filterItems:Fc,data:n,initFilterState:_c,renderCard:Rc,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),Fc=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Ec[t](e))),l=!n.length||n.some((t=>Ec[t](e)));return t&&l}))},Oc=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", "),a=[Lc({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Lc({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean);return u(Cc,{label:"Режим работы",value:a,className:"max-w-none"})},Lc=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",$c=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Uc=e=>$c.map((([t,l,n])=>({key:t,title:n,short:l,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Hc=e=>{if(!e)return null;const t=Kc(e);return p(Ic,{className:"border-none",children:[u(Cc,{label:"Для юридических лиц",labelSize:"text-l",children:u("div",{className:"flex gap-1",children:t.map(Wc)})}),u(Cc,{label:"Режим работы",className:"max-w-none",children:u(Ve,{children:e})})]})},Kc=e=>{const t=$c.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},Wc=({short:e,status:t},l)=>u("div",{className:N("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:u(Ve,{size:"text-xs",children:e})},String(l)),Yc=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>p("div",{className:"flex gap-lg h-full",children:[e?.currency?u(Cc,{label:"Валюта",value:e.currency}):null,t?u(Cc,{label:"Купить",value:String(t)}):null,l?u(Cc,{label:"Продать",value:String(l)}):null]},String(n)),Gc=(new Date).getDay(),Xc=e=>{const[t]=e?.slice(Gc-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?p("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?u(Sc,{color:"green",children:a}):null,l&&i?u(Sc,{color:"yellow",children:`перерыв: ${l}`}):null]}):u(Sc,{color:"red",children:"Выходной"})},qc=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",Jc=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>u(Cc,{label:e,value:t&&l?l:"",subText:qc({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Qc=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c},d)=>{if(!o)return null;const m=Uc(o);return p("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[p("div",{className:"sm:flex sm:justify-between",children:[p("div",{children:[u(Ve,{size:"text-h4",children:e}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(W,{name:"GeolocationIcon",width:"24",height:"24"}),u(Ve,{size:"text-l",children:t})]}):null]}),Xc(m)]}),u("div",{className:"hidden sm:block",children:Zc({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c})}),u(Fa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>u(Oa,{isUnfolded:e,children:Zc({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Pc({isUnfolded:e,onToggle:t})})]},String(d))},Zc=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const o=Uc(r),c=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return p("div",{children:[p(Ic,{className:"flex-wrap",children:[u(Cc,{label:"Факс",value:t}),u(Cc,{label:"Телефон филиала",value:e}),u(Cc,{label:"Для обращений юридических лиц",value:l}),u(Cc,{label:"Обслуживание физических лиц",value:n}),u(Cc,{label:"Для консультаций по валютному контролю",value:i}),u(Cc,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?u(Ic,{children:u(Cc,{label:c,labelSize:"text-l",className:"w-full max-w-none",children:u("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:o?.map(Jc)})})}):p(Ic,{children:[u(Cc,{label:c,labelSize:"text-l",children:u("div",{className:"flex gap-1",children:o?.map(Wc)})}),Oc(o)]}),r?.businessScheduleVisibleTag?Hc(r?.businessScheduleDescription):null,s?.currencies?.length?u(Ic,{className:"flex-wrap",children:s?.currencies?.map(Yc)}):null]})},ed=[];const td=async e=>await pt(e,{method:"GET"})||ed,ld={workingSaturday:!1},nd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},ad=g((({className:e})=>{const[t]=ks(),l=function(e){const{data:t=ed}=ht(`/api/v1/branches?regionCode=${e}`,td);return t}(t?.code??"000");return u(Nc,{className:e,filterItems:id,data:l,initFilterState:ld,renderCard:Qc,title:`Офисы филиала ${t?.name}`})})),id=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>nd[t](e)))))},rd=g((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return u(k,{version:"transparent",className:N(t),defaultPadding:"p-0",...l,children:"offices"===n?u(ad,{}):u(jc,{data:e})})})),sd=g((({className:e,size:t})=>u("figure",{className:N("m-0 mt-xl min-w-[80%]",e),children:od(t)}))),od=(e=3)=>dd(100,e).map((e=>Math.floor(e))).map(cd),cd=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),dd=(e,t)=>[e].concat(t>0?dd(e/1.618,t-1):[]),md=g((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(k,{className:N("box-border",e),...n,children:[u(M,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u(sd,{})]}))),hd=g((({className:e,padding:t,slides:l=[],...n})=>u(k,{className:N("overflow-hidden relative",e),padding:t,...n,children:u(za,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",children:u(at,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),ud=g((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(k,{className:N("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[He(r)?u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:u(te,{image:r})}):null,s?u(T,{headingType:"h3",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?pd(i):null,gd({label:"Адрес",data:e,iconName:"GeolocationIcon"}),gd({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),gd({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Ke([n]):null]})]}))),pd=e=>u("div",{className:"border-b border-main-divider pb-lg",children:u(Re,{__html:e})}),gd=({label:e,data:t,iconName:l,dataColor:n=""})=>t?p("div",{className:"flex gap-s",children:[u(W,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col gap-2xs",children:[u(Ve,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),u(Ve,{size:"text-xl",color:n,children:t})]})]}):null,xd=g((e=>{const{__html:t,richVersion:l,...n}=e;return u(k,{defaultPadding:"p-0",...n,children:u(Re,{__html:t,richVersion:l})})})),fd=g((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:N("order-4",e),children:[u(qn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(qn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),bd=g((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(ml,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),yd=g((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(bd,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(bd,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),vd=["От 1 дня","До 365 дней"],Nd=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(Ve,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(vn,{min:1,max:365,value:e,items:vd,onChange:t})]}))),wd=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(bd,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(bd,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),kd=g((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents @xl:block flex-1 space-y-xl",children:[u(yd,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Sd(c)}),u(Nd,{days:a,setDays:e=>c({days:e})}),u(wd,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:Cd(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents @md:flex justify-between items-center gap-m",children:[u(fd,{}),u(ge,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),Sd=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Cd=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Td=g((({days:e,tariffs:t=[]})=>{const l=Bd(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[p("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Id("Аренда за",e),Id("Цена",l+" ₽")]}),u("div",{className:"@xl:hidden order-3 mb-xs",children:u(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),p("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[u(te,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),u("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:u(I,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),Id=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[u(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Bd=(e,t)=>{const l=Md(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Md=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},Pd=(e,t)=>e.find((e=>e.branchCode===t)),Rd=g((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Pd(n,l.selectedBranch),o=Ad(s?.safeBoxCaseVolumes),c=Vd(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=zd(c,l.selectedBoxSize);return p("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[u(kd,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(Td,{days:l.days,tariffs:d})]})})),Ad=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Vd=(e,t)=>e?.find((e=>e.volume===t)),zd=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Dd=[];const _d=async e=>await pt(e,{method:"GET"})||Dd,Ed=g((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=nl(),h=jd(c.selectedRegion,m),g=function(e){const{data:t}=ht(e?`/api/v1/safeboxes?regionCode=${e}`:null,_d);return t||Dd}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Pd(g,c.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(k,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Rd,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(I,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(uc,{points:f,className:"h-[640px]"}):null]})})),jd=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Fd(e){throw new Error(e)}const Od={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Ld={normal:"",small:"min-h-6xl"},$d={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},Ud=g((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",stepVersion:r="gray",version:s="primary",...o})=>p(k,{className:N("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...o,children:[u(M,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(Hd(i,r))})}):null,Ke(a,{isVertical:!0})]}))),Hd=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Kd(e,t)(l,n);case"rte":return u(Re,{__html:l.__html});default:Fd(l)}},Kd=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row items-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Wd(e,t)(l,n)}),p("div",{className:N("flex flex-col justify-center h-fit",Ld[e]),children:[l.label?u(I,{size:"text-l",align:"text-left",children:l.label}):null,l.description?u("div",{className:N("text-s font-light text-left",$d.description),children:l.description}):null]})]})},String(n)),Wd=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=Od[e][i?"image":"icon"],s=i?"transparent"===t:t;return u(k,{className:N(r,"z-10 mr-s flex justify-center content-center rounded-md"),defaultPadding:"",version:s,children:u("span",{className:"flex max-w-full max-h-full items-center justify-center",children:He(l?.icon)?u(te,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:Yd(e),height:Yd(e)}):u("span",{className:N("text-h4","transparent"===t?$d.iconText:(o=t,"secondary"===o?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var o},Yd=e=>"normal"===e?"38":"24",Gd="hidden sm:flex absolute z-40 top-0",Xd=g((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Va({itemCount:t?.length||0});return p("div",{className:N("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(va,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(ec(l,n,a))}),r.canScrollLeft?u(er,{className:N("left-6",Gd),onClick:r.scrollLeft}):null,r.canScrollRight?u(tr,{className:N("right-6",Gd),onClick:r.scrollRight}):null]})})),qd=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(tc,{...t});case"centered":return u("div",{className:"flex",children:u(tc,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Xd,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Jd="tab",Qd=g((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=v(),{isReady:d}=c,m=r((()=>l.map(em)),[l]),[h,p]=n(0);a((()=>{if(!l||!l[0])return;const e=c.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===c.query.tab))||0,t=l[e]||l[0];p(e),Zd(t)}),[d]),a((()=>{const e=l[h];"group"===e?.type&&y.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,h]);const g=i((e=>{const t=m.indexOf(e),n=l[t];p(t),Zd(n),"group"===n.type&&(e=>{const t=new URLSearchParams(c.query);e.name?t.set(Jd,e.name):t.delete(Jd),c.replace(`${c.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,m]);return u(k,{className:N(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:qd({items:m,value:m[h],tabsMode:s,onChange:g})})})),Zd=e=>{"group"===e.type&&y.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&y.fire("tab",{type:e.type,label:e.href})},em=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,tm={start:"text-start",center:"text-center",end:"text-end"},lm=g((({tab:e,className:t,onClick:l,isActive:n})=>{const a=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white text-primary-text"),title:e?"mb-xs text-xl":"mb-2xs text-l",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal"}))(n);return p("button",{type:"button",onClick:l,"aria-label":e?.title,className:N("border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs",a.btn,t),children:[e?.icon?u(te,{className:N("h-6 w-6 min-w-6 min-h-6",a.icon),image:{...e?.icon,iconVersion:e?.icon?.iconVersion??a.iconVersion},width:"24",height:"24"}):null,p("div",{className:"border-0",children:[e?.title?u("div",{className:a.title,children:e.title}):null,e?.description?u("div",{className:a.desc,children:e.description}):null]})]})}));function nm(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const am=g((({tab:e})=>{const t=de(),{onClick:l}=t({...e,onClick:()=>{e.href&&!E(e.href)&&(globalThis.location.href=e.href)}});return nm(l,[],800),u(sd,{className:"col-span-12 p-xl",size:5})})),im=g((({className:e="",tabs:t=[],block:l,tabAlign:i,...r})=>{const[s,o]=n(sm(t)),c=rm(t[s],s),d=t.length,[m,{inc:h,dec:g}]=Qi({itemCount:d},s),[x,f]=Va({itemCount:d});return((e,t)=>{const[l,{setTrue:n}]=al(!1);a((()=>{t.scrollTo(e,{behavior:l?"smooth":"auto",block:"nearest",inline:"center"}),!l&&n()}),[e,l])})(s,f),p(k,{className:N(e),defaultPadding:"p-0",...r,children:[p("div",{className:"relative border-b-8 border-primary-main",children:[u(va,{itemClassName:"flex",containerRef:x,snapAlign:"snap-end",gap:8,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:t.map(om(s,o,i))}),u(ar,{scroll:f,arrowsPadded:!0,onScrollLeft:g,onScrollRight:h,activeIndex:m,itemCount:d})]}),u("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:t[s]?.href?u(am,{tab:t[s]}):z(l?.slots?.[c],{...r?.options,slotName:c,parent:l})})]})}));im.slots=({tabs:e})=>e?.filter((e=>!e.href)).map(rm)||[],im.childrenTypes={exclude:["TabsLayout"]};const rm=(e,t)=>e?.title||`Слот №${t}`,sm=e=>e.reduce(((e,t,l)=>t.selected?l:e),0),om=(e,t,l="start")=>(n,a)=>u(lm,{className:tm[l],tab:n,isActive:e===a,onClick:()=>t(a)},String(a)),cm={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},dm=g((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:cm[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),mm=g((({className:e="",isOpen:t,onClick:l})=>u(ge,{className:e,appendRight:u(te,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),hm={Buttons:({buttons:e})=>Ke(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?u(te,{image:e}):null,List:({isDotted:e,...t})=>u(Je,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{className:"space-y-2xs",children:[e?u("div",{children:u(Ve,{size:"text-h6",children:e})}):null,t?u("div",{children:u(Ve,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(mm,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},um=g((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return pm({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),pm=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in hm))return null;return u(hm[l],{...t,...n})},gm=g((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>u("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>u(um,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),xm=(e,t)=>140*Be(e.slice(0,t).map((e=>e?.cols?.length??1))),fm=(e,t)=>e?.length>0?u("div",{className:N("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>u("div",{className:"w-20 mx-lg",children:u(Ve,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,bm=g((({rows:e})=>{return u(va,{visibleItemCount:0,snapAlign:"snap-start",children:u("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=N("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return p("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?u("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:u(Ve,{size:"text-xl",font:"font-light",children:n.data})}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${xm(a,t)}px)`},children:a?.map(((e,l)=>p("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?u(Ve,{size:"text-xl",children:e.data}):null,e?.cols?fm(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),ym=g((({activeTabIndex:e,items:t})=>u("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return p("div",{className:"w-full @container",children:[u("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:u(Ve,{size:"text-xl",align:"text-left",children:t.title})}),u("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:u("div",{className:"relative",children:u(bm,{rows:t.rowsData})})})]},n)}))}))),vm=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Nm=g((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>u("div",{className:N("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:u(Ve,{size:"text-xl",font:"font-light",color:vm(t===l),children:e||t+1})},e)))}):null,t?u(ge,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:u(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function wm(e){const t=await fetch(e);return await t.json()}const km=g((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=ht(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),wm);return t||{}}(e),[r,s]=n(0),o=i((e=>s(e)),[]),c=a?.[r]?.items??[],d=a?.map((e=>e.currency??""));return p("div",a?{className:"bg-white z-10",children:[u(Nm,{currencies:d,activeTabIndex:r,setActiveTabIndex:o,linkToPDF:t}),u(ym,{activeTabIndex:r,items:c}),u(mm,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[u(Ve,{size:"text-h6",children:"Данных нет"}),u(mm,{onClick:l,isOpen:!0})]})})),Sm=g((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:N("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?u("div",{className:"origin-top animate-expansion",children:u(km,{...t,onClick:l})}):null]}))),Cm=g((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,o]=n(void 0),c=i((e=>o(e)),[]),[d,m]=n(void 0),h=i((e=>m(e)),[]);return p(Sm,{onHideContentClick:()=>o(void 0),tableInner:s,...r,children:[u("div",{className:N("text-s","w-80 flex-shrink-0"),children:p("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?u(te,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?u(Ve,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?u(dm,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(gm,{cells:e,rowIdx:a,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...r},String(t))))}):null]})}));function Tm({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?p("div",{children:[l?u(Zi,{className:N("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u(Zi,{className:N("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Im=g((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative space-y-xs",children:[e,Tm({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Bm=g((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=Qi({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(Cm,{row:e,activeIndex:d,rowIdx:t,...r},String(t)))),[g,x]=i>0?[h.slice(0,-i),h.slice(-i)]:[h,[]];return p(k,{className:N("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[u(M,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),u("div",{className:"space-y-m",children:i>0?u(Fa,{renderFoldableSection:({isUnfolded:e})=>p(Im,{controls:m,children:[g,u(Oa,{isUnfolded:e,children:x})]}),renderFoldButton:Sr}):u(Im,{controls:m,children:h})})]})})),Mm=g((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>p(k,{className:N("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?Pm():null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(Ve,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Rm(l):null,a?u(Re,{__html:a}):null]})]}))),Pm=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),Rm=e=>u(I,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Am=g((({prefix:e,unit:t,suffix:l})=>p("div",{className:"w-full flex items-end",children:[e?u("div",{className:"gradient-color-text",children:u(Ve,{size:"text-h2",children:e})}):null,t?u("div",{className:"-mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?u("div",{className:"gradient-color-text",children:u(Ve,{size:"text-h2",children:l})}):null]}))),Vm=g((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return u(k,{defaultPadding:"p-0",...a,children:u(Am,{prefix:t,unit:l,suffix:n})})})),zm={AdTile:vt,ApplicationForm:oa,BenefitsBlock:pa,BonusBenefitsBlock:_a,ButtonsBlock:ja,Calculator:$i,CardTransfer:Ji,Carousel:pr,CarouselBankHistoryCard:gr,CarouselCard:br,CarouselCatalogCard:vr,CarouselLinks:Tr,CarouselRecommendationCard:Vr,CarouselTariffsCard:_r,ComparisonTable:Yr,DepositFiltration:bs,ErrorBlock:Ns,ExchangeRateTile:Ws,Footer:ho,Header:So,Headline:M,HorizontalLayout:Io,ImgBlock:Bo,LinkDocs:Vo,MobileAppTile:_o,MortgageFiltration:nc,OfficesAtmsMap:rd,Placeholder:md,ProductBlock:st,ProductGallery:hd,RepresentativeOfficeInfo:ud,RichTextBlock:xd,RollupItem:Js,SafeDepositRental:Ed,StepsBlock:Ud,Tabs:Qd,TabsLayout:im,TariffsTable:Bm,TextBlock:Mm,UnitBlock:Vm,VerticalLayout:To},Dm=g((({className:e,onClose:t})=>u("button",{className:N("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(te,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),_m="cookie",Em=g((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=al();nm((()=>{globalThis.localStorage?.getItem(_m)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(_m,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[u("div",{className:"sm:flex-1",children:p(I,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(Mr,{isRemote:!0,className:jm(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(Mr,{isRemote:!0,className:jm(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(Dm,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),jm=e=>N("inline mx-2xs",e?"text-green-dark":"");const Fm=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>y.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Fd(e)}}))),[c,d]),l},Om=g((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Fm({onCloseAll:e,onClose:t}),{close:n}=oe(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return rl(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:N("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Lm=g((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>y.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Fd(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return rl(globalThis.document,"keydown",r),e?u("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),$m=e=>({href:t})=>!!t&&j(Um(t,e)).startsWith(j(t)),Um=(e,t)=>_(e)?t.href:t.pathname;function Hm(e=[]){const t=v(),l=e.findIndex((e=>$m(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(t));return[l,e[l]]}const Km=g((({isActive:e,onClick:t})=>p("button",{className:N(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:t,children:[u(W,{className:"w-6 h-6",name:"BurgerIcon",iconVersion:e?"color":"black"}),"Меню"]}))),Wm=g((({isActive:e,item:t,onClick:l})=>{const n=de({isRemote:!0}),{href:a,onClick:i}=n({href:t?.href,onClick:l});return p("a",{className:N(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),href:a,target:"_self",title:t?.title||"",onClick:i,children:[u(W,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]})})),Ym=g((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=oe(),r=i((()=>{a(),n&&n()}),[n]);return p("div",{className:N("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(Dm,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})})),Gm=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const Xm=e=>e?.length?p("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(Ve,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>u(qm,{...e},String(t))))})]}):null,qm=g((({icon:e,...t})=>{const l=de(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s items-center",children:[e?u(te,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:u(Ve,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),Jm=e=>t=>u("div",{className:"mb-xs sm:mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:u(Ve,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),Qm=g((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Zm=g((()=>{const{defaultLocation:e,foreignOffices:t}=Gs(),[l,a]=ks(e),[r,s]=n(""),o=th(nl()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(o,eh),{close:d}=oe(),m=i((e=>{a(e),d()}),[]);return p(Ym,{className:"pb-20",head:p("div",{children:[u(Ve,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?p("div",{className:"mb-s",children:[u(Ve,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(l),children:u(Ve,{color:"text-primary-main",children:l.name})})]}):null,u(Qm,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&Gm(e.toLowerCase())(r.toLowerCase())>=.8)).map(Jm(m))}):u("div",{className:"columns-1 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(Ve,{size:"text-h6",children:e})}),t.map(Jm(h))]},e)))}),Xm(t)]});var h})),eh=e=>e.name?.charAt(0)||"",th=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),lh=g((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:N("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(te,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:N("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})})),nh=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},ah=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),ih=e=>t=>e.map((([e,l])=>[Gm(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>sh(t,e))).reduce(nh(Math.max,0),new Map),rh=e=>t=>{return us(t,t.map((({title:e})=>e)).map((e=>t=>{const l=ah(t||"");return l.length?Be(e.map((e=>Ba(l.map(Gm(e)))))):0})(e))).sort((e=>(t,l)=>-e(t,l))((l=([,e])=>e,(e,t)=>l(e)-l(t)))).map((([e])=>e));var l},sh=(e,t)=>new Map(e.map((e=>[e,t]))),oh=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=ht(e?.length?e:null,ch),[s,o]=n(null);return nm((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=ah(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(ih(i)).reduce(nh(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return rh(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},ch=async(...e)=>(await Promise.allSettled(e.map((e=>pt(F(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),dh=g((({className:e,topItems:t})=>{const l=de({isRemote:!0});return u("div",{className:N("flex items-start justify-between",e),children:t?.map(l).map(hh)})})),mh=["all","footer"],hh=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||mh.includes(e.displayArea.toLowerCase())));return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>u(uh,{...e,basePath:o(a),index:t},String(t))))]},String(t))},uh=g((({text:e,index:t,basePath:l,...n})=>{const a=de({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:N("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),ph=g((({initialQuery:e})=>{const{topItems:t}=Gs(),l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,i]=oh({basePathList:l,initialQuery:e}),s=r((()=>gh(t)(n)),[t,n]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(Ym,{head:u(lh,{autoFocus:!0,...i}),children:u(dh,{topItems:s})})})),gh=e=>t=>e?.length&&t?.length?us(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:F("/",t)})))}))):[];const xh=g((({className:e})=>{const[t,l]=n(""),a=i((()=>l("")),[]),{open:r}=(()=>{const{open:e,close:t}=oe();return{open:(t={},l={})=>e(u(ph,{...t}),l),close:t}})(),s=i((e=>{l(e),fh(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:N("relative",e),children:[u(lh,{value:t,onChange:s}),u(Dm,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),fh=e=>e&&e.length>=3,bh=g((({item:e,basePath:t})=>{const l=de({isRemote:!(!d.BASE_PATH||!t)&&!d.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=v(),s=$m(r)({href:n});return p("a",{className:N(s?"text-primary-main":"text-primary-text","py-3 text-h5 font-light flex justify-between cursor-pointer"),href:n,target:a,onClick:i,children:[e.text,u(te,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]})})),yh=g((({activeMenuSubItems:e,basePath:t})=>e?u("div",{className:"mb-5",children:e.map(((e,l)=>u(bh,{item:e,basePath:t},String(l))))}):null)),vh=({item:e,isActive:t,onClick:l})=>p("button",{type:"button",className:"relative",onClick:l,children:[u("span",{className:N("whitespace-nowrap",t?"text-primary-main":""),children:e.text}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]}),Nh=g((e=>{const{topItems:t,officesLink:l,defaultLocation:s}=Gs(e.options?.page?.fallback),[o]=ks(s),c=(()=>{const{open:e,close:t}=oe();return{open:(t={})=>e(u(Zm,{}),t),close:t}})(),d=i((()=>c.open()),[]),[m,h]=Va({itemCount:t?.length??0}),[g]=Hm(t),[x,f]=n(g),b=r((()=>t?.[x]),[t,x]),y=b?.items||[];a((()=>{f(g)}),[g]),a((()=>{x>0&&h.scrollTo(x)}),[x,h]);const v=i((e=>f(e)),[]);return u(Ym,{head:u("div",{className:"flex items-center",children:u(T,{as:"h4",title:"Меню"})}),children:p("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[u("div",{className:"w-full mb-3",children:u(va,{containerRef:m,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>u(vh,{item:e,isActive:x===t,onClick:()=>v(t)},String(t))))})}),p("div",{className:"relative grow overflow-auto",children:[u(yh,{activeMenuSubItems:y,basePath:b?.href}),u(xh,{className:"grow mb-5"}),wh(l),p("div",{className:"flex items-center text-s cursor-pointer",onClick:d,children:[u(te,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),p("div",{className:"flex flex-col items-start",children:[u(Ve,{size:"text-h5",children:o.name}),u(Ve,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]})]})]})})})),wh=e=>e?p("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[u(te,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),u("span",{children:"Офисы и банкоматы"})]}):null,kh="burgerMenuDialog",Sh=[],Ch=g((({...e})=>{const[t,{toggle:l,close:n}]=(()=>{const{open:e,closeAll:t,close:l}=oe(),n=Fm(),a=((e,t)=>t.find((t=>t.id===e),e))(kh,n),r=i((()=>e(u(Nh,{}),{id:kh})),[]),s=i((()=>{a?t():r()}),[a]);return[Boolean(a),{open:r,close:l,toggle:s}]})(),a=d.STICKY_MOBILE_MENU||"sticky-mobile-menu",{menuItems:r=Sh}=bt(a,{fallback:e.options?.page?.fallback,pathDir:F(d.BASE_PATH,"portal-resources")}),[,s]=Hm(r),o=Math.floor(r.length/2),c=r.slice(0,o),m=r.slice(o);return u("div",{className:"w-full mb-5","data-component":"sticky-bottom-menu-container",children:u("div",{className:"fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]",children:p("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[c.map(Th(s,n)),u(Km,{isActive:t,onClick:l}),m.map(Th(s,n))]})})})})),Th=(e,t)=>(l,n)=>u(Wm,{isActive:l===e,item:l,onClick:t},l.href||String(n)),Ih=h();const Bh=g((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Mh()}))),Mh=()=>p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[Ph("M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"),Ph("M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z")]}),Ph=e=>u("path",{stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",strokeMiterlimit:"10",d:e}),Rh=g((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Ih.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Ih.like(e))}),[e]),dislike:i((async()=>{l(await Ih.dislike(e))}),[e])}}(v().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(Bh,{onClick:ce(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(Bh,{onClick:ce(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),Ah=g((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return p("div",{"data-theme":s,children:[p("section",{className:N("@container relative",a,e),children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:z(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[D({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),z(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Rh,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Ch,{options:o}),u(Om,{}),u(Lm,{}),u(Em,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Ah.childrenTypes=[],Ah.slots=()=>["header","footer"];e.Blocks=zm,e.ContentPage=Ah,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=ce,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.14.160",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=O,e.useRouter=v,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=g((({children:e})=>f?e:null));const y=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}};function v(){return v._impl()}v._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),v.setup=e=>{v._impl=e};const N=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),w={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},k=g((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:i="p-xl",padding:r,block:s,tag:o="section",role:c,children:d,style:m})=>{const h=o,p=v(),[g,x]=n(!1);a((()=>y.subscribe("tab",(e=>{e.groupName&&e.groupName!==s?.labelGroup||x(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s,p]);const f=t&&l;return u(h,{className:N("@container font-sans",f?"group":"",w[t],g?"hidden":"",r||i,e),...f?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:c,style:m,children:d})})),S={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},C={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=g((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=S[l]||"h3";return u(i,{className:N("font-sans m-0",C[t],e),children:n||a})})),I=g((({children:e,...t})=>u("p",{className:N("font-sans",Object.values(t)),children:e}))),B={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},M=g((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=B[l],m={marginTop:d.descriptionStyle};return p(k,{className:N(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(T,{className:N("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(I,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),P=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),R=[];function A(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=P,blocksRegistry:r={},ancestors:s=R}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:N(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const V=[],z=(e,{key:t,ancestors:l=V,slotName:n=null,extraProps:a,renderProps:i=A,...r})=>{const s=a?(e,t)=>A(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||V,[r.parent,n]]:l},a)))};function D({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?z(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const _=e=>Boolean(e?.includes(":")),E=(e,t)=>Boolean(e&&!_(e)&&(!t||"_self"===t)),j=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),F=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var O=Object.freeze({__proto__:null,isURL:_,isLocalURL:E,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:j,joinPath:F});const L="/api/",$=`${L}v1/storage`,U=e=>(t,l=d.BASE_PATH)=>{if(!t||_(t)||[d.CDN,L].some((e=>H(t,e))))return t;if(/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(t))return`${$}/${t}/file`;const n=t.startsWith("/");return F(H(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},H=(e,t)=>t&&e&&e.startsWith(t),K={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},W=g((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const o=v(),c="normal"===i?`${l}.svg`:`sprites.svg#${l}`,m=U(o)(F(d.CDN,"/icons/",c));return"normal"===i?u("img",{className:e,src:m,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:Y(e,s)}):u(X,{className:e,children:p("svg",{className:N(G(r),K[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:m,xlinkHref:m})]})})})),Y=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},G=e=>e?"":"w-full h-full",X=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),q=(e,t)=>l=>l&&!_(l)?U(e)(F(t,l)):l,J=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=v();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(J).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:q(a,n)(e),type:ee(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?Z({...t,src:q(a,n)(t.src)},l):null]})})),Z=(e,t="")=>u("img",{src:e.src,className:N("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),ee=e=>e?`image/${String(e)}`:void 0,te=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(W,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(Q,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),le={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ne="bg-main-divider text-main-disabled",ae={primary:ne,secondary:ne,white:ne,link:"",transparent:"",gray:ne,"":""},ie="text-center font-sans select-none",re={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","":""},se=({className:e,rounded:t,version:l})=>[ie,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?le[l]:"",t?"rounded-full":"rounded-md",e].join(" "),oe=()=>({open:(e,t={})=>y.fire("dialog",{type:"open",dialog:e,...t}),close:()=>y.fire("dialog",{type:"close"}),closeAll:()=>y.fire("dialog",{type:"close",all:!0})}),ce=(e,t)=>ce._impl(e,t);function de(e={}){const{isRemote:t,basePath:l}=e,n=v(),{closeAll:a}=oe();return e=>({...e,href:t&&!l?e.href:U(n)(e.href,l),"aria-label":e.text,onClick:ce(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&E(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}ce._impl=e=>e,ce.setup=e=>{ce._impl=e};const me=g((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=ue(e)?"hidden lg:block":"";return p("div",{className:N(he(e),"flex gap-xs"),children:[n?u("div",{className:N(r,re[i]),children:n}):null,ue(e)?p("div",{className:"whitespace-pre",children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:N(r,re[i]),children:a}):null]})})),he=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return N("group/btn items-center justify-center",ue(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},ue=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),pe=({className:e,rounded:t,version:l})=>["inline-block",ie,l?ae[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ge=g((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=de()({onClick:r,href:n,...a}),o=t??u(me,{...s});return u(e?fe:xe,{...s,children:o})})),xe=g((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:se({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),fe=g((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:pe({className:e,rounded:n,version:l}),children:a})));function be(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"hidden sm:flex items-center gap-s",children:[u("div",{className:se({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(te,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(ge,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const ye={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},ve=g((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:r="",buttons:s,leftImage:o,rightImage:c,imageAlign:d,isImageAlwaysOnRight:m=!1,isImageSecondary:h=!1,backwardButton:g,children:x,...f})=>{const b=v(),y=i((e=>{e?.preventDefault(),b.back()}),[]);return p("div",{className:Ne(n,l,e),children:[g?be(t,y):null,a?u("div",{className:"relative h-full",children:a}):null,p("div",{className:N("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[Te(o,{imageAlign:d,className:"mx-auto"}),p("div",{className:N("grid gap-3xl",c?"@xl:grid-cols-2":"",o?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[p("div",{className:"grow space-y-lg min-w-fit",children:[r,x]}),Ce(D({...f,extraProps:{className:"@container-normal"}})),Te(c,{className:N("@xl:justify-self-end @xl:col-start-2",s?we(m):"",ke(m),Ie(h)),imageAlign:d}),Se(s)]})]})]})})),Ne=(e="",t="",l="")=>N("relative flex flex-col gap-3xl overflow-hidden",e||t,l),we=e=>e?"row-span-2":"@xl:row-span-2",ke=e=>e?"col-start-2 self-center":"",Se=e=>e?u("div",{className:"self-end",children:e}):null,Ce=e=>e&&e?.length?u("div",{className:"flex items-start justify-end",children:e}):null,Te=(e,{className:t,imageAlign:l})=>e?u("div",{className:N("shrink-1/2 justify-self-center",l&&ye[l],t),children:e}):null,Ie=e=>e?"hidden @xl:block":"",Be=(e=[])=>e.reduce(((e,t)=>e+t),0),Me=(e=[])=>e?.length?Be(e)/e.length:0,Pe=(e,t="normal")=>e?u("div",{className:N("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:u(te,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Re=g((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?u("div",{"data-component":"rich-text-container",children:u("div",{className:N(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Ae=(e,t)=>e?u(I,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ve=g((({children:e,...t})=>u("span",{className:N("font-sans",Object.values(t)),children:e}))),ze=(e,t)=>e?u(Ve,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,De=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Re,{...e},`rte-${t}`):["label"in e?ze(e.label,t):null,"description"in e?u("span",{className:e.descriptionClassName,children:Ae(e.description,t)},String(t)):null],_e=g((({className:e,benefitsVersion:t,...l})=>p("div",{className:N("flex gap-m min-w-56 items-center",e),children:["icon"in l?Pe(l.icon,t):null,u("div",{children:De(l)})]}))),Ee=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),je=e=>{return((t=e.map(Ee))?.length?Math.sqrt(Math.abs(Me(t.map((e=>e**2)))-Me(t)**2)):0)>16;var t},Fe=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Oe=e=>!e.some(Fe),Le=g((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:N("flex gap-x-m gap-y-s",je(l)||Oe(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(_e,{benefitsVersion:t,...e},String(l))))}):null)),$e=g((({className:e,benefits:t})=>t?.length?u("div",{className:N("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(De)}):null)),Ue=g((({isTabularBenefits:e,...t})=>u(e?$e:Le,{...t}))),He=e=>Boolean(e?.src||e?.icon),Ke=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:N("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map(We(l))}):null,We=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o=Ye(a,r),c=Ye(i,r);return n||a?.icon?u(ge,{className:N("basis-full @lg:basis-auto",e),appendLeft:Ge({...a,iconVersion:o}),appendRight:Ge({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Ye=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Ge=e=>He(e)?u(te,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Xe=g((({className:e,isDotted:t,dotClassName:l,children:n})=>p("div",{className:N("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:N("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,u("span",{children:n})]}))),qe={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},Je=g((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=qe[n];return l?.length?u("section",{className:N("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>u(Xe,{isDotted:t,dotClassName:N(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),Qe=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),Ze=g((({priceList:e})=>e?.length?u("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:e.map(et)}):null)),et=({label:e,amount:t})=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",children:[u(Ve,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?p("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Qe(2)(t)," ₽"]}):null]}),tt=g((({className:e,tags:t})=>t?.length?u("div",{className:N("flex flex-wrap gap-xs",e),role:"list",children:t.map(lt)}):null)),lt=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(Ve,{size:"text-m",font:"font-light",children:e})},String(t)),nt={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},at=g((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m,items:h,isDotted:g=!0,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:C,...T})=>{const I=y?.src?u(te,{image:y}):null,B=u(M,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),P=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(ve,{className:e,padding:t,defaultPadding:l,...m?{title:B}:{insetTitle:B},...it(I,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ke(b),backwardButton:S,...T,children:p("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?u(Ue,{benefitsVersion:s,isTabularBenefits:o,benefits:P}):null,d?u(Re,{__html:d}):null,h?.length?u(Je,{items:h,isDotted:g,listItemSize:nt[i]}):null,C,x?.length?u(Ze,{priceList:x}):null,rt(f)]})})})),it=(e,t)=>t?{rightImage:e}:{leftImage:e},rt=e=>e?.length?u(tt,{tags:e}):null,st=g((({className:e,padding:t,...l})=>u(k,{className:N("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:u(at,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})));st.childrenTypes=["UnitBlock"];const ot=e=>null!=e,ct=new Map,dt=e=>Boolean(e?.every((e=>Array.isArray(e)?dt(e):!e||"string"==typeof e))),mt=e=>dt(e)?e.toString():"";function ht(e,t,{fallback:l,cache:i}={}){const s=r((()=>ut(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(ot))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=ct)=>l=>{const n=mt(l),a=t.get(n);if(n&&ot(a))return a;const i=e(...l);return n&&ot(i)&&t.set(n,Promise.resolve(i)),i})(t,i)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function ut(e){return Array.isArray(e)?e:e instanceof Function?ut(e()):[e]}async function pt(e,t){try{return e?await gt(e,t):null}catch(e){console.error(e)}return null}const gt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),xt={},ft="/wcms-resources";function bt(e,t={}){const{fallback:l=xt,pathDir:n=ft}=t,{data:a}=ht(e?`${n}/${e}.json`:null,gt,{fallback:l});return a||xt}const yt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),vt=g((e=>{const t=((e="reklamnaya-plitka")=>{const t=bt(e),l=r((()=>yt(0,t?.items?.length)),[t]);return t?.items?.[l]})(e.options?.page?.adSourceBook);return t?u(b,{children:u(st,{...t,...e})}):null})),Nt=e=>e?.replace(/[^+\d]/g,"");const wt=e=>e&&"+7 ("!==e?{secondaryPhoneNumber:Nt(e)}:{},kt=e=>e,St=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[a,r]=n(e),[o,c]=n(!1),[d,m]=n({}),h=s({}),u=i(((e,t)=>{const{parse:l=kt,format:n=kt}=t||{};return h.current||(h.current={}),h.current[e]||=t=>{r((n=>({...n,[e]:l(t)}))),m((t=>({...t,[e]:!0})))},{value:n(a[e]),isDirty:o||d[e],onChange:h.current[e]}}),[a,o,d]),p=i((e=>{r(e),m(e)}),[]),g=i((()=>{r(e),c(!1),m({})}),[e]),x=i((e=>{e.preventDefault(),t?g():c(!0),l&&l(a)}),[l,a]);return[a,{isDirty:o||Object.values(d).some(Boolean),field:u,update:p,reset:g,onSubmit:x}]},Ct=g((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:N("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:N("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?u(Ve,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Tt=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],It=e=>!e?.length,Bt=e=>t=>l=>e(l)?[]:[t],Mt=g((({text:e,link:t})=>p(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(Ve,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?u(ge,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:u(Ve,{children:t.text})}):null]}))),Pt="container space-y-lg",Rt="w-full max-w-xl space-y-s m-auto",At=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Vt=g((({title:e,children:t})=>p("fieldset",{className:"grid @xl:flex @xl:justify-between gap-lg border-b border-b-main-divider @xl:border-none",children:[e?u("legend",{className:"w-full",children:u(T,{title:e,headingType:"h6",className:"@xl:text-center"})}):null,t]}))),zt="@xl:w-1/2 space-y-s",Dt=g((({key:e,className:t="",id:l,name:n,type:r="text",label:o,placeholder:c,value:d="",valid:m=!0,children:h,onChange:g,onFocus:x,onBlur:f,pattern:b,autoFocus:y=!1,isTextarea:v=!1})=>{const w=s(null),k=i((e=>{g&&g(e.target?.value||"")}),[g]);a((()=>{y&&w.current?.focus()}),[y,w]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=h?"pr-3xl":"",T=Et(m);return p("div",{className:N("relative",t),children:[p("label",{children:[o?_t(o):null,v?u("textarea",{className:N("block resize-y min-h-24",S,T),id:N("textarea",l),name:n||l,placeholder:c,value:d,onInput:k,onFocus:x,onBlur:f},e):u("input",{type:r,className:N("h-14",S,C,T),ref:w,id:l,name:n||l,placeholder:c,value:d,onInput:k,onFocus:x,onBlur:f,pattern:b},e)]}),h]})})),_t=e=>u("div",{className:"mb-xs",children:u(Ve,{size:"text-m",font:"font-light",children:e})}),Et=e=>e?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error",jt=e=>u("div",{className:"h-4",children:e?u(Ve,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Ft=g((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,...o})=>p("div",{className:N("shrink-0 w-full",e),children:[u(Dt,{type:"text","aria-label":t,label:t&&o?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:o?.errors&&!t?`${n}*`:n}),jt(a)]}))),Ot=e=>"_"===e,Lt=e=>/\d/.test(e),$t=e=>Ot(e)||Lt(e),Ut=[..."+7 (___) ___-__-__"],Ht=Ut.findIndex(Ot),Kt=Ut.map(((e,t)=>$t(e)?Ut.slice(0,t).filter($t).length:-1));const Wt=g((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Ut.map(((e,l)=>Lt(e)?e:t.charAt(Kt[l])||e)),n=Kt.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Ht,n)):l).join("")}(e))),[t]);return u(Dt,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Yt=g((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>p("div",{className:N("shrink-0 w-full",e),children:[u(Wt,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),jt(n)]}))),Gt="Некорректно заполненное поле",Xt=Bt((e=>null!=e&&""!==e))(Gt),qt=Bt((e=>"string"==typeof e&&e.length>1))(Gt),Jt=Bt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Gt),Qt=(Zt=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Bt((e=>"string"==typeof e&&Zt.test(e))))(Gt);var Zt;const el=Bt((e=>"boolean"==typeof e&&e))(Gt),tl=(e,t)=>p(Vt,{title:t,children:[p("div",{className:zt,children:[u(Ft,{label:"Наименование организации",...At(e("fullName"),Xt)}),u(Ft,{label:"Контактное лицо",...At(e("name"),qt)})]}),p("div",{className:zt,children:[u(Ft,{label:"ИНН",...At(e("inn"),Jt)}),u(Yt,{label:"Телефон",...At(e("phone"),Qt)})]})]}),ll=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}];function nl(){const{data:e}=ht("/api/v1/regions",gt);return e||[]}function al(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const il=e=>e?.text||e?.key||"";function rl(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function sl(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return rl(globalThis.document,"click",l),t}const ol=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,cl=g((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:ol(t,n).map((e=>p("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[u("span",{className:"min-h-6",children:il(e)}),u(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:N("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function dl({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:o,iconVersion:c}){const d={open:(e,t)=>y.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>y.fire("popup",{type:"update",popup:e,...t}),close:()=>y.fire("popup",{type:"close"})},m=i((()=>{d.close(),o&&o()}),[o]),h=i((e=>{m(),r&&r(e)}),[m,r]),p=s(null),g=sl(m);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:o}=a.getBoundingClientRect();d.update(u(cl,{popupRef:g,options:t,value:l,query:n,onChange:h,iconVersion:c}),{top:i+window.scrollY+o,left:r,width:s})}),[e,t,l,n,h]),p}const ml=g((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:o="",isSearch:c=!1,iconVersion:d,onChange:m})=>{const[h,{setFalse:g,setTrue:x}]=al(),[f,b]=n(""),y=i((()=>{b(""),g()}),[]),v=dl({isOpen:h,options:l,value:a,query:f,onChange:m,onClose:y,iconVersion:d});return p("div",{className:e,children:[hl(t),p("div",{className:N("relative",h?"z-20":"z-10"),ref:v,children:[p("div",{className:N("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",pl(s,r)),onClick:h?y:x,children:[u("p",{className:"p-m pr-8 flex items-center overflow-hidden text-ellipsis",children:il(a)||o}),ul(h,d)]}),c&&h?u("div",{className:N("absolute top-0 w-full z-20"),children:u(Dt,{type:"text",autoFocus:!0,value:f,onChange:b})}):null]})]})})),hl=e=>e?u("div",{className:"mb-xs",children:u(Ve,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,ul=(e,t)=>u(W,{className:N("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),pl=(e,t)=>N(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),gl=g((({className:e="",label:t,error:l,...n})=>p("div",{className:e,children:[u(ml,{...n,valid:!l,label:n?.errors?`${t}*`:t}),jt(l)]}))),xl=g((({field:e})=>{const t=nl();return u(gl,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...At(e("region"),Xt)})})),fl=({field:e,title:t})=>p(Vt,{title:t,children:[u("div",{className:zt,children:u(gl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:ll,...At(e("acquiringType"),Xt)})}),u("div",{className:zt,children:u(xl,{field:e})})]});function bl({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const yl={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"},vl={primary:N("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:N("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},Nl=g((({children:e,...t})=>{const l=e=>({...e,onClick:ce(bl(e),e)}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:o=!0,role:c,onClick:d}=l(t);return u("button",{className:N("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":N(yl[a],vl[a]),o?"rounded-md":"",n),type:s,role:c,onClick:d,children:e})})),wl=(e,t)=>u(Nl,{className:N("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),kl={typeForm:{key:"acqr",text:"Предупреждение о мошенничестве"},acquiringType:{key:"trade",text:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},Sl=Tt({acquiringType:Xt,region:Xt,fullName:Xt,inn:Jt,name:qt,phone:Qt}),Cl=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:a,...i}=e,r=Tl(t?.key),s={partnerComments:`Вид эквайринга=${t?.text||""}${r?`/Онлайн касса=${l}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`,...i};It(Sl(e))&&n(s,!1)}),[n]),[,{field:r,...s}]=St(kl,{onSubmit:a}),o=Tl(r("acquiringType").value?.key);return p("form",{className:Pt,onSubmit:s.onSubmit,children:[fl({field:r,title:"Вид эквайринга и регион"}),tl(r,"Данные организации"),o?p("div",{children:[u(Ct,{text:"Хочу купить онлайн-кассу",...r("onlineCheckout")}),u(Ct,{text:"Хочу купить POS-терминал",...r("posTerminal")})]}):null,wl(t),u(Mt,{link:l})]})})),Tl=e=>"all"===e||"trade"===e,Il=g((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return u("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),Bl=[{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"}],Ml=g((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Il,{paths:Bl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:N("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Pl(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(Ve,{size:"text-l",font:"font-light",children:l})}):null]})})})),Pl=e=>N("rounded border",e?"bg-primary-main":""),Rl=g((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>p("div",{className:N("shrink-0 w-full",e),children:[u(Ml,{text:t,value:l,disabled:a,onChange:r},n),jt(i)]}))),Al=(e,t,l)=>p("div",{className:"flex gap-m flex-col lg:flex-row w-full justify-between items-baseline",children:[p("div",{children:[p("div",{className:"flex gap-3",children:[u(Ml,{...e}),u(Mt,{text:"Согласен с ",link:t})]}),jt(At(e,el).error)]}),wl(l)]}),Vl=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},zl=()=>{},Dl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const o=[];let c=1;for(let d=0;d<6;d++){const m=[];for(let o=0;o<7;o++)if(0===d&&o<t)m.push(u("td",{},`empty-${o}`));else if(c>l)m.push(u("td",{},`empty-${o}`));else{const t=new Date(a,n,c),l=_l(t,e),o=El(t,i,r);m.push(u("td",{children:u("div",{className:jl(l,o),onClick:()=>!o&&s(t),children:c})},`day-${c}`)),c++}o.push(u("tr",{children:m},`row-${d}`))}return o},_l=(e,t)=>t&&e.toDateString()===t.toDateString(),El=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),jl=(e,t)=>N("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Fl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Ol=g((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=zl})=>{const o=i((e=>s(e)),[]),{firstDayOfWeek:c,totalDays:d}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return p("table",{className:"mx-auto",children:[u("thead",{className:"text-gray font-light",children:u("tr",{children:Fl.map(((e,t)=>u("th",{className:"p-s",children:e},String(t))))})}),u("tbody",{children:Dl({firstDayOfWeek:c,today:e,totalDays:d,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:o})})]})})),Ll=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],$l=Ll.map((e=>({key:e}))),Ul=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Hl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Kl={className:"min-w-32",iconVersion:"black",isBorder:!1},Wl=g((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:o})=>{const[c,{setValue:d}]=al(!1),[m,h]=n(l?.getMonth()||(new Date).getMonth()),[g,x]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:f,handleNextMonth:b,handleSelectMonth:y,handleSelectYear:v,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=sl(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Ll.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:$l,yearsOptions:Ul,ref:s}})({onYearSelect:x,onMonthSelect:h,onShowCalendar:d,selectedYear:g,selectedMonth:m,showCalendar:c});return p("div",{className:N(e,"relative"),ref:C,children:[u(Ve,{size:"text-m","font-weight":"font-light",children:t}),Yl(S,l,a),c?p("div",{className:"absolute bg-white z-20 select-none",children:[p("div",{className:"flex gap-s",children:[u("div",{className:"my-auto",onClick:f,children:u(W,{...Hl,className:"-rotate-90 cursor-pointer"})}),u(ml,{onChange:y,value:{key:Ll[m]},options:w,...Kl}),u(ml,{onChange:v,value:{key:String(g)},options:k,...Kl}),u("div",{className:"my-auto",onClick:b,children:u(W,{...Hl,className:"rotate-90 cursor-pointer"})})]}),u(Ol,{today:l,currentMonth:m,currentYear:g,onDateSelect:o,min:r,max:s})]}):null]})})),Yl=(e,t,l)=>p("div",{onClick:e,className:N("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[u(I,{children:t&&Vl(t)}),u(W,{...Hl,name:"CalendarIcon"})]}),Gl=g((({className:e,label:t,value:l,error:n,onChange:a,...i})=>p("div",{className:N("shrink-0 w-full",e),children:[t?u("div",{className:"mb-xs",children:u(Ve,{size:"text-m",font:"font-light",children:i?.errors?`${t}*`:t})}):null,u(Wl,{value:l,onChange:a,valid:Boolean(!n)}),jt(n)]}))),Xl={surname:"",name:"",middleName:""},ql=(e,t=!0)=>p("div",{className:"space-y-s",children:[u(Ft,{label:"Фамилия",...At(e("surname"),qt)}),u(Ft,{label:"Имя",...At(e("name"),qt)}),u(Ft,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),t?u(Gl,{label:"Дата рождения",...At(e("birthday"),Xt)}):null]}),Jl={...Xl,typeForm:{key:"ANTIFRAUD",text:"Предупреждение о мошенничестве"},phone:"",birthday:void 0,isClient:!1,comment:"",consentDataProcessing:!1},Ql=Tt({typeForm:Xt,surname:Xt,name:qt,birthday:Xt,phone:Qt,comment:Xt,consentDataProcessing:el}),Zl=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{It(Ql(e))&&l(e,!0)}),[l]),[,{field:a,...r}]=St(Jl,{onSubmit:n});return u("form",{className:Pt,onSubmit:r.onSubmit,children:u(Vt,{children:p("div",{className:Rt,children:[ql(a,!0),u(Yt,{label:"Телефон",...At(a("phone"),Qt)}),u(Rl,{...a("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}),u(Ft,{...At(a("comment"),Xt),placeholder:"Комментарий",isTextarea:!0}),Al(a("consentDataProcessing"),t,e)]})})})})),en={typeForm:{key:"bcrd",text:"Заявка на бизнес-карту"},name:"",phone:"",inn:"",email:""},tn=Tt({region:Xt,name:qt,phone:Qt,inn:Jt,email:Xt}),ln=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{It(tn(e))&&n(e)}),[n]),[,{field:r,...s}]=St(en,{onSubmit:a});return p("form",{className:Pt,onSubmit:s.onSubmit,children:[u(xl,{field:r}),p(Vt,{children:[p("div",{className:zt,children:[u(Ft,{label:"Контактное лицо",...At(r("name"),qt)}),u(Ft,{label:"ИНН",...At(r("inn"),Jt)})]}),p("div",{className:zt,children:[u(Yt,{label:"Телефон",...At(r("phone"),Qt)}),u(Ft,{label:"Электронная почта",...At(r("email"),Xt)})]})]}),wl(t),u(Mt,{link:l})]})})),nn={typeForm:{key:"CORRUPTION",text:"Факты коррупции"},...Xl,phone:"",email:"",comment:"",consentDataProcessing:!1},an=Tt({typeForm:Xt,surname:Xt,name:qt,region:Xt,phone:Qt,email:Xt,comment:Xt,consentDataProcessing:el}),rn=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{It(an(e))&&l(e,!0)}),[l]),[,{field:a,...r}]=St(nn,{onSubmit:n});return u("form",{className:Pt,onSubmit:r.onSubmit,children:u(Vt,{children:p("div",{className:Rt,children:[ql(a,!1),u(xl,{field:a}),u(Yt,{label:"Телефон",...At(a("phone"),Qt)}),u(Ft,{label:"Электронная почта",...At(a("email"),Xt)}),u(Ft,{...At(a("comment"),Xt),placeholder:"Ваше сообщение",isTextarea:!0}),Al(a("consentDataProcessing"),t,e)]})})})})),sn=[];const on=async e=>await pt(e,{method:"GET"})||sn;function cn(){const{data:e}=ht("/api/v1/premiumBranchesByRegions",gt);return e||[]}const dn=g((({field:e,regionKey:t,isPremium:l=!1})=>{const n=l?cn().find((e=>e?.region===t))?.branches:function(e){const{data:t}=ht(e?`/api/v1/branches?regionCode=${e}`:null,on);return t||sn}(t).filter((e=>e?.address));return u(gl,{label:"Адрес",placeholder:"Выберите адрес",options:(n||[]).map((({address:e=""})=>({key:e,text:e}))),...At(e("addressBranch"),Xt)})})),mn=["От 1 000 ₽","До 1 000 000 000 ₽"],hn=["От 1 мес","До 15 лет"],un=(e,t)=>p(Vt,{title:t,children:[p("div",{className:zt,children:[u(Ft,{label:"Наименование организации",...At(e("fullName"),Xt)}),u(Ft,{label:"ИНН",...At(e("inn"),Jt)}),u(Yt,{label:"Телефон",...At(e("phone"),Qt)})]}),p("div",{className:zt,children:[u(Ft,{label:"Годовая выручка, ₽",...At(e("annualRevenue"),Xt)}),u(Ft,{label:"Контактное лицо",...At(e("name"),qt)}),u(Ft,{label:"Электронная почта",...At(e("email"),Xt)})]})]}),pn=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},gn=(e,t,l)=>Math.max(t,Math.min(e,l));function xn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function fn({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:N("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=xn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const bn=1,yn=100,vn=g((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:bn),max:s=(a.length?a.length-1:yn),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=pn(e,{normalize:(e=0)=>a.length?Nn(a)(e):gn(e,r,s),format:Qe()}),g=i((e=>{m&&m(xn(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(Ve,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:N("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:g,...h}),fn({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),wn(n)]})})),Nn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),wn=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(Ve,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),kn=(e,t)=>p(Vt,{title:t,children:[u("div",{className:zt,children:u(vn,{title:"Сумма, ₽",items:mn,min:1e3,max:1e9,...e("amount")})}),u("div",{className:zt,children:u(vn,{title:"Срок, месяцев",items:hn,min:1,max:180,...e("term")})})]}),Sn={typeForm:{key:"cred",text:"Кредит"},amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",email:"",annualRevenue:""},Cn=Tt({fullName:Xt,annualRevenue:Xt,inn:Jt,name:qt,phone:Qt,region:Xt}),Tn=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,addressBranch:a,annualRevenue:i,...r}=e;It(Cn(e))&&l({...r,addressBranch:a?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${i}`})}),[l]),[a,{field:r,...s}]=St(Sn,{onSubmit:n});return p("form",{className:Pt,onSubmit:s.onSubmit,children:[kn(r,"Параметры"),un(r,"Данные организации"),p(Vt,{title:"Офис банка",children:[u("div",{className:zt,children:u(xl,{field:r})}),u("div",{className:zt,children:u(dn,{field:r,regionKey:a.region?.key})})]}),wl(e),u(Mt,{link:t})]})})),In={typeForm:{key:"dpst",text:"Заявка на депозит"},name:"",phone:""},Bn=Tt({name:qt,phone:Qt}),Mn=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{It(Bn(e))&&l(e)}),[l]),[,{field:a,...r}]=St(In,{onSubmit:n,resetOnSubmit:!1});return u("form",{className:Pt,onSubmit:r.onSubmit,children:u(Vt,{title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",children:p("div",{className:Rt,children:[u(Ft,{label:"Имя",...At(a("name"),qt)}),u(Yt,{label:"Телефон",...At(a("phone"),Qt)}),wl(e),u(Mt,{link:t})]})})})})),Pn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],Rn=[{key:"phone",text:"Телефонный звонок"},{key:"mail",text:"Электронное сообщение"}],An=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Vn={typeForm:Xt,region:Xt,surname:Xt,name:qt,feedbackMethod:Xt,phone:Qt,email:Xt,comment:Xt,consentDataProcessing:el},zn={...Xl,typeForm:{key:"FEEDBACK",text:"Задать вопрос по продуктам и услугам"},serviceDirection:{key:"Физическое лицо"},birthday:void 0,feedbackMethod:{key:"Телефонный звонок"},phone:"",email:"",comment:"",consentDataProcessing:!1},Dn=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{_n(e.typeForm.key,e.serviceDirection?.key)?((e,t)=>{const l=Tt({...Vn,addressBranch:Xt,inn:Jt});It(l(e))&&t(e,!1)})(e,l):"FEEDBACK"===e.typeForm.key?((e,t)=>{const l=Tt({...Vn,birthday:Xt});It(l(e))&&t(e,!0)})(e,l):((e,t)=>{const l=Tt({...Vn,addressBranch:Xt});It(l(e))&&t(e,!0)})(e,l)}),[l]),[a,{field:r,...s}]=St(zn,{onSubmit:n}),o="FEEDBACK_QS"===r("typeForm").value?.key,c=_n(r("typeForm").value?.key,r("serviceDirection").value?.key);return u("form",{className:Pt,onSubmit:s.onSubmit,children:u(Vt,{children:p("div",{className:Rt,children:[u(gl,{label:"Тема",placeholder:"Выберите тему",options:Pn,...At(r("typeForm"),Xt)}),o?u(gl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:An,...At(r("serviceDirection"),Xt)}):null,u(xl,{field:r}),o?u(dn,{field:r,regionKey:a?.region?.key}):null,ql(r,!0),c?p("div",{children:[u(Ft,{label:"ИНН",...At(r("inn"),Jt)}),u(Ft,{label:"Наименование организации",...r("fullName")})]}):null,u(gl,{label:"Способ получения ответа",options:Rn,...At(r("feedbackMethod"),Xt)}),u(Yt,{label:"Телефон",...At(r("phone"),Qt)}),o?p("div",{children:[u(Yt,{label:"Дополнительный телефон",...r("secondaryPhone").value&&"+7 ("!==r("secondaryPhone").value?At(r("secondaryPhone"),Qt):r("secondaryPhone")}),u(Ft,{label:"Электронная почта",...At(r("email"),Xt)}),u(Ft,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...r("bankEmpolee")}),u(Ft,{label:"Дата и время обращения в Банк",...r("applicationDate")})]}):u(Ft,{label:"Электронная почта",...At(r("email"),Xt)}),u(Ft,{...At(r("comment"),Xt),placeholder:"Ваше сообщение",isTextarea:!0}),Al(r("consentDataProcessing"),t,e)]})})})})),_n=(e="",t="")=>"FEEDBACK_QS"===e&&"Юридическое лицо / ИП"===t,En=g((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=bt(l||"regions-grant-support"),[i,r]=n({key:""}),s=se({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s",children:[a?u(gl,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:a.map((({name:e=""})=>({key:e,text:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(ge,{href:o,target:"_blank",className:N("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),jn={...Xl,phone:"",email:"",birthday:void 0,consentDataProcessing:!1},Fn=Tt({surname:qt,name:qt,phone:Qt,email:Xt,birthday:Xt,consentDataProcessing:el}),On=g((e=>{const{button:t,link:l,product:n="",onSubmit:a}=e,r=i((e=>{It(Fn(e))&&a({...e,product:n},!0)}),[a]),[,{field:s,...o}]=St(jn,{onSubmit:r});return p("form",{className:Pt,onSubmit:o.onSubmit,children:[p(Vt,{children:[p("div",{className:zt,children:[u(Ft,{label:"Фамилия",...At(s("surname"),qt)}),u(Ft,{label:"Отчество (Обязательно, при наличии)",...s("middleName")}),u(Yt,{label:"Телефон",...At(s("phone"),Qt)})]}),p("div",{className:zt,children:[u(Ft,{label:"Имя",...At(s("name"),qt)}),u(Gl,{label:"Дата рождения",...At(s("birthday"),Xt)}),u(Ft,{label:"Электронная почта",...At(s("email"),Xt)})]})]}),Al(s("consentDataProcessing"),l,t)]})})),Ln={typeForm:{key:"SELFCOLLECTION",text:"Самоинкассация"},fullName:"",phone:"",consentDataProcessing:!1},$n=Tt({typeForm:Xt,region:Xt,fullName:Xt,phone:Qt}),Un=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{It($n(e))&&l(e,!1)}),[l]),[,{field:a,...r}]=St(Ln,{onSubmit:n});return u("form",{className:Pt,onSubmit:r.onSubmit,children:u(Vt,{children:p("div",{className:Rt,children:[u(Ft,{label:"ФИО",...At(a("fullName"),Xt)}),u(xl,{field:a}),u(Yt,{label:"Телефон",...At(a("phone"),Qt)}),Al(a("consentDataProcessing"),t,e)]})})})})),Hn=g((({field:e})=>{const t=cn().map((({region:e})=>({key:e,text:e})));return u(gl,{label:"Регион",placeholder:"Выберите регион",options:t,...At(e("region"),Xt)})})),Kn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Wn={typeForm:Kn[0],...Xl,email:"",phone:"",comment:"",consentDataProcessing:!1},Yn=Tt({typeForm:Xt,surname:Xt,name:qt,phone:Qt,email:Xt,addressBranch:Xt,consentDataProcessing:el}),Gn=g((({button:e,link:t,onSubmit:l,defaultType:n="PREMIUMSERVICE"})=>{const a=i((e=>{It(Yn(e))&&l(e,!0)}),[l]),[r,{field:s,...o}]=St({...Wn,typeForm:Xn(n)},{onSubmit:a}),c=r?.region?.key;return p("form",{className:Pt,onSubmit:o.onSubmit,children:[p(Vt,{title:"Ваши данные",children:[p("div",{className:zt,children:[u(Ft,{label:"Фамилия",...At(s("surname"),qt)}),u(Ft,{label:"Отчество (Обязательно, при наличии)",...s("middleName")}),u(Ft,{label:"Электронная почта",...At(s("email"),Xt)})]}),p("div",{className:zt,children:[u(Ft,{label:"Имя",...At(s("name"),qt)}),u(Yt,{label:"Телефон",...At(s("phone"),Qt)}),u(gl,{label:"Тип обслуживания",options:Kn,...At(s("typeForm"),Xt)})]})]}),p(Vt,{title:"Офис банка",children:[u("div",{className:zt,children:u(Hn,{field:s})}),u("div",{className:zt,children:u(dn,{field:s,regionKey:c,isPremium:!0})})]}),u(Ft,{...s("comment"),placeholder:"Комментарий, удобное время и прочее",isTextarea:!0}),Al(s("consentDataProcessing"),t,e)]})})),Xn=e=>Kn.find((t=>t.key===e)),qn=g((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u(Ve,{color:"text-primary-text",children:t}):null]})}))),Jn=e=>{const{value:t,onChange:l}=e("vedTypes");return u(Vt,{children:p("div",{className:"gap-xl grid @xl:flex @xl:items-center",children:[u(qn,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),u(qn,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),u(qn,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),u(qn,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},Qn=({field:e})=>{const t="currencyControl"===e("vedTypes").value;return p("div",{className:"space-y-s",children:[t?u(xl,{field:e}):null,p("div",{className:"grid @xl:grid-cols-2 @xl:gap-x-lg gap-s",children:[t?u(Ft,{label:"ИНН",...At(e("inn"),Jt)}):null,u(Ft,{label:"Наименование организации",...At(e("fullName"),Xt)}),u(Ft,{label:"ФИО",...At(e("name"),qt)}),u(Yt,{label:"Телефон",...At(e("phone"),Qt)}),t?null:u(Ft,{label:"Электронная почта",...e("email")})]})]})},Zn={typeForm:{key:"KVED",text:"Заявка на консультацию ВЭД"},vedTypes:"currencyControl",fullName:"",name:"",phone:"",inn:"",email:"",partnerComments:""},ea={fullName:Xt,name:qt,phone:Qt},ta=Tt({...ea}),la=Tt({...ea,inn:Jt,region:Xt}),na=e=>"currencyControl"===e,aa=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),ia={ApplicationFormBusinessCard:ln,ApplicationFormWed:g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{typeForm:t,fullName:l,name:a,phone:i,email:r,inn:s,region:o,vedTypes:c,partnerComments:d}=e,m={typeForm:t,fullName:l,name:a,phone:i,vedTypes:aa(c),partnerComments:d,...na(c)?{inn:s,region:o}:{email:r}};It((e=>na(e)?la:ta)(c)(e))&&n(m)}),[n]),[,{field:r,...s}]=St(Zn,{onSubmit:a});return p("form",{className:"container space-y-lg",onSubmit:s.onSubmit,children:[Jn(r),u(T,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),Qn({field:r}),u(Ft,{label:"Обращение",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",...r("partnerComments"),isTextarea:!0}),wl(t),u(Mt,{link:l}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),p("div",{className:"flex gap-xl",children:[p("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(te,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(te,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Mn,ApplicationFormCredit:Tn,ApplicationFormAcquiring:Cl,ApplicationFormGrantSupport:En,ApplicationFormIndividuals:On,ApplicationFormFeedback:Dn,ApplicationFormAntiFraud:Zl,ApplicationFormCorruption:rn,ApplicationFormSelfCollection:Un,ApplicationFormUltraPremium:Gn},ra=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(te,{image:{icon:(t?"ResponseOKIcon":"ResponseFailIcon")?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"42",height:"42"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),sa={send:async function(e,t=!1){const l=t?"/api/v1/lead":"/api/v1/sendcorporatelead",{typeForm:n,region:a,phone:i="",email:r,birthday:s,inn:o,fullName:c,addressBranch:d,secondaryPhone:m="",bankEmpolee:h,applicationDate:u,...p}=e,g={typeForm:n,[t?"regionBranch":"region"]:a,[t?"phoneNumber":"phone"]:Nt(i),[t?"email":"mail"]:r,...t?{birthday:s}:{inn:o,fullName:c},..."FEEDBACK"===n?{}:{addressBranch:d,bankEmpolee:h,applicationDate:u,...wt(m)},...p};try{const e=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(g)});return e?.ok?await e.json():null}catch(e){return null}}},oa=g((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async(e,t=!1)=>{const l=da(e),n=await sa.send(l,t)?"OK":"Fail";return s(n),n}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(T,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?ca(l,o):null,r?u(ra,{responseType:r}):null]})})})),ca=(e,t)=>{const l=e?.formType;if(!l||!(l in ia))return null;return u(ia[l],{...e,onSubmit:t})},da=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(t?.region?t?.text:t?.key)||t]))),ma="text-left",ha={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},ua=g((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:N("rounded-icon object-fit flex justify-center items-center",ha[l],e),children:u(W,{...i,width:"54%",height:"54%",name:a})}):null})),pa=g((({className:e="",title:t,benefitList:l,...n})=>p(k,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(T,{headingType:"h3",as:"h2",className:ma,title:t}):null,l?.length?u("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(ga)}):null]}))),ga=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>p("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?u(ua,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?u(te,{className:"shrink-0",image:n}):null,e?p("div",{className:"@sm:h-full space-y-xs",children:[u(T,{headingType:"h6",children:e}),u(Ve,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),u(Je,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),xa=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function fa(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const ba=g((({className:e,style:t,idx:l,activeIndex:n,observerOptions:o,children:c,onIntersection:d})=>{const m=function(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:fa(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}(i((e=>{e.length&&d&&d(l||0,e[e.length-1])}),[d,l]),o);return u("div",{className:N("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:m,children:c})})),ya=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],va=g((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:r=0,padding:o=0,listType:c="horizontal-list",snapAlign:d="snap-center",minHeight:m,children:h,onVisibleItemsChange:p,onVisibleIndicesChange:g})=>{const x={sensitivity:1,rootRef:l},f=s([]),b=i(((e,t)=>{const l=[...f.current||[]];l[e]=t,f.current=l,p&&p(l),g&&g(wa(l))}),[p,g]),y=a>0?r*Number(a)-1:0,v="vertical-list"===c,w="horizontal-list"===c,k={...w?Na(o,y):{},...v?xa(m):{},gap:`${r}px`};return u("div",{className:N("box-border overflow-auto no-scrollbar",c,e),style:k,ref:l,children:(S=(e,l)=>u(ba,{className:N(d,a?ya[a-1]:"",v?"h-full":"",t),style:w?Na(o/4):{},activeIndex:n,idx:l,observerOptions:x,onIntersection:b,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(h)});var S})),Na=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),wa=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ka={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Sa={"horizontal-list":"w-6","vertical-list":"h-6"},Ca=g((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?u("div",{className:N("flex gap-xs",ka[a],i?"group":"",e),"data-ver":i,children:Array.from({length:n}).fill(null).map(((e,n)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?Sa[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Ta=e=>e,Ia=(e=Ta)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Ba=Ia(),Ma=(e=Ta)=>Ia((t=>-e(t))),Pa=Ma(),Ra=e=>t=>e.scrollWidth/t,Aa=e=>(t,l)=>{e.scrollBy({left:l*Ra(e)(t),behavior:"smooth"})},Va=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[Ma()(a),Ia()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Aa(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Aa(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},za=g((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=true,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=Va({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:N(e,"vertical-list"===o?"relative h-full":""),children:[u(va,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(Ca,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Da=(e,t,l)=>{return u(za,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>p("div",{className:N("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(Ve,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?u(te,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?u(Ve,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},_a=g((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(k,{className:N("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[u(M,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Da(e,0,t):null]}))),Ea={start:"justify-start",center:"justify-center",end:"justify-end"},ja=g((({buttons:e,className:t="",align:l,...n})=>{const a=l?N("flex",Ea[l]):"";return u(k,{className:N("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Ke(e)})})),Fa=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})}));const Oa=g((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:u("div",{className:e,ref:i,children:l})})})),La=g((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r})=>p("div",{className:N("flex justify-between @xl:flex-col",e),children:[t?u(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,u("div",l?{children:u(Ve,{size:"text-h3",children:[i,Qe(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:u(Ve,{size:"text-h3",children:"-"})})]}))),$a=1e4,Ua=5e6,Ha=Math.round(29.5),Ka={minSum:$a,maxSum:Ua,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Wa={minSum:$a,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ya={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Ga={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Xa={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},qa=e=>e?u(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,Ja=g((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>p("div",{children:[u(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:Qe(n,{fixed:!0})(e)}),l?u("span",{className:"text-7xl",children:l}):null]}),a&&i?u("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Qa=g((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{className:"space-y-s",children:[u(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u(W,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),u("div",{className:"w-64",children:t?p(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Za=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?u(Qa,{title:e,...i}):p("div",{children:[u("div",{className:"hidden @xl:block",children:u(Ja,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),u("div",{className:"@xl:hidden",children:u(La,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function ei({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${Qe(2)(l.min||0)} ₽`,`До ${Qe(2)(l.max||0)} ₽`];return u(vn,{items:e?n:[],step:t,...l})}function ti(e){const{data:t}=ht(`/wcms-resources/${e}.json`,gt);return t}const li=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=ti(t||"bonus-calculator-data")||Ya,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},ni=g((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=St({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=li(a,t);return p("section",{className:N("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[p("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[ei({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),ei({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?Za({title:"Баллов за месяц",rate:d,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,p("div",{className:"flex flex-col gap-y-xl @xl:w-96",children:[m>=0?u(La,{title:"Баллов за год",value:m}):null,Ke(l,{isVertical:!0}),qa(n)]})]})})),ai=g((({className:e,inputChildren:t,rateChildren:l,resultChildren:n})=>p("section",{className:N("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[u("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:t}),u("div",{className:"border-b border-main-divider md:hidden"}),l,u("div",{className:"flex flex-col gap-2xl sm:w-96 max-w-full",children:n})]}))),ii=(e,t=0)=>e?.sum&&e.sum>=$a&&e.sum<=Ua?e.sum:t,ri=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,si=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,oi={horizontal:"gap-5xl",vertical:"flex-col gap-s"},ci=g((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:N(`flex ${oi[a]}`,l),children:e?.map((({id:e,text:l})=>u(Ml,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),di=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>p("div",{className:"space-y-s",children:[t?u("div",{className:"hidden @5xl:block",children:u(Ve,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?u("div",{className:"@5xl:hidden",children:u(Ve,{color:"text-secondary-text",font:"font-light",children:l})}):null,u(ci,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:N("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),mi=e=>di({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),hi=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:ui([e,t],n),ui=([e,t],l=[])=>({[e]:l.length?Pa(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Ba(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),pi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],gi=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,xi=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},fi=g((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r})=>{const[s,{field:o}]=St({moneyValue:ii(r,1e5),daysValue:ri(r,90),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),c=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=ti(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...Xa,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&gi(o,e)&&pi(n,["minSum","maxSum"],e)&&pi(l,["minDays","maxDays"],e)))||Xa,{rate:m}=d,h=xi(m,e),u=n+h,p=s?.rateRows||[Xa];return{...d,...ui(["minSum","maxSum"],p),...ui(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(s,t?.rateType&&t.sourceBookDir),{income:d,finalSum:m,rate:h,isUnavailableByTerm:g,depositeName:x}=c;return u(ai,{className:e,inputChildren:p("div",{children:[ei({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),(f={title:"Срок, дней",min:c.minDays,max:c.maxDays,...o("daysValue"),value:c.daysValue},u(vn,{items:[`От ${si(f.min||0)}`,`До ${si(f.max||0)}`],step:1,...f})),p("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[bi(c,o),mi({title:"Выплата процентов",orientation:"vertical",...o("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),rateChildren:Za({rate:h,depositeName:x,isShowDepositeName:i,isUnavailableByTerm:g}),resultChildren:p("div",{children:[yi(m,d),Ke(l,{isVertical:!0}),qa(n),qa(a)]})});var f})),bi=(e,t)=>p("div",{className:"space-y-s",children:[u(Ve,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(Ml,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(Ml,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),yi=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0 mb-lg",children:[u(La,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(La,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),vi=({min:e=0,max:t=0,availableMonths:l,...n})=>u(vn,{items:[`От ${Ni(e)}`,`До ${Ni(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Ni=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,wi=e=>di({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),ki=e=>Si({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Si({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Si({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Si({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Si=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Ci=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},Ti=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=ti(t||"credit-calculator-data"),s=i?.rateRows||[Ka],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>ki({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=hi(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=hi(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>ki({row:e,userInputParams:t,paramsViewSettings:l})&&pi(n,["minSum","maxSum"],e)&&pi(a,["minMonths","maxMonths"],e)))||Ka)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=Ci(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},Ii=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=St({moneyValue:ii(i,2e5),monthsValue:ri(i,Ha),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),o=Ti(r,t,a),c=wi({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return u(ai,{className:e,inputChildren:p("div",{children:[ei({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),vi({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),Bi({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),rateChildren:Za({rate:o.rate}),resultChildren:p("div",{children:[u(La,{title:"Ежемесячный платёж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block mb-lg",children:c}),Ke(l,{isVertical:!0}),qa(n)]})})})),Bi=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(Ml,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(Ml,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(Ml,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(Ml,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Mi=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},Pi=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=ti(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?Vi(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):0,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>Ai({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&Ai({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&pi(n,["minSum","maxSum"],t)&&pi(a||r,["minMonths","maxMonths"],t)))||Ga,{rate:d}=c,m=Ri(d,e),h=n+m,u=i?.rateRows||[Ga];return{...c,...ui(["minSum","maxSum"],u),...ui(["minMonths","maxMonths"],u),availableMonths:Mi(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},Ri=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},Ai=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Vi=(e,t)=>e+Math.round((t-e)/2),zi=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:o}]=St({moneyValue:ii(r,2e4),monthsValue:ri(r),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(r?.isRemoteRegistration)}),c=Pi(s,t,i),{defaultMonth:d,rate:m,income:h,finalSum:g}=c,{onChange:x}=o("monthsValue");return a((()=>{!s.monthsValue&&x&&x(d)}),[d]),u(ai,{className:e,inputChildren:p("div",{children:[ei({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),vi({title:"Срок, месяцев",min:c.minMonths,max:c.maxMonths,availableMonths:c.availableMonths,...o("monthsValue"),value:c.monthsValue}),Di({...c,...i},o)]}),rateChildren:Za({rate:m}),resultChildren:p("div",{children:[u(La,{title:"Доход в конце срока",value:h,postfix:"₽",prefix:"+"}),u(La,{title:"Сумма в конце срока",value:g,postfix:"₽"}),Ke(l,{isVertical:!0}),qa(n)]})})})),Di=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?mi({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},di({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},_i=e=>Ei({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Ei({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Ei=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],ji=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=ti(t||"refinancing-calculator-data"),c=o?.rateRows||[Wa],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>_i({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=hi(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=hi(["minMonths","maxMonths"],d,c),g=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>_i({row:e,userInputParams:t,paramsViewSettings:l})&&pi(n+r,["minSum","maxSum"],e)&&pi(i,["minSumOld","maxSumOld"],e)&&pi(r,["minSumExtra","maxSumExtra"],e)&&pi(a,["minMonths","maxMonths"],e)))||Wa)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:x}=g,f=Ci(x,e),b=e.oldMonthlyPayment-f;return r((()=>({...g,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},Fi=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=St({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=ji(i,t,a),o=wi({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return u(ai,{className:e,inputChildren:p("div",{children:[ei({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),ei({title:"Ежемесячный платёж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),vi({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Oi({...s,...a},r),s.isExtraMoney?ei({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,u("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:o})]}),rateChildren:Za({rate:s.rate,fractionDigits:1}),resultChildren:p("div",{children:[u(La,{title:"Ежемесячный платёж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(La,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,u("div",{className:"hidden sm:block mb-lg",children:o}),Ke(l,{isVertical:!0}),qa(n)]})})})),Oi=(e,t)=>p("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?u(Ml,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(Ml,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u(Ml,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Li={CreditCalculatorForm:Ii,DepositCalculatorForm:zi,BusinessDepositCalculatorForm:fi,BonusCalculatorForm:ni,RefinancingCalculatorForm:Fi},$i=g((({className:e,calculatorTabs:t=[],...l})=>u(k,{className:e,defaultPadding:"p-0",...l,children:Hi(t)}))),Ui=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in Li))return null;const l=Li[t];return p("div",{className:"p-xl",children:[e?.calculatorBlock?.title?u(T,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,u(l,{...e.calculatorBlock,isMobile:!0})]})},Hi=e=>{if(!e||!e.length)return null;return 1===e.length?Ui(e[0]):e.map(((e,t)=>u(Fa,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(Oa,{isUnfolded:t,children:Ui(e)}),renderFoldButton:Ki(e)},t.toString())))},Ki=e=>({isUnfolded:t,onToggle:l})=>{const n=e.nav?.align||"text-left";return p("button",{onClick:l,className:"w-full p-xl bg-primary-main flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(W,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(Ve,{align:n,color:"text-white",children:e.nav?.title}),u(Ve,{align:n,size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(W,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]})},Wi=g((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=pn(e,{normalize:(e=a)=>l&&n?String(gn(Number(Yi(e)),l,n)):Yi(e),format:Qe(r)}),c=i((e=>t&&t(Yi(e))),[t]);return u(Dt,{onChange:c,...s,...o})})),Yi=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Gi=g((e=>u(Wi,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(Ve,{size:"text-xl",font:"font-light",children:"₽"})})}))),Xi={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},qi={amount:1500},Ji=g((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...o})=>{const[{amount:c},{field:d}]=St(qi),[m,h]=n(!1);return a((()=>{h(c<=0)}),[c]),p(k,{className:N("flex flex-col items-center",e),defaultPadding:"p-6xl",...o,children:[t?u(T,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Xi[s],children:[u(Gi,{valid:!m,placeholder:i,label:l,...d("amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:c}),r?.text?u(Nl,{className:"w-full mt-lg",type:"submit",disabled:m,children:r.text}):null]})]})})),Qi=(e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},Zi=g((({className:e,disabled:t,...l})=>u(ge,{rounded:!0,className:N("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:u(te,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),er=g((e=>u(Zi,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),tr=g((e=>u(Zi,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),lr="absolute top-[calc(50%-24px)] z-40",nr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",ar=g((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<l-1:c,x=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[ir(e),h?u(er,{className:N(lr,n?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(tr,{className:N(lr,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),ir=e=>p("div",{children:[e.canScrollLeft?u("div",{className:N(nr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:N(nr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),rr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",sr=({className:e,text:t="ХИТ"}={})=>p("div",{className:N("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[u(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(I,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),or="relative h-full",cr={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},dr=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(ur);return D({...n,renderProps:(n,a,r)=>p("div",{className:mr(n,{someCardsHighlighted:i}),children:[A(n,a,{className:hr(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),ur(n)?sr({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},mr=(e,{someCardsHighlighted:t})=>N(or,t&&(ur(e)?"pt-3xl":"pt-3xl sm:pt-16")),hr=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>N(or,"min-w-80",cr[n],t&&(ur(e)?"pt-3xl sm:pt-16":"pt-3xl"),rr(l),l&&"h-full"),ur=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,pr=g((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...o})=>{const{blocks:c=[]}=o.block||{},d=t||c?.length,[m,{inc:h,dec:g}]=Qi({itemCount:d,visibleItemCount:l},Math.floor(l/2)),[x,f]=Va({itemCount:d}),[b]=f.visibleIndicesRange,y=c&&"CarouselBankHistoryCard"===c[0]?.type;return p(k,{className:e,defaultPadding:"p-6xl",...o,children:[p("div",{className:N(a?"flex justify-center":"","relative max-w-full"),children:[u(va,{containerRef:x,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:dr({noCardBorder:n,activeIndex:m,cardSize:s,...o})}),u(ar,{scroll:f,arrowsPadded:i,onScrollLeft:g,onScrollRight:h,hasEdgeBlocks:y,activeIndex:m,itemCount:d})]}),u(Ca,{className:"@5xl:hidden",containerRef:x,activeIndex:b,dotCount:d,listType:"horizontal-list"})]})}));pr.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],pr.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const gr=g((({title:e,description:t,className:l})=>u(k,{className:l,defaultPadding:"p-6xl",children:u(M,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),xr="z-10 border border-solid w-full h-full",fr=N(xr,"absolute hidden @xl:block border-transparent"),br=g((({className:e,title:t,description:l,button:n,...a})=>u(k,{className:N("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative h-full",children:[u("div",{className:N(fr,"top-9 right-12 bg-green-dark")}),u("div",{className:N(fr,"top-6 right-8 bg-green")}),u("div",{className:N(fr,"top-3 right-4 bg-green-light")}),p("div",{className:N(xr,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[u(M,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ke([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),yr={black:"bg-black",white:"bg-white"},vr=g((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:o,...c})=>u(k,{className:N("flex flex-col justify-left",e),defaultPadding:"p-2xl",...c,children:p(ve,{className:"h-full",padding:o,title:u(M,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?u(te,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Ke([i],{buttonClassName:"w-full self-end"}),children:[r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(Ve,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Nr)]}):null,a?p(Ve,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Nr=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${yr[e]}`},String(t)),wr=g((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>p(l,{tag:l,className:N("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?u("div",{children:e}):null,t?u("div",{children:t}):null]}))),kr=g((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>u(wr,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:N("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:u(Ve,{size:"text-h4",children:t}),iconNode:l?u(te,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Sr=({isUnfolded:e,onToggle:t})=>u(kr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Cr=g((({className:e="",icon:t,...l})=>{const n=de(),{text:a,href:i,target:r,onClick:s}=n(l);return a?u("div",{className:N("w-full pb-lg",e),children:p("a",{className:"bg-white flex justify-between rounded-md w-full p-lg whitespace-nowrap",role:"link",href:i,target:r,onClick:s,children:[p("div",{className:"flex items-center space-x-lg",children:[t?u(te,{imageClassName:"text-green-dark",image:t,width:"20",height:"20"}):null,u(Ve,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})]}),u(W,{className:"text-green",name:"ArrowRightIcon",width:"20",height:"20"})]})}):null})),Tr=g((({className:e,additionalDescription:t,description:l,links:n=[],title:a,...i})=>p(k,{className:e,...i,children:[p("div",{children:[u(M,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),u(M,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?Ir(n):null]}))),Ir=(e,t=3)=>{const l=(e||[]).map(((e,t)=>u(Cr,{...e},String(t)))),[n,a]=t>0?[l.slice(0,t),l.slice(t)]:[l,[]];return u("div",{className:"mt-4xl",children:a.length>0?u(Fa,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[u("div",{className:"mb-1",children:n}),u(Oa,{isUnfolded:e,children:a})]}),renderFoldButton:Br}):u("div",{children:n})})},Br=({isUnfolded:e,onToggle:t})=>e?null:u(kr,{className:"border-t-main-divider/50",icon:"PlusIcon",label:"Показать еще",onClick:t}),Mr=g((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=de({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:N("block",e),...t?i:{},children:a})})),Pr=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Rr=e=>Pr.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},Ar=g((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,o]=n(),c=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=Rr(t),c=He(n)?n:r,d=l?{text:a}:{text:""};return!s&&a&&o(!0),{...e,...d,icon:{...c,iconVersion:"color"},version:e?.version??i}})),d=N("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",a?"flex-1 justify-center":"");return p("div",{className:N("flex flex-col gap-xs",e),children:[u("div",{className:"flex gap-xs",children:Ke(c,{className:N(a||s?"basis-full":""),buttonClassName:d})}),r?u(Ve,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Vr=g((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:o=[],target:c,title:d,align:m="text-left",benefits:h,imageOptions:{directionRight:g=!0,isImageAlwaysOnRight:x=false,isImageSecondary:f=!1}={},...b})=>u(k,{className:N("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...b,children:u(Mr,{href:a,target:c,className:"h-full",children:p(ve,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:u(M,{title:d,description:l,headlineVersion:"XS",isEmbedded:!0,align:m}),...it(He(i)?u(te,{image:i}):null,g),buttons:o.length?u(Ar,{media:o,showButtonText:!0,version:b?.version}):null,isImageAlwaysOnRight:x,isImageSecondary:f,imageAlign:"center",children:[u(Ue,{benefits:h}),u(Je,{items:r,isDotted:s,listItemSize:"S"}),zr(n,m)]})})}))),zr=(e,t)=>e?u(I,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Dr=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(Ve,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(Ve,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:Ke(a)}):null]},String(t))},_r=g((({className:e="",title:t,align:l="text-center",icon:n,button:a,visibleCellsCount:i=1,cardCells:r=[],...s})=>{const o=r.map(Dr),[c,d]=i>0?[o.slice(0,i),o.slice(i)]:[o,[]];return p(k,{className:N("flex flex-col",e),defaultPadding:"p-2xl",...s,children:[He(n)?u("div",{className:"self-center",children:u(te,{image:n})}):null,t?u(T,{className:N("pt-xs",l),headingType:"h5",title:t}):null,a?.text?u(ge,{className:"w-full mt-m mb-lg",...a}):null,d.length?u(Fa,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[c,u(Oa,{isUnfolded:e,children:d})]}),renderFoldButton:r.length>1?Er:null}):u("div",{children:c})]})})),Er=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(W,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),jr=(e=!1)=>e?"text-white":"",Fr=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),Or=g((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(te,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(te,{image:t})}),l?u(T,{headingType:"h4",className:jr(a),title:l}):null,n?u("div",{className:Fr(a),children:n}):null]}))),Lr=g((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:N("h-full","border-main-divider border-b"),children:e?e.map(Hr(l,t)):null})}))),$r=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),Ur=(e=!1)=>""+(e?"text-white":""),Hr=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u(I,{size:"text-s",color:$r(e),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:"text-right",children:u(I,{size:"text-s",align:"text-right",color:Ur(e),children:l})}):null,n?u("div",{className:"text-right",children:u(I,{size:"text-s",color:$r(e),children:n})}):null]})]},String(a)),Kr=g((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:N("border border-gray rounded-md p-m mb-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),role:"row",children:[u(Or,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(Lr,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(ge,{href:e.link.href,target:e.link?.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,Wr({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),Wr=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:u(Ve,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),Yr=g((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(T,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(Gr,{...e})})]})})),Gr=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(Array.from({length:e.length}).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>Array.from({length:e.length}).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(Kr,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(za,{onVisibleIndicesChange:m,children:h}):h})),Xr=e=>e%2!=0,qr=g((({title:e,description:t})=>p("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[u(te,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),u(M,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:ma})]}))),Jr=["ArrowDownIcon","ArrowUpIcon"],Qr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",Zr=g((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return p("div",{children:[u("div",{className:N(t.length?"hidden":"block"),children:a?u(qr,{...a}):null}),p("div",{className:N("space-y-2xs",t.length?"":"hidden"),children:[p("div",{className:N(Qr),children:[z(r,{...i.options,parent:n}),Xr(r.length)?u(vt,{className:"col-span-6"}):null]}),u(Fa,{renderFoldableSection:({isUnfolded:e})=>p(Oa,{className:N(Qr),isUnfolded:e,children:[z(s,{...i.options,parent:n}),Xr(s.length)?u(vt,{className:"col-span-6"}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(kr,{className:N(l<1?"hidden":""),disabled:!s?.length,label:e,icon:Jr[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),es=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,ts=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>es(t[e])||es(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>es(t[e])||es(l[e])||ls(t[e])<=ls(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>es(t[e])||es(l[e])||ls(t[e]?.min)>=ls(l[e]?.min)&&ls(t[e]?.min)<=ls(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>es(t[e])||es(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>es(t[e])||es(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),ls=e=>Number(e||0),ns=(e,t)=>(l=kt)=>e&&e.filter((e=>ts(t,l(e.content||{})))),as=g((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(Ct,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),is=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(rs(e))]}),n?u("div",{children:u(Nl,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,children:n?.text})}):null]}),rs=e=>([t,l])=>{const n=l?.type;return"array"===n?ss(t,e)(l):null},ss=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(Ve,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(as,{items:n,multiple:!l?.single,...t(e)})]},e)},os=e=>[...new Set(e)],cs=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,ds=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),ms=(e,t)=>os((e[t?.sourceBook]?.rateRows||[]).filter(cs).flatMap((e=>ds(e.minMonths,e.maxMonths)))),hs=(...e)=>{const t=e.map((e=>pt(e)));return Promise.all(t)};function us(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const ps=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function gs(e){const{dirs:t=[],source:l=[]}=r((()=>{const t=(e=>e?.filter(ps).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=ht(t,hs);return{source:Object.fromEntries(us(l,n).filter((([,e])=>Boolean(e)))),months:os(n.flatMap((e=>e?.rateRows||[])).filter(cs).flatMap((e=>ds(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[]}}const xs=1e9,fs={sum:{min:1e4,max:xs},period:3},bs=g((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=gs(i.block?.blocks),[o,{field:c,reset:d}]=St(fs),m=o===fs?i.block?.blocks:ns(i.block?.blocks,o)((e=>({...e,period:ms(r,e||{})||[]}))),h=p("div",{children:[u(Gi,{label:n?.title,min:500,max:xs,...c("sum",{parse:e=>({min:Number(e),max:xs}),format:({min:e})=>String(e)})}),u(vn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...c("period")})]});return p(k,{className:N("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[is({field:c,reset:d,filtrationSchema:t,resetButton:l,children:h}),u(Zr,{blocksToRender:m,...i})]})})),ys={type:"string",title:"Адрес справочника"};bs.childrenTypes=["ProductTile"],bs.childSchema=e=>({...e?.filtrationSchema||{},sourceBook:ys});const vs=e=>"Image"===e?.contentType&&e?.image?u(te,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Ns=g((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(k,{className:N("flex flex-col justify-center items-center",e),defaultPadding:N("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:vs(n)}),u(M,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?u(ge,{version:a?.version,text:a?.text,...a}):null]}))),ws="location";function ks(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(y,"location",Cs()??{name:e}),r=i((e=>{Ts(e),l(e)}),[]),{data:s}=ht(Ss()?null:"/api/v1/region",gt);return a((()=>{s&&!Ss()&&l(s)}),[s]),[t??{name:e},r]}const Ss=()=>Boolean(globalThis.localStorage?.getItem(ws)),Cs=()=>{try{const e=globalThis.localStorage?.getItem(ws);return e&&JSON.parse(e)}catch(e){return null}},Ts=e=>{try{globalThis.localStorage?.setItem(ws,JSON.stringify(e))}catch(e){}};var Is;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(Is||(Is={}));const Bs=new Intl.NumberFormat("ru",{style:"currency",currency:Is.RUB}),Ms=e=>e?Bs.format(e):"",Ps="text-left text-m font-light text-secondary-text",Rs=`${Ps} pl-5xl`,As={USD:"DollarIcon",EUR:"EuroIcon"},Vs=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Ps,children:u(Ve,{size:"text-m",children:"Валюта"})}),u("th",{className:Rs,children:u(Ve,{size:"text-m",children:"Купить"})}),u("th",{className:Rs,children:u(Ve,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(zs)})]}))),zs=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(te,{image:{icon:As[t]},width:"24",height:"24"}):null,u(Ve,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(Ve,{size:"text-h6",children:Ms(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(Ve,{size:"text-h6",children:Ms(e?.buyExchangeRate)})})]},t)},Ds={icon:"GpsIcon"},_s=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(ua,{...Ds,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u(I,{size:"text-l",color:"text-primary-main",children:t}):null,u(I,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Es=(e,t,l)=>{const n=Number(js(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},js=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Fs=e=>{return(t=[[e=>e.value!==Is.RUB&&e.oppositeValue!==Is.RUB,()=>e.handleConvert(e.value,Is.RUB)],[e=>e.value===Is.RUB&&e.oppositeValue===Is.RUB,()=>e.handleConvert(e.value,Is.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Os(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(Dt,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(ml,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const Ls=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Is.RUB,selectBuy:l?.[0]?.currency?.currency||Is.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Os({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:$s(r,o,l),value:r.inputSell,setValue:e=>Hs(o,l)(e,r.selectSell,r.selectBuy)}),Os({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Us(r,o,t),value:r.inputBuy,setValue:e=>Ks(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(ge,{text:a.text,version:a?.version,...a}):null]})})),$s=(e,t,l)=>n=>{t({selectSell:n}),Fs({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Hs(t,l)(e.inputSell,n,a)}})},Us=(e,t,l)=>n=>{t({selectBuy:n}),Fs({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Ks(t,l)(e.inputBuy,n,a)})},Hs=(e,t)=>(l,n,a)=>{e({inputSell:js(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Es(l,i,n===Is.RUB)||"")})},Ks=(e,t)=>(l,n,a)=>{e({inputBuy:js(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Es(l,i,n===Is.RUB)||"")})};const Ws=g((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=ks(),i=function(e){const t=e?.code||"000",{data:l}=ht(`/api/v1/exchangerates?regionCode=${t}`,gt);return l||{}}(a),r=Ys(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Is.RUB}});const o=r.filter((e=>e.saleExchangeRate));return o.push({currency:{currency:Is.RUB}}),u(k,{className:N("box-border min-h-80",e),...n,children:u(ve,{className:"h-full",title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[r?u(Vs,{className:"mb-xl",exchangeCurrencyItems:r}):null,u(_s,{address:i?.address})]}),r.length&&s.length&&o.length?u(Ls,{className:"grow",currencyRatesBuy:s,currencyRatesSell:o,button:l}):null]})})})})),Ys=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Gs=e=>bt(d.SITEMAP||"sitemap",{fallback:e}),Xs=(e,t)=>u(ua,{...e,iconBgVersion:t,className:"shrink-0"}),qs=g((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>u(wr,{tag:"button",className:N("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Xs(a,t),e?u(Ve,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?u(W,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),Js=g((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,...o})=>u(k,{className:N("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...o,children:u(Fa,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(Oa,{className:N("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:D({...o,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Qs({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));Js.childrenTypes={exclude:["RollupItem"]};const Qs=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"accordion"===e?u(qs,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):u(kr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Zs=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(eo):null,u(ge,{version:"primary",className:"w-full",href:"https://beta.rshb.ru/natural/feedback/question",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),eo=(e,t)=>p("div",{className:"mb-m space-y-m",children:[u("div",{children:u(Ve,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{className:"space-y-m",children:e.items?.map(to)})]},String(t)),to=(e,t)=>p("div",{className:"space-y-2xs",children:[u("div",{children:lo(e.type,e.text)}),u(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),lo=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${no(t)}`,children:u(Ve,{size:"text-h6",children:t})});case"email":return u("a",{className:"no-underline",href:`mailto:${t}`,children:u(I,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return u("span",{children:t})}},no=e=>e.replaceAll(/\D/g,""),ao=["split_version","New","Old"],io=g((({className:e="",index:t,text:l,...n})=>{const a=de(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:N("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),ro=g((({title:e,links:t,className:l=""})=>p("div",{className:N("flex flex-col gap-4",l),children:[u(Ve,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>u(io,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),so=g((({className:e="",items:t,basePath:l})=>t?.length?u("ul",{className:N("flex flex-col",e),children:t.map(oo(l))}):null)),oo=e=>(t,l)=>{const{text:n,...a}=t,i=de({isRemote:!(!d.BASE_PATH||!e)&&!d.BASE_PATH.startsWith(e),basePath:e}),{href:r,target:s,onClick:o}=i(a);return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",href:r,target:s||"_self",onClick:o,children:n||null})},`list_item_${String(l)}`)},co=g((({className:e="",index:t,...l})=>{const n=de({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),mo=g((({className:e="",links:t})=>p("div",{className:N("@container",e),children:[u("div",{className:"pt-lg",children:u(Ve,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(co,{index:t,...e},String(t))))}):null]}))),ho=g((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=Gs(l),{relatedEnterprises:a,contacts:r,socialMedia:s,mobileApps:c,horizontalNavigationTitle:m,documents:h}=bt(d.FOOTER||"footer",{fallback:l}),g=i((()=>{const[e,t,l]=ao;((e,t)=>{const l=globalThis.document?.cookie.split(";")??[],[,n]=l.map((e=>e.split("="))).find((([t])=>t.trim()===e))||[];t(n)&&(globalThis.document.cookie=`${e}=${t(n)}`)})(e,(e=>e?.replace(t,l)))}),[]);return p(k,{tag:"footer",className:e,defaultPadding:"p-4xl pb-24",...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(Js,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,children:u(so,{items:e.items,basePath:o(e.href)})},String(t))))}),u(Zs,{className:"overflow-hidden",items:r}),p("div",{className:"mt-xl",children:[u(Ar,{className:"mb-xl",media:s,stretched:!0,children:"Соцсети"}),p("div",{className:"mb-xl",children:[u("div",{className:"flex flex-col gap-4 mb-xs",children:c?.map(uo)}),u(Ve,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),u("div",{className:"py-lg border-t border-main-divider",children:u(io,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:g})}),u(ro,{className:"py-lg border-y border-main-divider",title:m,links:a}),u(mo,{links:h})]})})),uo=({href:e="/",text:t},l)=>{const{label:n}=Rr(e);return u(ge,{className:"w-full",text:t||n,version:"secondary",href:e,target:"_blank"},String(l))},po={width:"34",height:"34"},go={"bg-white":"color",transparent:"white"},xo={"bg-white":"text-primary-main",transparent:"text-white"},fo=(e,t,l)=>u(te,t?.src?{image:t,className:xo[e],width:l?.width,height:l?.height}:{image:{icon:t?.icon||"LogoIcon",iconVersion:go[e]},className:xo[e],width:l?.width,height:l?.height}),bo={"bg-white":"text-primary-text",transparent:"text-white"},yo=g((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:N("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",children:[fo(i,l?.image,po),r?n??u("div",{className:"ml-s",children:u(Ve,{font:"font-medium",color:bo[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),vo={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},No=g((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=v(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u("div",{children:u(yo,{className:"my-2xs",bgColor:e,logo:t})}):wo(s),l?u("div",{children:u(ge,{href:l,ariaLabel:"Войти",target:"_blank",className:N("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",vo["transparent"===n?"transparent":"default"]),children:"Войти"})}):null]})})),wo=e=>u("div",{children:p("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(te,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),ko={"bg-white":"primary",transparent:"transparent"},So=g((({bgColor:e="bg-white",version:t=ko[e],...l})=>{const{logo:n}=Gs(l.options?.page?.fallback),{internetBankUrl:a}=bt(d.PORTAL_DATA||"portal-data",{fallback:l.options?.page?.fallback,pathDir:F(d.BASE_PATH,"portal-resources")});return u(k,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(No,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),Co={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},To=g((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...o})=>{const c=v();return u(k,{className:N("relative flex flex-col",Co[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${q(c)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...o,children:D({...o,extraProps:{className:N("w-full",rr(r)),padding:n?"":"p-0"}})})}));To.childrenTypes=[];const Io=g((e=>u(To,{...e})));Io.childrenTypes=[];const Bo=g((e=>{const{className:t,image:l,...n}=e;return u(k,{className:t,defaultPadding:"p-0",...n,children:u(te,{image:l})})})),Mo=["байт","Кб","Мб","Гб","Тб","Пб"],Po=g((({icon:e,text:t,href:l,target:n,fileFormat:a,fileSize:i})=>{const r=i&&a?",":"",s=i??"",o=a?String(a):"";return p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",href:l,target:n,children:[e,t?p(Ve,{size:"text-l",font:"font-light",children:[t," ",Ro(s,o),u(Ve,{color:"text-secondary-text",children:l&&`${s+r+o}`})]}):null]})})),Ro=(e,t)=>e||t?u("span",{children:", "}):"",Ao={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Vo=g((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=v();return p(k,{className:N("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(M,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:N("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Ao[r]),role:"list",children:a.map(zo(o,i))}):null]})})),zo=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a="Attachment"===l?.docType?U(e)(l?.attachment?.src):l?.href,i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Mo[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?Do(a):l?.fileFormat;return u("div",{role:"listitem",children:u(Po,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?u(te,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:t,width:"24",height:"24"}):null})},String(n))},Do=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},_o=g((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,additionalDescription:o="",title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24",g=i?.src?u(te,{className:"hidden lg:block",image:i}):null;return u(k,{className:N("min-h-80",e),padding:"p-0",version:d,...m,children:p(ve,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:u(T,{headingType:"h3",title:c,className:N("whitespace-pre-wrap",l)}),rightImage:g,buttons:Ke(n,{className:"flex-wrap"}),children:[a?u(Ve,{size:"text-xl","font-weight":"font-light",children:a}):null,p("div",{className:N("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[u(Je,{items:r,listItemSize:"M"}),u(Ve,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:o}),s?.src?u("div",{className:N("flex justify-center bg-white rounded-md @xl:-order-1",h),children:u(te,{className:"w-fit",image:s})}):null,i?.src?u(te,{className:"lg:hidden",image:i}):null]})]})})})),Eo={primary:"bg-white/30",secondary:"bg-main-divider"},jo={primary:"text-white",secondary:"text-secondary-text"},Fo=g((({count:e,version:t="secondary"})=>u("div",{className:N("w-6 h-6 rounded-full flex items-center justify-center",Eo[t]),children:u(Ve,{size:"text-xs",color:jo[t],children:e})}))),Oo=(e=[],t={})=>e.filter((({content:e={}})=>ts(t,e))).length,Lo=(e,t)=>e===t;const $o=(Uo=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Lo,((e=Lo)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Uo(l,t[e])))));var Uo;const Ho=[],Ko={},Wo={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Yo={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Go={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Xo={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},qo=g((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:N("h-12","block flex-1","cursor-pointer",Wo[n],l?Xo[n]:Go[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:N("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Yo[n]:"text-secondary-text hover:text-primary-main"),children:[u(Ve,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),Jo=g((e=>u(e?.item?.href?Qo:Zo,{...e}))),Qo=g((e=>{const t=de(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(qo,{...e,tag:"a",item:a,onClick:n})})),Zo=g((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(qo,{item:e,onClick:n,...l})})),ec=(e,t,l)=>(n,a)=>u(Jo,{isActive:n===e,onClick:t,type:l,item:n},String(a)),tc=g((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:N("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(ec(n,a,t))}))),lc={categories:[],extraOptions:[],propertyType:[],stage:[]},nc=g((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:o,reset:c,update:d}]=St(lc),m=s===lc?a.block?.blocks:ns(a.block?.blocks,s)(),h=i(((e=lc)=>d(e)),[]),g=(({hotFilters:e=Ho,filtrationState:t=Ko,blocks:l=Ho,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>$o(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:u(Fo,{version:t===e[a]?"primary":"secondary",count:Oo(l,t.filter)})})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:h});return p(k,{className:N("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(tc,{...g}),is({field:o,reset:c,filtrationSchema:l,resetButton:n}),u(Zr,{blocksToRender:m,...a})]})}));function ac(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}nc.childrenTypes=["ProductTile"],nc.childSchema=e=>e?.filtrationSchema||{};const ic={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},rc=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(ic).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(W,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),sc=e=>globalThis[e];const oc=()=>function(e,t){const[l,r]=n(),s=i((()=>r(sc(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!sc(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),cc={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},dc=g((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(cc).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(W,{name:l,width:"20",height:"16"})})})),mc={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},hc=[55.753995,37.614069],uc=g((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=oc(),[o,c]=n();if(a((()=>{i?.current?r&&(ac(r,i.current,e),e?.length||i.current.setCenter(hc)):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:e?pc(e):hc,zoom:l,controls:[],suppressMapOpenBlock:!0}),ac(r,i.current,e))}))}),[r,i,e,l]),!r)return null;const d=o?"z-[100000]":"z-10";return p("div",{id:"map",className:N(!o&&"relative","w-full",t),children:[u("div",{className:N(Object.values(mc),d,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;o?e.exitFullscreen():e.enterFullscreen(),c(e.isFullscreen())},children:u(W,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:N("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[u(dc,{yandexMaps:i}),u(dc,{yandexMaps:i,direction:"out"})]}),rc(i.current,r,N("right-2 top-80",d))]})})),pc=e=>[xc(gc(e,0)),xc(gc(e,1))],gc=(e,t)=>e.map((e=>e[t])),xc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,fc={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},bc=(e,{field:t,reset:l})=>p("div",{className:"pb-2xl",children:[e?.length?u("div",{className:"flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",children:e.map((e=>u(Ml,{text:fc[e],...t(e)},e)))}):null,u(ge,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:u(W,{name:"CloseIcon",width:"16",height:"16"})})]}),yc=()=>null,vc=()=>[],Nc=g((({className:e,data:t=[],renderCard:l=yc,filterItems:n=vc,initFilterState:a={},descriptionData:i,title:s})=>{const[o,{field:c,reset:d}]=St(a),[m,h,g]=r((()=>{const e=n(t,o),l=e.map((e=>[e.gpsLatitude,e.gpsLongitude].filter(Boolean))).filter((e=>e&&2===e.length));return[e,l,e.length]}),[t,o]);return p("div",{className:N("space-y-1",e),children:[p("div",{className:"bg-white",children:[p("div",{className:"p-6xl pb-0",children:[p("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:[u(T,{headingType:"h2",children:s}),g?u(Ve,{size:"text-h2",color:"text-secondary-text",children:`(${g})`}):null]}),i?wc(i):null,bc(Object.keys(a),{field:c,reset:d})]}),u("div",{className:"h-[600px]",children:u(b,{children:u(uc,{points:h,className:"h-full"})})})]}),m.map(l)]})})),wc=({__html:e,list:t})=>e||t?.length?p("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?u("div",{className:"mb-2xl",children:u(Re,{__html:e})}):null,t?.length?u("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>p("div",{className:"flex gap-xs items-center",children:[e?.image?u(te,{image:e.image}):null,e?.text?u(Ve,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,kc={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"}},Sc=g((({className:e,children:t,color:l="gray"})=>p("div",{className:N("pt-2xl sm:p-s sm:border sm:border-gray rounded-md flex items-center",kc[l].border,e),children:[u("div",{className:"block pr-m sm:pr-0 sm:hidden",children:u(te,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),u(Ve,{size:"text-m",color:kc[l].text,children:t})]}))),Cc=g((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:Tc({textItems:a,subText:t,children:l,...n})})),Tc=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>p("div",{className:N("flex gap-2xl sm:gap-2xs flex-col h-full max-w-[300px]",i),children:[e?u(Ve,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>u(Ve,{size:"text-l",children:e.trim()},String(t)))),a?u(Ve,{color:n,size:"text-m",children:a}):null]}),Ic=g((({className:e,children:t})=>u("div",{className:N("sm:flex sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Bc=["ArrowDownIcon","ArrowUpIcon"],Mc=["Подробнее","Скрыть"],Pc=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,children:[u("div",{className:"pr-m",children:Mc[Number(e)]}),u(W,{className:"text-primary-text",name:Bc[Number(e)],width:"16",height:"16"})]}),Rc=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},o)=>{const c=[{label:"Устройство",value:Vc(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return p("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[p("div",{className:"sm:flex sm:justify-between",children:[p("div",{children:[u(Ve,{size:"text-h4",children:Vc(e)}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(W,{name:"GeolocationIcon",width:"24",height:"24"}),u(Ve,{size:"text-l",children:t})]}):null]}),u(Sc,{color:"green",children:Vc(s)})]}),u("div",{className:"hidden sm:block",children:u(Ic,{className:"flex-wrap",children:c?.map(Ac)})}),u(Fa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>u(Oa,{isUnfolded:e,children:u(Ic,{className:"flex-wrap",children:c?.map(Ac)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Pc({isUnfolded:e,onToggle:t})})]},String(o))},Ac=(e,t)=>u(Cc,{...e},String(t)),Vc=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",zc=[];const Dc=async e=>await pt(e,{method:"GET"})||zc,_c={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Ec={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},jc=g((({data:e,className:t})=>{const[l]=ks(),n=function(e){const{data:t=zc}=ht(`/api/v1/atms?regionCode=${e}`,Dc);return t}(l?.code??"000");return u(Nc,{className:t,filterItems:Fc,data:n,initFilterState:_c,renderCard:Rc,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),Fc=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Ec[t](e))),l=!n.length||n.some((t=>Ec[t](e)));return t&&l}))},Oc=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", "),a=[Lc({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Lc({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean);return u(Cc,{label:"Режим работы",value:a,className:"max-w-none"})},Lc=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",$c=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Uc=e=>$c.map((([t,l,n])=>({key:t,title:n,short:l,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Hc=e=>{if(!e)return null;const t=Kc(e);return p(Ic,{className:"border-none",children:[u(Cc,{label:"Для юридических лиц",labelSize:"text-l",children:u("div",{className:"flex gap-1",children:t.map(Wc)})}),u(Cc,{label:"Режим работы",className:"max-w-none",children:u(Ve,{children:e})})]})},Kc=e=>{const t=$c.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},Wc=({short:e,status:t},l)=>u("div",{className:N("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:u(Ve,{size:"text-xs",children:e})},String(l)),Yc=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>p("div",{className:"flex gap-lg h-full",children:[e?.currency?u(Cc,{label:"Валюта",value:e.currency}):null,t?u(Cc,{label:"Купить",value:String(t)}):null,l?u(Cc,{label:"Продать",value:String(l)}):null]},String(n)),Gc=(new Date).getDay(),Xc=e=>{const[t]=e?.slice(Gc-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?p("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?u(Sc,{color:"green",children:a}):null,l&&i?u(Sc,{color:"yellow",children:`перерыв: ${l}`}):null]}):u(Sc,{color:"red",children:"Выходной"})},qc=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",Jc=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>u(Cc,{label:e,value:t&&l?l:"",subText:qc({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Qc=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c},d)=>{if(!o)return null;const m=Uc(o);return p("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[p("div",{className:"sm:flex sm:justify-between",children:[p("div",{children:[u(Ve,{size:"text-h4",children:e}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(W,{name:"GeolocationIcon",width:"24",height:"24"}),u(Ve,{size:"text-l",children:t})]}):null]}),Xc(m)]}),u("div",{className:"hidden sm:block",children:Zc({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c})}),u(Fa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>u(Oa,{isUnfolded:e,children:Zc({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Pc({isUnfolded:e,onToggle:t})})]},String(d))},Zc=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const o=Uc(r),c=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return p("div",{children:[p(Ic,{className:"flex-wrap",children:[u(Cc,{label:"Факс",value:t}),u(Cc,{label:"Телефон филиала",value:e}),u(Cc,{label:"Для обращений юридических лиц",value:l}),u(Cc,{label:"Обслуживание физических лиц",value:n}),u(Cc,{label:"Для консультаций по валютному контролю",value:i}),u(Cc,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?u(Ic,{children:u(Cc,{label:c,labelSize:"text-l",className:"w-full max-w-none",children:u("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:o?.map(Jc)})})}):p(Ic,{children:[u(Cc,{label:c,labelSize:"text-l",children:u("div",{className:"flex gap-1",children:o?.map(Wc)})}),Oc(o)]}),r?.businessScheduleVisibleTag?Hc(r?.businessScheduleDescription):null,s?.currencies?.length?u(Ic,{className:"flex-wrap",children:s?.currencies?.map(Yc)}):null]})},ed=[];const td=async e=>await pt(e,{method:"GET"})||ed,ld={workingSaturday:!1},nd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},ad=g((({className:e})=>{const[t]=ks(),l=function(e){const{data:t=ed}=ht(`/api/v1/branches?regionCode=${e}`,td);return t}(t?.code??"000");return u(Nc,{className:e,filterItems:id,data:l,initFilterState:ld,renderCard:Qc,title:`Офисы филиала ${t?.name}`})})),id=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>nd[t](e)))))},rd=g((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return u(k,{version:"transparent",className:N(t),defaultPadding:"p-0",...l,children:"offices"===n?u(ad,{}):u(jc,{data:e})})})),sd=g((({className:e,size:t})=>u("figure",{className:N("m-0 mt-xl min-w-[80%]",e),children:od(t)}))),od=(e=3)=>dd(100,e).map((e=>Math.floor(e))).map(cd),cd=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),dd=(e,t)=>[e].concat(t>0?dd(e/1.618,t-1):[]),md=g((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(k,{className:N("box-border",e),...n,children:[u(M,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u(sd,{})]}))),hd=g((({className:e,padding:t,slides:l=[],...n})=>u(k,{className:N("overflow-hidden relative",e),padding:t,...n,children:u(za,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",children:u(at,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),ud=g((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(k,{className:N("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[He(r)?u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:u(te,{image:r})}):null,s?u(T,{headingType:"h3",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?pd(i):null,gd({label:"Адрес",data:e,iconName:"GeolocationIcon"}),gd({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),gd({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Ke([n]):null]})]}))),pd=e=>u("div",{className:"border-b border-main-divider pb-lg",children:u(Re,{__html:e})}),gd=({label:e,data:t,iconName:l,dataColor:n=""})=>t?p("div",{className:"flex gap-s",children:[u(W,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col gap-2xs",children:[u(Ve,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),u(Ve,{size:"text-xl",color:n,children:t})]})]}):null,xd=g((e=>{const{__html:t,richVersion:l,...n}=e;return u(k,{defaultPadding:"p-0",...n,children:u(Re,{__html:t,richVersion:l})})})),fd=g((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:N("order-4",e),children:[u(qn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(qn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),bd=g((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(ml,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),yd=g((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(bd,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(bd,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),vd=["От 1 дня","До 365 дней"],Nd=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(Ve,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(vn,{min:1,max:365,value:e,items:vd,onChange:t})]}))),wd=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(bd,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(bd,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),kd=g((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents @xl:block flex-1 space-y-xl",children:[u(yd,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Sd(c)}),u(Nd,{days:a,setDays:e=>c({days:e})}),u(wd,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:Cd(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents @md:flex justify-between items-center gap-m",children:[u(fd,{}),u(ge,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),Sd=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Cd=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Td=g((({days:e,tariffs:t=[]})=>{const l=Bd(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[p("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Id("Аренда за",e),Id("Цена",l+" ₽")]}),u("div",{className:"@xl:hidden order-3 mb-xs",children:u(I,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),p("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[u(te,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),u("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:u(I,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),Id=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[u(Ve,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Bd=(e,t)=>{const l=Md(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Md=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},Pd=(e,t)=>e.find((e=>e.branchCode===t)),Rd=g((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Pd(n,l.selectedBranch),o=Ad(s?.safeBoxCaseVolumes),c=Vd(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=zd(c,l.selectedBoxSize);return p("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[u(kd,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(Td,{days:l.days,tariffs:d})]})})),Ad=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Vd=(e,t)=>e?.find((e=>e.volume===t)),zd=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Dd=[];const _d=async e=>await pt(e,{method:"GET"})||Dd,Ed=g((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=nl(),h=jd(c.selectedRegion,m),g=function(e){const{data:t}=ht(e?`/api/v1/safeboxes?regionCode=${e}`:null,_d);return t||Dd}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Pd(g,c.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(k,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Rd,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(I,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(uc,{points:f,className:"h-[640px]"}):null]})})),jd=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Fd(e){throw new Error(e)}const Od={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Ld={normal:"",small:"min-h-6xl"},$d={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},Ud=g((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",stepVersion:r="gray",version:s="primary",...o})=>p(k,{className:N("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...o,children:[u(M,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(Hd(i,r))})}):null,Ke(a,{isVertical:!0})]}))),Hd=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Kd(e,t)(l,n);case"rte":return u(Re,{__html:l.__html});default:Fd(l)}},Kd=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row items-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Wd(e,t)(l,n)}),p("div",{className:N("flex flex-col justify-center h-fit",Ld[e]),children:[l.label?u(I,{size:"text-l",align:"text-left",children:l.label}):null,l.description?u("div",{className:N("text-s font-light text-left",$d.description),children:l.description}):null]})]})},String(n)),Wd=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=Od[e][i?"image":"icon"],s=i?"transparent"===t:t;return u(k,{className:N(r,"z-10 mr-s flex justify-center content-center rounded-md"),defaultPadding:"",version:s,children:u("span",{className:"flex max-w-full max-h-full items-center justify-center",children:He(l?.icon)?u(te,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:Yd(e),height:Yd(e)}):u("span",{className:N("text-h4","transparent"===t?$d.iconText:(o=t,"secondary"===o?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var o},Yd=e=>"normal"===e?"38":"24",Gd="hidden sm:flex absolute z-40 top-0",Xd=g((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Va({itemCount:t?.length||0});return p("div",{className:N("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(va,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(ec(l,n,a))}),r.canScrollLeft?u(er,{className:N("left-6",Gd),onClick:r.scrollLeft}):null,r.canScrollRight?u(tr,{className:N("right-6",Gd),onClick:r.scrollRight}):null]})})),qd=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(tc,{...t});case"centered":return u("div",{className:"flex",children:u(tc,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Xd,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Jd="tab",Qd=g((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=v(),{isReady:d}=c,m=r((()=>l.map(em)),[l]),[h,p]=n(0);a((()=>{if(!l||!l[0])return;const e=c.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===c.query.tab))||0,t=l[e]||l[0];p(e),Zd(t)}),[d]),a((()=>{const e=l[h];"group"===e?.type&&y.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,h]);const g=i((e=>{const t=m.indexOf(e),n=l[t];p(t),Zd(n),"group"===n.type&&(e=>{const t=new URLSearchParams(c.query);e.name?t.set(Jd,e.name):t.delete(Jd),c.replace(`${c.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,m]);return u(k,{className:N(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:qd({items:m,value:m[h],tabsMode:s,onChange:g})})})),Zd=e=>{"group"===e.type&&y.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&y.fire("tab",{type:e.type,label:e.href})},em=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,tm={start:"text-start",center:"text-center",end:"text-end"},lm=g((({tab:e,className:t,onClick:l,isActive:n})=>{const a=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white text-primary-text"),title:e?"mb-xs text-xl":"mb-2xs text-l",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal"}))(n);return p("button",{type:"button",onClick:l,"aria-label":e?.title,className:N("border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs",a.btn,t),children:[e?.icon?u(te,{className:N("h-6 w-6 min-w-6 min-h-6",a.icon),image:{...e?.icon,iconVersion:e?.icon?.iconVersion??a.iconVersion},width:"24",height:"24"}):null,p("div",{className:"border-0",children:[e?.title?u("div",{className:a.title,children:e.title}):null,e?.description?u("div",{className:a.desc,children:e.description}):null]})]})}));function nm(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const am=g((({tab:e})=>{const t=de(),{onClick:l}=t({...e,onClick:()=>{e.href&&!E(e.href)&&(globalThis.location.href=e.href)}});return nm(l,[],800),u(sd,{className:"col-span-12 p-xl",size:5})})),im=g((({className:e="",tabs:t=[],block:l,tabAlign:i,...r})=>{const[s,o]=n(sm(t)),c=rm(t[s],s),d=t.length,[m,{inc:h,dec:g}]=Qi({itemCount:d},s),[x,f]=Va({itemCount:d});return((e,t)=>{const[l,{setTrue:n}]=al(!1);a((()=>{t.scrollTo(e,{behavior:l?"smooth":"auto",block:"nearest",inline:"center"}),!l&&n()}),[e,l])})(s,f),p(k,{className:N(e),defaultPadding:"p-0",...r,children:[p("div",{className:"relative border-b-8 border-primary-main",children:[u(va,{itemClassName:"flex",containerRef:x,snapAlign:"snap-end",gap:8,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:t.map(om(s,o,i))}),u(ar,{scroll:f,arrowsPadded:!0,onScrollLeft:g,onScrollRight:h,activeIndex:m,itemCount:d})]}),u("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:t[s]?.href?u(am,{tab:t[s]}):z(l?.slots?.[c],{...r?.options,slotName:c,parent:l})})]})}));im.slots=({tabs:e})=>e?.filter((e=>!e.href)).map(rm)||[],im.childrenTypes={exclude:["TabsLayout"]};const rm=(e,t)=>e?.title||`Слот №${t}`,sm=e=>e.reduce(((e,t,l)=>t.selected?l:e),0),om=(e,t,l="start")=>(n,a)=>u(lm,{className:tm[l],tab:n,isActive:e===a,onClick:()=>t(a)},String(a)),cm={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},dm=g((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:cm[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),mm=g((({className:e="",isOpen:t,onClick:l})=>u(ge,{className:e,appendRight:u(te,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),hm={Buttons:({buttons:e})=>Ke(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?u(te,{image:e}):null,List:({isDotted:e,...t})=>u(Je,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{className:"space-y-2xs",children:[e?u("div",{children:u(Ve,{size:"text-h6",children:e})}):null,t?u("div",{children:u(Ve,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(mm,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},um=g((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return pm({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),pm=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in hm))return null;return u(hm[l],{...t,...n})},gm=g((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>u("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>u(um,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),xm=(e,t)=>140*Be(e.slice(0,t).map((e=>e?.cols?.length??1))),fm=(e,t)=>e?.length>0?u("div",{className:N("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>u("div",{className:"w-20 mx-lg",children:u(Ve,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,bm=g((({rows:e})=>{return u(va,{visibleItemCount:0,snapAlign:"snap-start",children:u("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=N("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return p("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?u("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:u(Ve,{size:"text-xl",font:"font-light",children:n.data})}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${xm(a,t)}px)`},children:a?.map(((e,l)=>p("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?u(Ve,{size:"text-xl",children:e.data}):null,e?.cols?fm(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),ym=g((({activeTabIndex:e,items:t})=>u("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return p("div",{className:"w-full @container",children:[u("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:u(Ve,{size:"text-xl",align:"text-left",children:t.title})}),u("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:u("div",{className:"relative",children:u(bm,{rows:t.rowsData})})})]},n)}))}))),vm=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Nm=g((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>u("div",{className:N("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:u(Ve,{size:"text-xl",font:"font-light",color:vm(t===l),children:e||t+1})},e)))}):null,t?u(ge,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:u(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function wm(e){const t=await fetch(e);return await t.json()}const km=g((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=ht(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),wm);return t||{}}(e),[r,s]=n(0),o=i((e=>s(e)),[]),c=a?.[r]?.items??[],d=a?.map((e=>e.currency??""));return p("div",a?{className:"bg-white z-10",children:[u(Nm,{currencies:d,activeTabIndex:r,setActiveTabIndex:o,linkToPDF:t}),u(ym,{activeTabIndex:r,items:c}),u(mm,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[u(Ve,{size:"text-h6",children:"Данных нет"}),u(mm,{onClick:l,isOpen:!0})]})})),Sm=g((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:N("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?u("div",{className:"origin-top animate-expansion",children:u(km,{...t,onClick:l})}):null]}))),Cm=g((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,o]=n(void 0),c=i((e=>o(e)),[]),[d,m]=n(void 0),h=i((e=>m(e)),[]);return p(Sm,{onHideContentClick:()=>o(void 0),tableInner:s,...r,children:[u("div",{className:N("text-s","w-80 flex-shrink-0"),children:p("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?u(te,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?u(Ve,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?u(dm,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(gm,{cells:e,rowIdx:a,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...r},String(t))))}):null]})}));function Tm({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?p("div",{children:[l?u(Zi,{className:N("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u(Zi,{className:N("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Im=g((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative space-y-xs",children:[e,Tm({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Bm=g((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=Qi({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(Cm,{row:e,activeIndex:d,rowIdx:t,...r},String(t)))),[g,x]=i>0?[h.slice(0,-i),h.slice(-i)]:[h,[]];return p(k,{className:N("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[u(M,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),u("div",{className:"space-y-m",children:i>0?u(Fa,{renderFoldableSection:({isUnfolded:e})=>p(Im,{controls:m,children:[g,u(Oa,{isUnfolded:e,children:x})]}),renderFoldButton:Sr}):u(Im,{controls:m,children:h})})]})})),Mm=g((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>p(k,{className:N("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?Pm():null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(Ve,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Rm(l):null,a?u(Re,{__html:a}):null]})]}))),Pm=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),Rm=e=>u(I,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Am=g((({prefix:e,unit:t,suffix:l})=>p("div",{className:"w-full flex items-end",children:[e?u("div",{className:"gradient-color-text",children:u(Ve,{size:"text-h2",children:e})}):null,t?u("div",{className:"-mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?u("div",{className:"gradient-color-text",children:u(Ve,{size:"text-h2",children:l})}):null]}))),Vm=g((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return u(k,{defaultPadding:"p-0",...a,children:u(Am,{prefix:t,unit:l,suffix:n})})})),zm={AdTile:vt,ApplicationForm:oa,BenefitsBlock:pa,BonusBenefitsBlock:_a,ButtonsBlock:ja,Calculator:$i,CardTransfer:Ji,Carousel:pr,CarouselBankHistoryCard:gr,CarouselCard:br,CarouselCatalogCard:vr,CarouselLinks:Tr,CarouselRecommendationCard:Vr,CarouselTariffsCard:_r,ComparisonTable:Yr,DepositFiltration:bs,ErrorBlock:Ns,ExchangeRateTile:Ws,Footer:ho,Header:So,Headline:M,HorizontalLayout:Io,ImgBlock:Bo,LinkDocs:Vo,MobileAppTile:_o,MortgageFiltration:nc,OfficesAtmsMap:rd,Placeholder:md,ProductBlock:st,ProductGallery:hd,RepresentativeOfficeInfo:ud,RichTextBlock:xd,RollupItem:Js,SafeDepositRental:Ed,StepsBlock:Ud,Tabs:Qd,TabsLayout:im,TariffsTable:Bm,TextBlock:Mm,UnitBlock:Vm,VerticalLayout:To},Dm=g((({className:e,onClose:t})=>u("button",{className:N("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(te,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),_m="cookie",Em=g((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=al();nm((()=>{globalThis.localStorage?.getItem(_m)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(_m,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[u("div",{className:"sm:flex-1",children:p(I,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(Mr,{isRemote:!0,className:jm(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(Mr,{isRemote:!0,className:jm(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(Dm,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),jm=e=>N("inline mx-2xs",e?"text-green-dark":"");const Fm=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>y.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Fd(e)}}))),[c,d]),l},Om=g((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Fm({onCloseAll:e,onClose:t}),{close:n}=oe(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return rl(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:N("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Lm=g((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>y.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Fd(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return rl(globalThis.document,"keydown",r),e?u("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),$m=e=>({href:t})=>!!t&&j(Um(t,e)).startsWith(j(t)),Um=(e,t)=>_(e)?t.href:t.pathname;function Hm(e=[]){const t=v(),l=e.findIndex((e=>$m(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(t));return[l,e[l]]}const Km=g((({isActive:e,onClick:t})=>p("button",{className:N(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:t,children:[u(W,{className:"w-6 h-6",name:"BurgerIcon",iconVersion:e?"color":"black"}),"Меню"]}))),Wm=g((({isActive:e,item:t,onClick:l})=>{const n=de({isRemote:!0}),{href:a,onClick:i}=n({href:t?.href,onClick:l});return p("a",{className:N(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),href:a,target:"_self",title:t?.title||"",onClick:i,children:[u(W,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]})})),Ym=g((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=oe(),r=i((()=>{a(),n&&n()}),[n]);return p("div",{className:N("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(Dm,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})})),Gm=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const Xm=e=>e?.length?p("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(Ve,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>u(qm,{...e},String(t))))})]}):null,qm=g((({icon:e,...t})=>{const l=de(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s items-center",children:[e?u(te,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:u(Ve,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),Jm=e=>t=>u("div",{className:"mb-xs sm:mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:u(Ve,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),Qm=g((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Zm=g((()=>{const{defaultLocation:e,foreignOffices:t}=Gs(),[l,a]=ks(e),[r,s]=n(""),o=th(nl()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(o,eh),{close:d}=oe(),m=i((e=>{a(e),d()}),[]);return p(Ym,{className:"pb-20",head:p("div",{children:[u(Ve,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?p("div",{className:"mb-s",children:[u(Ve,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(l),children:u(Ve,{color:"text-primary-main",children:l.name})})]}):null,u(Qm,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&Gm(e.toLowerCase())(r.toLowerCase())>=.8)).map(Jm(m))}):u("div",{className:"columns-1 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(Ve,{size:"text-h6",children:e})}),t.map(Jm(h))]},e)))}),Xm(t)]});var h})),eh=e=>e.name?.charAt(0)||"",th=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),lh=g((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:N("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(te,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:N("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})})),nh=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},ah=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),ih=e=>t=>e.map((([e,l])=>[Gm(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>sh(t,e))).reduce(nh(Math.max,0),new Map),rh=e=>t=>{return us(t,t.map((({title:e})=>e)).map((e=>t=>{const l=ah(t||"");return l.length?Be(e.map((e=>Ba(l.map(Gm(e)))))):0})(e))).sort((e=>(t,l)=>-e(t,l))((l=([,e])=>e,(e,t)=>l(e)-l(t)))).map((([e])=>e));var l},sh=(e,t)=>new Map(e.map((e=>[e,t]))),oh=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=ht(e?.length?e:null,ch),[s,o]=n(null);return nm((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=ah(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(ih(i)).reduce(nh(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return rh(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},ch=async(...e)=>(await Promise.allSettled(e.map((e=>pt(F(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),dh=g((({className:e,topItems:t})=>{const l=de({isRemote:!0});return u("div",{className:N("flex items-start justify-between",e),children:t?.map(l).map(hh)})})),mh=["all","footer"],hh=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||mh.includes(e.displayArea.toLowerCase())));return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>u(uh,{...e,basePath:o(a),index:t},String(t))))]},String(t))},uh=g((({text:e,index:t,basePath:l,...n})=>{const a=de({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:N("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),ph=g((({initialQuery:e})=>{const{topItems:t}=Gs(),l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,i]=oh({basePathList:l,initialQuery:e}),s=r((()=>gh(t)(n)),[t,n]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(Ym,{head:u(lh,{autoFocus:!0,...i}),children:u(dh,{topItems:s})})})),gh=e=>t=>e?.length&&t?.length?us(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:F("/",t)})))}))):[];const xh=g((({className:e})=>{const[t,l]=n(""),a=i((()=>l("")),[]),{open:r}=(()=>{const{open:e,close:t}=oe();return{open:(t={},l={})=>e(u(ph,{...t}),l),close:t}})(),s=i((e=>{l(e),fh(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:N("relative",e),children:[u(lh,{value:t,onChange:s}),u(Dm,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),fh=e=>e&&e.length>=3,bh=g((({item:e,basePath:t})=>{const l=de({isRemote:!(!d.BASE_PATH||!t)&&!d.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=v(),s=$m(r)({href:n});return p("a",{className:N(s?"text-primary-main":"text-primary-text","py-3 text-h5 font-light flex justify-between cursor-pointer"),href:n,target:a,onClick:i,children:[e.text,u(te,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]})})),yh=g((({activeMenuSubItems:e,basePath:t})=>e?u("div",{className:"mb-5",children:e.map(((e,l)=>u(bh,{item:e,basePath:t},String(l))))}):null)),vh=({item:e,isActive:t,onClick:l})=>p("button",{type:"button",className:"relative",onClick:l,children:[u("span",{className:N("whitespace-nowrap",t?"text-primary-main":""),children:e.text}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]}),Nh=g((e=>{const{topItems:t,officesLink:l,defaultLocation:s}=Gs(e.options?.page?.fallback),[o]=ks(s),c=(()=>{const{open:e,close:t}=oe();return{open:(t={})=>e(u(Zm,{}),t),close:t}})(),d=i((()=>c.open()),[]),[m,h]=Va({itemCount:t?.length??0}),[g]=Hm(t),[x,f]=n(g),b=r((()=>t?.[x]),[t,x]),y=b?.items||[];a((()=>{f(g)}),[g]),a((()=>{x>0&&h.scrollTo(x)}),[x,h]);const v=i((e=>f(e)),[]);return u(Ym,{head:u("div",{className:"flex items-center",children:u(T,{as:"h4",title:"Меню"})}),children:p("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[u("div",{className:"w-full mb-3",children:u(va,{containerRef:m,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>u(vh,{item:e,isActive:x===t,onClick:()=>v(t)},String(t))))})}),p("div",{className:"relative grow overflow-auto",children:[u(yh,{activeMenuSubItems:y,basePath:b?.href}),u(xh,{className:"grow mb-5"}),wh(l),p("div",{className:"flex items-center text-s cursor-pointer",onClick:d,children:[u(te,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),p("div",{className:"flex flex-col items-start",children:[u(Ve,{size:"text-h5",children:o.name}),u(Ve,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]})]})]})})})),wh=e=>e?p("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[u(te,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),u("span",{children:"Офисы и банкоматы"})]}):null,kh="burgerMenuDialog",Sh=[],Ch=g((({...e})=>{const[t,{toggle:l,close:n}]=(()=>{const{open:e,closeAll:t,close:l}=oe(),n=Fm(),a=((e,t)=>t.find((t=>t.id===e),e))(kh,n),r=i((()=>e(u(Nh,{}),{id:kh})),[]),s=i((()=>{a?t():r()}),[a]);return[Boolean(a),{open:r,close:l,toggle:s}]})(),a=d.STICKY_MOBILE_MENU||"sticky-mobile-menu",{menuItems:r=Sh}=bt(a,{fallback:e.options?.page?.fallback,pathDir:F(d.BASE_PATH,"portal-resources")}),[,s]=Hm(r),o=Math.floor(r.length/2),c=r.slice(0,o),m=r.slice(o);return u("div",{className:"w-full mb-5","data-component":"sticky-bottom-menu-container",children:u("div",{className:"fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]",children:p("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[c.map(Th(s,n)),u(Km,{isActive:t,onClick:l}),m.map(Th(s,n))]})})})})),Th=(e,t)=>(l,n)=>u(Wm,{isActive:l===e,item:l,onClick:t},l.href||String(n)),Ih=h();const Bh=g((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Mh()}))),Mh=()=>p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[Ph("M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"),Ph("M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z")]}),Ph=e=>u("path",{stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",strokeMiterlimit:"10",d:e}),Rh=g((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Ih.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Ih.like(e))}),[e]),dislike:i((async()=>{l(await Ih.dislike(e))}),[e])}}(v().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(Bh,{onClick:ce(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(Bh,{onClick:ce(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),Ah=g((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return p("div",{"data-theme":s,children:[p("section",{className:N("@container relative",a,e),children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:z(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[D({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),z(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Rh,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Ch,{options:o}),u(Om,{}),u(Lm,{}),u(Em,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Ah.childrenTypes=[],Ah.slots=()=>["header","footer"];e.Blocks=zm,e.ContentPage=Ah,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=ce,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.14.161",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=O,e.useRouter=v,Object.defineProperty(e,"__esModule",{value:!0})}));
|