@redneckz/wildless-cms-uni-blocks 0.14.430 → 0.14.432

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +117 -35
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  5. package/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  6. package/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  7. package/bundle/ui-kit/Calculator/renderRate.d.ts +3 -1
  8. package/dist/components/CalculatorDeposit/CalculatorDeposit.js +31 -26
  9. package/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  10. package/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  11. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  12. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
  13. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  14. package/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  15. package/dist/components/CalculatorDeposit/renderDepositParamsForm.js +45 -0
  16. package/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
  17. package/dist/components/CalculatorDeposit/renderDepositResult.js +1 -1
  18. package/dist/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
  19. package/dist/components/Header/DropdownMenu.js +26 -2
  20. package/dist/components/Header/DropdownMenu.js.map +1 -1
  21. package/dist/ui-kit/Calculator/CalculatorStyle.js +3 -3
  22. package/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  23. package/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
  24. package/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  25. package/dist/ui-kit/Calculator/renderRate.d.ts +3 -1
  26. package/dist/ui-kit/Calculator/renderRate.js +1 -1
  27. package/dist/ui-kit/Calculator/renderRate.js.map +1 -1
  28. package/lib/common.css +1 -1
  29. package/lib/components/CalculatorDeposit/CalculatorDeposit.fixture.d.ts +1 -0
  30. package/lib/components/CalculatorDeposit/CalculatorDeposit.js +30 -25
  31. package/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  32. package/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  33. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  34. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
  35. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  36. package/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +4 -0
  37. package/lib/components/CalculatorDeposit/renderDepositParamsForm.js +42 -0
  38. package/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
  39. package/lib/components/CalculatorDeposit/renderDepositResult.js +1 -1
  40. package/lib/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
  41. package/lib/components/Header/DropdownMenu.js +26 -2
  42. package/lib/components/Header/DropdownMenu.js.map +1 -1
  43. package/lib/ui-kit/Calculator/CalculatorStyle.js +3 -3
  44. package/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  45. package/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
  46. package/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  47. package/lib/ui-kit/Calculator/renderRate.d.ts +3 -1
  48. package/lib/ui-kit/Calculator/renderRate.js +1 -1
  49. package/lib/ui-kit/Calculator/renderRate.js.map +1 -1
  50. package/mobile/bundle/bundle.umd.js +93 -33
  51. package/mobile/bundle/bundle.umd.min.js +1 -1
  52. package/mobile/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  53. package/mobile/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  54. package/mobile/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  55. package/mobile/bundle/ui-kit/Calculator/renderRate.d.ts +3 -1
  56. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js +31 -26
  57. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  58. package/mobile/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  59. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  60. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
  61. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  62. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  63. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js +45 -0
  64. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
  65. package/mobile/dist/components/CalculatorDeposit/renderDepositResult.js +1 -1
  66. package/mobile/dist/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
  67. package/mobile/dist/components/Header/DropdownMenu.js +26 -2
  68. package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
  69. package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js +3 -3
  70. package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  71. package/mobile/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
  72. package/mobile/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  73. package/mobile/dist/ui-kit/Calculator/renderRate.d.ts +3 -1
  74. package/mobile/dist/ui-kit/Calculator/renderRate.js +1 -1
  75. package/mobile/dist/ui-kit/Calculator/renderRate.js.map +1 -1
  76. package/mobile/lib/common.css +1 -1
  77. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js +30 -25
  78. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  79. package/mobile/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  80. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  81. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
  82. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  83. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  84. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js +42 -0
  85. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
  86. package/mobile/lib/components/CalculatorDeposit/renderDepositResult.js +1 -1
  87. package/mobile/lib/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
  88. package/mobile/lib/components/Header/DropdownMenu.js +26 -2
  89. package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
  90. package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js +3 -3
  91. package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  92. package/mobile/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
  93. package/mobile/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  94. package/mobile/lib/ui-kit/Calculator/renderRate.d.ts +3 -1
  95. package/mobile/lib/ui-kit/Calculator/renderRate.js +1 -1
  96. package/mobile/lib/ui-kit/Calculator/renderRate.js.map +1 -1
  97. package/mobile/src/components/CalculatorDeposit/CalculatorDeposit.tsx +45 -41
  98. package/mobile/src/components/CalculatorDeposit/CalculatorDepositContent.ts +10 -0
  99. package/mobile/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +23 -0
  100. package/mobile/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +59 -0
  101. package/mobile/src/components/CalculatorDeposit/renderDepositResult.tsx +1 -1
  102. package/mobile/src/components/Header/DropdownMenu.tsx +34 -2
  103. package/mobile/src/ui-kit/Calculator/CalculatorStyle.tsx +3 -3
  104. package/mobile/src/ui-kit/Calculator/renderBinaryRadioButtonGroup.tsx +2 -3
  105. package/mobile/src/ui-kit/Calculator/renderRate.tsx +5 -1
  106. package/package.json +1 -1
  107. package/src/components/CalculatorDeposit/CalculatorDeposit.fixture.tsx +20 -0
  108. package/src/components/CalculatorDeposit/CalculatorDeposit.tsx +45 -41
  109. package/src/components/CalculatorDeposit/CalculatorDepositContent.ts +10 -0
  110. package/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +23 -0
  111. package/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +59 -0
  112. package/src/components/CalculatorDeposit/renderDepositResult.tsx +1 -1
  113. package/src/components/Header/DropdownMenu.tsx +34 -2
  114. package/src/ui-kit/Calculator/CalculatorStyle.tsx +3 -3
  115. package/src/ui-kit/Calculator/renderBinaryRadioButtonGroup.tsx +2 -3
  116. package/src/ui-kit/Calculator/renderRate.tsx +5 -1
  117. package/tailwind.config.cjs +1 -1
  118. package/bundle/ui-kit/Breadcrumb.d.ts +0 -6
  119. package/dist/ui-kit/Breadcrumb.d.ts +0 -6
  120. package/dist/ui-kit/Breadcrumb.js +0 -11
  121. package/dist/ui-kit/Breadcrumb.js.map +0 -1
  122. package/lib/ui-kit/Breadcrumb.d.ts +0 -6
  123. package/lib/ui-kit/Breadcrumb.js +0 -9
  124. package/lib/ui-kit/Breadcrumb.js.map +0 -1
  125. package/mobile/bundle/ui-kit/Breadcrumb.d.ts +0 -6
  126. package/mobile/dist/ui-kit/Breadcrumb.d.ts +0 -6
  127. package/mobile/dist/ui-kit/Breadcrumb.js +0 -11
  128. package/mobile/dist/ui-kit/Breadcrumb.js.map +0 -1
  129. package/mobile/lib/ui-kit/Breadcrumb.d.ts +0 -6
  130. package/mobile/lib/ui-kit/Breadcrumb.js +0 -9
  131. package/mobile/lib/ui-kit/Breadcrumb.js.map +0 -1
  132. package/mobile/src/ui-kit/Breadcrumb.tsx +0 -21
  133. package/src/ui-kit/Breadcrumb.tsx +0 -21
