@redneckz/wildless-cms-uni-blocks 0.13.0 → 0.13.2
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 +33 -22
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/model/HeadlineType.d.ts +1 -1
- package/bundle/ui-kit/TabsControl/TabItemInner.d.ts +6 -0
- package/dist/components/Blocks.mobile.js +17 -13
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/MortgageFiltration/MortgageFiltration.js +5 -5
- package/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/dist/components/Tabs/Tabs.js +6 -6
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/model/HeadlineType.d.ts +1 -1
- package/dist/ui-kit/BaseFiltration/checkShouldRenderBlock.js +2 -4
- package/dist/ui-kit/BaseFiltration/checkShouldRenderBlock.js.map +1 -1
- package/dist/ui-kit/TabsControl/TabItem.js +15 -29
- package/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/dist/ui-kit/TabsControl/TabItemInner.d.ts +6 -0
- package/dist/ui-kit/TabsControl/TabItemInner.js +33 -0
- package/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -0
- package/lib/components/Blocks.mobile.js +17 -13
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/MortgageFiltration/MortgageFiltration.js +5 -5
- package/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/lib/components/Tabs/Tabs.js +6 -6
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/model/HeadlineType.d.ts +1 -1
- package/lib/ui-kit/BaseFiltration/checkShouldRenderBlock.js +2 -4
- package/lib/ui-kit/BaseFiltration/checkShouldRenderBlock.js.map +1 -1
- package/lib/ui-kit/TabsControl/TabItem.js +15 -29
- package/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/lib/ui-kit/TabsControl/TabItemInner.d.ts +6 -0
- package/lib/ui-kit/TabsControl/TabItemInner.js +31 -0
- package/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +98 -79
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/model/HeadlineType.d.ts +1 -1
- package/mobile/bundle/ui-kit/TabsControl/TabItemInner.d.ts +6 -0
- package/mobile/dist/components/Blocks.js +17 -13
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js +5 -5
- package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/mobile/dist/components/Tabs/Tabs.js +6 -6
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/model/HeadlineType.d.ts +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/checkShouldRenderBlock.js +2 -4
- package/mobile/dist/ui-kit/BaseFiltration/checkShouldRenderBlock.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabItem.js +15 -29
- package/mobile/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabItemInner.d.ts +6 -0
- package/mobile/dist/ui-kit/TabsControl/TabItemInner.js +33 -0
- package/mobile/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -0
- package/mobile/lib/components/Blocks.js +17 -13
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js +5 -5
- package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/mobile/lib/components/Tabs/Tabs.js +6 -6
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/model/HeadlineType.d.ts +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/checkShouldRenderBlock.js +2 -4
- package/mobile/lib/ui-kit/BaseFiltration/checkShouldRenderBlock.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabItem.js +15 -29
- package/mobile/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabItemInner.d.ts +6 -0
- package/mobile/lib/ui-kit/TabsControl/TabItemInner.js +31 -0
- package/mobile/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -0
- package/mobile/src/components/Blocks.ts +17 -13
- package/mobile/src/components/MortgageFiltration/MortgageFiltration.tsx +6 -6
- package/mobile/src/components/Tabs/Tabs.tsx +12 -9
- package/mobile/src/model/HeadlineType.ts +1 -1
- package/mobile/src/ui-kit/BaseFiltration/checkShouldRenderBlock.ts +2 -4
- package/mobile/src/ui-kit/TabsControl/TabItem.tsx +18 -57
- package/mobile/src/ui-kit/TabsControl/TabItemInner.tsx +69 -0
- package/package.json +1 -1
- package/src/components/Blocks.mobile.ts +17 -13
- package/src/components/MortgageFiltration/MortgageFiltration.tsx +6 -6
- package/src/components/Tabs/Tabs.tsx +12 -9
- package/src/model/HeadlineType.ts +1 -1
- package/src/ui-kit/BaseFiltration/checkShouldRenderBlock.ts +2 -4
- package/src/ui-kit/TabsControl/TabItem.tsx +18 -57
- package/src/ui-kit/TabsControl/TabItemInner.tsx +69 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef");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 FOOTER(){return this._.FOOTER}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:n}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:n})),{token:t,name:n}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:n}=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:n},body:JSON.stringify({node_ids:t})}),{likes:l}=await e.json();return l||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:n,name:l}=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:n,UserID:l},body:JSON.stringify({node_id:t,user_name:l})}),{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:n,name:l}=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:n,UserID:l},body:JSON.stringify({node_id:t,user_name:l})}),{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,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t};class f{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{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}}const b=new f;function y(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:v(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}function v(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const N=new f;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),S={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:n=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return y(i((t=>{if(!e||!t?.length)return;const n=t[t.length-1];N.fire("intersection",{block:e,intersection:n})}),[e]),{sensitivity:1})}(o),[g,x]=l(!1);a((()=>b.subscribe("tab",(e=>{x(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&n;return u(h,{className:w("@container font-sans",f?"group":"",S[t],g?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),C={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},I={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:n="h3",title:l,children:a})=>{const i=C[n]||"h3";return u(i,{className:w("font-sans m-0",I[t],e),children:l||a})})),B=e=>e,R=(e,t)=>{const[n,a]=l(e),[r,o]=l(!1),[c,d]=l({}),m=s({}),h=i(((e,t)=>{const{parse:l=B,format:i=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((n=>({...n,[e]:l(t)}))),d((t=>({...t,[e]:!0})))},{value:i(n[e]),isDirty:r||c[e],onChange:m.current[e]}}),[n,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),g=i((e=>{e.preventDefault(),o(!0),t&&t(n)}),[t,n]);return[n,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:g}]},V=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],M=e=>!e?.length,P=e=>t=>n=>e(n)?[]:[t],_=e=>null!=e,z=new Map;function j(e,t,{fallback:n,cache:i}={}){const s=r((()=>A(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=l(void 0),[m,h]=l(void 0);a((()=>{!s.some(_)||(async()=>{try{const e=await(o?((e,t=z)=>n=>{const l=t.get(n);if(_(l))return l;const a=e(n);return _(a)?t.set(n,Promise.resolve(a)):t.delete(n),a})(t,i)(o):t(...s));d(e),h(void 0)}catch(e){d(void 0),h(e)}})()}),[t,i,s]);const u=n&&o&&n[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function A(e){return Array.isArray(e)?e:e instanceof Function?A(e()):[e]}async function D(e,t){try{return e?await E(e,t):null}catch(e){console.error(e)}return null}async function E(e,t){const n=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await n.json()}const $=[];function L(){const{data:e}=j("/api/v1/regions",E);return e||$}const O=e=>Boolean(e?.includes(":")),F=(e,t)=>Boolean(e&&!O(e)&&(!t||"_self"===t)),U=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var H=Object.freeze({__proto__:null,isURL:O,isLocalURL:F,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:U});const K=e=>(t,n=d.BASE_PATH)=>{if(!t||O(t)||W(t,d.CDN))return t;const l=t.startsWith("/");return U(W(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W=(e,t)=>t&&e&&e.startsWith(t),G=(e,t)=>G._impl(e,t);function X(){return X._impl()}function J(e={}){const{isRemote:t,basePath:n}=e,l=X(),{closeAll:a}={open:(e,t={})=>b.fire("dialog",{type:"open",dialog:e,...t}),close:()=>b.fire("dialog",{type:"close"}),closeAll:()=>b.fire("dialog",{type:"close",all:!0})};return e=>({...e,href:t&&!n?e.href:K(l)(e.href,n),"aria-label":e.text,onClick:G(i(e),e)});function i({href:e,target:n,onClick:i}){return r=>{i&&i(r),e&&!t&&F(e,n)&&(a(),r?.preventDefault(),l.push(e))}}}G._impl=e=>e,G.setup=e=>{G._impl=e},X._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),X.setup=e=>{X._impl=e};const Y={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:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},q="bg-main-divider text-main-disabled",Z={primary:q,secondary:q,white:q,link:"",transparent:"",gray:q,"":""},Q="text-center font-sans select-none",ee={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:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},te=g((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e;return p("div",{className:w(ne(e),"flex gap-2"),children:[l?u("div",{className:ee[i],children:l}):null,le(e)?p("div",{children:[n?u("div",{className:"text-xs font-light text-left",children:n}):null,u("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:ee[i],children:a}):null]})})),ne=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return["group/btn items-center justify-center",le(e)?a:"h-12 w-12",l?"rounded-full":""].join(" ")},le=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),ae=({className:e,rounded:t,version:n})=>["inline-block",Q,n?Z[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ie=({className:e,rounded:t,version:n})=>[Q,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?Y[n]:"",t?"rounded-full":"rounded-md",e].join(" "),re=g((({disabled:e,children:t,...n})=>{const l=J()(n),a=t??u(te,{...l});return u(e?oe:se,{...l,children:a})})),se=g((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:ie({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),oe=g((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ae({className:e,rounded:l,version:n}),children:a}))),ce=g((({children:e,...t})=>u("p",{className:w("font-sans",Object.values(t)),children:e}))),de=g((({children:e,...t})=>u("span",{className:w("font-sans",Object.values(t)),children:e}))),me=g((({link:e})=>p(ce,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(de,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(re,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(de,{children:e.text})}):null]}))),he=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},ue=g((({key:e,className:t="",inputClassName:n="",id:l,name:a,type:r="text",label:s,placeholder:o,value:c="",valid:d=!0,children:m,onChange:h,onFocus:g,onBlur:x,pattern:f})=>{const b=i((e=>{h&&h(e.target?.value||"")}),[h]),y=m?"pr-8":"",v=d?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[s?u("div",{className:"mb-xs",children:u(de,{size:"text-m",font:"font-light",children:s})}):null,u("input",{className:w("w-full border rounded-md text-primary-text outline-none p-4",y,v,n),id:l,name:a||l,placeholder:o,type:r,value:c,onInput:b,onFocus:g,onBlur:x,pattern:f},e)]}),m]})})),pe=g((({className:e,label:t,value:n="",error:l,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(ue,{type:"text","aria-label":t,label:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i}),u("div",{className:"h-2",children:l?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:l}):null})]}))),ge=e=>"_"===e,xe=e=>/\d/.test(e),fe=e=>ge(e)||xe(e),be=[..."+7 (___) ___-__-__"],ye=be.findIndex(ge),ve=be.map(((e,t)=>fe(e)?be.slice(0,t).filter(fe).length:-1));const Ne=g((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=be.map(((e,n)=>xe(e)?e:t.charAt(ve[n])||e)),l=ve.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(ye,l)):n).join("")}(e))),[t]);return u(ue,{onChange:l,onFocus:e=>l(e?.target?.value||""),...n,children:e})})),we=g((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(Ne,{"aria-label":t,label:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i}),u("div",{className:"h-2",children:l?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:l}):null})]}))),Se="Некорректно заполненное поле",ke=P((e=>null!=e&&""!==e))(Se),Ce=P((e=>"string"==typeof e&&e.length>1))(Se),Ie=P((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Se),Te=(Be=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,P((e=>"string"==typeof e&&Be.test(e))))(Se);var Be;const Re=e=>p("div",{className:"mb-4 sm:flex sm:justify-between sm:gap-5 sm:mb-7",children:[p("div",{className:"sm:w-1/2",children:[u(pe,{className:"shrink-0 w-full mb-3",label:"Наименование организации",...he(e("fullName"),ke)}),u(pe,{className:"shrink-0 w-full mb-3",label:"Контактное лицо",...he(e("name"),Ce)})]}),p("div",{className:"sm:w-1/2",children:[u(pe,{className:"shrink-0 w-full mb-3",label:"ИНН",...he(e("inn"),Ie)}),u(we,{className:"shrink-0 w-full mb-3",label:"Телефон",...he(e("phone"),Te)})]})]}),Ve=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function Me(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}const Pe={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},_e=g((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",...r})=>{const s=X(),o=K(s)(U(d.CDN,"/icons",`${n}.svg`));return"normal"!==i?u(je,{className:e,children:p("svg",{className:w(ze(r.width),Pe[i],"white"===i?"invert":"",t),...r,"aria-hidden":"true",children:[a?u("title",{children:a}):null,l?u("desc",{children:l}):null,u("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):(e.includes("h-")||(r.style={height:`${r.height}px`}),u("img",{className:e,src:o,alt:l,title:a,"aria-hidden":"true",...r}))})),ze=e=>e?"":"w-full h-full",je=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),Ae=g((({className:e="",label:t,options:n=[],value:l,valid:r=!0,isBorder:o=!0,placeholder:c="",onChange:d})=>{const[m,{setFalse:h,toggle:g}]=Me(),x=function(e){const t=s(null);return a((()=>{const n=n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()};return document.addEventListener("click",n),()=>{document.removeEventListener("click",n)}}),[e]),t}(h),f=i((e=>{h(),d&&d(e)}),[d]);return p("div",{className:e,ref:x,children:[t?u("div",{className:"mb-xs",children:u(de,{size:"text-m",color:"text-primary-text",font:"font-light",children:t})}):null,p("div",{className:w("relative",m?"z-20":"z-10"),children:[p("div",{className:w("text-l flex justify-between items-center text-primary-text cursor-pointer",$e(o,r)),onClick:g,children:[u("p",{className:"p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:Ee(l)||c}),u(_e,{className:w("absolute right-3",m?"":"rotate-180"),name:"ArrowUpIcon",width:"16",height:"16"})]}),n?.length?u("div",{className:w("h-0",m?"":"overflow-hidden"),children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:n.map(De(f,m,(e=>e.key===l?.key)))})}):null]})]})})),De=(e,t,n)=>(l,a)=>p("div",{onClick:()=>{e(l)},className:"flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative",children:[u("span",{className:"min-h-6",children:Ee(l)}),u(_e,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-0.5",n(l)&&t?"":"hidden")})]},String(a)),Ee=e=>e?.text||e?.key||"",$e=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Le=g((e=>p("div",{children:[u(Ae,{...e,valid:!e.error}),u("div",{className:"h-2",children:e.error?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:e.error}):null})]}))),Oe=({regions:e,field:t})=>p("div",{className:"mb-4 pb-1 border-b border-b-main-divider sm:flex sm:justify-between sm:gap-5 sm:mb-7 sm:border-none sm:pb-0",children:[u("div",{className:"mb-3 sm:mb-0 sm:w-1/2",children:u(Le,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ve.map((({name:e=""})=>({key:e,text:e}))),...he(t("acquiringType"),ke)})}),u("div",{className:"mb-3 sm:mb-0 sm:w-1/2",children:u(Le,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(t("region"),ke)})})]}),Fe=g((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>p("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[u("div",{className:w("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:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(de,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),Ue=e=>p("div",{className:"sm:mb-5",children:[u(Fe,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Fe,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),He=(e,t)=>{const n=ie({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-4 mt-3 w-full sm:mt-0 sm:w-auto",n,t),children:e?.text?e.text:"Отправить заявку"})},Ke={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},We=V({acquiringType:ke,region:ke,fullName:ke,inn:Ie,name:Ce,phone:Te}),Ge=g((e=>{const{button:t,link:n,onSubmit:l}=e,a=i((e=>{const{acquiringType:t,region:n,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;M(We(e))&&l({typeForm:"acqr",region:n?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s})}),[l]),[,{field:r,...s}]=R(Ke,a),o=L();return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"sm:text-center mb-4"}),Oe({regions:o,field:r}),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center mb-4"}),Re(r),Ue(r),He(t,"mb-4"),u(me,{link:n})]})})),Xe=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-5",children:[p("div",{className:"sm:w-1/2",children:[u(pe,{className:"shrink-0 w-full mb-3",label:"Контактное лицо",...he(e("name"),Ce)}),u(pe,{className:"shrink-0 w-full mb-3",label:"ИНН",...he(e("inn"),Ie)})]}),p("div",{className:"sm:w-1/2",children:[u(we,{className:"shrink-0 w-full mb-3",label:"Телефон",...he(e("phone"),Te)}),u(pe,{className:"shrink-0 w-full mb-3",label:"Электронная почта",...he(e("mail"),ke)})]})]}),Je=({regions:e,field:t})=>u("div",{className:"w-full mb-3 sm:mb-5",children:u(Le,{label:"Регион",placeholder:"Выберите регион",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(t("region"),ke)})}),Ye={name:"",phone:"",inn:"",mail:""},qe=V({region:ke,name:Ce,phone:Te,inn:Ie,mail:ke}),Ze=g((e=>{const{button:t,link:n,onSubmit:l}=e,a=i((e=>{const{region:t,name:n,phone:a,inn:i,mail:r}=e;M(qe(e))&&l({typeForm:"bcrd",region:t?.text||"",name:n,phone:a,inn:i,mail:r})}),[l]),[,{field:r,...s}]=R(Ye,a),o=L();return p("form",{className:"container",onSubmit:s.onSubmit,children:[Je({regions:o,field:r}),Xe(r),He(t,"mb-4"),u(me,{link:n})]})})),Qe=[];const et=async e=>await D(e,{method:"GET"})||Qe,tt=["От 1 000 ₽","До 1 000 000 000 ₽"],nt=["От 1 мес","До 15 лет"],lt=e=>p("div",{className:"mb-4 pb-1 border-b border-b-main-divider sm:flex sm:justify-between sm:gap-5 sm:mb-7 sm:border-none sm:pb-0",children:[p("div",{className:"sm:w-1/2",children:[u(pe,{className:"shrink-0 w-full mb-3",label:"Наименование организации",...e("fullName")}),u(pe,{className:"shrink-0 w-full mb-3",label:"ИНН",...he(e("inn"),Ie)}),u(we,{className:"shrink-0 w-full mb-3",label:"Телефон",...he(e("phone"),Te)})]}),p("div",{className:"sm:w-1/2",children:[u(pe,{className:"shrink-0 w-full mb-3",label:"Годовая выручка, ₽",...he(e("annualRevenue"),ke)}),u(pe,{className:"shrink-0 w-full mb-3",label:"Контактное лицо",...he(e("name"),Ce)}),u(pe,{className:"shrink-0 w-full mb-3",label:"Электронная почта",...e("mail")})]})]}),at=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},it=(e,t,n)=>Math.max(t,Math.min(e,n)),rt=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function st(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function ot({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s-t)/(n-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-4",children:e.map(((e,t)=>u("div",{className:"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-4 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:n,step:l,value:s,disabled:i,onInput:t=>{const n=st(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const ct=1,dt=100,mt=g((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:ct),max:s=(a.length?a.length-1:dt),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=at(e,{normalize:(e=0)=>a.length?ht(a)(e):it(e,r,s),format:rt()}),g=i((e=>{m&&m(st(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[n?u(de,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,u("input",{className:w("m-0 mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","p-0 pl-4 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}),ot({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),ut(l)]})})),ht=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),ut=e=>u("div",{className:"flex justify-between my-2",children:e.map(((e,t)=>u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),pt=e=>p("div",{className:"mb-4 pb-1 border-b border-b-main-divider sm:flex sm:justify-between sm:gap-5 sm:mb-7 sm:border-none sm:pb-0",children:[p("div",{className:"mb-3 sm:mb-0 sm:w-1/2",children:[u("label",{children:u(de,{size:"text-m",font:"font-light",children:"Сумма кредита, ₽"})}),u(mt,{items:tt,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"sm:w-1/2",children:[u("label",{children:u(de,{size:"text-m",font:"font-light",children:"Срок кредита, месяцев"})}),u(mt,{items:nt,min:1,max:180,...e("term")})]})]}),gt=({regions:e,branches:t,field:n})=>p("div",{className:"mb-4 sm:flex sm:justify-between sm:gap-5 sm:mb-7 sm:border-none sm:pb-0",children:[u("div",{className:"mb-3 sm:mb-0 sm:w-1/2",children:u(Le,{label:"Регион",placeholder:"Выберите регион",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(n("region"),ke)})}),u("div",{className:"mb-3 sm:mb-0 sm:w-1/2",children:u(Le,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...he(n("department"),ke)})})]}),xt={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},ft=V({annualRevenue:ke,inn:Ie,name:Ce,phone:Te,region:ke,department:ke}),bt=g((({button:e,link:t,onSubmit:n})=>{const l=i((e=>{const{amount:t,term:l,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;M(ft(e))&&n({typeForm:"cred",fullName:a,inn:i,name:r,phone:s,mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${l}/Выручка=${m}`})}),[n]),[a,{field:r,...s}]=R(xt,l),o=L(),c=function(e){const{data:t}=j(e?`/api/v1/branches?regionCode=${e}`:null,et);return t||Qe}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры кредита",className:"sm:text-center mb-4"}),pt(r),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center mb-4"}),lt(r),u(T,{headingType:"h6",title:"Офис банка",className:"sm:text-center mb-4"}),gt({regions:o,branches:c,field:r}),He(e,"mb-4"),u(me,{link:t})]})})),yt={name:"",phone:""},vt=V({name:Ce,phone:Te}),Nt=g((e=>{const{button:t,link:n,onSubmit:l}=e,a=i((e=>{const{name:t,phone:n}=e;M(vt(e))&&l({typeForm:"dpst",name:t,phone:n})}),[l]),[,{field:r,...s}]=R(yt,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"sm:text-center mb-4"}),p("div",{className:"max-w-[560px] m-auto",children:[u(pe,{className:"shrink-0 w-full mb-3",label:"Имя",...he(r("name"),Ce)}),u(we,{className:"shrink-0 w-full mb-3",label:"Телефон",...he(r("phone"),Te)})]}),p("div",{className:"flex justify-between flex-col-reverse sm:items-center sm:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1 mt-4 sm:mt-0",children:u(me,{link:n})}),He(t)]})]})})),wt={};function St(e,t=wt){const{data:n}=j(e?`/wcms-resources/${e}.json`:null,E,{fallback:t});return n||wt}const kt=g((e=>{const{button:t,sourceBookDir:n}=e,{regions:a}=St(n||"regions-grant-support"),[i,r]=l({key:""}),s=ie({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s sm:space-y-lg",children:[a?u(Le,{label:"Ваш регион",placeholder:"Выберите регион",options:a.map((({name:e=""})=>({key:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(re,{href:o,target:"_blank",className:w("p-4 w-full sm:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Ct=(e,t)=>e?.media&&t?.media?e.media-t.media:0,It=g((({className:e="",image:t,imageClassName:n="",pathPrefix:l})=>{const a=X();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Ct).map((({src:e,format:n,media:i},r)=>u("source",{srcSet:Bt(a,l)(e),type:Rt(n),media:i?`(max-width: ${i}px)`:"",...t.size},`${r}_${e}`))):null,t?.src?Tt({...t,src:Bt(a,l)(t.src)},n):null]})})),Tt=(e,t="")=>u("img",{src:e.src,className:w("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"},...e.size}),Bt=(e,t)=>n=>n&&!O(n)?K(e)(U(t,n)):n,Rt=e=>e?`image/${String(e)}`:void 0,Vt=g((({className:e="",image:t,imageClassName:n="",pathPrefix:l,...a})=>t?.src||t?.icon?t.icon?u(_e,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...a}):u(It,{className:e,imageClassName:n,image:t,pathPrefix:l}):null)),Mt=g((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>u("path",{d:e,fill:t||"currentColor",...r,...n},l)))}))),Pt=[{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"}],_t=g((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Mt,{paths:Pt,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:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":zt(t),t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(l)}),t?o:null,n?u("div",{className:"ml-3",children:u(de,{size:"text-l",font:"font-light",children:n})}):null]})})})),zt=e=>w("rounded border",e?"bg-primary-main":""),jt=e=>{const t=e("text");return p("div",{className:"mb-3 sm:mb-6",children:[p("div",{className:"mb-4 sm:flex sm:items-center sm:gap-6",children:[u(_t,{className:"mb-3 sm:mb-0",text:"Валютный контроль",...e("currencyControl")}),u(_t,{className:"mb-3 sm:mb-0",text:"Документарные операции",...e("documentaryOperations")}),u(_t,{className:"mb-3 sm:mb-0",text:"Конверсионные операции",...e("conversionOperations")})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},At=e=>p("div",{children:[p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"Наименование организации",...he(e("fullName"),ke)})}),u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"ФИО",...he(e("name"),Ce)})})]}),p("div",{className:"sm:flex sm:justify-between sm:gap-lg sm:mb-2xl",children:[u("div",{className:"sm:w-1/2",children:u(we,{className:"shrink-0 w-full mb-s",label:"Телефон",...he(e("phone"),Te)})}),u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"Электронная почта",...he(e("mail"),ke)})})]})]}),Dt={fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""},Et=V({fullName:ke,name:Ce,phone:Te,mail:ke}),$t={ApplicationFormBusinessCard:Ze,ApplicationFormWed:g((e=>{const{button:t,link:n,onSubmit:l}=e,a=i((e=>{const{fullName:t,name:n,phone:a,mail:i,currencyControl:r,documentaryOperations:s,conversionOperations:o,text:c}=e;M(Et(e))&&l({typeForm:"kved",fullName:t,name:n,phone:a,mail:i,partnerComments:`Валютный контроль=${r}/Документарные операции=${s}/Конверсионные операции=${o}/Доп инф=${c}`})}),[l]),[,{field:r,...s}]=R(Dt,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center mb-m"}),At(r),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"sm:text-center mb-m"}),jt(r),p("div",{className:"flex flex-col border-b border-main-divider mb-5 pb-5 sm:items-center sm:flex-row sm:mb-9 sm:pb-9",children:[He(t,"mb-m sm:mr-lg sm:mb-0"),u(me,{link:n})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"sm:text-center mb-m"}),p("div",{className:"flex",children:[p("a",{className:"flex items-center text-primary-text no-underline mr-6",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(Vt,{image:{icon:"PhoneIcon"},width:"24",height:"24",className:"mr-3"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(Vt,{image:{icon:"MailIcon"},width:"24",height:"24",className:"mr-3"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Nt,ApplicationFormCredit:bt,ApplicationFormAcquiring:Ge,ApplicationFormGrantSupport:kt},Lt=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center mt-lg p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(Vt,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-1"}),u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Ot={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},Ft=g((e=>{const{className:t,formBlock:n,...a}=e,[r,s]=l(""),o=i((async e=>{const t=await Ot.send(e)?"OK":"Fail";return s(t),t}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px]",children:[n?.title?u(T,{headingType:"h3",title:n.title,className:"mb-4 sm:mb-8 sm:text-center"}):null,n?Ut(n,o):null,r?u(Lt,{responseType:r}):null]})})})),Ut=(e,t)=>{const n=e?.formType;if(!n||!(n in $t))return null;return u($t[n],{...e,onSubmit:t})},Ht={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Kt=g((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:w("rounded-icon object-fit flex justify-center items-center ",Ht[n],e),children:u(_e,{...i,width:"54%",height:"54%",name:a})}):null})),Wt=g((({className:e="",title:t,benefitList:n,...l})=>p(k,{className:e,defaultPadding:"p-6xl",...l,children:[t?u(T,{headingType:"h3",as:"h2",className:"text-center",title:t}):null,n?.length?u("div",{className:"flex flex-wrap w-full sm:justify-center mt-xl gap-5xl",role:"list",children:n.map(Gt)}):null]}))),Gt=(e,t)=>p("div",{className:"flex gap-m items-center md:basis-1/2 md:max-w-[500px]",role:"listitem",children:[e?.icon?.icon?u(Kt,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(Vt,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"sm:h-full",children:[u(T,{headingType:"h6",children:e.label}),Xt(e.description)]}):null]},String(t)),Xt=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?Yt(e):Jt(e)}):null},Jt=e=>e?.name||null,Yt=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:e},`benefitListItem-${t}`)))}):null},qt={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-l",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},Zt={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},Qt=g((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isPadding:s=!0,isTheme:o=!1,...c})=>{const d=qt[n],m={marginTop:d.descriptionStyle};return p(k,{className:e,defaultPadding:s?"p-6xl":"",version:t,isTheme:o,...c,children:[l?u(T,{className:w("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:l}):null,a?u(ce,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),en=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),tn=g((({className:e="",style:t,idx:n,activeIndex:l,observerOptions:a,children:r,onIntersection:s})=>{const o=y(i((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(n===l),ref:o,children:r})})),nn=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],ln=g((({className:e="",containerRef:t,activeIndex:n,visibleItemCount:l=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},x=s([]),f=i(((e,t)=>{const n=[...x.current||[]];n[e]=t,x.current=n,h&&h(n),p&&p(rn(n))}),[h,p]),b=l>0?a*Number(l)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?an(r,b):{},...y?en(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(S=(e,t)=>u(tn,{className:w(c,l?nn[l-1]:"",y?"h-full":""),style:v?an(r/4):{},activeIndex:n,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(m)});var S})),an=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),rn=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),sn={"horizontal-list":"mx-auto mt-5 w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},on={"horizontal-list":"w-6","vertical-list":"h-6"},cn=g((({containerRef:e,activeIndex:t,dotCount:n=0,listType:l="horizontal-list",version:a})=>n?u("div",{className:w("flex gap-2",sn[l],a?"group":""),...a?{"data-ver":a}:{},children:new Array(n).fill(null).map(((n,a)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${a===t?on[l]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(n=>{n!==t&&e?.current&&e.current.children[n]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(a)},String(a))))}):null)),dn=e=>e,mn=(e=dn)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),hn=mn(),un=(e=dn)=>mn((t=>-e(t))),pn=un(),gn=e=>t=>e.scrollWidth/t,xn=e=>(t,n)=>{e.scrollBy({left:n*gn(e)(t),behavior:"smooth"})},fn=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[e]),[c,d]=a.length?[un()(a),mn()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;n.current&&(m?xn(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(h?xn(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]);return[n,{scrollLeft:u,scrollRight:p,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},bn=g((({className:e,version:t,gap:n=14,padding:l=16,showDots:a=!0,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=fn({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===o?"relative h-full":""),children:[u(ln,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:n,padding:l,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(cn,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),yn="text-left",vn=(e,t,n)=>u(bn,{children:e.map(((e,t)=>(({icon:e,title:t,description:n},l)=>p("div",{className:w("flex flex-col","justify-between p-4 h-full border border-gray",n||t?"":"justify-center"),children:[t?u(de,{size:"text-h6",font:"font-normal",align:yn,children:t}):null,e?u(Vt,{image:e,height:"180",className:"w-auto"}):null,n?u(de,{size:"text-h6",font:"font-normal",align:yn,children:n}):null]},String(l)))({...e},t)))}),Nn=g((({bonusBenefits:e,cardTextAlign:t="center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>p(k,{className:n,defaultPadding:"p-6xl",...r,children:[u(Qt,{className:"mb-4 sm:mb-3xl",isPadding:!1,title:i,description:a,headlineVersion:"M"}),e?.length?vn(e):null]}))),wn=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap gap-m",t),children:e.map(Sn(n))}):null,Sn=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},o="secondary"===r?"color":"white",c=a?.iconVersion?a?.iconVersion:o;return l||a?.icon?u(re,{className:w("basis-full sm:basis-auto",e),appendLeft:kn({...a,iconVersion:c}),appendRight:kn({...i,iconVersion:c}),version:r,text:l,...s},n?String(n):""):null},kn=e=>e?.icon||e?.src?u(Vt,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Cn=g((({buttons:e,className:t,...n})=>u(k,{className:w("!bg-transparent",t),defaultPadding:"p-0",...n,children:wn(e)}))),In=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),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]})})),Tn=g((({className:e="",isUnfolded:t,children:n})=>{const l=s(null);return a((()=>{l.current&&(l.current.style.maxHeight=t?`${l.current.scrollHeight}px`:"")}),[t,n?.length]),u("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} ${e}`,children:n})})),Bn=g((({title:e,value:t,postfix:n="",prefix:l,className:a=""})=>p("div",{className:w("flex justify-between md:mb-7 md:flex-col",a),children:[e?u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(de,{size:"text-h3",children:[l," ",rt(2)(Math.round(t))," ",n]})}:{children:u(de,{size:"text-h3",children:"-"})})]}))),Rn=Math.round(23.5),Vn={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:12.5,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Mn={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:7.5,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Pn={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},_n={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},zn={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},jn=g((({rate:e,title:t="Ставка",unit:n,depositeName:l,isShowDepositeName:a,rateBlockClassName:i,fractionDigits:r=2})=>p("div",{children:[u(de,{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:w("font-mohave text-title-huge pr-6 -mt-4",i),children:String(e.toFixed(r)).replace(".",",")}),n?u("span",{className:"text-7xl",children:n}):null]}),l&&a?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:l}):null]})]}))),An=e=>e?u(ce,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null;function Dn({isShowItems:e=!0,step:t=1e3,...n}){const l=[`От ${rt(2)(n.min||0)} ₽`,`До ${rt(2)(n.max||0)} ₽`];return u(mt,{items:e?l:[],step:t,...n})}function En(e){const{data:t}=j(`/wcms-resources/${e}.json`,E);return t}const $n=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,a=En(t||"bonus-calculator-data")||Pn,[i,r]=((e,t,n)=>{const{minSumTravel:l,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===l&&n===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*n),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*n),i)*(12-r)]})(a,n,l);return{...a,...e,monthBonus:i,yearBonus:r}},Ln=g((({className:e="",sourceBookDir:t="",buttons:n,footnote:l})=>{const[a,{field:i}]=R({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=$n(a,t);return p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-2/5",children:[Dn({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Dn({title:"Сумма покупок в остальных категориях, ₽",className:"mt-7",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),u("div",{children:d>=0?u(jn,{title:"Баллов за месяц",rate:d,rateBlockClassName:"tracking-[-14px]",fractionDigits:0}):null}),p("div",{className:"w-96",children:[m>=0?u(Bn,{title:"Баллов за год",value:m}):null,wn(n,{className:"mt-7",isVertical:!0}),An(l)]})]})})),On=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},Fn=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Un([e,t],l),Un=([e,t],n=[])=>({[e]:n.length?pn(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?hn(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Hn=(e,[t,n],l)=>e>=l[t]&&e<=l[n],Kn=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Wn=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},Gn=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Xn={horizontal:"gap-10",vertical:"flex-col gap-3"},Jn=g((({items:e,checkedItem:t,className:n,onChange:l,orientation:a="horizontal"})=>u("div",{className:w(`flex ${Xn[a]}`,n),children:e?.map((({id:e,text:n})=>u(_t,{isRadio:!0,text:n,value:t===e,onChange:()=>l&&l(e)},String(e))))}))),Yn=({items:e,title:t,orientation:n="horizontal",value:l,radioGroupClassName:a,onChange:i})=>p("div",{children:[t?u("div",{className:"mb-3",children:u(de,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(Jn,{orientation:n,items:e,checkedItem:e[l?0:1].id,className:w("flex-col sm:flex-row",a),onChange:t=>i&&i(t===e[0].id)})]}),qn=e=>Yn({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Zn=g((({title:e="Ставка"})=>p("div",{children:[u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-2xs pt-2xs pl-lg pb-xs",children:u(_e,{name:"PercentIcon",width:"90",height:"85"})}),u("div",{className:"w-64 mt-m",children:p(ce,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]})})]}))),Qn=({rate:e,depositeName:t,isShowDepositeName:n})=>u(jn,{rate:e,depositeName:t,isShowDepositeName:n,rateBlockClassName:"tracking-[-25px]",unit:"%"}),el=({rate:e})=>u(Bn,{title:"Ставка",value:e,postfix:"%"}),tl=e=>e.isShowUnknownRate?u(Zn,{}):p("div",{children:[u("div",{className:"hidden md:block",children:Qn(e)}),u("div",{className:"md:hidden",children:el(e)})]}),nl=g((({className:e="",sourceBookDir:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i})=>{const[r,{field:s}]=R({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isSmallBusiness:r,isMonthlyInterestPayment:s}=e,o=En(t||"business-calculator-data"),c=i||a,d=n<90||n>730;if(n<=30)return{...zn,...e,isDisabledOperatingDeposit:d,isShowUnknownRate:!0};const m=o?.rateRows?.find((e=>s===e.isMonthlyInterestPayment&&r===e.isSmallBusiness&&Kn(c,e)&&Hn(l,["minSum","maxSum"],e)&&Hn(n,["minDays","maxDays"],e)))||zn,{rate:h}=m,u=Wn(h,e),p=l+u,g=o?.rateRows||[zn];return{...m,...Un(["minSum","maxSum"],g),...Un(["minDays","maxDays"],g),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})(r,t),{income:c,finalSum:d,rate:m,isShowUnknownRate:h,depositeName:g}=o;return p("section",{className:e,children:[p("div",{className:"flex flex-col justify-between sm:flex-row",children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 sm:gap-y-lg",children:[Dn({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),(x={title:"Срок, дней",min:o.minDays,max:o.maxDays,...s("daysValue"),value:o.daysValue},u(mt,{items:[`От ${Gn(x.min||0)}`,`До ${Gn(x.max||0)}`],step:1,...x})),p("div",{className:"flex flex-col gap-xl justify-between sm:flex-row sm:gap-0",children:[ll(o,s),qn({title:"Выплата процентов",orientation:"vertical",...s("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),u("div",{className:"border-b border-main-divider my-xl sm:hidden"}),tl({rate:m,depositeName:g,isShowDepositeName:i,isShowUnknownRate:h}),p("div",{className:"flex flex-col gap-y-xl mt-3xl sm:gap-0 sm:w-96 sm:mt-0",children:[al(d,c),wn(n,{isVertical:!0}),u("div",{className:"sm:mt-2xl",children:An(l)})]})]}),u("div",{className:"mt-lg",children:An(a)})]});var x})),ll=(e,t)=>p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(_t,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(_t,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal}),u(_t,{text:"ИП / малое предприятие",...t("isSmallBusiness"),value:e.isSmallBusiness})]}),al=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Bn,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Bn,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),il=({min:e=0,max:t=0,availableMonths:n,...l})=>u(mt,{items:[`От ${rl(e)}`,`До ${rl(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),rl=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,sl=e=>ol({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ol({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&ol({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&ol({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ol=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],cl=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},dl=(e,t,n)=>{let{moneyValue:l,monthsValue:a}=e;const i=En(t||"credit-calculator-data"),s=i?.rateRows||[Vn],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>sl({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=Fn(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Fn(["minMonths","maxMonths"],o,s);l=it(l,c,d),a=it(a,m,h);const u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>sl({row:e,userInputParams:t,paramsViewSettings:n})&&Hn(l,["minSum","maxSum"],e)&&Hn(a,["minMonths","maxMonths"],e)))||Vn)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:p}=u,g=cl(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,monthlyPayment:g})),[e,i])},ml=e=>Yn({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),hl=g((({className:e,sourceBookDir:t,buttons:n,footnote:l,paramsViewSettings:a,isMobile:i})=>{const[r,{field:s}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:Rn}),o=dl(r,t,a),c=ml({title:i?"Тип платежа":"",orientation:"vertical",...s("isAnnuity")});return p("section",{className:w("flex flex-col justify-between sm:flex-row",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 sm:gap-y-lg",children:[Dn({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),il({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),ul({...o,...a},s),u("div",{className:"mt-s sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider mt-xl mb-3xl sm:hidden"}),tl({rate:o.rate}),p("div",{className:"mt-6xl flex flex-col gap-lg sm:w-96 sm:mt-0 sm:gap-0",children:[u(Bn,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),wn(n,{className:"mt-2xl",isVertical:!0}),An(l)]})]})})),ul=(e,t)=>p("div",{className:"gap-xl flex flex-col sm:gap-s",children:[e.isShowSalaryClient?u(_t,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(_t,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(_t,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(_t,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),pl=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=En(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?fl(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!n?.isShowMonthlyInterestPayment,o=!n?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>xl({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&xl({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Hn(l,["minSum","maxSum"],t)&&Hn(a||r,["minMonths","maxMonths"],t)))||_n,{rate:d}=c,m=gl(d,e),h=l+m,u=i?.rateRows||[_n];return{...c,...Un(["minSum","maxSum"],u),...Un(["minMonths","maxMonths"],u),availableMonths:On(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},gl=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},xl=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],fl=(e,t)=>e+Math.round((t-e)/2),bl=g((({className:e,sourceBookDir:t,buttons:n,footnote:l,paramsViewSettings:i})=>{const[r,{field:s}]=R({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=pl(r,t,i),{defaultMonth:c,rate:d,income:m,finalSum:h}=o,{onChange:g}=s("monthsValue");return a((()=>{g&&g(c)}),[c]),p("section",{className:w("flex flex-col justify-between sm:flex-row",e),children:[p("div",{className:"flex flex-col gap-lg sm:w-2/5",children:[Dn({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),il({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),u("div",{className:"flex flex-col gap-y-2xl",children:yl({...o,...i},s)})]}),u("div",{className:"border-b border-main-divider mt-lg mb-2xl md:hidden"}),tl({rate:d}),p("div",{className:"mt-2xl flex flex-col gap-y-2xl sm:w-96 sm:gap-y-0 sm:mt-0",children:[u(Bn,{title:"Доход в конце срока",value:m,postfix:"₽",prefix:"+"}),u(Bn,{title:"Сумма в конце срока",value:h,postfix:"₽"}),wn(n,{isVertical:!0}),An(l)]})]})})),yl=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?qn({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(n={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Yn({...n,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var n},vl=e=>Nl({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Nl({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"})&&Nl({...e,fieldKey:"isExtraMoney",viewSettingFieldKey:"isShowExtraMoney"}),Nl=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],wl=(e,t,n)=>{let{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e;const o=En(t||"refinancing-calculator-data"),c=o?.rateRows||[Mn],d=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>vl({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:m,maxSum:h}=Fn(["minSum","maxSum"],d,c),{minSumOld:u,maxSumOld:p}=Fn(["minSumOld","maxSumOld"],d,c),{minSumExtra:g,maxSumExtra:x}=Fn(["minSumExtra","maxSumExtra"],d,c),{minMonths:f,maxMonths:b}=Fn(["minMonths","maxMonths"],d,c);l=it(l,m,h),i=it(i,u,p),s=it(s,g,x),a=it(a,f,b);const y=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>vl({row:e,userInputParams:t,paramsViewSettings:n})&&Hn(l,["minSum","maxSum"],e)&&Hn(i,["minSumOld","maxSumOld"],e)&&Hn(r,["minSumExtra","maxSumExtra"],e)&&Hn(a,["minMonths","maxMonths"],e)))||Mn)({rateRows:c,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:v}=y,N=cl(v,e),w=e.oldMonthlyPayment-N;return r((()=>({...y,...e,minSum:m,maxSum:h,minMonths:f,maxMonths:b,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:N,benefit:w})),[e,o])},Sl=g((({className:e,sourceBookDir:t,buttons:n,footnote:l,paramsViewSettings:a})=>{const[i,{field:r}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=wl(i,t,a);return p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-2/5",children:[Dn({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum,...r("moneyValue"),value:s.moneyValue}),Dn({title:"Ежемесячный платеж в других банках, ₽",isShowItems:!1,step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),il({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue,className:"mt-2xl"}),u("div",{className:w("mt-7",s.isExtraMoney?"mb-3":""),children:kl({...s,...a},r)}),s.isExtraMoney?Dn({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null]}),u(jn,{title:"Ставка",rate:s.rate,fractionDigits:1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"w-96",children:[u(Bn,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Bn,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,ml({orientation:"vertical",...r("isAnnuity")}),wn(n,{className:"mt-7",isVertical:!0}),An(l)]})]})})),kl=(e,t)=>p("div",{children:[e.isShowSalaryClient?u(_t,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(_t,{className:"mt-3",text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,e.isShowExtraMoney?u(_t,{className:"mt-3",text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney}):null]}),Cl={CreditCalculatorForm:hl,DepositCalculatorForm:bl,BusinessDepositCalculatorForm:nl,BonusCalculatorForm:Ln,RefinancingCalculatorForm:Sl},Il=g((({className:e,calculatorTabs:t=[]})=>u(k,{className:e,defaultPadding:"p-0",children:Bl(t)}))),Tl=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in Cl))return null;return u(Cl[t],{...e.calculatorBlock,isMobile:!0})},Bl=e=>{if(!e||!e.length)return null;return 1===e.length?u(k,{children:Tl(e[0])}):e.map(((e,t)=>u(In,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(Tn,{isUnfolded:t,children:u(k,{children:Tl(e)})}),renderFoldButton:Rl(e)},t.toString())))},Rl=e=>({isUnfolded:t,onToggle:n})=>p("button",{onClick:n,className:"w-full p-xl bg-green 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(_e,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(de,{align:"text-left",color:"text-white",children:e.nav?.title}),u(de,{align:"text-left",size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(_e,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]}),Vl=g((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=at(e,{normalize:(e=a)=>n&&l?String(it(Number(Ml(e)),n,l)):Ml(e),format:rt(r)}),c=i((e=>t&&t(Ml(e))),[t]);return u(ue,{onChange:c,...s,...o})})),Ml=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Pl=g((e=>u(Vl,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(de,{size:"text-xl",font:"font-light",children:"₽"})})}))),_l="amount",zl={[_l]:1500},jl=g((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",placeholder:l="1500",button:a,...i})=>{const[{amount:r},{field:s}]=R(zl),o=r<=0,c=o?ae({version:a?.version}):ie({className:"text-white",version:a?.version}),d=J();return p(k,{className:w("flex flex-col items-center",e),defaultPadding:"p-6xl",...i,children:[t?u(T,{className:"pb-5 xl:pb-9 self-start xl:self-center",headingType:"h2",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:"https://www.rshb.ru/p2p/",children:[u(Pl,{name:_l,valid:!o,placeholder:l,label:n,...s(_l,{parse:Number,format:String})}),a?.text?u("button",{type:"submit",className:w("w-full p-4 mt-5 xl:mt-6",c),disabled:o,...d(a),children:a.text}):null]})]})})),Al=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),Dl=[];function El(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=Al,blocksRegistry:r={},ancestors:s=Dl}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:w(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return c?u(c,{className:i,block:e,options:t,...r,...l},a):null}},a)}const $l=[],Ll=(e,{key:t,ancestors:n=$l,slotName:l=null,extraProps:a,renderProps:i=El,...r})=>{const s=a?(e,t)=>El(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||$l,[r.parent,l]]:n},a)))};function Ol({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?Ll(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}const Fl=g((({className:e,disabled:t,...n})=>u(re,{rounded:!0,className:`group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...n,children:u(Vt,{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"})}))),Ul=g((e=>u(Fl,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Hl=g((e=>u(Fl,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Kl="absolute top-[calc(50%-24px)] z-40",Wl="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Gl=g((({scroll:e,activeIndex:t,itemCount:n,arrowsPadded:l,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<n-1:c,x=i((()=>{a?(o&&t!==n-1&&d(),r()):d()}),[d,r,a,o,t,n]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,n]);return p("div",{className:"hidden @lg:block",children:[Xl(e),h?u(Ul,{className:w(Kl,l?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(Hl,{className:w(Kl,l?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),Xl=e=>p("div",{children:[e.canScrollLeft?u("div",{className:w(Wl,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:w(Wl,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Jl=g((({className:e,itemCount:t,visibleItemCount:n=0,noCardBorder:a,isAlignCenter:r,showDots:s,arrowsPadded:o=!0,isGap:c=!0,...d})=>{const{blocks:m=[]}=d.block||{},h=t||m?.length,[g,{inc:x,dec:f}]=((e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:h,visibleItemCount:n},Math.floor(n/2)),[b,y]=fn({itemCount:h}),[v]=y.visibleIndicesRange,N=m&&"CarouselBankHistoryCard"===m[0]?.type;return u(k,{className:e,defaultPadding:"p-6xl",...d,children:p("div",{className:w(r?"flex justify-center":"","relative max-w-full"),children:[u(ln,{containerRef:b,visibleItemCount:n,snapAlign:"snap-start",gap:c?16:void 0,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:Ol({...d,renderProps:(e,t,n)=>El(e,t,{className:w("h-full min-w-80 sm:min-w-96",a?"":"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider"),blockIndex:n,isActive:g===n})})}),u(Gl,{scroll:y,arrowsPadded:o,onScrollLeft:f,onScrollRight:x,hasEdgeBlocks:N,activeIndex:g,itemCount:h}),s?u(cn,{containerRef:b,activeIndex:v,dotCount:h,listType:"horizontal-list"}):null]})})}));Jl.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"];const Yl=g((({title:e,description:t,className:n})=>u(k,{className:n,defaultPadding:"p-6xl",children:u(Qt,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isPadding:!1})}))),ql={start:"self-start",center:"self-center",end:"self-end"},Zl=g((({className:e,defaultPadding:t,padding:n,title:l="",insetTitle:a="",buttons:i,leftImage:r,rightImage:s,imageAlign:o,backImage:c,children:d})=>p("div",{className:w("relative flex flex-col gap-3xl font-sans overflow-hidden",n||t,e),children:[l?u("div",{className:"relative",children:l}):null,p("div",{className:"grow relative flex flex-wrap @xl:flex-nowrap justify-around @xl:justify-between items-stretch gap-3xl",children:[Ql(r,{imageAlign:o}),p("div",{className:w("flex flex-col gap-3xl max-w-[600px] xl:max-w-[728px]",r?"":"grow"),children:[a,u("div",{className:"grow",children:d}),c?u("div",{className:"mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4",children:c}):null,i]}),Ql(s,{className:"-order-1 @xl:order-1",imageAlign:o})]})]}))),Ql=(e,{className:t,imageAlign:n})=>e?u("div",{className:w("flex-shrink-0",n&&ql[n],t),children:e}):null,ea=(e=[])=>e?.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e)/e.length:0,ta=(e,t="normal")=>e?u("div",{className:w("w-12 h-12 min-w-12 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(Vt,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,na=g((e=>{const{__html:t="",richVersion:n=""}=e;return u("div",{className:w(n,"md-container"),dangerouslySetInnerHTML:{__html:t}})})),la=(e,t)=>e?u(ce,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,aa=(e,t)=>e?u(de,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,ia=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(na,{...e},`rte-${t}`):["label"in e?aa(e.label,t):null,"description"in e?la(e.description,t):null],ra=g((({className:e,benefitsVersion:t,...n})=>p("div",{className:w("flex gap-m","description"in n&&n.description?"items-start":"items-center",e),children:["icon"in n?ta(n.icon,t):null,u("div",{children:ia(n)})]}))),sa=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),oa=e=>{return((t=e.map(sa))?.length?Math.sqrt(Math.abs(ea(t.map((e=>e**2)))-ea(t)**2)):0)>16;var t},ca=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),da=e=>!e.some(ca),ma=g((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?u("div",{className:w("flex gap-x-m gap-y-s",oa(n)||da(n)?"flex-col":"flex-wrap",e),children:n.map(((e,n)=>u(ra,{benefitsVersion:t,...e},String(n))))}):null)),ha=g((({className:e,benefits:t})=>t?.length?u("div",{className:w("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(ia)}):null)),ua=g((({isTabularBenefits:e,...t})=>u(e?ha:ma,{...t}))),pa={L:"w-1.5 h-1.5 mr-m",M:"w-1.5 h-1.5 mr-s",S:"w-1 h-1 mr-xs"},ga=g((({className:e,isDotted:t=!0,children:n,size:l="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",pa[l])})}):null,u("span",{children:n})]}))),xa={S:"text-l font-light",M:"text-h6",L:"text-h5"},fa={S:"ml-xs",M:"ml-s",L:"ml-m"},ba=g((({className:e,hasIndent:t,isDotted:n,items:l,listItemSize:a="M"})=>l?.length?u("section",{className:w("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",xa[a],t?fa[a]:"",e),role:"list",children:l.map(((e,t)=>u(ga,{isDotted:n,size:a,children:e},String(t))))}):null)),ya=g((({className:e,tags:t})=>t?.length?u("div",{className:w("flex flex-wrap gap-xs",e),role:"list",children:t.map(va)}):null)),va=(e,t)=>u("div",{className:"py-2 px-2.5 border-solid border rounded-md border-gray",role:"listitem",children:u(de,{size:"text-m",font:"font-light",children:e})},String(t)),Na=g((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",isInsetTitle:s=!0,benefitsVersion:o,isTabularBenefits:c,benefits:d,__html:m,items:h,isDotted:g=!0,listItemSize:x,tags:f,buttons:b,image:y,imageOptions:{imageAlign:v="end",directionRight:N=!0,isBackground:w}={},children:S})=>{const k=y?.src?u(Vt,{image:y}):null,C=u(Qt,{title:l,description:a,headlineVersion:i,align:r,isPadding:!1});return u(Zl,{className:e,padding:t,defaultPadding:n,...s?{insetTitle:C}:{title:C},...w?{backImage:k}:wa(k,N),imageAlign:v,buttons:wn(b),children:p("div",{className:"flex flex-col gap-xl",children:[u(ua,{benefitsVersion:o,isTabularBenefits:c,benefits:d}),m?u(na,{__html:m}):null,h?.length?u(ba,{items:h,isDotted:g,listItemSize:x}):null,S,f?.length?u(ya,{tags:f}):null]})})})),wa=(e,t)=>t?{rightImage:e}:{leftImage:e},Sa=g((({className:e="",href:t,target:n,isRemote:l=!1,children:a})=>{const i=J({isRemote:l})({href:t,target:n});return u(t?"a":"div",{className:w("block",e),...t?i:{},children:a})})),ka=g((({className:e,title:t,icon:n,list:l,href:a,target:i,...r})=>u(k,{className:e,defaultPadding:"p-3xl",...r,children:u(Sa,{className:"flex items-center h-full",href:a,target:i,children:u(Na,{title:t,headlineVersion:"XS",image:n,imageOptions:{directionRight:!1,imageAlign:"center"},benefits:l?.map((e=>({type:"default",label:e.title,description:e.description})))})})}))),Ca={default:"w-24 h-14",stretched:"flex-1 h-14"},Ia=(e,t)=>e?"":w("group/media flex items-center justify-center box-border",Ca[t]),Ta=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],Ba=e=>Ta.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},Ra=g((({buttonSize:e="default",rounded:t=!1,icon:n,...l})=>{const{href:a,version:i,text:r=""}=l,{iconMapped:s,label:o}=Ba(a),c=Va(n)??s;return u(re,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",Ia(r,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:r,version:i,...l,children:c&&!r?u(Vt,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24"}):null})})),Va=e=>e?.src||e?.icon?e:void 0,Ma=g((({className:e="",media:t,children:n,buttonSize:l})=>p("div",{className:"flex flex-col sm:flex-col-reverse gap-xs",children:[n?u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n}):null,u("div",{className:w("flex gap-xs",e),children:t?.map(((e,t)=>u(Ra,{buttonSize:l,...e},String(t))))})]}))),Pa=g((({className:e="",description:t,href:n,icon:l,items:a=[],socialMedia:i=[],target:r,title:s,align:o="text-left",...c})=>u(k,{className:w("relative group-data-gray:bg-main-divider/50",e),defaultPadding:"p-6xl",...c,children:p(Sa,{href:n,target:r,children:[u(Qt,{className:"mb-xs",title:s,description:t,headlineVersion:"S",isPadding:!1,align:o}),a.length?u(ba,{className:"flex flex-col gap-2",items:a,listItemSize:"S"}):null,_a(l),i.length?u(Ma,{className:"mt-5",media:i}):null]})}))),_a=e=>e?.src||e?.icon?u("div",{children:u(Vt,{image:e})}):null,za=(e=!1)=>e?"p-6xl mt-6":"mt-6 p-6xl",ja=(e,t)=>{const{title:n,description:l,buttons:a}=e;return p("div",{className:"py-5 border-b border-main-divider",children:[n?u("div",{className:"opacity-80",children:u(de,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?u("div",{className:"mt-1",children:u(de,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?u("div",{className:"text-primary-main",children:wn(a)}):null]},String(t))},Aa=g((({className:e="",title:t,align:n="text-center",icon:l,isHighlighting:a=!1,button:i,cardCells:r=[],...s})=>{const o=r.map(ja),c=o.slice(0,1),d=o.slice(1);return p(k,{className:w("relative flex flex-col",e),defaultPadding:za(a),...s,children:[a?$a():null,Da(l),t?u(T,{className:w("pt-xs",n),headingType:"h5",title:t}):null,i?u(re,{className:"w-full mt-m",...i}):null,r.length?u(In,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[c,u(Tn,{isUnfolded:e,children:d})]}),renderFoldButton:r.length>1?Ea:null}):null]})})),Da=e=>u("div",{className:"basis-full self-center",children:e?.src||e?.icon?u(Vt,{image:e}):null}),Ea=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(_e,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),$a=()=>p("div",{className:"absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u(_e,{iconVersion:"black",name:"HeartIcon",width:"23",height:"22"}),u(ce,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:"ХИТ"})]}),La="z-10 border border-solid w-full h-full",Oa=w(La,"absolute hidden sm:block border-transparent"),Fa=g((({className:e,title:t,description:n,button:l,...a})=>u(k,{className:w("sm:pl-12 sm:pb-9",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative",children:[u("div",{className:w(Oa,"top-9 right-12 bg-green-dark")}),u("div",{className:w(Oa,"top-6 right-8 bg-green")}),u("div",{className:w(Oa,"top-3 right-4 bg-green-light")}),p("div",{className:w(La,"relative p-10 bg-white border-green-light"),children:[u(Qt,{title:t,description:n,headlineVersion:"XS",align:"text-left",isPadding:!1}),wn([l],{className:"mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Ua={black:"bg-black",white:"bg-white"},Ha=g((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r,...s})=>p(k,{className:w("flex flex-col justify-left",e),defaultPadding:"p-2xl",...s,children:[l?.src?u(Vt,{className:"flex justify-center mb-xl",image:l}):null,u(Qt,{title:t,description:n,headlineVersion:"XS",isPadding:!1,align:"text-left",className:"mb-m"}),r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(de,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Ka)]}):null,a?p(de,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null,wn([i],{buttonClassName:"w-full mt-lg"})]}))),Ka=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Ua[e]}`},String(t)),Wa=g((({additionalDescription:e,align:t="text-left",button:n={},className:l="",description:a,headlineSmallVersion:i="H6",href:r,icon:s,isDotted:o=!0,isButtonFullWidth:c=!0,isImageFullWidth:d=!1,isTopPosition:m=!1,items:h=[],target:u,title:g,version:x="primary",...f})=>p(k,{className:w("flex flex-col justify-between",t,l),defaultPadding:"p-0",version:x,...f,children:[p(Sa,{className:"p-m flex flex-col gap-xs",href:r,target:u,children:[Xa(i,g),Ja(a),qa(h,o,x),Ya(e),Ga(s,d,m)]}),wn([n],{className:w("p-m pt-0",c?"":"self-center"),isVertical:c})]}))),Ga=(e,t,n)=>p("div",{className:w("flex gap-lg",n?"order-first":"order-last",t?"":"justify-center"),children:[e?.src?u(Vt,{className:"shrink-0",image:e}):null,e?.icon?u(Vt,{className:w("shrink-0",t?"":"w-8 h-8 min-w-8"),image:e}):null]}),Xa=(e,t)=>t?u(de,{size:Zt[e],children:t}):null,Ja=e=>e?u(ce,{size:"text-l",children:e}):null,Ya=e=>e?u(de,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e}):null,qa=(e,t,n="primary")=>e?.length?u(ba,{className:w("text-s","primary"===n?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,listItemSize:"S"}):null,Za=(e=!1)=>e?"text-white":"",Qa=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),ei=g((({icon:e,image:t,title:n,subtitle:l,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(Vt,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(Vt,{image:t})}),n?u(T,{headingType:"h4",className:Za(a),title:n}):null,l?u("div",{className:Qa(a),children:l}):null]}))),ti=g((({cell:e,rowHeader:t,isFillGradient:n=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(ni(n,t))})}))),ni=(e,t)=>({label:n,description:l},a)=>p("div",{className:"flex justify-between text-s py-3.5",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[n?u("div",{className:"text-right "+(e?"text-white":""),children:n}):null,l?u("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:l}):null]})]},String(a)),li=g((({header:e,columnData:t,visibleRowLength:n=0,isFillGradient:l,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:n),s=l?"secondary":"primary";return p("div",{className:`border border-gray rounded-md p-m mb-m ${l?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[u(ei,{...e,isFillGradient:l}),r?.length?r.map((({rowHeader:e,cell:t},n)=>u(ti,{cell:t,rowHeader:e,isFillGradient:l},String(n)))):null,a&&e?.link?u(re,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,ai({onToggleColumn:i,isFillGradient:l,showRow:a})]})})),ai=({onToggleColumn:e,isFillGradient:t,showRow:n})=>u("div",{className:"mt-5",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:n?"Скрыть":"Показать описание"})}),ii=g((e=>{const{className:t,title:n}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[n?u(T,{headingType:"h3",className:"font-medium text-center",title:n}):null,u("div",{role:"table",children:u(ri,{...e})})]})})),ri=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:n,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=l(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,n)=>n===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:l},i)=>{return u(li,{visibleRowLength:a,showRow:o[i],header:l,columnData:(r=e,r?.map(((e,n)=>({cell:e,rowHeader:t?.[n]?.title})))),isFillGradient:0===i&&n,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(bn,{onVisibleIndicesChange:m,children:h}):h}));var si;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(si||(si={}));const oi=new Intl.NumberFormat("ru",{style:"currency",currency:si.RUB}),ci=e=>e?oi.format(e):"",di="text-left text-m font-light text-secondary-text",mi=`${di} pl-5xl`,hi={USD:"DollarIcon",EUR:"EuroIcon"},ui=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:di,children:u(de,{size:"text-m",children:"Валюта"})}),u("th",{className:mi,children:u(de,{size:"text-m",children:"Купить"})}),u("th",{className:mi,children:u(de,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(pi)})]}))),pi=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",children:[t?u(Vt,{image:{icon:hi[t]},width:"24",height:"24",className:"mr-2"}):null,u(de,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(de,{size:"text-h6",children:ci(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(de,{size:"text-h6",children:ci(e?.buyExchangeRate)})})]},t)},gi={icon:"GpsIcon"},xi=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Kt,{...gi,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),fi=(e,t,n)=>{const l=Number(bi(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},bi=e=>e.replace(/[^\d.,]/g,"").replace(",","."),yi=e=>{return(t=[[e=>e.value!==si.RUB&&e.oppositeValue!==si.RUB,()=>e.handleConvert(e.value,si.RUB)],[e=>e.value===si.RUB&&e.oppositeValue===si.RUB,()=>e.handleConvert(e.value,si.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,n]=t.find((([t])=>t(e)))||[];return n})(e)?.();var t};function vi(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:l,text:l};return p("div",{className:"relative flex",children:[u(ue,{className:"shrink-0 text-l w-full appearance-none mr-[-90px]",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(Ae,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const Ni=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||si.RUB,selectBuy:n?.[0]?.currency?.currency||si.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[vi({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:wi(r,o,n),value:r.inputSell,setValue:e=>ki(o,n)(e,r.selectSell,r.selectBuy)}),vi({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Si(r,o,t),value:r.inputBuy,setValue:e=>Ci(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(re,{className:"py-4",version:a?.version,...a,children:a.text}):null]})})),wi=(e,t,n)=>l=>{t({selectSell:l}),yi({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{ki(t,n)(e.inputSell,l,a)}})},Si=(e,t,n)=>l=>{t({selectBuy:l}),yi({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>Ci(t,n)(e.inputBuy,l,a)})},ki=(e,t)=>(n,l,a)=>{e({inputSell:bi(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputBuy:String(fi(n,i,l===si.RUB)||"")})},Ci=(e,t)=>(n,l,a)=>{e({inputBuy:bi(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputSell:String(fi(n,i,l===si.RUB)||"")})};const Ii=async e=>{const t=await Ti(),n=t?.code||"000";return{region:t,exchangeRates:await Bi(e,n)}},Ti=async()=>{try{return await E("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},Bi=async(e,t)=>{try{return await E(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},Ri=g((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const{exchangeRates:a}=function(){const{data:e}=j("/api/v1/exchangerates",Ii);return e||{}}(),i=Vi(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:si.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:si.RUB}}),u(k,{className:w("box-border min-h-80",e),...l,children:u(Zl,{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:[i?u(ui,{className:"mb-xl",exchangeCurrencyItems:i}):null,u(xi,{address:a?.address})]}),i.length&&r.length&&s.length?u(Ni,{className:"grow",currencyRatesBuy:r,currencyRatesSell:s,button:n}):null]})})})})),Vi=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Mi=e=>St(d.SITEMAP||"sitemap",e),Pi=g((({className:e="",items:t})=>t?.length?u("ul",{className:w("flex flex-col","",e),children:t.map(_i)}):null)),_i=(e,t)=>{const{text:n,...l}=e;return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",...l,children:n||null})},`list_item_${String(t)}`)},zi=g((({className:e="",label:t,icon:n,dataTheme:l="",disabled:a=!1,onClick:i})=>p("button",{className:w("flex justify-center w-full px-0 py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:i,disabled:a,"data-theme":l,children:[u("span",{className:"text-h4 pr-3",children:t}),n?u(Vt,{image:{icon:n,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20"}):null]}))),ji=e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Ai=(e,t)=>u(Kt,{...e,iconBgVersion:t,className:"shrink-0"}),Di=g((({className:e="",label:t="Развернуть",labelIcon:n,labelIconBgVersion:l,isExpanded:a,isFoldButtonOnTop:i=!0,version:r="primary",...s})=>u(k,{className:w("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...s,children:u(In,{isFoldButtonOnTop:i,unfoldedByDefault:a,renderFoldableSection:({isUnfolded:e})=>u(Tn,{className:w("gap-5","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:Ol({...s,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:a})=>Ei({version:r,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:e,onToggle:a})})})));Di.childrenTypes={exclude:["RollupItem"]};const Ei=({version:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть");return"primary"===e?$i({label:r,labelIcon:n,labelIconBgVersion:l,icon:ji(a),onToggle:i}):u(zi,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},$i=({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>p("button",{className:w("border-none bg-transparent flex justify-between items-center w-full group/button",a?.icon?"py-xs":"py-lg"),onClick:l,children:[p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Ai(a,t),e?u(de,{size:"text-h6",font:"font-normal",children:e}):null]}),n?u(_e,{name:n,iconVersion:"black",width:"24",height:"24"}):null]}),Li=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(Oi):null,u(re,{version:"primary",className:"w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),Oi=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(de,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(Fi)})]},String(t)),Fi=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:Ui(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),Ui=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Hi(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},Hi=e=>e.replaceAll(/\D/g,""),Ki=g((({className:e="",index:t,text:n,...l})=>{const a=J(),{href:i,target:r,onClick:s}=a(l);return u("a",{className:w("",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),Wi=g((({title:e,links:t,className:n=""})=>p("div",{className:n,children:[u(de,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg mt-lg",children:t.map(((e,t)=>u(Ki,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),Gi=g((({className:e="",index:t,...n})=>{const l=J({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=l(n);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}`})})),Xi=g((({className:e="",links:t})=>p("div",{className:e,children:[u("div",{className:"pt-lg",children:u(de,{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 sm:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(Gi,{index:t,...e},String(t))))}):null]}))),Ji=g((({className:e,...t})=>{const n=t.options?.page?.fallback,{topItems:l}=Mi(n),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:o,documents:c}=St(d.FOOTER||"footer",n);return p(k,{tag:"footer",className:e,...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:l?.map(((e,t)=>u(Di,{label:e?.text,labelIcon:e?.icon,children:u(Pi,{items:e.items})},String(t))))}),u(Li,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(Ma,{className:"mb-xl",media:r,buttonSize:"stretched",children:"Соцсети"}),u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"}),u("div",{className:"mt-xs",children:s?.map(Yi)})]}),u(Wi,{className:"py-lg border-y border-main-divider",title:o,links:a}),u(Xi,{links:c})]})})),Yi=({href:e="/"},t)=>{const{label:n}=Ba(e);return u(re,{className:"w-full mb-lg",text:n,version:"secondary",href:e,target:"_blank"},String(t))},qi={"bg-white":"color",transparent:"white"},Zi={"bg-white":"text-primary-main",transparent:"text-white"},Qi=(e,t,n)=>u(Vt,t?.src?{image:t,className:Zi[e],width:n?.width,height:n?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:qi[e]},className:Zi[e],width:n?.width,height:n?.height}),er={"bg-white":"text-primary-text",transparent:"text-white"},tr=(e,t,n)=>u("span",{className:`${er[t]} ml-s font-medium ${n||""}`,children:e||"Россельхозбанк"}),nr=g((({bgColor:e="bg-white",children:t,className:n="",href:l,logo:a,showTitle:i=!0,targetBlank:r})=>p("a",{className:`inline-flex items-center font-sans no-underline ${n}`,href:l||"https://rshb.ru/",target:r?"_blank":"_self","aria-label":a?.title||"Россельхозбанк",children:[Qi(e,a?.image,{width:"34",height:"34"}),i?tr(t||a?.title,e,"text-s"):null]}))),lr={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},ar=g((({bgColor:e,logo:t,internetBankUrl:n,version:l})=>{const a=X(),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(nr,{className:"mt-2xs",bgColor:e,logo:t}):ir(s),n?u(re,{href:n,ariaLabel:"Войти",target:"_blank",className:w("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",lr["transparent"===l?"transparent":"default"]),children:"Войти"}):null]})})),ir=e=>p("button",{className:"flex items-center text-l mt-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(Vt,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]}),rr={"bg-white":"primary",transparent:"transparent"},sr=g((({bgColor:e="bg-white",version:t=rr[e],...n})=>{const{logo:l,internetBankUrl:a}=Mi(n.options?.page?.fallback);return u(k,{tag:"header",defaultPadding:"",version:t,...n,children:u("div",{className:"container px-5 py-2xs box-border",children:u(ar,{bgColor:e,logo:l,internetBankUrl:a,version:t,...n})})})})),or={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},cr=g((({className:e="",gap:t="",isPadding:n=!1,isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,...r})=>u(k,{className:w("relative flex flex-col",or[t],e),defaultPadding:n?"p-6xl":"",version:a,isTheme:i,...r,children:Ol({...r,extraProps:{className:"w-full",padding:l?"":"p-0"}})})));cr.childrenTypes=[];const dr=g((e=>u(cr,{...e})));dr.childrenTypes=[];const mr=g((e=>{const{className:t,image:n,...l}=e;return u(k,{className:t,defaultPadding:"p-0",...l,children:u(Vt,{image:n})})})),hr=["байт","Кб","Мб","Гб","Тб","Пб"],ur=g((({icon:e,text:t,fileSize:n,...l})=>p("a",{className:"flex box-border gap-3 group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",...l,children:[e,t?p(de,{size:"text-l",font:"font-light",children:[t,u(de,{color:"text-secondary-text",children:l?.href&&pr(gr(l.href),n)})]}):null]}))),pr=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),gr=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},xr={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},fr=g((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=X();return p(k,{className:e,defaultPadding:"p-6xl",...s,children:[u(Qt,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isPadding:!1}),a?.length?u("div",{className:w("mt-5 sm:mt-8 flex flex-col gap-6",xr[r]),role:"list",children:a.map(br(o,r,i))}):null]})})),br=(e,t,n)=>(l,a)=>{const i="Attachment"===l?.docType?K(e)(l?.attachment?.src):l?.href,r="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${hr[n]}`})(l?.attachment?.fileSize||0):l?.fileSize;return u("div",{className:"double"===t?"basis-[calc(50%-20px)]":"",role:"listitem",children:u(ur,{text:l?.text,target:l?.target,href:i,fileSize:r,icon:n?u(Vt,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:n,width:"24",height:"24"}):null})},String(a))},yr={left:"text-left",center:"text-center",right:"text-right"},vr=e=>e?u("div",{className:"mb-lg pt-3xs",children:u(de,{size:"text-xl","font-weight":"light",children:e})}):null,Nr=e=>e?.length?u(ba,{items:e,className:"text-l font-light mb-xs last:mb-0"}):u("span",{className:"text-m font-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),wr=g((({className:e,padding:t,alignTitle:n="left",buttons:l=[],description:a,headingType:i="h4",image:r,items:s,qr:o,title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24";return u(k,{className:w("min-h-80",e),padding:"p-0",version:d,...m,children:p(Zl,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:c?u(T,{headingType:i,title:c,className:w("whitespace-pre-wrap",yr[n])}):null,rightImage:r?.src?u(Vt,{className:"hidden lg:block",image:r}):null,buttons:wn(l,{isVertical:l.length>4}),children:[vr(a),p("div",{className:"flex flex-1 flex-wrap gap-m items-center",children:[o?.src?u("div",{className:w("flex justify-center bg-white rounded-md",h),children:u(Vt,{className:"w-fit",image:o})}):null,Nr(s),r?.src?u(Vt,{className:"lg:hidden",image:r}):null]})]})})})),Sr=(e,t)=>e||t?p("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:[Number(e)>0?kr("Страховая сумма:",e):null,Number(t)>0?kr("Ежемесячный лимит:",t):null]}):null,kr=(e,t=0)=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre",children:[u(de,{font:"font-light",size:"text-l",children:e}),p(de,{size:"text-h6",color:"text-primary-text",children:[rt(2)(t)," ₽"]})]}),Cr=g((({className:e,padding:t,headlineVersion:n="M",align:l="text-center",sum:a,monthLimit:i,imageOptions:r,...s})=>u(k,{className:e,padding:"p-0",...s,children:u(Na,{className:"h-full",defaultPadding:"p-6xl",padding:t,headlineVersion:n,align:l,isInsetTitle:!1,imageOptions:{directionRight:!1,imageAlign:"center",...r},...s,children:Sr(Number(a),Number(i))})}))),Ir=g((({className:e,title:t,description:n="Блок в разработке...",...l})=>p(k,{className:w("box-border",e),...l,children:[u(Qt,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isPadding:!1}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:Tr()})]}))),Tr=(e=3)=>Rr(100,e).map((e=>Math.floor(e))).map(Br),Br=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),Rr=(e,t)=>[e].concat(t>0?Rr(e/1.618,t-1):[]);function Vr({text:e,href:t,target:n,icon:l},a){const i="primary"===a?"white":"black",r={text:e,href:t,target:n,ariaLabel:e};return p("div",{className:"flex items-center gap-3",children:[u(re,{className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:a,rounded:!0,...r,children:u(Vt,{className:"w-4 h-4",image:{...l,icon:l?.icon||"ArrowLeftIcon",iconVersion:l?.iconVersion||i}})}),u(re,{version:"link",...r})]})}const Mr=g((({className:e,padding:t,backwardButton:n,...l})=>p(k,{className:w("overflow-hidden flex flex-col gap-3xl box-border",e),defaultPadding:"p-6xl",padding:t,...l,children:[n?.text?Vr(n,l.version&&"primary"!==l.version?"white":"primary"):null,u(Na,{className:"grow h-full",...l})]}))),Pr=g((({className:e,padding:t,slides:n=[],...l})=>u(k,{className:w("overflow-hidden relative",e),padding:t,...l,children:u(bn,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",role:"listitem",children:u(Na,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),_r=g((e=>{const{__html:t,richVersion:n,...l}=e;return u(k,{defaultPadding:"p-0",...l,children:u(na,{__html:t,richVersion:n})})})),zr=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function jr(e,t,n){t.geoObjects.removeAll();const l=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:l,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=n.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(n)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Ar={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},Dr=e=>u("a",{className:`select-none cursor-pointer px-9 h-12 bg-primary-main text-white ${Object.values(Ar).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),Er={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},$r=(e,t,n)=>p("div",{className:`${Object.values(Er).join(" ")} bg-white py-s pl-5xl pr-m w-full`,children:[u(_e,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const l=t.target?.value?t.target?.value.toLowerCase():"";if(l){const t=e.filter((e=>e.text.toLowerCase().indexOf(l)>-1?e:null));n(t)}else n(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),Lr={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"},Or=(e,t,n)=>u("div",{className:`select-none cursor-pointer py-4 w-12 bg-white ${Object.values(Lr).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(_e,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Fr=e=>globalThis[e];const Ur=()=>function(e,t){const[n,r]=l(),s=i((()=>r(Fr(e))),[e]);return a((()=>{const n=document.getElementById(t);if(!n){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(!Fr(e))return n.addEventListener("load",s),()=>{n.removeEventListener("load",s)};s()}),[e,t]),n}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),Hr={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"},Kr=g((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(Hr).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(_e,{name:n,width:"20",height:"16"})})})),Wr={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"},Gr=g((({points:e,className:t="",zoom:n=5,showSearchField:i=!1})=>{const r=s(null),o=Ur(),[c,d]=l(),[m,h]=l(qr(zr)),g=Xr(e);if(a((()=>{r?.current||o?.ready((()=>{r.current=new o.Map("map",{center:g,zoom:n,controls:[],suppressMapOpenBlock:!0}),jr(o,r.current,m)}))}),[o,r,m]),a((()=>{if(r.current&&m&&o){const e=m.length<1?qr(zr):m;jr(o,r.current,e)}}),[r,m,o]),!o)return null;const x=c?"z-[100000]":"z-10";return p("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-1/2 ${x}`,children:i?$r(zr,0,(e=>{if(e){const t=qr(e);h(t)}})):Dr(g)}),u("div",{className:`${Object.values(Wr).join(" ")} ${x} right-2 top-4 bg-white`,onClick:()=>{const e=r.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:u(_e,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${x}`,children:[u(Kr,{yandexMaps:r}),u(Kr,{yandexMaps:r,direction:"out"})]}),Or(r.current,o,`right-2 top-80 ${x}`)]})})),Xr=e=>[Yr(Jr(e,0)),Yr(Jr(e,1))],Jr=(e,t)=>e.map((e=>e[t])),Yr=e=>e.reduce(((e,t)=>e+t))/e.length,qr=e=>e?e.map((e=>e.coords)):null,Zr=g((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),o=s.find((e=>e.key===l));return u(Ae,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:o})})),Qr=g((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Zr,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(Zr,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),es=g((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex 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:n,name:e,checked:l,onChange:e=>a(e.target.value)}),t?u("span",{className:"text-primary-text ml-3 cursor-pointer",children:t}):null]})}))),ts=g((({className:e})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return p("div",{className:w("order-4",e),children:[u(es,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(es,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),ns=["От 1 дня","До 365 дней"],ls=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(de,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(mt,{min:1,max:365,value:e,items:ns,onChange:t})]}))),as=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col sm:flex-row gap-4 order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Zr,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(Zr,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),is=g((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents sm:block flex-1 space-y-xl",children:[u(Qr,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:rs(c)}),u(ls,{days:a,setDays:e=>c({days:e})}),u(as,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:ss(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents sm:flex justify-between items-center",children:[u(ts,{className:"mb-4 sm:mb-0"}),u(re,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),rs=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},ss=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},os=g((({days:e,tariffs:t=[]})=>{const n=ds(e,t),l="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents sm:flex flex-col justify-between order-2",children:[p("div",{className:"flex flex-col sm:flex-row gap-x-11 gap-y-7 order-5 sm:order-none py-7 sm:py-0 border-t border-main-divider sm:border-none",children:[cs("Аренда за",e),cs("Цена",n+" ₽")]}),u("span",{className:"sm:hidden order-3 mb-2 text-s-light text-secondary-text",children:l}),p("div",{className:"flex flex-col items-center gap-3 order-3 sm:order-none mb-6 sm:mb-0 bg-primary-main py-3 sm:p-8 text-center",children:[u(Vt,{image:{icon:"PackA4Icon"},className:"sm:h-[246px]"}),u("span",{className:"hidden sm:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:l})]})]})})),cs=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-1 sm:flex-col sm:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l sm:text-h3 text-primary-text",children:t})]}),ds=(e,t)=>{const n=ms(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},ms=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},hs=(e,t)=>e.find((e=>e.branchCode===t)),us=g((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=hs(l,n.selectedBranch),o=ps(s?.safeBoxCaseVolumes),c=gs(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,d=xs(c,n.selectedBoxSize);return p("div",{className:"flex flex-col sm:flex-row gap-x-9 align-top mb-6",children:[u(is,{...n,regions:t,onClick:r,branches:l,caseVolumes:o,safeBoxCases:c,onChange:i}),u(os,{days:n.days,tariffs:d})]})})),ps=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],gs=(e,t)=>e?.find((e=>e.volume===t)),xs=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,fs=[];const bs=async e=>await D(e,{method:"GET"})||fs,ys=g((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),o=i((()=>s((e=>!e))),[]),[c,d]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=L(),h=vs(c.selectedRegion,m),g=function(e){const{data:t}=j(e?`/api/v1/safeboxes?regionCode=${e}`:null,bs);return t||fs}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=hs(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:n,defaultPadding:"",...a,children:[p("div",{className:"p-4xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(us,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(ce,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(Gr,{points:f,className:"h-[640px]"}):null]})})),vs=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Ns(e){throw new Error(e)}const ws=e=>Boolean(e?.icon||e?.src),Ss={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},ks={normal:"",small:"min-h-6xl"},Cs={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"},Is=g((({className:e="",title:t,description:n,steps:l,buttons:a,size:i="normal",version:r="primary",...s})=>p(k,{className:w("box-border flex flex-col gap-xs",e),defaultPadding:"p-6xl",version:r,...s,children:[t?u(T,{headingType:"h3",className:"text-left",title:t}):null,n?u(ce,{size:"text-xl",font:"font-light",children:u("span",{className:Cs.description,children:n})}):null,l?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col justify-between",children:l.map(Ts(i,r))})}):null,wn(a,{className:"mt-3",isVertical:!0})]}))),Ts=(e,t)=>(n,l)=>{const{type:a}=n;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Bs(e,t)(n,l);case"rte":return u(na,{__html:n.__html});default:Ns(n)}},Bs=(e,t)=>(n,l)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative py-3",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Rs(e,t)(n,l)}),p("div",{className:w("flex flex-col justify-center h-fit",ks[e]),children:[n.label?u("div",{className:"text-l m-0 text-left",children:n.label}):null,n.description?u("div",{className:w("text-s font-light text-left",Cs.description),children:n.description}):null]})]})},String(l)),Rs=(e,t)=>(n,l)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",r=Boolean(n?.icon?.src),s=Ss[e][r?"image":"icon"];return u("div",{className:w(s,r?"":`rounded-md ${Cs.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex self-center text-h4 text-secondary-text group-data-secondary:text-white",children:ws(n?.icon)?u(Vt,{image:{...n.icon,iconVersion:n.icon?.iconVersion||i},width:a,height:a}):u("span",{children:l+1})})})},Vs={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Ms={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Ps={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},_s={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},zs=g((({item:e={},isActive:t,onClick:n,type:l="default"})=>{const a=J(),{text:i,...r}=a({...e,onClick:()=>{n&&n(e)}}),s=e.href?"a":"div";return u(s,{className:w("h-12","block flex-1","cursor-pointer",Vs[l],t?_s[l]:Ps[l]),role:"tab","aria-selected":t,...r,children:u("div",{className:w("h-full","flex justify-center items-center","text-center whitespace-nowrap",t?Ms[l]:"text-secondary-text hover:text-primary-main"),children:u(de,{size:"text-m",children:i})})})})),js=(e,t,n)=>(l,a)=>u(zs,{isActive:l===e,onClick:t,type:n,item:l},String(a)),As="hidden sm:flex absolute z-40 top-0",Ds=g((({className:e,items:t=[],value:n,onChange:l,tabsType:a})=>{const[i,r]=fn({itemCount:t?.length||0});return p("div",{className:w("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(ln,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(js(n,l,a))}),r.canScrollLeft?u(Ul,{className:w("left-6",As),onClick:r.scrollLeft}):null,r.canScrollRight?u(Hl,{className:w("right-6",As),onClick:r.scrollRight}):null]})})),Es=g((({className:e,tabsType:t="default",items:n=[],value:l,onChange:a})=>u("div",{className:w("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:n.map(js(l,a,t))}))),$s=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(Es,{...t});case"centered":return u("div",{className:"flex",children:u(Es,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Ds,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Ls=g((({className:e="",isSticky:t,tabs:n=[],tabsMode:s,...o})=>{const c=r((()=>n.map(Fs)),[n]),[d,m]=l(0);a((()=>{n&&n[0]&&Os(n[0])}),[]),a((()=>{const e=n[d];"group"===e?.type&&b.subject("tab",{type:e.type,label:e.ref})}),[n,d]);const h=i((e=>{const t=c.indexOf(e);m(t),Os(n[t])}),[]);return u(k,{className:w(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:$s({items:c,onChange:h,value:c[d],tabsMode:s})})})),Os=e=>{"group"===e.type&&b.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&b.fire("tab",{type:e.type,label:e.href})},Fs=e=>"group"===e?.type?{text:e.title}:e,Us={Buttons:({buttons:e})=>wn(e,{className:"mt-3",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(Vt,{image:e,className:"m-0",imageClassName:"m-0"}):null,List:({isDotted:e,...t})=>u(ba,{className:"flex flex-col justify-between items-start text-m pl-2 text-base",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"mb-xs",children:e}):null,t?u("div",{className:"text-s text-secondary-text",children:t}):null]})},Hs=g((({title:e,icon:t})=>p("div",{className:"mb-xs",children:[e?u(de,{size:"text-l",font:"font-light",children:e}):null,t?u(Vt,{className:"ml-auto min-w-6",image:t,width:"24",height:"24"}):null]}))),Ks=g((({tile:e,...t})=>p("div",{className:"h-full",children:[u(Hs,{title:e?.header?.title}),e?.data?.length?e.data.map(((e,n)=>u("div",{className:"mb-xs",children:Ws(e,t)},String(n)))):null]})));function Ws(e,t){if(!e||!e.tableCellType||!(e.tableCellType in Us))return null;const n=Us[e.tableCellType];return u(n,{displayTable:()=>null,isVisible:!0,...e,...t})}const Gs=g((({tiles:e,...t})=>e?.length?u(bn,{...t,padding:void 0,children:e.map(((e,n)=>u(Ks,{tile:e,...t},String(n))))}):null)),Xs=g((({tiles:e,...t})=>e?.length?u("div",{className:"flex flex-col gap-3.5",children:e.map(((e,n)=>u(Ks,{tile:e,...t},String(n))))}):null)),Js=g((({className:e,title:t,description:n,tariffsColumns:l,rowHeaders:a,orientation:i="vertical",...r})=>{const s=Ys(l),o=qs(a,s);return p("section",{className:`p-6xl space-3xl bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[u(Qt,{title:t,description:n,headlineVersion:"M",align:"text-left",isPadding:!1}),u("vertical"===i?Xs:Gs,{tiles:o,...r})]})})),Ys=e=>e?.[0]?.data?e[0].data:[],qs=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),Zs=g((({className:e="",title:t,description:n,iconVersion:l,image:a,__html:i,items:r=[],...s})=>p(k,{className:w("flex gap-3 sm:gap-4 bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===l?u("div",{className:"mt-1",children:Qs()}):null,"big"===l?eo(a):null,p("div",{className:"flex flex-col w-fit gap-1 sm:gap-2",children:[t?u(de,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?to(n):null,r?.length?no(r,!0):null,i?u(na,{__html:i}):null]})]}))),Qs=()=>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"}),eo=e=>e?.src?u(Vt,{className:"h-fit flex-shrink-0",image:e}):null,to=e=>u(ce,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),no=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-6":""),children:e.map(((e,t)=>u("li",{children:u(de,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),lo={ApplicationForm:Ft,ButtonsBlock:Cn,BonusBenefitsBlock:Nn,Calculator:Il,CardTransfer:jl,Carousel:Jl,CarouselCard:Fa,CarouselCatalogCard:Ha,CarouselProductCard:Wa,CarouselBankHistoryCard:Yl,CarouselTariffsCard:Aa,ComparisonTable:ii,Footer:Ji,Header:sr,Headline:Qt,HorizontalLayout:dr,ImgBlock:mr,LinkDocs:fr,MobileAppTile:wr,PictureText:Cr,Placeholder:Ir,ProductBlock:Mr,StepsBlock:Is,Tabs:Ls,TariffsTable:Js,TextBlock:Zs,RichTextBlock:_r,RollupItem:Di,SafeDepositRental:ys,VerticalLayout:cr,CarouselRecommendationCard:Pa,ExchangeRateTile:Ri,CarouselProgramsCard:ka,ProductGallery:Pr,BenefitsBlock:Wt};const ao=["Header","Footer"],io=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function ro(e=globalThis){const t=s(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:n})=>{t.current&&t.current.set(e,n)}))),[]),a((()=>{const n=((e,t=600)=>{let n;const l=(...a)=>{l.dispose(),n=setTimeout((()=>{e(...a)}),t)};return l.dispose=()=>{n&&clearTimeout(n)},l})((()=>{!function(e){const t=`#${n=e?.anchor,n?.replace("#","")||""}`;var n;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!ao.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[n]=t.length>0?un(io)(t):[];return n}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",n),()=>{n.dispose(),e.removeEventListener("scroll",n)}}),[e])}const so=g((({className:e,onClose:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-1 bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(Vt,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),oo="cookie",co=g((({termLink:e,personalDataPolicyLink:t})=>{const[n,{setTrue:l,setFalse:r}]=Me();((e,t,n=300)=>{a((()=>{const t=setTimeout(e,n);return()=>{clearTimeout(t)}}),t)})((()=>{globalThis.localStorage?.getItem(oo)||l()}),[],3e3);const s=i((()=>{globalThis.localStorage?.setItem(oo,"true"),r()}),[]);return n?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-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u("div",{className:"sm:flex-1",children:p(ce,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(Sa,{isRemote:!0,className:mo(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(Sa,{isRemote:!0,className:mo(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(so,{className:"bg-main-gray rounded-md",onClose:s})})]})}):null})),mo=e=>w("inline mx-1",e?"text-green-dark":"");const ho=g((()=>{const[e,{push:t,pop:n,clear:r}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}(),s=i((()=>{for(const t of e)t.onClose&&t.onClose();r()}),[e]),o=i((()=>{const t=e[e.length-1];t?.onClose&&t.onClose(),n()}),[e]);return a((()=>b.subscribe("dialog",(e=>{switch(e.type){case"open":t(e);break;case"close":e.all?s():o();break;default:Ns(e)}}))),[s,o]),a((()=>{const e=({key:e})=>{"Escape"===e&&o()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[o]),a((()=>{e.length?globalThis.document?.body.classList.add("no-scrollbar"):globalThis.document?.body.classList.remove("no-scrollbar")}),[e]),e.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:e.map((({dialog:t,id:n},l)=>u("div",{className:w("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",l===e.length-1?"":"hidden"),children:t},String(n||l))))}):null})),uo=h();const po=g((({className:e,onClick:t,ariaLabel:n})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:go()}))),go=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"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"}),u("path",{...e,d:"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"})]})},xo=g((({className:e=""})=>{const t=function(e){const[t,n]=l(0);return a((()=>{(async()=>{const[t]=await uo.getLikeCount(e);n(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{n(await uo.like(e))}),[e]),dislike:i((async()=>{n(await uo.dislike(e))}),[e])}}(X().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e}`,children:[u(po,{onClick:G(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(po,{onClick:G(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),fo=g((({className:e,blocksRegistry:t,blockDecorator:n,data:l={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=l,o={key:"",page:l,blocksRegistry:t,blockDecorator:n,parent:l};return ro(),p("div",{children:[p("section",{className:w("relative @container",a,e),"data-theme":s,children:[i?.header?u("div",{className:"relative z-10 mb-5 shadow-[0_8px_32px_0px_#00000014]",children:Ll(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container @lg:grid @lg:grid-cols-12 @lg:gap-1",children:[Ol({block:l,options:o,extraProps:{className:"scroll-mt-12"}}),Ll(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(xo,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(ho,{}),u(co,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));fo.childrenTypes=[],fo.slots=()=>["header","footer"];e.Blocks=lo,e.ContentPage=fo,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))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=G,e.joinList=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),e.packageVersion="0.13.0",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=H,e.useRouter=X,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef");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 FOOTER(){return this._.FOOTER}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:n}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:n})),{token:t,name:n}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:n}=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:n},body:JSON.stringify({node_ids:t})}),{likes:l}=await e.json();return l||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:n,name:l}=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:n,UserID:l},body:JSON.stringify({node_id:t,user_name:l})}),{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:n,name:l}=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:n,UserID:l},body:JSON.stringify({node_id:t,user_name:l})}),{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,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t};class f{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{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}}const b=new f;function y(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:v(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}function v(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const N=new f;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),S={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:n=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return y(i((t=>{if(!e||!t?.length)return;const n=t[t.length-1];N.fire("intersection",{block:e,intersection:n})}),[e]),{sensitivity:1})}(o),[g,x]=l(!1);a((()=>b.subscribe("tab",(e=>{x(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&n;return u(h,{className:w("@container font-sans",f?"group":"",S[t],g?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),C={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},I={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:n="h3",title:l,children:a})=>{const i=C[n]||"h3";return u(i,{className:w("font-sans m-0",I[t],e),children:l||a})})),B=e=>e,R=(e,t)=>{const[n,a]=l(e),[r,o]=l(!1),[c,d]=l({}),m=s({}),h=i(((e,t)=>{const{parse:l=B,format:i=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((n=>({...n,[e]:l(t)}))),d((t=>({...t,[e]:!0})))},{value:i(n[e]),isDirty:r||c[e],onChange:m.current[e]}}),[n,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),g=i((e=>{e.preventDefault(),o(!0),t&&t(n)}),[t,n]);return[n,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:g}]},V=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],M=e=>!e?.length,P=e=>t=>n=>e(n)?[]:[t],_=e=>null!=e,z=new Map;function j(e,t,{fallback:n,cache:i}={}){const s=r((()=>A(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=l(void 0),[m,h]=l(void 0);a((()=>{!s.some(_)||(async()=>{try{const e=await(o?((e,t=z)=>n=>{const l=t.get(n);if(_(l))return l;const a=e(n);return _(a)?t.set(n,Promise.resolve(a)):t.delete(n),a})(t,i)(o):t(...s));d(e),h(void 0)}catch(e){d(void 0),h(e)}})()}),[t,i,s]);const u=n&&o&&n[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function A(e){return Array.isArray(e)?e:e instanceof Function?A(e()):[e]}async function D(e,t){try{return e?await E(e,t):null}catch(e){console.error(e)}return null}async function E(e,t){const n=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await n.json()}const $=[];function O(){const{data:e}=j("/api/v1/regions",E);return e||$}const L=e=>Boolean(e?.includes(":")),F=(e,t)=>Boolean(e&&!L(e)&&(!t||"_self"===t)),U=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var H=Object.freeze({__proto__:null,isURL:L,isLocalURL:F,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:U});const K=e=>(t,n=d.BASE_PATH)=>{if(!t||L(t)||W(t,d.CDN))return t;const l=t.startsWith("/");return U(W(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W=(e,t)=>t&&e&&e.startsWith(t),G=(e,t)=>G._impl(e,t);function X(){return X._impl()}function J(e={}){const{isRemote:t,basePath:n}=e,l=X(),{closeAll:a}={open:(e,t={})=>b.fire("dialog",{type:"open",dialog:e,...t}),close:()=>b.fire("dialog",{type:"close"}),closeAll:()=>b.fire("dialog",{type:"close",all:!0})};return e=>({...e,href:t&&!n?e.href:K(l)(e.href,n),"aria-label":e.text,onClick:G(i(e),e)});function i({href:e,target:n,onClick:i}){return r=>{i&&i(r),e&&!t&&F(e,n)&&(a(),r?.preventDefault(),l.push(e))}}}G._impl=e=>e,G.setup=e=>{G._impl=e},X._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),X.setup=e=>{X._impl=e};const Y={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:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},q="bg-main-divider text-main-disabled",Z={primary:q,secondary:q,white:q,link:"",transparent:"",gray:q,"":""},Q="text-center font-sans select-none",ee={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:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},te=g((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e;return p("div",{className:w(ne(e),"flex gap-2"),children:[l?u("div",{className:ee[i],children:l}):null,le(e)?p("div",{children:[n?u("div",{className:"text-xs font-light text-left",children:n}):null,u("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:ee[i],children:a}):null]})})),ne=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return["group/btn items-center justify-center",le(e)?a:"h-12 w-12",l?"rounded-full":""].join(" ")},le=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),ae=({className:e,rounded:t,version:n})=>["inline-block",Q,n?Z[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ie=({className:e,rounded:t,version:n})=>[Q,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?Y[n]:"",t?"rounded-full":"rounded-md",e].join(" "),re=g((({disabled:e,children:t,...n})=>{const l=J()(n),a=t??u(te,{...l});return u(e?oe:se,{...l,children:a})})),se=g((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:ie({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),oe=g((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ae({className:e,rounded:l,version:n}),children:a}))),ce=g((({children:e,...t})=>u("p",{className:w("font-sans",Object.values(t)),children:e}))),de=g((({children:e,...t})=>u("span",{className:w("font-sans",Object.values(t)),children:e}))),me=g((({link:e})=>p(ce,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(de,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(re,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(de,{children:e.text})}):null]}))),he=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},ue=g((({key:e,className:t="",inputClassName:n="",id:l,name:a,type:r="text",label:s,placeholder:o,value:c="",valid:d=!0,children:m,onChange:h,onFocus:g,onBlur:x,pattern:f})=>{const b=i((e=>{h&&h(e.target?.value||"")}),[h]),y=m?"pr-8":"",v=d?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[s?u("div",{className:"mb-xs",children:u(de,{size:"text-m",font:"font-light",children:s})}):null,u("input",{className:w("w-full border rounded-md text-primary-text outline-none p-4",y,v,n),id:l,name:a||l,placeholder:o,type:r,value:c,onInput:b,onFocus:g,onBlur:x,pattern:f},e)]}),m]})})),pe=g((({className:e,label:t,value:n="",error:l,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(ue,{type:"text","aria-label":t,label:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i}),u("div",{className:"h-2",children:l?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:l}):null})]}))),ge=e=>"_"===e,xe=e=>/\d/.test(e),fe=e=>ge(e)||xe(e),be=[..."+7 (___) ___-__-__"],ye=be.findIndex(ge),ve=be.map(((e,t)=>fe(e)?be.slice(0,t).filter(fe).length:-1));const Ne=g((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=be.map(((e,n)=>xe(e)?e:t.charAt(ve[n])||e)),l=ve.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(ye,l)):n).join("")}(e))),[t]);return u(ue,{onChange:l,onFocus:e=>l(e?.target?.value||""),...n,children:e})})),we=g((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(Ne,{"aria-label":t,label:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i}),u("div",{className:"h-2",children:l?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:l}):null})]}))),Se="Некорректно заполненное поле",ke=P((e=>null!=e&&""!==e))(Se),Ce=P((e=>"string"==typeof e&&e.length>1))(Se),Ie=P((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Se),Te=(Be=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,P((e=>"string"==typeof e&&Be.test(e))))(Se);var Be;const Re=e=>p("div",{className:"mb-4 sm:flex sm:justify-between sm:gap-5 sm:mb-7",children:[p("div",{className:"sm:w-1/2",children:[u(pe,{className:"shrink-0 w-full mb-3",label:"Наименование организации",...he(e("fullName"),ke)}),u(pe,{className:"shrink-0 w-full mb-3",label:"Контактное лицо",...he(e("name"),Ce)})]}),p("div",{className:"sm:w-1/2",children:[u(pe,{className:"shrink-0 w-full mb-3",label:"ИНН",...he(e("inn"),Ie)}),u(we,{className:"shrink-0 w-full mb-3",label:"Телефон",...he(e("phone"),Te)})]})]}),Ve=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function Me(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}const Pe={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},_e=g((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",...r})=>{const s=X(),o=K(s)(U(d.CDN,"/icons",`${n}.svg`));return"normal"!==i?u(je,{className:e,children:p("svg",{className:w(ze(r.width),Pe[i],"white"===i?"invert":"",t),...r,"aria-hidden":"true",children:[a?u("title",{children:a}):null,l?u("desc",{children:l}):null,u("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):(e.includes("h-")||(r.style={height:`${r.height}px`}),u("img",{className:e,src:o,alt:l,title:a,"aria-hidden":"true",...r}))})),ze=e=>e?"":"w-full h-full",je=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),Ae=g((({className:e="",label:t,options:n=[],value:l,valid:r=!0,isBorder:o=!0,placeholder:c="",onChange:d})=>{const[m,{setFalse:h,toggle:g}]=Me(),x=function(e){const t=s(null);return a((()=>{const n=n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()};return document.addEventListener("click",n),()=>{document.removeEventListener("click",n)}}),[e]),t}(h),f=i((e=>{h(),d&&d(e)}),[d]);return p("div",{className:e,ref:x,children:[t?u("div",{className:"mb-xs",children:u(de,{size:"text-m",color:"text-primary-text",font:"font-light",children:t})}):null,p("div",{className:w("relative",m?"z-20":"z-10"),children:[p("div",{className:w("text-l flex justify-between items-center text-primary-text cursor-pointer",$e(o,r)),onClick:g,children:[u("p",{className:"p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:Ee(l)||c}),u(_e,{className:w("absolute right-3",m?"":"rotate-180"),name:"ArrowUpIcon",width:"16",height:"16"})]}),n?.length?u("div",{className:w("h-0",m?"":"overflow-hidden"),children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:n.map(De(f,m,(e=>e.key===l?.key)))})}):null]})]})})),De=(e,t,n)=>(l,a)=>p("div",{onClick:()=>{e(l)},className:"flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative",children:[u("span",{className:"min-h-6",children:Ee(l)}),u(_e,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-0.5",n(l)&&t?"":"hidden")})]},String(a)),Ee=e=>e?.text||e?.key||"",$e=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Oe=g((e=>p("div",{children:[u(Ae,{...e,valid:!e.error}),u("div",{className:"h-2",children:e.error?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:e.error}):null})]}))),Le=({regions:e,field:t})=>p("div",{className:"mb-4 pb-1 border-b border-b-main-divider sm:flex sm:justify-between sm:gap-5 sm:mb-7 sm:border-none sm:pb-0",children:[u("div",{className:"mb-3 sm:mb-0 sm:w-1/2",children:u(Oe,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ve.map((({name:e=""})=>({key:e,text:e}))),...he(t("acquiringType"),ke)})}),u("div",{className:"mb-3 sm:mb-0 sm:w-1/2",children:u(Oe,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(t("region"),ke)})})]}),Fe=g((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>p("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[u("div",{className:w("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:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(de,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),Ue=e=>p("div",{className:"sm:mb-5",children:[u(Fe,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Fe,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),He=(e,t)=>{const n=ie({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-4 mt-3 w-full sm:mt-0 sm:w-auto",n,t),children:e?.text?e.text:"Отправить заявку"})},Ke={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},We=V({acquiringType:ke,region:ke,fullName:ke,inn:Ie,name:Ce,phone:Te}),Ge=g((e=>{const{button:t,link:n,onSubmit:l}=e,a=i((e=>{const{acquiringType:t,region:n,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;M(We(e))&&l({typeForm:"acqr",region:n?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s})}),[l]),[,{field:r,...s}]=R(Ke,a),o=O();return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"sm:text-center mb-4"}),Le({regions:o,field:r}),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center mb-4"}),Re(r),Ue(r),He(t,"mb-4"),u(me,{link:n})]})})),Xe=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-5",children:[p("div",{className:"sm:w-1/2",children:[u(pe,{className:"shrink-0 w-full mb-3",label:"Контактное лицо",...he(e("name"),Ce)}),u(pe,{className:"shrink-0 w-full mb-3",label:"ИНН",...he(e("inn"),Ie)})]}),p("div",{className:"sm:w-1/2",children:[u(we,{className:"shrink-0 w-full mb-3",label:"Телефон",...he(e("phone"),Te)}),u(pe,{className:"shrink-0 w-full mb-3",label:"Электронная почта",...he(e("mail"),ke)})]})]}),Je=({regions:e,field:t})=>u("div",{className:"w-full mb-3 sm:mb-5",children:u(Oe,{label:"Регион",placeholder:"Выберите регион",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(t("region"),ke)})}),Ye={name:"",phone:"",inn:"",mail:""},qe=V({region:ke,name:Ce,phone:Te,inn:Ie,mail:ke}),Ze=g((e=>{const{button:t,link:n,onSubmit:l}=e,a=i((e=>{const{region:t,name:n,phone:a,inn:i,mail:r}=e;M(qe(e))&&l({typeForm:"bcrd",region:t?.text||"",name:n,phone:a,inn:i,mail:r})}),[l]),[,{field:r,...s}]=R(Ye,a),o=O();return p("form",{className:"container",onSubmit:s.onSubmit,children:[Je({regions:o,field:r}),Xe(r),He(t,"mb-4"),u(me,{link:n})]})})),Qe=[];const et=async e=>await D(e,{method:"GET"})||Qe,tt=["От 1 000 ₽","До 1 000 000 000 ₽"],nt=["От 1 мес","До 15 лет"],lt=e=>p("div",{className:"mb-4 pb-1 border-b border-b-main-divider sm:flex sm:justify-between sm:gap-5 sm:mb-7 sm:border-none sm:pb-0",children:[p("div",{className:"sm:w-1/2",children:[u(pe,{className:"shrink-0 w-full mb-3",label:"Наименование организации",...e("fullName")}),u(pe,{className:"shrink-0 w-full mb-3",label:"ИНН",...he(e("inn"),Ie)}),u(we,{className:"shrink-0 w-full mb-3",label:"Телефон",...he(e("phone"),Te)})]}),p("div",{className:"sm:w-1/2",children:[u(pe,{className:"shrink-0 w-full mb-3",label:"Годовая выручка, ₽",...he(e("annualRevenue"),ke)}),u(pe,{className:"shrink-0 w-full mb-3",label:"Контактное лицо",...he(e("name"),Ce)}),u(pe,{className:"shrink-0 w-full mb-3",label:"Электронная почта",...e("mail")})]})]}),at=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},it=(e,t,n)=>Math.max(t,Math.min(e,n)),rt=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function st(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function ot({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s-t)/(n-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-4",children:e.map(((e,t)=>u("div",{className:"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-4 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:n,step:l,value:s,disabled:i,onInput:t=>{const n=st(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const ct=1,dt=100,mt=g((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:ct),max:s=(a.length?a.length-1:dt),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=at(e,{normalize:(e=0)=>a.length?ht(a)(e):it(e,r,s),format:rt()}),g=i((e=>{m&&m(st(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[n?u(de,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,u("input",{className:w("m-0 mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","p-0 pl-4 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}),ot({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),ut(l)]})})),ht=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),ut=e=>u("div",{className:"flex justify-between my-2",children:e.map(((e,t)=>u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),pt=e=>p("div",{className:"mb-4 pb-1 border-b border-b-main-divider sm:flex sm:justify-between sm:gap-5 sm:mb-7 sm:border-none sm:pb-0",children:[p("div",{className:"mb-3 sm:mb-0 sm:w-1/2",children:[u("label",{children:u(de,{size:"text-m",font:"font-light",children:"Сумма кредита, ₽"})}),u(mt,{items:tt,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"sm:w-1/2",children:[u("label",{children:u(de,{size:"text-m",font:"font-light",children:"Срок кредита, месяцев"})}),u(mt,{items:nt,min:1,max:180,...e("term")})]})]}),gt=({regions:e,branches:t,field:n})=>p("div",{className:"mb-4 sm:flex sm:justify-between sm:gap-5 sm:mb-7 sm:border-none sm:pb-0",children:[u("div",{className:"mb-3 sm:mb-0 sm:w-1/2",children:u(Oe,{label:"Регион",placeholder:"Выберите регион",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(n("region"),ke)})}),u("div",{className:"mb-3 sm:mb-0 sm:w-1/2",children:u(Oe,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...he(n("department"),ke)})})]}),xt={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},ft=V({annualRevenue:ke,inn:Ie,name:Ce,phone:Te,region:ke,department:ke}),bt=g((({button:e,link:t,onSubmit:n})=>{const l=i((e=>{const{amount:t,term:l,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;M(ft(e))&&n({typeForm:"cred",fullName:a,inn:i,name:r,phone:s,mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${l}/Выручка=${m}`})}),[n]),[a,{field:r,...s}]=R(xt,l),o=O(),c=function(e){const{data:t}=j(e?`/api/v1/branches?regionCode=${e}`:null,et);return t||Qe}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры кредита",className:"sm:text-center mb-4"}),pt(r),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center mb-4"}),lt(r),u(T,{headingType:"h6",title:"Офис банка",className:"sm:text-center mb-4"}),gt({regions:o,branches:c,field:r}),He(e,"mb-4"),u(me,{link:t})]})})),yt={name:"",phone:""},vt=V({name:Ce,phone:Te}),Nt=g((e=>{const{button:t,link:n,onSubmit:l}=e,a=i((e=>{const{name:t,phone:n}=e;M(vt(e))&&l({typeForm:"dpst",name:t,phone:n})}),[l]),[,{field:r,...s}]=R(yt,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"sm:text-center mb-4"}),p("div",{className:"max-w-[560px] m-auto",children:[u(pe,{className:"shrink-0 w-full mb-3",label:"Имя",...he(r("name"),Ce)}),u(we,{className:"shrink-0 w-full mb-3",label:"Телефон",...he(r("phone"),Te)})]}),p("div",{className:"flex justify-between flex-col-reverse sm:items-center sm:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1 mt-4 sm:mt-0",children:u(me,{link:n})}),He(t)]})]})})),wt={};function St(e,t=wt){const{data:n}=j(e?`/wcms-resources/${e}.json`:null,E,{fallback:t});return n||wt}const kt=g((e=>{const{button:t,sourceBookDir:n}=e,{regions:a}=St(n||"regions-grant-support"),[i,r]=l({key:""}),s=ie({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s sm:space-y-lg",children:[a?u(Oe,{label:"Ваш регион",placeholder:"Выберите регион",options:a.map((({name:e=""})=>({key:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(re,{href:o,target:"_blank",className:w("p-4 w-full sm:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Ct=(e,t)=>e?.media&&t?.media?e.media-t.media:0,It=g((({className:e="",image:t,imageClassName:n="",pathPrefix:l})=>{const a=X();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Ct).map((({src:e,format:n,media:i},r)=>u("source",{srcSet:Bt(a,l)(e),type:Rt(n),media:i?`(max-width: ${i}px)`:"",...t.size},`${r}_${e}`))):null,t?.src?Tt({...t,src:Bt(a,l)(t.src)},n):null]})})),Tt=(e,t="")=>u("img",{src:e.src,className:w("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"},...e.size}),Bt=(e,t)=>n=>n&&!L(n)?K(e)(U(t,n)):n,Rt=e=>e?`image/${String(e)}`:void 0,Vt=g((({className:e="",image:t,imageClassName:n="",pathPrefix:l,...a})=>t?.src||t?.icon?t.icon?u(_e,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...a}):u(It,{className:e,imageClassName:n,image:t,pathPrefix:l}):null)),Mt=g((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>u("path",{d:e,fill:t||"currentColor",...r,...n},l)))}))),Pt=[{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"}],_t=g((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Mt,{paths:Pt,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:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":zt(t),t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(l)}),t?o:null,n?u("div",{className:"ml-3",children:u(de,{size:"text-l",font:"font-light",children:n})}):null]})})})),zt=e=>w("rounded border",e?"bg-primary-main":""),jt=e=>{const t=e("text");return p("div",{className:"mb-3 sm:mb-6",children:[p("div",{className:"mb-4 sm:flex sm:items-center sm:gap-6",children:[u(_t,{className:"mb-3 sm:mb-0",text:"Валютный контроль",...e("currencyControl")}),u(_t,{className:"mb-3 sm:mb-0",text:"Документарные операции",...e("documentaryOperations")}),u(_t,{className:"mb-3 sm:mb-0",text:"Конверсионные операции",...e("conversionOperations")})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},At=e=>p("div",{children:[p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"Наименование организации",...he(e("fullName"),ke)})}),u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"ФИО",...he(e("name"),Ce)})})]}),p("div",{className:"sm:flex sm:justify-between sm:gap-lg sm:mb-2xl",children:[u("div",{className:"sm:w-1/2",children:u(we,{className:"shrink-0 w-full mb-s",label:"Телефон",...he(e("phone"),Te)})}),u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"Электронная почта",...he(e("mail"),ke)})})]})]}),Dt={fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""},Et=V({fullName:ke,name:Ce,phone:Te,mail:ke}),$t={ApplicationFormBusinessCard:Ze,ApplicationFormWed:g((e=>{const{button:t,link:n,onSubmit:l}=e,a=i((e=>{const{fullName:t,name:n,phone:a,mail:i,currencyControl:r,documentaryOperations:s,conversionOperations:o,text:c}=e;M(Et(e))&&l({typeForm:"kved",fullName:t,name:n,phone:a,mail:i,partnerComments:`Валютный контроль=${r}/Документарные операции=${s}/Конверсионные операции=${o}/Доп инф=${c}`})}),[l]),[,{field:r,...s}]=R(Dt,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center mb-m"}),At(r),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"sm:text-center mb-m"}),jt(r),p("div",{className:"flex flex-col border-b border-main-divider mb-5 pb-5 sm:items-center sm:flex-row sm:mb-9 sm:pb-9",children:[He(t,"mb-m sm:mr-lg sm:mb-0"),u(me,{link:n})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"sm:text-center mb-m"}),p("div",{className:"flex",children:[p("a",{className:"flex items-center text-primary-text no-underline mr-6",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(Vt,{image:{icon:"PhoneIcon"},width:"24",height:"24",className:"mr-3"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(Vt,{image:{icon:"MailIcon"},width:"24",height:"24",className:"mr-3"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Nt,ApplicationFormCredit:bt,ApplicationFormAcquiring:Ge,ApplicationFormGrantSupport:kt},Ot=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center mt-lg p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(Vt,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-1"}),u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Lt={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},Ft=g((e=>{const{className:t,formBlock:n,...a}=e,[r,s]=l(""),o=i((async e=>{const t=await Lt.send(e)?"OK":"Fail";return s(t),t}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px]",children:[n?.title?u(T,{headingType:"h3",title:n.title,className:"mb-4 sm:mb-8 sm:text-center"}):null,n?Ut(n,o):null,r?u(Ot,{responseType:r}):null]})})})),Ut=(e,t)=>{const n=e?.formType;if(!n||!(n in $t))return null;return u($t[n],{...e,onSubmit:t})},Ht={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Kt=g((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:w("rounded-icon object-fit flex justify-center items-center ",Ht[n],e),children:u(_e,{...i,width:"54%",height:"54%",name:a})}):null})),Wt=g((({className:e="",title:t,benefitList:n,...l})=>p(k,{className:e,defaultPadding:"p-6xl",...l,children:[t?u(T,{headingType:"h3",as:"h2",className:"text-center",title:t}):null,n?.length?u("div",{className:"flex flex-wrap w-full sm:justify-center mt-xl gap-5xl",role:"list",children:n.map(Gt)}):null]}))),Gt=(e,t)=>p("div",{className:"flex gap-m items-center md:basis-1/2 md:max-w-[500px]",role:"listitem",children:[e?.icon?.icon?u(Kt,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(Vt,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"sm:h-full",children:[u(T,{headingType:"h6",children:e.label}),Xt(e.description)]}):null]},String(t)),Xt=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?Yt(e):Jt(e)}):null},Jt=e=>e?.name||null,Yt=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:e},`benefitListItem-${t}`)))}):null},qt={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-l",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},Zt={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},Qt=g((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isPadding:s=!0,isTheme:o=!1,...c})=>{const d=qt[n],m={marginTop:d.descriptionStyle};return p(k,{className:e,defaultPadding:s?"p-6xl":"",version:t,isTheme:o,...c,children:[l?u(T,{className:w("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:l}):null,a?u(ce,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),en=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),tn=g((({className:e="",style:t,idx:n,activeIndex:l,observerOptions:a,children:r,onIntersection:s})=>{const o=y(i((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(n===l),ref:o,children:r})})),nn=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],ln=g((({className:e="",containerRef:t,activeIndex:n,visibleItemCount:l=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},x=s([]),f=i(((e,t)=>{const n=[...x.current||[]];n[e]=t,x.current=n,h&&h(n),p&&p(rn(n))}),[h,p]),b=l>0?a*Number(l)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?an(r,b):{},...y?en(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(S=(e,t)=>u(tn,{className:w(c,l?nn[l-1]:"",y?"h-full":""),style:v?an(r/4):{},activeIndex:n,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(m)});var S})),an=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),rn=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),sn={"horizontal-list":"mx-auto mt-5 w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},on={"horizontal-list":"w-6","vertical-list":"h-6"},cn=g((({containerRef:e,activeIndex:t,dotCount:n=0,listType:l="horizontal-list",version:a})=>n?u("div",{className:w("flex gap-2",sn[l],a?"group":""),...a?{"data-ver":a}:{},children:new Array(n).fill(null).map(((n,a)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${a===t?on[l]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(n=>{n!==t&&e?.current&&e.current.children[n]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(a)},String(a))))}):null)),dn=e=>e,mn=(e=dn)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),hn=mn(),un=(e=dn)=>mn((t=>-e(t))),pn=un(),gn=e=>t=>e.scrollWidth/t,xn=e=>(t,n)=>{e.scrollBy({left:n*gn(e)(t),behavior:"smooth"})},fn=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[e]),[c,d]=a.length?[un()(a),mn()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;n.current&&(m?xn(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(h?xn(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]);return[n,{scrollLeft:u,scrollRight:p,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},bn=g((({className:e,version:t,gap:n=14,padding:l=16,showDots:a=!0,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=fn({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===o?"relative h-full":""),children:[u(ln,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:n,padding:l,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(cn,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),yn="text-left",vn=(e,t,n)=>u(bn,{children:e.map(((e,t)=>(({icon:e,title:t,description:n},l)=>p("div",{className:w("flex flex-col","justify-between p-4 h-full border border-gray",n||t?"":"justify-center"),children:[t?u(de,{size:"text-h6",font:"font-normal",align:yn,children:t}):null,e?u(Vt,{image:e,height:"180",className:"w-auto"}):null,n?u(de,{size:"text-h6",font:"font-normal",align:yn,children:n}):null]},String(l)))({...e},t)))}),Nn=g((({bonusBenefits:e,cardTextAlign:t="center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>p(k,{className:n,defaultPadding:"p-6xl",...r,children:[u(Qt,{className:"mb-4 sm:mb-3xl",isPadding:!1,title:i,description:a,headlineVersion:"M"}),e?.length?vn(e):null]}))),wn=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap gap-m",t),children:e.map(Sn(n))}):null,Sn=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},o="secondary"===r?"color":"white",c=a?.iconVersion?a?.iconVersion:o;return l||a?.icon?u(re,{className:w("basis-full sm:basis-auto",e),appendLeft:kn({...a,iconVersion:c}),appendRight:kn({...i,iconVersion:c}),version:r,text:l,...s},n?String(n):""):null},kn=e=>e?.icon||e?.src?u(Vt,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Cn=g((({buttons:e,className:t,...n})=>u(k,{className:w("!bg-transparent",t),defaultPadding:"p-0",...n,children:wn(e)}))),In=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),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]})})),Tn=g((({className:e="",isUnfolded:t,children:n})=>{const l=s(null);return a((()=>{l.current&&(l.current.style.maxHeight=t?`${l.current.scrollHeight}px`:"")}),[t,n?.length]),u("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} ${e}`,children:n})})),Bn=g((({title:e,value:t,postfix:n="",prefix:l,className:a=""})=>p("div",{className:w("flex justify-between md:mb-7 md:flex-col",a),children:[e?u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(de,{size:"text-h3",children:[l," ",rt(2)(Math.round(t))," ",n]})}:{children:u(de,{size:"text-h3",children:"-"})})]}))),Rn=Math.round(23.5),Vn={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:12.5,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Mn={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:7.5,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Pn={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},_n={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},zn={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},jn=g((({rate:e,title:t="Ставка",unit:n,depositeName:l,isShowDepositeName:a,rateBlockClassName:i,fractionDigits:r=2})=>p("div",{children:[u(de,{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:w("font-mohave text-title-huge pr-6 -mt-4",i),children:String(e.toFixed(r)).replace(".",",")}),n?u("span",{className:"text-7xl",children:n}):null]}),l&&a?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:l}):null]})]}))),An=e=>e?u(ce,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null;function Dn({isShowItems:e=!0,step:t=1e3,...n}){const l=[`От ${rt(2)(n.min||0)} ₽`,`До ${rt(2)(n.max||0)} ₽`];return u(mt,{items:e?l:[],step:t,...n})}function En(e){const{data:t}=j(`/wcms-resources/${e}.json`,E);return t}const $n=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,a=En(t||"bonus-calculator-data")||Pn,[i,r]=((e,t,n)=>{const{minSumTravel:l,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===l&&n===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*n),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*n),i)*(12-r)]})(a,n,l);return{...a,...e,monthBonus:i,yearBonus:r}},On=g((({className:e="",sourceBookDir:t="",buttons:n,footnote:l})=>{const[a,{field:i}]=R({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=$n(a,t);return p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-2/5",children:[Dn({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Dn({title:"Сумма покупок в остальных категориях, ₽",className:"mt-7",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),u("div",{children:d>=0?u(jn,{title:"Баллов за месяц",rate:d,rateBlockClassName:"tracking-[-14px]",fractionDigits:0}):null}),p("div",{className:"w-96",children:[m>=0?u(Bn,{title:"Баллов за год",value:m}):null,wn(n,{className:"mt-7",isVertical:!0}),An(l)]})]})})),Ln=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},Fn=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Un([e,t],l),Un=([e,t],n=[])=>({[e]:n.length?pn(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?hn(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Hn=(e,[t,n],l)=>e>=l[t]&&e<=l[n],Kn=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Wn=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},Gn=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Xn={horizontal:"gap-10",vertical:"flex-col gap-3"},Jn=g((({items:e,checkedItem:t,className:n,onChange:l,orientation:a="horizontal"})=>u("div",{className:w(`flex ${Xn[a]}`,n),children:e?.map((({id:e,text:n})=>u(_t,{isRadio:!0,text:n,value:t===e,onChange:()=>l&&l(e)},String(e))))}))),Yn=({items:e,title:t,orientation:n="horizontal",value:l,radioGroupClassName:a,onChange:i})=>p("div",{children:[t?u("div",{className:"mb-3",children:u(de,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(Jn,{orientation:n,items:e,checkedItem:e[l?0:1].id,className:w("flex-col sm:flex-row",a),onChange:t=>i&&i(t===e[0].id)})]}),qn=e=>Yn({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Zn=g((({title:e="Ставка"})=>p("div",{children:[u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-2xs pt-2xs pl-lg pb-xs",children:u(_e,{name:"PercentIcon",width:"90",height:"85"})}),u("div",{className:"w-64 mt-m",children:p(ce,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]})})]}))),Qn=({rate:e,depositeName:t,isShowDepositeName:n})=>u(jn,{rate:e,depositeName:t,isShowDepositeName:n,rateBlockClassName:"tracking-[-25px]",unit:"%"}),el=({rate:e})=>u(Bn,{title:"Ставка",value:e,postfix:"%"}),tl=e=>e.isShowUnknownRate?u(Zn,{}):p("div",{children:[u("div",{className:"hidden md:block",children:Qn(e)}),u("div",{className:"md:hidden",children:el(e)})]}),nl=g((({className:e="",sourceBookDir:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i})=>{const[r,{field:s}]=R({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isSmallBusiness:r,isMonthlyInterestPayment:s}=e,o=En(t||"business-calculator-data"),c=i||a,d=n<90||n>730;if(n<=30)return{...zn,...e,isDisabledOperatingDeposit:d,isShowUnknownRate:!0};const m=o?.rateRows?.find((e=>s===e.isMonthlyInterestPayment&&r===e.isSmallBusiness&&Kn(c,e)&&Hn(l,["minSum","maxSum"],e)&&Hn(n,["minDays","maxDays"],e)))||zn,{rate:h}=m,u=Wn(h,e),p=l+u,g=o?.rateRows||[zn];return{...m,...Un(["minSum","maxSum"],g),...Un(["minDays","maxDays"],g),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})(r,t),{income:c,finalSum:d,rate:m,isShowUnknownRate:h,depositeName:g}=o;return p("section",{className:e,children:[p("div",{className:"flex flex-col justify-between sm:flex-row",children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 sm:gap-y-lg",children:[Dn({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),(x={title:"Срок, дней",min:o.minDays,max:o.maxDays,...s("daysValue"),value:o.daysValue},u(mt,{items:[`От ${Gn(x.min||0)}`,`До ${Gn(x.max||0)}`],step:1,...x})),p("div",{className:"flex flex-col gap-xl justify-between sm:flex-row sm:gap-0",children:[ll(o,s),qn({title:"Выплата процентов",orientation:"vertical",...s("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),u("div",{className:"border-b border-main-divider my-xl sm:hidden"}),tl({rate:m,depositeName:g,isShowDepositeName:i,isShowUnknownRate:h}),p("div",{className:"flex flex-col gap-y-xl mt-3xl sm:gap-0 sm:w-96 sm:mt-0",children:[al(d,c),wn(n,{isVertical:!0}),u("div",{className:"sm:mt-2xl",children:An(l)})]})]}),u("div",{className:"mt-lg",children:An(a)})]});var x})),ll=(e,t)=>p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(_t,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(_t,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal}),u(_t,{text:"ИП / малое предприятие",...t("isSmallBusiness"),value:e.isSmallBusiness})]}),al=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Bn,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Bn,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),il=({min:e=0,max:t=0,availableMonths:n,...l})=>u(mt,{items:[`От ${rl(e)}`,`До ${rl(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),rl=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,sl=e=>ol({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ol({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&ol({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&ol({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ol=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],cl=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},dl=(e,t,n)=>{let{moneyValue:l,monthsValue:a}=e;const i=En(t||"credit-calculator-data"),s=i?.rateRows||[Vn],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>sl({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=Fn(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Fn(["minMonths","maxMonths"],o,s);l=it(l,c,d),a=it(a,m,h);const u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>sl({row:e,userInputParams:t,paramsViewSettings:n})&&Hn(l,["minSum","maxSum"],e)&&Hn(a,["minMonths","maxMonths"],e)))||Vn)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:p}=u,g=cl(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,monthlyPayment:g})),[e,i])},ml=e=>Yn({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),hl=g((({className:e,sourceBookDir:t,buttons:n,footnote:l,paramsViewSettings:a,isMobile:i})=>{const[r,{field:s}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:Rn}),o=dl(r,t,a),c=ml({title:i?"Тип платежа":"",orientation:"vertical",...s("isAnnuity")});return p("section",{className:w("flex flex-col justify-between sm:flex-row",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 sm:gap-y-lg",children:[Dn({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),il({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),ul({...o,...a},s),u("div",{className:"mt-s sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider mt-xl mb-3xl sm:hidden"}),tl({rate:o.rate}),p("div",{className:"mt-6xl flex flex-col gap-lg sm:w-96 sm:mt-0 sm:gap-0",children:[u(Bn,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),wn(n,{className:"mt-2xl",isVertical:!0}),An(l)]})]})})),ul=(e,t)=>p("div",{className:"gap-xl flex flex-col sm:gap-s",children:[e.isShowSalaryClient?u(_t,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(_t,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(_t,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(_t,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),pl=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=En(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?fl(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!n?.isShowMonthlyInterestPayment,o=!n?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>xl({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&xl({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Hn(l,["minSum","maxSum"],t)&&Hn(a||r,["minMonths","maxMonths"],t)))||_n,{rate:d}=c,m=gl(d,e),h=l+m,u=i?.rateRows||[_n];return{...c,...Un(["minSum","maxSum"],u),...Un(["minMonths","maxMonths"],u),availableMonths:Ln(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},gl=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},xl=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],fl=(e,t)=>e+Math.round((t-e)/2),bl=g((({className:e,sourceBookDir:t,buttons:n,footnote:l,paramsViewSettings:i})=>{const[r,{field:s}]=R({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=pl(r,t,i),{defaultMonth:c,rate:d,income:m,finalSum:h}=o,{onChange:g}=s("monthsValue");return a((()=>{g&&g(c)}),[c]),p("section",{className:w("flex flex-col justify-between sm:flex-row",e),children:[p("div",{className:"flex flex-col gap-lg sm:w-2/5",children:[Dn({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),il({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),u("div",{className:"flex flex-col gap-y-2xl",children:yl({...o,...i},s)})]}),u("div",{className:"border-b border-main-divider mt-lg mb-2xl md:hidden"}),tl({rate:d}),p("div",{className:"mt-2xl flex flex-col gap-y-2xl sm:w-96 sm:gap-y-0 sm:mt-0",children:[u(Bn,{title:"Доход в конце срока",value:m,postfix:"₽",prefix:"+"}),u(Bn,{title:"Сумма в конце срока",value:h,postfix:"₽"}),wn(n,{isVertical:!0}),An(l)]})]})})),yl=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?qn({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(n={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Yn({...n,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var n},vl=e=>Nl({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Nl({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"})&&Nl({...e,fieldKey:"isExtraMoney",viewSettingFieldKey:"isShowExtraMoney"}),Nl=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],wl=(e,t,n)=>{let{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e;const o=En(t||"refinancing-calculator-data"),c=o?.rateRows||[Mn],d=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>vl({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:m,maxSum:h}=Fn(["minSum","maxSum"],d,c),{minSumOld:u,maxSumOld:p}=Fn(["minSumOld","maxSumOld"],d,c),{minSumExtra:g,maxSumExtra:x}=Fn(["minSumExtra","maxSumExtra"],d,c),{minMonths:f,maxMonths:b}=Fn(["minMonths","maxMonths"],d,c);l=it(l,m,h),i=it(i,u,p),s=it(s,g,x),a=it(a,f,b);const y=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>vl({row:e,userInputParams:t,paramsViewSettings:n})&&Hn(l,["minSum","maxSum"],e)&&Hn(i,["minSumOld","maxSumOld"],e)&&Hn(r,["minSumExtra","maxSumExtra"],e)&&Hn(a,["minMonths","maxMonths"],e)))||Mn)({rateRows:c,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:v}=y,N=cl(v,e),w=e.oldMonthlyPayment-N;return r((()=>({...y,...e,minSum:m,maxSum:h,minMonths:f,maxMonths:b,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:N,benefit:w})),[e,o])},Sl=g((({className:e,sourceBookDir:t,buttons:n,footnote:l,paramsViewSettings:a})=>{const[i,{field:r}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=wl(i,t,a);return p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-2/5",children:[Dn({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum,...r("moneyValue"),value:s.moneyValue}),Dn({title:"Ежемесячный платеж в других банках, ₽",isShowItems:!1,step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),il({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue,className:"mt-2xl"}),u("div",{className:w("mt-7",s.isExtraMoney?"mb-3":""),children:kl({...s,...a},r)}),s.isExtraMoney?Dn({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null]}),u(jn,{title:"Ставка",rate:s.rate,fractionDigits:1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"w-96",children:[u(Bn,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Bn,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,ml({orientation:"vertical",...r("isAnnuity")}),wn(n,{className:"mt-7",isVertical:!0}),An(l)]})]})})),kl=(e,t)=>p("div",{children:[e.isShowSalaryClient?u(_t,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(_t,{className:"mt-3",text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,e.isShowExtraMoney?u(_t,{className:"mt-3",text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney}):null]}),Cl={CreditCalculatorForm:hl,DepositCalculatorForm:bl,BusinessDepositCalculatorForm:nl,BonusCalculatorForm:On,RefinancingCalculatorForm:Sl},Il=g((({className:e,calculatorTabs:t=[]})=>u(k,{className:e,defaultPadding:"p-0",children:Bl(t)}))),Tl=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in Cl))return null;return u(Cl[t],{...e.calculatorBlock,isMobile:!0})},Bl=e=>{if(!e||!e.length)return null;return 1===e.length?u(k,{children:Tl(e[0])}):e.map(((e,t)=>u(In,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(Tn,{isUnfolded:t,children:u(k,{children:Tl(e)})}),renderFoldButton:Rl(e)},t.toString())))},Rl=e=>({isUnfolded:t,onToggle:n})=>p("button",{onClick:n,className:"w-full p-xl bg-green 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(_e,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(de,{align:"text-left",color:"text-white",children:e.nav?.title}),u(de,{align:"text-left",size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(_e,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]}),Vl=g((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=at(e,{normalize:(e=a)=>n&&l?String(it(Number(Ml(e)),n,l)):Ml(e),format:rt(r)}),c=i((e=>t&&t(Ml(e))),[t]);return u(ue,{onChange:c,...s,...o})})),Ml=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Pl=g((e=>u(Vl,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(de,{size:"text-xl",font:"font-light",children:"₽"})})}))),_l="amount",zl={[_l]:1500},jl=g((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",placeholder:l="1500",button:a,...i})=>{const[{amount:r},{field:s}]=R(zl),o=r<=0,c=o?ae({version:a?.version}):ie({className:"text-white",version:a?.version}),d=J();return p(k,{className:w("flex flex-col items-center",e),defaultPadding:"p-6xl",...i,children:[t?u(T,{className:"pb-5 xl:pb-9 self-start xl:self-center",headingType:"h2",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:"https://www.rshb.ru/p2p/",children:[u(Pl,{name:_l,valid:!o,placeholder:l,label:n,...s(_l,{parse:Number,format:String})}),a?.text?u("button",{type:"submit",className:w("w-full p-4 mt-5 xl:mt-6",c),disabled:o,...d(a),children:a.text}):null]})]})})),Al=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),Dl=[];function El(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=Al,blocksRegistry:r={},ancestors:s=Dl}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:w(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return c?u(c,{className:i,block:e,options:t,...r,...l},a):null}},a)}const $l=[],Ol=(e,{key:t,ancestors:n=$l,slotName:l=null,extraProps:a,renderProps:i=El,...r})=>{const s=a?(e,t)=>El(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||$l,[r.parent,l]]:n},a)))};function Ll({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?Ol(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}const Fl=g((({className:e,disabled:t,...n})=>u(re,{rounded:!0,className:`group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...n,children:u(Vt,{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"})}))),Ul=g((e=>u(Fl,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Hl=g((e=>u(Fl,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Kl="absolute top-[calc(50%-24px)] z-40",Wl="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Gl=g((({scroll:e,activeIndex:t,itemCount:n,arrowsPadded:l,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<n-1:c,x=i((()=>{a?(o&&t!==n-1&&d(),r()):d()}),[d,r,a,o,t,n]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,n]);return p("div",{className:"hidden @lg:block",children:[Xl(e),h?u(Ul,{className:w(Kl,l?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(Hl,{className:w(Kl,l?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),Xl=e=>p("div",{children:[e.canScrollLeft?u("div",{className:w(Wl,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:w(Wl,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Jl=g((({className:e,itemCount:t,visibleItemCount:n=0,noCardBorder:a,isAlignCenter:r,showDots:s,arrowsPadded:o=!0,isGap:c=!0,...d})=>{const{blocks:m=[]}=d.block||{},h=t||m?.length,[g,{inc:x,dec:f}]=((e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:h,visibleItemCount:n},Math.floor(n/2)),[b,y]=fn({itemCount:h}),[v]=y.visibleIndicesRange,N=m&&"CarouselBankHistoryCard"===m[0]?.type;return u(k,{className:e,defaultPadding:"p-6xl",...d,children:p("div",{className:w(r?"flex justify-center":"","relative max-w-full"),children:[u(ln,{containerRef:b,visibleItemCount:n,snapAlign:"snap-start",gap:c?16:void 0,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:Ll({...d,renderProps:(e,t,n)=>El(e,t,{className:w("h-full min-w-80 sm:min-w-96",a?"":"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider"),blockIndex:n,isActive:g===n})})}),u(Gl,{scroll:y,arrowsPadded:o,onScrollLeft:f,onScrollRight:x,hasEdgeBlocks:N,activeIndex:g,itemCount:h}),s?u(cn,{containerRef:b,activeIndex:v,dotCount:h,listType:"horizontal-list"}):null]})})}));Jl.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"];const Yl=g((({title:e,description:t,className:n})=>u(k,{className:n,defaultPadding:"p-6xl",children:u(Qt,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isPadding:!1})}))),ql="z-10 border border-solid w-full h-full",Zl=w(ql,"absolute hidden sm:block border-transparent"),Ql=g((({className:e,title:t,description:n,button:l,...a})=>u(k,{className:w("sm:pl-12 sm:pb-9",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative",children:[u("div",{className:w(Zl,"top-9 right-12 bg-green-dark")}),u("div",{className:w(Zl,"top-6 right-8 bg-green")}),u("div",{className:w(Zl,"top-3 right-4 bg-green-light")}),p("div",{className:w(ql,"relative p-10 bg-white border-green-light"),children:[u(Qt,{title:t,description:n,headlineVersion:"XS",align:"text-left",isPadding:!1}),wn([l],{className:"mt-6xl sm:justify-center",isVertical:!0})]})]})}))),ea={black:"bg-black",white:"bg-white"},ta=g((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r,...s})=>p(k,{className:w("flex flex-col justify-left",e),defaultPadding:"p-2xl",...s,children:[l?.src?u(Vt,{className:"flex justify-center mb-xl",image:l}):null,u(Qt,{title:t,description:n,headlineVersion:"XS",isPadding:!1,align:"text-left",className:"mb-m"}),r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(de,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(na)]}):null,a?p(de,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null,wn([i],{buttonClassName:"w-full mt-lg"})]}))),na=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${ea[e]}`},String(t)),la=g((({className:e="",href:t,target:n,isRemote:l=!1,children:a})=>{const i=J({isRemote:l})({href:t,target:n});return u(t?"a":"div",{className:w("block",e),...t?i:{},children:a})})),aa={L:"w-1.5 h-1.5 mr-m",M:"w-1.5 h-1.5 mr-s",S:"w-1 h-1 mr-xs"},ia=g((({className:e,isDotted:t=!0,children:n,size:l="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",aa[l])})}):null,u("span",{children:n})]}))),ra={S:"text-l font-light",M:"text-h6",L:"text-h5"},sa={S:"ml-xs",M:"ml-s",L:"ml-m"},oa=g((({className:e,hasIndent:t,isDotted:n,items:l,listItemSize:a="M"})=>l?.length?u("section",{className:w("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",ra[a],t?sa[a]:"",e),role:"list",children:l.map(((e,t)=>u(ia,{isDotted:n,size:a,children:e},String(t))))}):null)),ca=g((({additionalDescription:e,align:t="text-left",button:n={},className:l="",description:a,headlineSmallVersion:i="H6",href:r,icon:s,isDotted:o=!0,isButtonFullWidth:c=!0,isImageFullWidth:d=!1,isTopPosition:m=!1,items:h=[],target:u,title:g,version:x="primary",...f})=>p(k,{className:w("flex flex-col justify-between",t,l),defaultPadding:"p-0",version:x,...f,children:[p(la,{className:"p-m flex flex-col gap-xs",href:r,target:u,children:[ma(i,g),ha(a),pa(h,o,x),ua(e),da(s,d,m)]}),wn([n],{className:w("p-m pt-0",c?"":"self-center"),isVertical:c})]}))),da=(e,t,n)=>p("div",{className:w("flex gap-lg",n?"order-first":"order-last",t?"":"justify-center"),children:[e?.src?u(Vt,{className:"shrink-0",image:e}):null,e?.icon?u(Vt,{className:w("shrink-0",t?"":"w-8 h-8 min-w-8"),image:e}):null]}),ma=(e,t)=>t?u(de,{size:Zt[e],children:t}):null,ha=e=>e?u(ce,{size:"text-l",children:e}):null,ua=e=>e?u(de,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e}):null,pa=(e,t,n="primary")=>e?.length?u(oa,{className:w("text-s","primary"===n?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,listItemSize:"S"}):null,ga={start:"self-start",center:"self-center",end:"self-end"},xa=g((({className:e,defaultPadding:t,padding:n,title:l="",insetTitle:a="",buttons:i,leftImage:r,rightImage:s,imageAlign:o,backImage:c,children:d})=>p("div",{className:w("relative flex flex-col gap-3xl font-sans overflow-hidden",n||t,e),children:[l?u("div",{className:"relative",children:l}):null,p("div",{className:"grow relative flex flex-wrap @xl:flex-nowrap justify-around @xl:justify-between items-stretch gap-3xl",children:[fa(r,{imageAlign:o}),p("div",{className:w("flex flex-col gap-3xl max-w-[600px] xl:max-w-[728px]",r?"":"grow"),children:[a,u("div",{className:"grow",children:d}),c?u("div",{className:"mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4",children:c}):null,i]}),fa(s,{className:"-order-1 @xl:order-1",imageAlign:o})]})]}))),fa=(e,{className:t,imageAlign:n})=>e?u("div",{className:w("flex-shrink-0",n&&ga[n],t),children:e}):null,ba=(e=[])=>e?.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e)/e.length:0,ya=(e,t="normal")=>e?u("div",{className:w("w-12 h-12 min-w-12 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(Vt,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,va=g((e=>{const{__html:t="",richVersion:n=""}=e;return u("div",{className:w(n,"md-container"),dangerouslySetInnerHTML:{__html:t}})})),Na=(e,t)=>e?u(ce,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,wa=(e,t)=>e?u(de,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Sa=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(va,{...e},`rte-${t}`):["label"in e?wa(e.label,t):null,"description"in e?Na(e.description,t):null],ka=g((({className:e,benefitsVersion:t,...n})=>p("div",{className:w("flex gap-m","description"in n&&n.description?"items-start":"items-center",e),children:["icon"in n?ya(n.icon,t):null,u("div",{children:Sa(n)})]}))),Ca=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Ia=e=>{return((t=e.map(Ca))?.length?Math.sqrt(Math.abs(ba(t.map((e=>e**2)))-ba(t)**2)):0)>16;var t},Ta=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Ba=e=>!e.some(Ta),Ra=g((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?u("div",{className:w("flex gap-x-m gap-y-s",Ia(n)||Ba(n)?"flex-col":"flex-wrap",e),children:n.map(((e,n)=>u(ka,{benefitsVersion:t,...e},String(n))))}):null)),Va=g((({className:e,benefits:t})=>t?.length?u("div",{className:w("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Sa)}):null)),Ma=g((({isTabularBenefits:e,...t})=>u(e?Va:Ra,{...t}))),Pa=g((({className:e,tags:t})=>t?.length?u("div",{className:w("flex flex-wrap gap-xs",e),role:"list",children:t.map(_a)}):null)),_a=(e,t)=>u("div",{className:"py-2 px-2.5 border-solid border rounded-md border-gray",role:"listitem",children:u(de,{size:"text-m",font:"font-light",children:e})},String(t)),za=g((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",isInsetTitle:s=!0,benefitsVersion:o,isTabularBenefits:c,benefits:d,__html:m,items:h,isDotted:g=!0,listItemSize:x,tags:f,buttons:b,image:y,imageOptions:{imageAlign:v="end",directionRight:N=!0,isBackground:w}={},children:S})=>{const k=y?.src?u(Vt,{image:y}):null,C=u(Qt,{title:l,description:a,headlineVersion:i,align:r,isPadding:!1});return u(xa,{className:e,padding:t,defaultPadding:n,...s?{insetTitle:C}:{title:C},...w?{backImage:k}:ja(k,N),imageAlign:v,buttons:wn(b),children:p("div",{className:"flex flex-col gap-xl",children:[u(Ma,{benefitsVersion:o,isTabularBenefits:c,benefits:d}),m?u(va,{__html:m}):null,h?.length?u(oa,{items:h,isDotted:g,listItemSize:x}):null,S,f?.length?u(Pa,{tags:f}):null]})})})),ja=(e,t)=>t?{rightImage:e}:{leftImage:e},Aa=g((({className:e,title:t,icon:n,list:l,href:a,target:i,...r})=>u(k,{className:e,defaultPadding:"p-3xl",...r,children:u(la,{className:"flex items-center h-full",href:a,target:i,children:u(za,{title:t,headlineVersion:"XS",image:n,imageOptions:{directionRight:!1,imageAlign:"center"},benefits:l?.map((e=>({type:"default",label:e.title,description:e.description})))})})}))),Da={default:"w-24 h-14",stretched:"flex-1 h-14"},Ea=(e,t)=>e?"":w("group/media flex items-center justify-center box-border",Da[t]),$a=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],Oa=e=>$a.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},La=g((({buttonSize:e="default",rounded:t=!1,icon:n,...l})=>{const{href:a,version:i,text:r=""}=l,{iconMapped:s,label:o}=Oa(a),c=Fa(n)??s;return u(re,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",Ea(r,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:r,version:i,...l,children:c&&!r?u(Vt,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24"}):null})})),Fa=e=>e?.src||e?.icon?e:void 0,Ua=g((({className:e="",media:t,children:n,buttonSize:l})=>p("div",{className:"flex flex-col sm:flex-col-reverse gap-xs",children:[n?u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n}):null,u("div",{className:w("flex gap-xs",e),children:t?.map(((e,t)=>u(La,{buttonSize:l,...e},String(t))))})]}))),Ha=g((({className:e="",description:t,href:n,icon:l,items:a=[],socialMedia:i=[],target:r,title:s,align:o="text-left",...c})=>u(k,{className:w("relative group-data-gray:bg-main-divider/50",e),defaultPadding:"p-6xl",...c,children:p(la,{href:n,target:r,children:[u(Qt,{className:"mb-xs",title:s,description:t,headlineVersion:"S",isPadding:!1,align:o}),a.length?u(oa,{className:"flex flex-col gap-2",items:a,listItemSize:"S"}):null,Ka(l),i.length?u(Ua,{className:"mt-5",media:i}):null]})}))),Ka=e=>e?.src||e?.icon?u("div",{children:u(Vt,{image:e})}):null,Wa=(e=!1)=>e?"p-6xl mt-6":"mt-6 p-6xl",Ga=(e,t)=>{const{title:n,description:l,buttons:a}=e;return p("div",{className:"py-5 border-b border-main-divider",children:[n?u("div",{className:"opacity-80",children:u(de,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?u("div",{className:"mt-1",children:u(de,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?u("div",{className:"text-primary-main",children:wn(a)}):null]},String(t))},Xa=g((({className:e="",title:t,align:n="text-center",icon:l,isHighlighting:a=!1,button:i,cardCells:r=[],...s})=>{const o=r.map(Ga),c=o.slice(0,1),d=o.slice(1);return p(k,{className:w("relative flex flex-col",e),defaultPadding:Wa(a),...s,children:[a?qa():null,Ja(l),t?u(T,{className:w("pt-xs",n),headingType:"h5",title:t}):null,i?u(re,{className:"w-full mt-m",...i}):null,r.length?u(In,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[c,u(Tn,{isUnfolded:e,children:d})]}),renderFoldButton:r.length>1?Ya:null}):null]})})),Ja=e=>u("div",{className:"basis-full self-center",children:e?.src||e?.icon?u(Vt,{image:e}):null}),Ya=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(_e,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),qa=()=>p("div",{className:"absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u(_e,{iconVersion:"black",name:"HeartIcon",width:"23",height:"22"}),u(ce,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:"ХИТ"})]}),Za=(e=!1)=>e?"text-white":"",Qa=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),ei=g((({icon:e,image:t,title:n,subtitle:l,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(Vt,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(Vt,{image:t})}),n?u(T,{headingType:"h4",className:Za(a),title:n}):null,l?u("div",{className:Qa(a),children:l}):null]}))),ti=g((({cell:e,rowHeader:t,isFillGradient:n=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(ni(n,t))})}))),ni=(e,t)=>({label:n,description:l},a)=>p("div",{className:"flex justify-between text-s py-3.5",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[n?u("div",{className:"text-right "+(e?"text-white":""),children:n}):null,l?u("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:l}):null]})]},String(a)),li=g((({header:e,columnData:t,visibleRowLength:n=0,isFillGradient:l,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:n),s=l?"secondary":"primary";return p("div",{className:`border border-gray rounded-md p-m mb-m ${l?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[u(ei,{...e,isFillGradient:l}),r?.length?r.map((({rowHeader:e,cell:t},n)=>u(ti,{cell:t,rowHeader:e,isFillGradient:l},String(n)))):null,a&&e?.link?u(re,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,ai({onToggleColumn:i,isFillGradient:l,showRow:a})]})})),ai=({onToggleColumn:e,isFillGradient:t,showRow:n})=>u("div",{className:"mt-5",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:n?"Скрыть":"Показать описание"})}),ii=g((e=>{const{className:t,title:n}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[n?u(T,{headingType:"h3",className:"font-medium text-center",title:n}):null,u("div",{role:"table",children:u(ri,{...e})})]})})),ri=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:n,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=l(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,n)=>n===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:l},i)=>{return u(li,{visibleRowLength:a,showRow:o[i],header:l,columnData:(r=e,r?.map(((e,n)=>({cell:e,rowHeader:t?.[n]?.title})))),isFillGradient:0===i&&n,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(bn,{onVisibleIndicesChange:m,children:h}):h}));var si;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(si||(si={}));const oi=new Intl.NumberFormat("ru",{style:"currency",currency:si.RUB}),ci=e=>e?oi.format(e):"",di="text-left text-m font-light text-secondary-text",mi=`${di} pl-5xl`,hi={USD:"DollarIcon",EUR:"EuroIcon"},ui=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:di,children:u(de,{size:"text-m",children:"Валюта"})}),u("th",{className:mi,children:u(de,{size:"text-m",children:"Купить"})}),u("th",{className:mi,children:u(de,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(pi)})]}))),pi=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",children:[t?u(Vt,{image:{icon:hi[t]},width:"24",height:"24",className:"mr-2"}):null,u(de,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(de,{size:"text-h6",children:ci(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(de,{size:"text-h6",children:ci(e?.buyExchangeRate)})})]},t)},gi={icon:"GpsIcon"},xi=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Kt,{...gi,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),fi=(e,t,n)=>{const l=Number(bi(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},bi=e=>e.replace(/[^\d.,]/g,"").replace(",","."),yi=e=>{return(t=[[e=>e.value!==si.RUB&&e.oppositeValue!==si.RUB,()=>e.handleConvert(e.value,si.RUB)],[e=>e.value===si.RUB&&e.oppositeValue===si.RUB,()=>e.handleConvert(e.value,si.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,n]=t.find((([t])=>t(e)))||[];return n})(e)?.();var t};function vi(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:l,text:l};return p("div",{className:"relative flex",children:[u(ue,{className:"shrink-0 text-l w-full appearance-none mr-[-90px]",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(Ae,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const Ni=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||si.RUB,selectBuy:n?.[0]?.currency?.currency||si.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[vi({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:wi(r,o,n),value:r.inputSell,setValue:e=>ki(o,n)(e,r.selectSell,r.selectBuy)}),vi({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Si(r,o,t),value:r.inputBuy,setValue:e=>Ci(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(re,{className:"py-4",version:a?.version,...a,children:a.text}):null]})})),wi=(e,t,n)=>l=>{t({selectSell:l}),yi({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{ki(t,n)(e.inputSell,l,a)}})},Si=(e,t,n)=>l=>{t({selectBuy:l}),yi({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>Ci(t,n)(e.inputBuy,l,a)})},ki=(e,t)=>(n,l,a)=>{e({inputSell:bi(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputBuy:String(fi(n,i,l===si.RUB)||"")})},Ci=(e,t)=>(n,l,a)=>{e({inputBuy:bi(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputSell:String(fi(n,i,l===si.RUB)||"")})};const Ii=async e=>{const t=await Ti(),n=t?.code||"000";return{region:t,exchangeRates:await Bi(e,n)}},Ti=async()=>{try{return await E("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},Bi=async(e,t)=>{try{return await E(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},Ri=g((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const{exchangeRates:a}=function(){const{data:e}=j("/api/v1/exchangerates",Ii);return e||{}}(),i=Vi(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:si.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:si.RUB}}),u(k,{className:w("box-border min-h-80",e),...l,children:u(xa,{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:[i?u(ui,{className:"mb-xl",exchangeCurrencyItems:i}):null,u(xi,{address:a?.address})]}),i.length&&r.length&&s.length?u(Ni,{className:"grow",currencyRatesBuy:r,currencyRatesSell:s,button:n}):null]})})})})),Vi=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Mi=e=>St(d.SITEMAP||"sitemap",e),Pi=g((({className:e="",items:t})=>t?.length?u("ul",{className:w("flex flex-col","",e),children:t.map(_i)}):null)),_i=(e,t)=>{const{text:n,...l}=e;return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",...l,children:n||null})},`list_item_${String(t)}`)},zi=g((({className:e="",label:t,icon:n,dataTheme:l="",disabled:a=!1,onClick:i})=>p("button",{className:w("flex justify-center w-full px-0 py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:i,disabled:a,"data-theme":l,children:[u("span",{className:"text-h4 pr-3",children:t}),n?u(Vt,{image:{icon:n,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20"}):null]}))),ji=e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Ai=(e,t)=>u(Kt,{...e,iconBgVersion:t,className:"shrink-0"}),Di=g((({className:e="",label:t="Развернуть",labelIcon:n,labelIconBgVersion:l,isExpanded:a,isFoldButtonOnTop:i=!0,version:r="primary",...s})=>u(k,{className:w("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...s,children:u(In,{isFoldButtonOnTop:i,unfoldedByDefault:a,renderFoldableSection:({isUnfolded:e})=>u(Tn,{className:w("gap-5","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:Ll({...s,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:a})=>Ei({version:r,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:e,onToggle:a})})})));Di.childrenTypes={exclude:["RollupItem"]};const Ei=({version:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть");return"primary"===e?$i({label:r,labelIcon:n,labelIconBgVersion:l,icon:ji(a),onToggle:i}):u(zi,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},$i=({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>p("button",{className:w("border-none bg-transparent flex justify-between items-center w-full group/button",a?.icon?"py-xs":"py-lg"),onClick:l,children:[p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Ai(a,t),e?u(de,{size:"text-h6",font:"font-normal",children:e}):null]}),n?u(_e,{name:n,iconVersion:"black",width:"24",height:"24"}):null]}),Oi=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(Li):null,u(re,{version:"primary",className:"w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),Li=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(de,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(Fi)})]},String(t)),Fi=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:Ui(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),Ui=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Hi(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},Hi=e=>e.replaceAll(/\D/g,""),Ki=g((({className:e="",index:t,text:n,...l})=>{const a=J(),{href:i,target:r,onClick:s}=a(l);return u("a",{className:w("",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),Wi=g((({title:e,links:t,className:n=""})=>p("div",{className:n,children:[u(de,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg mt-lg",children:t.map(((e,t)=>u(Ki,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),Gi=g((({className:e="",index:t,...n})=>{const l=J({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=l(n);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}`})})),Xi=g((({className:e="",links:t})=>p("div",{className:e,children:[u("div",{className:"pt-lg",children:u(de,{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 sm:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(Gi,{index:t,...e},String(t))))}):null]}))),Ji=g((({className:e,...t})=>{const n=t.options?.page?.fallback,{topItems:l}=Mi(n),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:o,documents:c}=St(d.FOOTER||"footer",n);return p(k,{tag:"footer",className:e,...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:l?.map(((e,t)=>u(Di,{label:e?.text,labelIcon:e?.icon,children:u(Pi,{items:e.items})},String(t))))}),u(Oi,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(Ua,{className:"mb-xl",media:r,buttonSize:"stretched",children:"Соцсети"}),u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"}),u("div",{className:"mt-xs",children:s?.map(Yi)})]}),u(Wi,{className:"py-lg border-y border-main-divider",title:o,links:a}),u(Xi,{links:c})]})})),Yi=({href:e="/"},t)=>{const{label:n}=Oa(e);return u(re,{className:"w-full mb-lg",text:n,version:"secondary",href:e,target:"_blank"},String(t))},qi={"bg-white":"color",transparent:"white"},Zi={"bg-white":"text-primary-main",transparent:"text-white"},Qi=(e,t,n)=>u(Vt,t?.src?{image:t,className:Zi[e],width:n?.width,height:n?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:qi[e]},className:Zi[e],width:n?.width,height:n?.height}),er={"bg-white":"text-primary-text",transparent:"text-white"},tr=(e,t,n)=>u("span",{className:`${er[t]} ml-s font-medium ${n||""}`,children:e||"Россельхозбанк"}),nr=g((({bgColor:e="bg-white",children:t,className:n="",href:l,logo:a,showTitle:i=!0,targetBlank:r})=>p("a",{className:`inline-flex items-center font-sans no-underline ${n}`,href:l||"https://rshb.ru/",target:r?"_blank":"_self","aria-label":a?.title||"Россельхозбанк",children:[Qi(e,a?.image,{width:"34",height:"34"}),i?tr(t||a?.title,e,"text-s"):null]}))),lr={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},ar=g((({bgColor:e,logo:t,internetBankUrl:n,version:l})=>{const a=X(),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(nr,{className:"mt-2xs",bgColor:e,logo:t}):ir(s),n?u(re,{href:n,ariaLabel:"Войти",target:"_blank",className:w("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",lr["transparent"===l?"transparent":"default"]),children:"Войти"}):null]})})),ir=e=>p("button",{className:"flex items-center text-l mt-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(Vt,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]}),rr={"bg-white":"primary",transparent:"transparent"},sr=g((({bgColor:e="bg-white",version:t=rr[e],...n})=>{const{logo:l,internetBankUrl:a}=Mi(n.options?.page?.fallback);return u(k,{tag:"header",defaultPadding:"",version:t,...n,children:u("div",{className:"container px-5 py-2xs box-border",children:u(ar,{bgColor:e,logo:l,internetBankUrl:a,version:t,...n})})})})),or={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},cr=g((({className:e="",gap:t="",isPadding:n=!1,isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,...r})=>u(k,{className:w("relative flex flex-col",or[t],e),defaultPadding:n?"p-6xl":"",version:a,isTheme:i,...r,children:Ll({...r,extraProps:{className:"w-full",padding:l?"":"p-0"}})})));cr.childrenTypes=[];const dr=g((e=>u(cr,{...e})));dr.childrenTypes=[];const mr=g((e=>{const{className:t,image:n,...l}=e;return u(k,{className:t,defaultPadding:"p-0",...l,children:u(Vt,{image:n})})})),hr=["байт","Кб","Мб","Гб","Тб","Пб"],ur=g((({icon:e,text:t,fileSize:n,...l})=>p("a",{className:"flex box-border gap-3 group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",...l,children:[e,t?p(de,{size:"text-l",font:"font-light",children:[t,u(de,{color:"text-secondary-text",children:l?.href&&pr(gr(l.href),n)})]}):null]}))),pr=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),gr=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},xr={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},fr=g((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=X();return p(k,{className:e,defaultPadding:"p-6xl",...s,children:[u(Qt,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isPadding:!1}),a?.length?u("div",{className:w("mt-5 sm:mt-8 flex flex-col gap-6",xr[r]),role:"list",children:a.map(br(o,r,i))}):null]})})),br=(e,t,n)=>(l,a)=>{const i="Attachment"===l?.docType?K(e)(l?.attachment?.src):l?.href,r="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${hr[n]}`})(l?.attachment?.fileSize||0):l?.fileSize;return u("div",{className:"double"===t?"basis-[calc(50%-20px)]":"",role:"listitem",children:u(ur,{text:l?.text,target:l?.target,href:i,fileSize:r,icon:n?u(Vt,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:n,width:"24",height:"24"}):null})},String(a))},yr={left:"text-left",center:"text-center",right:"text-right"},vr=e=>e?u("div",{className:"mb-lg pt-3xs",children:u(de,{size:"text-xl","font-weight":"light",children:e})}):null,Nr=e=>e?.length?u(oa,{items:e,className:"text-l font-light mb-xs last:mb-0"}):u("span",{className:"text-m font-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),wr=g((({className:e,padding:t,alignTitle:n="left",buttons:l=[],description:a,headingType:i="h4",image:r,items:s,qr:o,title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24";return u(k,{className:w("min-h-80",e),padding:"p-0",version:d,...m,children:p(xa,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:c?u(T,{headingType:i,title:c,className:w("whitespace-pre-wrap",yr[n])}):null,rightImage:r?.src?u(Vt,{className:"hidden lg:block",image:r}):null,buttons:wn(l,{isVertical:l.length>4}),children:[vr(a),p("div",{className:"flex flex-1 flex-wrap gap-m items-center",children:[o?.src?u("div",{className:w("flex justify-center bg-white rounded-md",h),children:u(Vt,{className:"w-fit",image:o})}):null,Nr(s),r?.src?u(Vt,{className:"lg:hidden",image:r}):null]})]})})})),Sr=(e,t)=>e||t?p("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:[Number(e)>0?kr("Страховая сумма:",e):null,Number(t)>0?kr("Ежемесячный лимит:",t):null]}):null,kr=(e,t=0)=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre",children:[u(de,{font:"font-light",size:"text-l",children:e}),p(de,{size:"text-h6",color:"text-primary-text",children:[rt(2)(t)," ₽"]})]}),Cr=g((({className:e,padding:t,headlineVersion:n="M",align:l="text-center",sum:a,monthLimit:i,imageOptions:r,...s})=>u(k,{className:e,padding:"p-0",...s,children:u(za,{className:"h-full",defaultPadding:"p-6xl",padding:t,headlineVersion:n,align:l,isInsetTitle:!1,imageOptions:{directionRight:!1,imageAlign:"center",...r},...s,children:Sr(Number(a),Number(i))})}))),Ir=g((({className:e,title:t,description:n="Блок в разработке...",...l})=>p(k,{className:w("box-border",e),...l,children:[u(Qt,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isPadding:!1}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:Tr()})]}))),Tr=(e=3)=>Rr(100,e).map((e=>Math.floor(e))).map(Br),Br=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),Rr=(e,t)=>[e].concat(t>0?Rr(e/1.618,t-1):[]);function Vr({text:e,href:t,target:n,icon:l},a){const i="primary"===a?"white":"black",r={text:e,href:t,target:n,ariaLabel:e};return p("div",{className:"flex items-center gap-3",children:[u(re,{className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:a,rounded:!0,...r,children:u(Vt,{className:"w-4 h-4",image:{...l,icon:l?.icon||"ArrowLeftIcon",iconVersion:l?.iconVersion||i}})}),u(re,{version:"link",...r})]})}const Mr=g((({className:e,padding:t,backwardButton:n,...l})=>p(k,{className:w("overflow-hidden flex flex-col gap-3xl box-border",e),defaultPadding:"p-6xl",padding:t,...l,children:[n?.text?Vr(n,l.version&&"primary"!==l.version?"white":"primary"):null,u(za,{className:"grow h-full",...l})]}))),Pr=g((({className:e,padding:t,slides:n=[],...l})=>u(k,{className:w("overflow-hidden relative",e),padding:t,...l,children:u(bn,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",role:"listitem",children:u(za,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),_r=g((({className:e,padding:t,headlineVersion:n="S",isTabularBenefits:l=!0,additionalDescription:a,imageOptions:i,...r})=>u(k,{className:e,padding:"p-0",...r,children:u(za,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:n,isTabularBenefits:l,imageOptions:{isBackground:!0,...i},...r,children:a?u(ce,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:a}):null})}))),zr=g((e=>{const{__html:t,richVersion:n,...l}=e;return u(k,{defaultPadding:"p-0",...l,children:u(va,{__html:t,richVersion:n})})})),jr=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function Ar(e,t,n){t.geoObjects.removeAll();const l=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:l,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=n.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(n)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Dr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},Er=e=>u("a",{className:`select-none cursor-pointer px-9 h-12 bg-primary-main text-white ${Object.values(Dr).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),$r={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},Or=(e,t,n)=>p("div",{className:`${Object.values($r).join(" ")} bg-white py-s pl-5xl pr-m w-full`,children:[u(_e,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const l=t.target?.value?t.target?.value.toLowerCase():"";if(l){const t=e.filter((e=>e.text.toLowerCase().indexOf(l)>-1?e:null));n(t)}else n(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),Lr={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"},Fr=(e,t,n)=>u("div",{className:`select-none cursor-pointer py-4 w-12 bg-white ${Object.values(Lr).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(_e,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Ur=e=>globalThis[e];const Hr=()=>function(e,t){const[n,r]=l(),s=i((()=>r(Ur(e))),[e]);return a((()=>{const n=document.getElementById(t);if(!n){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(!Ur(e))return n.addEventListener("load",s),()=>{n.removeEventListener("load",s)};s()}),[e,t]),n}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),Kr={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"},Wr=g((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(Kr).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(_e,{name:n,width:"20",height:"16"})})})),Gr={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"},Xr=g((({points:e,className:t="",zoom:n=5,showSearchField:i=!1})=>{const r=s(null),o=Hr(),[c,d]=l(),[m,h]=l(Zr(jr)),g=Jr(e);if(a((()=>{r?.current||o?.ready((()=>{r.current=new o.Map("map",{center:g,zoom:n,controls:[],suppressMapOpenBlock:!0}),Ar(o,r.current,m)}))}),[o,r,m]),a((()=>{if(r.current&&m&&o){const e=m.length<1?Zr(jr):m;Ar(o,r.current,e)}}),[r,m,o]),!o)return null;const x=c?"z-[100000]":"z-10";return p("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-1/2 ${x}`,children:i?Or(jr,0,(e=>{if(e){const t=Zr(e);h(t)}})):Er(g)}),u("div",{className:`${Object.values(Gr).join(" ")} ${x} right-2 top-4 bg-white`,onClick:()=>{const e=r.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:u(_e,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${x}`,children:[u(Wr,{yandexMaps:r}),u(Wr,{yandexMaps:r,direction:"out"})]}),Fr(r.current,o,`right-2 top-80 ${x}`)]})})),Jr=e=>[qr(Yr(e,0)),qr(Yr(e,1))],Yr=(e,t)=>e.map((e=>e[t])),qr=e=>e.reduce(((e,t)=>e+t))/e.length,Zr=e=>e?e.map((e=>e.coords)):null,Qr=g((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),o=s.find((e=>e.key===l));return u(Ae,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:o})})),es=g((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Qr,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(Qr,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),ts=g((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex 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:n,name:e,checked:l,onChange:e=>a(e.target.value)}),t?u("span",{className:"text-primary-text ml-3 cursor-pointer",children:t}):null]})}))),ns=g((({className:e})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return p("div",{className:w("order-4",e),children:[u(ts,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(ts,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),ls=["От 1 дня","До 365 дней"],as=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(de,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(mt,{min:1,max:365,value:e,items:ls,onChange:t})]}))),is=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col sm:flex-row gap-4 order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Qr,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(Qr,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),rs=g((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents sm:block flex-1 space-y-xl",children:[u(es,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:ss(c)}),u(as,{days:a,setDays:e=>c({days:e})}),u(is,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:os(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents sm:flex justify-between items-center",children:[u(ns,{className:"mb-4 sm:mb-0"}),u(re,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),ss=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},os=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},cs=g((({days:e,tariffs:t=[]})=>{const n=ms(e,t),l="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents sm:flex flex-col justify-between order-2",children:[p("div",{className:"flex flex-col sm:flex-row gap-x-11 gap-y-7 order-5 sm:order-none py-7 sm:py-0 border-t border-main-divider sm:border-none",children:[ds("Аренда за",e),ds("Цена",n+" ₽")]}),u("span",{className:"sm:hidden order-3 mb-2 text-s-light text-secondary-text",children:l}),p("div",{className:"flex flex-col items-center gap-3 order-3 sm:order-none mb-6 sm:mb-0 bg-primary-main py-3 sm:p-8 text-center",children:[u(Vt,{image:{icon:"PackA4Icon"},className:"sm:h-[246px]"}),u("span",{className:"hidden sm:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:l})]})]})})),ds=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-1 sm:flex-col sm:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l sm:text-h3 text-primary-text",children:t})]}),ms=(e,t)=>{const n=hs(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},hs=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},us=(e,t)=>e.find((e=>e.branchCode===t)),ps=g((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=us(l,n.selectedBranch),o=gs(s?.safeBoxCaseVolumes),c=xs(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,d=fs(c,n.selectedBoxSize);return p("div",{className:"flex flex-col sm:flex-row gap-x-9 align-top mb-6",children:[u(rs,{...n,regions:t,onClick:r,branches:l,caseVolumes:o,safeBoxCases:c,onChange:i}),u(cs,{days:n.days,tariffs:d})]})})),gs=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],xs=(e,t)=>e?.find((e=>e.volume===t)),fs=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,bs=[];const ys=async e=>await D(e,{method:"GET"})||bs,vs=g((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),o=i((()=>s((e=>!e))),[]),[c,d]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=O(),h=Ns(c.selectedRegion,m),g=function(e){const{data:t}=j(e?`/api/v1/safeboxes?regionCode=${e}`:null,ys);return t||bs}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=us(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:n,defaultPadding:"",...a,children:[p("div",{className:"p-4xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(ps,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(ce,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(Xr,{points:f,className:"h-[640px]"}):null]})})),Ns=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function ws(e){throw new Error(e)}const Ss=e=>Boolean(e?.icon||e?.src),ks={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Cs={normal:"",small:"min-h-6xl"},Is={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"},Ts=g((({className:e="",title:t,description:n,steps:l,buttons:a,size:i="normal",version:r="primary",...s})=>p(k,{className:w("box-border flex flex-col gap-xs",e),defaultPadding:"p-6xl",version:r,...s,children:[t?u(T,{headingType:"h3",className:"text-left",title:t}):null,n?u(ce,{size:"text-xl",font:"font-light",children:u("span",{className:Is.description,children:n})}):null,l?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col justify-between",children:l.map(Bs(i,r))})}):null,wn(a,{className:"mt-3",isVertical:!0})]}))),Bs=(e,t)=>(n,l)=>{const{type:a}=n;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Rs(e,t)(n,l);case"rte":return u(va,{__html:n.__html});default:ws(n)}},Rs=(e,t)=>(n,l)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative py-3",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Vs(e,t)(n,l)}),p("div",{className:w("flex flex-col justify-center h-fit",Cs[e]),children:[n.label?u("div",{className:"text-l m-0 text-left",children:n.label}):null,n.description?u("div",{className:w("text-s font-light text-left",Is.description),children:n.description}):null]})]})},String(l)),Vs=(e,t)=>(n,l)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",r=Boolean(n?.icon?.src),s=ks[e][r?"image":"icon"];return u("div",{className:w(s,r?"":`rounded-md ${Is.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex self-center text-h4 text-secondary-text group-data-secondary:text-white",children:Ss(n?.icon)?u(Vt,{image:{...n.icon,iconVersion:n.icon?.iconVersion||i},width:a,height:a}):u("span",{children:l+1})})})},Ms={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Ps={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},_s={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},zs={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},js=g((({tag:e="div",item:t={},isActive:n,type:l="default",onClick:a})=>{const i=e,{text:r,...s}=t;return u(i,{className:w("h-12","block flex-1","cursor-pointer",Ms[l],n?zs[l]:_s[l]),role:"tab","aria-selected":n,onClick:a,...s,children:u("div",{className:w("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Ps[l]:"text-secondary-text hover:text-primary-main"),children:u(de,{size:"text-m",children:r})})})})),As=g((e=>u(e?.item?.href?Ds:Es,{...e}))),Ds=g((e=>{const t=J(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return u(js,{...e,tag:"a",item:a,onClick:l})})),Es=g((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return u(js,{item:e,onClick:l,...n})})),$s=(e,t,n)=>(l,a)=>u(As,{isActive:l===e,onClick:t,type:n,item:l},String(a)),Os="hidden sm:flex absolute z-40 top-0",Ls=g((({className:e,items:t=[],value:n,onChange:l,tabsType:a})=>{const[i,r]=fn({itemCount:t?.length||0});return p("div",{className:w("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(ln,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map($s(n,l,a))}),r.canScrollLeft?u(Ul,{className:w("left-6",Os),onClick:r.scrollLeft}):null,r.canScrollRight?u(Hl,{className:w("right-6",Os),onClick:r.scrollRight}):null]})})),Fs=g((({className:e,tabsType:t="default",items:n=[],value:l,onChange:a})=>u("div",{className:w("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:n.map($s(l,a,t))}))),Us=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(Fs,{...t});case"centered":return u("div",{className:"flex",children:u(Fs,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Ls,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Hs=g((({className:e="",isSticky:t,tabs:n=[],tabsMode:s,...o})=>{const c=r((()=>n.map(Ws)),[n]),[d,m]=l(0);a((()=>{n&&n[0]&&Ks(n[0])}),[]),a((()=>{const e=n[d];"group"===e?.type&&b.subject("tab",{type:e.type,label:e.ref})}),[n,d]);const h=i((e=>{const t=c.indexOf(e);m(t),Ks(n[t])}),[n,c]);return u(k,{className:w(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:Us({items:c,value:c[d],tabsMode:s,onChange:h})})})),Ks=e=>{"group"===e.type&&b.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&b.fire("tab",{type:e.type,label:e.href})},Ws=e=>"group"===e?.type?{text:e.title}:e,Gs={Buttons:({buttons:e})=>wn(e,{className:"mt-3",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(Vt,{image:e,className:"m-0",imageClassName:"m-0"}):null,List:({isDotted:e,...t})=>u(oa,{className:"flex flex-col justify-between items-start text-m pl-2 text-base",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"mb-xs",children:e}):null,t?u("div",{className:"text-s text-secondary-text",children:t}):null]})},Xs=g((({title:e,icon:t})=>p("div",{className:"mb-xs",children:[e?u(de,{size:"text-l",font:"font-light",children:e}):null,t?u(Vt,{className:"ml-auto min-w-6",image:t,width:"24",height:"24"}):null]}))),Js=g((({tile:e,...t})=>p("div",{className:"h-full",children:[u(Xs,{title:e?.header?.title}),e?.data?.length?e.data.map(((e,n)=>u("div",{className:"mb-xs",children:Ys(e,t)},String(n)))):null]})));function Ys(e,t){if(!e||!e.tableCellType||!(e.tableCellType in Gs))return null;const n=Gs[e.tableCellType];return u(n,{displayTable:()=>null,isVisible:!0,...e,...t})}const qs=g((({tiles:e,...t})=>e?.length?u(bn,{...t,padding:void 0,children:e.map(((e,n)=>u(Js,{tile:e,...t},String(n))))}):null)),Zs=g((({tiles:e,...t})=>e?.length?u("div",{className:"flex flex-col gap-3.5",children:e.map(((e,n)=>u(Js,{tile:e,...t},String(n))))}):null)),Qs=g((({className:e,title:t,description:n,tariffsColumns:l,rowHeaders:a,orientation:i="vertical",...r})=>{const s=eo(l),o=to(a,s);return p("section",{className:`p-6xl space-3xl bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[u(Qt,{title:t,description:n,headlineVersion:"M",align:"text-left",isPadding:!1}),u("vertical"===i?Zs:qs,{tiles:o,...r})]})})),eo=e=>e?.[0]?.data?e[0].data:[],to=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),no=g((({className:e="",title:t,description:n,iconVersion:l,image:a,__html:i,items:r=[],...s})=>p(k,{className:w("flex gap-3 sm:gap-4 bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===l?u("div",{className:"mt-1",children:lo()}):null,"big"===l?ao(a):null,p("div",{className:"flex flex-col w-fit gap-1 sm:gap-2",children:[t?u(de,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?io(n):null,r?.length?ro(r,!0):null,i?u(va,{__html:i}):null]})]}))),lo=()=>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"}),ao=e=>e?.src?u(Vt,{className:"h-fit flex-shrink-0",image:e}):null,io=e=>u(ce,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),ro=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-6":""),children:e.map(((e,t)=>u("li",{children:u(de,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),so=g((({className:e,padding:t,headlineVersion:n="S",listItemSize:l="M",...a})=>u(k,{className:e,padding:"p-0",...a,children:u(za,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:n,listItemSize:l,...a})}))),oo={ApplicationForm:Ft,BenefitsBlock:Wt,BonusBenefitsBlock:Nn,ButtonsBlock:Cn,Calculator:Il,CardTransfer:jl,Carousel:Jl,CarouselBankHistoryCard:Yl,CarouselCard:Ql,CarouselCatalogCard:ta,CarouselProductCard:ca,CarouselProgramsCard:Aa,CarouselRecommendationCard:Ha,CarouselTariffsCard:Xa,ComparisonTable:ii,ExchangeRateTile:Ri,Footer:Ji,Header:sr,Headline:Qt,HorizontalLayout:dr,ImgBlock:mr,LinkDocs:fr,MobileAppTile:wr,PictureText:Cr,Placeholder:Ir,ProductBlock:Mr,ProductGallery:Pr,ProductTile:_r,RichTextBlock:zr,RollupItem:Di,SafeDepositRental:vs,StepsBlock:Ts,Tabs:Hs,TariffsTable:Qs,TextBlock:no,Tile:so,VerticalLayout:cr};const co=["Header","Footer"],mo=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function ho(e=globalThis){const t=s(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:n})=>{t.current&&t.current.set(e,n)}))),[]),a((()=>{const n=((e,t=600)=>{let n;const l=(...a)=>{l.dispose(),n=setTimeout((()=>{e(...a)}),t)};return l.dispose=()=>{n&&clearTimeout(n)},l})((()=>{!function(e){const t=`#${n=e?.anchor,n?.replace("#","")||""}`;var n;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!co.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[n]=t.length>0?un(mo)(t):[];return n}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",n),()=>{n.dispose(),e.removeEventListener("scroll",n)}}),[e])}const uo=g((({className:e,onClose:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-1 bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(Vt,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),po="cookie",go=g((({termLink:e,personalDataPolicyLink:t})=>{const[n,{setTrue:l,setFalse:r}]=Me();((e,t,n=300)=>{a((()=>{const t=setTimeout(e,n);return()=>{clearTimeout(t)}}),t)})((()=>{globalThis.localStorage?.getItem(po)||l()}),[],3e3);const s=i((()=>{globalThis.localStorage?.setItem(po,"true"),r()}),[]);return n?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-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u("div",{className:"sm:flex-1",children:p(ce,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(la,{isRemote:!0,className:xo(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(la,{isRemote:!0,className:xo(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(uo,{className:"bg-main-gray rounded-md",onClose:s})})]})}):null})),xo=e=>w("inline mx-1",e?"text-green-dark":"");const fo=g((()=>{const[e,{push:t,pop:n,clear:r}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}(),s=i((()=>{for(const t of e)t.onClose&&t.onClose();r()}),[e]),o=i((()=>{const t=e[e.length-1];t?.onClose&&t.onClose(),n()}),[e]);return a((()=>b.subscribe("dialog",(e=>{switch(e.type){case"open":t(e);break;case"close":e.all?s():o();break;default:ws(e)}}))),[s,o]),a((()=>{const e=({key:e})=>{"Escape"===e&&o()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[o]),a((()=>{e.length?globalThis.document?.body.classList.add("no-scrollbar"):globalThis.document?.body.classList.remove("no-scrollbar")}),[e]),e.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:e.map((({dialog:t,id:n},l)=>u("div",{className:w("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",l===e.length-1?"":"hidden"),children:t},String(n||l))))}):null})),bo=h();const yo=g((({className:e,onClick:t,ariaLabel:n})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:vo()}))),vo=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"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"}),u("path",{...e,d:"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"})]})},No=g((({className:e=""})=>{const t=function(e){const[t,n]=l(0);return a((()=>{(async()=>{const[t]=await bo.getLikeCount(e);n(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{n(await bo.like(e))}),[e]),dislike:i((async()=>{n(await bo.dislike(e))}),[e])}}(X().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e}`,children:[u(yo,{onClick:G(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(yo,{onClick:G(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),wo=g((({className:e,blocksRegistry:t,blockDecorator:n,data:l={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=l,o={key:"",page:l,blocksRegistry:t,blockDecorator:n,parent:l};return ho(),p("div",{children:[p("section",{className:w("relative @container",a,e),"data-theme":s,children:[i?.header?u("div",{className:"relative z-10 mb-5 shadow-[0_8px_32px_0px_#00000014]",children:Ol(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container @lg:grid @lg:grid-cols-12 @lg:gap-1",children:[Ll({block:l,options:o,extraProps:{className:"scroll-mt-12"}}),Ol(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(No,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(fo,{}),u(go,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));wo.childrenTypes=[],wo.slots=()=>["header","footer"];e.Blocks=oo,e.ContentPage=wo,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))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=G,e.joinList=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),e.packageVersion="0.13.2",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=H,e.useRouter=X,Object.defineProperty(e,"__esModule",{value:!0})}));
|