@@ -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).UniBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),r=l("useCallback"),i=l("useMemo"),s=l("useRef");const o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,l){const{children:n,...a}=t||{},r=l?.slots?.default,i=n||r&&r();return e(Object.assign(a,i&&{children:i}),l)}return t.inheritAttrs=!1,t};const h=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}};function u(){return u._impl()}u._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),u.setup=e=>{u._impl=e};const p=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),g={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},x=d((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:i,block:s,tag:c="section",role:d,children:m,style:x})=>{const f=c,b=u(),[y,v]=n(!1);a((()=>h.subscribe("tab",(e=>{"group"!==e.type||e.groupName&&e.groupName!==s?.labelGroup||v(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s,b]);const N=t&&l;return o(f,{className:p("@container font-sans",N?"group":"",g[t],y?"hidden":"",i||r,e),...N?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:d,style:x,children:m})})),f=d((({className:e,size:t})=>o("figure",{className:p("m-0 mt-xl min-w-[80%]",e),children:b(t)}))),b=(e=3)=>v(100,e).map((e=>Math.floor(e))).map(y),y=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),v=(e,t)=>[e].concat(t>0?v(e/1.618,t-1):[]),N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>o(l,{role:"heading",className:p("font-sans m-0",N[t],e),children:n||a}))),k=d((({children:e,...t})=>o("p",{className:p("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:r="text-center",as:i,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=S[l],u={marginTop:h.descriptionStyle};return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[n?o(w,{className:p("whitespace-pre-wrap",r),...h?.title,as:i||h?.title.as,title:n}):null,a?o(k,{size:h.descriptionSize,font:h.descriptionWeight,align:r,...u,children:a}):null]})})),T=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),I=[];function B(e,t,{className:l,...n}={}){const{key:a,blockDecorator:r=T,blocksRegistry:i={},ancestors:s=I}=t,{type:c}=e;c&&c in i||console.warn(`No block with "${c}" is registered`);const d=c&&i[c];return r({blockClassName:p(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:r})=>{const{content:i}=l;return d?o(d,{className:r,block:e,options:t,...i,...n},a):null}},a)}const M=[],P=(e,{key:t,ancestors:l=M,slotName:n=null,extraProps:a,renderProps:r=B,...i})=>{const s=a?(e,t)=>B(e,t,a):r;return(e||[]).map(((e,a)=>s(e,{...i,key:`${t||e.type}-${a}`,ancestors:i.parent?[...l||M,[i.parent,n]]:l},a)))};function R({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?P(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const V=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return V.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(l):l}}),D=e=>Boolean(e?.includes(":")),A=(e,t)=>Boolean(e&&!D(e)&&(!t||"_self"===t)),j=e=>Boolean(e?.startsWith("#")),$=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),_=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),L=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var O=Object.freeze({__proto__:null,isURL:D,isLocalURL:A,isHash:j,withoutQuery:$,joinPath:_,hasPrefix:L});const E="/api/",F=`${E}v1/storage`,U=e=>(t,l)=>{if([!t,D(t),j(t),[z.CDN,E].some((e=>L(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${F}/${t}/attachment`;const n=t?.startsWith("/");return _(L(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},H={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},W=d((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:r="color",width:i,height:s})=>{const d=u(),m="normal"===r?`${l}.svg`:`sprites.svg#${l}`,h=U(d)(_(z.CDN,"/icons/",m));return"normal"===r?o("img",{className:e,src:h,alt:n,title:a,"aria-hidden":"true",width:i,height:s,style:q(e,s)}):o(X,{className:e,children:c("svg",{className:p(K(i),H[r],"white"===r?"invert":"",t),width:i,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,n?o("desc",{children:n}):null,o("use",{href:h,xlinkHref:h})]})})})),q=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},K=e=>e?"":"w-full h-full",X=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Y=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function G(e=""){try{const[,t]=new URL(e).pathname.split("/");return`/${t}`}catch(e){return""}}const Q=e=>t=>{const l=t?.startsWith("/wcms-resources")?"":G(Y.SITE_URL);return t&&!D(t)?U(e)(t,l):t},J=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Z=d((({className:e="",image:t,imageClassName:l=""})=>{const n=u();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(J).map((({src:e,format:l,media:a},r)=>o("source",{srcSet:Q(n)(e),type:te(l),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?ee({...t,src:Q(n)(t.src)},l):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:p("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),te=e=>e?`image/${String(e)}`:void 0,le=d((({className:e="",image:t,imageClassName:l="",...n})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...n}):o(Z,{className:e,imageClassName:l,image:t}):null)),ne={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ae="bg-main-divider text-main-disabled",re={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},ie="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:l})=>[ie,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?ne[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ce=()=>({open:(e,t={})=>h.fire("dialog",{type:"open",dialog:e,...t}),close:()=>h.fire("dialog",{type:"close"}),closeAll:()=>h.fire("dialog",{type:"close",all:!0})}),de=e=>de._impl(e);function me(){const e=G(Y.SITE_URL),t=u(),{closeAll:l}=ce();return e=>{const l=U(t)(e.href);return{...e,href:l,"aria-label":e.text,onClick:de(n({...e,href:l}))}};function n({href:n,target:a,onClick:r}){return i=>{r&&r(i);const s=!L(n,e||"/");n&&!s&&A(n,a)&&(l(),i?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(n,e)))}}}de._impl=e=>e,de.setup=e=>{de._impl=e};const he=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},ue=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:r="primary"}=e,i=ge(e)?"hidden lg:block":"";return c("div",{className:p(pe(e),"flex gap-xs"),children:[n?o("div",{className:p(i,se[r]),children:n}):null,ge(e)?c("div",{className:"whitespace-pre",children:[l?o("div",{className:"text-xs font-light text-left",children:l}):null,o("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:p(i,se[r]),children:a}):null]})})),pe=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return p("group/btn items-center justify-center",ge(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},ge=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),xe=({className:e,rounded:t,version:l})=>["inline-block",ie,l?re[l]:"",t?"rounded-full":"rounded-md",e].join(" "),fe=d((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const i=(({method:e,href:t})=>r((l=>{if("POST"!==e||!t)return;l.preventDefault(),l.stopPropagation();const{origin:n,pathname:a,searchParams:r}=new URL(t||""),i=document.createElement("form");i.setAttribute("method","POST"),i.setAttribute("action",[n,a].join(""));for(const[e,t]of r.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),i.appendChild(l)}document.body.appendChild(i),i.submit()}),[]))({method:l,href:n}),s=me()({onClick:i,href:n,...a}),c=t??o(ue,{...s});return o(e?ye:be,{...s,children:c})})),be=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:r,rounded:i,onClick:s,type:c,data:d,children:m})=>o("a",{className:oe({className:e,version:r,rounded:i}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,type:c,...he(d),children:m}))),ye=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:xe({className:e,rounded:n,version:l}),children:a})));function ve({version:e,handleClick:t,text:l="Вернуться назад",alwaysVisible:n=!1}){if(!l)return null;const a="primary"===e?"white":"black",r="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:p(n?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:p(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),r),onClick:t,children:o(le,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(fe,{version:"link",className:"group-data-secondary:text-white",text:l,ariaLabel:l,onClick:t,type:"button"})]})}const Ne={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},we=d((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a,insetTitle:i,buttons:s,leftImage:o,rightImage:d,imageAlign:m,isImageAlwaysOnRight:h=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=u(),v=r((()=>{y.back()}),[]),N=b.options?.page?.sitemap?.backwardButton;return c("div",{className:Se(n,l,e),children:[x?ve({version:t,handleClick:v,text:N}):null,ke(a),c("div",{className:p("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[Me(o,{imageAlign:m,className:"mx-auto"}),c("div",{className:p("grid gap-3xl",d?"@xl:grid-cols-2 auto-cols-fr":"",o?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[i,f]}),Be(R({...b,extraProps:{className:"@container-normal"}})),Me(d,{className:p("@xl:justify-self-end @xl:col-start-2",s?Ce(h):"",Te(h),Pe(g)),imageAlign:m}),Ie(s)]})]})]})})),ke=e=>e?o("div",{className:"relative h-full",children:e}):null,Se=(e="",t="",l="")=>p("relative flex flex-col gap-3xl overflow-hidden",e||t,l),Ce=e=>e?"row-span-2":"@xl:row-span-2",Te=e=>e?"col-start-2 self-center":"",Ie=e=>e?o("div",{className:"self-end",children:e}):null,Be=e=>e&&e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Me=(e,{className:t,imageAlign:l})=>e?o("div",{className:p("shrink-1/2 justify-self-center",l&&Ne[l],t),children:e}):null,Pe=e=>e?"hidden @xl:block":"",Re=(e=[])=>e.reduce(((e,t)=>e+t),0),Ve=(e=[])=>e?.length?Re(e)/e.length:0,ze=(e,t="normal")=>e?.icon||e?.src?o("div",{className:p("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(le,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((e=>{const{__html:t,richVersion:l=""}=e;return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:p(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Ae=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,je=d((({children:e,...t})=>o("span",{className:p("font-sans",Object.values(t)),children:e}))),$e=(e,t)=>e?o(je,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,_e=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?o(De,{...e},`rte-${t}`):["label"in e?$e(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Ae(e.description,t)},String(t)):null],Le=d((({className:e,benefitsVersion:t,...l})=>c("div",{className:p("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in l?ze(l.icon,t):null,o("div",{children:_e(l)})]}))),Oe=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Ee=e=>{return((t=e.map(Oe))?.length?Math.sqrt(Math.abs(Ve(t.map((e=>e**2)))-Ve(t)**2)):0)>16;var t},Fe=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Ue=e=>!e.some(Fe),He=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:p("flex gap-x-m gap-y-s",Ee(l)||Ue(l)?"flex-col":"flex-wrap",e),role:"list",children:l.map(((e,l)=>o(Le,{benefitsVersion:t,...e},String(l))))}):null)),We=d((({className:e,benefits:t})=>t?.length?o("div",{className:p("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(_e)}):null)),qe=d((({isTabularBenefits:e,...t})=>o(e?We:He,{...t}))),Ke=e=>Boolean(e?.src||e?.icon),Xe=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:p("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),role:"group",children:e.map(Ye(l))}):null,Ye=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:r,version:i,...s}=t||{},c=Ge(a,i),d=Ge(r,i);return n||a?.icon?o(fe,{className:p("basis-full @lg:basis-auto",e),appendLeft:Qe({...a,iconVersion:c}),appendRight:Qe({...r,iconVersion:d}),version:i,text:n,...s},l?String(l):""):null},Ge=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Qe=e=>Ke(e)?o(le,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Je=d((({className:e,isDotted:t,dotClassName:l,children:n})=>c("div",{className:p("font-sans flex",e),role:"listitem",children:[t?o("div",{className:"shrink-0",children:o("div",{className:p("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,o("span",{children:n})]}))),Ze={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},et=d((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const r=Ze[n];return l?.length?o("section",{className:p("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",r.textSize,e),role:"list",children:l.map(((e,l)=>o(Je,{isDotted:t,dotClassName:p(a||"bg-primary-text",r.dotStyle),children:e},String(l))))}):null})),tt=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),lt=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(nt)}):null)),nt=({label:e,amount:t},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(je,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[tt(2)(t)," ₽"]}):null]},String(l)),at=d((({className:e,tags:t})=>t?.length?o("div",{className:p("flex flex-wrap gap-xs",e),role:"list",children:t.map(rt)}):null)),rt=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(je,{size:"text-m",font:"font-light",children:e})},String(t)),it={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},st=d((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:r="L",align:i="text-left",benefitsVersion:s,isTabularBenefits:d,benefits:m,__html:h,isFullWidthTitle:u,items:p,isDotted:g=!0,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(le,{image:y}):null,M=o(C,{title:n,description:a,headlineVersion:r,align:i,isEmbedded:!0}),P=m?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return o(we,{className:e,padding:t,defaultPadding:l,...u?{title:M}:{insetTitle:M},...ot(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Xe(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(qe,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,h?o(De,{__html:h}):null,p?.length?o(et,{items:p,isDotted:g,listItemSize:it[r]}):null,T,x?.length?o(lt,{priceList:x}):null,ct(f)]})})})),ot=(e,t)=>t?{rightImage:e}:{leftImage:e},ct=e=>e?.length?o(at,{tags:e}):null,dt=e=>Boolean(e&&Array.isArray(e)),mt=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),ht=(e,t)=>{return l=e,Boolean(mt(l)&&"string"==typeof l.$ref)?t.ref(e):mt(e)?t.record(e):dt(e)?t.array(e):t.scalar?t.scalar(e):e;var l},ut=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(pt,e),pt=(e,t)=>e&&t?mt(e)?e[t]:dt(e)?e[parseInt(t,10)]:e:e,gt=(e,t)=>ht(e,{ref:({$ref:e,...l})=>gt(e?ut(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:gt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>gt(e,t)))}),xt=(e,t,l=[])=>{ht(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)xt(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)xt(e[n],t,[...l,n])}})};async function ft(e,t){try{return e?await bt(e,t):null}catch(e){console.error(e)}return null}const bt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),yt=e=>[...new Set(e)],vt={},Nt=["/portal-resources"],wt=(e,t)=>gt(e,(e=>t?.[e])),kt=(e,t)=>{const l=(e=>{const t=[];return xt(e,(e=>t.push(e))),t})(e),[r,i]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(yt(e).filter((e=>!Nt.some((t=>e.startsWith(t))))).map((async e=>[e,vt[e]||=await bt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(i)}),[l.join()]),l.length?wt(e,{...t,...r}):e};function St(e,t={}){const l=d((t=>{const l=kt((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:r,version:i,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...l})}));return Object.assign(l,t),l}const Ct=St((({className:e,padding:t,...l})=>o(x,{className:p("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(st,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),Tt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=i((()=>It(0,t?.length)),[t]),n=t?.[l];return n?o(Ct,{suppressHydrationWarning:!0,...n,...e}):o(x,{...e,children:o(f,{})})})),It=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Bt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Mt=e=>e?.replace(/[^+\d]/g,"");const Pt=e=>e?{phone:Mt(e)}:{},Rt=e=>e?{birthday:Bt(e)}:{},Vt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),zt=(e,t=!0)=>({[t?"email":"mail"]:e}),Dt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Mt(e)}:{},At=({aspectsAttributes:e,aspects:t,ev:l})=>{for(const{aspectName:n,params:a}of e)t[n??""]?.(l,a)},jt="rshb-query-params";function $t(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(jt)||"";return e&&globalThis.sessionStorage?.setItem(jt,e),e}function _t(e){if(!e)throw new Error("Value should be fulfilled");return e}const Lt=e=>t=>{const[,l]=_t(e.find((([e])=>e(t))));return l(t)},Ot=e=>Lt(e.map((([e,t])=>[e,()=>t])));Ot.if=e=>new Et(void 0,e);class Et{parent;predicate;unit;get entry(){return[_t(this.predicate),_t(this.unit)]}constructor(e,t,l){this.parent=e,this.predicate=t,this.unit=l}if(e){return new Et(this,e)}then(e){return new Et(this.parent,this.predicate,e)}else(e){return Lt([...Ft(this),[()=>!0,e]])}}const Ft=e=>[...e?.parent?Ft(e.parent):[],e.entry],Ut=e=>{const t=e.target?.closest("a");if(D(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=$t();if(!D(e)||!t)return e;const l=new URL(e);for(const[e,n]of new URLSearchParams(t))l.searchParams.set(e,n);return l.toString()})(t?.href)||t?.href;if(l){Ht(t?.target)?.(l)}}},Ht=Ot([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function Wt(){return Wt._impl()}Wt._impl=()=>({forwardQuery:Ut}),Wt.setup=e=>{Wt._impl=e};const qt=e=>e,Kt=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[a,i]=n(e),[o,c]=n(!1),[d,m]=n({}),h=s({}),u=r(((e,t)=>{const{parse:l=qt,format:n=qt}=t||{};return h.current||(h.current={}),h.current[e]||=t=>{i((n=>({...n,[e]:l(t)}))),m((t=>({...t,[e]:!0})))},{value:n(a[e]),isDirty:o||d[e],onChange:h.current[e]}}),[a,o,d]),p=r((e=>{i(e),m(e)}),[]),g=r((()=>{i(e),c(!1),m({})}),[e]),x=r((e=>{e.preventDefault(),t?g():c(!0),l&&l(a,e)}),[l,a]);return[a,{isDirty:o||Object.values(d).some(Boolean),field:u,update:p,reset:g,onSubmit:x}]},Xt=d((e=>{const{className:t,title:l,children:n,...a}=e;return o(x,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[l?o(w,{headingType:"h3",title:l,className:"@xl:text-center"}):null,n]})})}));function Yt({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const Gt={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"},Qt={primary:p("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:p("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},Jt=d((({children:e,...t})=>{const l=e=>({...e,onClick:de(Yt(e))}),{className:n,version:a="primary",active:r,disabled:i,type:s="button",rounded:c=!0,role:d,onClick:m}=l(t);return o("button",{className:p("font-sans px-9 py-4","flex justify-center items-center gap-xs",r?"text-white bg-primary-active":"",i?"bg-main-gray text-main-disabled cursor-not-allowed":"",r||i?"":p(Gt[a],Qt[a]),c?"rounded-md":"",n),type:s,role:d,onClick:m,children:e})})),Zt=d((({className:e,onClose:t})=>o("button",{className:p("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(le,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),el=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:i}=ce(),s=r((()=>{i(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Zt,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),tl=d((function({responseType:e}){const t="OK"===e,l=t?"ResponseOKIcon":"ResponseFailIcon",{close:n}=ce(),a=r((()=>{n()}),[]);return o(el,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(le,{image:{icon:l,iconVersion:"normal"},width:"156",height:"156"}),o(C,{className:"w-full",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",description:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Jt,{type:"button",onClick:a,children:"Хорошо"})]})})})),ll=e=>t=>l=>e(l)?[]:[t],nl=e=>o("div",{className:"h-6",children:e?o(je,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),al=d((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:r,...i})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:r.map((({d:e,fill:t,...l},n)=>{const a={...i,...l};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),rl="appearance-none w-5 h-5 border-solid cursor-pointer flex-none",il=[{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"}],sl=d((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:i})=>{const s=r((e=>{n||(e.preventDefault(),i&&i(!t))}),[i,n,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(al,{paths:il,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[o("div",{className:p(rl,"m-0",a?"rounded-full border-2":cl(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:ol(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?d:null,l?o("div",{className:"ml-s",children:o(je,{size:"text-l",font:"font-light",children:l})}):null]})})})),ol=(e=!1)=>e?"radio":"checkbox",cl=(e=!1)=>p("rounded border",e?"bg-primary-main":""),dl=d((({className:e,text:t,value:l,key:n,disabled:a,error:r,onChange:i})=>c("div",{className:p("shrink-0 w-full",e),children:[o(sl,{text:t,value:l,disabled:a,onChange:i},n),nl(r)]})));function ml(e=!1){const[t,l]=n(e),a=r((()=>l(!0)),[]),i=r((()=>l(!1)),[]),s=r((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:i,toggle:s}]}const hl=e=>e?o(je,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,ul="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",pl=d((({key:e,className:t="",id:l,name:n,type:i="text",label:d,placeholder:m,value:h="",valid:u=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=r((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&w.current?.focus()}),[v,w]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",T=gl(u);return c("div",{className:p("relative",t),children:[c("label",{className:"space-y-xs",children:[hl(d),N?o("textarea",{className:p("block resize-y min-h-24",S,T),id:p("textarea",l),name:n||l,placeholder:m,value:h,onChange:k,onFocus:f,onBlur:b},e):o("input",{type:i,className:p("h-14",S,C,T),ref:w,id:l,name:n||l,placeholder:m,value:h,onChange:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),gl=e=>e?ul:"border-error",xl=e=>e?.text||e?.key||"";function fl(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function bl(e){const t=s(null),l=r((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return fl(globalThis.document,"click",l),t}const yl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,vl=d((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:r})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:yl(t,n).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:xl(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:r,className:p("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function Nl({isOpen:e,options:t,value:l,query:n,onChange:i,onClose:c,iconVersion:d}){const m={open:(e,t)=>h.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>h.fire("popup",{type:"update",popup:e,...t}),close:()=>h.fire("popup",{type:"close"})},u=r((()=>{m.close(),c&&c()}),[c]),p=r((e=>{u(),i&&i(e)}),[u,i]),g=s(null),x=bl(u);return a((()=>{if(!e||!g.current)return;const a=g.current,{top:r,left:i,width:s,height:c}=a.getBoundingClientRect();m.update(o(vl,{popupRef:x,options:t,value:l,query:n,onChange:p,iconVersion:d}),{top:r+window.scrollY+c,left:i,width:s})}),[e,t,l,n,p]),g}const wl=d((({className:e,label:t,options:l=[],value:a,valid:i=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:h="black",onChange:u,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=ml(),[y,v]=n(""),N=g||0===l.length,w=x&&!N,k=r((()=>{v(""),f()}),[]),S=Nl({isOpen:x,options:l,value:a,query:y,onChange:u,onClose:k,iconVersion:h});return c("div",{className:p("space-y-xs",e),children:[hl(t),c("div",{className:p("relative",w?"z-20":"z-10"),ref:S,children:[c("div",{className:p("h-14 [&>*]:p-m pr-8 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",Sl(s,i,N)),onClick:w?k:b,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:xl(a)||d}),kl(w,h)]}),m&&w?o("div",{className:p("absolute top-0 w-full z-20"),children:o(pl,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),kl=(e,t)=>o(W,{className:p("absolute right-3 flex self-center",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Sl=(e,t,l)=>p(e?"border rounded-md ":"",e&&!l?"hover:border-primary-hover":"",l?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Cl=()=>{},Tl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:r,max:i,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>l)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,n,d),l=Il(t,e),c=Bl(t,r,i);h.push(o("td",{children:o("div",{className:Ml(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},Il=(e,t)=>t&&e.toDateString()===t.toDateString(),Bl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Ml=(e,t)=>p("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Pl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Rl=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=Cl})=>{const d=r((e=>s(e)),[]),{firstDayOfWeek:m,totalDays:h}=i((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Pl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Tl({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),Vl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],zl=Vl.map((e=>({key:e}))),Dl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Al={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},jl={className:"min-w-32",iconVersion:"black",isBorder:!1},$l=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:i,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=ml(!1),[u,g]=n(l?.getMonth()||(new Date).getMonth()),[x,f]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:i})=>{const s=bl(r((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:r((()=>e(!t)),[t]),handleNextMonth:r((()=>{l+1<=11?n(l+1):(n(0),a(i+1))}),[l]),handlePrevMonth:r((()=>{l-1>=0?n(l-1):(n(11),a(i-1))}),[l]),handleSelectMonth:r((({key:e})=>n(Vl.indexOf(e))),[]),handleSelectYear:r((({key:e})=>a(Number(e))),[]),monthsOptions:zl,yearsOptions:Dl,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:h,selectedYear:x,selectedMonth:u,showCalendar:m});return c("div",{className:p("space-y-xs",e),ref:C,children:[hl(t),c("div",{className:"relative",children:[_l(S,l,a),m?c("div",{className:"absolute bg-white z-20 select-none",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(W,{...Al,className:"-rotate-90 cursor-pointer"})}),o(wl,{onChange:v,value:{key:Vl[u]},options:w,...jl}),o(wl,{onChange:N,value:{key:String(x)},options:k,...jl}),o("div",{className:"my-auto",onClick:y,children:o(W,{...Al,className:"rotate-90 cursor-pointer"})})]}),o(Rl,{today:l,currentMonth:u,currentYear:x,onDateSelect:d,min:i,max:s})]}):null]})]})})),_l=(e,t,l)=>c("div",{onClick:e,className:p("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[o(k,{children:t&&Bt(t)}),o(W,{...Al,name:"CalendarIcon"})]}),Ll=d((({className:e,label:t,error:l,...n})=>c("div",{className:p("shrink-0 w-full",e),children:[o($l,{label:t&&n?.errors?`${t}*`:t,valid:Boolean(!l),...n}),nl(l)]}))),Ol=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:r,onBlur:i,isTextarea:s,type:d,...m})=>c("div",{className:p("shrink-0 w-full",e),children:[o(pl,{type:d||"text","aria-label":t,label:t&&m?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:r,onBlur:i,isTextarea:s,placeholder:m?.errors&&!t?`${n}*`:n}),nl(a)]}))),El=e=>"_"===e,Fl=e=>/\d/.test(e),Ul=e=>El(e)||Fl(e),Hl=[..."+7 (___) ___-__-__"],Wl=Hl.findIndex(El),ql=Hl.map(((e,t)=>Ul(e)?Hl.slice(0,t).filter(Ul).length:-1));const Kl=d((({children:e,onChange:t,...l})=>{const n=r((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Hl.map(((e,l)=>Fl(e)?e:t.charAt(ql[l])||e)),n=ql.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Wl,n)):l).join("")}(e))),[t]),a=r((e=>{"+7 ("===e&&(t&&t(""))}),[]);return o(pl,{...l,onChange:n,onFocus:e=>n(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),Xl=d((({className:e,label:t,value:l,error:n,onChange:a,onBlur:r,...i})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Kl,{"aria-label":t,label:i?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:r,placeholder:"+7 (___) ___-__-__"}),nl(n)]}))),Yl=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(wl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),nl(l)]}))),Gl="Некорректно заполненное поле",Ql=ll((e=>null!=e&&""!==e))(Gl),Jl=ll((e=>e?.key&&""!==e?.key))(Gl),Zl=ll((e=>"string"==typeof e&&e.length>1))(Gl),en=ll((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Gl),tn=(ln=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,ll((e=>"string"==typeof e&&ln.test(e))))(Gl);var ln;const nn=ll((e=>"boolean"==typeof e&&e))("Согласие обязательно"),an={typeForm:Ql,surname:Zl,name:Zl,region:Jl,addressBranch:Jl,phone:tn,secondaryPhone:tn,birthday:Ql,email:Ql,fullName:Zl,inn:en,partnerComments:Ql,collectionCount:Ql,comment:Ql,acquiringType:Jl,feedbackType:Jl,feedbackMethod:Jl,serviceType:Jl,serviceDirection:Jl,consentDataProcessing:nn,annualRevenue:Ql},rn=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,an?.[e]])))},sn=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},on=(e,t,l=!1)=>l?sn(e,t):e,cn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],dn=d((({field:e,input:t})=>o(Yl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:cn,...on(e("acquiringType"),an.acquiringType,t?.required)}))),mn=(e="")=>Boolean("trade"===e||"all"===e),hn=e=>null!=e,un=new Map,pn=e=>Boolean(e?.every((e=>Array.isArray(e)?pn(e):!e||"string"==typeof e))),gn=e=>pn(e)?e.toString():"";function xn(e,t,{fallback:l,cache:r}={}){const s=i((()=>fn(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(hn))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=un)=>l=>{const n=gn(l),a=t.get(n);if(n&&hn(a))return a;const r=e(...l);return n&&hn(r)&&t.set(n,Promise.resolve(r)),r})(t,r)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,r,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function fn(e){return Array.isArray(e)?e:e instanceof Function?fn(e()):[e]}const bn=[];const yn=async e=>await ft(e,{method:"GET"})||bn;function vn(){const{data:e}=xn("/api/v1/branchesByRegions",bt);return Array.isArray(e)?e:[]}const Nn=d((({field:e,input:t,isPremium:l=!1})=>{const n=e("region"),r=n?.value?.key,i=n?.value?.text,s=l?vn()?.find((e=>e?.region===i))?.branches:function(e){const{data:t}=xn(e?`/api/v1/branches?regionCode=${e}`:null,yn);return t||bn}(r)?.filter((e=>e?.address));return a((()=>{""!==n?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[n?.value]),o(Yl,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...on(e("addressBranch"),an.addressBranch,t?.required),isSearch:!0})})),wn=(e,{normalize:t,format:l})=>{const{value:a,onFocus:i,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=r((e=>{d(!0),i&&i(e)}),[]),h=r((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},kn=(e,t,l)=>Math.max(t,Math.min(e,l));function Sn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function Cn({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:r,onChange:i}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:p("w-2 h-2 rounded-full",s<=t||r?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:l,step:n,value:s,disabled:r,onChange:t=>{const l=Sn(t.target?.value),n=e.length?e[l]:l;i&&i(n||0)}})})]})}const Tn=1,In=100,Bn=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:i=(a.length?0:Tn),max:s=(a.length?a.length-1:In),step:d=1,value:m=a[0]||i,disabled:h=!1,onChange:u}=e,g=wn(e,{normalize:(e=0)=>a.length?Mn(a)(e):kn(e,i,s),format:tt()}),x=r((e=>{u&&u(Sn(e.target?.value))}),[u]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(je,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,o("input",{className:p("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",ul,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:x,...g}),Cn({list:a,min:i,max:s,step:d,disabled:h,value:m,onChange:u})]}),Pn(n)]})})),Mn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),Pn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(je,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Rn=["От 1 000 ₽","До 1 000 000 000 ₽"],Vn=d((({field:e})=>o(Bn,{title:"Сумма, ₽",items:Rn,min:1e3,max:1e9,...e("amount")}))),zn=d((({field:e,input:t})=>o(Ol,{className:"col-span-2",...on(e("comment"),an.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Dn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],An=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],jn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],$n=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],_n=d((({field:e})=>o(Yl,{label:"Способ получения ответа",options:$n,...sn(e("feedbackMethod"),an.feedbackMethod)}))),Ln=d((({field:e})=>{const t=e("feedbackType");return a((()=>{"FEEDBACK"===t?.value?.key&&e("serviceDirection")?.onChange?.(An[0])}),[t?.value]),o(Yl,{label:"Тема",placeholder:"Выберите тему",options:jn,...sn(t,an.feedbackType)})})),On=d((({field:e})=>o(dl,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),En=d((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>c("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[o("div",{className:p("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:p("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(je,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Fn=d((({field:e})=>mn(e("acquiringType")?.value?.key)?o(En,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Un=d((({field:e})=>{const t=e("secondaryPhone");return o(Xl,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?sn(t,an.secondaryPhone):t})})),Hn=d((({field:e})=>mn(e("acquiringType")?.value?.key)?o(En,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null));function Wn(){const{data:e}=xn("/api/v1/regions",bt);return Array.isArray(e)?e:[]}const qn=d((({field:e,input:t})=>{const l=Wn();return o(Yl,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:i((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...on(e("region"),an.region,t?.required)})})),Kn=d((({field:e,input:t})=>{const l=vn(),n=i((()=>l?.map((({region:e})=>({key:e,text:e})))),[l]);return o(Yl,{label:"Регион",placeholder:"Выберите регион",options:n,...on(e("region"),an.region,t?.required)})})),Xn=d((({field:e})=>o(Yl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:An,...sn(e("serviceDirection"),an.serviceDirection)}))),Yn=["От 1 мес","До 15 лет"],Gn=d((({field:e})=>o(Bn,{title:"Срок, месяцев",items:Yn,min:1,max:180,...e("term")}))),Qn=d((({field:e})=>o(Yl,{label:"Тип обслуживания",options:Dn,...sn(e("serviceType"),an.serviceType)}))),Jn=d((({name:e,text:t,value:l,checked:n,onChange:a,className:r})=>o("div",{className:r,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:p(ul,rl,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:l,name:e,checked:n,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(je,{color:"text-primary-text",children:t}):null]})}))),Zn=["currencyControl","documentOperations","conversionTransactions","otherIssues"],ea=d((({field:e})=>{const{value:t,onChange:l}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(Jn,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:l}),o(Jn,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:l}),o(Jn,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:l}),o(Jn,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:l})]})})),ta=(e,t)=>(l,n)=>{const{required:a,...r}=l,i="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,s={surname:o(Ol,{label:"Фамилия",...on(e("surname"),an.surname,a)}),name:o(Ol,{label:"Имя",...on(e("name"),an.name,a),...r}),middleName:o(Ol,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),phone:o(Xl,{label:"Телефон",...on(e("phone"),an.phone,a)}),email:o(Ol,{label:"Электронная почта",...on(e("email"),an.email,a)}),fullName:o(Ol,{label:"ФИО",...on(e("fullName"),an.fullName,a),...r}),inn:o(Ol,{label:"ИНН",type:"number",...on(e("inn"),an.inn,a)}),comment:o(zn,{field:e,input:l}),region:i?o(Kn,{field:e}):o(qn,{field:e,input:l}),addressBranch:o(Nn,{field:e,input:l,isPremium:i}),birthday:o(Ll,{label:"Дата рождения",...on(e("birthday"),an.birthday,a)}),isClient:o(On,{field:e}),consentToReceiveMaterials:o(dl,{...e("consentToReceiveMaterials"),text:"Согласен на получение информационных и аналитических материалов по электронной почте"}),partnerComments:o(Ol,{...on(e("partnerComments"),an.partnerComments,a),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...r}),collectionCount:o(Ol,{label:"Количество объектов инкассации",type:"number",...on(e("collectionCount"),an.collectionCount,a)}),acquiringType:o(dn,{field:e,input:l}),onlineCheckout:o(Fn,{field:e}),posTerminal:o(Hn,{field:e}),serviceType:o(Qn,{field:e}),term:o(Gn,{field:e}),amount:o(Vn,{field:e}),annualRevenue:o(Ol,{label:"Годовая выручка, ₽",...on(e("annualRevenue"),an.annualRevenue,a)}),vedTypes:o(ea,{field:e}),feedbackType:o(Ln,{field:e}),feedbackMethod:o(_n,{field:e}),serviceDirection:o(Xn,{field:e}),bankEmpolee:o(Ol,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}),applicationDate:o(Ol,{label:"Дата и время обращения в Банк",...e("applicationDate")}),secondaryPhone:o(Un,{field:e})};return function({input:e,field:t}){const{condition:l}=e,{value:n}=t(l?.name||"");return!l||l?.values?.find((e=>e===(n?.key??n)))}({input:l,field:e})?o("div",{children:s[l?.name]},String(n)):null};const la=e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:n,amount:a,term:r,annualRevenue:i,serviceType:s,feedbackType:o,vedTypes:c,region:d,...m}=e,h=t||i?(e=>{const{acquiringType:t,onlineCheckout:l=!1,posTerminal:n=!1,term:a,amount:r,annualRevenue:i}=e;return t?`Вид эквайринга=${t?.text||""}${mn(t?.key)?`/Онлайн касса=${l}/POS-терминал=${n}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${r}/Срок=${a}/Выручка=${i}`})(e):null,u={...m,...aa(c),...na(d),...h?{partnerComments:h}:{},...s?{typeForm:s}:{},...o?{typeForm:o}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},na=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},aa=e=>e?{vedTypes:Object.fromEntries(Zn.map((t=>[t,t===e])))}:{},ra={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e3,acquiringType:cn[0],serviceType:Dn[0],feedbackType:jn[0],feedbackMethod:$n[0],serviceDirection:An[0],vedTypes:Zn[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},ia=(e,t="")=>{const l=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||ra[e.name]])));return l?.serviceType&&"PREMIUMSERVICE"===t&&(l.serviceType=Dn[1]),{...l,typeForm:{key:t,text:""}}},sa=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(je,{children:e}):null,t?o(fe,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(je,{children:t.text})}):null]}))),oa=(e,t)=>o(Jt,{className:p("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ca=(e,t,l)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(sl,{...e}),o(sa,{link:t})]}),nl(sn(e,nn).error)]}):o(sa,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),oa(l)]}),da={send:async function(e,t=!1){const{typeForm:l,region:n,phone:a="",email:r,birthday:i,inn:s,fullName:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:l,...Vt(n,g),...zt(r,g),...Pt(a),...g?Rt(i):{inn:s,fullName:o},..."FEEDBACK"===l?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...Dt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},ma=d((({className:e,title:t,typeForm:l="",sections:i=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:u,data:g,...x})=>{const f=i?.flatMap((e=>e?.inputs))||[],b=ia(f,l),[y,v]=n(""),N=r((async(e,t)=>{const l=ga(f,e),n=(a=rn(l),e=>e&&Object.entries(a).flatMap((([t,l])=>l(e[t])))||[]);var a;if(n(e)?.length)return"Fail";const r=la({...e,...h}),i=await da.send(r,"lead"===m)?"OK":"Fail";if(v(i),i){(e=>{const{open:t,close:l}=ce();return{open:(l={})=>t(o(tl,{...e}),l),close:l}})({responseType:i}).open()}if("OK"===i&&g){const e=Wt();At({aspectsAttributes:g,aspects:e,ev:t})}return i}),[]),[,{field:k,onSubmit:S,reset:C}]=Kt(b,{onSubmit:N}),T=pa(f)?.name;return a((()=>{"OK"===y&&C()}),[y]),c(Xt,{className:p("container space-y-m",e),title:t,...x,children:[c("form",{onSubmit:S,children:[i.map(((e,t)=>c("div",{className:p(ua(e.columns),"grid gap-x-m"),children:[ha(e.title),(e?.inputs||[])?.map(ta(k,l))]},`section-${t}`))),ca(T?k("consentDataProcessing"):void 0,d,s)]}),u?c("div",{className:"space-y-m",children:[o(w,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[o(le,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(le,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),ha=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(je,{size:"text-h6",children:e})}):null,ua=e=>2===e?"@xl:grid-cols-2":"",pa=e=>e?.find((e=>"consentDataProcessing"===e?.name)),ga=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((l=>{const n=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):l===(n?.key??n)})))),xa="text-center",fa=d((({title:e,description:t})=>c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(le,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:xa,className:"space-y-s"})]}))),ba=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",ya=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function va(e,{sensitivity:t,rootRef:l}={}){const n=s(null),r=i((()=>({threshold:Na(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,r);return t.observe(n.current),()=>{t.disconnect()}}),[e,r]),n}function Na(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const wa=d((({className:e,style:t,idx:l,activeIndex:n,observerOptions:a,children:i,onIntersection:s})=>{const c=va(r((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return o("div",{className:p("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:c,role:"listitem",children:i})})),ka=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Sa=d((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:i=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:u,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:l},b=s([]),y=r(((e,t)=>{const l=[...b.current||[]];l[e]=t,b.current=l,g&&g(l),x&&x(Ta(l))}),[g,x]),v=a>0?i*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Ca(c,v):{},...N?ya(h):{},gap:`${i}px`};return o("div",{className:p("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,role:"list",children:(S=(e,l)=>o(wa,{className:p(m,a?ka[a-1]:"",N?"h-full":"",t),style:w?Ca(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(u)});var S})),Ca=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Ta=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Ia={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Ba={"horizontal-list":"w-6","vertical-list":"h-6"},Ma=d((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:r})=>n?o("div",{className:p("flex gap-xs",Ia[a],r?"group":"",e),"data-ver":r,children:Array.from({length:n}).fill(null).map(((e,n)=>o("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?Ba[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Pa=d((({className:e,disabled:t,...l})=>o(fe,{rounded:!0,className:p("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:o(le,{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"})}))),Ra=d((e=>o(Pa,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Va=d((e=>o(Pa,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),za="absolute top-[calc(50%-24px)] z-40",Da="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Aa=d((({className:e,scroll:t,hasBlur:l,arrowsPadded:n})=>{const{canScrollLeft:a,canScrollRight:r,scrollLeft:i,scrollRight:s}=t;return c("div",{className:p(e),children:[l?ja(t):null,a?o(Ra,{className:p(za,n?"left-1":"left-0"),onClick:i}):null,r?o(Va,{className:p(za,n?"right-1":"right-0"),onClick:s}):null]})})),ja=e=>c("div",{children:[e.canScrollLeft?o("div",{className:p(Da,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:p(Da,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),$a=e=>e,_a=(e=$a)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),La=_a(),Oa=(e=$a)=>_a((t=>-e(t))),Ea=Oa(),Fa=e=>t=>e.scrollWidth/t,Ua=e=>(t,l)=>{e.scrollBy({left:l*Fa(e)(t),behavior:"smooth"})},Ha=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,i]=n([]),o=r((e=>{i((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[Oa()(a),_a()(a)]:[-1,-1],m=c>0,h=d<e-1,u=r((()=>{var t;l.current&&(m?Ua(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=r((()=>{l.current&&(h?Ua(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=r(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Wa=d((({className:e,version:t,gap:l=14,padding:n=16,visibleItemCount:a=1,listType:r="horizontal-list",snapAlign:i,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:u,children:g,onVisibleIndicesChange:x})=>{const f=Array.isArray(g)?g.length:0,[b,y]=Ha({itemCount:f,onVisibleIndicesChange:x}),[v]=y.visibleIndicesRange;return c("div",{className:p(e,"vertical-list"===r?"relative h-full":""),children:[o(Sa,{containerRef:b,activeIndex:v,visibleItemCount:a,gap:l,padding:n,listType:r,snapAlign:i,minHeight:s,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:g}),o(Aa,{className:p(!d&&"hidden lg:block"),scroll:y,hasBlur:m,arrowsPadded:h}),o(Ma,{className:p(!u&&"lg:hidden"),containerRef:b,activeIndex:v,dotCount:f,listType:r,version:t})]})})),qa=({blocksToRender:e,...t})=>o(Wa,{visibleItemCount:0,gap:0,showArrows:!0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,l)=>o("div",{className:p("relative min-w-80",ba(!0)),children:B(e,t)},String(l))})}),Ka=e=>e%2!=0,Xa=d((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:r,role:i,...s})=>c(l,{tag:l,className:p("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",r),onClick:n,role:i,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Ya=d((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:r})=>o(Xa,{tag:"button",onClick:r,disabled:a,"data-theme":n,justifyContent:"center",role:"button",className:p("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(je,{size:"text-h4",children:t}),iconNode:l?o(le,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Ga=({isUnfolded:e,onToggle:t})=>o(Ya,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Qa=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:i})=>{const[s,o]=n(l),d=r((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=i?i({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const Ja=d((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),r=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:r,children:l})})})),Za=["ArrowDownIcon","ArrowUpIcon"],er="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",tr=({topItemsCount:e=0,label:t="",block:l,blocksToRender:n=[],...a})=>{const[r,i]=e>0?[n.slice(0,e),n.slice(e)]:[n,[]];return c("div",{className:p("space-y-2xs",n.length?"":"hidden"),children:[c("div",{className:p(er),children:[P(r,{...a.options,parent:l}),Ka(r.length)?o(Tt,{className:"col-span-6",...a}):null]}),o(Qa,{renderFoldableSection:({isUnfolded:e})=>c(Ja,{className:p(er),isUnfolded:e,children:[P(i,{...a.options,parent:l}),Ka(i.length)?o(Tt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:l,onToggle:n})=>o(Ya,{className:p(e<1?"hidden":""),disabled:!i?.length,label:t,icon:Za[Number(l)],dataTheme:a.options?.page?.colorPalette,onClick:n})})]})},lr=d((({blocksSection:e,blocksToRender:t=[],notFound:l,...n})=>{switch(e?.view){case"grid":return c("div",{children:[nr(l,t),tr({...e,...n,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[nr(l,t),qa({...n,blocksToRender:t})]});default:return null}})),nr=(e,t)=>e&&!t.length?o(fa,{...e}):null,ar=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),rr=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(En,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),ir=d((({children:e,filtrationSchema:t,resetButton:l,field:n,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,ar(o("div",{className:"h-full w-px bg-gray"}))(Object.entries(t).map(sr(n)).filter(Boolean))]}),l?o("div",{children:o(Jt,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:l?.text})}):null]}))),sr=e=>([t,l])=>{const n=l?.type;return"array"===n?or(t,e)(l):null},or=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[l?.title?o("div",{className:"mb-m",children:o(je,{size:"text-m",font:"font-medium",color:"text-primary-text",children:l.title})}):null,o(rr,{items:n,multiple:!l?.single,...t(e)})]},e)};function cr(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const dr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,mr=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>dr(t[e])||dr(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>dr(t[e])||dr(l[e])||hr(t[e])<=hr(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>dr(t[e])||dr(l[e])||hr(t[e]?.min)>=hr(l[e]?.min)&&hr(t[e]?.min)<=hr(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>dr(t[e])||dr(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>dr(t[e])||dr(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),hr=e=>Number(e||0),ur=(e,{block:t,page:l,normalize:n=qt})=>{const a=t?.blocks||[],[r,{field:s,reset:o,update:c}]=Kt(e),d=i((()=>cr(a,a.map((e=>wt(e.content,l?.fallback))))),[a,l?.fallback]),m=r===e?a:((e,t)=>(l=qt)=>e?.filter((([,e])=>mr(t,l(e)||{}))).map((([e])=>e)))(d,r)(n);return[r,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},pr={},gr={},xr=St((({className:e,filtrationSchema:t=pr,consumerField:l={},resetButton:n,...a})=>{const[,{blocksToRender:r},{field:i,reset:s}]=ur(gr,{block:a.block,page:a.options?.page}),d=o(wl,{className:"w-64",label:l?.title,options:fr(l),...i("consumer",{parse:({key:e})=>[e],format:([e]=[])=>fr(l).find((t=>t.key===e))||{key:""}})});return c(x,{className:p(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(ir,{filtrationSchema:t,field:i,reset:s,children:c("div",{children:[d,o("div",{children:o(Jt,{type:"reset",className:"mt-lg w-64",onClick:s,version:n?.version,children:n?.text})})]})}),o(lr,{blocksToRender:r,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),fr=e=>cr(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),br={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},yr=d((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...r})=>{const i=String(n?.width||t);return a?o("div",{style:{width:`${i}px`,height:`${i}px`},className:p("rounded-icon object-fit flex justify-center items-center",br[l],e),children:o(W,{...r,width:"54%",height:"54%",name:a})}):null})),vr=d((({className:e="",title:t,benefitList:l,...n})=>c(x,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(w,{headingType:"h3",as:"h2",className:xa,title:t}):null,l?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(Nr)}):null]}))),Nr=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:r=!1},i)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?o(yr,{className:"shrink-0",defaultIconSize:44,iconBgVersion:a||"",...n}):null,n?.src?o(le,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(w,{headingType:"h6",children:e}),o(je,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),o(et,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:r})]}):null]},String(i)),wr=e=>({icon:t,title:l,description:n},a)=>c("div",{className:p("flex flex-col gap-1","items-center",n||l?"":"justify-center"),children:[l?o(je,{size:"text-h6",font:"font-normal",align:e,children:l}):null,t?o(le,{image:t,height:"180",className:"w-auto mx-auto"}):null,n?o(je,{size:"text-h6",font:"font-normal",align:e,children:n}):null]},String(a)),kr=(e,t,l)=>o("div",{className:`grid gap-2xs ${Sr(t)}`,children:e.map(wr(l))}),Sr=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Cr=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:r,...i})=>c(x,{className:p("space-y-3xl",l),defaultPadding:"p-6xl",...i,children:[o(C,{defaultPadding:"",title:r,description:a,headlineVersion:"M"}),e?.length?kr(e,n,t):null]}))),Tr={start:"justify-start",center:"justify-center",end:"justify-end"},Ir=d((({buttons:e,className:t="",align:l,...n})=>{const a=l?p("flex",Tr[l]):"";return o(x,{className:p("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Xe(e)})})),Br=d((({className:e,title:t,children:l,...n})=>c(x,{className:p("space-y-xl",e),defaultPadding:"p-4xl",...n,children:[t?o(w,{className:"text-center",title:t}):null,l]}))),Mr="flex flex-col justify-between @4xl:flex-row gap-x-m gap-y-7 @xl:gap-y-4xl",Pr="flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",Rr="flex flex-col gap-y-xl @xl:w-96",Vr=d((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:r,postfix:i,color:s="text-secondary-text"})=>c("div",{className:p("flex justify-between @xl:flex-col",e),children:[t?o(je,{size:"text-l",font:"font-light",color:s,children:t}):null,o("div",l?{children:o(je,{size:"text-h3",children:[r,tt(n,{fixed:a})(l),i].filter(Boolean).join(" ")})}:{children:o(je,{size:"text-h3",children:"-"})})]}))),zr=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Dr=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:r,color:i="text-secondary-text"})=>c("div",{children:[o(je,{size:"text-l",font:"font-light",color:i,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex justify-start gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:tt(n,{fixed:!0})(e)}),l?o("span",{className:"text-7xl",children:l}):null]}),a&&r?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Ar=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s",children:[o(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),jr=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,color:r="text-secondary-text",...i})=>a&&0===t?o(Ar,{title:e,...i}):c("div",{children:[o("div",{className:"hidden @xl:block",children:o(Dr,{title:e,rate:t,unit:l,fractionDigits:n,color:r,...i})}),o("div",{className:"@xl:hidden",children:o(Vr,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,color:r,...i})})]});function $r({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${tt(2)(l.min||0)} ₽`,`До ${tt(2)(l.max||0)} ₽`];return o(Bn,{items:e?n:[],step:t,...l})}const _r={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Lr={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Or=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,[a,r]=((e,t,l)=>{const{maxBonus:n=5e3,prefMonthsNum:a=_r.prefMonthsNum,prefTravelBonusRate:r=_r.prefTravelBonusRate,prefRestBonusRate:i=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(r*t)+Math.round(i*l),n);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*l),n)*(12-a)]})(t||Lr,l,n);return{...t,...e,monthBonus:a,yearBonus:r}},Er=St((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,...r})=>{const[i,{field:s}]=Kt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:u,monthBonus:g,yearBonus:x}=Or(i,l);return o(Br,{className:e,title:t,...r,children:c("section",{className:p(Mr,e),children:[c("div",{className:Pr,children:[$r({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),$r({title:"Сумма покупок в остальных категориях, ₽",min:h,max:u,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?jr({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Rr,children:[x>=0?o(Vr,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,Xe(n,{isVertical:!0}),zr(a)]})]})})})),Fr=Math.round(29.5),Ur=(e,t=0)=>e?.sum?e.sum:t,Hr=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Wr=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,qr={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Kr=d((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>o("div",{className:p(`flex ${qr[a]}`,l),role:"radiogroup",children:e?.map((({id:e,text:l})=>o(sl,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Xr=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:r,onChange:i})=>c("div",{className:"space-y-s",children:[t?o("div",{className:"hidden @5xl:block",children:o(je,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",children:o(je,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(Kr,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:p("flex-col sm:flex-row",r),onChange:t=>i&&i(t===e[0].id)})]}),Yr=e=>Xr({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Gr=({income:e,finalSum:t,buttons:l,footnotes:n=[]})=>c("div",{className:Rr,children:[o(Vr,{title:"Доход в конце срока",value:e,postfix:"₽",prefix:"+"}),o(Vr,{title:"Сумма в конце срока",value:t,postfix:"₽"}),Xe(l,{isVertical:!0}),n?.map(zr)]}),Qr=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Jr([e,t],n),Jr=([e,t],l=[])=>({[e]:l.length?Ea(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?La(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Zr=(e,[t,l],n)=>e>=n[t]&&e<=n[l],ei={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const ti={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},li=(e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:r,isMonthlyInterestPayment:i}=e,s=r||a,o=l<90||l>730,c=function(e){const t=e?.rateType?ei[e?.rateType]:"",{data:l}=xn(t?`/api/v1/depositrates/${t}`:null,bt);return Array.isArray(l)?l:[]}(t);if(l<=30)return{...ti,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>i===e.isMonthlyInterestPayment&&ni(s,e)&&Zr(n,["minSum","maxSum"],e)&&Zr(l,["minDays","maxDays"],e)))||ti,{rate:m}=d,h=ai(m,e),u=n+h,p=c||[ti];return{...d,...Jr(["minSum","maxSum"],p),...Jr(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},ni=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,ai=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},ri=St((({className:e="",title:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:r,defaultParams:i,rateParams:s,...d})=>{const[m,{field:h}]=Kt({moneyValue:Ur(i,1e5),daysValue:Hr(i,60),isReplenished:Boolean(i?.isReplenished),isPartialWithdrawal:Boolean(i?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(i?.isMonthlyInterestPayment)}),u=li(m,s),{income:g,finalSum:x,rate:f,isUnavailableByTerm:b,depositeName:y}=u;return o(Br,{className:e,title:t,...d,children:c("section",{className:p(Mr,e),children:[c("div",{className:Pr,children:[$r({title:"Сумма, ₽",min:u.minSum,max:u.maxSum,...h("moneyValue"),value:u.moneyValue}),(v={title:"Срок, дней",min:u.minDays,max:u.maxDays,...h("daysValue"),value:u.daysValue},o(Bn,{items:[`От ${Wr(v.min||0)}`,`До ${Wr(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[ii(u,h),Yr({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),jr({rate:f,depositeName:y,isShowDepositeName:r,isUnavailableByTerm:b}),Gr({income:g,finalSum:x,buttons:l,footnotes:[n,a]})]})});var v})),ii=(e,t)=>c("div",{className:"space-y-s",children:[o(je,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(sl,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(sl,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),si=(e,t)=>{if(!t?.length)return;const l=t?.reduce(((t,l)=>e[0](l.rate,t[0].rate)?[l]:l.rate===t[0].rate?[...t,l]:t),[t[0]]);return l.length>1?l.reduce(((t,l)=>e[1](l,t)?l:t),l[0]):l[0]},oi=({min:e=0,max:t=0,availableMonths:l,...n})=>o(Bn,{items:[`От ${ci(e)}`,`До ${ci(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),ci=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,di=e=>Xr({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),mi=({field:e,defParams:t,calcParams:l,map:n,monthsValue:a="maxMonths"})=>{Object.entries(n).forEach((([l,n])=>{e?.(l)?.onChange?.(t?.[n])})),e?.("monthsValue")?.onChange?.(kn(t?.[a],l.minMonths,l.maxMonths))},hi=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:r}=t;if(0===e)return 0;if(l){const t=e/1200;return r?(n+r)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},ui={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},pi=e=>gi({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&gi({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&gi({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&gi({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),gi=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],xi=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,r=t?.rateRows||[ui],i=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>pi({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:s,maxSum:o}=Qr(["minSum","maxSum"],i,r),{minMonths:c,maxMonths:d}=Qr(["minMonths","maxMonths"],i,r),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>pi({row:e,userInputParams:t,paramsViewSettings:l})&&Zr(n,["minSum","maxSum"],e)&&Zr(a,["minMonths","maxMonths"],e)))||ui)({rateRows:r,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:h}=m,u=hi(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:n,monthsValue:a,monthlyPayment:u}},fi=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),bi={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},yi=St((({className:e,title:t,calcSource:l,buttons:n,footnote:r,paramsViewSettings:i,defaultParams:s,...d})=>{const m=(h=l?.rateRows,si([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],h));var h;const[u,{field:g}]=Kt({moneyValue:Ur(s,2e5),monthsValue:Hr(s,Fr),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),x=xi(u,l,i),f=di({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(kn(u.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(kn(u.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!fi(s)&&m&&mi({field:g,defParams:m,calcParams:x,map:bi,monthsValue:"minMonths"})}),[l,s]),o(Br,{className:e,title:t,...d,children:c("section",{className:p(Mr,e),children:[c("div",{className:Pr,children:[$r({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),oi({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),vi({...x,...i},g),o("div",{className:"sm:hidden",children:f})]}),jr({rate:x.rate}),c("div",{className:Rr,children:[o(Vr,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),Xe(n,{isVertical:!0}),zr(r)]})]})})})),vi=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(sl,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(sl,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(sl,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(sl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Ni=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,r]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,r)]):l++}return t},wi={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},ki=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,r=t?.rateRows?.[0]?Ti(t.rateRows[0].minMonths,t.rateRows[0].maxMonths):0,i=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=t?.rateRows?.find((t=>Ci({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:i})&&Ci({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&Zr(n,["minSum","maxSum"],t)&&Zr(a||r,["minMonths","maxMonths"],t)))||wi,{rate:c}=o,d=Si(c,e),m=n+d,h=t?.rateRows||[wi];return{...o,...Jr(["minSum","maxSum"],h),...Jr(["minMonths","maxMonths"],h),availableMonths:Ni(h.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:d,finalSum:m}},Si=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},Ci=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Ti=(e,t)=>e+Math.round((t-e)/2),Ii={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",moneyValue:"minSum"},Bi=St((({className:e,title:t,calcSource:l,buttons:n,footnote:r,paramsViewSettings:i,defaultParams:s,...d})=>{const m=(h=l?.rateRows,si([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],h));var h;const[u,{field:g}]=Kt({moneyValue:Ur(s,2e4),monthsValue:Hr(s),isMonthlyInterestPayment:Boolean(s?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(s?.isRemoteRegistration)}),x=ki(u,l,i),{defaultMonth:f,rate:b,income:y,finalSum:v}=x,{onChange:N}=g("monthsValue"),{onChange:w}=g("moneyValue");return a((()=>{!u.monthsValue&&N&&N(f)}),[f]),a((()=>{w&&w(kn(u.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{!fi(s)&&m&&mi({field:g,defParams:m,calcParams:x,monthsValue:"minMonths",map:Ii})}),[l,s]),o(Br,{className:e,title:t,...d,children:c("section",{className:p(Mr,e),children:[c("div",{className:Pr,children:[$r({title:"Сумма, ₽",min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),oi({title:"Срок, месяцев",min:x.minMonths,max:x.maxMonths,availableMonths:x.availableMonths,...g("monthsValue"),value:x.monthsValue}),Mi({...x,...i},g)]}),jr({rate:b}),Gr({income:y,finalSum:v,buttons:n,footnotes:[r]})]})})})),Mi=(e,t)=>{return c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?Yr({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Xr({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Pi=e=>Ri({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Ri({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Ri=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Vi={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},zi=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i}=e,s=t?.rateRows||[Vi],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Pi({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Qr(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Qr(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i})=>e?.find((e=>Pi({row:e,userInputParams:t,paramsViewSettings:l})&&Zr(n+i,["minSum","maxSum"],e)&&Zr(r,["minSumOld","maxSumOld"],e)&&Zr(i,["minSumExtra","maxSumExtra"],e)&&Zr(a,["minMonths","maxMonths"],e)))||Vi)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i}),{rate:p}=u,g=hi(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i,monthlyPayment:g,benefit:x}},Di=St((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,paramsViewSettings:r,...i})=>{const[s,{field:d}]=Kt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=zi(s,l,r),h=di({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Br,{className:e,title:t,...i,children:c("section",{className:p(Mr,e),children:[c("div",{className:Pr,children:[$r({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),$r({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),oi({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Ai({...m,...r},d),m.isExtraMoney?$r({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:h})]}),jr({rate:m.rate,fractionDigits:1}),c("div",{className:Rr,children:[o(Vr,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Vr,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),Xe(n,{isVertical:!0}),zr(a)]})]})})})),Ai=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(sl,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(sl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(sl,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),ji=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:i=0,...s}=e,c=wn(e,{normalize:(e=a)=>l&&n?String(kn(Number($i(e)),l,n)):$i(e),format:tt(i)}),d=r((e=>t&&t($i(e))),[t]);return o(pl,{onChange:d,...s,...c})})),$i=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),_i=d((e=>o(ji,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(je,{size:"text-xl",font:"font-light",children:"₽"})})}))),Li={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Oi={amount:1500},Ei=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",button:r,formType:i="private",...s})=>{const[{amount:d},{field:m}]=Kt(Oi),[h,u]=n(!1);return a((()=>{u(d<=0)}),[d]),c(x,{className:p("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(w,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Li[i],children:[o(_i,{valid:!h,label:l,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),r?.text?o(Jt,{className:"w-full mt-lg",type:"submit",disabled:h,children:r.text}):null]})]})})),Fi=({className:e,text:t="ХИТ"}={})=>c("div",{className:p("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Ui="relative h-full",Hi={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Wi=({noCardBorder:e,cardSize:t="normal",...l})=>{const{blocks:n}=l.block||{},a=n?.some(Xi);return R({...l,renderProps:(l,n,r)=>c("div",{className:qi(l,{someCardsHighlighted:a}),children:[B(l,n,{className:Ki(l,{someCardsHighlighted:a,showBorder:!e,cardSize:t}),blockIndex:r}),Xi(l)?Fi({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},qi=(e,{someCardsHighlighted:t})=>p(Ui,t&&(Xi(e)?"pt-3xl":"pt-3xl sm:pt-16")),Ki=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>p(Ui,"min-w-80",Hi[n],t&&(Xi(e)?"pt-3xl sm:pt-16":"pt-3xl"),ba(l),l&&"h-full"),Xi=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Yi=St((({className:e,visibleItemCount:t=1,noCardBorder:l,arrowsPadded:n=!0,isGap:a=!0,cardSize:r="normal",...i})=>o(x,{className:p(e),defaultPadding:"p-6xl",...i,children:o(Wa,{className:p("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:n,hasBlur:!0,children:Wi({noCardBorder:l,cardSize:r,...i})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Gi="z-10 border border-solid w-full h-full",Qi=p(Gi,"absolute hidden @xl:block border-transparent"),Ji=d((({className:e,title:t,description:l,button:n,...a})=>o(x,{className:p("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:p(Qi,"top-9 right-12 bg-green-dark")}),o("div",{className:p(Qi,"top-6 right-8 bg-green")}),o("div",{className:p(Qi,"top-3 right-4 bg-green-light")}),c("div",{className:p(Gi,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Xe([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Zi={black:"bg-black",white:"bg-white"},es=d((({className:e="",title:t,description:l,image:n,price:a,button:r,colors:i=[],align:s="text-left",padding:d,...m})=>o(x,{className:p("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(we,{className:"h-full",padding:d,title:o(C,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(le,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Xe([r],{buttonClassName:"w-full self-end"}),children:[i?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(je,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),i.map(ts)]}):null,a?c(je,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),ts=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Zi[e]}`},String(t)),ls=d((({icon:e,...t})=>{const l=me(),{text:n,href:a,target:r,onClick:i}=l(t);return n?o("div",{className:p("h-32 rounded-lg bg-white text-secondary-text flex items-center justify-center"),children:o("a",{role:"link",href:a,target:r,onClick:i,children:c("div",{className:"flex flex-col items-center gap-4 break-words max-w-[150px]",children:[e?o(le,{className:p(""),image:{...e,iconVersion:e?.iconVersion},width:"50",height:"50",alt:n}):null,o("div",{className:"text-primary-text text-center text-sm whitespace-wrap min-h-8",children:n})]})})}):null})),ns=d((({className:e,additionalDescription:t,description:l,links:n,title:a,...r})=>o(x,{defaultPadding:"p-5xl",className:p("overflow-hidden",e),...r,children:c("div",{className:"flex flex-col lg:flex-row gap-4xl justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?as(n):null]})}))),as=e=>o("div",{className:p("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-4"),children:e.map(((e,t)=>o(ls,{...e},String(t))))}),rs=d((({className:e="",href:t,target:l,onClick:n,data:a,children:r})=>{const i=me()({href:t,target:l,onClick:n});return o(t?"a":"div",{className:p("block",e),...t?i:{},role:t?"link":"none",...he(a),children:r})})),is=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],ss=d((({className:e="",media:t,showButtonText:l,stretched:a,version:r="white",children:i})=>{if(!t?.length)return null;const[s,d]=n(),m=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:i}=(e=>is.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ke(n)?n:i,c=l?{text:a}:{text:""};return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:"color"},version:e?.version??r}})),h=p("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",os(a));return c("div",{className:p("flex flex-col gap-m xl:gap-xs",e),children:[o("div",{className:"flex gap-xs",children:Xe(m,{className:cs(s??!1,a??!1,l),buttonClassName:h})}),i?o(je,{size:"text-s",font:"font-light",color:"text-secondary-text",children:i}):null]})})),os=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",cs=(e,t,l=!1)=>p(e||t?"basis-full":"",!t||l&&e?"":"flex-nowrap"),ds=d((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:r,items:i=[],isDotted:s,socialMedia:d=[],target:m,title:h,align:u="text-left",benefits:g,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},...v})=>o(x,{className:p("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...v,children:o(rs,{href:a,target:m,className:"h-full",children:c(we,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:h,description:l,headlineVersion:"XS",isEmbedded:!0,align:u}),...ot(Ke(r)?o(le,{image:r}):null,f),buttons:d.length?o(ss,{media:d,stretched:!0,showButtonText:!0,version:v?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(qe,{benefits:g}),o(et,{items:i,isDotted:s,listItemSize:"S"}),ms(n,u)]})})}))),ms=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,hs=(e,t)=>{const{title:l,description:n,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[l?o("div",{className:"opacity-80",children:o(je,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(je,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:Xe(a)}):null]},String(t))},us=d((({className:e="",title:t,align:l="text-center",icon:r,button:i,visibleCellsCount:s=1,cardCells:d=[],options:m,data:u,...g})=>{const f=d.map(hs),[b,y]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[v,N]=n(!1);return a((()=>h.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&N(e.isUnfolded)}))),[m?.parent]),c(x,{className:p("flex flex-col",e),defaultPadding:"p-2xl",...g,children:[Ke(r)?o("div",{className:"self-center",children:o(le,{image:r})}):null,t?o(w,{className:p("pt-xs",l),headingType:"h5",title:t}):null,i?.text?o(fe,{className:"w-full mt-m mb-lg",...i}):null,y.length?o(Qa,{renderFoldableSection:()=>c("div",{children:[b,o(Ja,{isUnfolded:v,children:y})]}),renderFoldButton:d.length>1?ps(v,m?.parent,u):null}):o("div",{children:b})]})})),ps=(e,t,l)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&h.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",...e?he(l):{},children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),gs=(e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[i,s]=n(t),o=r((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=r((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&i<l-a:i<l-1,m=i>0;return[i,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},xs="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",fs="border-gray border-solid border",bs="border-main-divider border-b",ys="w-52",vs=d((({icon:e,image:t,title:l,link:n})=>c("div",{className:p("w-80 box-border flex flex-col gap-m items-center rounded-t-md border-b-0 p-2xl",fs,xs),role:"columnheader",children:[e&&!t?.src&&o(le,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}),t?.src&&o(le,{image:t}),l?o(w,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,n?.text&&o("div",{className:"mt-auto w-full",children:o(fe,{href:n.href,target:n.target||"",className:"w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:o("div",{className:"py-s",children:o(k,{size:"text-xs",font:"font-medium",children:n.text})})})})]}))),Ns={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},ws=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Ns[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),ks=d((({children:e})=>o("div",{className:"self-start flex flex-col",role:"row",children:o("div",{className:"flex gap-xl",children:e})}))),Ss=d((({colHeaders:e,activeIndex:t})=>c(ks,{children:[o("div",{className:ys,role:"columnheader"}),o(ws,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>o(vs,{...e},String(t))))})]})));function Cs({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:r=""}){return l||n?c("div",{children:[l?o(Pa,{className:p("absolute z-40",a[0],r),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(Pa,{className:p("absolute z-40 rotate-180",a[1],r),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Ts=d((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:n})=>{const a=p("w-80 box-border flex flex-col",fs,l?"border-t-0 rounded-b-md":"border-y-0",n?xs:""),r=p("mx-2xl h-full",bs,n&&t?"border-t":"",l?"border-b-0":"border-solid");return o("div",{className:a,role:"cell",children:o("div",{className:r,children:e?e.map(((e,t)=>Ms(e,t,n))):null})})})),Is=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),Bs=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),Ms=({label:e,description:t},l,n)=>c("div",{className:"first:pt-2xl pt-xl last:pb-2xl",children:[e?o("h4",{className:Is(n),children:e}):null,t?o("div",{className:Bs(n),children:t}):null]},String(l)),Ps=(e=!1)=>p("py-2xl",bs,ys,e?"border-b-0":"border-solid"),Rs=d((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:n,isFirstRow:a,isLastRow:r})=>c(ks,{children:[e?.title?o("div",{className:Ps(r),children:o(k,{size:"text-s",children:e.title})}):null,t?.length?o(ws,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>o(Ts,{cell:e,isFirstRow:a,isLastRow:r,isFillGradient:n&&0===t},String(t))))}):null]}))),Vs=d((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:n})=>{const{isScrollAvailable:a}=n;return c("div",{className:"relative",children:[e.map(((e,n,{length:a})=>o(Rs,{row:e,isFirstRow:0===n,isLastRow:n+1===a,activeIndex:l,isColoredFirstColumn:t},String(n)))),a?Cs({...n,btnClass:["top-28","top-12"],className:"right-7",isDisabled:!0}):null]})})),zs=d((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:n,isColoredFirstColumn:a})=>{const r=e?.map((({header:e})=>e||{})),i=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:i.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:n),[d,m]=gs({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:h}=m;return c("div",{children:[c("div",{role:"table",children:[r?.length?o(Ss,{colHeaders:r,activeIndex:d}):null,s?.length?o(Vs,{rowData:s,isColoredFirstColumn:a,activeIndex:d,controls:m}):null]}),h?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Ds=d((({className:e="",title:t,rowHeaders:l,columns:a,visibleRowLength:i=0,isColoredFirstColumn:s=!1,...d})=>{const[m,h]=n(!i),u=r((()=>h((e=>!e))),[]);return c(x,{className:p("overflow-hidden relative",e),defaultPadding:"p-6xl",...d,children:[o(w,{headingType:"h2",className:"text-center mb-4xl mx-auto",title:t}),o(zs,{columns:a,rowHeaders:l,isShowAllRow:m,isColoredFirstColumn:s,visibleRowLength:i}),i?As({isShowAllRow:m,onClick:u}):null]})})),As=({isShowAllRow:e,onClick:t})=>o("div",{className:"pr-6xl",children:c("div",{className:"flex gap-m w-full",children:[o("div",{className:ys}),o("button",{type:"button",onClick:t,className:"py-xs flex-1 border-gray border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:o(je,{size:"text-xs",font:"font-medium",children:e?"Скрыть":"Показать все параметры"})})]})}),js=d((({className:e,contacts:t,info:l,version:n="secondary",...a})=>c(x,{className:p("flex",e),defaultPadding:"p-6xl",version:n,...a,children:[l?.length?$s(l):null,t?.length?$s(t):null]}))),$s=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>_s({column:e,index:t})))}),_s=({column:e,index:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:l,button:n},a)=>c("div",{children:[o(C,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),l?o("div",{className:"mt-xs opacity-80",children:o(k,{size:"text-m",font:"font-light",children:l})}):null,n?.text?o(fe,{className:"mt-xl",...n}):null]},String(a))))},`col-${String(t)}`):null,Ls=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Os=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),Es=1e9,Fs={sum:{min:1e4,max:Es},period:3},Us=St((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...r})=>{const[,{blocksToRender:i,blocksWithProps:s},{field:d,reset:m}]=ur(Fs,{block:r.block,page:r.options?.page,normalize:e=>({...e,period:Hs(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),u=Ws(h);return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...r,children:[o(ir,{filtrationSchema:t,resetButton:l,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(_i,{label:n?.title,min:500,max:Es,...d("sum",{parse:e=>({min:Number(e),max:Es}),format:({min:e})=>String(e)})}),o(Bn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:u,...d("period")})]})}),o(lr,{blocksToRender:i,...r})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Hs=e=>yt((e?.paramsSource?.rateRows||[]).filter(Ls).flatMap((e=>Os(e.minMonths,e.maxMonths)))),Ws=e=>yt(e.flatMap((e=>e||[])).filter(Ls).flatMap((e=>Os(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],qs=[{key:"10"},{key:"50"},{key:"100"}],Ks=({itemCount:e,onItemCountChange:t})=>{const l=r((({key:e})=>t(Number(e))),[]);return c("div",{className:"flex items-center gap-s",children:[o("span",{children:"Показать по"}),o(wl,{className:"min-w-20",onChange:l,value:{key:String(e)},options:qs,iconVersion:"black"})]})},Xs="py-m px-lg rounded-md cursor-pointer hover:bg-primary-hover hover:text-white",Ys=(e,t)=>{const{currentPage:l,onPageChange:n,totalPages:a}=e,r=t+1;return r===l?o("div",{"aria-current":"true",className:"py-m px-lg bg-primary-main text-white rounded-md",children:r},String(t)):1!==r&&r!==a&&((e,t,l)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,l)=>t<=2&&e<=t+2||t>=l-1&&e>=l-3)(e,t,l))(r,l,a)?o("div",{onClick:()=>n(r),className:Xs,"aria-label":`Страница ${r}`,children:r},String(t)):null},Gs={width:"24",height:"24"},Qs=({currentPage:e,onPageChange:t,totalPages:l})=>{const n=i((()=>Array.from({length:l}).fill({currentPage:e,onPageChange:t,totalPages:l})),[l,e]),a=r((()=>{e>1&&t(e-1)}),[e]),s=r((()=>{e<l&&t(e+1)}),[e,l]),d=r((()=>t(1)),[]),m=r((()=>t(l)),[l]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Js(1===e),...Gs})}),c("div",{className:"flex gap-2xs",children:[e>1?o("div",{onClick:d,className:Xs,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m px-s",children:"..."}):null,n.map(Ys),e<l-2?o("div",{className:"py-m px-s",children:"..."}):null,e<l?o("div",{onClick:m,className:Xs,"aria-label":`Страница ${l}`,children:l}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Js(e===l),...Gs})})]})},Js=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Zs=({currentPage:e,onPageChange:t,totalPages:l,itemCount:n,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Qs,{currentPage:e,onPageChange:t,totalPages:l}),n&&a?o(Ks,{itemCount:n,onItemCountChange:a}):null]}),eo=d((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:i="Поиск по сайту"})=>{const s=r((e=>{n&&n(e.target?.value||"")}),[n]);return c("div",{className:p("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(le,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:p("h-14 w-full px-10 text-l text-black box-border rounded-md",ul),value:t,type:"text",name:"search-bar-input",placeholder:i,autoFocus:l,onChange:s,onFocus:a})]})})),to=d((({field:e,onClearFilter:t,filtrationState:l})=>c("div",{className:"grid grid-cols-12 mb-3xl space-x-xl",children:[o(eo,{className:"col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o($l,{className:"col-span-3",label:"Период от",maxDate:l.endDate,...e("startDate")}),o($l,{className:"col-span-3",label:"Период до",minDate:l.startDate,...e("endDate")}),o("div",{className:"col-span-2 mt-auto",children:o(Jt,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),lo=({title:e,timestamp:t,publicId:l})=>{const n=me(),{href:a}=n({href:`/api/v1/depository/${l}/file`});return c("div",{className:"grid grid-cols-12 py-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-2",children:t?o(je,{size:"text-m","font-weight":"font-light",children:Bt(t)}):null}),o("div",{className:"col-span-10 text-h6 hover:text-primary-active",children:o("a",{href:a,download:!0,"aria-label":"Скачать",children:e})})]},l)},no="/api/v1/depository",ao={startDate:void 0,endDate:void 0,query:""},ro=St((({className:e,...t})=>{const[l,a]=n(0),[i,s]=n(10),[d,{field:m,reset:h}]=Kt(ao),{totalPages:u=0,items:g=[]}=(({size:e,page:t,query:l,startDate:n,endDate:a})=>{const r=n?Bt(n,!0):"",i=a?Bt(a,!0):"",s=new URLSearchParams(no);s.set("page",String(t)),s.set("size",String(e)),s.set("query",l),s.set("timestampStart",r),s.set("timestampEnd",i);const o=`?${s.toString()}`,{data:c}=xn(no+o,bt);return{items:c?.content,totalPages:c?.totalPages}})({size:i,page:l,...d}),f=r((e=>a(e-1)),[]),b=r((e=>{i!==e?(s(e),a(0)):s(e)}),[]);return c(x,{className:p(e,"container p-6xl"),...t,children:[o(to,{filtrationState:d,field:m,onClearFilter:h}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-2",children:o(je,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-10",children:o(je,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),g.length?g.map((e=>o(lo,{...e},String(e.publicId)))):o(fa,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Zs,{currentPage:l+1,onPageChange:f,totalPages:u,itemCount:i,onItemCountChange:b})]})]})})),io=e=>"Image"===e?.contentType&&e?.image?o(le,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,so=d((({className:e="",title:t,description:l,error:n,button:a,...r})=>c(x,{className:p("flex flex-col justify-center items-center",e),defaultPadding:p("p-6xl"),version:"transparent",...r,children:[o("div",{className:"flex justify-center",children:io(n)}),o(C,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(fe,{version:a?.version,text:a?.text,...a}):null]}))),oo="location";function co(e="Москва"){const[t,l]=((e,t,l)=>{const[i,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[i,r((l=>e.fire(t,l)),[e,t])]})(h,"location",ho()??{name:e}),i=r((e=>{uo(e),l(e)}),[]),{data:s}=xn(mo()?null:"/api/v1/region",bt);return a((()=>{s&&!mo()&&l(s)}),[s]),[t??{name:e},i]}const mo=()=>Boolean(globalThis.localStorage?.getItem(oo)),ho=()=>{try{const e=globalThis.localStorage?.getItem(oo);return e&&JSON.parse(e)}catch(e){return null}},uo=e=>{try{globalThis.localStorage?.setItem(oo,JSON.stringify(e))}catch(e){}};var po;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(po||(po={}));const go=new Intl.NumberFormat("ru",{style:"currency",currency:po.RUB}),xo=e=>e?go.format(e):"",fo="text-m font-light text-secondary-text ",bo=`${fo} text-left`,yo=`${fo} pl-5xl text-center`,vo=`${fo} pl-5xl text-right`,No={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},wo=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:p("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:bo,children:o(je,{size:"text-m",children:"Валюта"})}),o("th",{className:yo,children:o(je,{size:"text-m",children:"Купить"})}),o("th",{className:vo,children:o(je,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(ko)})]}))),ko=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(le,{image:{icon:No[t]},width:"24",height:"24"}):null,o(je,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(je,{size:"text-h6",children:xo(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(je,{size:"text-h6",children:xo(e?.buyExchangeRate)})})]},t)},So={icon:"GpsIcon"},Co=d((({className:e="",address:t})=>c("div",{className:p("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(yr,{...So,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),To=(e,t,l)=>{const n=Number(Io(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Io=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Bo=e=>Ot([[e=>e.value!==po.RUB&&e.oppositeValue!==po.RUB,()=>e.handleConvert(e.value,po.RUB)],[e=>e.value===po.RUB&&e.oppositeValue===po.RUB,()=>e.handleConvert(e.value,po.USD)],[e=>e.value===po.RUB&&e.oppositeValue===po.RUB,()=>e.handleConvert(e.value,po.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Mo(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:r,setSelected:i}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:n,text:n};return c("div",{className:"relative flex",children:[o(pl,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:r}),s.length?o(wl,{isBorder:!1,onChange:e=>i(e.key),options:s,value:d}):null]})}const Po=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[i,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||po.RUB,selectBuy:l?.[0]?.currency?.currency||po.USD}),d=r((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[Mo({placeholder:"Хочу продать",rates:l,selected:i.selectSell,setSelected:Ro(i,d,l),value:i.inputSell,setValue:e=>zo(d,l)(e,i.selectSell,i.selectBuy)}),Mo({placeholder:"Получу",rates:t,selected:i.selectBuy,setSelected:Vo(i,d,t),value:i.inputBuy,setValue:e=>Do(d,t)(e,i.selectBuy,i.selectSell)}),a?.text?o(fe,{text:a.text,version:a?.version,...a}):null]})})),Ro=(e,t,l)=>n=>{t({selectSell:n}),Bo({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{zo(t,l)(e.inputSell,n,a)}})},Vo=(e,t,l)=>n=>{t({selectBuy:n}),Bo({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Do(t,l)(e.inputBuy,n,a)})},zo=(e,t)=>(l,n,a)=>{e({inputSell:Io(l),selectBuy:a});const r=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;r&&e({inputBuy:String(To(l,r,n===po.RUB)||"")})},Do=(e,t)=>(l,n,a)=>{e({inputBuy:Io(l),selectSell:a});const r=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;r&&e({inputSell:String(To(l,r,n===po.RUB)||"")})};const Ao=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=co(),r=function(e){const t=e?.code||"000",{data:l}=xn(`/api/v1/exchangerates?regionCode=${t}`,bt);return l||{}}(a),i=jo(r?.exchangeRate?.currencies),s=i.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:po.RUB}});const d=i.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:po.RUB}}),o(x,{className:p("box-border min-h-80",e),...n,children:o(we,{className:"h-full",title:o(w,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[i?o(wo,{className:"mb-xl",exchangeCurrencyItems:i}):null,o(Co,{address:r?.address})]}),i.length&&s.length&&d.length?o(Po,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:l}):null]})})})})),jo=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],$o=d((({className:e="",items:t})=>{const l=me();return o("ul",{className:p("flex flex-col gap-s w-full",e),children:t?.map(_o(l))})})),_o=e=>({dataFooter:t,...l},n)=>{const{text:a,href:r,target:i,onClick:s}=e(l);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:r,target:i||"_self",onClick:s,...he(t),children:a||null})},String(n)):null},Lo=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),Oo=["all","footer"],Eo=d((({className:e,topItems:t})=>{const l=me();return o("div",{role:"menu",className:p("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(Lo(Oo)).map(l).map(Fo)})})),Fo=(e,t)=>{const{text:l,items:n=[],href:a,target:r="_self",onClick:i,dataFooter:s}=e,d=n.filter(Lo(Oo));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:r,onClick:i,...he(s),children:l}),d?o($o,{items:d}):null]},String(t))},Uo=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:p("space-y-m",e),children:t.map(Ho)}):null)),Ho=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(je,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(Wo)})]},String(t)),Wo=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:qo(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),qo=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Ko(t)}`,children:o(je,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Ko=e=>e.replaceAll(/\D/g,""),Xo=d((({className:e="",index:t,text:l,...n})=>{const a=me(),{href:r,target:i,onClick:s}=a(n);return o("a",{className:p("text-secondary-text",e),href:r,target:i,onClick:s,children:l||`Документ ${t}`})})),Yo=d((({className:e="",title:t,links:l})=>o("div",{className:e,children:l?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(je,{size:"text-l",font:"font-normal",children:t})}),l.map(((e,t)=>o(Xo,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Go={width:"40",height:"45"},Qo={"bg-white":"color",transparent:"white"},Jo={"bg-white":"text-primary-main",transparent:"text-white"},Zo=(e,t,l)=>o(le,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Qo[e]},className:Jo[e],width:l?.width,height:l?.height}),ec={"bg-white":"text-primary-text",transparent:"text-white"},tc=d((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:r="bg-white",showTitle:i=!0,data:s})=>c("a",{className:p("inline-flex items-center font-sans no-underline",e),href:l?.href??t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",...he(s),children:[Zo(r,l?.image,Go),i?n??o("div",{className:"ml-s",children:o(je,{font:"font-medium",color:ec[r],size:"",children:l?.title??"Россельхозбанк"})}):null]})));function lc(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const nc=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=Array.from({length:e.length}),a=Array.from({length:t.length});let r=0;for(let i=0;i<e.length;i++){const s=Math.max(0,i-l),o=Math.min(i+l,t.length-1);for(let l=s;l<=o;l++)n[i]||a[l]||e[i]!==t[l]||(r++,n[i]=!0,a[l]=!0)}return{m:r,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const r=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let r=0,i=0;r<e.length;r++){if(!l[r])continue;let s=i;for(;s<t.length;s++)if(n[s]){i=s+1;break}e[r]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),i=(l/e.length+l/t.length+(l-r/2)/l)/3,s=i>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return i+s*(1-i)};const ac=(e,t)=>(l,n)=>{for(const[a,r]of n)l.set(a,e(l.get(a)||t,r));return l},rc=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),ic=e=>t=>e.map((([e,l])=>[nc(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>oc(t,e))).reduce(ac(Math.max,0),new Map),sc=e=>t=>{return cr(t,t.map((({title:e})=>e)).map((e=>t=>{const l=rc(t||"");return l.length?Re(e.map((e=>La(l.map(nc(e)))))):0})(e))).sort((n=([,e])=>e,l=(e,t)=>n(e)-n(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,n},oc=(e,t)=>new Map(e.map((e=>[e,t]))),cc=({basePathList:e,initialQuery:t=""})=>{const[l,r]=n(t||"");a((()=>{null!=t&&r(t)}),[t]);const{data:i}=xn(e?.length?e:null,dc),[s,o]=n(null);return lc((()=>{i&&o(i.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=rc(e);if(!a.length)return[];const r=Object.entries(n),i=[...a.map(ic(r)).reduce(ac(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return sc(a)(i)})(l)))}),[i,l]),[s,{value:l,onChange:r}]},dc=async(...e)=>(await Promise.allSettled(e.map((e=>ft(_(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),mc=d((({initialQuery:e,topItems:t})=>{const l=i((()=>t?.map((e=>e.href||"/"))),[t]),[n,a]=cc({basePathList:l,initialQuery:e}),r=i((()=>hc(t)(n)),[t,n]);return o(el,{head:o(eo,{autoFocus:!0,...a}),children:o(Eo,{topItems:r})})})),hc=e=>t=>e?.length&&t?.length?cr(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:_("/",t)})))}))):[],uc=(e={})=>{const{open:t,close:l}=ce();return{open:(l={},n={})=>t(o(mc,{...e,...l}),n),close:l}},pc=d((({className:e,search:t,...l})=>{const[a,i]=n(""),s=r((()=>i("")),[]),d=uc(l),m=r((e=>{i(e),gc(e)&&d.open({initialQuery:e},{onClose:s})}),[s,d]);return c("div",{className:p("relative",e),role:"search",children:[o(eo,{value:a,placeholder:t?.placeholder,onChange:m}),o(Zt,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),gc=e=>e&&e.length>=3,xc=(e,t="")=>{const{logo:l}=e??{},{dataHeader:n,dataFooter:a,...r}=l??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(tc,{className:t,logo:r,data:a}),o(pc,{className:"grow",...e})]})},fc=d((({className:e="",index:t,...l})=>{const n=me(),{href:a,target:r,text:i,onClick:s}=n(l);return o("a",{className:p("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:r,onClick:s,children:i||`Документ ${t}`})})),bc=d((({className:e="",links:t,license:l})=>c("div",{className:p("@container space-y-lg",e),children:[l?o("div",{children:o(je,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${l}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(fc,{index:t,...e},String(t))))}):null]}))),yc="w-full lg:w-52",vc=St((({className:e,footer:t,...l})=>{const n=l.options?.page?.sitemap??{},{documents:a,relatedEnterprises:r,contacts:i,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:h,otherLinks:u=[]}=t??{};return c(x,{tag:"footer",className:p("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...l,children:[xc(n,yc),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Eo,{...n}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:p(yc,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Uo,{items:i}),m?o(fe,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(ss,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),u.map(((e,t)=>o(fe,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Yo,{title:d,links:r}),o(bc,{links:a,license:h})]})})),Nc=d((({className:e="",title:t,description:l,calendar:n,...a})=>c(x,{className:p("space-y-m",e),defaultPadding:"p-6xl",...a,children:[o(C,{title:t,description:l,headlineVersion:"M",isEmbedded:!0}),n?wc(n):null]}))),wc=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),l=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:l.map((e=>kc(e,t)))}),o("div",{className:"flex gap-s w-full",children:l.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:Sc(e)}),c("div",{className:"text-s",children:[o(je,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(je,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},kc=(e,t)=>e.month?.map(((e,l)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),Sc=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(le,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Cc=(e,t)=>e?.map((({aspectName:e,params:l})=>({aspectName:e,params:"mindboxEvent"===e?{...l,eventJson:t}:l}))),Tc=St((({className:e,title:t,button:l,regionSource:a,data:r,...i})=>{const[s,d]=n({key:""}),m=a?.regions??[],h=oe({className:"text-white",version:l?.version||"primary"}),u=m?.find((e=>e.name===s.key))?.href,g=l?.text?l.text:"Перейти";return o(x,{className:e,defaultPadding:"p-6xl",...i,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Yl,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,u?o("div",{className:"text-center",children:o(fe,{href:u,target:"_blank",className:p("p-m w-full @xl:w-auto",h),data:Cc(r,s?.key),children:g})}):null]})})}));function Ic(e=[]){const t=u(),l=Array.from(e.entries()).filter((([,e])=>Bc(t)(e)));return l.find((([,e])=>Bc(t,!0)(e)))??l[l.length-1]??[]}const Bc=(e,t=!1)=>({href:l})=>{if(!l)return!1;const n=$(Mc(e)(l));return t?n===$(l):n.startsWith($(l))},Mc=e=>t=>{const l=G(Y.SITE_URL);return D(t)?e.href:_(l,e.pathname)},Pc=d((({className:e="",items:t,activeItem:l,ariaLabel:n})=>{const[a,{setFalse:r,toggle:i}]=ml(!1),s=bl(r);return c("div",{className:p(a?"bg-white rounded-md shadow-blue-gray":"",e),ref:s,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":n,onClick:i,children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{className:p("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40 translate-x-[-100%]",a?"":"hidden"),"aria-hidden":!a,children:t?.map(((e,t)=>o(Rc,{isActive:e===l,...e},e?.text??String(t))))})]})})),Rc=d((({isActive:e,...t})=>{const l=me(),{text:n,href:a,target:r,onClick:i}=l(t);return o("a",{className:p("text-l font-light pb-m hover:text-primary-main",e?"text-primary-main":""),href:a,target:r,onClick:i,role:"menuitem",...he(t?.data),children:n})})),Vc={default:"w-6 h-6",large:"w-12 h-12"},zc=d((({className:e,isRounded:t,buttonSize:l="default",isGrayBg:n=!1,disabled:a,ariaLabel:r,image:i,data:s,onClick:c})=>o("button",{className:p("group/btn border-0 flex shrink-0 items-center",n?"p-s rounded-full":"p-0 bg-inherit",n&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Vc[l]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":r,onClick:c,...he(s),children:o(le,{image:i,className:p("h-full",t?"bg-main-divider/20 rounded-full":""),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Dc=e=>globalThis[e],Ac=(e,t)=>{const l=document.getElementById(t);if(l){const t=Dc(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(Dc(e))}))}))}return new Promise(((l,n)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{l(Dc(e))})),a.addEventListener("error",(e=>{n(e)})),document.head.appendChild(a)}))};const jc="chatbot",$c="text-page__btn-chat",_c={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Lc=d((({chat:e="personal",iconVersion:t,className:l,ariaLabel:n="Чат"})=>{const r=(e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=_c[e??""];return l=>{if(t)if("personal"!==e)Ac(jc,t);else{const e=l.target;e?.classList.contains($c)||e?.classList.add($c),document.getElementById("webchat-js-container:webchat_rshb")||Ac(jc,t)}}})(e);return o(zc,{className:l,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:n,onClick:r,buttonSize:"large",isGrayBg:!0})})),Oc=d((({className:e="",active:t,dataItemName:l,children:n,data:a,...r})=>{const i=me(),{href:s,target:d,text:m,onClick:h}=i(r);return c("a",{className:p("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":l,onClick:h,...he(a),children:[o("span",{className:Ec(t),children:m||n}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),Ec=(e=!1)=>p("font-sans text-l font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Fc=d((({observerOptions:e,onVisibilityChange:t,children:l,className:n,...a})=>{const i=va(r((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return o("span",{ref:i,className:n,role:"menuitem",children:o(Oc,{...a,children:l})})})),Uc={default:"px-lg bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Hc=d((({version:e,...t})=>{const l=t?.text;return l?o(fe,{className:p("py-s font-light whitespace-nowrap",Uc["transparent"===e?"transparent":"default"]),...t,children:l}):null})),Wc=d((({subItems:e=[],version:t,internetBankButton:l,dropdownMenuAriaLabel:a,chatBotAriaLabel:r})=>{const d="transparent"===t?"white":"black",[,m]=Ic(e),[h,u]=n(e.length),p=e.slice(h),g=s(null),x={rootRef:g},f=i((()=>e.map(((e,t)=>e=>{u(e?qc(t):Kc(t))}))),[e]);return c("nav",{className:"relative mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(Fc,{className:h-1<t?"invisible":"",active:e===m,observerOptions:x,onVisibilityChange:f[t],data:e.dataHeader,...e},String(t))))}),p.length?o(Pc,{items:p,activeItem:m,ariaLabel:a}):null,z.CHAT_BOT?o(Lc,{iconVersion:d,chat:z.CHAT_BOT,ariaLabel:r}):null,o(Hc,{version:t,...l})]})})),qc=e=>t=>Math.max(t,e+1),Kc=e=>t=>Math.min(t,e),Xc=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(je,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(Yc,{...e},String(t))))})]}):null,Yc=d((({icon:e,...t})=>{const l=me(),{text:n,target:a,href:r,onClick:i}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(le,{image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:r,target:a,onClick:i,children:o(je,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),Gc=(e,t)=>l=>l.name?o(rs,{href:`/branches/${l.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(l),data:Cc(e,l.name),children:o(je,{size:"text-l",font:"font-light",children:l.name})},String(l.id)):null,Qc=d((({className:e,searchTerm:t,onSearch:l})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:p(ul,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Jc=d((({foreignOffices:e,branches:t})=>{const[l,a]=co(t?.default),i=me(),{href:s}=i({href:`/branches/${l.slug}`}),[d,m]=n(""),h=ed(Wn()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(h,Zc),{close:p}=ce(),g=r((e=>{a(e),p()}),[]);return c(el,{className:"pb-20",head:c("div",{children:[o(je,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(rs,{href:s,className:"inline mx-2xs text-primary-main",children:l.name})]})}):null,o(Qc,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&nc(e.toLowerCase())(d.toLowerCase())>=.8)).map(Gc(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((x=g,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(je,{size:"text-h6",children:e})}),t.map(Gc(f,x))]},e)))}),Xc(e)]});var x,f})),Zc=e=>e.name?.charAt(0)||"",ed=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),td=d((({className:e="",active:t,flat:l,children:n,data:a,...r})=>{const i=me(),{href:s,target:c,text:d,onClick:m}=i(r);return o("a",{className:p(ld(t,l),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":d,...he(a),children:o("span",{suppressHydrationWarning:!0,className:nd(t,l),children:d||n})})})),ld=(e=!1,t=!1)=>p("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",t?"":"px-m py-xs"),nd=(e=!1,t=!1)=>p("font-sans text-s font-light",e?"text-primary-main":p(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),ad=d((({className:e,version:t,...l})=>{const n="transparent"===t?"white":"black",[a]=co(l?.branches?.default),i=uc(l),s=(e=>{const{open:t,close:l}=ce();return{open:(l={})=>t(o(Jc,{...e}),l),close:l}})(l),d=r((()=>i.open()),[i]),m=r((()=>s.open()),[s]);return c("div",{className:p("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[l?.branches?.visible?o(td,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:a?.name,data:Cc(l?.branches?.dataClick,a?.name??""),onClick:m}):null,l?.officesAtms?.href?o(td,{className:"whitespace-nowrap",flat:!0,...l.officesAtms}):null,o(zc,{image:{icon:"LoupeIcon",iconVersion:n},ariaLabel:l?.search?.ariaLabel??"Поиск",onClick:d,data:l?.search?.data})]})})),rd=d((({observerOptions:e,onVisibilityChange:t,children:l,className:n,...a})=>{const i=va(r((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return o("span",{ref:i,className:n,role:"menuitem",children:o(td,{...a,children:l})})})),id=d((({topItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:l,version:a,sitemap:r,bgColor:d,logo:m})=>{const[h,u]=n(e.length),p=e.slice(h),g=s(null),x={rootRef:g},f=i((()=>e.map(((e,t)=>e=>{u(e?sd(t):od(t))}))),[e]),{dataFooter:b,dataHeader:y,...v}=m??{};return c("div",{className:"flex items-center justify-between",children:[o(tc,{className:"mr-3xl",bgColor:d,logo:v,data:y}),o("div",{ref:g,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,l)=>o(rd,{className:h-1<l?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:f[l],data:e.dataHeader,...e},String(l))))}),p.length?o(Pc,{className:"mx-xs",items:p,activeItem:t,ariaLabel:l}):null,o(ad,{version:a,className:"ml-auto",...r})]})})),sd=e=>t=>Math.max(t,e+1),od=e=>t=>Math.min(t,e),cd={"bg-white":"primary",transparent:"transparent"},dd=["all","header"],md=St((({className:e,bgColor:t="bg-white",logo:l={},version:n=cd[t],portal:a,...r})=>{const i=r.options?.page?.sitemap??{},{topItems:s,logo:d={}}=i,[,m]=Ic(s),{internetBankButton:h}=a||{},u=l.image?.icon||l.image?.src?l:d;return o(x,{tag:"header",className:p("pt-m px-20",m?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:n,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(id,{activeTopItem:m,topItems:s?.filter(Lo(dd)),version:n,sitemap:i,bgColor:t,logo:u})}),o("div",{className:p("mt-s h-px bg-main-divider",hd(n))}),m?.items?.length?o(Wc,{subItems:m?.items?.filter(Lo(dd)),version:n,internetBankButton:h}):null]})})})),hd=e=>"transparent"===e?"opacity-30":"",ud=(e=!1)=>e?{}:{padding:"p-0"},pd={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},gd=St((({className:e="",padding:t="p-0",gap:l="XS",isInnerPadding:n=!0,version:a="transparent",isTheme:r=!1,isCardBorder:i,...s})=>o(x,{className:p("relative","grid grid-cols-12",pd[l],e),padding:t,version:a,isTheme:r,...s,children:R({...s,extraProps:{...ud(n),className:ba(i)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),xd=d((e=>{const{className:t,align:l,image:n,...a}=e,r=l?p("flex",Tr[l]):"";return o(x,{className:p(r,t),defaultPadding:"p-0",...a,children:o(le,{image:n})})})),fd=d((({className:e="",cards:t=[],button:l})=>{const[a,i]=n(0),s=r((e=>i(e)),[]),d=t.length,[m,h]=gs({itemCount:d,visibleItemCount:2}),{canDec:u,canInc:p}=h,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden",children:[d?bd({activeIndex:m,cards:t,selectedCardIndex:a,onClick:s}):null,Cs({...h,btnClass:["left-12","right-12"],className:"top-16"}),u?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(fe,{className:"w-60 text-center",version:"primary",...l,href:g})]})}));function bd({activeIndex:e,cards:t,selectedCardIndex:l,onClick:n}){const a=460*e,r=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${r}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n}){return c("button",{type:"button",onClick:n,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(l?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(le,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?yd("страховая сумма",e.sum):null,e?.fee?yd("страховой взнос",e.fee):null]}),vd(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})})}function yd(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(je,{size:"text-h6",children:[tt(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(je,{size:"text-l",color:"text-secondary-text",children:e})})]})}function vd(e){return e?o(le,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const Nd=d((({className:e="",title:t,insuranceTabs:l=[],button:a,...i})=>{const[s,d]=n(0),m=r((e=>d(e)),[]);return c(x,{className:p("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...i,children:[t?o(w,{className:"text-center",title:t,headingType:"h3"}):null,l?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:l.map(((e,t)=>function({title:e,i:t,isActive:l,onClick:n}){return o("button",{type:"button",onClick:n,"aria-label":e,className:"box-border px-m py-s text-m font-light "+(l?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:wd({insuranceTabs:l,button:a})})]})})),wd=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>o(fd,{button:t,cards:e},String(l)))):null};const kd={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Sd={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},Cd=d((e=>{const{className:t="",items:l,isDotted:n,investmentZeroColumn:a,investmentColumns:r,...i}=e,s=r?[...r]:[];return a&&s.unshift(a),o(x,{className:t,defaultPadding:"p-4xl",...i,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[ar(o("div",{className:"w-px h-4 bg-gray"}))(s.map(Td)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Md)})]}):null,l?.length?o(et,{className:"max-w-2xl font-light text-base",items:l,isDotted:n,listItemSize:"M"}):null]})})})),Td=(e,t,l)=>{const n=1===t,a=t===l.length-1;return o("div",{className:`${Id(n,a,e.cells)}`,children:e.cells?.length?o("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:e.cells.reverse().map(Bd)}):null},`column_${t}`)},Id=(e,t,l=[])=>[l.length?"flex-1":"flex-0",!l.length||e||t?"":"pl-s",l.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),Bd=(e,t)=>{const l=e.cellSize||"XS",n=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${Sd[l]} ${kd[n]} ${"XS"===l?"px-s":"px-5xl"}`,children:o(je,{align:"text-center",children:e.text})},`cell_${t}`):null},Md=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,Pd=["байт","Кб","Мб","Гб","Тб","Пб"],Rd=d((({icon:e,text:t,href:l,target:n,fileFormat:a,data:r,fileSize:i})=>{const s=i&&a?",":"",d=i??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:l,target:n,...he(r),children:[e,t?c(je,{size:"text-l",font:"font-light",children:[t," ",Vd(d,m),o(je,{color:"text-secondary-text",children:l&&`${d+s+m}`})]}):null]})})),Vd=(e,t)=>e||t?o("span",{children:", "}):"",zd=(e,t)=>(l,n)=>{const a=U(e)("Attachment"===l?.docType?l?.attachment?.src:l?.href),r="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Pd[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,i="Attachment"===l?.docType?Ad(a):l?.fileFormat;return c("div",{role:"listitem",children:[o(Rd,{text:l?.text,target:l?.target,href:a,fileFormat:i,fileSize:r,icon:Dd(t),data:l?.data}),o(De,{__html:l?.__html})]},String(n))},Dd=e=>e?o(le,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,Ad=e=>{if(!e)return"";const t=e.lastIndexOf("."),l=new RegExp(/\/(.*)/),n=-1!==t?e.substring(t+1):"";return n.includes("/")?n.replace(l,""):n},jd=d((({href:e,__html:t,target:l})=>{const{close:n}=ce(),a=u(),i=U(a)(e),s=r((()=>{n()}),[]);return c(el,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(De,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(fe,{text:"Я согласен",version:"primary",target:l,href:i,onClick:s}),o(Jt,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),$d=d((({text:e,href:t,target:l,__html:n})=>{if(!e&&!n)return null;const a=(e=>{const{open:t,close:l}=ce();return{open:(l={})=>t(o(jd,{...e}),l),close:l}})({__html:n,href:t,target:l}),i=r((()=>a.open()),[a]);return o("button",{className:"text-primary-main",onClick:i,children:e})})),_d={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Ld=St((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:r={icon:"DocIcon"},columnsMode:i="double",...s})=>{const d=u();return c(x,{className:p("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:p("grid gap-xl","double"===i?"@md:grid-cols-2":"grid-cols-1",_d[i]),role:"list",children:a.map(Od(d,r))}):null]})})),Od=(e,t)=>(l,n)=>{const a=l?.docType;return""===a?null:"reportSource"in l&&l?.reportSource?.__html?Ed(l,n):zd(e,t)(l,n)},Ed=({text:e,reportSource:t,href:l,target:n,__html:a},r)=>t?.__html&&e?c("div",{role:"listitem",children:[o($d,{text:e,href:l,target:n,__html:t?.__html}),o(De,{__html:a})]},String(r)):null,Fd=St((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:r,items:i,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:u="primary",...g})=>{const f="secondary"===u?"p-m min-w-32":"min-w-24",b=r?.src?o(le,{className:"hidden lg:block",image:r}):null;return o(x,{className:p("min-h-80",e),padding:"p-0",version:u,...g,children:c(we,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:h,className:p("whitespace-pre-wrap",l)}),rightImage:b,buttons:Xe(n,{className:"flex-wrap"}),children:[a?o(je,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:p("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[o(et,{items:i,listItemSize:"M"}),o(je,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:p("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(le,{className:"w-fit",image:d})}):null,r?.src?o(le,{className:"lg:hidden",image:r}):null]})]})})})),Ud=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Hd=(e=[],t={})=>e.filter((({content:e={}})=>mr(t,e))).length,Wd=(e,t)=>e===t;const qd=(Kd=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Wd,((e=Wd)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Kd(l,t[e])))));var Kd;const Xd=[],Yd={},Gd={primary:"bg-white/30",secondary:"bg-main-divider"},Qd={primary:"text-white",secondary:"text-secondary-text"},Jd=d((({count:e,version:t="secondary"})=>o("div",{className:p("w-6 h-6 rounded-full flex items-center justify-center",Gd[t]),role:"status",children:o(je,{size:"text-xs",color:Qd[t],children:e})}))),Zd=({text:e,description:t,icon:l,isActive:n,type:a})=>{const r=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(n);return c("div",{className:p("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,role:"tab",children:[l?o(le,{className:p("h-6 w-6 min-w-6 min-h-6",r.icon),image:{...l,iconVersion:l?.iconVersion??r.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?r.text:r.oldText,children:e}),o("div",{className:"animated"===a?r.desc:r.oldDesc,children:t})]})]})},em={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},tm={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},lm={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},nm={default:"sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},am=d((({tag:e="div",item:t={},isActive:l=!1,type:n="default",onClick:a})=>{const r=e,{text:i,description:s,icon:d,count:m,...h}=t;return o(r,{className:p("h-12","block flex-1","cursor-pointer",em[n],l?nm[n]:lm[n]),role:"tablist",onClick:a,...h,children:c("div",{className:p("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?tm[n]:"text-secondary-text hover:text-primary-main"),children:[Zd({text:i,description:s,icon:d,isActive:l,type:n}),Number.isInteger(m)?o("div",{className:"ml-xs",children:o(Jd,{count:m,version:Ud(l,n)})}):null]})})})),rm=d((e=>o(e?.item?.href?im:sm,{...e}))),im=d((e=>{const t=me(),l=r((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(am,{...e,tag:"a",item:a,onClick:n})})),sm=d((({item:e={},onClick:t,...l})=>{const n=r((()=>{t&&t(e)}),[t,e]);return o(am,{item:e,onClick:n,...l})})),om=(e,t,l)=>(n,a)=>o(rm,{isActive:n===e,onClick:t,type:l,item:n},String(a)),cm=d((({className:e,tabsType:t="default",items:l=[],activeItem:n,onChange:a})=>o("div",{className:p("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel",children:l.map(om(n,a,t))}))),dm={categories:[],extraOptions:[],propertyType:[],stage:[]},mm=St((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:u}]=ur(dm,{block:a.block,page:a.options?.page}),g=r(((e=dm)=>u(e)),[]),f=(({hotFilters:e=Xd,filtrationState:t=Yd,blocks:l=Xd,onFiltrationStateChange:n})=>{const a=i((()=>Math.max(0,e.findIndex((e=>qd(e.filter,t))))),[e,t]),s=i((()=>e.map((t=>({text:t.text,count:Hd(l,t.filter),version:Ud(t===e[a])})))),[e,l,a]),o=r((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:g});return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(cm,{...f}),o(ir,{filtrationSchema:l,resetButton:n,field:m,reset:h}),o(lr,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),hm=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),um=d((({children:e})=>hm?e:null)),pm="/icons/MapMarkerClusterIcon.svg",gm="/icons/MapMarkerClusterYellowIcon.svg";function xm({yandexMaps:e,map:t,points:l}){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=fm("offices",e,n);if(l.length&&l.every((e=>"type"in e))){const r=fm("workplaces",e,n),i=bm(l.filter((e=>"workplaces"===e.type)),"workplaces",e),s=bm(l.filter((e=>"offices"===e.type)),"offices",e);a.add(s),r.add(i),t.geoObjects.add(r),t.geoObjects.add(a)}else{const n=bm(l,"offices",e);a.add(n),t.geoObjects.add(a)}t.setBounds(e.util.bounds.fromPoints(l.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const fm=(e,t,l)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?pm:gm,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:l,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),bm=(e,t,l)=>e.map((({coords:e,content:n})=>new l.Placemark(e,{balloonContentHeader:n?.header,balloonContentBody:n?.body,balloonContentFooter:n?.footer,hintContent:n?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?pm:gm,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),ym={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},vm={...ym,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},Nm=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(vm).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(W,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),wm=()=>function(e,t,l=!0){const[r,i]=n(void 0);return a((()=>{let n=!0;return Ac(e,t).then((e=>{n&&i(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(n=!1,l){const e=document.getElementById(t);e&&document.head.removeChild(e),i(void 0)}}}),[e,t,l]),r}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),km={...ym,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Sm=d((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(km).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:l,width:"20",height:"16"})})})),Cm=[55.753995,37.614069],Tm=d((({points:e,className:t="",zoom:l=5})=>{const n=s(null),r=wm();if(a((()=>{n?.current?r&&(xm({yandexMaps:r,map:n.current,points:e}),e?.length||n.current.setCenter(Cm)):r?.ready((()=>{n.current||(n.current=new r.Map("map",{center:e?Im(e):Cm,zoom:l,controls:[],suppressMapOpenBlock:!0}),xm({yandexMaps:r,map:n.current,points:e}))}))}),[r,e,l]),!r)return null;const i="z-10";return c("div",{id:"map",className:p("relative","w-full",t),children:[c("div",{className:p("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",i),children:[o(Sm,{yandexMaps:n}),o(Sm,{yandexMaps:n,direction:"out"})]}),Nm(n,r,p("right-2 top-80",i))]})})),Im=e=>[Mm(Bm(e,0)),Mm(Bm(e,1))],Bm=(e,t)=>e.map((e=>e.coords[t])),Mm=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Pm=({__html:e,list:t})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(De,{__html:e})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(le,{image:e.image}):null,e?.text?o(je,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Rm={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Vm="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",zm=(e,{field:t,reset:l},n)=>{const a=n?5:6,r=(e||[]).map((e=>o(sl,{text:Rm[e],...t(e)},e))),[i,s]=a>0?[r.slice(0,a),r.slice(a)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(Qa,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Vm,children:i}),o(Ja,{className:Vm,isUnfolded:e,children:s})]}),renderFoldButton:Dm(l,n)})}):null})},Dm=(e,t)=>({isUnfolded:l,onToggle:n})=>c("div",{className:"flex space-x-lg",children:[t?o(fe,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:["ArrowDownIcon","ArrowUpIcon"][Number(l)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(l)],onClick:n}):null,o(fe,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,text:"Очистить фильтр",appendRight:o(W,{name:"CloseIcon",width:"16",height:"16"})})]}),Am=()=>{},jm=()=>[],$m=e=>"all"===e?"block":"hidden",_m=d((({className:e,data:t=[],remoteWorkplaces:l=[],renderCard:a=Am,renderRemoteWorkplaceCard:r=Am,filterItems:s=jm,getBalloon:d=Am,getBalloonRemoteWorkplaces:m=Am,initFilterState:h={},descriptionData:u,title:g})=>{const x=g?.includes("Офис"),[f,{field:b,reset:y}]=Kt(h),[v,N,k,S]=i((()=>{const e=s(t,f),n=s(l,f),a=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:d(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,a,n,e.length+n?.length]}),[t,l,f]),[C,T]=n("all");return c("div",{className:p("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-6xl pb-0",children:[o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h2",children:[o("span",{suppressHydrationWarning:!0,children:g}),S?o(je,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${S})`})}):null]})}),u?Pm(u):null,x&&Lm(t,C,T),o("div",{className:p("pb-2xl",$m(C)),children:zm(Object.keys(h),{field:b,reset:y},x)})]}),o("div",{className:"h-[600px]",children:o(um,{children:o(Tm,{points:N,className:"h-full"})})})]}),c(um,{children:[v.map(a),k.map(r)]})]})})),Lm=(e,t,l)=>{const n=Ud("all"===t),a=Ud("business"===t),r=(e,t,n)=>(e.currentTarget===e.target&&"business"===t&&n.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),l(t),n);return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(Jt,{"data-id":"all",onClick:t=>r(t,"all",e),version:n,children:"Для физических лиц"}),o(Jt,{"data-id":"business",onClick:t=>r(t,"business",e),version:a,children:"Для юридических лиц"})]})},Om={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Em=d((({className:e,children:t,color:l="gray"})=>c("div",{className:p("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Om[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(le,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(je,{size:"text-m",color:Om[l].text,children:t})]}))),Fm=d((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:Um({textItems:a,subText:t,children:l,...n})})),Um=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:r,children:i})=>c("div",{className:p("flex gap-2xs flex-col h-full max-w-[300px]",r),children:[e?o(je,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,i||l.filter(Boolean).map(((e,t)=>o(je,{size:"text-l",children:e.trim()},String(t)))),a?o(je,{color:n,size:"text-m",children:a}):null]}),Hm=d((({className:e,children:t})=>o("div",{className:p("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Wm=["ArrowDownIcon","ArrowUpIcon"],qm=["Подробнее","Скрыть"],Km=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:qm[Number(e)]}),o(W,{className:"text-primary-text",name:Wm[Number(e)],width:"16",height:"16"})]}),Xm=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:r="",atmAccess:i="",workTime:s},d)=>{const m=[{label:"Устройство",value:Qm(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(i)?"Общедоступный":""},{label:"Регистрационный номер",value:r}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(je,{size:"text-h4",children:Qm(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(je,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Em,{color:"green",children:Qm(s)})})]}),o("div",{className:"hidden sm:block",children:o(Hm,{className:"flex-wrap",children:m?.map(Gm)})}),o(Qa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:o(Hm,{className:"flex-wrap",children:m?.map(Gm)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Km({isUnfolded:e,onToggle:t})})]},String(d))},Ym=({address:e="",terminalType:t,atmCode:l=""})=>({header:`${Qm(t)} №${l}`,body:e.toUpperCase()}),Gm=(e,t)=>o(Fm,{...e},String(t)),Qm=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Jm=[];const Zm=async e=>{const t=await ft(e,{method:"GET"});return Array.isArray(t)?t:Jm},eh={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},th={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},lh=d((({data:e,className:t})=>{const[l]=co(),n=function(e){const{data:t=Jm}=xn(`/api/v1/atms?regionCode=${e}`,Zm);return t}(l?.code??"000");return o(_m,{className:t,filterItems:nh,data:n,initFilterState:eh,renderCard:Xm,getBalloon:Ym,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),nh=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>th[t](e))),l=!n.length||n.some((t=>th[t](e)));return t&&l}))},ah=e=>{const t=ih(e);return o(Fm,{label:"Режим работы",value:t,className:"max-w-none"})},rh=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",ih=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[rh({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),rh({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean)},sh=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],oh=e=>sh.map((([t,l,n])=>({key:t,title:n,short:l,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),ch=e=>{if(!e)return null;const t=dh(e);return c(Hm,{className:"border-none",children:[o(Fm,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(mh)})}),o(Fm,{label:"Режим работы",className:"max-w-none",children:o(je,{children:e})})]})},dh=e=>{const t=sh.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},mh=({short:e,status:t},l)=>o("div",{className:p("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(je,{size:"text-xs",children:e})},String(l)),hh=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Fm,{label:"Валюта",value:e.currency}):null,t?o(Fm,{label:"Купить",value:String(t)}):null,l?o(Fm,{label:"Продать",value:String(l)}):null]},String(n)),uh=(new Date).getDay(),ph=e=>{const[t]=e?.slice(uh-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:r}=t;return n?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Em,{color:"green",children:a}):null,l&&r?o(Em,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(Em,{color:"red",children:"Выходной"})},gh=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",xh=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},r)=>o(Fm,{label:e,value:t&&l?l:"",subText:gh({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(r)),fh=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,bh=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,yh=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,vh=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:r,phoneCallCentre:i,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=oh(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(je,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(je,{size:"text-l",children:t})]}):null]}),ph(u)]}),o("div",{className:"hidden sm:block",children:Nh({phone:l,fax:n,phoneBusiness:a,phoneNatural:r,phoneCallCentre:i,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Qa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:Nh({phone:l,fax:n,phoneBusiness:a,phoneNatural:r,phoneCallCentre:i,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Km({isUnfolded:e,onToggle:t})})]},String(h))},Nh=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:r,workSchedule:i,exchangeRate:s})=>{const d=oh(i),m=i?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Hm,{className:"flex-wrap",children:[o(Fm,{label:"Факс",value:t}),o(Fm,{label:"Телефон филиала",value:e}),o(Fm,{label:"Для обращений юридических лиц",value:l}),o(Fm,{label:"Обслуживание физических лиц",value:n}),o(Fm,{label:"Для консультаций по валютному контролю",value:r}),o(Fm,{label:"Контакт-центр",value:a})]}),i?.isMatchesPattern?o(Hm,{children:o(Fm,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(xh)})})}):c(Hm,{children:[o(Fm,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(mh)})}),ah(d)]}),i?.businessScheduleVisibleTag?ch(i?.businessScheduleDescription):null,s?.currencies?.length?o(Hm,{className:"flex-wrap",children:s?.currencies?.map(hh)}):null]})},wh=({name:e="",address:t="",workSchedule:l})=>{const n=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const r=`${t} ${(e=>{const t=oh(e),l=e?ih(t):"",n=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?fh(l):yh(l,n):bh(l):null})(l)}`;return{header:n,body:r}},kh=({address:e,workScheduleDescription:t},l)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(je,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(je,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Sh({workScheduleDescription:t})}),o(Qa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:Sh({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Km({isUnfolded:e,onToggle:t})})]},String(l)):null,Sh=({workScheduleDescription:e})=>c("div",{children:[c(Hm,{className:"flex",children:[o(Fm,{label:"Операции для физических лиц",children:o(je,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Fm,{label:"Операции для физических лиц",children:o(je,{children:"Оформление и обслуживание банковских карт"})}),o(Fm,{label:"Операции для физических лиц",children:o(je,{children:"Инвестиционное и накопительное страхование"})}),o(Fm,{label:"Операции для физических лиц",children:o(je,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Fm,{label:"Режим работы",className:"max-w-none",children:o(je,{children:e})})]}),Ch=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Th={branches:[],remoteWorkplaces:[]};const Ih=async e=>await ft(e,{method:"GET"})||Th,Bh={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Mh={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},Ph=d((({className:e})=>{const[t]=co(),l=function(e){const{data:t=Th}=xn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,Ih);return t}(t?.code??"000");return o(_m,{className:e,filterItems:Rh,data:l?.branches,remoteWorkplaces:l?.remoteWorkplaces,initFilterState:Bh,renderCard:vh,renderRemoteWorkplaceCard:kh,getBalloon:wh,getBalloonRemoteWorkplaces:Ch,title:`Офисы филиала ${t?.name}`})})),Rh=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>Mh[t](e)))))},Vh=d((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return o(x,{version:"transparent",className:p(t),defaultPadding:"p-0",...l,children:"offices"===n?o(Ph,{}):o(lh,{data:e})})})),zh=d((({className:e,title:t,description:l="Блок в разработке...",...n})=>c(x,{className:p("box-border",e),...n,children:[o(C,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),Dh="hidden sm:flex absolute z-40 top-10",Ah=St((({className:e="",padding:t,slides:l=[],...a})=>{const[r,i]=n(0),[s,d]=Ha({itemCount:l?.length||0});return c(x,{className:p("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...a,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*r}%)`},role:"list",children:l.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(st,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(Sa,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:l.map(jh({activeSlideIndex:r,onClick:i}))}),d.canScrollLeft?o(Ra,{className:p("left-6",Dh),onClick:d.scrollLeft}):null,d.canScrollRight?o(Va,{className:p("right-6",Dh),onClick:d.scrollRight}):null]})]})})),jh=({activeSlideIndex:e,onClick:t})=>({nav:l},n)=>{const a=n===e,r=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",i=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(n),"aria-label":l?.title,className:p("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",r),children:[o("div",{className:i,children:l?.title}),o("div",{className:s,children:l?.description})]},String(n))},$h=d((({address:e,email:t,telephone:l,button:n,className:a="",__html:r,icon:i,title:s,version:d="primary",...m})=>c(x,{className:p("box-border text-left space-y-s",a),version:d,...m,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ke(i)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(le,{image:i})}):null,s?o(w,{headingType:"h3",as:"h3",title:s}):null]}),c("div",{className:"w-full space-y-m",children:[r?_h(r):null,Lh({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Lh({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Lh({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Xe([n]):null]})]}))),_h=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{__html:e})}),Lh=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(W,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(je,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(je,{size:"text-xl",color:n,children:t})]})]}):null,Oh=d((e=>{const{__html:t,richVersion:l="",...n}=e;return o(x,{defaultPadding:"p-0",...n,children:o(De,{__html:t,richVersion:l})})})),Eh=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(Xa,{tag:"button",className:p("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?o(je,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(W,{name:l,iconVersion:"color",width:"24",height:"24"}):null}))),Fh=St((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:r,foldButtonVersion:i="default",version:s,role:c,...d})=>o(x,{className:p("w-full","border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(Qa,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Ja,{className:p("gap-lg","grid grid-cols-12 [&>*]:pb-m"),isUnfolded:e,children:R({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Uh({foldButtonVersion:i,label:n,labelIcon:a,labelIconBgVersion:r,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),Uh=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:r})=>{const i=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"MinusIcon":"PlusIcon")(a);return"accordion"===e?o(Eh,{label:i,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:r}):o(Ya,{label:i,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:r})},Hh=d((({className:e=""})=>{const[t,l]=n("option2"),a=r((e=>l(e)),[]);return c("div",{className:p("order-4",e),role:"radiogroup",children:[o(Jn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Jn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Wh=d((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:r,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),c=s.find((e=>e.key===n));return o(wl,{options:s,label:i,placeholder:a||n,onChange:e=>r(e.key),value:c})})),qh=d((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:r})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Wh,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Wh,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:r,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Kh=["От 1 дня","До 365 дней"],Xh=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(je,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Bn,{min:1,max:365,value:e,items:Kh,onChange:t})]}))),Yh=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:r})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Wh,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Wh,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:r,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Gh=d((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:r,selectedBoxSize:i,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(qh,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Qh(m)}),o(Xh,{days:a,setDays:e=>m({days:e})}),o(Yh,{caseVolumes:d,selectedCaseVolume:r,onSelectedCaseVolume:Jh(m),safeBoxCases:s,selectedBoxSize:i,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Hh,{}),o(fe,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),Qh=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Jh=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Zh=d((({days:e,tariffs:t=[]})=>{const l=tu(e,t),n="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[eu("Аренда за",e),eu("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(le,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(k,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),eu=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),tu=(e,t)=>{const l=lu(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},lu=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},nu=(e,t)=>e.find((e=>e.branchCode===t)),au=d((e=>{const{regions:t,data:l,branches:n,onChange:r,onClick:i}=e;a((()=>{r({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,r]);const s=nu(n,l.selectedBranch),d=ru(s?.safeBoxCaseVolumes),m=iu(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=su(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Gh,{...l,regions:t,onClick:i,branches:n,caseVolumes:d,safeBoxCases:m,onChange:r}),o(Zh,{days:l.days,tariffs:h})]})})),ru=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],iu=(e,t)=>e?.find((e=>e.volume===t)),su=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,ou=[];const cu=async e=>await ft(e,{method:"GET"})||ou,du=d((({title:e,footnote:t,className:l="",...a})=>{const[i,s]=n(!1),d=r((()=>s((e=>!e))),[]),[m,h]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Wn(),p=mu(m.selectedRegion,u),g=function(e){const{data:t}=xn(e?`/api/v1/safeboxes?regionCode=${e}`:null,cu);return t||ou}(p),f=r((e=>h((t=>({...t,...e})))),[h]),b=(y=nu(g,m.selectedBranch)||g,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(x,{className:l,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(au,{regions:u,branches:g,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&i?o(Tm,{points:b,className:"h-[640px]"}):null]})})),mu=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,hu=({styleMap:e,isMainButton:t,version:l})=>(n,a,r)=>{const{label:i,description:s,button:d,items:m,isDotted:h}=n;return c("div",{className:p("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",uu(r.length)),children:[c("div",{className:"space-y-xs",children:[i?o(je,{size:"text-h6",align:"text-center",children:i}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[s?o("div",{className:e.description,children:s}):null,o(et,{className:e.description,items:m,listItemSize:"M",isDotted:h})]})]}),d?.text&&!t?o(fe,{className:"box-border py-s w-full max-w-60 mt-auto",version:l,...d,children:d?.text}):null]},String(a))},uu=e=>e<4?"w-72":"w-52",pu={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"},gu=d((({buttons:e,className:t="",description:l,showLines:n=!0,size:a="normal",steps:r=[],stepVersion:i="gray",title:s,version:d="primary",...m})=>{const h=r.length,u=h>3,g=pu,f=(e=>e?"":"opacity-0")(n),b=h<4?"px-24":"px-16",y=h<4?"px-28":"px-20",v=Boolean(e?.every((e=>e?.text)));return c(x,{className:p("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:d,...m,children:[o(C,{headlineVersion:"S",title:s,description:l,isEmbedded:!0,className:"w-full",align:xa}),r?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:p("flex items-center","normal"===a?b:y),children:ar(o("div",{className:p("h-0.5 w-full bg-secondary-light flex-1",f)}))(r.map(xu(g,a,i)))}),o("div",{className:p("flex justify-between",u?"gap-x-s":"gap-x-20"),children:r.map((N={styleMap:g,isMainButton:v,version:d},(e,t,l)=>{const{type:n}=e;if("default"!==n&&"rte"!==n)return null;switch(n){case"default":return hu(N)(e,t,l);case"rte":return o("div",{className:p("text-center",uu(l.length)),children:o(De,{__html:e.__html})},String(t));default:return null}}))})]}):null,Xe(e)]});var N})),xu=(e,t,l)=>({icon:n},a)=>{const r="secondary"===l?"white":"color";return o(x,{defaultPadding:"",className:`${fu(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:l,children:Ke(n)?o(le,{image:{...n,iconVersion:n?.iconVersion||r},width:"48",height:"48"}):o("span",{className:p("text-h4","transparent"===l?e.iconText:(i=l,"secondary"===i?"group-data-primary:text-white":"text-secondary-text")),children:a+1})},String(a));var i},fu=e=>"normal"===e?"h-24 w-24":"h-16 w-16",bu=d((()=>o("div",{className:"hidden",role:"none"}))),yu="hidden sm:flex absolute z-40",vu={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Nu=d((({className:e,items:t=[],activeItem:l,onChange:n,tabsType:r="default"})=>{const[i,s]=Ha({itemCount:t?.length||0});return a((()=>wu(i.current,t,l)),[]),c("div",{className:p("relative overflow-x-auto no-scrollbar",e),children:[o(Sa,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:vu[r].item,gap:vu[r].gap,children:t.map(om(l,n,r))}),s.canScrollLeft?o(Ra,{className:p("left-6",yu,vu[r].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(Va,{className:p("right-6",yu,vu[r].buttonTop),onClick:s.scrollRight}):null]})})),wu=(e,t,l)=>{const n=t.findIndex((e=>e===l));e&&n>0&&e.scrollTo({left:e?.children[n]?.offsetLeft,behavior:"smooth"})},ku=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return o(cm,{...t});case"scrollable":return o("div",{className:"flex",children:o(Nu,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Su="tab",Cu=d((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...c})=>{const d=u(),{isReady:m}=d,g=i((()=>l.map(Iu)),[l]),[f,b]=n(0);a((()=>{if(!l||!l[0])return;const e=d.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===d.query.tab))||0,t=l[e]||l[0];b(e),Tu(t)}),[m]),a((()=>{const e=l[f];"group"===e?.type&&h.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,f]);const y=r((e=>{const t=g.indexOf(e),n=l[t];b(t),Tu(n),"group"===n.type&&(e=>{const t=new URLSearchParams(d.query);e.name?t.set(Su,e.name):t.delete(Su),d.replace(`${d.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,g]);return o(x,{className:p(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...c,children:ku({items:g,activeItem:g[f],tabsMode:s,onChange:y})})})),Tu=e=>{"group"===e.type&&h.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&h.fire("tab",{type:e.type,label:e.href})},Iu=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,Bu={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Mu=({tabsType:e="animated",...t})=>e?o("div",{className:Bu[e].wrapper,children:o(Nu,{className:Bu[e].component,tabsType:e,...t})}):null,Pu=St((({className:e="",tabs:t=[],block:l,tabsType:i,showCounter:s=!1,...d})=>{const m=l?.__id?`tabs-${l.__id}`:"tabs",h=u(),g=s?t.map((e=>({...e,count:l?.slots?.[e?.text??""]?.length??0}))):t,{isReady:f}=h,[b,y]=n(Vu(g,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(m))),v=g[b],N=g.findIndex((e=>Boolean(e.selected)));a((()=>{const e=h.query[m]?g.findIndex(((e,t)=>"group"===e.type&&String(t)===h.query[m])):N;y(-1===e?0:e)}),[f,N,m]);const w=Ru(g[b],b),k=r((e=>{const t=g.indexOf(e),l=g[t];y(t),"group"===l.type&&((e,t)=>{const l=new URLSearchParams(h.query);e.text?l.set(m,String(t)):l.delete(m),h.replace(`${h.pathname}?${l}`,"",{scroll:!1})})(e,t)}),[g]);return c(x,{className:p(e),defaultPadding:"p-0",...d,children:[Mu({items:g,activeItem:v,tabsType:i,onChange:k}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(l?.slots??{}).map((([e,t])=>P(t,{...d?.options,slotName:w,parent:l,extraProps:{className:e===w?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.filter((e=>"group"===e.type)).map(Ru)||[],childrenTypes:{exclude:["TabsLayout"]}}),Ru=(e,t)=>e?.text||`Слот №${t}`,Vu=(e,t)=>t?Number(t):e.reduce(((e,t,l)=>t.selected?l:e),0),zu=d((({className:e="",isOpen:t,onClick:l})=>o(fe,{className:e,appendRight:o(le,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),Du={Buttons:({buttons:e})=>Xe(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(le,{image:e}):null,List:({isDotted:e,...t})=>o(et,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(je,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(je,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?o(zu,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},Au=d((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:r,setTableInner:i,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{r===o&&s||m(!0)}),[s,o]);return ju({cell:e,cellProps:{rowIdx:l,cellIdx:r,fieldIdx:t,displayTable:e=>{m(!1),c(r),i(e)},isVisible:d}})})),ju=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in Du))return null;return o(Du[l],{...t,...n})},$u=d((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:r,setOpenTableInnerIdx:i})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Au,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:r,setOpenTableInnerIdx:i},String(s)))):null}))),_u=(e,t)=>140*Re(e.slice(0,t).map((e=>e?.cols?.length??1))),Lu=(e,t)=>e?.length>0?o("div",{className:p("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(je,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Ou=d((({rows:e})=>{const t=e?.[0]?.length??0,[l,n]=gs({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((a=l,(e,t)=>{if(!e?.length)return null;const[l,...n]=e,r=p("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(je,{size:"text-xl",font:"font-light",children:l.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:r,style:{transform:`translateX(-${_u(n,a)}px)`},children:n?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(je,{size:"text-xl",children:e.data}):null,e?.cols?Lu(e.cols,a):null]},`row${t}`)))})})]},String(t))})),Cs({...n,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),Eu=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(je,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(Ou,{rows:t.rowsData})})})]},n)}))}))),Fu=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Uu=d((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:p("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:o(je,{size:"text-xl",font:"font-light",color:Fu(t===l),children:e||t+1})},e)))}):null,t?o(fe,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function Hu(e){const t=await fetch(e);return await t.json()}const Wu=d((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=xn(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),Hu);return t||{}}(e),[i,s]=n(0),d=r((e=>s(e)),[]),m=a?.[i]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(Uu,{currencies:h,activeTabIndex:i,setActiveTabIndex:d,linkToPDF:t}),o(Eu,{activeTabIndex:i,items:m}),o(zu,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(je,{size:"text-h6",children:"Данных нет"}),o(zu,{onClick:l,isOpen:!0})]})})),qu=d((({children:e,tableInner:t,onHideContentClick:l})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:p("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(Wu,{...t,onClick:l})}):null]}))),Ku=d((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...i})=>{const[s,d]=n(void 0),m=r((e=>d(e)),[]),[h,u]=n(void 0),g=r((e=>u(e)),[]);return c(qu,{onHideContentClick:()=>d(void 0),tableInner:s,...i,children:[o("div",{className:p("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(le,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(je,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(ws,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o($u,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...i},String(t))))}):null]})})),Xu=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return c("div",{role:"table",children:[c("div",{className:"relative space-y-xs",children:[e,Cs({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Yu=d((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:r=0,...i})=>{const s=a?.map((({data:e})=>e))||[],d=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,u]=gs({itemCount:m,visibleItemCount:2}),g=(d||[]).map(((e,t)=>o(Ku,{row:e,activeIndex:h,rowIdx:t,...i},String(t)))),[f,b]=r>0?[g.slice(0,-r),g.slice(-r)]:[g,[]];return c(x,{className:p("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...i,children:[o(C,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m",children:r>0?o(Qa,{renderFoldableSection:({isUnfolded:e})=>c(Xu,{controls:u,children:[f,o(Ja,{isUnfolded:e,children:b})]}),renderFoldButton:Ga}):o(Xu,{controls:u,children:g})})]})})),Gu=d((({className:e="",title:t,description:l,iconVersion:n,__html:a,...r})=>c(x,{className:p("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===n?Qu():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(je,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Ju(l):null,a?o(De,{__html:a}):null]})]}))),Qu=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),Ju=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Zu=d((({prefix:e,unit:t,suffix:l})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(je,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?o("div",{className:"gradient-color-text",children:o(je,{size:"text-h2",children:l})}):null]}))),ep=d((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return o(x,{defaultPadding:"p-0",...a,children:o(Zu,{prefix:t,unit:l,suffix:n})})})),tp=St((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:r=!1,isCardBorder:i=!1,image:s,...c})=>{const d=u();return o(x,{className:p("relative flex flex-col",pd[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:r,...c,children:R({...c,extraProps:{className:p("w-full",ba(i)),...ud(n)}})})}),{childrenTypes:[]}),lp=e=>(e=>{const t="col-span-",l=e?.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",np=d((({className:e,title:t,url:l,previewImg:n,...a})=>{const r=u();return c(x,{className:e,defaultPadding:lp(e),...a,children:[o(C,{title:t,headlineVersion:"M"}),l?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:U(r)(n?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:U(r)(l)})}):null]})})),ap={AdTile:Tt,ApplicationForm:ma,BankAccountFiltration:xr,BenefitsBlock:vr,BonusBenefitsBlock:Cr,ButtonsBlock:Ir,CalculatorBonus:Er,CalculatorBusinessDeposit:ri,CalculatorCredit:yi,CalculatorDeposit:Bi,CalculatorRefinancing:Di,CardTransfer:Ei,Carousel:Yi,CarouselCard:Ji,CarouselCatalogCard:es,CarouselLinks:ns,CarouselRecommendationCard:ds,CarouselTariffsCard:us,ComparisonTable:Ds,ContactsBlock:js,DepositFiltration:Us,Depository:ro,ErrorBlock:so,ExchangeRateTile:Ao,Footer:vc,GracePeriod:Nc,GrantSupport:Tc,Header:md,Headline:C,HorizontalLayout:gd,ImgBlock:xd,InsuranceAmountBlock:Nd,InvestmentInfo:Cd,LinkDocs:Ld,MobileAppTile:Fd,MortgageFiltration:mm,OfficesAtmsMap:Vh,Placeholder:zh,ProductBlock:Ct,ProductGallery:Ah,RepresentativeOfficeInfo:$h,RichTextBlock:Oh,RollupItem:Fh,SafeDepositRental:du,StepsBlock:gu,StickyBottomMenu:bu,Tabs:Cu,TabsLayout:Pu,TariffsTable:Yu,TextBlock:Gu,UnitBlock:ep,VerticalLayout:tp,Video:np},rp=de((()=>{a((()=>{$t()}),[]);const e=Wt();fl(globalThis,"click",(e=>t=>{const l=t.target?.closest("[data-aspects]");try{const n=JSON.parse(l?.dataset?.aspects??"[]");At({aspectsAttributes:n,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),ip="cookie",sp=d((({__html:e})=>{const[t,{setTrue:l,setFalse:n}]=ml();lc((()=>{globalThis.localStorage?.getItem(ip)||l()}),[],3e3);const a=r((()=>{globalThis.localStorage?.setItem(ip,"true"),n()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(De,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:o(Zt,{className:"bg-main-gray rounded-md",onClose:a})})]})}):null}));function op(e){throw new Error(e)}const cp=({onCloseAll:e,onClose:t}={})=>{const[l,{push:i,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=r((e=>l((t=>[...t,e]))),[]),i=r((()=>l((e=>e.slice(0,-1)))),[]),s=r((e=>l((t=>t.filter((t=>t!==e))))),[]),o=r((()=>l([])),[]);return[t,{setList:l,push:a,pop:i,remove:s,clear:o}]}(),c=r((()=>{e&&e(l),o()}),[l,e]),d=r((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>h.subscribe("dialog",(e=>{switch(e.type){case"open":i(e);break;case"close":e.all?c():d();break;default:op(e)}}))),[c,d]),l},dp=d((()=>{const e=r((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=r((e=>{e?.onClose&&e.onClose()}),[]),l=cp({onCloseAll:e,onClose:t}),{close:n}=ce(),i=r((({key:e})=>{"Escape"===e&&n()}),[]);return fl(globalThis.document,"keydown",i),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>o("div",{className:p("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),mp=d((()=>{const[e,t]=n(null),l=r((()=>{t(null)}),[]);a((()=>h.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:op(e)}}))),[]);const i=r((({key:e})=>{"Escape"===e&&l()}),[l]);return fl(globalThis.document,"keydown",i),e?o("div",{className:p("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),hp="header",up="footer",pp="sticky-footer",gp={},xp=d((({className:e,data:t=gp,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:r,fallback:i,...s}=t,d=kt(s,i);rp();const m={key:"",page:{slots:a,blocks:r,fallback:i,...d},blocksRegistry:l,blockDecorator:n,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:p("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(a?.header,{...m,slotName:hp})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[R({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(a?.footer,{...m,slotName:up})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(a?.["sticky-footer"],{...m,slotName:pp})}):null,o(dp,{}),o(mp,{}),o(sp,{__html:d?.cookieContent?.__html})]})}));Object.assign(xp,{childrenTypes:[],slots:()=>[hp,up,pp]});e.Blocks=ap,e.ContentPage=xp,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=de,e.joinList=ar,e.packageVersion="0.14.429",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=O,e.useRouter=u,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t};const h=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}};function u(){return u._impl()}u._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),u.setup=e=>{u._impl=e};const p=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),g={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},x=d((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:i="p-xl",padding:r,block:s,tag:c="section",role:d,children:m,style:x})=>{const f=c,b=u(),[y,v]=n(!1);a((()=>h.subscribe("tab",(e=>{"group"!==e.type||e.groupName&&e.groupName!==s?.labelGroup||v(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s,b]);const N=t&&l;return o(f,{className:p("@container font-sans",N?"group":"",g[t],y?"hidden":"",r||i,e),...N?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:d,style:x,children:m})})),f=d((({className:e,size:t})=>o("figure",{className:p("m-0 mt-xl min-w-[80%]",e),children:b(t)}))),b=(e=3)=>v(100,e).map((e=>Math.floor(e))).map(y),y=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),v=(e,t)=>[e].concat(t>0?v(e/1.618,t-1):[]),N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>o(l,{role:"heading",className:p("font-sans m-0",N[t],e),children:n||a}))),k=d((({children:e,...t})=>o("p",{className:p("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=S[l],u={marginTop:h.descriptionStyle};return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[n?o(w,{className:p("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:n}):null,a?o(k,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...u,children:a}):null]})})),T=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),I=[];function B(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=T,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:p(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return d?o(d,{className:i,block:e,options:t,...r,...n},a):null}},a)}const M=[],R=(e,{key:t,ancestors:l=M,slotName:n=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||M,[r.parent,n]]:l},a)))};function P({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?R(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const V=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return V.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(l):l}}),D=e=>Boolean(e?.includes(":")),A=(e,t)=>Boolean(e&&!D(e)&&(!t||"_self"===t)),j=e=>Boolean(e?.startsWith("#")),$=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),_=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),L=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var O=Object.freeze({__proto__:null,isURL:D,isLocalURL:A,isHash:j,withoutQuery:$,joinPath:_,hasPrefix:L});const E="/api/",F=`${E}v1/storage`,U=e=>(t,l)=>{if([!t,D(t),j(t),[z.CDN,E].some((e=>L(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${F}/${t}/attachment`;const n=t?.startsWith("/");return _(L(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},H=d((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const d=u(),m="normal"===i?`${l}.svg`:`sprites.svg#${l}`,h=U(d)(_(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:q(e,s)}):o(X,{className:e,children:c("svg",{className:p(K(r),W[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,n?o("desc",{children:n}):null,o("use",{href:h,xlinkHref:h})]})})})),q=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},K=e=>e?"":"w-full h-full",X=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Y=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function G(e=""){try{const[,t]=new URL(e).pathname.split("/");return`/${t}`}catch(e){return""}}const Q=e=>t=>{const l=t?.startsWith("/wcms-resources")?"":G(Y.SITE_URL);return t&&!D(t)?U(e)(t,l):t},J=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Z=d((({className:e="",image:t,imageClassName:l=""})=>{const n=u();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(J).map((({src:e,format:l,media:a},i)=>o("source",{srcSet:Q(n)(e),type:te(l),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:Q(n)(t.src)},l):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:p("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),te=e=>e?`image/${String(e)}`:void 0,le=d((({className:e="",image:t,imageClassName:l="",...n})=>t?.src||t?.icon?t.icon?o(H,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...n}):o(Z,{className:e,imageClassName:l,image:t}):null)),ne={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},re="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:l})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?ne[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ce=()=>({open:(e,t={})=>h.fire("dialog",{type:"open",dialog:e,...t}),close:()=>h.fire("dialog",{type:"close"}),closeAll:()=>h.fire("dialog",{type:"close",all:!0})}),de=e=>de._impl(e);function me(){const e=G(Y.SITE_URL),t=u(),{closeAll:l}=ce();return e=>{const l=U(t)(e.href);return{...e,href:l,"aria-label":e.text,onClick:de(n({...e,href:l}))}};function n({href:n,target:a,onClick:i}){return r=>{i&&i(r);const s=!L(n,e||"/");n&&!s&&A(n,a)&&(l(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(n,e)))}}}de._impl=e=>e,de.setup=e=>{de._impl=e};const he=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},ue=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=ge(e)?"hidden lg:block":"";return c("div",{className:p(pe(e),"flex gap-xs"),children:[n?o("div",{className:p(r,se[i]),children:n}):null,ge(e)?c("div",{className:"whitespace-pre",children:[l?o("div",{className:"text-xs font-light text-left",children:l}):null,o("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:p(r,se[i]),children:a}):null]})})),pe=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return p("group/btn items-center justify-center",ge(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},ge=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),xe=({className:e,rounded:t,version:l})=>["inline-block",re,l?ie[l]:"",t?"rounded-full":"rounded-md",e].join(" "),fe=d((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault(),l.stopPropagation();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=me()({onClick:r,href:n,...a}),c=t??o(ue,{...s});return o(e?ye:be,{...s,children:c})})),be=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,type:c,...he(d),children:m}))),ye=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:xe({className:e,rounded:n,version:l}),children:a})));function ve({version:e,handleClick:t,text:l="Вернуться назад",alwaysVisible:n=!1}){if(!l)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:p(n?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:p(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(le,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(fe,{version:"link",className:"group-data-secondary:text-white",text:l,ariaLabel:l,onClick:t,type:"button"})]})}const Ne={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},we=d((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a,insetTitle:r,buttons:s,leftImage:o,rightImage:d,imageAlign:m,isImageAlwaysOnRight:h=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=u(),v=i((()=>{y.back()}),[]),N=b.options?.page?.sitemap?.backwardButton;return c("div",{className:Se(n,l,e),children:[x?ve({version:t,handleClick:v,text:N}):null,ke(a),c("div",{className:p("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[Me(o,{imageAlign:m,className:"mx-auto"}),c("div",{className:p("grid gap-3xl",d?"@xl:grid-cols-2 auto-cols-fr":"",o?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[r,f]}),Be(P({...b,extraProps:{className:"@container-normal"}})),Me(d,{className:p("@xl:justify-self-end @xl:col-start-2",s?Ce(h):"",Te(h),Re(g)),imageAlign:m}),Ie(s)]})]})]})})),ke=e=>e?o("div",{className:"relative h-full",children:e}):null,Se=(e="",t="",l="")=>p("relative flex flex-col gap-3xl overflow-hidden",e||t,l),Ce=e=>e?"row-span-2":"@xl:row-span-2",Te=e=>e?"col-start-2 self-center":"",Ie=e=>e?o("div",{className:"self-end",children:e}):null,Be=e=>e&&e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Me=(e,{className:t,imageAlign:l})=>e?o("div",{className:p("shrink-1/2 justify-self-center",l&&Ne[l],t),children:e}):null,Re=e=>e?"hidden @xl:block":"",Pe=(e=[])=>e.reduce(((e,t)=>e+t),0),Ve=(e=[])=>e?.length?Pe(e)/e.length:0,ze=(e,t="normal")=>e?.icon||e?.src?o("div",{className:p("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(le,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((e=>{const{__html:t,richVersion:l=""}=e;return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:p(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Ae=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,je=d((({children:e,...t})=>o("span",{className:p("font-sans",Object.values(t)),children:e}))),$e=(e,t)=>e?o(je,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,_e=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?o(De,{...e},`rte-${t}`):["label"in e?$e(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Ae(e.description,t)},String(t)):null],Le=d((({className:e,benefitsVersion:t,...l})=>c("div",{className:p("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in l?ze(l.icon,t):null,o("div",{children:_e(l)})]}))),Oe=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Ee=e=>{return((t=e.map(Oe))?.length?Math.sqrt(Math.abs(Ve(t.map((e=>e**2)))-Ve(t)**2)):0)>16;var t},Fe=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Ue=e=>!e.some(Fe),We=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:p("flex gap-x-m gap-y-s",Ee(l)||Ue(l)?"flex-col":"flex-wrap",e),role:"list",children:l.map(((e,l)=>o(Le,{benefitsVersion:t,...e},String(l))))}):null)),He=d((({className:e,benefits:t})=>t?.length?o("div",{className:p("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(_e)}):null)),qe=d((({isTabularBenefits:e,...t})=>o(e?He:We,{...t}))),Ke=e=>Boolean(e?.src||e?.icon),Xe=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:p("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),role:"group",children:e.map(Ye(l))}):null,Ye=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=Ge(a,r),d=Ge(i,r);return n||a?.icon?o(fe,{className:p("basis-full @lg:basis-auto",e),appendLeft:Qe({...a,iconVersion:c}),appendRight:Qe({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},Ge=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Qe=e=>Ke(e)?o(le,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Je=d((({className:e,isDotted:t,dotClassName:l,children:n})=>c("div",{className:p("font-sans flex",e),role:"listitem",children:[t?o("div",{className:"shrink-0",children:o("div",{className:p("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,o("span",{children:n})]}))),Ze={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},et=d((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=Ze[n];return l?.length?o("section",{className:p("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>o(Je,{isDotted:t,dotClassName:p(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),tt=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),lt=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(nt)}):null)),nt=({label:e,amount:t},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(je,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[tt(2)(t)," ₽"]}):null]},String(l)),at=d((({className:e,tags:t})=>t?.length?o("div",{className:p("flex flex-wrap gap-xs",e),role:"list",children:t.map(it)}):null)),it=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(je,{size:"text-m",font:"font-light",children:e})},String(t)),rt={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},st=d((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,benefits:m,__html:h,isFullWidthTitle:u,items:p,isDotted:g=!0,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(le,{image:y}):null,M=o(C,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),R=m?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return o(we,{className:e,padding:t,defaultPadding:l,...u?{title:M}:{insetTitle:M},...ot(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Xe(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?o(qe,{benefitsVersion:s,isTabularBenefits:d,benefits:R}):null,h?o(De,{__html:h}):null,p?.length?o(et,{items:p,isDotted:g,listItemSize:rt[i]}):null,T,x?.length?o(lt,{priceList:x}):null,ct(f)]})})})),ot=(e,t)=>t?{rightImage:e}:{leftImage:e},ct=e=>e?.length?o(at,{tags:e}):null,dt=e=>Boolean(e&&Array.isArray(e)),mt=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),ht=(e,t)=>{return l=e,Boolean(mt(l)&&"string"==typeof l.$ref)?t.ref(e):mt(e)?t.record(e):dt(e)?t.array(e):t.scalar?t.scalar(e):e;var l},ut=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(pt,e),pt=(e,t)=>e&&t?mt(e)?e[t]:dt(e)?e[parseInt(t,10)]:e:e,gt=(e,t)=>ht(e,{ref:({$ref:e,...l})=>gt(e?ut(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:gt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>gt(e,t)))}),xt=(e,t,l=[])=>{ht(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)xt(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)xt(e[n],t,[...l,n])}})};async function ft(e,t){try{return e?await bt(e,t):null}catch(e){console.error(e)}return null}const bt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),yt=e=>[...new Set(e)],vt={},Nt=["/portal-resources"],wt=(e,t)=>gt(e,(e=>t?.[e])),kt=(e,t)=>{const l=(e=>{const t=[];return xt(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(yt(e).filter((e=>!Nt.some((t=>e.startsWith(t))))).map((async e=>[e,vt[e]||=await bt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?wt(e,{...t,...i}):e};function St(e,t={}){const l=d((t=>{const l=kt((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...l})}));return Object.assign(l,t),l}const Ct=St((({className:e,padding:t,...l})=>o(x,{className:p("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(st,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),Tt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>It(0,t?.length)),[t]),n=t?.[l];return n?o(Ct,{suppressHydrationWarning:!0,...n,...e}):o(x,{...e,children:o(f,{})})})),It=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Bt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Mt=e=>e?.replace(/[^+\d]/g,"");const Rt=e=>e?{phone:Mt(e)}:{},Pt=e=>e?{birthday:Bt(e)}:{},Vt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),zt=(e,t=!0)=>({[t?"email":"mail"]:e}),Dt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Mt(e)}:{},At=({aspectsAttributes:e,aspects:t,ev:l})=>{for(const{aspectName:n,params:a}of e)t[n??""]?.(l,a)},jt="rshb-query-params";function $t(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(jt)||"";return e&&globalThis.sessionStorage?.setItem(jt,e),e}function _t(e){if(!e)throw new Error("Value should be fulfilled");return e}const Lt=e=>t=>{const[,l]=_t(e.find((([e])=>e(t))));return l(t)},Ot=e=>Lt(e.map((([e,t])=>[e,()=>t])));Ot.if=e=>new Et(void 0,e);class Et{parent;predicate;unit;get entry(){return[_t(this.predicate),_t(this.unit)]}constructor(e,t,l){this.parent=e,this.predicate=t,this.unit=l}if(e){return new Et(this,e)}then(e){return new Et(this.parent,this.predicate,e)}else(e){return Lt([...Ft(this),[()=>!0,e]])}}const Ft=e=>[...e?.parent?Ft(e.parent):[],e.entry],Ut=e=>{const t=e.target?.closest("a");if(D(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=$t();if(!D(e)||!t)return e;const l=new URL(e);for(const[e,n]of new URLSearchParams(t))l.searchParams.set(e,n);return l.toString()})(t?.href)||t?.href;if(l){Wt(t?.target)?.(l)}}},Wt=Ot([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function Ht(){return Ht._impl()}Ht._impl=()=>({forwardQuery:Ut}),Ht.setup=e=>{Ht._impl=e};const qt=e=>e,Kt=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[a,r]=n(e),[o,c]=n(!1),[d,m]=n({}),h=s({}),u=i(((e,t)=>{const{parse:l=qt,format:n=qt}=t||{};return h.current||(h.current={}),h.current[e]||=t=>{r((n=>({...n,[e]:l(t)}))),m((t=>({...t,[e]:!0})))},{value:n(a[e]),isDirty:o||d[e],onChange:h.current[e]}}),[a,o,d]),p=i((e=>{r(e),m(e)}),[]),g=i((()=>{r(e),c(!1),m({})}),[e]),x=i((e=>{e.preventDefault(),t?g():c(!0),l&&l(a,e)}),[l,a]);return[a,{isDirty:o||Object.values(d).some(Boolean),field:u,update:p,reset:g,onSubmit:x}]},Xt=d((e=>{const{className:t,title:l,children:n,...a}=e;return o(x,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[l?o(w,{headingType:"h3",title:l,className:"@xl:text-center"}):null,n]})})}));function Yt({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const Gt={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"},Qt={primary:p("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:p("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},Jt=d((({children:e,...t})=>{const l=e=>({...e,onClick:de(Yt(e))}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=l(t);return o("button",{className:p("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":p(Gt[a],Qt[a]),c?"rounded-md":"",n),type:s,role:d,onClick:m,children:e})})),Zt=d((({className:e,onClose:t})=>o("button",{className:p("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(le,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),el=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=ce(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Zt,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),tl=d((function({responseType:e}){const t="OK"===e,l=t?"ResponseOKIcon":"ResponseFailIcon",{close:n}=ce(),a=i((()=>{n()}),[]);return o(el,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(le,{image:{icon:l,iconVersion:"normal"},width:"156",height:"156"}),o(C,{className:"w-full",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",description:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Jt,{type:"button",onClick:a,children:"Хорошо"})]})})})),ll=e=>t=>l=>e(l)?[]:[t],nl=e=>o("div",{className:"h-6",children:e?o(je,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),al=d((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),il="appearance-none w-5 h-5 border-solid cursor-pointer flex-none",rl=[{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"}],sl=d((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(al,{paths:rl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[o("div",{className:p(il,"m-0",a?"rounded-full border-2":cl(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:ol(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?d:null,l?o("div",{className:"ml-s",children:o(je,{size:"text-l",font:"font-light",children:l})}):null]})})})),ol=(e=!1)=>e?"radio":"checkbox",cl=(e=!1)=>p("rounded border",e?"bg-primary-main":""),dl=d((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(sl,{text:t,value:l,disabled:a,onChange:r},n),nl(i)]})));function ml(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const hl=e=>e?o(je,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,ul="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",pl=d((({key:e,className:t="",id:l,name:n,type:r="text",label:d,placeholder:m,value:h="",valid:u=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&w.current?.focus()}),[v,w]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",T=gl(u);return c("div",{className:p("relative",t),children:[c("label",{className:"space-y-xs",children:[hl(d),N?o("textarea",{className:p("block resize-y min-h-24",S,T),id:p("textarea",l),name:n||l,placeholder:m,value:h,onChange:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:p("h-14",S,C,T),ref:w,id:l,name:n||l,placeholder:m,value:h,onChange:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),gl=e=>e?ul:"border-error",xl=e=>e?.text||e?.key||"";function fl(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function bl(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return fl(globalThis.document,"click",l),t}const yl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,vl=d((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:yl(t,n).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:xl(e)}),o(H,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:p("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function Nl({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>h.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>h.fire("popup",{type:"update",popup:e,...t}),close:()=>h.fire("popup",{type:"close"})},u=i((()=>{m.close(),c&&c()}),[c]),p=i((e=>{u(),r&&r(e)}),[u,r]),g=s(null),x=bl(u);return a((()=>{if(!e||!g.current)return;const a=g.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(vl,{popupRef:x,options:t,value:l,query:n,onChange:p,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,l,n,p]),g}const wl=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:h="black",onChange:u,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=ml(),[y,v]=n(""),N=g||0===l.length,w=x&&!N,k=i((()=>{v(""),f()}),[]),S=Nl({isOpen:x,options:l,value:a,query:y,onChange:u,onClose:k,iconVersion:h});return c("div",{className:p("space-y-xs",e),children:[hl(t),c("div",{className:p("relative",w?"z-20":"z-10"),ref:S,children:[c("div",{className:p("h-14 [&>*]:p-m pr-8 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",Sl(s,r,N)),onClick:w?k:b,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:xl(a)||d}),kl(w,h)]}),m&&w?o("div",{className:p("absolute top-0 w-full z-20"),children:o(pl,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),kl=(e,t)=>o(H,{className:p("absolute right-3 flex self-center",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Sl=(e,t,l)=>p(e?"border rounded-md ":"",e&&!l?"hover:border-primary-hover":"",l?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Cl=()=>{},Tl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>l)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,n,d),l=Il(t,e),c=Bl(t,i,r);h.push(o("td",{children:o("div",{className:Ml(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},Il=(e,t)=>t&&e.toDateString()===t.toDateString(),Bl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Ml=(e,t)=>p("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Rl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Pl=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=Cl})=>{const d=i((e=>s(e)),[]),{firstDayOfWeek:m,totalDays:h}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Rl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Tl({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),Vl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],zl=Vl.map((e=>({key:e}))),Dl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Al={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},jl={className:"min-w-32",iconVersion:"black",isBorder:!1},$l=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=ml(!1),[u,g]=n(l?.getMonth()||(new Date).getMonth()),[x,f]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=bl(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Vl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:zl,yearsOptions:Dl,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:h,selectedYear:x,selectedMonth:u,showCalendar:m});return c("div",{className:p("space-y-xs",e),ref:C,children:[hl(t),c("div",{className:"relative",children:[_l(S,l,a),m?c("div",{className:"absolute bg-white z-20 select-none",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(H,{...Al,className:"-rotate-90 cursor-pointer"})}),o(wl,{onChange:v,value:{key:Vl[u]},options:w,...jl}),o(wl,{onChange:N,value:{key:String(x)},options:k,...jl}),o("div",{className:"my-auto",onClick:y,children:o(H,{...Al,className:"rotate-90 cursor-pointer"})})]}),o(Pl,{today:l,currentMonth:u,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),_l=(e,t,l)=>c("div",{onClick:e,className:p("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[o(k,{children:t&&Bt(t)}),o(H,{...Al,name:"CalendarIcon"})]}),Ll=d((({className:e,label:t,error:l,...n})=>c("div",{className:p("shrink-0 w-full",e),children:[o($l,{label:t&&n?.errors?`${t}*`:t,valid:Boolean(!l),...n}),nl(l)]}))),Ol=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,type:d,...m})=>c("div",{className:p("shrink-0 w-full",e),children:[o(pl,{type:d||"text","aria-label":t,label:t&&m?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:m?.errors&&!t?`${n}*`:n}),nl(a)]}))),El=e=>"_"===e,Fl=e=>/\d/.test(e),Ul=e=>El(e)||Fl(e),Wl=[..."+7 (___) ___-__-__"],Hl=Wl.findIndex(El),ql=Wl.map(((e,t)=>Ul(e)?Wl.slice(0,t).filter(Ul).length:-1));const Kl=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Wl.map(((e,l)=>Fl(e)?e:t.charAt(ql[l])||e)),n=ql.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Hl,n)):l).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&(t&&t(""))}),[]);return o(pl,{...l,onChange:n,onFocus:e=>n(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),Xl=d((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Kl,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),nl(n)]}))),Yl=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(wl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),nl(l)]}))),Gl="Некорректно заполненное поле",Ql=ll((e=>null!=e&&""!==e))(Gl),Jl=ll((e=>e?.key&&""!==e?.key))(Gl),Zl=ll((e=>"string"==typeof e&&e.length>1))(Gl),en=ll((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Gl),tn=(ln=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,ll((e=>"string"==typeof e&&ln.test(e))))(Gl);var ln;const nn=ll((e=>"boolean"==typeof e&&e))("Согласие обязательно"),an={typeForm:Ql,surname:Zl,name:Zl,region:Jl,addressBranch:Jl,phone:tn,secondaryPhone:tn,birthday:Ql,email:Ql,fullName:Zl,inn:en,partnerComments:Ql,collectionCount:Ql,comment:Ql,acquiringType:Jl,feedbackType:Jl,feedbackMethod:Jl,serviceType:Jl,serviceDirection:Jl,consentDataProcessing:nn,annualRevenue:Ql},rn=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,an?.[e]])))},sn=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},on=(e,t,l=!1)=>l?sn(e,t):e,cn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],dn=d((({field:e,input:t})=>o(Yl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:cn,...on(e("acquiringType"),an.acquiringType,t?.required)}))),mn=(e="")=>Boolean("trade"===e||"all"===e),hn=e=>null!=e,un=new Map,pn=e=>Boolean(e?.every((e=>Array.isArray(e)?pn(e):!e||"string"==typeof e))),gn=e=>pn(e)?e.toString():"";function xn(e,t,{fallback:l,cache:i}={}){const s=r((()=>fn(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(hn))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=un)=>l=>{const n=gn(l),a=t.get(n);if(n&&hn(a))return a;const i=e(...l);return n&&hn(i)&&t.set(n,Promise.resolve(i)),i})(t,i)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function fn(e){return Array.isArray(e)?e:e instanceof Function?fn(e()):[e]}const bn=[];const yn=async e=>await ft(e,{method:"GET"})||bn;function vn(){const{data:e}=xn("/api/v1/branchesByRegions",bt);return Array.isArray(e)?e:[]}const Nn=d((({field:e,input:t,isPremium:l=!1})=>{const n=e("region"),i=n?.value?.key,r=n?.value?.text,s=l?vn()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=xn(e?`/api/v1/branches?regionCode=${e}`:null,yn);return t||bn}(i)?.filter((e=>e?.address));return a((()=>{""!==n?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[n?.value]),o(Yl,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...on(e("addressBranch"),an.addressBranch,t?.required),isSearch:!0})})),wn=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},kn=(e,t,l)=>Math.max(t,Math.min(e,l));function Sn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function Cn({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:p("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:l,step:n,value:s,disabled:i,onChange:t=>{const l=Sn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const Tn=1,In=100,Bn=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:Tn),max:s=(a.length?a.length-1:In),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:u}=e,g=wn(e,{normalize:(e=0)=>a.length?Mn(a)(e):kn(e,r,s),format:tt()}),x=i((e=>{u&&u(Sn(e.target?.value))}),[u]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(je,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,o("input",{className:p("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",ul,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:x,...g}),Cn({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:u})]}),Rn(n)]})})),Mn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),Rn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(je,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Pn=["От 1 000 ₽","До 1 000 000 000 ₽"],Vn=d((({field:e})=>o(Bn,{title:"Сумма, ₽",items:Pn,min:1e3,max:1e9,...e("amount")}))),zn=d((({field:e,input:t})=>o(Ol,{className:"col-span-2",...on(e("comment"),an.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Dn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],An=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],jn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],$n=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],_n=d((({field:e})=>o(Yl,{label:"Способ получения ответа",options:$n,...sn(e("feedbackMethod"),an.feedbackMethod)}))),Ln=d((({field:e})=>{const t=e("feedbackType");return a((()=>{"FEEDBACK"===t?.value?.key&&e("serviceDirection")?.onChange?.(An[0])}),[t?.value]),o(Yl,{label:"Тема",placeholder:"Выберите тему",options:jn,...sn(t,an.feedbackType)})})),On=d((({field:e})=>o(dl,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),En=d((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>c("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[o("div",{className:p("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:p("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(je,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Fn=d((({field:e})=>mn(e("acquiringType")?.value?.key)?o(En,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Un=d((({field:e})=>{const t=e("secondaryPhone");return o(Xl,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?sn(t,an.secondaryPhone):t})})),Wn=d((({field:e})=>mn(e("acquiringType")?.value?.key)?o(En,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null));function Hn(){const{data:e}=xn("/api/v1/regions",bt);return Array.isArray(e)?e:[]}const qn=d((({field:e,input:t})=>{const l=Hn();return o(Yl,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...on(e("region"),an.region,t?.required)})})),Kn=d((({field:e,input:t})=>{const l=vn(),n=r((()=>l?.map((({region:e})=>({key:e,text:e})))),[l]);return o(Yl,{label:"Регион",placeholder:"Выберите регион",options:n,...on(e("region"),an.region,t?.required)})})),Xn=d((({field:e})=>o(Yl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:An,...sn(e("serviceDirection"),an.serviceDirection)}))),Yn=["От 1 мес","До 15 лет"],Gn=d((({field:e})=>o(Bn,{title:"Срок, месяцев",items:Yn,min:1,max:180,...e("term")}))),Qn=d((({field:e})=>o(Yl,{label:"Тип обслуживания",options:Dn,...sn(e("serviceType"),an.serviceType)}))),Jn=d((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:p(ul,il,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:l,name:e,checked:n,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(je,{color:"text-primary-text",children:t}):null]})}))),Zn=["currencyControl","documentOperations","conversionTransactions","otherIssues"],ea=d((({field:e})=>{const{value:t,onChange:l}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(Jn,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:l}),o(Jn,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:l}),o(Jn,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:l}),o(Jn,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:l})]})})),ta=(e,t)=>(l,n)=>{const{required:a,...i}=l,r="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,s={surname:o(Ol,{label:"Фамилия",...on(e("surname"),an.surname,a)}),name:o(Ol,{label:"Имя",...on(e("name"),an.name,a),...i}),middleName:o(Ol,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),phone:o(Xl,{label:"Телефон",...on(e("phone"),an.phone,a)}),email:o(Ol,{label:"Электронная почта",...on(e("email"),an.email,a)}),fullName:o(Ol,{label:"ФИО",...on(e("fullName"),an.fullName,a),...i}),inn:o(Ol,{label:"ИНН",type:"number",...on(e("inn"),an.inn,a)}),comment:o(zn,{field:e,input:l}),region:r?o(Kn,{field:e}):o(qn,{field:e,input:l}),addressBranch:o(Nn,{field:e,input:l,isPremium:r}),birthday:o(Ll,{label:"Дата рождения",...on(e("birthday"),an.birthday,a)}),isClient:o(On,{field:e}),consentToReceiveMaterials:o(dl,{...e("consentToReceiveMaterials"),text:"Согласен на получение информационных и аналитических материалов по электронной почте"}),partnerComments:o(Ol,{...on(e("partnerComments"),an.partnerComments,a),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...i}),collectionCount:o(Ol,{label:"Количество объектов инкассации",type:"number",...on(e("collectionCount"),an.collectionCount,a)}),acquiringType:o(dn,{field:e,input:l}),onlineCheckout:o(Fn,{field:e}),posTerminal:o(Wn,{field:e}),serviceType:o(Qn,{field:e}),term:o(Gn,{field:e}),amount:o(Vn,{field:e}),annualRevenue:o(Ol,{label:"Годовая выручка, ₽",...on(e("annualRevenue"),an.annualRevenue,a)}),vedTypes:o(ea,{field:e}),feedbackType:o(Ln,{field:e}),feedbackMethod:o(_n,{field:e}),serviceDirection:o(Xn,{field:e}),bankEmpolee:o(Ol,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}),applicationDate:o(Ol,{label:"Дата и время обращения в Банк",...e("applicationDate")}),secondaryPhone:o(Un,{field:e})};return function({input:e,field:t}){const{condition:l}=e,{value:n}=t(l?.name||"");return!l||l?.values?.find((e=>e===(n?.key??n)))}({input:l,field:e})?o("div",{children:s[l?.name]},String(n)):null};const la=e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:n,amount:a,term:i,annualRevenue:r,serviceType:s,feedbackType:o,vedTypes:c,region:d,...m}=e,h=t||r?(e=>{const{acquiringType:t,onlineCheckout:l=!1,posTerminal:n=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${mn(t?.key)?`/Онлайн касса=${l}/POS-терминал=${n}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...m,...aa(c),...na(d),...h?{partnerComments:h}:{},...s?{typeForm:s}:{},...o?{typeForm:o}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},na=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},aa=e=>e?{vedTypes:Object.fromEntries(Zn.map((t=>[t,t===e])))}:{},ia={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e3,acquiringType:cn[0],serviceType:Dn[0],feedbackType:jn[0],feedbackMethod:$n[0],serviceDirection:An[0],vedTypes:Zn[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},ra=(e,t="")=>{const l=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||ia[e.name]])));return l?.serviceType&&"PREMIUMSERVICE"===t&&(l.serviceType=Dn[1]),{...l,typeForm:{key:t,text:""}}},sa=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(je,{children:e}):null,t?o(fe,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(je,{children:t.text})}):null]}))),oa=(e,t)=>o(Jt,{className:p("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ca=(e,t,l)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(sl,{...e}),o(sa,{link:t})]}),nl(sn(e,nn).error)]}):o(sa,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),oa(l)]}),da={send:async function(e,t=!1){const{typeForm:l,region:n,phone:a="",email:i,birthday:r,inn:s,fullName:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:l,...Vt(n,g),...zt(i,g),...Rt(a),...g?Pt(r):{inn:s,fullName:o},..."FEEDBACK"===l?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...Dt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},ma=d((({className:e,title:t,typeForm:l="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:u,data:g,...x})=>{const f=r?.flatMap((e=>e?.inputs))||[],b=ra(f,l),[y,v]=n(""),N=i((async(e,t)=>{const l=ga(f,e),n=(a=rn(l),e=>e&&Object.entries(a).flatMap((([t,l])=>l(e[t])))||[]);var a;if(n(e)?.length)return"Fail";const i=la({...e,...h}),r=await da.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){(e=>{const{open:t,close:l}=ce();return{open:(l={})=>t(o(tl,{...e}),l),close:l}})({responseType:r}).open()}if("OK"===r&&g){const e=Ht();At({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:S,reset:C}]=Kt(b,{onSubmit:N}),T=pa(f)?.name;return a((()=>{"OK"===y&&C()}),[y]),c(Xt,{className:p("container space-y-m",e),title:t,...x,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:p(ua(e.columns),"grid gap-x-m"),children:[ha(e.title),(e?.inputs||[])?.map(ta(k,l))]},`section-${t}`))),ca(T?k("consentDataProcessing"):void 0,d,s)]}),u?c("div",{className:"space-y-m",children:[o(w,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[o(le,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(le,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),ha=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(je,{size:"text-h6",children:e})}):null,ua=e=>2===e?"@xl:grid-cols-2":"",pa=e=>e?.find((e=>"consentDataProcessing"===e?.name)),ga=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((l=>{const n=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):l===(n?.key??n)})))),xa="text-center",fa=d((({title:e,description:t})=>c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(le,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:xa,className:"space-y-s"})]}))),ba=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",ya=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function va(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:Na(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function Na(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const wa=d((({className:e,style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const c=va(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return o("div",{className:p("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:c,role:"listitem",children:r})})),ka=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Sa=d((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:u,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:l},b=s([]),y=i(((e,t)=>{const l=[...b.current||[]];l[e]=t,b.current=l,g&&g(l),x&&x(Ta(l))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Ca(c,v):{},...N?ya(h):{},gap:`${r}px`};return o("div",{className:p("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,role:"list",children:(S=(e,l)=>o(wa,{className:p(m,a?ka[a-1]:"",N?"h-full":"",t),style:w?Ca(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(u)});var S})),Ca=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Ta=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Ia={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Ba={"horizontal-list":"w-6","vertical-list":"h-6"},Ma=d((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?o("div",{className:p("flex gap-xs",Ia[a],i?"group":"",e),"data-ver":i,children:Array.from({length:n}).fill(null).map(((e,n)=>o("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?Ba[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Ra=d((({className:e,disabled:t,...l})=>o(fe,{rounded:!0,className:p("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:o(le,{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"})}))),Pa=d((e=>o(Ra,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Va=d((e=>o(Ra,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),za="absolute top-[calc(50%-24px)] z-40",Da="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Aa=d((({className:e,scroll:t,hasBlur:l,arrowsPadded:n})=>{const{canScrollLeft:a,canScrollRight:i,scrollLeft:r,scrollRight:s}=t;return c("div",{className:p(e),children:[l?ja(t):null,a?o(Pa,{className:p(za,n?"left-1":"left-0"),onClick:r}):null,i?o(Va,{className:p(za,n?"right-1":"right-0"),onClick:s}):null]})})),ja=e=>c("div",{children:[e.canScrollLeft?o("div",{className:p(Da,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:p(Da,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),$a=e=>e,_a=(e=$a)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),La=_a(),Oa=(e=$a)=>_a((t=>-e(t))),Ea=Oa(),Fa=e=>t=>e.scrollWidth/t,Ua=e=>(t,l)=>{e.scrollBy({left:l*Fa(e)(t),behavior:"smooth"})},Wa=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[Oa()(a),_a()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Ua(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Ua(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Ha=d((({className:e,version:t,gap:l=14,padding:n=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:u,children:g,onVisibleIndicesChange:x})=>{const f=Array.isArray(g)?g.length:0,[b,y]=Wa({itemCount:f,onVisibleIndicesChange:x}),[v]=y.visibleIndicesRange;return c("div",{className:p(e,"vertical-list"===i?"relative h-full":""),children:[o(Sa,{containerRef:b,activeIndex:v,visibleItemCount:a,gap:l,padding:n,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:g}),o(Aa,{className:p(!d&&"hidden lg:block"),scroll:y,hasBlur:m,arrowsPadded:h}),o(Ma,{className:p(!u&&"lg:hidden"),containerRef:b,activeIndex:v,dotCount:f,listType:i,version:t})]})})),qa=({blocksToRender:e,...t})=>o(Ha,{visibleItemCount:0,gap:0,showArrows:!0,arrowsPadded:!0,children:R(e,{...t.options,parent:t.block,renderProps:(e,t,l)=>o("div",{className:p("relative min-w-80",ba(!0)),children:B(e,t)},String(l))})}),Ka=e=>e%2!=0,Xa=d((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,role:r,...s})=>c(l,{tag:l,className:p("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Ya=d((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>o(Xa,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",role:"button",className:p("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(je,{size:"text-h4",children:t}),iconNode:l?o(le,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Ga=({isUnfolded:e,onToggle:t})=>o(Ya,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Qa=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const Ja=d((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:l})})})),Za=["ArrowDownIcon","ArrowUpIcon"],ei="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",ti=({topItemsCount:e=0,label:t="",block:l,blocksToRender:n=[],...a})=>{const[i,r]=e>0?[n.slice(0,e),n.slice(e)]:[n,[]];return c("div",{className:p("space-y-2xs",n.length?"":"hidden"),children:[c("div",{className:p(ei),children:[R(i,{...a.options,parent:l}),Ka(i.length)?o(Tt,{className:"col-span-6",...a}):null]}),o(Qa,{renderFoldableSection:({isUnfolded:e})=>c(Ja,{className:p(ei),isUnfolded:e,children:[R(r,{...a.options,parent:l}),Ka(r.length)?o(Tt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:l,onToggle:n})=>o(Ya,{className:p(e<1?"hidden":""),disabled:!r?.length,label:t,icon:Za[Number(l)],dataTheme:a.options?.page?.colorPalette,onClick:n})})]})},li=d((({blocksSection:e,blocksToRender:t=[],notFound:l,...n})=>{switch(e?.view){case"grid":return c("div",{children:[ni(l,t),ti({...e,...n,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[ni(l,t),qa({...n,blocksToRender:t})]});default:return null}})),ni=(e,t)=>e&&!t.length?o(fa,{...e}):null,ai=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),ii=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(En,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),ri=d((({children:e,filtrationSchema:t,resetButton:l,field:n,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,ai(o("div",{className:"h-full w-px bg-gray"}))(Object.entries(t).map(si(n)).filter(Boolean))]}),l?o("div",{children:o(Jt,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:l?.text})}):null]}))),si=e=>([t,l])=>{const n=l?.type;return"array"===n?oi(t,e)(l):null},oi=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[l?.title?o("div",{className:"mb-m",children:o(je,{size:"text-m",font:"font-medium",color:"text-primary-text",children:l.title})}):null,o(ii,{items:n,multiple:!l?.single,...t(e)})]},e)};function ci(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const di=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,mi=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>di(t[e])||di(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>di(t[e])||di(l[e])||hi(t[e])<=hi(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>di(t[e])||di(l[e])||hi(t[e]?.min)>=hi(l[e]?.min)&&hi(t[e]?.min)<=hi(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>di(t[e])||di(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>di(t[e])||di(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),hi=e=>Number(e||0),ui=(e,{block:t,page:l,normalize:n=qt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=Kt(e),d=r((()=>ci(a,a.map((e=>wt(e.content,l?.fallback))))),[a,l?.fallback]),m=i===e?a:((e,t)=>(l=qt)=>e?.filter((([,e])=>mi(t,l(e)||{}))).map((([e])=>e)))(d,i)(n);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},pi={},gi={},xi=St((({className:e,filtrationSchema:t=pi,consumerField:l={},resetButton:n,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=ui(gi,{block:a.block,page:a.options?.page}),d=o(wl,{className:"w-64",label:l?.title,options:fi(l),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>fi(l).find((t=>t.key===e))||{key:""}})});return c(x,{className:p(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(ri,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Jt,{type:"reset",className:"mt-lg w-64",onClick:s,version:n?.version,children:n?.text})})]})}),o(li,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),fi=e=>ci(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),bi={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},yi=d((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:p("rounded-icon object-fit flex justify-center items-center",bi[l],e),children:o(H,{...i,width:"54%",height:"54%",name:a})}):null})),vi=d((({className:e="",title:t,benefitList:l,...n})=>c(x,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(w,{headingType:"h3",as:"h2",className:xa,title:t}):null,l?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(Ni)}):null]}))),Ni=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?o(yi,{className:"shrink-0",defaultIconSize:44,iconBgVersion:a||"",...n}):null,n?.src?o(le,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(w,{headingType:"h6",children:e}),o(je,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),o(et,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),wi=e=>({icon:t,title:l,description:n},a)=>c("div",{className:p("flex flex-col gap-1","items-center",n||l?"":"justify-center"),children:[l?o(je,{size:"text-h6",font:"font-normal",align:e,children:l}):null,t?o(le,{image:t,height:"180",className:"w-auto mx-auto"}):null,n?o(je,{size:"text-h6",font:"font-normal",align:e,children:n}):null]},String(a)),ki=(e,t,l)=>o("div",{className:`grid gap-2xs ${Si(t)}`,children:e.map(wi(l))}),Si=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Ci=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>c(x,{className:p("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?ki(e,n,t):null]}))),Ti={start:"justify-start",center:"justify-center",end:"justify-end"},Ii=d((({buttons:e,className:t="",align:l,...n})=>{const a=l?p("flex",Ti[l]):"";return o(x,{className:p("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Xe(e)})})),Bi=d((({className:e,title:t,children:l,...n})=>c(x,{className:p("space-y-xl",e),defaultPadding:"p-4xl",...n,children:[t?o(w,{className:"text-center",title:t}):null,l]}))),Mi="flex flex-col justify-between @4xl:flex-row gap-x-s gap-y-7 @xl:gap-y-4xl",Ri="flex flex-col lg:max-w-80 gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",Pi="flex flex-col gap-y-xl",Vi=d((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r,color:s="text-secondary-text"})=>c("div",{className:p("flex justify-between @xl:flex-col",e),children:[t?o(je,{size:"text-l",font:"font-light",color:s,children:t}):null,o("div",l?{children:o(je,{size:"text-h3",children:[i,tt(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:o(je,{size:"text-h3",children:"-"})})]}))),zi=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Di=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(je,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex justify-start gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:tt(n,{fixed:!0})(e)}),l?o("span",{className:"text-7xl",children:l}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Ai=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s",children:[o(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(H,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),ji=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(Ai,{title:e,...s}):c("div",{children:[o("div",{className:"hidden @xl:block min-w-96",children:o(Di,{title:e,rate:t,unit:l,fractionDigits:n,color:i,...s})}),o("div",{className:"@xl:hidden",children:o(Vi,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,color:i,...s})}),r]});function $i({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${tt(2)(l.min||0)} ₽`,`До ${tt(2)(l.max||0)} ₽`];return o(Bn,{items:e?n:[],step:t,...l})}const _i={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Li={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Oi=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,[a,i]=((e,t,l)=>{const{maxBonus:n=5e3,prefMonthsNum:a=_i.prefMonthsNum,prefTravelBonusRate:i=_i.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*l),n);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*l),n)*(12-a)]})(t||Li,l,n);return{...t,...e,monthBonus:a,yearBonus:i}},Ei=St((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,...i})=>{const[r,{field:s}]=Kt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:u,monthBonus:g,yearBonus:x}=Oi(r,l);return o(Bi,{className:e,title:t,...i,children:c("section",{className:p(Mi,e),children:[c("div",{className:Ri,children:[$i({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),$i({title:"Сумма покупок в остальных категориях, ₽",min:h,max:u,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?ji({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Pi,children:[x>=0?o(Vi,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,Xe(n,{isVertical:!0}),zi(a)]})]})})})),Fi=Math.round(29.5),Ui=(e,t=0)=>e?.sum?e.sum:t,Wi=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Hi=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,qi={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Ki=d((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>o("div",{className:p(`flex ${qi[a]}`,l),role:"radiogroup",children:e?.map((({id:e,text:l})=>o(sl,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Xi=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",children:o(je,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",children:o(je,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(Ki,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:i,onChange:t=>r&&r(t===e[0].id)})]}),Yi=e=>Xi({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Gi=({income:e,finalSum:t,buttons:l=[],footnotes:n=[]})=>c("div",{className:Pi,children:[o(Vi,{title:"Доход в конце срока",value:e,postfix:"₽",prefix:"+"}),o(Vi,{title:"Сумма в конце срока",value:t,postfix:"₽"}),Xe(l,{isVertical:!0}),n?.map(zi)]}),Qi=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Ji([e,t],n),Ji=([e,t],l=[])=>({[e]:l.length?Ea(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?La(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Zi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],er={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const tr={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},lr=(e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=l<90||l>730,c=function(e){const t=e?.rateType?er[e?.rateType]:"",{data:l}=xn(t?`/api/v1/depositrates/${t}`:null,bt);return Array.isArray(l)?l:[]}(t);if(l<=30)return{...tr,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&nr(s,e)&&Zi(n,["minSum","maxSum"],e)&&Zi(l,["minDays","maxDays"],e)))||tr,{rate:m}=d,h=ar(m,e),u=n+h,p=c||[tr];return{...d,...Ji(["minSum","maxSum"],p),...Ji(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},nr=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,ar=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},ir=St((({className:e="",title:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=Kt({moneyValue:Ui(r,1e5),daysValue:Wi(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),u=lr(m,s),{income:g,finalSum:x,rate:f,isUnavailableByTerm:b,depositeName:y}=u;return o(Bi,{className:e,title:t,...d,children:c("section",{className:p(Mi,e),children:[c("div",{className:Ri,children:[$i({title:"Сумма, ₽",min:u.minSum,max:u.maxSum,...h("moneyValue"),value:u.moneyValue}),(v={title:"Срок, дней",min:u.minDays,max:u.maxDays,...h("daysValue"),value:u.daysValue},o(Bn,{items:[`От ${Hi(v.min||0)}`,`До ${Hi(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[rr(u,h),Yi({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),ji({rate:f,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),Gi({income:g,finalSum:x,buttons:l,footnotes:[n,a]})]})});var v})),rr=(e,t)=>c("div",{className:"space-y-s",children:[o(je,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(sl,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(sl,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),sr=(e,t)=>{if(!t?.length)return;const l=t?.reduce(((t,l)=>e[0](l.rate,t[0].rate)?[l]:l.rate===t[0].rate?[...t,l]:t),[t[0]]);return l.length>1?l.reduce(((t,l)=>e[1](l,t)?l:t),l[0]):l[0]},or=({min:e=0,max:t=0,availableMonths:l,...n})=>o(Bn,{items:[`От ${cr(e)}`,`До ${cr(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),cr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,dr=e=>Xi({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),mr=({field:e,defParams:t,calcParams:l,map:n,monthsValue:a="maxMonths"})=>{Object.entries(n).forEach((([l,n])=>{e?.(l)?.onChange?.(t?.[n])})),e?.("monthsValue")?.onChange?.(kn(t?.[a],l.minMonths,l.maxMonths))},hr=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},ur={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},pr=e=>gr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&gr({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&gr({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&gr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),gr=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],xr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows||[ur],r=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>pr({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:s,maxSum:o}=Qi(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=Qi(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>pr({row:e,userInputParams:t,paramsViewSettings:l})&&Zi(n,["minSum","maxSum"],e)&&Zi(a,["minMonths","maxMonths"],e)))||ur)({rateRows:i,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:h}=m,u=hr(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:n,monthsValue:a,monthlyPayment:u}},fr=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),br={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},yr=St((({className:e,title:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(h=l?.rateRows,sr([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],h));var h;const[u,{field:g}]=Kt({moneyValue:Ui(s,2e5),monthsValue:Wi(s,Fi),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),x=xr(u,l,r),f=dr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(kn(u.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(kn(u.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!fr(s)&&m&&mr({field:g,defParams:m,calcParams:x,map:br,monthsValue:"minMonths"})}),[l,s]),o(Bi,{className:e,title:t,...d,children:c("section",{className:p(Mi,e),children:[c("div",{className:Ri,children:[$i({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),or({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),vr({...x,...r},g),o("div",{className:"sm:hidden",children:f})]}),ji({rate:x.rate}),c("div",{className:Pi,children:[o(Vi,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),Xe(n,{isVertical:!0}),zi(i)]})]})})})),vr=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(sl,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(sl,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(sl,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(sl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Nr=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},wr={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},kr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows?.[0]?Tr(t.rateRows[0].minMonths,t.rateRows[0].maxMonths):0,r=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=!l?.isShowReplenish,c=!l?.isShowWithdrawn,d=t?.rateRows?.find((t=>Cr({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o})&&Cr({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c})&&Cr({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r})&&Cr({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&Zi(n,["minSum","maxSum"],t)&&Zi(a||i,["minMonths","maxMonths"],t)))||wr,{rate:m}=d,h=Sr(m,e),u=n+h,p=t?.rateRows||[wr];return{...d,...Ji(["minSum","maxSum"],p),...Ji(["minMonths","maxMonths"],p),availableMonths:Nr(p.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:i,income:h,finalSum:u}},Sr=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},Cr=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Tr=(e,t)=>e+Math.round((t-e)/2),Ir=(e,t)=>{return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?Xi({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}]}):null,e.isShowWithdrawn?Xi({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}]}):null]}),o("div",{className:"border-b border-main-divider w-full"}),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Yi({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},Xi({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]})]});var l},Br={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Mr=St((({className:e,title:t,calcSource:l,buttons:n=[],footnote:i="",paramsViewSettings:r,defaultParams:s,...d})=>{const m=(h=l?.rateRows,sr([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],h));var h;const[u,{field:g}]=Kt({moneyValue:Ui(s,2e4),monthsValue:Wi(s),isMonthlyInterestPayment:Boolean(s?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(s?.isRemoteRegistration),isReplenish:!1,isWithdrawn:Boolean(s?.isWithdrawn??!1)}),x=kr(u,l,r),{defaultMonth:f,rate:b,income:y,finalSum:v,type:N=""}=x,{onChange:w}=g("monthsValue"),{onChange:k}=g("moneyValue");a((()=>{!u.monthsValue&&w&&w(f)}),[f]),a((()=>{k&&k(kn(u.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]);const S=()=>mr({field:g,defParams:m,calcParams:x,monthsValue:"minMonths",map:Br});a((()=>{!fr(s)&&m&&S()}),[l,s]);const C=b===m?.rate;return o(Bi,{className:e,title:t,...d,children:c("section",{className:p(Mi,e),children:[c("div",{className:Ri,children:[$i({title:"Сумма, ₽",min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),or({title:"Срок, месяцев",min:x.minMonths,max:x.maxMonths,availableMonths:x.availableMonths,...g("monthsValue"),value:x.monthsValue}),Ir({...x,...r},g)]}),ji({rate:b,children:Pr(S,C)}),Gi({income:y,finalSum:v,buttons:[...n,Rr(l?.buttons,N)],footnotes:[i]})]})})})),Rr=(e=[],t="")=>{const{type:l,...n}=e.find((e=>e.type===t))??{};return n},Pr=(e,t=!1)=>t?null:o(Jt,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Vr=e=>zr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&zr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),zr=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Dr={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ar=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[Dr],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Vr({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Qi(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Qi(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Vr({row:e,userInputParams:t,paramsViewSettings:l})&&Zi(n+r,["minSum","maxSum"],e)&&Zi(i,["minSumOld","maxSumOld"],e)&&Zi(r,["minSumExtra","maxSumExtra"],e)&&Zi(a,["minMonths","maxMonths"],e)))||Dr)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=hr(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},jr=St((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=Kt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Ar(s,l,i),h=dr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Bi,{className:e,title:t,...r,children:c("section",{className:p(Mi,e),children:[c("div",{className:Ri,children:[$i({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),$i({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),or({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),$r({...m,...i},d),m.isExtraMoney?$i({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:h})]}),ji({rate:m.rate,fractionDigits:1}),c("div",{className:Pi,children:[o(Vi,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Vi,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),Xe(n,{isVertical:!0}),zi(a)]})]})})})),$r=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(sl,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(sl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(sl,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),_r=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=wn(e,{normalize:(e=a)=>l&&n?String(kn(Number(Lr(e)),l,n)):Lr(e),format:tt(r)}),d=i((e=>t&&t(Lr(e))),[t]);return o(pl,{onChange:d,...s,...c})})),Lr=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Or=d((e=>o(_r,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(je,{size:"text-xl",font:"font-light",children:"₽"})})}))),Er={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Fr={amount:1500},Ur=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=Kt(Fr),[h,u]=n(!1);return a((()=>{u(d<=0)}),[d]),c(x,{className:p("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(w,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Er[r],children:[o(Or,{valid:!h,label:l,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(Jt,{className:"w-full mt-lg",type:"submit",disabled:h,children:i.text}):null]})]})})),Wr=({className:e,text:t="ХИТ"}={})=>c("div",{className:p("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(H,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Hr="relative h-full",qr={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Kr=({noCardBorder:e,cardSize:t="normal",...l})=>{const{blocks:n}=l.block||{},a=n?.some(Gr);return P({...l,renderProps:(l,n,i)=>c("div",{className:Xr(l,{someCardsHighlighted:a}),children:[B(l,n,{className:Yr(l,{someCardsHighlighted:a,showBorder:!e,cardSize:t}),blockIndex:i}),Gr(l)?Wr({className:"absolute top-0 -right-4 z-40"}):null]},String(i))})},Xr=(e,{someCardsHighlighted:t})=>p(Hr,t&&(Gr(e)?"pt-3xl":"pt-3xl sm:pt-16")),Yr=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>p(Hr,"min-w-80",qr[n],t&&(Gr(e)?"pt-3xl sm:pt-16":"pt-3xl"),ba(l),l&&"h-full"),Gr=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Qr=St((({className:e,visibleItemCount:t=1,noCardBorder:l,arrowsPadded:n=!0,isGap:a=!0,cardSize:i="normal",...r})=>o(x,{className:p(e),defaultPadding:"p-6xl",...r,children:o(Ha,{className:p("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:n,hasBlur:!0,children:Kr({noCardBorder:l,cardSize:i,...r})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Jr="z-10 border border-solid w-full h-full",Zr=p(Jr,"absolute hidden @xl:block border-transparent"),es=d((({className:e,title:t,description:l,button:n,...a})=>o(x,{className:p("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:p(Zr,"top-9 right-12 bg-green-dark")}),o("div",{className:p(Zr,"top-6 right-8 bg-green")}),o("div",{className:p(Zr,"top-3 right-4 bg-green-light")}),c("div",{className:p(Jr,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Xe([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),ts={black:"bg-black",white:"bg-white"},ls=d((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(x,{className:p("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(we,{className:"h-full",padding:d,title:o(C,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(le,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Xe([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(je,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(ns)]}):null,a?c(je,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),ns=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${ts[e]}`},String(t)),as=d((({icon:e,...t})=>{const l=me(),{text:n,href:a,target:i,onClick:r}=l(t);return n?o("div",{className:p("h-32 rounded-lg bg-white text-secondary-text flex items-center justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-4 break-words max-w-[150px]",children:[e?o(le,{className:p(""),image:{...e,iconVersion:e?.iconVersion},width:"50",height:"50",alt:n}):null,o("div",{className:"text-primary-text text-center text-sm whitespace-wrap min-h-8",children:n})]})})}):null})),is=d((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>o(x,{defaultPadding:"p-5xl",className:p("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-4xl justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?rs(n):null]})}))),rs=e=>o("div",{className:p("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-4"),children:e.map(((e,t)=>o(as,{...e},String(t))))}),ss=d((({className:e="",href:t,target:l,onClick:n,data:a,children:i})=>{const r=me()({href:t,target:l,onClick:n});return o(t?"a":"div",{className:p("block",e),...t?r:{},role:t?"link":"none",...he(a),children:i})})),os=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],cs=d((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=n(),m=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=(e=>os.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ke(n)?n:r,c=l?{text:a}:{text:""};return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:"color"},version:e?.version??i}})),h=p("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",ds(a));return c("div",{className:p("flex flex-col gap-m xl:gap-xs",e),children:[o("div",{className:"flex gap-xs",children:Xe(m,{className:ms(s??!1,a??!1,l),buttonClassName:h})}),r?o(je,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),ds=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",ms=(e,t,l=!1)=>p(e||t?"basis-full":"",!t||l&&e?"":"flex-nowrap"),hs=d((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:d=[],target:m,title:h,align:u="text-left",benefits:g,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},...v})=>o(x,{className:p("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...v,children:o(ss,{href:a,target:m,className:"h-full",children:c(we,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:h,description:l,headlineVersion:"XS",isEmbedded:!0,align:u}),...ot(Ke(i)?o(le,{image:i}):null,f),buttons:d.length?o(cs,{media:d,stretched:!0,showButtonText:!0,version:v?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(qe,{benefits:g}),o(et,{items:r,isDotted:s,listItemSize:"S"}),us(n,u)]})})}))),us=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,ps=(e,t)=>{const{title:l,description:n,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[l?o("div",{className:"opacity-80",children:o(je,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(je,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:Xe(a)}):null]},String(t))},gs=d((({className:e="",title:t,align:l="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:u,...g})=>{const f=d.map(ps),[b,y]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[v,N]=n(!1);return a((()=>h.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&N(e.isUnfolded)}))),[m?.parent]),c(x,{className:p("flex flex-col",e),defaultPadding:"p-2xl",...g,children:[Ke(i)?o("div",{className:"self-center",children:o(le,{image:i})}):null,t?o(w,{className:p("pt-xs",l),headingType:"h5",title:t}):null,r?.text?o(fe,{className:"w-full mt-m mb-lg",...r}):null,y.length?o(Qa,{renderFoldableSection:()=>c("div",{children:[b,o(Ja,{isUnfolded:v,children:y})]}),renderFoldButton:d.length>1?xs(v,m?.parent,u):null}):o("div",{children:b})]})})),xs=(e,t,l)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&h.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",...e?he(l):{},children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(H,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),fs=(e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},bs="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",ys="border-gray border-solid border",vs="border-main-divider border-b",Ns="w-52",ws=d((({icon:e,image:t,title:l,link:n})=>c("div",{className:p("w-80 box-border flex flex-col gap-m items-center rounded-t-md border-b-0 p-2xl",ys,bs),role:"columnheader",children:[e&&!t?.src&&o(le,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}),t?.src&&o(le,{image:t}),l?o(w,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,n?.text&&o("div",{className:"mt-auto w-full",children:o(fe,{href:n.href,target:n.target||"",className:"w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:o("div",{className:"py-s",children:o(k,{size:"text-xs",font:"font-medium",children:n.text})})})})]}))),ks={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Ss=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:ks[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),Cs=d((({children:e})=>o("div",{className:"self-start flex flex-col",role:"row",children:o("div",{className:"flex gap-xl",children:e})}))),Ts=d((({colHeaders:e,activeIndex:t})=>c(Cs,{children:[o("div",{className:Ns,role:"columnheader"}),o(Ss,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>o(ws,{...e},String(t))))})]})));function Is({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(Ra,{className:p("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(Ra,{className:p("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Bs=d((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:n})=>{const a=p("w-80 box-border flex flex-col",ys,l?"border-t-0 rounded-b-md":"border-y-0",n?bs:""),i=p("mx-2xl h-full",vs,n&&t?"border-t":"",l?"border-b-0":"border-solid");return o("div",{className:a,role:"cell",children:o("div",{className:i,children:e?e.map(((e,t)=>Ps(e,t,n))):null})})})),Ms=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),Rs=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),Ps=({label:e,description:t},l,n)=>c("div",{className:"first:pt-2xl pt-xl last:pb-2xl",children:[e?o("h4",{className:Ms(n),children:e}):null,t?o("div",{className:Rs(n),children:t}):null]},String(l)),Vs=(e=!1)=>p("py-2xl",vs,Ns,e?"border-b-0":"border-solid"),zs=d((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:n,isFirstRow:a,isLastRow:i})=>c(Cs,{children:[e?.title?o("div",{className:Vs(i),children:o(k,{size:"text-s",children:e.title})}):null,t?.length?o(Ss,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>o(Bs,{cell:e,isFirstRow:a,isLastRow:i,isFillGradient:n&&0===t},String(t))))}):null]}))),Ds=d((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:n})=>{const{isScrollAvailable:a}=n;return c("div",{className:"relative",children:[e.map(((e,n,{length:a})=>o(zs,{row:e,isFirstRow:0===n,isLastRow:n+1===a,activeIndex:l,isColoredFirstColumn:t},String(n)))),a?Is({...n,btnClass:["top-28","top-12"],className:"right-7",isDisabled:!0}):null]})})),As=d((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:n,isColoredFirstColumn:a})=>{const i=e?.map((({header:e})=>e||{})),r=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:r.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:n),[d,m]=fs({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:h}=m;return c("div",{children:[c("div",{role:"table",children:[i?.length?o(Ts,{colHeaders:i,activeIndex:d}):null,s?.length?o(Ds,{rowData:s,isColoredFirstColumn:a,activeIndex:d,controls:m}):null]}),h?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),js=d((({className:e="",title:t,rowHeaders:l,columns:a,visibleRowLength:r=0,isColoredFirstColumn:s=!1,...d})=>{const[m,h]=n(!r),u=i((()=>h((e=>!e))),[]);return c(x,{className:p("overflow-hidden relative",e),defaultPadding:"p-6xl",...d,children:[o(w,{headingType:"h2",className:"text-center mb-4xl mx-auto",title:t}),o(As,{columns:a,rowHeaders:l,isShowAllRow:m,isColoredFirstColumn:s,visibleRowLength:r}),r?$s({isShowAllRow:m,onClick:u}):null]})})),$s=({isShowAllRow:e,onClick:t})=>o("div",{className:"pr-6xl",children:c("div",{className:"flex gap-m w-full",children:[o("div",{className:Ns}),o("button",{type:"button",onClick:t,className:"py-xs flex-1 border-gray border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:o(je,{size:"text-xs",font:"font-medium",children:e?"Скрыть":"Показать все параметры"})})]})}),_s=d((({className:e,contacts:t,info:l,version:n="secondary",...a})=>c(x,{className:p("flex",e),defaultPadding:"p-6xl",version:n,...a,children:[l?.length?Ls(l):null,t?.length?Ls(t):null]}))),Ls=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>Os({column:e,index:t})))}),Os=({column:e,index:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:l,button:n},a)=>c("div",{children:[o(C,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),l?o("div",{className:"mt-xs opacity-80",children:o(k,{size:"text-m",font:"font-light",children:l})}):null,n?.text?o(fe,{className:"mt-xl",...n}):null]},String(a))))},`col-${String(t)}`):null,Es=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Fs=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),Us=1e9,Ws={sum:{min:1e4,max:Us},period:3},Hs=St((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=ui(Ws,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:qs(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),u=Ks(h);return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(ri,{filtrationSchema:t,resetButton:l,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Or,{label:n?.title,min:500,max:Us,...d("sum",{parse:e=>({min:Number(e),max:Us}),format:({min:e})=>String(e)})}),o(Bn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:u,...d("period")})]})}),o(li,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),qs=e=>yt((e?.paramsSource?.rateRows||[]).filter(Es).flatMap((e=>Fs(e.minMonths,e.maxMonths)))),Ks=e=>yt(e.flatMap((e=>e||[])).filter(Es).flatMap((e=>Fs(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Xs=[{key:"10"},{key:"50"},{key:"100"}],Ys=({itemCount:e,onItemCountChange:t})=>{const l=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"flex items-center gap-s",children:[o("span",{children:"Показать по"}),o(wl,{className:"min-w-20",onChange:l,value:{key:String(e)},options:Xs,iconVersion:"black"})]})},Gs="py-m px-lg rounded-md cursor-pointer hover:bg-primary-hover hover:text-white",Qs=(e,t)=>{const{currentPage:l,onPageChange:n,totalPages:a}=e,i=t+1;return i===l?o("div",{"aria-current":"true",className:"py-m px-lg bg-primary-main text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,l)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,l)=>t<=2&&e<=t+2||t>=l-1&&e>=l-3)(e,t,l))(i,l,a)?o("div",{onClick:()=>n(i),className:Gs,"aria-label":`Страница ${i}`,children:i},String(t)):null},Js={width:"24",height:"24"},Zs=({currentPage:e,onPageChange:t,totalPages:l})=>{const n=r((()=>Array.from({length:l}).fill({currentPage:e,onPageChange:t,totalPages:l})),[l,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<l&&t(e+1)}),[e,l]),d=i((()=>t(1)),[]),m=i((()=>t(l)),[l]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(H,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:eo(1===e),...Js})}),c("div",{className:"flex gap-2xs",children:[e>1?o("div",{onClick:d,className:Gs,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m px-s",children:"..."}):null,n.map(Qs),e<l-2?o("div",{className:"py-m px-s",children:"..."}):null,e<l?o("div",{onClick:m,className:Gs,"aria-label":`Страница ${l}`,children:l}):null]}),o("div",{onClick:s,children:o(H,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:eo(e===l),...Js})})]})},eo=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",to=({currentPage:e,onPageChange:t,totalPages:l,itemCount:n,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Zs,{currentPage:e,onPageChange:t,totalPages:l}),n&&a?o(Ys,{itemCount:n,onItemCountChange:a}):null]}),lo=d((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return c("div",{className:p("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(le,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:p("h-14 w-full px-10 text-l text-black box-border rounded-md",ul),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})})),no=d((({field:e,onClearFilter:t,filtrationState:l})=>c("div",{className:"grid grid-cols-12 mb-3xl space-x-xl",children:[o(lo,{className:"col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o($l,{className:"col-span-3",label:"Период от",maxDate:l.endDate,...e("startDate")}),o($l,{className:"col-span-3",label:"Период до",minDate:l.startDate,...e("endDate")}),o("div",{className:"col-span-2 mt-auto",children:o(Jt,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),ao=({title:e,timestamp:t,publicId:l})=>{const n=me(),{href:a}=n({href:`/api/v1/depository/${l}/file`});return c("div",{className:"grid grid-cols-12 py-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-2",children:t?o(je,{size:"text-m","font-weight":"font-light",children:Bt(t)}):null}),o("div",{className:"col-span-10 text-h6 hover:text-primary-active",children:o("a",{href:a,download:!0,"aria-label":"Скачать",children:e})})]},l)},io="/api/v1/depository",ro={startDate:void 0,endDate:void 0,query:""},so=St((({className:e,...t})=>{const[l,a]=n(0),[r,s]=n(10),[d,{field:m,reset:h}]=Kt(ro),{totalPages:u=0,items:g=[]}=(({size:e,page:t,query:l,startDate:n,endDate:a})=>{const i=n?Bt(n,!0):"",r=a?Bt(a,!0):"",s=new URLSearchParams(io);s.set("page",String(t)),s.set("size",String(e)),s.set("query",l),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=xn(io+o,bt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:l,...d}),f=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(x,{className:p(e,"container p-6xl"),...t,children:[o(no,{filtrationState:d,field:m,onClearFilter:h}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-2",children:o(je,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-10",children:o(je,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),g.length?g.map((e=>o(ao,{...e},String(e.publicId)))):o(fa,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(to,{currentPage:l+1,onPageChange:f,totalPages:u,itemCount:r,onItemCountChange:b})]})]})})),oo=e=>"Image"===e?.contentType&&e?.image?o(le,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,co=d((({className:e="",title:t,description:l,error:n,button:a,...i})=>c(x,{className:p("flex flex-col justify-center items-center",e),defaultPadding:p("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:oo(n)}),o(C,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(fe,{version:a?.version,text:a?.text,...a}):null]}))),mo="location";function ho(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(h,"location",po()??{name:e}),r=i((e=>{go(e),l(e)}),[]),{data:s}=xn(uo()?null:"/api/v1/region",bt);return a((()=>{s&&!uo()&&l(s)}),[s]),[t??{name:e},r]}const uo=()=>Boolean(globalThis.localStorage?.getItem(mo)),po=()=>{try{const e=globalThis.localStorage?.getItem(mo);return e&&JSON.parse(e)}catch(e){return null}},go=e=>{try{globalThis.localStorage?.setItem(mo,JSON.stringify(e))}catch(e){}};var xo;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(xo||(xo={}));const fo=new Intl.NumberFormat("ru",{style:"currency",currency:xo.RUB}),bo=e=>e?fo.format(e):"",yo="text-m font-light text-secondary-text ",vo=`${yo} text-left`,No=`${yo} pl-5xl text-center`,wo=`${yo} pl-5xl text-right`,ko={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},So=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:p("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:vo,children:o(je,{size:"text-m",children:"Валюта"})}),o("th",{className:No,children:o(je,{size:"text-m",children:"Купить"})}),o("th",{className:wo,children:o(je,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Co)})]}))),Co=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(le,{image:{icon:ko[t]},width:"24",height:"24"}):null,o(je,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(je,{size:"text-h6",children:bo(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(je,{size:"text-h6",children:bo(e?.buyExchangeRate)})})]},t)},To={icon:"GpsIcon"},Io=d((({className:e="",address:t})=>c("div",{className:p("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(yi,{...To,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Bo=(e,t,l)=>{const n=Number(Mo(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Mo=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Ro=e=>Ot([[e=>e.value!==xo.RUB&&e.oppositeValue!==xo.RUB,()=>e.handleConvert(e.value,xo.RUB)],[e=>e.value===xo.RUB&&e.oppositeValue===xo.RUB,()=>e.handleConvert(e.value,xo.USD)],[e=>e.value===xo.RUB&&e.oppositeValue===xo.RUB,()=>e.handleConvert(e.value,xo.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Po(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:n,text:n};return c("div",{className:"relative flex",children:[o(pl,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(wl,{isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Vo=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||xo.RUB,selectBuy:l?.[0]?.currency?.currency||xo.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[Po({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:zo(r,d,l),value:r.inputSell,setValue:e=>Ao(d,l)(e,r.selectSell,r.selectBuy)}),Po({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Do(r,d,t),value:r.inputBuy,setValue:e=>jo(d,t)(e,r.selectBuy,r.selectSell)}),a?.text?o(fe,{text:a.text,version:a?.version,...a}):null]})})),zo=(e,t,l)=>n=>{t({selectSell:n}),Ro({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Ao(t,l)(e.inputSell,n,a)}})},Do=(e,t,l)=>n=>{t({selectBuy:n}),Ro({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>jo(t,l)(e.inputBuy,n,a)})},Ao=(e,t)=>(l,n,a)=>{e({inputSell:Mo(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputBuy:String(Bo(l,i,n===xo.RUB)||"")})},jo=(e,t)=>(l,n,a)=>{e({inputBuy:Mo(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputSell:String(Bo(l,i,n===xo.RUB)||"")})};const $o=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=ho(),i=function(e){const t=e?.code||"000",{data:l}=xn(`/api/v1/exchangerates?regionCode=${t}`,bt);return l||{}}(a),r=_o(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:xo.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:xo.RUB}}),o(x,{className:p("box-border min-h-80",e),...n,children:o(we,{className:"h-full",title:o(w,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(So,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Io,{address:i?.address})]}),r.length&&s.length&&d.length?o(Vo,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:l}):null]})})})})),_o=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Lo=d((({className:e="",items:t})=>{const l=me();return o("ul",{className:p("flex flex-col gap-s w-full",e),children:t?.map(Oo(l))})})),Oo=e=>({dataFooter:t,...l},n)=>{const{text:a,href:i,target:r,onClick:s}=e(l);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...he(t),children:a||null})},String(n)):null},Eo=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),Fo=["all","footer"],Uo=d((({className:e,topItems:t})=>{const l=me();return o("div",{role:"menu",className:p("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(Eo(Fo)).map(l).map(Wo)})})),Wo=(e,t)=>{const{text:l,items:n=[],href:a,target:i="_self",onClick:r,dataFooter:s}=e,d=n.filter(Eo(Fo));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i,onClick:r,...he(s),children:l}),d?o(Lo,{items:d}):null]},String(t))},Ho=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:p("space-y-m",e),children:t.map(qo)}):null)),qo=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(je,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(Ko)})]},String(t)),Ko=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Xo(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Xo=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Yo(t)}`,children:o(je,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Yo=e=>e.replaceAll(/\D/g,""),Go=d((({className:e="",index:t,text:l,...n})=>{const a=me(),{href:i,target:r,onClick:s}=a(n);return o("a",{className:p("text-secondary-text",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),Qo=d((({className:e="",title:t,links:l})=>o("div",{className:e,children:l?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(je,{size:"text-l",font:"font-normal",children:t})}),l.map(((e,t)=>o(Go,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Jo={width:"40",height:"45"},Zo={"bg-white":"color",transparent:"white"},ec={"bg-white":"text-primary-main",transparent:"text-white"},tc=(e,t,l)=>o(le,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Zo[e]},className:ec[e],width:l?.width,height:l?.height}),lc={"bg-white":"text-primary-text",transparent:"text-white"},nc=d((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:p("inline-flex items-center font-sans no-underline",e),href:l?.href??t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",...he(s),children:[tc(i,l?.image,Jo),r?n??o("div",{className:"ml-s",children:o(je,{font:"font-medium",color:lc[i],size:"",children:l?.title??"Россельхозбанк"})}):null]})));function ac(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const ic=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const rc=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},sc=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),oc=e=>t=>e.map((([e,l])=>[ic(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>dc(t,e))).reduce(rc(Math.max,0),new Map),cc=e=>t=>{return ci(t,t.map((({title:e})=>e)).map((e=>t=>{const l=sc(t||"");return l.length?Pe(e.map((e=>La(l.map(ic(e)))))):0})(e))).sort((n=([,e])=>e,l=(e,t)=>n(e)-n(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,n},dc=(e,t)=>new Map(e.map((e=>[e,t]))),mc=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=xn(e?.length?e:null,hc),[s,o]=n(null);return ac((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=sc(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(oc(i)).reduce(rc(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return cc(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},hc=async(...e)=>(await Promise.allSettled(e.map((e=>ft(_(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),uc=d((({initialQuery:e,topItems:t})=>{const l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,a]=mc({basePathList:l,initialQuery:e}),i=r((()=>pc(t)(n)),[t,n]);return o(el,{head:o(lo,{autoFocus:!0,...a}),children:o(Uo,{topItems:i})})})),pc=e=>t=>e?.length&&t?.length?ci(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:_("/",t)})))}))):[],gc=(e={})=>{const{open:t,close:l}=ce();return{open:(l={},n={})=>t(o(uc,{...e,...l}),n),close:l}},xc=d((({className:e,search:t,...l})=>{const[a,r]=n(""),s=i((()=>r("")),[]),d=gc(l),m=i((e=>{r(e),fc(e)&&d.open({initialQuery:e},{onClose:s})}),[s,d]);return c("div",{className:p("relative",e),role:"search",children:[o(lo,{value:a,placeholder:t?.placeholder,onChange:m}),o(Zt,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),fc=e=>e&&e.length>=3,bc=(e,t="")=>{const{logo:l}=e??{},{dataHeader:n,dataFooter:a,...i}=l??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(nc,{className:t,logo:i,data:a}),o(xc,{className:"grow",...e})]})},yc=d((({className:e="",index:t,...l})=>{const n=me(),{href:a,target:i,text:r,onClick:s}=n(l);return o("a",{className:p("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}`})})),vc=d((({className:e="",links:t,license:l})=>c("div",{className:p("@container space-y-lg",e),children:[l?o("div",{children:o(je,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${l}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(yc,{index:t,...e},String(t))))}):null]}))),Nc="w-full lg:w-52",wc=St((({className:e,footer:t,...l})=>{const n=l.options?.page?.sitemap??{},{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:h,otherLinks:u=[]}=t??{};return c(x,{tag:"footer",className:p("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...l,children:[bc(n,Nc),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Uo,{...n}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:p(Nc,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Ho,{items:r}),m?o(fe,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(cs,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),u.map(((e,t)=>o(fe,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Qo,{title:d,links:i}),o(vc,{links:a,license:h})]})})),kc=d((({className:e="",title:t,description:l,calendar:n,...a})=>c(x,{className:p("space-y-m",e),defaultPadding:"p-6xl",...a,children:[o(C,{title:t,description:l,headlineVersion:"M",isEmbedded:!0}),n?Sc(n):null]}))),Sc=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),l=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:l.map((e=>Cc(e,t)))}),o("div",{className:"flex gap-s w-full",children:l.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:Tc(e)}),c("div",{className:"text-s",children:[o(je,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(je,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Cc=(e,t)=>e.month?.map(((e,l)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),Tc=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(le,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Ic=(e,t)=>e?.map((({aspectName:e,params:l})=>({aspectName:e,params:"mindboxEvent"===e?{...l,eventJson:t}:l}))),Bc=St((({className:e,title:t,button:l,regionSource:a,data:i,...r})=>{const[s,d]=n({key:""}),m=a?.regions??[],h=oe({className:"text-white",version:l?.version||"primary"}),u=m?.find((e=>e.name===s.key))?.href,g=l?.text?l.text:"Перейти";return o(x,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Yl,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,u?o("div",{className:"text-center",children:o(fe,{href:u,target:"_blank",className:p("p-m w-full @xl:w-auto",h),data:Ic(i,s?.key),children:g})}):null]})})}));function Mc(e=[]){const t=u(),l=Array.from(e.entries()).filter((([,e])=>Rc(t)(e)));return l.find((([,e])=>Rc(t,!0)(e)))??l[l.length-1]??[]}const Rc=(e,t=!1)=>({href:l})=>{if(!l)return!1;const n=$(Pc(e)(l));return t?n===$(l):n.startsWith($(l))},Pc=e=>t=>{const l=G(Y.SITE_URL);return D(t)?e.href:_(l,e.pathname)},Vc=d((({className:e="",items:t,activeItem:l,ariaLabel:n})=>{const[r,{setFalse:d,toggle:m}]=ml(!1),h=bl(d),u=s(null),g=i(((e,t,l)=>{if(e){const e=l?.current?.getBoundingClientRect(),n=t?.current?.getBoundingClientRect();l.current&&e&&n&&(e?.right>=globalThis.innerWidth||n?.left>e.left?l.current.style.left=globalThis.innerWidth-e.width+"px":l.current.style.left="")}}),[r]);return fl(globalThis,"resize",(()=>g(r,h,u))),a((()=>{g(r,h,u)}),[r]),c("div",{className:p(r?"rounded-md shadow-blue-gray":"",e),ref:h,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":n,onClick:m,children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:u,className:p("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",r?"":"hidden"),"aria-hidden":!r,children:t?.map(((e,t)=>o(zc,{isActive:e===l,...e},e?.text??String(t))))})]})})),zc=d((({isActive:e,...t})=>{const l=me(),{text:n,href:a,target:i,onClick:r}=l(t);return o("a",{className:p("text-l font-light pb-m hover:text-primary-main",e?"text-primary-main":""),href:a,target:i,onClick:r,role:"menuitem",...he(t?.data),children:n})})),Dc={default:"w-6 h-6",large:"w-12 h-12"},Ac=d((({className:e,isRounded:t,buttonSize:l="default",isGrayBg:n=!1,disabled:a,ariaLabel:i,image:r,data:s,onClick:c})=>o("button",{className:p("group/btn border-0 flex shrink-0 items-center",n?"p-s rounded-full":"p-0 bg-inherit",n&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Dc[l]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":i,onClick:c,...he(s),children:o(le,{image:r,className:p("h-full",t?"bg-main-divider/20 rounded-full":""),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),jc=e=>globalThis[e],$c=(e,t)=>{const l=document.getElementById(t);if(l){const t=jc(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(jc(e))}))}))}return new Promise(((l,n)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{l(jc(e))})),a.addEventListener("error",(e=>{n(e)})),document.head.appendChild(a)}))};const _c="chatbot",Lc="text-page__btn-chat",Oc={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Ec=d((({chat:e="personal",iconVersion:t,className:l,ariaLabel:n="Чат"})=>{const i=(e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=Oc[e??""];return l=>{if(t)if("personal"!==e)$c(_c,t);else{const e=l.target;e?.classList.contains(Lc)||e?.classList.add(Lc),document.getElementById("webchat-js-container:webchat_rshb")||$c(_c,t)}}})(e);return o(Ac,{className:l,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:n,onClick:i,buttonSize:"large",isGrayBg:!0})})),Fc=d((({className:e="",active:t,dataItemName:l,children:n,data:a,...i})=>{const r=me(),{href:s,target:d,text:m,onClick:h}=r(i);return c("a",{className:p("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":l,onClick:h,...he(a),children:[o("span",{className:Uc(t),children:m||n}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),Uc=(e=!1)=>p("font-sans text-l font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Wc=d((({observerOptions:e,onVisibilityChange:t,children:l,className:n,...a})=>{const r=va(i((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return o("span",{ref:r,className:n,role:"menuitem",children:o(Fc,{...a,children:l})})})),Hc={default:"px-lg bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},qc=d((({version:e,...t})=>{const l=t?.text;return l?o(fe,{className:p("py-s font-light whitespace-nowrap",Hc["transparent"===e?"transparent":"default"]),...t,children:l}):null})),Kc=d((({subItems:e=[],version:t,internetBankButton:l,dropdownMenuAriaLabel:a,chatBotAriaLabel:i})=>{const d="transparent"===t?"white":"black",[,m]=Mc(e),[h,u]=n(e.length),p=e.slice(h),g=s(null),x={rootRef:g},f=r((()=>e.map(((e,t)=>e=>{u(e?Xc(t):Yc(t))}))),[e]);return c("nav",{className:"relative mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(Wc,{className:h-1<t?"invisible":"",active:e===m,observerOptions:x,onVisibilityChange:f[t],data:e.dataHeader,...e},String(t))))}),p.length?o(Vc,{items:p,activeItem:m,ariaLabel:a}):null,z.CHAT_BOT?o(Ec,{iconVersion:d,chat:z.CHAT_BOT,ariaLabel:i}):null,o(qc,{version:t,...l})]})})),Xc=e=>t=>Math.max(t,e+1),Yc=e=>t=>Math.min(t,e),Gc=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(je,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(Qc,{...e},String(t))))})]}):null,Qc=d((({icon:e,...t})=>{const l=me(),{text:n,target:a,href:i,onClick:r}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(le,{image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(je,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),Jc=(e,t)=>l=>l.name?o(ss,{href:`/branches/${l.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(l),data:Ic(e,l.name),children:o(je,{size:"text-l",font:"font-light",children:l.name})},String(l.id)):null,Zc=d((({className:e,searchTerm:t,onSearch:l})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:p(ul,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),ed=d((({foreignOffices:e,branches:t})=>{const[l,a]=ho(t?.default),r=me(),{href:s}=r({href:`/branches/${l.slug}`}),[d,m]=n(""),h=ld(Hn()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(h,td),{close:p}=ce(),g=i((e=>{a(e),p()}),[]);return c(el,{className:"pb-20",head:c("div",{children:[o(je,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(ss,{href:s,className:"inline mx-2xs text-primary-main",children:l.name})]})}):null,o(Zc,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&ic(e.toLowerCase())(d.toLowerCase())>=.8)).map(Jc(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((x=g,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(je,{size:"text-h6",children:e})}),t.map(Jc(f,x))]},e)))}),Gc(e)]});var x,f})),td=e=>e.name?.charAt(0)||"",ld=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),nd=d((({className:e="",active:t,flat:l,children:n,data:a,...i})=>{const r=me(),{href:s,target:c,text:d,onClick:m}=r(i);return o("a",{className:p(ad(t,l),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":d,...he(a),children:o("span",{suppressHydrationWarning:!0,className:id(t,l),children:d||n})})})),ad=(e=!1,t=!1)=>p("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",t?"":"px-m py-xs"),id=(e=!1,t=!1)=>p("font-sans text-s font-light",e?"text-primary-main":p(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),rd=d((({className:e,version:t,...l})=>{const n="transparent"===t?"white":"black",[a]=ho(l?.branches?.default),r=gc(l),s=(e=>{const{open:t,close:l}=ce();return{open:(l={})=>t(o(ed,{...e}),l),close:l}})(l),d=i((()=>r.open()),[r]),m=i((()=>s.open()),[s]);return c("div",{className:p("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[l?.branches?.visible?o(nd,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:a?.name,data:Ic(l?.branches?.dataClick,a?.name??""),onClick:m}):null,l?.officesAtms?.href?o(nd,{className:"whitespace-nowrap",flat:!0,...l.officesAtms}):null,o(Ac,{image:{icon:"LoupeIcon",iconVersion:n},ariaLabel:l?.search?.ariaLabel??"Поиск",onClick:d,data:l?.search?.data})]})})),sd=d((({observerOptions:e,onVisibilityChange:t,children:l,className:n,...a})=>{const r=va(i((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return o("span",{ref:r,className:n,role:"menuitem",children:o(nd,{...a,children:l})})})),od=d((({topItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:l,version:a,sitemap:i,bgColor:d,logo:m})=>{const[h,u]=n(e.length),p=e.slice(h),g=s(null),x={rootRef:g},f=r((()=>e.map(((e,t)=>e=>{u(e?cd(t):dd(t))}))),[e]),{dataFooter:b,dataHeader:y,...v}=m??{};return c("div",{className:"flex items-center justify-between",children:[o(nc,{className:"mr-3xl",bgColor:d,logo:v,data:y}),o("div",{ref:g,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,l)=>o(sd,{className:h-1<l?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:f[l],data:e.dataHeader,...e},String(l))))}),p.length?o(Vc,{className:"mx-xs",items:p,activeItem:t,ariaLabel:l}):null,o(rd,{version:a,className:"ml-auto",...i})]})})),cd=e=>t=>Math.max(t,e+1),dd=e=>t=>Math.min(t,e),md={"bg-white":"primary",transparent:"transparent"},hd=["all","header"],ud=St((({className:e,bgColor:t="bg-white",logo:l={},version:n=md[t],portal:a,...i})=>{const r=i.options?.page?.sitemap??{},{topItems:s,logo:d={}}=r,[,m]=Mc(s),{internetBankButton:h}=a||{},u=l.image?.icon||l.image?.src?l:d;return o(x,{tag:"header",className:p("pt-m px-20",m?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:n,...i,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(od,{activeTopItem:m,topItems:s?.filter(Eo(hd)),version:n,sitemap:r,bgColor:t,logo:u})}),o("div",{className:p("mt-s h-px bg-main-divider",pd(n))}),m?.items?.length?o(Kc,{subItems:m?.items?.filter(Eo(hd)),version:n,internetBankButton:h}):null]})})})),pd=e=>"transparent"===e?"opacity-30":"",gd=(e=!1)=>e?{}:{padding:"p-0"},xd={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},fd=St((({className:e="",padding:t="p-0",gap:l="XS",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r,...s})=>o(x,{className:p("relative","grid grid-cols-12",xd[l],e),padding:t,version:a,isTheme:i,...s,children:P({...s,extraProps:{...gd(n),className:ba(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),bd=d((e=>{const{className:t,align:l,image:n,...a}=e,i=l?p("flex",Ti[l]):"";return o(x,{className:p(i,t),defaultPadding:"p-0",...a,children:o(le,{image:n})})})),yd=d((({className:e="",cards:t=[],button:l})=>{const[a,r]=n(0),s=i((e=>r(e)),[]),d=t.length,[m,h]=fs({itemCount:d,visibleItemCount:2}),{canDec:u,canInc:p}=h,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden",children:[d?vd({activeIndex:m,cards:t,selectedCardIndex:a,onClick:s}):null,Is({...h,btnClass:["left-12","right-12"],className:"top-16"}),u?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(fe,{className:"w-60 text-center",version:"primary",...l,href:g})]})}));function vd({activeIndex:e,cards:t,selectedCardIndex:l,onClick:n}){const a=460*e,i=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n}){return c("button",{type:"button",onClick:n,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(l?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(le,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?Nd("страховая сумма",e.sum):null,e?.fee?Nd("страховой взнос",e.fee):null]}),wd(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})})}function Nd(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(je,{size:"text-h6",children:[tt(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(je,{size:"text-l",color:"text-secondary-text",children:e})})]})}function wd(e){return e?o(le,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const kd=d((({className:e="",title:t,insuranceTabs:l=[],button:a,...r})=>{const[s,d]=n(0),m=i((e=>d(e)),[]);return c(x,{className:p("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(w,{className:"text-center",title:t,headingType:"h3"}):null,l?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:l.map(((e,t)=>function({title:e,i:t,isActive:l,onClick:n}){return o("button",{type:"button",onClick:n,"aria-label":e,className:"box-border px-m py-s text-m font-light "+(l?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Sd({insuranceTabs:l,button:a})})]})})),Sd=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>o(yd,{button:t,cards:e},String(l)))):null};const Cd={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Td={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},Id=d((e=>{const{className:t="",items:l,isDotted:n,investmentZeroColumn:a,investmentColumns:i,...r}=e,s=i?[...i]:[];return a&&s.unshift(a),o(x,{className:t,defaultPadding:"p-4xl",...r,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[ai(o("div",{className:"w-px h-4 bg-gray"}))(s.map(Bd)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Pd)})]}):null,l?.length?o(et,{className:"max-w-2xl font-light text-base",items:l,isDotted:n,listItemSize:"M"}):null]})})})),Bd=(e,t,l)=>{const n=1===t,a=t===l.length-1;return o("div",{className:`${Md(n,a,e.cells)}`,children:e.cells?.length?o("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:e.cells.reverse().map(Rd)}):null},`column_${t}`)},Md=(e,t,l=[])=>[l.length?"flex-1":"flex-0",!l.length||e||t?"":"pl-s",l.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),Rd=(e,t)=>{const l=e.cellSize||"XS",n=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${Td[l]} ${Cd[n]} ${"XS"===l?"px-s":"px-5xl"}`,children:o(je,{align:"text-center",children:e.text})},`cell_${t}`):null},Pd=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,Vd=["байт","Кб","Мб","Гб","Тб","Пб"],zd=d((({icon:e,text:t,href:l,target:n,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:l,target:n,...he(i),children:[e,t?c(je,{size:"text-l",font:"font-light",children:[t," ",Dd(d,m),o(je,{color:"text-secondary-text",children:l&&`${d+s+m}`})]}):null]})})),Dd=(e,t)=>e||t?o("span",{children:", "}):"",Ad=(e,t)=>(l,n)=>{const a=U(e)("Attachment"===l?.docType?l?.attachment?.src:l?.href),i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Vd[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?$d(a):l?.fileFormat;return c("div",{role:"listitem",children:[o(zd,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:jd(t),data:l?.data}),o(De,{__html:l?.__html})]},String(n))},jd=e=>e?o(le,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,$d=e=>{if(!e)return"";const t=e.lastIndexOf("."),l=new RegExp(/\/(.*)/),n=-1!==t?e.substring(t+1):"";return n.includes("/")?n.replace(l,""):n},_d=d((({href:e,__html:t,target:l})=>{const{close:n}=ce(),a=u(),r=U(a)(e),s=i((()=>{n()}),[]);return c(el,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(De,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(fe,{text:"Я согласен",version:"primary",target:l,href:r,onClick:s}),o(Jt,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Ld=d((({text:e,href:t,target:l,__html:n})=>{if(!e&&!n)return null;const a=(e=>{const{open:t,close:l}=ce();return{open:(l={})=>t(o(_d,{...e}),l),close:l}})({__html:n,href:t,target:l}),r=i((()=>a.open()),[a]);return o("button",{className:"text-primary-main",onClick:r,children:e})})),Od={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Ed=St((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=u();return c(x,{className:p("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:p("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Od[r]),role:"list",children:a.map(Fd(d,i))}):null]})})),Fd=(e,t)=>(l,n)=>{const a=l?.docType;return""===a?null:"reportSource"in l&&l?.reportSource?.__html?Ud(l,n):Ad(e,t)(l,n)},Ud=({text:e,reportSource:t,href:l,target:n,__html:a},i)=>t?.__html&&e?c("div",{role:"listitem",children:[o(Ld,{text:e,href:l,target:n,__html:t?.__html}),o(De,{__html:a})]},String(i)):null,Wd=St((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:u="primary",...g})=>{const f="secondary"===u?"p-m min-w-32":"min-w-24",b=i?.src?o(le,{className:"hidden lg:block",image:i}):null;return o(x,{className:p("min-h-80",e),padding:"p-0",version:u,...g,children:c(we,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:h,className:p("whitespace-pre-wrap",l)}),rightImage:b,buttons:Xe(n,{className:"flex-wrap"}),children:[a?o(je,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:p("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[o(et,{items:r,listItemSize:"M"}),o(je,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:p("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(le,{className:"w-fit",image:d})}):null,i?.src?o(le,{className:"lg:hidden",image:i}):null]})]})})})),Hd=(e,t)=>e&&"underlined"!==t?"primary":"secondary",qd=(e=[],t={})=>e.filter((({content:e={}})=>mi(t,e))).length,Kd=(e,t)=>e===t;const Xd=(Yd=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Kd,((e=Kd)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Yd(l,t[e])))));var Yd;const Gd=[],Qd={},Jd={primary:"bg-white/30",secondary:"bg-main-divider"},Zd={primary:"text-white",secondary:"text-secondary-text"},em=d((({count:e,version:t="secondary"})=>o("div",{className:p("w-6 h-6 rounded-full flex items-center justify-center",Jd[t]),role:"status",children:o(je,{size:"text-xs",color:Zd[t],children:e})}))),tm=({text:e,description:t,icon:l,isActive:n,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(n);return c("div",{className:p("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,role:"tab",children:[l?o(le,{className:p("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...l,iconVersion:l?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},lm={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},nm={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},am={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},im={default:"sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},rm=d((({tag:e="div",item:t={},isActive:l=!1,type:n="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,...h}=t;return o(i,{className:p("h-12","block flex-1","cursor-pointer",lm[n],l?im[n]:am[n]),role:"tablist",onClick:a,...h,children:c("div",{className:p("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?nm[n]:"text-secondary-text hover:text-primary-main"),children:[tm({text:r,description:s,icon:d,isActive:l,type:n}),Number.isInteger(m)?o("div",{className:"ml-xs",children:o(em,{count:m,version:Hd(l,n)})}):null]})})})),sm=d((e=>o(e?.item?.href?om:cm,{...e}))),om=d((e=>{const t=me(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(rm,{...e,tag:"a",item:a,onClick:n})})),cm=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(rm,{item:e,onClick:n,...l})})),dm=(e,t,l)=>(n,a)=>o(sm,{isActive:n===e,onClick:t,type:l,item:n},String(a)),mm=d((({className:e,tabsType:t="default",items:l=[],activeItem:n,onChange:a})=>o("div",{className:p("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel",children:l.map(dm(n,a,t))}))),hm={categories:[],extraOptions:[],propertyType:[],stage:[]},um=St((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:u}]=ui(hm,{block:a.block,page:a.options?.page}),g=i(((e=hm)=>u(e)),[]),f=(({hotFilters:e=Gd,filtrationState:t=Qd,blocks:l=Gd,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Xd(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:qd(l,t.filter),version:Hd(t===e[a])})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:g});return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(mm,{...f}),o(ri,{filtrationSchema:l,resetButton:n,field:m,reset:h}),o(li,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),pm=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),gm=d((({children:e})=>pm?e:null)),xm="/icons/MapMarkerClusterIcon.svg",fm="/icons/MapMarkerClusterYellowIcon.svg";function bm({yandexMaps:e,map:t,points:l}){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=ym("offices",e,n);if(l.length&&l.every((e=>"type"in e))){const i=ym("workplaces",e,n),r=vm(l.filter((e=>"workplaces"===e.type)),"workplaces",e),s=vm(l.filter((e=>"offices"===e.type)),"offices",e);a.add(s),i.add(r),t.geoObjects.add(i),t.geoObjects.add(a)}else{const n=vm(l,"offices",e);a.add(n),t.geoObjects.add(a)}t.setBounds(e.util.bounds.fromPoints(l.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const ym=(e,t,l)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?xm:fm,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:l,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),vm=(e,t,l)=>e.map((({coords:e,content:n})=>new l.Placemark(e,{balloonContentHeader:n?.header,balloonContentBody:n?.body,balloonContentFooter:n?.footer,hintContent:n?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?xm:fm,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),Nm={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},wm={...Nm,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},km=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(wm).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(H,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Sm=()=>function(e,t,l=!0){const[i,r]=n(void 0);return a((()=>{let n=!0;return $c(e,t).then((e=>{n&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(n=!1,l){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,l]),i}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),Cm={...Nm,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Tm=d((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(Cm).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(H,{name:l,width:"20",height:"16"})})})),Im=[55.753995,37.614069],Bm=d((({points:e,className:t="",zoom:l=5})=>{const n=s(null),i=Sm();if(a((()=>{n?.current?i&&(bm({yandexMaps:i,map:n.current,points:e}),e?.length||n.current.setCenter(Im)):i?.ready((()=>{n.current||(n.current=new i.Map("map",{center:e?Mm(e):Im,zoom:l,controls:[],suppressMapOpenBlock:!0}),bm({yandexMaps:i,map:n.current,points:e}))}))}),[i,e,l]),!i)return null;const r="z-10";return c("div",{id:"map",className:p("relative","w-full",t),children:[c("div",{className:p("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",r),children:[o(Tm,{yandexMaps:n}),o(Tm,{yandexMaps:n,direction:"out"})]}),km(n,i,p("right-2 top-80",r))]})})),Mm=e=>[Pm(Rm(e,0)),Pm(Rm(e,1))],Rm=(e,t)=>e.map((e=>e.coords[t])),Pm=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Vm=({__html:e,list:t})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(De,{__html:e})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(le,{image:e.image}):null,e?.text?o(je,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,zm={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Dm="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Am=(e,{field:t,reset:l},n)=>{const a=n?5:6,i=(e||[]).map((e=>o(sl,{text:zm[e],...t(e)},e))),[r,s]=a>0?[i.slice(0,a),i.slice(a)]:[i,[]];return o("div",{children:e?.length?o("div",{children:o(Qa,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Dm,children:r}),o(Ja,{className:Dm,isUnfolded:e,children:s})]}),renderFoldButton:jm(l,n)})}):null})},jm=(e,t)=>({isUnfolded:l,onToggle:n})=>c("div",{className:"flex space-x-lg",children:[t?o(fe,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(H,{name:["ArrowDownIcon","ArrowUpIcon"][Number(l)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(l)],onClick:n}):null,o(fe,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,text:"Очистить фильтр",appendRight:o(H,{name:"CloseIcon",width:"16",height:"16"})})]}),$m=()=>{},_m=()=>[],Lm=e=>"all"===e?"block":"hidden",Om=d((({className:e,data:t=[],remoteWorkplaces:l=[],renderCard:a=$m,renderRemoteWorkplaceCard:i=$m,filterItems:s=_m,getBalloon:d=$m,getBalloonRemoteWorkplaces:m=$m,initFilterState:h={},descriptionData:u,title:g})=>{const x=g?.includes("Офис"),[f,{field:b,reset:y}]=Kt(h),[v,N,k,S]=r((()=>{const e=s(t,f),n=s(l,f),a=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:d(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,a,n,e.length+n?.length]}),[t,l,f]),[C,T]=n("all");return c("div",{className:p("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-6xl pb-0",children:[o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h2",children:[o("span",{suppressHydrationWarning:!0,children:g}),S?o(je,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${S})`})}):null]})}),u?Vm(u):null,x&&Em(t,C,T),o("div",{className:p("pb-2xl",Lm(C)),children:Am(Object.keys(h),{field:b,reset:y},x)})]}),o("div",{className:"h-[600px]",children:o(gm,{children:o(Bm,{points:N,className:"h-full"})})})]}),c(gm,{children:[v.map(a),k.map(i)]})]})})),Em=(e,t,l)=>{const n=Hd("all"===t),a=Hd("business"===t),i=(e,t,n)=>(e.currentTarget===e.target&&"business"===t&&n.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),l(t),n);return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(Jt,{"data-id":"all",onClick:t=>i(t,"all",e),version:n,children:"Для физических лиц"}),o(Jt,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Fm={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Um=d((({className:e,children:t,color:l="gray"})=>c("div",{className:p("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Fm[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(le,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(je,{size:"text-m",color:Fm[l].text,children:t})]}))),Wm=d((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:Hm({textItems:a,subText:t,children:l,...n})})),Hm=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>c("div",{className:p("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(je,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>o(je,{size:"text-l",children:e.trim()},String(t)))),a?o(je,{color:n,size:"text-m",children:a}):null]}),qm=d((({className:e,children:t})=>o("div",{className:p("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Km=["ArrowDownIcon","ArrowUpIcon"],Xm=["Подробнее","Скрыть"],Ym=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:Xm[Number(e)]}),o(H,{className:"text-primary-text",name:Km[Number(e)],width:"16",height:"16"})]}),Gm=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Zm(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(je,{size:"text-h4",children:Zm(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(je,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Um,{color:"green",children:Zm(s)})})]}),o("div",{className:"hidden sm:block",children:o(qm,{className:"flex-wrap",children:m?.map(Jm)})}),o(Qa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:o(qm,{className:"flex-wrap",children:m?.map(Jm)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ym({isUnfolded:e,onToggle:t})})]},String(d))},Qm=({address:e="",terminalType:t,atmCode:l=""})=>({header:`${Zm(t)} №${l}`,body:e.toUpperCase()}),Jm=(e,t)=>o(Wm,{...e},String(t)),Zm=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",eh=[];const th=async e=>{const t=await ft(e,{method:"GET"});return Array.isArray(t)?t:eh},lh={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},nh={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},ah=d((({data:e,className:t})=>{const[l]=ho(),n=function(e){const{data:t=eh}=xn(`/api/v1/atms?regionCode=${e}`,th);return t}(l?.code??"000");return o(Om,{className:t,filterItems:ih,data:n,initFilterState:lh,renderCard:Gm,getBalloon:Qm,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),ih=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>nh[t](e))),l=!n.length||n.some((t=>nh[t](e)));return t&&l}))},rh=e=>{const t=oh(e);return o(Wm,{label:"Режим работы",value:t,className:"max-w-none"})},sh=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",oh=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[sh({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),sh({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean)},ch=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],dh=e=>ch.map((([t,l,n])=>({key:t,title:n,short:l,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),mh=e=>{if(!e)return null;const t=hh(e);return c(qm,{className:"border-none",children:[o(Wm,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(uh)})}),o(Wm,{label:"Режим работы",className:"max-w-none",children:o(je,{children:e})})]})},hh=e=>{const t=ch.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},uh=({short:e,status:t},l)=>o("div",{className:p("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(je,{size:"text-xs",children:e})},String(l)),ph=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Wm,{label:"Валюта",value:e.currency}):null,t?o(Wm,{label:"Купить",value:String(t)}):null,l?o(Wm,{label:"Продать",value:String(l)}):null]},String(n)),gh=(new Date).getDay(),xh=e=>{const[t]=e?.slice(gh-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Um,{color:"green",children:a}):null,l&&i?o(Um,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(Um,{color:"red",children:"Выходной"})},fh=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",bh=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(Wm,{label:e,value:t&&l?l:"",subText:fh({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),yh=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,vh=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Nh=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,wh=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=dh(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(je,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(je,{size:"text-l",children:t})]}):null]}),xh(u)]}),o("div",{className:"hidden sm:block",children:kh({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Qa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:kh({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ym({isUnfolded:e,onToggle:t})})]},String(h))},kh=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=dh(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(qm,{className:"flex-wrap",children:[o(Wm,{label:"Факс",value:t}),o(Wm,{label:"Телефон филиала",value:e}),o(Wm,{label:"Для обращений юридических лиц",value:l}),o(Wm,{label:"Обслуживание физических лиц",value:n}),o(Wm,{label:"Для консультаций по валютному контролю",value:i}),o(Wm,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?o(qm,{children:o(Wm,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(bh)})})}):c(qm,{children:[o(Wm,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(uh)})}),rh(d)]}),r?.businessScheduleVisibleTag?mh(r?.businessScheduleDescription):null,s?.currencies?.length?o(qm,{className:"flex-wrap",children:s?.currencies?.map(ph)}):null]})},Sh=({name:e="",address:t="",workSchedule:l})=>{const n=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=dh(e),l=e?oh(t):"",n=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?yh(l):Nh(l,n):vh(l):null})(l)}`;return{header:n,body:i}},Ch=({address:e,workScheduleDescription:t},l)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(je,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(je,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Th({workScheduleDescription:t})}),o(Qa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:Th({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ym({isUnfolded:e,onToggle:t})})]},String(l)):null,Th=({workScheduleDescription:e})=>c("div",{children:[c(qm,{className:"flex",children:[o(Wm,{label:"Операции для физических лиц",children:o(je,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Wm,{label:"Операции для физических лиц",children:o(je,{children:"Оформление и обслуживание банковских карт"})}),o(Wm,{label:"Операции для физических лиц",children:o(je,{children:"Инвестиционное и накопительное страхование"})}),o(Wm,{label:"Операции для физических лиц",children:o(je,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Wm,{label:"Режим работы",className:"max-w-none",children:o(je,{children:e})})]}),Ih=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Bh={branches:[],remoteWorkplaces:[]};const Mh=async e=>await ft(e,{method:"GET"})||Bh,Rh={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Ph={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},Vh=d((({className:e})=>{const[t]=ho(),l=function(e){const{data:t=Bh}=xn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,Mh);return t}(t?.code??"000");return o(Om,{className:e,filterItems:zh,data:l?.branches,remoteWorkplaces:l?.remoteWorkplaces,initFilterState:Rh,renderCard:wh,renderRemoteWorkplaceCard:Ch,getBalloon:Sh,getBalloonRemoteWorkplaces:Ih,title:`Офисы филиала ${t?.name}`})})),zh=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>Ph[t](e)))))},Dh=d((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return o(x,{version:"transparent",className:p(t),defaultPadding:"p-0",...l,children:"offices"===n?o(Vh,{}):o(ah,{data:e})})})),Ah=d((({className:e,title:t,description:l="Блок в разработке...",...n})=>c(x,{className:p("box-border",e),...n,children:[o(C,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),jh="hidden sm:flex absolute z-40 top-10",$h=St((({className:e="",padding:t,slides:l=[],...a})=>{const[i,r]=n(0),[s,d]=Wa({itemCount:l?.length||0});return c(x,{className:p("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...a,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:l.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(st,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(Sa,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:l.map(_h({activeSlideIndex:i,onClick:r}))}),d.canScrollLeft?o(Pa,{className:p("left-6",jh),onClick:d.scrollLeft}):null,d.canScrollRight?o(Va,{className:p("right-6",jh),onClick:d.scrollRight}):null]})]})})),_h=({activeSlideIndex:e,onClick:t})=>({nav:l},n)=>{const a=n===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(n),"aria-label":l?.title,className:p("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:l?.title}),o("div",{className:s,children:l?.description})]},String(n))},Lh=d((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:d="primary",...m})=>c(x,{className:p("box-border text-left space-y-s",a),version:d,...m,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ke(r)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(le,{image:r})}):null,s?o(w,{headingType:"h3",as:"h3",title:s}):null]}),c("div",{className:"w-full space-y-m",children:[i?Oh(i):null,Eh({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Eh({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Eh({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Xe([n]):null]})]}))),Oh=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{__html:e})}),Eh=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(H,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(je,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(je,{size:"text-xl",color:n,children:t})]})]}):null,Fh=d((e=>{const{__html:t,richVersion:l="",...n}=e;return o(x,{defaultPadding:"p-0",...n,children:o(De,{__html:t,richVersion:l})})})),Uh=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(Xa,{tag:"button",className:p("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?o(je,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(H,{name:l,iconVersion:"color",width:"24",height:"24"}):null}))),Wh=St((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>o(x,{className:p("w-full","border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(Qa,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Ja,{className:p("gap-lg","grid grid-cols-12 [&>*]:pb-m"),isUnfolded:e,children:P({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Hh({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),Hh=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"MinusIcon":"PlusIcon")(a);return"accordion"===e?o(Uh,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):o(Ya,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},qh=d((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return c("div",{className:p("order-4",e),role:"radiogroup",children:[o(Jn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Jn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Kh=d((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),c=s.find((e=>e.key===n));return o(wl,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),Xh=d((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Kh,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Kh,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Yh=["От 1 дня","До 365 дней"],Gh=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(je,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Bn,{min:1,max:365,value:e,items:Yh,onChange:t})]}))),Qh=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Kh,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Kh,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Jh=d((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Xh,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Zh(m)}),o(Gh,{days:a,setDays:e=>m({days:e})}),o(Qh,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:eu(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(qh,{}),o(fe,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),Zh=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},eu=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},tu=d((({days:e,tariffs:t=[]})=>{const l=nu(e,t),n="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[lu("Аренда за",e),lu("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(le,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(k,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),lu=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),nu=(e,t)=>{const l=au(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},au=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},iu=(e,t)=>e.find((e=>e.branchCode===t)),ru=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=iu(n,l.selectedBranch),d=su(s?.safeBoxCaseVolumes),m=ou(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=cu(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Jh,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(tu,{days:l.days,tariffs:h})]})})),su=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],ou=(e,t)=>e?.find((e=>e.volume===t)),cu=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,du=[];const mu=async e=>await ft(e,{method:"GET"})||du,hu=d((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),d=i((()=>s((e=>!e))),[]),[m,h]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Hn(),p=uu(m.selectedRegion,u),g=function(e){const{data:t}=xn(e?`/api/v1/safeboxes?regionCode=${e}`:null,mu);return t||du}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=iu(g,m.selectedBranch)||g,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(x,{className:l,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(ru,{regions:u,branches:g,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Bm,{points:b,className:"h-[640px]"}):null]})})),uu=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,pu=({styleMap:e,isMainButton:t,version:l})=>(n,a,i)=>{const{label:r,description:s,button:d,items:m,isDotted:h}=n;return c("div",{className:p("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",gu(i.length)),children:[c("div",{className:"space-y-xs",children:[r?o(je,{size:"text-h6",align:"text-center",children:r}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[s?o("div",{className:e.description,children:s}):null,o(et,{className:e.description,items:m,listItemSize:"M",isDotted:h})]})]}),d?.text&&!t?o(fe,{className:"box-border py-s w-full max-w-60 mt-auto",version:l,...d,children:d?.text}):null]},String(a))},gu=e=>e<4?"w-72":"w-52",xu={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"},fu=d((({buttons:e,className:t="",description:l,showLines:n=!0,size:a="normal",steps:i=[],stepVersion:r="gray",title:s,version:d="primary",...m})=>{const h=i.length,u=h>3,g=xu,f=(e=>e?"":"opacity-0")(n),b=h<4?"px-24":"px-16",y=h<4?"px-28":"px-20",v=Boolean(e?.every((e=>e?.text)));return c(x,{className:p("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:d,...m,children:[o(C,{headlineVersion:"S",title:s,description:l,isEmbedded:!0,className:"w-full",align:xa}),i?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:p("flex items-center","normal"===a?b:y),children:ai(o("div",{className:p("h-0.5 w-full bg-secondary-light flex-1",f)}))(i.map(bu(g,a,r)))}),o("div",{className:p("flex justify-between",u?"gap-x-s":"gap-x-20"),children:i.map((N={styleMap:g,isMainButton:v,version:d},(e,t,l)=>{const{type:n}=e;if("default"!==n&&"rte"!==n)return null;switch(n){case"default":return pu(N)(e,t,l);case"rte":return o("div",{className:p("text-center",gu(l.length)),children:o(De,{__html:e.__html})},String(t));default:return null}}))})]}):null,Xe(e)]});var N})),bu=(e,t,l)=>({icon:n},a)=>{const i="secondary"===l?"white":"color";return o(x,{defaultPadding:"",className:`${yu(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:l,children:Ke(n)?o(le,{image:{...n,iconVersion:n?.iconVersion||i},width:"48",height:"48"}):o("span",{className:p("text-h4","transparent"===l?e.iconText:(r=l,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:a+1})},String(a));var r},yu=e=>"normal"===e?"h-24 w-24":"h-16 w-16",vu=d((()=>o("div",{className:"hidden",role:"none"}))),Nu="hidden sm:flex absolute z-40",wu={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},ku=d((({className:e,items:t=[],activeItem:l,onChange:n,tabsType:i="default"})=>{const[r,s]=Wa({itemCount:t?.length||0});return a((()=>Su(r.current,t,l)),[]),c("div",{className:p("relative overflow-x-auto no-scrollbar",e),children:[o(Sa,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:wu[i].item,gap:wu[i].gap,children:t.map(dm(l,n,i))}),s.canScrollLeft?o(Pa,{className:p("left-6",Nu,wu[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(Va,{className:p("right-6",Nu,wu[i].buttonTop),onClick:s.scrollRight}):null]})})),Su=(e,t,l)=>{const n=t.findIndex((e=>e===l));e&&n>0&&e.scrollTo({left:e?.children[n]?.offsetLeft,behavior:"smooth"})},Cu=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return o(mm,{...t});case"scrollable":return o("div",{className:"flex",children:o(ku,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Tu="tab",Iu=d((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...c})=>{const d=u(),{isReady:m}=d,g=r((()=>l.map(Mu)),[l]),[f,b]=n(0);a((()=>{if(!l||!l[0])return;const e=d.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===d.query.tab))||0,t=l[e]||l[0];b(e),Bu(t)}),[m]),a((()=>{const e=l[f];"group"===e?.type&&h.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,f]);const y=i((e=>{const t=g.indexOf(e),n=l[t];b(t),Bu(n),"group"===n.type&&(e=>{const t=new URLSearchParams(d.query);e.name?t.set(Tu,e.name):t.delete(Tu),d.replace(`${d.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,g]);return o(x,{className:p(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...c,children:Cu({items:g,activeItem:g[f],tabsMode:s,onChange:y})})})),Bu=e=>{"group"===e.type&&h.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&h.fire("tab",{type:e.type,label:e.href})},Mu=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,Ru={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Pu=({tabsType:e="animated",...t})=>e?o("div",{className:Ru[e].wrapper,children:o(ku,{className:Ru[e].component,tabsType:e,...t})}):null,Vu=St((({className:e="",tabs:t=[],block:l,tabsType:r,showCounter:s=!1,...d})=>{const m=l?.__id?`tabs-${l.__id}`:"tabs",h=u(),g=s?t.map((e=>({...e,count:l?.slots?.[e?.text??""]?.length??0}))):t,{isReady:f}=h,[b,y]=n(Du(g,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(m))),v=g[b],N=g.findIndex((e=>Boolean(e.selected)));a((()=>{const e=h.query[m]?g.findIndex(((e,t)=>"group"===e.type&&String(t)===h.query[m])):N;y(-1===e?0:e)}),[f,N,m]);const w=zu(g[b],b),k=i((e=>{const t=g.indexOf(e),l=g[t];y(t),"group"===l.type&&((e,t)=>{const l=new URLSearchParams(h.query);e.text?l.set(m,String(t)):l.delete(m),h.replace(`${h.pathname}?${l}`,"",{scroll:!1})})(e,t)}),[g]);return c(x,{className:p(e),defaultPadding:"p-0",...d,children:[Pu({items:g,activeItem:v,tabsType:r,onChange:k}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(l?.slots??{}).map((([e,t])=>R(t,{...d?.options,slotName:w,parent:l,extraProps:{className:e===w?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.filter((e=>"group"===e.type)).map(zu)||[],childrenTypes:{exclude:["TabsLayout"]}}),zu=(e,t)=>e?.text||`Слот №${t}`,Du=(e,t)=>t?Number(t):e.reduce(((e,t,l)=>t.selected?l:e),0),Au=d((({className:e="",isOpen:t,onClick:l})=>o(fe,{className:e,appendRight:o(le,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),ju={Buttons:({buttons:e})=>Xe(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(le,{image:e}):null,List:({isDotted:e,...t})=>o(et,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(je,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(je,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?o(Au,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},$u=d((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return _u({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),_u=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in ju))return null;return o(ju[l],{...t,...n})},Lu=d((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o($u,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Ou=(e,t)=>140*Pe(e.slice(0,t).map((e=>e?.cols?.length??1))),Eu=(e,t)=>e?.length>0?o("div",{className:p("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(je,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Fu=d((({rows:e})=>{const t=e?.[0]?.length??0,[l,n]=fs({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((a=l,(e,t)=>{if(!e?.length)return null;const[l,...n]=e,i=p("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(je,{size:"text-xl",font:"font-light",children:l.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${Ou(n,a)}px)`},children:n?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(je,{size:"text-xl",children:e.data}):null,e?.cols?Eu(e.cols,a):null]},`row${t}`)))})})]},String(t))})),Is({...n,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),Uu=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(je,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(Fu,{rows:t.rowsData})})})]},n)}))}))),Wu=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Hu=d((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:p("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:o(je,{size:"text-xl",font:"font-light",color:Wu(t===l),children:e||t+1})},e)))}):null,t?o(fe,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(H,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function qu(e){const t=await fetch(e);return await t.json()}const Ku=d((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=xn(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),qu);return t||{}}(e),[r,s]=n(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(Hu,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Uu,{activeTabIndex:r,items:m}),o(Au,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(je,{size:"text-h6",children:"Данных нет"}),o(Au,{onClick:l,isOpen:!0})]})})),Xu=d((({children:e,tableInner:t,onHideContentClick:l})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:p("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(Ku,{...t,onClick:l})}):null]}))),Yu=d((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,d]=n(void 0),m=i((e=>d(e)),[]),[h,u]=n(void 0),g=i((e=>u(e)),[]);return c(Xu,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:p("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(le,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(je,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Ss,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Lu,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),Gu=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return c("div",{role:"table",children:[c("div",{className:"relative space-y-xs",children:[e,Is({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Qu=d((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],d=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,u]=fs({itemCount:m,visibleItemCount:2}),g=(d||[]).map(((e,t)=>o(Yu,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[f,b]=i>0?[g.slice(0,-i),g.slice(-i)]:[g,[]];return c(x,{className:p("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(C,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m",children:i>0?o(Qa,{renderFoldableSection:({isUnfolded:e})=>c(Gu,{controls:u,children:[f,o(Ja,{isUnfolded:e,children:b})]}),renderFoldButton:Ga}):o(Gu,{controls:u,children:g})})]})})),Ju=d((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>c(x,{className:p("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?Zu():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(je,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?ep(l):null,a?o(De,{__html:a}):null]})]}))),Zu=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),ep=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),tp=d((({prefix:e,unit:t,suffix:l})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(je,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?o("div",{className:"gradient-color-text",children:o(je,{size:"text-h2",children:l})}):null]}))),lp=d((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return o(x,{defaultPadding:"p-0",...a,children:o(tp,{prefix:t,unit:l,suffix:n})})})),np=St((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=u();return o(x,{className:p("relative flex flex-col",xd[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:P({...c,extraProps:{className:p("w-full",ba(r)),...gd(n)}})})}),{childrenTypes:[]}),ap=e=>(e=>{const t="col-span-",l=e?.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",ip=d((({className:e,title:t,url:l,previewImg:n,...a})=>{const i=u();return c(x,{className:e,defaultPadding:ap(e),...a,children:[o(C,{title:t,headlineVersion:"M"}),l?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:U(i)(n?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:U(i)(l)})}):null]})})),rp={AdTile:Tt,ApplicationForm:ma,BankAccountFiltration:xi,BenefitsBlock:vi,BonusBenefitsBlock:Ci,ButtonsBlock:Ii,CalculatorBonus:Ei,CalculatorBusinessDeposit:ir,CalculatorCredit:yr,CalculatorDeposit:Mr,CalculatorRefinancing:jr,CardTransfer:Ur,Carousel:Qr,CarouselCard:es,CarouselCatalogCard:ls,CarouselLinks:is,CarouselRecommendationCard:hs,CarouselTariffsCard:gs,ComparisonTable:js,ContactsBlock:_s,DepositFiltration:Hs,Depository:so,ErrorBlock:co,ExchangeRateTile:$o,Footer:wc,GracePeriod:kc,GrantSupport:Bc,Header:ud,Headline:C,HorizontalLayout:fd,ImgBlock:bd,InsuranceAmountBlock:kd,InvestmentInfo:Id,LinkDocs:Ed,MobileAppTile:Wd,MortgageFiltration:um,OfficesAtmsMap:Dh,Placeholder:Ah,ProductBlock:Ct,ProductGallery:$h,RepresentativeOfficeInfo:Lh,RichTextBlock:Fh,RollupItem:Wh,SafeDepositRental:hu,StepsBlock:fu,StickyBottomMenu:vu,Tabs:Iu,TabsLayout:Vu,TariffsTable:Qu,TextBlock:Ju,UnitBlock:lp,VerticalLayout:np,Video:ip},sp=de((()=>{a((()=>{$t()}),[]);const e=Ht();fl(globalThis,"click",(e=>t=>{const l=t.target?.closest("[data-aspects]");try{const n=JSON.parse(l?.dataset?.aspects??"[]");At({aspectsAttributes:n,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),op="cookie",cp=d((({__html:e})=>{const[t,{setTrue:l,setFalse:n}]=ml();ac((()=>{globalThis.localStorage?.getItem(op)||l()}),[],3e3);const a=i((()=>{globalThis.localStorage?.setItem(op,"true"),n()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(De,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:o(Zt,{className:"bg-main-gray rounded-md",onClose:a})})]})}):null}));function dp(e){throw new Error(e)}const mp=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>h.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:dp(e)}}))),[c,d]),l},hp=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=mp({onCloseAll:e,onClose:t}),{close:n}=ce(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return fl(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>o("div",{className:p("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),up=d((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>h.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:dp(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return fl(globalThis.document,"keydown",r),e?o("div",{className:p("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),pp="header",gp="footer",xp="sticky-footer",fp={},bp=d((({className:e,data:t=fp,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=kt(s,r);sp();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:l,blockDecorator:n,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:p("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:R(a?.header,{...m,slotName:pp})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[P({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),R(a?.footer,{...m,slotName:gp})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:R(a?.["sticky-footer"],{...m,slotName:xp})}):null,o(hp,{}),o(up,{}),o(cp,{__html:d?.cookieContent?.__html})]})}));Object.assign(bp,{childrenTypes:[],slots:()=>[pp,gp,xp]});e.Blocks=rp,e.ContentPage=bp,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=de,e.joinList=ai,e.packageVersion="0.14.431",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=O,e.useRouter=u,Object.defineProperty(e,"__esModule",{value:!0})}));