@redneckz/wildless-cms-uni-blocks 0.14.596 → 0.14.598

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 (204) hide show
  1. package/bundle/api/dadataHints/dadataHintsType.d.ts +20 -4
  2. package/bundle/api/dadataHints/hintsListsOptions.d.ts +2 -24
  3. package/bundle/bundle.umd.js +80 -25
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/ui-kit/FormField/Fields/DulIssuedByField.d.ts +2 -0
  6. package/bundle/ui-kit/FormField/Fields/DulSubdivisionCodeField.d.ts +2 -0
  7. package/bundle/ui-kit/Input/InputPopup.d.ts +1 -1
  8. package/bundle/ui-kit/Input/InputProps.d.ts +3 -0
  9. package/bundle/ui-kit/Input/useInputPopup.d.ts +4 -1
  10. package/dist/api/dadataHints/dadataHints.js +15 -8
  11. package/dist/api/dadataHints/dadataHints.js.map +1 -1
  12. package/dist/api/dadataHints/dadataHintsType.d.ts +20 -4
  13. package/dist/api/dadataHints/hintsListsOptions.d.ts +2 -24
  14. package/dist/api/dadataHints/hintsListsOptions.js +31 -9
  15. package/dist/api/dadataHints/hintsListsOptions.js.map +1 -1
  16. package/dist/components/DepositFiltration/DepositFiltration.js +1 -1
  17. package/dist/components/DepositFiltration/DepositFiltration.js.map +1 -1
  18. package/dist/ui-kit/FormField/Fields/DulIssuedByField.d.ts +2 -0
  19. package/dist/ui-kit/FormField/Fields/DulIssuedByField.js +16 -0
  20. package/dist/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -0
  21. package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.d.ts +2 -0
  22. package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +15 -0
  23. package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -0
  24. package/dist/ui-kit/FormField/Fields/InnField.js +8 -1
  25. package/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
  26. package/dist/ui-kit/FormField/Fields/OrganizationNameField.js +8 -1
  27. package/dist/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  28. package/dist/ui-kit/FormField/Fields/SexField.js +1 -3
  29. package/dist/ui-kit/FormField/Fields/SexField.js.map +1 -1
  30. package/dist/ui-kit/FormField/getField.js +4 -4
  31. package/dist/ui-kit/FormField/getField.js.map +1 -1
  32. package/dist/ui-kit/Input/InputControl.js +3 -1
  33. package/dist/ui-kit/Input/InputControl.js.map +1 -1
  34. package/dist/ui-kit/Input/InputPopup.d.ts +1 -1
  35. package/dist/ui-kit/Input/InputPopup.js +1 -1
  36. package/dist/ui-kit/Input/InputPopup.js.map +1 -1
  37. package/dist/ui-kit/Input/InputProps.d.ts +3 -0
  38. package/dist/ui-kit/Input/useInputPopup.d.ts +4 -1
  39. package/dist/ui-kit/Input/useInputPopup.js +7 -4
  40. package/dist/ui-kit/Input/useInputPopup.js.map +1 -1
  41. package/lib/api/dadataHints/dadataHints.js +15 -8
  42. package/lib/api/dadataHints/dadataHints.js.map +1 -1
  43. package/lib/api/dadataHints/dadataHintsType.d.ts +20 -4
  44. package/lib/api/dadataHints/hintsListsOptions.d.ts +2 -24
  45. package/lib/api/dadataHints/hintsListsOptions.js +26 -4
  46. package/lib/api/dadataHints/hintsListsOptions.js.map +1 -1
  47. package/lib/components/DepositFiltration/DepositFiltration.js +1 -1
  48. package/lib/components/DepositFiltration/DepositFiltration.js.map +1 -1
  49. package/lib/ui-kit/FormField/Fields/DulIssuedByField.d.ts +2 -0
  50. package/lib/ui-kit/FormField/Fields/DulIssuedByField.js +14 -0
  51. package/lib/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -0
  52. package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.d.ts +2 -0
  53. package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +13 -0
  54. package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -0
  55. package/lib/ui-kit/FormField/Fields/InnField.js +8 -1
  56. package/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
  57. package/lib/ui-kit/FormField/Fields/OrganizationNameField.js +8 -1
  58. package/lib/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  59. package/lib/ui-kit/FormField/Fields/SexField.js +1 -3
  60. package/lib/ui-kit/FormField/Fields/SexField.js.map +1 -1
  61. package/lib/ui-kit/FormField/getField.js +4 -4
  62. package/lib/ui-kit/FormField/getField.js.map +1 -1
  63. package/lib/ui-kit/Input/InputControl.js +3 -1
  64. package/lib/ui-kit/Input/InputControl.js.map +1 -1
  65. package/lib/ui-kit/Input/InputPopup.d.ts +1 -1
  66. package/lib/ui-kit/Input/InputPopup.js +1 -1
  67. package/lib/ui-kit/Input/InputPopup.js.map +1 -1
  68. package/lib/ui-kit/Input/InputProps.d.ts +3 -0
  69. package/lib/ui-kit/Input/useInputPopup.d.ts +4 -1
  70. package/lib/ui-kit/Input/useInputPopup.js +7 -4
  71. package/lib/ui-kit/Input/useInputPopup.js.map +1 -1
  72. package/mobile/bundle/api/dadataHints/dadataHintsType.d.ts +20 -4
  73. package/mobile/bundle/api/dadataHints/hintsListsOptions.d.ts +2 -24
  74. package/mobile/bundle/bundle.umd.js +80 -25
  75. package/mobile/bundle/bundle.umd.min.js +1 -1
  76. package/mobile/bundle/ui-kit/FormField/Fields/DulIssuedByField.d.ts +2 -0
  77. package/mobile/bundle/ui-kit/FormField/Fields/DulSubdivisionCodeField.d.ts +2 -0
  78. package/mobile/bundle/ui-kit/Input/InputPopup.d.ts +1 -1
  79. package/mobile/bundle/ui-kit/Input/InputProps.d.ts +3 -0
  80. package/mobile/bundle/ui-kit/Input/useInputPopup.d.ts +4 -1
  81. package/mobile/dist/api/dadataHints/dadataHints.js +15 -8
  82. package/mobile/dist/api/dadataHints/dadataHints.js.map +1 -1
  83. package/mobile/dist/api/dadataHints/dadataHintsType.d.ts +20 -4
  84. package/mobile/dist/api/dadataHints/hintsListsOptions.d.ts +2 -24
  85. package/mobile/dist/api/dadataHints/hintsListsOptions.js +31 -9
  86. package/mobile/dist/api/dadataHints/hintsListsOptions.js.map +1 -1
  87. package/mobile/dist/components/DepositFiltration/DepositFiltration.js +1 -1
  88. package/mobile/dist/components/DepositFiltration/DepositFiltration.js.map +1 -1
  89. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedByField.d.ts +2 -0
  90. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedByField.js +16 -0
  91. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -0
  92. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.d.ts +2 -0
  93. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +15 -0
  94. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -0
  95. package/mobile/dist/ui-kit/FormField/Fields/InnField.js +8 -1
  96. package/mobile/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
  97. package/mobile/dist/ui-kit/FormField/Fields/OrganizationNameField.js +8 -1
  98. package/mobile/dist/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  99. package/mobile/dist/ui-kit/FormField/Fields/SexField.js +1 -3
  100. package/mobile/dist/ui-kit/FormField/Fields/SexField.js.map +1 -1
  101. package/mobile/dist/ui-kit/FormField/getField.js +4 -4
  102. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  103. package/mobile/dist/ui-kit/Input/InputControl.js +3 -1
  104. package/mobile/dist/ui-kit/Input/InputControl.js.map +1 -1
  105. package/mobile/dist/ui-kit/Input/InputPopup.d.ts +1 -1
  106. package/mobile/dist/ui-kit/Input/InputPopup.js +1 -1
  107. package/mobile/dist/ui-kit/Input/InputPopup.js.map +1 -1
  108. package/mobile/dist/ui-kit/Input/InputProps.d.ts +3 -0
  109. package/mobile/dist/ui-kit/Input/useInputPopup.d.ts +4 -1
  110. package/mobile/dist/ui-kit/Input/useInputPopup.js +7 -4
  111. package/mobile/dist/ui-kit/Input/useInputPopup.js.map +1 -1
  112. package/mobile/lib/api/dadataHints/dadataHints.js +15 -8
  113. package/mobile/lib/api/dadataHints/dadataHints.js.map +1 -1
  114. package/mobile/lib/api/dadataHints/dadataHintsType.d.ts +20 -4
  115. package/mobile/lib/api/dadataHints/hintsListsOptions.d.ts +2 -24
  116. package/mobile/lib/api/dadataHints/hintsListsOptions.js +26 -4
  117. package/mobile/lib/api/dadataHints/hintsListsOptions.js.map +1 -1
  118. package/mobile/lib/components/DepositFiltration/DepositFiltration.js +1 -1
  119. package/mobile/lib/components/DepositFiltration/DepositFiltration.js.map +1 -1
  120. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedByField.d.ts +2 -0
  121. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedByField.js +14 -0
  122. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -0
  123. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.d.ts +2 -0
  124. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +13 -0
  125. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -0
  126. package/mobile/lib/ui-kit/FormField/Fields/InnField.js +8 -1
  127. package/mobile/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
  128. package/mobile/lib/ui-kit/FormField/Fields/OrganizationNameField.js +8 -1
  129. package/mobile/lib/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  130. package/mobile/lib/ui-kit/FormField/Fields/SexField.js +1 -3
  131. package/mobile/lib/ui-kit/FormField/Fields/SexField.js.map +1 -1
  132. package/mobile/lib/ui-kit/FormField/getField.js +4 -4
  133. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  134. package/mobile/lib/ui-kit/Input/InputControl.js +3 -1
  135. package/mobile/lib/ui-kit/Input/InputControl.js.map +1 -1
  136. package/mobile/lib/ui-kit/Input/InputPopup.d.ts +1 -1
  137. package/mobile/lib/ui-kit/Input/InputPopup.js +1 -1
  138. package/mobile/lib/ui-kit/Input/InputPopup.js.map +1 -1
  139. package/mobile/lib/ui-kit/Input/InputProps.d.ts +3 -0
  140. package/mobile/lib/ui-kit/Input/useInputPopup.d.ts +4 -1
  141. package/mobile/lib/ui-kit/Input/useInputPopup.js +7 -4
  142. package/mobile/lib/ui-kit/Input/useInputPopup.js.map +1 -1
  143. package/mobile/src/api/dadataHints/dadataHints.ts +27 -10
  144. package/mobile/src/api/dadataHints/dadataHintsType.ts +21 -4
  145. package/mobile/src/api/dadataHints/hintsListsOptions.ts +34 -4
  146. package/mobile/src/components/DepositFiltration/DepositFiltration.tsx +1 -1
  147. package/mobile/src/ui-kit/FormField/Fields/DulIssuedByField.tsx +26 -0
  148. package/mobile/src/ui-kit/FormField/Fields/DulSubdivisionCodeField.tsx +27 -0
  149. package/mobile/src/ui-kit/FormField/Fields/InnField.tsx +18 -7
  150. package/mobile/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +17 -7
  151. package/mobile/src/ui-kit/FormField/Fields/SexField.tsx +8 -12
  152. package/mobile/src/ui-kit/FormField/getField.tsx +4 -4
  153. package/mobile/src/ui-kit/Input/InputControl.tsx +4 -0
  154. package/mobile/src/ui-kit/Input/InputPopup.tsx +2 -2
  155. package/mobile/src/ui-kit/Input/InputProps.ts +3 -0
  156. package/mobile/src/ui-kit/Input/useInputPopup.tsx +17 -5
  157. package/package.json +1 -1
  158. package/src/api/dadataHints/dadataHints.ts +27 -10
  159. package/src/api/dadataHints/dadataHintsType.ts +21 -4
  160. package/src/api/dadataHints/hintsListsOptions.ts +34 -4
  161. package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +10 -15
  162. package/src/components/DepositFiltration/DepositFiltration.tsx +1 -1
  163. package/src/ui-kit/FormField/Fields/DulIssuedByField.tsx +26 -0
  164. package/src/ui-kit/FormField/Fields/DulSubdivisionCodeField.tsx +27 -0
  165. package/src/ui-kit/FormField/Fields/InnField.tsx +18 -7
  166. package/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +17 -7
  167. package/src/ui-kit/FormField/Fields/SexField.tsx +8 -12
  168. package/src/ui-kit/FormField/getField.tsx +4 -4
  169. package/src/ui-kit/Input/InputControl.tsx +4 -0
  170. package/src/ui-kit/Input/InputPopup.tsx +2 -2
  171. package/src/ui-kit/Input/InputProps.ts +3 -0
  172. package/src/ui-kit/Input/useInputPopup.tsx +17 -5
  173. package/bundle/ui-kit/FormField/Fields/DulIssuedBy.d.ts +0 -2
  174. package/bundle/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +0 -2
  175. package/dist/ui-kit/FormField/Fields/DulIssuedBy.d.ts +0 -2
  176. package/dist/ui-kit/FormField/Fields/DulIssuedBy.js +0 -9
  177. package/dist/ui-kit/FormField/Fields/DulIssuedBy.js.map +0 -1
  178. package/dist/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +0 -2
  179. package/dist/ui-kit/FormField/Fields/DulSubdivisionCode.js +0 -9
  180. package/dist/ui-kit/FormField/Fields/DulSubdivisionCode.js.map +0 -1
  181. package/lib/ui-kit/FormField/Fields/DulIssuedBy.d.ts +0 -2
  182. package/lib/ui-kit/FormField/Fields/DulIssuedBy.js +0 -7
  183. package/lib/ui-kit/FormField/Fields/DulIssuedBy.js.map +0 -1
  184. package/lib/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +0 -2
  185. package/lib/ui-kit/FormField/Fields/DulSubdivisionCode.js +0 -7
  186. package/lib/ui-kit/FormField/Fields/DulSubdivisionCode.js.map +0 -1
  187. package/mobile/bundle/ui-kit/FormField/Fields/DulIssuedBy.d.ts +0 -2
  188. package/mobile/bundle/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +0 -2
  189. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedBy.d.ts +0 -2
  190. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedBy.js +0 -9
  191. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedBy.js.map +0 -1
  192. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +0 -2
  193. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCode.js +0 -9
  194. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCode.js.map +0 -1
  195. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedBy.d.ts +0 -2
  196. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedBy.js +0 -7
  197. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedBy.js.map +0 -1
  198. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +0 -2
  199. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCode.js +0 -7
  200. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCode.js.map +0 -1
  201. package/mobile/src/ui-kit/FormField/Fields/DulIssuedBy.tsx +0 -12
  202. package/mobile/src/ui-kit/FormField/Fields/DulSubdivisionCode.tsx +0 -17
  203. package/src/ui-kit/FormField/Fields/DulIssuedBy.tsx +0 -12
  204. package/src/ui-kit/FormField/Fields/DulSubdivisionCode.tsx +0 -17
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:u("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=v[n]||"h3";return o(i,{role:"heading",className:u("font-sans m-0",N[t],e),children:l||a})})),k=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=S[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(w,{className:u("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:l}):null,a?o(k,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...p,children:a}):null]})})),T=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function B(e,t,{className:n,...l}={}){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:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const P=[],M=(e,{key:t,ancestors:n=P,slotName:l=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||P,[r.parent,l]]:n},a)))};function R({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?M(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function V(){return V._impl()}V._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),V.setup=e=>{V._impl=e};const D=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return D.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),A=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),F=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),E=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var j=Object.freeze({__proto__:null,isURL:A,isLocalURL:_,isHash:O,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:F,hasPrefix:E});const L="/api/",$=`${L}v1/storage`,U=e=>(t,n)=>{if([!t,A(t),O(t),[z.CDN,L].some((e=>E(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`${$}/${t}/attachment`;const l=t?.startsWith("/");return F(E(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},q={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const d=V(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,h=U(d)(F(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(K,{className:e,children:c("svg",{className:u(Y(r),q[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:h,xlinkHref:h})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},Y=e=>e?"":"w-full h-full",K=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),X=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.filter(Boolean).join("/")}`}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!A(t)?U(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const l=V();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:J(l)(e),type:te(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(l)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:u("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,ne=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(Q,{className:e,imageClassName:n,image:t}):null)),le={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},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:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" ");class ce{subscribersMap={};subjectsStateMap={};emitter=this;observable=this;subscribe(e,t){return this.subscribersMap[e]||=[],this.subscribersMap[e]?.push(t),this.fireSubscribers([t],this.subjectsStateMap[e]),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){const n=this.subscribersMap[e]?.indexOf(t);n&&-1!==n&&this.subscribersMap[e]?.splice(n,1)}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(this.subscribersMap[e],t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t,this.fireSubscribers(this.subscribersMap[e],t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){if(e&&t)for(const n of e)n(t)}}const de=new ce,me=()=>({open:(e,t={})=>de.emitter.fire("dialog",{type:"open",dialog:e,...t}),close:()=>de.emitter.fire("dialog",{type:"close"}),closeAll:()=>de.emitter.fire("dialog",{type:"close",all:!0})}),ue=e=>ue._impl(e);function he(){const e=G(X.SITE_URL),t=V(),{closeAll:n}=me();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:ue(l({...e,href:n}))}};function l({href:l,target:a,onClick:i}){return r=>{i&&i(r);const s=!E(l,e||"/");l&&!s&&_(l,a)&&(n(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(l,e)))}}}ue._impl=e=>e,ue.setup=e=>{ue._impl=e};const pe=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},ge=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=xe(e)&&"hidden lg:block";return c("div",{className:u(fe(e),"flex gap-xs"),children:[l?o("div",{className:u(r,se[i]),children:l}):null,xe(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:u(r,se[i]),children:a}):null]})})),fe=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return u("group/btn items-center justify-center",xe(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},xe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),be=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ye=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:l}),s=he()({onClick:r,href:l,...a}),c=t??o(ge,{...s});return o(e?Ne:ve,{...s,children:c})})),ve=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:u})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...pe(d),children:m}))),Ne=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:be({className:e,rounded:l,version:n}),children:a})));function we({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:u(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(ye,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const ke=()=>{const[e,t]=l(true);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",n)}}),[]),e},Se={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Ce=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&Se[n],t),children:e}):null,Te=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=ke(),v=V(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=f&&!y;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&we({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Ce(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[h,x]}),Be(R({...b,extraProps:{className:"@container-normal"}})),Ce(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Ie(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Ie=e=>u(e?"row-span-2":"@xl:row-span-2"),Be=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Pe=(e,t="normal")=>e?.icon||e?.src?o("div",{className:u("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Me=d((e=>{const{__html:t="",richVersion:n="",itemSize:l="list-m",isDotted:a=!0}=e,i=a?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(n,l,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Re=(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,Ve=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),De=(e,t)=>e?o(Ve,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,ze=(e,t)=>["label"in e?De(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Re(e.description,t)},String(t)):null,"__html"in e?o(Me,{...e},`rte-${t}`):null],Ae=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:u("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Pe(n.icon,t):null,o("div",{children:ze(n)})]}))),_e=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:u("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(Ae,{benefitsVersion:t,...e},String(n))))}):null)),Oe=d((({className:e,benefits:t})=>t?.length?o("div",{className:u("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(ze)}):null)),Fe=d((({isTabularBenefits:e,...t})=>o(e?Oe:_e,{...t}))),Ee=e=>Boolean(e?.src||e?.icon),je=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(Le(n))}):null,Le=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=$e(a,r),d=$e(i,r);return l||a?.icon?o(ye,{className:u("basis-full @lg:basis-auto",e),appendLeft:Ue({...a,iconVersion:c}),appendRight:Ue({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},$e=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Ue=e=>Ee(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),qe=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),We=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(He)}):null)),He=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Ve,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[qe(2)(t)," ",n||"₽"]}):null]},String(l)),Ye=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ke)}):null)),Ke=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ve,{size:"text-m",font:"font-light",children:e})},String(t)),Xe={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Ge=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],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(ne,{image:y}):null,P=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Te,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Je(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:je(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?o(Fe,{benefitsVersion:s,isTabularBenefits:d,benefits:M}):null,h?o(Me,{richVersion:p,__html:h,isDotted:m,itemSize:Xe[i]}):null,T,f?.length?o(We,{priceList:f}):null,Ze(x)]})})})),Je=(e,t)=>t?{rightImage:e}:{leftImage:e},Ze=e=>e?.length?o(Ye,{tags:e}):null,Qe=e=>Boolean(e&&Array.isArray(e)),et=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),tt=(e,t)=>{return n=e,Boolean(et(n)&&"string"==typeof n.$ref)?t.ref(e):et(e)?t.record(e):Qe(e)?t.array(e):t.scalar?t.scalar(e):e;var n},nt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(lt,e),lt=(e,t)=>e&&t?et(e)?e[t]:Qe(e)?e[parseInt(t,10)]:e:e,at=(e,t)=>tt(e,{ref:({$ref:e,...n})=>at(e?nt(t(e),e):n,t),record:e=>Object.entries(e).map((([e,n])=>({[e]:at(n,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>at(e,t)))}),it=(e,t,n=[])=>{tt(e,{ref:e=>t(e.$ref,n),record:e=>{for(const l in e)it(e[l],t,[...n,l])},array:e=>{for(let l=0;l<e.length;l++)it(e[l],t,[...n,l])}})};async function rt(e,t){try{return e?await st(e,t):null}catch(e){console.error(e)}return null}const st=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),ot=e=>[...new Set(e)],ct={},dt=["/portal-resources"],mt=(e,t)=>at(e,(e=>t?.[e])),ut=(e,t)=>{const n=(e=>{const t=[];return it(e,(e=>t.push(e))),t})(e),[i,r]=l({});return a((()=>{n.length&&(async e=>Object.fromEntries((await Promise.allSettled(ot(e).filter((e=>!dt.some((t=>e.startsWith(t))))).map((async e=>[e,ct[e]||=await st(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(n).then(r)}),[n.join()]),n.length?mt(e,{...t,...i}):e};function ht(e,t={}){const n=d((t=>{const n=ut((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const pt=ht((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(Ge,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),gt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>ft(0,t?.length)),[t]),l=t?.[n];return l?o(pt,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(f,{})})})),ft=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),xt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},bt=e=>e?.replace(/[^+\d]/g,"");const yt=e=>e?{phone:bt(e)}:{},vt=(e,t="birthday")=>e?{[t]:xt(e)}:{},Nt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),wt=(e,t=!0)=>({[t?"email":"mail"]:e}),kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:bt(e)}:{},St=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e)t[l??""]?.(n,a)},Ct="rshb-query-params";function Tt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Ct)||"";return e&&globalThis.sessionStorage?.setItem(Ct,e),e}function It(e){if(!e)throw new Error("Value should be fulfilled");return e}const Bt=e=>t=>{const[,n]=It(e.find((([e])=>e(t))));return n(t)},Pt=e=>Bt(e.map((([e,t])=>[e,()=>t])));Pt.if=e=>new Mt(void 0,e);class Mt{parent;predicate;unit;get entry(){return[It(this.predicate),It(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Mt(this,e)}then(e){return new Mt(this.parent,this.predicate,e)}else(e){return Bt([...Rt(this),[()=>!0,e]])}}const Rt=e=>[...e?.parent?Rt(e.parent):[],e.entry],Vt=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=Tt();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;if(n){Dt(t?.target)?.(n)}}},Dt=Pt([[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 zt(){return zt._impl()}zt._impl=()=>({forwardQuery:Vt}),zt.setup=e=>{zt._impl=e};const At=e=>e,_t=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=l(e),c=i(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return Ot(t,n)?t:n}:r(e)):o,[r]);a((()=>{r&&o(r)}),[r]);const[d,m]=l(!1),[u,h]=l({}),p=i(((e,t)=>{const{parse:n=At,format:l=At}=t||{};return{value:l(s[e]),isDirty:d||u[e],onChange:t=>{c((l=>({...l,[e]:n(t)}))),h((t=>({...t,[e]:!0})))}}}),[c,d,u]),g=i((e=>{c(e),h(e)}),[]),f=i((()=>{c(e),m(!1),h({})}),[e]),x=i((e=>{e.preventDefault(),t?f():m(!0),n&&n(s,e)}),[n,s]);return[s,{isDirty:d||Object.values(u).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},Ot=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),Ft=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})})),Et=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],jt=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Lt=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],$t="/api/v1/outservice/outserviceregions",Ut=e=>"OUTSERVICE"===e?$t:void 0,qt=e=>o("div",{className:"h-6",children:e?o(Ve,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Wt=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Ht="appearance-none w-5 h-5 border-solid flex-none",Yt=[{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"}],Kt=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Wt,{paths:Yt,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:u("flex items-center relative group/box",Gt(l)),onClick:s,children:[o("div",{className:u(Ht,"m-0",a?"rounded-full border-2":Zt(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Jt(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,Xt(n)]})})})),Xt=e=>e?o("div",{className:"ml-s",children:o(Ve,{size:"text-l",font:"font-light",children:e})}):null,Gt=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Jt=(e=!1)=>e?"radio":"checkbox",Zt=(e=!1)=>u("rounded border",{"bg-primary-main":e}),Qt=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(Kt,{text:t,value:n,disabled:a,onChange:r},l),qt(i)]})));function en(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}function tn(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function nn(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return tn(globalThis.document,"click",n),t}const ln=({label:e,errors:t})=>e&&t?`${e}*`:e,an=()=>{},rn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",sn=e=>e?o(Ve,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,on=d((({key:e,className:t="",id:n,name:l,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1,disabled:w=!1})=>{const k=s(null),S=i((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);a((()=>{v&&k.current?.focus()}),[v,k]);const C=g?"pr-3xl":"",T=cn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[sn(d),N?o("textarea",{className:u("block resize-y min-h-24",dn,T),id:u("textarea",n),name:l||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,disabled:w},e):o("input",{type:r,className:u("h-14",dn,C,T),ref:k,id:n,name:l||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,pattern:y,disabled:w},e)]}),g]})})),cn=e=>e?rn:"border-error",dn="w-full border rounded-md text-primary-text outline-none p-m",mn=e=>(e?.suggestions||[]).map((e=>({...e,processedValue:e?.value}))),un={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"}},hn=()=>({open:(e,t)=>de.emitter.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>de.emitter.fire("popup",{type:"update",popup:e,...t}),close:()=>de.emitter.fire("popup",{type:"close"})}),pn=d((({options:e,onChange:t})=>o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,n)=>o("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem",onMouseDown:()=>t(e.processedValue),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function gn({isOpen:e,value:t,name:n,onChange:c}){const d=s(t),m=s(t),[u,h]=l([]),p=hn(),g=un[n],f=i((()=>{m.current=t,p.close()}),[t]),x=i((e=>{f(),m.current=e,c&&c(e)}),[f,c]),b=s(null),y=r((()=>async e=>{if(!g)return;const t=await(e=>{const{url:t,query:n,requestData:l={}}=e;return fetch(`/api/v1/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...l,query:n})}).then((e=>e.json())).then(mn)})({url:g.url,requestData:{...g?.requestData},query:e});t?.length&&h(t)}),[]),v=r((()=>((e,t=600)=>{let n;const l=(...a)=>{l.dispose(),n=setTimeout((()=>{e(...a)}),t)};return l.dispose=()=>{n&&clearTimeout(n)},l})(y,300)),[y]);return a((()=>{if(!e||!b.current||m.current===t)return void f();const n=b.current,{top:l,left:a,width:i,height:r}=n.getBoundingClientRect();t&&d.current!==t&&(v(t),d.current=t),p.update(o(pn,{options:u,value:t,onChange:x}),{top:l+globalThis.scrollY+r,left:a,width:i})}),[e,u,t,x]),b}const fn=d((({className:e,label:t,value:n="",placeholder:l,error:a,errors:i,onChange:r=an,onBlur:s,isTextarea:d,type:m,name:h="",dadata:p=!1})=>{const[g,{setFalse:f,setTrue:x}]=en(),b=nn(f),y=gn({isOpen:g&&p,name:h,value:n,onChange:r});return c("div",{className:u("shrink-0 w-full",e),ref:b,onBlur:f,onFocus:x,children:[o("div",{ref:y,children:o(on,{type:m||"text","aria-label":t,label:ln({label:t,errors:i}),valid:Boolean(!a),value:n,onChange:r,onBlur:s,isTextarea:d,placeholder:xn(l,i,t)})}),qt(a)]})})),xn=(e,t,n)=>t&&!n?`${e}*`:e,bn=e=>e?.text||e?.key||"",yn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,vn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:yn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:bn(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const Nn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:h="",isSearch:p=!1,iconVersion:g="black",onChange:f,disabled:x=!1})=>{const[b,{setFalse:y,setTrue:v}]=en(),[N,w]=l(""),k=Sn(x,n.length),S=b&&!k,C=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=hn(),u=i((()=>{m.close(),c&&c()}),[c]),h=i((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=nn(u);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(vn,{popupRef:g,options:t,value:n,query:l,onChange:h,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:C,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[sn(t),c("div",{className:u("relative",S?"z-20":"z-10"),ref:T,children:[c("div",{className:u("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",kn(m,d,k)),onClick:S?C:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:bn(r)||h}),wn(S,g)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(on,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),wn=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),kn=(e,t,n)=>u(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Sn=(e,t)=>e||0===t,Cn=d((({className:e="",label:t,error:n,errors:l,...a})=>c("div",{className:e,children:[o(Nn,{...a,valid:!n,label:ln({label:t,errors:l})}),qt(n)]}))),Tn=e=>!e?.length,In=e=>t=>n=>e(n)?[]:[t],Bn=In((e=>null!=e&&""!==e)),Pn="Некорректно заполненное поле",Mn=e=>Bn(e||Pn),Rn=In((e=>e?.key&&""!==e?.key))(Pn),Vn=e=>In((e=>"string"==typeof e&&e.length>1))(e||Pn),Dn=(e,t)=>In((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t||Pn),zn=e=>In((e=>"string"==typeof e&&6===e.length))(e),An=e=>{return(t=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,In((e=>"string"==typeof e&&t.test(e))))(e);var t},_n=In((e=>"boolean"==typeof e&&e))("Согласие обязательно"),On=e=>{const t=String(e).replace(/[^0-9]+/g,"");if(11===t.length){let e=0;for(let n=0;n<9;n++)e+=parseInt(t.charAt(n))*(9-n);return e>101&&(e%=101),100!==e&&101!==e||(e=0),e===parseInt(t.substr(9))}return!1},Fn={typeForm:Mn(),surname:Vn("Укажите свою фамилию"),name:Vn("Укажите своё имя"),middleName:Vn("Укажите своё отчество"),region:Rn,addressBranch:Rn,phone:An("Укажите номер телефона"),secondaryPhone:An("Укажите номер телефона"),birthday:Mn("Укажите дату рождения"),birthPlace:Mn("Укажите место рождения"),education:Mn("Выберите ваше образование"),housing:Mn("Выберите тип жилья"),employment:Mn("Выберите информацию о трудоустройстве"),organization:Mn("Выберите тип организации"),amountWorkers:Mn("Выберите информацию о количестве сотрудников"),employerActivities:Mn("Выберите вид деятельности организации"),employerOrganization:Mn("Выберите вид организации"),positionOrganization:Mn("Выберите вашу должность"),dulSerie:(En="Укажите серию паспорта",In((e=>"string"==typeof e&&4===e.length))(En)),dulNumber:zn("Укажите номер паспорта"),dulIssueDateField:Mn("Укажите дату выдачи паспорта"),dulSubdivisionCode:zn("Укажите код подразделения"),dulIssuedBy:Mn("Укажите организацию, выдавшую паспорт"),email:(e=>In((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2}$/.test(e)))(e))("Укажите электронную почту"),fullName:Vn(),inn:(e=>In((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),legalForm:Mn("Укажите ОПФ"),organizationName:Mn("Укажите наименование организации"),generalSeniority:Mn(),lastJobExperience:Mn("Укажите стаж на последнем месте работы"),experience5Years:Mn("Укажите общий стаж за последние 5 лет"),jobsNumber:Mn("Укажите количество лет стажа"),beginDate:Mn("Укажите дату заключения трудового договора"),fullAddress:Mn(),partnerComments:Mn(),collectionCount:Mn(),comment:Mn(),acquiringType:Rn,feedbackMethod:Rn,serviceType:Rn,serviceDirection:Rn,meetingDay:Mn(),product:Mn(),localities:Mn(),consentDataProcessing:_n,annualRevenue:Mn(),consentToReceiveMaterials:_n,processPersonalDataLeadFlg:_n,consentProviderFlg:_n,consentPhotoFlg:_n,consentPfrFlg:_n,consentAssignmentClaimsFlg:_n,consentCollectionFlg:_n,consentInformFlg:_n,familyStatus:Mn("Выберите семейное положение"),children:Dn(2,"Укажите количество детей"),familyMembers:Dn(2,"Укажите количество членов семьи"),dependents:Dn(2,"Укажите количество иждивенцев"),totalIncome:Dn(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:Dn(10,"Укажите сумму обязательных выплат"),snils:(e=>In(On)(e))("Некорректный номер СНИЛС"),conscription:Mn(),armyIdFlg:_n,sex:Mn("Укажите свой пол"),participantAddress:Mn("Необходимо выбрать адрес"),participantDateRegistration:Mn("Укажите дату регистрации")};var En;const jn=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,Fn?.[e]])))},Ln=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},$n=(e,t,n=!1)=>n?Ln(e,t):e,Un=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],qn=d((({field:e,input:t})=>o(Cn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Un,...$n(e("acquiringType"),Fn.acquiringType,t?.required)}))),Wn=(e="")=>Boolean("trade"===e||"all"===e),Hn=e=>null!=e,Yn=new Map,Kn=e=>Boolean(e?.every((e=>Array.isArray(e)?Kn(e):!e||"string"==typeof e))),Xn=e=>Kn(e)?e.toString():"";function Gn(e,t,{fallback:n,cache:i}={}){const s=r((()=>Jn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(Hn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=Yn)=>n=>{const l=Xn(n),a=t.get(l);if(l&&Hn(a))return a;const i=e(...n);return l&&Hn(i)&&t.set(l,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Jn(e){return Array.isArray(e)?e:e instanceof Function?Jn(e()):[e]}const Zn=[];const Qn=async e=>await rt(e,{method:"GET"})||Zn;function el(e=!1){const{data:t}=Gn(e?"/api/v1/premiumBranchesByRegions":"/api/v1/branchesByRegions",st);return Array.isArray(t)?t:[]}const tl=d((({field:e,input:t,isPremium:n=!1})=>{const l=e("region"),i=l?.value?.key,r=l?.value?.text,s=n?el(n)?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=Gn(e?`/api/v1/branches?regionCode=${e}`:null,Qn);return t||Zn}(i)?.filter((e=>e?.address));return a((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(Cn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...$n(e("addressBranch"),Fn.addressBranch,t?.required),isSearch:!0})})),nl=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),u=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:u}},ll=(e,t,n)=>Math.max(t,Math.min(e,n));function al(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function il({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:u("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:i,onChange:t=>{const n=al(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const rl=1,sl=100,ol=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:rl),max:s=(a.length?a.length-1:sl),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:p}=e,g=nl(e,{normalize:(e=0)=>a.length?cl(a)(e):ll(e,r,s),format:qe()}),f=i((e=>{p&&p(al(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Ve,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:u("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",rn,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),il({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),dl(l)]})})),cl=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),dl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ve,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),ml=["От 1 000 ₽","До 1 000 000 000 ₽"],ul=d((({field:e})=>o(ol,{title:"Сумма, ₽",items:ml,min:1e3,max:1e9,...e("amount")}))),hl=e=>{const{data:t,error:n}=Gn(`https://portal-ui-cc.cprb.dev.rshbdev.ru/light-api-cash/v1/dictionary?dictionaryType=${e}`,pl);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},pl=async e=>await rt(e,{method:"POST"})||[],gl=ht((({field:e,source:t,label:n,fieldName:l,input:a})=>{const i=t&&t?.map((e=>e.description))||[];return o(Cn,{placeholder:"Выберите из списка",label:n,options:fl(i),...$n(e(l),Fn[l],a?.required)})})),fl=e=>(e??[]).map((e=>({key:e,value:e}))),xl=d((({field:e,input:t})=>{const{data:n}=hl("EMPLOYEES_NUMBER");return o(gl,{field:e,source:n,label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),bl=d((({field:e,input:t})=>o(fn,{label:"Годовая выручка, ₽",...$n(e("annualRevenue"),Fn.annualRevenue,t?.required)}))),yl=d((({field:e})=>o(Qt,{text:"Наличие военного билета",...$n(e("armyIdFlg"),Fn.armyIdFlg)}))),vl=d((({field:e})=>o(fn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),Nl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const u=[];for(let c=0;c<7;c++)if(0===m&&c<t)u.push(o("td",{},`empty-${c}`));else if(d>n)u.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=wl(t,e),c=kl(t,i,r);u.push(o("td",{children:o("div",{className:Sl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},wl=(e,t)=>t&&e.toDateString()===t.toDateString(),kl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),Sl=(e=!1,t=!1)=>u("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),Cl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Tl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=an,setValue:d=an})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:u,totalDays:h}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Cl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Nl({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:m})})]})})),Il=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Bl=Il.map((e=>({key:e}))),Pl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Ml={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Rl={className:"min-w-32",iconVersion:"black",isBorder:!1},Vl=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,onChange:m})=>{const[h,{setValue:p}]=en(!1),[g,f]=l(n?.getMonth()||(new Date).getMonth()),[x,b]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:y,handleNextMonth:v,handleSelectMonth:N,handleSelectYear:w,monthsOptions:k,yearsOptions:S,handleChangeVisibleCalendar:C,ref:T}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=nn(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>l(Il.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Bl,yearsOptions:Pl,ref:s}})({onYearSelect:b,onMonthSelect:f,onShowCalendar:p,selectedYear:x,selectedMonth:g,showCalendar:h}),I=((e,t)=>{const[n,i]=l(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();i(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(T,370);return c("div",{className:u("space-y-xs",e),ref:T,children:[sn(t),c("div",{className:"relative",children:[Dl(C,n,r),h?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":I}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:y,children:o(W,{...Ml,className:"-rotate-90 cursor-pointer"})}),o(Nn,{onChange:N,value:{key:Il[g]},options:k,...Rl}),o(Nn,{onChange:w,value:{key:String(x)},options:S,...Rl}),o("div",{className:"my-auto",onClick:v,children:o(W,{...Ml,className:"rotate-90 cursor-pointer"})})]}),o(Tl,{today:n,currentMonth:g,currentYear:x,onDateSelect:m,min:s,max:d,setValue:p})]}):null]})]})})),Dl=(e,t,n)=>c("div",{onClick:e,className:u("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",n?"border-gray":"border-error"),children:[o(k,{children:t&&xt(t)}),o(W,{...Ml,name:"CalendarIcon"})]}),zl=d((({className:e,label:t,error:n,errors:l,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Vl,{label:ln({label:t,errors:l}),valid:Boolean(!n),...a}),qt(n)]}))),Al=d((({field:e,input:t})=>o(zl,{label:"Дата начала работы на текущем месте",...$n(e("beginDate"),Fn.beginDate,t?.required),...t}))),_l=d((({field:e,input:t})=>o(zl,{label:"Дата рождения",...$n(e("birthday"),Fn.birthday,t?.required)}))),Ol=d((({field:e,input:t})=>o(fn,{label:"Место рождения",...$n(e("birthPlace"),Fn.birthPlace,t?.required),...t}))),Fl=d((({field:e,input:t})=>o(fn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",type:"number",...$n(e("children"),Fn.children,t?.required),...t}))),El=d((({field:e,input:t})=>o(fn,{label:"Количество объектов инкассации",type:"number",...$n(e("collectionCount"),Fn.collectionCount,t?.required)}))),jl=d((({field:e,input:t})=>o(fn,{className:"col-span-2",...$n(e("comment"),Fn.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Ll=d((({field:e,input:t})=>{const{data:n}=hl("MILITARY_STATUS");return o(gl,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),$l=d((({field:e,input:t})=>o(Qt,{text:"Прочие согласия (согласие на уступку прав требований)",...$n(e("consentAssignmentClaimsFlg"),Fn.consentAssignmentClaimsFlg,t?.required)}))),Ul=d((({field:e,input:t})=>o(Qt,{text:"Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)",...$n(e("consentCollectionFlg"),Fn.consentCollectionFlg,t?.required)}))),ql=d((({field:e,input:t})=>o(Qt,{text:"Согласие на информирование о продуктах и услугах Банка",...$n(e("consentInformFlg"),Fn.consentInformFlg,t?.required)}))),Wl=d((({field:e,input:t})=>o(Qt,{text:"Прочие согласия (согласие на фотографирование)",...$n(e("consentPhotoFlg"),Fn.consentPhotoFlg,t?.required)}))),Hl=d((({field:e,input:t})=>o(Qt,{text:"Согласие об использовании простой электронной подписи",...$n(e("consentProviderFlg"),Fn.consentProviderFlg,t?.required)}))),Yl=d((({field:e,input:t})=>o(Qt,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...$n(e("consentToReceiveMaterials"),Fn.consentToReceiveMaterials,t?.required)}))),Kl=d((({field:e,input:t})=>o(fn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",type:"number",...$n(e("dependents"),Fn.dependents,t?.required),...t}))),Xl=d((({field:e,input:t})=>o(zl,{label:"Желаемая дата встречи",...$n(e("desiredMeetingDate"),Fn.meetingDay,t?.required)}))),Gl=d((({field:e,input:t})=>o(zl,{label:"Дата выдачи",...$n(e("dulIssueDateField"),Fn.dulIssueDateField,t?.required)}))),Jl=d((({field:e,input:t})=>o(fn,{label:"Кем выдан",...$n(e("dulIssuedBy"),Fn.dulIssuedBy,t?.required)}))),Zl=d((({field:e,input:t})=>o(fn,{label:"Номер документа",type:"number",...$n(e("dulNumber"),Fn.dulNumber,t?.required)}))),Ql=d((({field:e,input:t})=>o(fn,{label:"Серия документа",type:"number",...$n(e("dulSerie"),Fn.dulSerie,t?.required)}))),ea=d((({field:e,input:t})=>o(fn,{label:"Код подразделения",type:"number",...$n(e("dulSubdivisionCode"),Fn.dulSubdivisionCode,t?.required)}))),ta=d((({field:e,input:t})=>{const{data:n}=hl("EDUCATION_LEVEL");return o(gl,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),na=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(fn,{label:"Электронная почта",...$n(e("email"),Fn.email,n),...l})})),la=d((({field:e,input:t})=>{const{data:n}=hl("ORGANIZATION_ACTIVITY_TYPE");return o(gl,{field:e,source:n,label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),aa=d((({field:e,input:t})=>{const{data:n}=hl("ORGANIZATION_KIND");return o(gl,{field:e,source:n,label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),ia=d((({field:e,input:t})=>{const{data:n}=hl("EMPLOYMENT_TYPE");return o(gl,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),ra=d((({field:e,input:t})=>o(fn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",type:"number",...$n(e("expenses"),Fn.expenses,t?.required),...t}))),sa=d((({field:e,input:t})=>o(fn,{label:"Стаж",placeholder:"За последние 5 лет",...$n(e("experience5Years"),Fn.experience5Years,t?.required),...t}))),oa=d((({field:e,input:t})=>o(fn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",...$n(e("familyMembers"),Fn.familyMembers,t?.required),...t}))),ca=d((({field:e,input:t})=>{const{data:n}=hl("MARITAL_STATUS");return o(gl,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),da=d((({field:e,input:t})=>o(Cn,{label:"Способ получения ответа",options:Lt,...$n(e("feedbackMethod"),Fn.feedbackMethod,t?.required)}))),ma=d((({field:e,input:t})=>o(fn,{label:"Адрес",...$n(e("fullAddress"),Fn.fullAddress,t?.required),...t}))),ua=d((({field:e,input:t})=>o(fn,{label:"ФИО",...$n(e("fullName"),Fn.fullName,t?.required),...t}))),ha=d((({field:e,input:t})=>o(fn,{label:"Общий стаж",placeholder:"Количество лет",...$n(e("generalSeniority"),Fn.generalSeniority,t?.required),...t}))),pa=d((({field:e,input:t})=>{const{data:n}=hl("HOUSE_TYPE");return o(gl,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),ga=d((({field:e,input:t})=>o(fn,{label:"ИНН",type:"number",...$n(e("inn"),Fn.inn,t?.required)}))),fa=d((({field:e})=>o(Qt,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),xa=d((({field:e,input:t})=>o(fn,{label:"Общий стаж",placeholder:"Количество лет",type:"number",...$n(e("jobsNumber"),Fn.jobsNumber,t?.required),...t}))),ba=d((({field:e,input:t})=>o(fn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",...$n(e("lastJobExperience"),Fn.lastJobExperience,t?.required),...t}))),ya=d((({field:e,input:t})=>o(fn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...$n(e("legalForm"),Fn.legalForm,t?.required),...t}))),va=[];function Na(e="/api/v1/regions"){const{data:t}=Gn(e,st);return Array.isArray(t)?t:va}const wa=d((({field:e,input:t})=>{const n=e("region")?.value?.key,l=Na($t)?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(Cn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:l,...$n(e("localities"),Fn.localities,t?.required),isSearch:!0})})),ka=d((({field:e,input:t})=>o(fn,{label:"Отчество (Обязательно, при наличии)",...$n(e("middleName"),Fn.middleName),...t}))),Sa=d((({field:e,input:t})=>o(fn,{label:"Имя",...$n(e("name"),Fn.name,t?.required),...t}))),Ca=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:u("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:u("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Ve,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Ta=d((({field:e})=>Wn(e("acquiringType")?.value?.key)?o(Ca,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Ia=d((({field:e,input:t})=>{const{data:n}=hl("ORGANIZATION_TYPE");return o(gl,{field:e,source:n,label:"Тип организации",fieldName:"organization",input:t})})),Ba=d((({field:e,input:t})=>o(fn,{label:"Наименование организации",...$n(e("organizationName"),Fn.organizationName,t?.required),...t}))),Pa=d((({field:e,input:t})=>o(fn,{label:"Адрес",...$n(e("participantAddress"),Fn.participantAddress,t?.required),...t}))),Ma=d((({field:e,input:t})=>o(zl,{label:"Дата регистрации по месту жительства",...$n(e("participantDateRegistration"),Fn.participantDateRegistration,t?.required)}))),Ra=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(fn,{...$n(e("partnerComments"),Fn.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...l})})),Va=e=>"_"===e,Da=e=>/\d/.test(e),za=e=>Va(e)||Da(e),Aa=[..."+7 (___) ___-__-__"],_a=Aa.findIndex(Va),Oa=Aa.map(((e,t)=>za(e)?Aa.slice(0,t).filter(za).length:-1));const Fa=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=Aa.map(((e,n)=>Da(e)?e:t.charAt(Oa[n])||e)),l=Oa.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(_a,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(on,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),Ea=d((({className:e,label:t,error:n,...l})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Fa,{"aria-label":t,label:ln({label:t,errors:l?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...l}),qt(n)]}))),ja=d((({field:e,input:t})=>o(Ea,{label:"Телефон",...$n(e("phone"),Fn.phone,t?.required),...t}))),La=d((({field:e,input:t})=>{const{data:n}=hl("POSITION");return o(gl,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),$a=d((({field:e})=>Wn(e("acquiringType")?.value?.key)?o(Ca,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Ua=d((({field:e,input:t})=>o(Qt,{text:"Согласие на обработку персональных данных",...$n(e("processPersonalDataLeadFlg"),Fn.processPersonalDataLeadFlg,t?.required)}))),qa=ht((({field:e,source:t})=>o(Cn,{placeholder:"Выберите продукт",label:"Продукт",options:Wa(t?.productList),...Ln(e("product"),Fn.product)}))),Wa=e=>(e??[]).map((e=>({key:e,value:e}))),Ha=d((({field:e,input:t,url:n})=>{const l=Na(n);return o(Cn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...$n(e("region"),Fn.region,t?.required)})})),Ya=d((({field:e,input:t})=>{const n=el(!0),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(Cn,{label:"Регион",placeholder:"Выберите регион",options:l,...$n(e("region"),Fn.region,t?.required)})})),Ka=d((({field:e})=>{const t=e("secondaryPhone");return o(Ea,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Ln(t,Fn.secondaryPhone):t})})),Xa=d((({field:e,input:t})=>o(Cn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:jt,...$n(e("serviceDirection"),Fn.serviceDirection,t?.required)}))),Ga={horizontal:"@lg:flex-row",vertical:""},Ja=d((({label:e,items:t,value:n,className:l,onChange:a,disabled:i=!1,orientation:r="horizontal"})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Ve,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",Ga[r],l),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Kt,{isRadio:!0,text:t,value:n===e,onChange:()=>a&&a(e),disabled:i},String(e))))})]}))),Za=d((({className:e,label:t,onChange:n,error:l,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ja,{label:ln({label:t,errors:a?.errors}),onChange:e=>n&&n(e),...a}),qt(l)]}))),Qa=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],ei=d((({field:e,input:t})=>o("div",{children:o(Za,{label:"Пол",orientation:"horizontal",items:Qa,...$n(e("sex"),Fn.sex,t?.required)})}))),ti=e=>"_"===e,ni=e=>/\d/.test(e),li=e=>ti(e)||ni(e),ai=[..."___-___-___ __"],ii=ai.findIndex(ti),ri=ai.map(((e,t)=>li(e)?ai.slice(0,t).filter(li).length:-1));const si=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=ai.map(((e,n)=>ni(e)?e:t.charAt(ri[n])||e)),l=ri.indexOf(t.length-1)+1;return 0===t.length?"":(l?n.slice(0,Math.max(ii,l)):n).join("")}(e))),[t]),a=i((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(on,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),oi=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(si,{"aria-label":t,label:ln({label:t,errors:r?.errors}),valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"___-___-___ __"}),qt(l)]}))),ci=d((({field:e,input:t})=>o(oi,{label:"СНИЛС",...$n(e("snils"),Fn.snils,t?.required),...t}))),di=d((({field:e,input:t})=>o(fn,{label:"Фамилия",...$n(e("surname"),Fn.surname,t?.required),...t}))),mi=["От 1 мес","До 15 лет"],ui=d((({field:e})=>o(ol,{title:"Срок, месяцев",items:mi,min:1,max:180,...e("term")}))),hi=d((({field:e,input:t})=>o(fn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",...$n(e("totalIncome"),Fn.totalIncome,t?.required),...t}))),pi=d((({field:e,input:t})=>o(Cn,{label:"Тип обслуживания",options:Et,...$n(e("serviceType"),Fn.serviceType,t?.required)}))),gi=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],fi=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(Ja,{className:"whitespace-normal",orientation:"horizontal",items:gi,value:t,onChange:e=>n&&n(e)})})}));const xi={$ref:"/wcms-resources/outservice-productlist.json"},bi=(e,t)=>(n,l)=>{const a="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,i={surname:o(di,{field:e,input:n}),name:o(Sa,{field:e,input:n}),middleName:o(ka,{field:e,input:n}),phone:o(ja,{field:e,input:n}),email:o(na,{field:e,input:n}),fullName:o(ua,{field:e,input:n}),inn:o(ga,{field:e,input:n}),legalForm:o(ya,{field:e,input:n}),organizationName:o(Ba,{field:e,input:n}),generalSeniority:o(ha,{field:e,input:n}),lastJobExperience:o(ba,{field:e,input:n}),experience5Years:o(sa,{field:e,input:n}),jobsNumber:o(xa,{field:e,input:n}),beginDate:o(Al,{field:e,input:n}),fullAddress:o(ma,{field:e,input:n}),comment:o(jl,{field:e,input:n}),addressBranch:o(tl,{field:e,input:n,isPremium:a}),sex:o(ei,{field:e,input:n}),birthday:o(_l,{field:e,input:n}),birthPlace:o(Ol,{field:e,input:n}),desiredMeetingDate:o(Xl,{field:e,input:n}),product:o(qa,{field:e,source:xi}),localities:o(wa,{field:e,input:n}),isClient:o(fa,{field:e}),partnerComments:o(Ra,{field:e,input:n}),collectionCount:o(El,{field:e,input:n}),acquiringType:o(qn,{field:e,input:n}),onlineCheckout:o(Ta,{field:e}),posTerminal:o($a,{field:e}),serviceType:o(pi,{field:e,input:n}),term:o(ui,{field:e}),amount:o(ul,{field:e}),annualRevenue:o(bl,{field:e,input:n}),vedTypes:o(fi,{field:e}),feedbackMethod:o(da,{field:e,input:n}),serviceDirection:o(Xa,{field:e,input:n}),bankEmpolee:o(vl,{field:e}),secondaryPhone:o(Ka,{field:e}),consentToReceiveMaterials:o(Yl,{field:e,input:n}),processPersonalDataLeadFlg:o(Ua,{field:e,input:n}),consentProviderFlg:o(Hl,{field:e,input:n}),consentPhotoFlg:o(Wl,{field:e,input:n}),consentAssignmentClaimsFlg:o($l,{field:e,input:n}),consentCollectionFlg:o(Ul,{field:e,input:n}),consentInformFlg:o(ql,{field:e,input:n}),applicationDate:o(fn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),consentPfrFlg:o(Qt,{text:"Согласие на запрос в ПФР",...e("consentPfrFlg")}),region:a?o(Ya,{field:e}):o(Ha,{field:e,input:n,url:Ut(t)}),education:o(ta,{field:e,input:n}),housing:o(pa,{field:e,input:n}),employment:o(ia,{field:e,input:n}),organization:o(Ia,{field:e,input:n}),amountWorkers:o(xl,{field:e,input:n}),employerActivities:o(la,{field:e,input:n}),employerOrganization:o(aa,{field:e,input:n}),positionOrganization:o(La,{field:e,input:n}),familyStatus:o(ca,{field:e,input:n}),children:o(Fl,{field:e,input:n}),familyMembers:o(oa,{field:e,input:n}),dependents:o(Kl,{field:e,input:n}),totalIncome:o(hi,{field:e,input:n}),expenses:o(ra,{field:e,input:n}),snils:o(ci,{field:e,input:n}),conscription:o(Ll,{field:e,input:n}),armyIdFlg:o(yl,{field:e,input:n}),dulSerie:o(Ql,{field:e,input:n}),dulNumber:o(Zl,{field:e,input:n}),dulIssueDateField:o(Gl,{field:e,input:n}),dulSubdivisionCode:o(ea,{field:e,input:n}),dulIssuedBy:o(Jl,{field:e,input:n}),participantAddress:o(Pa,{field:e,input:n}),participantDateRegistration:o(Ma,{field:e,input:n})};return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:n,field:e})?o("div",{children:i[n?.name]},String(l)):null},yi=e=>2===e?"@xl:grid-cols-2":"",vi=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ve,{size:"text-h6",children:e})}):null;function Ni({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const wi={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"},ki={primary:u("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:u("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")},Si=d((({children:e,...t})=>{const n=e=>({...e,onClick:ue(Ni(e))}),{className:l,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=n(t);return o("button",{className:u("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":u(wi[a],ki[a]),l),type:s,role:d,onClick:m,children:e})})),Ci=d((({className:e,onClose:t})=>o("button",{className:u("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(W,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),Ti=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=me(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:u("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(Ci,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),Ii=d((function({responseType:e,typeForm:t}){const n="OK"===e,l=n?"ResponseOKIcon":"ResponseFailIcon",{close:a}=me(),r=i((()=>{a()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Ti,{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(ne,{image:{icon:l,iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Si,{type:"button",onClick:r,children:"Хорошо"})]})})})),Bi=e=>{const{open:t,close:n}=me();return{open:(n={})=>t(o(Ii,{...e}),n),close:n}},Pi=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Mi=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Wn(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...d,...Vi(o),...Ri(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Ri=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Vi=e=>e?{vedTypes:Object.fromEntries(gi.map((({id:t})=>[t,t===e])))}:{},Di={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Un[0],serviceType:Et[0],feedbackMethod:Lt[0],serviceDirection:jt[0],vedTypes:gi[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},zi=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Ve,{children:e}):null,t?o(ye,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Ve,{children:t.text})}):null]}))),Ai=(e,t)=>o(Si,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),_i=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Kt,{...e}),o(zi,{link:t})]}),qt(Ln(e,_n).error)]}):o(zi,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),Ai(n)]}),Oi={send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f=g?"/api/v1/lead":"/api/v1/sendcorporatelead",x={typeForm:n,...Nt(l,g),...wt(i,g),...yt(a),...vt(s,"desiredMeetingDate"),...g?vt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...kt(d)},...p};try{const e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},Fi=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:p,data:g,...f})=>{const x=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Di[e.name]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=Et[1]),{...n,typeForm:{key:t,text:""}}})(x,n),[y,v]=l(""),N=i((async(e,t)=>{const l=Ei(x,e),a=Pi(jn(l));if(!Tn(a(e)))return"Fail";const i=Mi({...e,...h}),r=await Oi.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){Bi({responseType:r,typeForm:n}).open()}if("OK"===r&&g){const e=zt();St({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:S,reset:C}]=_t(b,{onSubmit:N}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return a((()=>{"OK"===y&&(v(""),C())}),[y]),c(Ft,{className:u("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:u(yi(e.columns),"grid gap-x-m"),children:[vi(e.title),(e?.inputs||[])?.map(bi(k,n))]},`section-${t}`))),_i(T?k("consentDataProcessing"):void 0,d,s)]}),p?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(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),Ei=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const l=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):n===(l?.key??l)})))),ji=["processPersonalDataLeadFlg","consentProviderFlg","consentPfrFlg","consentPhotoFlg","consentAssignmentClaimsFlg","consentCollectionFlg","consentInformFlg","consentToReceiveMaterials"],Li={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Un[0],serviceType:Et[0],feedbackMethod:Lt[0],serviceDirection:jt[0],vedTypes:gi[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataLeadFlg:!1,consentProviderFlg:!1,consentPhotoFlg:!1,consentAssignmentClaimsFlg:!1,consentCollectionFlg:!1,consentInformFlg:!1,participantAddress:"",participantDateRegistration:void 0},$i=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Li[e.name]]))),typeForm:{key:t,text:""}}),Ui=d((({className:e,children:t})=>o("div",{className:e,role:"group",children:t}))),qi=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),u=r?r({isUnfolded:s,onToggle:d}):null;return c(Ui,t?{className:e,children:[u,m]}:{className:e,children:[m,u]})}));const Wi=d((({className:e="",isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),Hi=d((({inputs:e=[],typeForm:t="",field:n,key:l})=>{const a=e.every((e=>Boolean(n(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(Ln(n(e?.name),Fn[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(qi,{isFoldButtonOnTop:!0,renderFoldableSection:({isUnfolded:l})=>o(Wi,{isUnfolded:l,className:"flex flex-col pl-2xl",children:e.map(bi(n,t))}),renderFoldButton:Yi(c("div",{children:[o(Kt,{value:a,onChange:t=>{for(const l of e){const e=n(l.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},l),qt(i?"Отметьте все обязательные соглашения":"")]}))})})})),Yi=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),Ki=(e,t)=>o(Si,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Xi=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},Gi=e=>"application/json"===e.headers.get("Content-Type"),Ji=async(e,t,n)=>await fetch("https://retail-light-api.cprb.dev.rshbdev.ru/api/v1"+e,{method:t,headers:{"Content-Type":"application/json",...Xi()},credentials:"include",body:n?JSON.stringify(n):null}).then((e=>{if(e.ok)return(e=>Gi(e)?e.json():e)(e);throw e})).catch((e=>{throw e})),Zi=e=>{sessionStorage.setItem("accessToken",e.access_token),sessionStorage.setItem("refreshToken",e.refresh_token)},Qi=async e=>await Ji("/public-data/createUserProfile","POST",e),er=async e=>await Ji("/user-data/updateUserProfile","PUT",e),tr=async e=>await Ji("/user-data/createDraftTask","POST",e),nr=async e=>await Ji("/user-data/updateUserTask","PUT",e),lr=async e=>await Ji("/sms/sendCode","POST",e),ar=async e=>await Ji("/sms/checkCode","POST",e).then(Zi),ir=async e=>await Ji(`/sms/createCaptcha?phoneNumber=${e}`,"GET"),rr=async e=>await Ji("/sms/checkCaptcha","POST",e),sr={width:"103",height:"21"},or={"bg-white":"color",transparent:"white"},cr={"bg-white":"text-primary-main",transparent:"text-white"},dr=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:or[e]},className:cr[e],width:n?.width,height:n?.height}),mr={"bg-white":"text-primary-text",transparent:"text-white"},ur=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:u("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...pe(s),children:[dr(i,n?.image,sr),r?l??o("div",{className:"ml-s",children:o(Ve,{font:"font-medium",color:mr[i],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),hr=async(e,t)=>{const n=await ir(t);e(URL.createObjectURL(await n.blob()))},pr=d((({phoneNumber:e,close:t,sendCode:n,onClose:i})=>{const[r,s]=l(""),[d,m]=l(""),[u,h]=l(!1);return a((()=>{hr(s,e)}),[]),o(Ti,{head:o(ur,{}),onClose:i,className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex h-[140px] w-[300px]",children:[o("img",{className:"grow",src:r}),o("div",{onClick:()=>hr(s,e),className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(on,{className:"w-[300px]",onChange:m,value:d,placeholder:"Введите код с картинки"}),u?o("div",{className:"text-error",children:"Неверный код"}):null,c("div",{className:"flex w-[310px] justify-between",children:[o(Si,{onClick:t,version:"secondary",children:"Вернуться"}),o(Si,{type:"submit",disabled:!d,onClick:()=>(async({code:e,setHasError:t,close:n,sendCode:l=an})=>{const a=await rr({captchaText:e});"ERROR"===await a.text()?t(!0):(l(),n?.())})({code:d,setHasError:h,close:t,sendCode:n}),version:"secondary",children:"Отправить"})]})]})})})),gr=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:u("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:u("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),fr=d((({time:e,setTime:t,className:n})=>(a((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:xr(e)})))),xr=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,br=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=l(0),u=s([]);a((()=>{u.current?.[d]?.focus()}),[d]);const h=i((n=>l=>{const{value:a}=l.currentTarget,i=n===e.length-1,r=a.length>1;i&&r||(t(e.map(((e,t)=>t===n?a:e))),m(n+1))}),[e]),p=i((n=>l=>{const{key:a}=l;if("Backspace"===a&&!e[n]){const l=n>0?n-1:e.length-1,a=e.map(((e,t)=>t===l?"":e));t(a),m(l)}}),[e]),g=i((n=>{n.preventDefault();const l=n.clipboardData.getData("text"),a=e.map(((e,t)=>t<l.length?l[t]:e));t(a),m(a.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,l)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(l),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[l]=e},onFocus:e=>e.target.select(),onKeyDown:p(l),className:yr(l,e,n)},l)))}),n?o("div",{className:"text-error",children:r}):null]})})),yr=(e,t,n=!1)=>{const l=!t[e];return`w-16 h-20 text-3xl text-center p-2 m-2 border ${n&&l?"border-error":"border-gray"} rounded-md caret-transparent outline-none`},vr=d((({isDisabled:e,onClick:t,text:n})=>o(Si,{type:"button",onClick:t,disabled:e,children:o(Ve,{font:"font-medium",children:n})}))),Nr=d((({close:e=an,onClose:t=an,title:n,description:s,__html:d,code:m=!0,codeLength:u=4,textButton:h="",phoneNumber:p="+79999999999"})=>{const[g,f]=l(Array(u).fill("")),{handleSubmit:x,hasError:b,errorText:y,isLoading:v,timeNextReq:N,isSubmitButtonDisabled:w,setTimeNextReq:k,setIsTimerStarted:S,setAttemps:T}=(({close:e,values:t})=>{const[n,s]=l(!1),[o,c]=l(""),[d,m]=l(!1),[u,h]=l(0),[p,g]=l(!1),[f,x]=l(0),b=i((()=>{s(!1),c("")}),[]),y=r((()=>0===u&&p),[u,p]),v=r((()=>f>2||!t.every(Boolean)||y),[t]),N=i((async()=>{try{g(!1),h(0),x(f+1),m(!0),await ar({smsText:t.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),b(),e&&e()}catch{m(!1),c(f>1?"Исчерпан лимит ввода смс-кода":"Неверный код"),s(!0)}}),[t,f]);return a((()=>{y?(s(!0),c("Код просрочен")):s(!1)}),[y]),{handleSubmit:N,hasError:n,errorText:o,isLoading:d,timeNextReq:u,isSubmitButtonDisabled:v,setTimeNextReq:h,setIsTimerStarted:g,setAttemps:x}})({values:g,close:e}),I=i((()=>{(async({phoneNumber:e,captchaDialog:t,setTimeNextReq:n,setIsTimerStarted:l,setAttemps:a})=>{try{await lr({phoneNumber:e,smsCodesSetName:{key:"AUTHENTICATION"}}),a(0),n(180),l(!0)}catch(e){429===e?.status&&t.open()}})({phoneNumber:p,captchaDialog:B,setTimeNextReq:k,setIsTimerStarted:S,setAttemps:T})}),[]),B=((e,t)=>{const{open:n,close:l,closeAll:a}=me();return{open:()=>n(o(pr,{close:l,onClose:t,...e})),close:l,closeAll:a}})({phoneNumber:p,sendCode:I},t);return a((()=>{I()}),[]),o(Ti,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[o(C,{className:"w-full",title:n,description:s,headlineVersion:"S",isEmbedded:!0}),m?o(br,{values:g,setValues:f,errorText:y,hasError:b}):null,kr(N,k,I),o(Me,{itemSize:"list-s",__html:d}),wr(h,w,x),v?o(gr,{blur:!1}):null]})})})),wr=(e,t,n)=>e?o(vr,{isDisabled:t,onClick:n,text:e}):null,kr=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-primary-main",children:["Получить новый код можно через",o(fr,{className:"text-primary-main ml-1",time:e,setTime:t})]}):o(ye,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),Sr=(e,t)=>{const[n,a]=l("");return{handleSubmit:i((async n=>{const l=Pi(jn(e));if(!Tn(l(n)))return"Fail";try{const{profile:e}=await Qi({profile:{phone:bt(n.phone)}}),l=e?.id;if(l&&n?.phone){const e=async()=>{try{await er(((e,t)=>{const{name:n="",surname:l="",middleName:a="",birthday:i="",phone:r="",email:s="",processPersonalDataLeadFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:l,midname:a,birthDate:i&&xt(i,!0),email:s,phone:bt(r),processPersonalDataLeadFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(l,n));const{taskId:e,participantId:a}=await tr({profileId:l,programId:t});await nr(((e,t,n,l)=>({sendToBank:!0,taskKind:"SHORT",task:{taskSource:globalThis.location.origin,id:t,participants:[{birthDate:l?.birthDate,id:e,midname:l?.midname,name:l?.name,surname:l?.surname,profile:{id:n},participantContacts:[{contactTypeCd:{key:"EMAIL"},value:l?.email},{contactTypeCd:{key:"MAIN_PHONE"},value:l?.phone}],roleCd:{key:"BORROWER",value:"Заемщик"}}]}}))(a,e,l,n)),globalThis.location.href="/credit-lead"}catch{a("Fail")}};(e=>{const{open:t,close:n}=me();return{open:(l={})=>t(o(Nr,{onClose:n,...e}),l),close:n}})({close:e,...Cr(n?.phone)}).open()}}catch{a("Fail")}}),[]),responseStatus:n}},Cr=e=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:bt(e),textButton:"Оформить",__html:"<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>\n <ul><li>соглашение о порядке использования простой электронной подписи,\n </li><li>согласие на обработку персональных данных,\n </li><li>предоставление и подписание прочих согласий Банка,\n </li><li>согласие на запрос в ПФР</li></ul>"}),Tr=d((({className:e,title:t,programId:n,typeForm:i="",sections:r=[],button:s,...d})=>{const m=r?.flatMap((e=>e?.inputs))||[],h=$i(m,i),[p,g]=l("");a((()=>{sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken")}),[]);const{handleSubmit:f,responseStatus:x}=Sr(m,n||"");if(x){Bi({responseType:x,typeForm:i}).open()}const[,{field:b,onSubmit:y,reset:v}]=_t(h,{onSubmit:f});return a((()=>{"OK"===p&&(g(""),v())}),[p]),o(Ft,{className:u("container space-y-m",e),title:t,...d,children:c("form",{onSubmit:y,className:"space-y-m",children:[r.map(((e,t)=>c("div",{className:u(yi(e.columns),"grid gap-x-m"),children:[vi(e.title),Ir({field:b,typeForm:i,inputs:e?.inputs})]},`section-${t}`))),Ki(s)]})})})),Ir=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:l,restInputs:a}=Br(n||[]);return l.length>2?c("div",{children:[a.map(bi(e,t)),o(Hi,{inputs:l,field:e})]}):(n||[])?.map(bi(e,t))},Br=e=>({consentInputs:e?.filter((e=>ji.includes(e.name)))||[],restInputs:e?.filter((e=>!ji.includes(e.name)))||[]}),Pr=d((({title:e,description:t})=>{const n=ke();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Mr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Rr=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Vr(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const Dr=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:Vr(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}(i((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:h,role:"listitem",children:d})})),zr=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Ar=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(Or(n))}),[g,f]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?_r(c,v):{},...N?Rr(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(Dr,{className:u(m,a?zr[a-1]:"",{"h-full":N},t),style:w?_r(c/4):{},activeIndex:l,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),_r=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Or=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Fr={"horizontal-list":"w-6","vertical-list":"h-6"},Er=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?Fr[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),jr=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:u("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:u("text-secondary-text font-light",s),children:n?.description})]},String(l))},Lr=e=>e,$r=(e=Lr)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),Ur=$r(),qr=(e=Lr)=>$r((t=>-e(t))),Wr=qr(),Hr=e=>t=>e.scrollWidth/t,Yr=e=>(t,n)=>{e.scrollBy({left:n*Hr(e)(t),behavior:"smooth"})},Kr=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[qr()(a),$r()(a)]:[-1,-1],m=c>0,u=d<e-1,h=i((()=>{var t;n.current&&(m?Yr(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(u?Yr(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:h,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:u,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Xr={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Gr=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=ke(),[h,p]=Kr({itemCount:s.length}),g=Jr(Boolean(s?.length));a((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Ar,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(jr({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",Xr[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Er({activeIndex:t,onClick:f,listType:l}))}):null})),Jr=(e=!1)=>({behavior:e?"auto":"smooth"}),Zr=d((({className:e,disabled:t,...n})=>o(ye,{rounded:!0,className:u("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,...n,children:o(ne,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),Qr=d((e=>o(Zr,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),es=d((e=>o(Zr,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),ts="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",ns=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?ls(t):null,i?o(Qr,{className:u(as(a),m?"left-1":"left-0"),onClick:s}):null,r?o(es,{className:u(as(a),m?"right-1":"right-0"),onClick:d}):null]})})),ls=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(ts,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(ts,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),as=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),is=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=Kr({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===i?"relative h-full":""),children:[o(Ar,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(ns,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(Gr,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),rs=({blocksToRender:e,...t})=>o(is,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:M(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Mr(!0)),children:B(e,t)},String(n))})}),ss=e=>e%2!=0,os=d((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,role:r,...s})=>c(n,{tag:n,className:u("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:l,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),cs=d((({className:e="",label:t,icon:n,dataTheme:l="pc",disabled:a=!1,onClick:i})=>o(os,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",role:"button",className:u("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(Ve,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),ds=({isUnfolded:e,onToggle:t})=>o(cs,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),ms=["ArrowDownIcon","ArrowUpIcon"],us="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",hs=({topItemsCount:e=0,label:t="",block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]];return c("div",{className:u("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:u(us),children:[M(i,{...a.options,parent:n}),ss(i.length)?o(gt,{className:"col-span-6",...a}):null]}),o(qi,{renderFoldableSection:({isUnfolded:e})=>c(Wi,{className:u(us),isUnfolded:e,children:[M(r,{...a.options,parent:n}),ss(r.length)?o(gt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:l})=>o(cs,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:ms[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:l})})]})},ps=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[gs(n,t),hs({...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[gs(n,t),rs({...l,blocksToRender:t})]});default:return null}})),gs=(e,t)=>e&&!t.length?o(Pr,{...e}):null,fs=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),xs=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(Ca,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),bs=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,fs(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(ys(l)).filter(Boolean))]}),n?o("div",{children:o(Si,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),ys=e=>([t,n])=>{const l=n?.type;return"array"===l?vs(t,e)(n):null},vs=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Ve,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(xs,{items:l,multiple:!n?.single,...t(e)})]},e)};function Ns(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const ws=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,ks=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>ws(t[e])||ws(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>ws(t[e])||ws(n[e])||Ss(t[e])<=Ss(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>ws(t[e])||ws(n[e])||Ss(t[e]?.min)>=Ss(n[e]?.min)&&Ss(t[e]?.min)<=Ss(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>ws(t[e])||ws(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>ws(t[e])||ws(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Ss=e=>Number(e||0),Cs=(e,{block:t,page:n,normalize:l=At})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=_t(e),d=r((()=>Ns(a,a.map((e=>mt(e.content,n?.fallback))))),[a,n?.fallback]),m=i===e?a:((e,t)=>(n=At)=>e?.filter((([,e])=>ks(t,n(e)||{}))).map((([e])=>e)))(d,i)(l);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},Ts={},Is={},Bs=ht((({className:e,filtrationSchema:t=Ts,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Cs(Is,{block:a.block,page:a.options?.page}),d=o(Nn,{className:"w-64",label:n?.title,options:Ps(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Ps(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(bs,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Si,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(ps,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Ps=e=>Ns(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Ms=(e=!1)=>e?"text-left":"text-center",Rs={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Vs=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:u("rounded-icon object-fit flex justify-center items-center",Rs[n],e),children:o(W,{...i,width:"54%",height:"54%",name:a})}):null})),Ds=d((({className:e="",title:t,benefitList:n,...l})=>{const a=ke();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(w,{headingType:"h3",as:"h2",className:Ms(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(zs)}):null]})})),zs=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(Vs,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ne,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(w,{headingType:"h6",children:e}),o(Ve,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Me,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),As=(e,t,n)=>{return o(is,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>c("div",{className:u("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(Ve,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(Ve,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},_s=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?As(e,0,t):null]}))),Os={start:"justify-start",center:"justify-center",end:"justify-end"},Fs=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&u("flex",Os[n]);return o(g,{className:u("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:je(e)})})),Es=d((({className:e,title:t,children:n,...l})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(w,{className:"text-center",title:t}):null,n]}))),js="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",Ls="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",$s="flex flex-col gap-y-xl min-w-52",Us=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(Ve,{size:"text-h3",children:"number"==typeof e?[l,qe(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),qs=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Ve,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(Us,{value:n,...a}):o(Ve,{size:"text-h3",children:"-"})]}))),Ws=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Hs=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Ve,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:qe(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Ys=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Ve,{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:"Выберите другую сумму или срок"})})]}))),Ks=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(Ys,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(Hs,{title:e,rate:t,unit:n,fractionDigits:l,color:i,...s})}),o(qs,{className:"@xl:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:i,...s}),r]}),Xs=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(ol,{items:e?[`От ${qe(1)(l.min||0)} ${n}`,`До ${qe(1)(l.max||0)} ${n}`]:[],step:t,...l}),Gs={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Js={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Zs=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=Gs.prefMonthsNum,prefTravelBonusRate:i=Gs.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||Js,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},Qs=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=_t({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=Zs(r,n);return o(Es,{className:e,title:t,...i,children:c("section",{className:u(js,e),children:[c("div",{className:Ls,children:[Xs({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Xs({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Ks({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:$s,children:[f>=0?o(qs,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,je(l,{isVertical:!0}),Ws(a)]})]})})})),eo=Math.round(29.5),to=(e,t=0)=>e?.sum?e.sum:t,no=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,lo=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,ao=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Ve,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Ve,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(Ja,{orientation:l,items:e,value:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),io=e=>ao({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),ro=" (c капитализацией)",so=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:$s,children:[o(qs,{title:`Доход в конце срока${i?ro:""}`,value:e,postfix:n,prefix:"+"}),o(qs,{title:`Сумма в конце срока${i?ro:""}`,value:t,postfix:n}),je(l,{isVertical:!0}),a?.map(Ws)]}),oo=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:co([e,t],l),co=([e,t],n=[])=>({[e]:n.length?Wr(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?Ur(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),mo=(e,[t,n],l)=>e>=l[t]&&e<=l[n],uo={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const ho={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},po=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?uo[e?.rateType]:"",{data:n}=Gn(t?`/api/v1/depositrates/${t}`:null,st);return Array.isArray(n)?n:[]}(t);if(n<=30)return{...ho,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&go(s,e)&&mo(l,["minSum","maxSum"],e)&&mo(n,["minDays","maxDays"],e)))||ho,{rate:m}=d,u=fo(m,e),h=l+u,p=c||[ho];return{...d,...co(["minSum","maxSum"],p),...co(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},go=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,fo=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},xo=ht((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=_t({moneyValue:to(r,1e5),daysValue:no(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=po(m,s),{income:g,finalSum:f,rate:x,isUnavailableByTerm:b,depositeName:y}=p;return o(Es,{className:e,title:t,...d,children:c("section",{className:u(js,e),children:[c("div",{className:Ls,children:[Xs({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(ol,{items:[`От ${lo(v.min||0)}`,`До ${lo(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[bo(p,h),io({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Ks({rate:x,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),so({income:g,finalSum:f,buttons:n,footnotes:[l,a]})]})});var v})),bo=(e,t)=>c("div",{className:"space-y-s",children:[o(Ve,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Kt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Kt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),yo=(e=[],t=!1)=>vo([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),vo=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},No=({min:e=0,max:t=0,availableMonths:n,...l})=>o(ol,{items:[`От ${wo(e)}`,`До ${wo(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),wo=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,ko=e=>ao({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),So=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(ll(t?.[a],n.minMonths,n.maxMonths))},Co=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},To={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Io=e=>Bo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Bo({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Bo({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Bo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Bo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Po=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[To],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Io({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=oo(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=oo(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>Io({row:e,userInputParams:t,paramsViewSettings:n})&&mo(l,["minSum","maxSum"],e)&&mo(a,["minMonths","maxMonths"],e)))||To)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:u}=m,h=Co(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:h}},Mo=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Ro={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Vo=ht((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(h=n?.rateRows,vo([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],h));var h;const[p,{field:g}]=_t({moneyValue:to(s,2e5),monthsValue:no(s,eo),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),f=Po(p,n,r),x=ko({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(ll(p.moneyValue,f.minSum,f.maxSum))}),[f.minSum,f.maxSum]),a((()=>{y&&y(ll(p.monthsValue,f.minMonths,f.maxMonths))}),[f.minMonths,f.maxMonths]),a((()=>{!Mo(s)&&m&&So({field:g,defParams:m,calcParams:f,map:Ro,monthsValue:"minMonths"})}),[n,s]),o(Es,{className:e,title:t,...d,children:c("section",{className:u(js,e),children:[c("div",{className:Ls,children:[Xs({title:"Сумма кредита, ₽",step:500,min:f.minSum,max:f.maxSum,...g("moneyValue"),value:f.moneyValue}),No({title:"Срок кредита, месяцев",min:f.minMonths,max:f.maxMonths,...g("monthsValue"),value:f.monthsValue}),Do({...f,...r},g),o("div",{className:"sm:hidden",children:x})]}),c("div",{className:u($s,"@4xl:w-1/2"),children:[o(qs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(qs,{title:"Ставка",value:f?.rate,fractionDigits:2,postfix:"%"}),o(qs,{title:"Ежемесячный платёж",value:f.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:x}),je(l,{isVertical:!0}),Ws(i)]})]})})})),Do=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Kt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Kt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Kt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Kt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),zo=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},Ao={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},_o=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?Eo(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Fo({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Fo({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Fo({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Fo({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,mo(l,["minSum","maxSum"],t),mo(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||Ao,{rate:u}=m,h=Oo(u,e),p=l+h,g=t||[Ao];return{...m,...co(["minSum","maxSum"],g),...co(["minMonths","maxMonths"],g),availableMonths:zo(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:h,finalSum:p}},Oo=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},Fo=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Eo=(e,t)=>e+Math.round((t-e)/2),jo=(e="rub")=>"rub"===e,Lo=(e,t)=>{const{minMonths:n,maxMonths:l}=co(["minMonths","maxMonths"],Wo(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:ll(a,n,l)}},$o=(e,t)=>{const{minSum:n,maxSum:l}=co(["minSum","maxSum"],Wo(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:ll(a,n,l)}},Uo=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),qo=e=>{const t=jo(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Wo=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},Ho=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?ao({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?ao({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),Yo(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?io({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},ao({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),Yo(e.isShowNewClient),e.isShowNewClient?o(Kt,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},Yo=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,Ko={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Xo={text:"₽",key:"rub"},Go=ht((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[Xo],g=i((e=>t=>e?{...t,...qo(t),...$o(t,e),...Lo(t,e),...Uo(t,e)}:t)(h),[h]),[f,{field:x}]=_t({moneyValue:to(d,2e4),monthsValue:no(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:Xo},{normalize:g}),b=x?.("currency")?.value??Xo,y=x?.("isNewClient")?.value,v=Wo(h,b),N=_o(f,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,T=i((()=>{So({field:x,defParams:yo(v,y),calcParams:N,monthsValue:"minMonths",map:Ko})}),[x,h]);a((()=>{!Mo(d)&&v&&T()}),[d,h]);const I=w===yo(v,y)?.rate;return o(Es,{className:e,title:t,...m,children:c("section",{className:u(js,e),children:[c("div",{className:Ls,children:[c("div",{className:"flex gap-m",children:[Xs({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:Jo(b?.key)}),h&&h?.length>1?o(Cn,{label:"Валюта",options:p,...x("currency")}):null]}),No({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),Ho({...N,...s},x)]}),Ks({rate:w,children:Qo(T,I)}),so({income:k,finalSum:S,buttons:[...l,Zo(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),Jo=(e="")=>jo(e)?1e3:100,Zo=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},Qo=(e,t=!1)=>t?null:o(Si,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),ec=e=>tc({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&tc({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),tc=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],nc={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},lc=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[nc],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>ec({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=oo(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=oo(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>ec({row:e,userInputParams:t,paramsViewSettings:n})&&mo(l+r,["minSum","maxSum"],e)&&mo(i,["minSumOld","maxSumOld"],e)&&mo(r,["minSumExtra","maxSumExtra"],e)&&mo(a,["minMonths","maxMonths"],e)))||nc)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=h,g=Co(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:f}},ac=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=_t({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=lc(s,n,i),h=ko({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Es,{className:e,title:t,...r,children:c("section",{className:u(js,e),children:[c("div",{className:Ls,children:[Xs({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Xs({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),No({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),ic({...m,...i},d),m.isExtraMoney?Xs({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})]}),c("div",{className:u($s,"@4xl:w-1/2"),children:[o(qs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(qs,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(qs,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(qs,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),je(l,{isVertical:!0}),Ws(a)]})]})})})),ic=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Kt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Kt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Kt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),rc=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=nl(e,{normalize:(e=a)=>n&&l?String(ll(Number(sc(e)),n,l)):sc(e),format:qe(r)}),d=i((e=>t&&t(sc(e))),[t]);return o(on,{onChange:d,...s,...c})})),sc=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),oc=d((e=>o(rc,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ve,{size:"text-xl",font:"font-light",children:"₽"})})}))),cc={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},dc={amount:1500},mc=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=_t(dc),[h,p]=l(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:u("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:cc[r],children:[o(oc,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(Si,{className:"w-full mt-lg",type:"submit",disabled:h,children:i.text}):null]})]})})),uc=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("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})]}),hc="relative h-full",pc={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},gc=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(bc),r=n?{defaultPadding:"p-6xl pb-m"}:{};return R({...l,renderProps:(n,l,a)=>c("div",{className:fc(n,{someCardsHighlighted:i}),children:[B(n,l,{className:xc(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),bc(n)?uc({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},fc=(e,{someCardsHighlighted:t})=>u(hc,t&&(bc(e)?"pt-3xl":"pt-3xl sm:pt-16")),xc=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>u(hc,"min-w-80",pc[l],t&&(bc(e)?"pt-3xl sm:pt-16":"pt-3xl"),Mr(n),n&&"h-full"),bc=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,yc=ht((({className:e,visibleItemCount:t=0,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(is,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?vc(s?.block?.blocks):[],hasBlur:!0,children:gc({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),vc=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Nc="z-10 border border-solid w-full h-full",wc=u(Nc,"absolute hidden @xl:block border-transparent"),kc=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:u(wc,"top-9 right-12 bg-green-dark")}),o("div",{className:u(wc,"top-6 right-8 bg-green")}),o("div",{className:u(wc,"top-3 right-4 bg-green-light")}),c("div",{className:u(Nc,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),je([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Sc={black:"bg-black",white:"bg-white"},Cc=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:u("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Te,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:je([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(Ve,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Tc)]}):null,a?c(Ve,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Tc=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Sc[e]}`},String(t)),Ic=d((({icon:e,...t})=>{const n=he(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:u("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),Bc=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?Pc(l):null]})}))),Pc=e=>o("div",{className:u("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(Ic,{...e},String(t))))}),Mc=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Rc=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=he()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...pe(a),children:i})})),Vc=[{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"}}],Dc=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>Vc.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ee(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),h=u("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},zc(a));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:je(m,{className:Ac(s??!1,a??!1,n),buttonClassName:h})}),r?o(Ve,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),zc=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",Ac=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),_c=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:u("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(Rc,{href:a,target:m,className:"h-full",data:Mc(v),children:c(Te,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Je(Ee(i)?o(ne,{image:i}):null,x),buttons:d.length?o(Dc,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Fe,{benefits:f}),s?o(Me,{__html:s,isDotted:r,itemSize:"list-s"}):null,Oc(l,p)]})})}))),Oc=(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,Fc=(e,t,n)=>{const[i,r]=l(n);return a((()=>e.subscribe(t,r)),[e,t]),i},Ec=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Ve,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(Ve,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:je(a)}):null]},String(t))},jc=d((e=>{const{cardCells:t=[],visibleCellsCount:n=1,isUnfolded:l}=e,[a,i]=n>0&&t.length>=n?[t.slice(0,n),t.slice(n)]:[t,[]];return i.length?c(Ui,{children:[c("div",{children:[a.map(Ec),o(Wi,{isUnfolded:l,children:i.map(Ec)})]}),o(Lc,{...e})]}):o("div",{children:a.map(Ec)})})),Lc=d((({isUnfolded:e,data:t,onToggle:n})=>c("button",{type:"button",className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",...e?pe(t):{},onClick:n,children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}))),$c=new ce,Uc=d((({className:e,title:t,align:n="text-center",icon:l,button:a,visibleCellsCount:r=1,cardCells:s=[],options:d,data:m,...h})=>{const{isUnfolded:p,parent:f}=Fc($c.observable,"fold",{}),x=p&&f===d?.parent,b=i((()=>$c.emitter.fire("fold",{isUnfolded:!x,parent:d?.parent})),[x,d?.parent]);return c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...h,children:[Ee(l)?o("div",{className:"self-center",children:o(ne,{image:l})}):null,t?o(w,{className:u("pt-xs",n),headingType:"h5",title:t}):null,a?.text?o(ye,{className:"w-full mt-m mb-lg",...a}):null,o(jc,{cardCells:s,visibleCellsCount:r,isUnfolded:x,data:m,onToggle:b})]})})),qc=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Wc=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),Hc=1e9,Yc={sum:{min:1e4,max:Hc},period:3},Kc=ht((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Cs(Yc,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:Xc(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),p=Gc(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(bs,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(oc,{label:l?.title,min:500,max:Hc,...d("sum",{parse:e=>({min:Number(e),max:Hc}),format:({min:e})=>String(e)})}),o(ol,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(ps,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Xc=e=>ot((e?.paramsSource?.rateRows||[]).filter(qc).flatMap((e=>Wc(e.minMonths,e.maxMonths)))),Gc=e=>ot(e.flatMap((e=>e||[])).filter(qc).flatMap((e=>Wc(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Jc=[{key:"10"},{key:"50"},{key:"100"}],Zc=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(Nn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:Jc,iconVersion:"black"})]})},Qc="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",ed=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:Qc,"aria-label":`Страница ${i}`,children:i},String(t)):null},td={width:"24",height:"24"},nd=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:ld(1===e),...td})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Qc,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(ed),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Qc,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:ld(e===n),...td})})]})},ld=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",ad=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(nd,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(Zc,{itemCount:l,onItemCountChange:a}):null]}),id=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:u("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:u("h-14 w-full px-10 text-l text-black box-border rounded-md",rn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),rd=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(id,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Vl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Vl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(Si,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),sd=(e,t)=>o(Vs,{...e,iconBgVersion:t,className:"shrink-0"}),od=({title:e,timestamp:t,publicId:n})=>{const l=he(),{href:a}=l({href:`/api/v1/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[sd({icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Ve,{size:"text-m","font-weight":"font-light",children:xt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)},cd="/api/v1/depository",dd={startDate:void 0,endDate:void 0,query:""},md=ht((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:h}]=_t(dd),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?xt(l,!0):"",r=a?xt(a,!0):"",s=new URLSearchParams(cd);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=Gn(cd+o,st);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(rd,{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-4 @lg:col-span-2 hidden @lg:block",children:o(Ve,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Ve,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(od,{...e},String(e.publicId)))):o(Pr,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(ad,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),ud=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,hd=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:ud(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(ye,{version:a?.version,text:a?.text,...a}):null]})));const pd="/api/v1/region",gd="location";function fd(e="Москва"){return a((()=>de.subscribe("location",bd)),[]),t=de.emitter,n="location",l=function(e){return async()=>{globalThis.localStorage?.hasItem(gd)||bd(await rt(pd));const t=globalThis.localStorage?.getItem(gd);try{return t&&JSON.parse(t)}catch(e){}return{name:e}}}(e),a((()=>{const e=l instanceof Function?l():l;e instanceof Promise?e.then((e=>t.subject(n,e)),console.warn):t.subject(n,e)}),[t,n]),i((e=>t.fire(n,e)),[t,n]);var t,n,l}function xd(e="Москва"){return Fc(de.observable,"location",{name:e})}function bd(e){e&&globalThis.localStorage?.setItem(gd,JSON.stringify(e))}var yd;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(yd||(yd={}));const vd=new Intl.NumberFormat("ru",{style:"currency",currency:yd.RUB}),Nd=e=>e?vd.format(e):"",wd="text-m font-light text-secondary-text ",kd=`${wd} text-left`,Sd=`${wd} pl-5xl text-center`,Cd=`${wd} pl-5xl text-right`,Td={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Id=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:kd,children:o(Ve,{size:"text-m",children:"Валюта"})}),o("th",{className:Sd,children:o(Ve,{size:"text-m",children:"Купить"})}),o("th",{className:Cd,children:o(Ve,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Bd)})]}))),Bd=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(ne,{image:{icon:Td[t]},width:"24",height:"24"}):null,o(Ve,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Ve,{size:"text-h6",children:Nd(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ve,{size:"text-h6",children:Nd(e?.buyExchangeRate)})})]},t)},Pd={icon:"GpsIcon"},Md=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Vs,{...Pd,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:"Курс указан для заданного офиса"})]})]}))),Rd=(e,t,n)=>{const l=Number(Vd(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},Vd=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Dd=e=>Pt([[e=>e.value!==yd.RUB&&e.oppositeValue!==yd.RUB,()=>e.handleConvert(e.value,yd.RUB)],[e=>e.value===yd.RUB&&e.oppositeValue===yd.RUB,()=>e.handleConvert(e.value,yd.USD)],[e=>e.value===yd.RUB&&e.oppositeValue===yd.RUB,()=>e.handleConvert(e.value,yd.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function zd(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(on,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(Nn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Ad=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||yd.RUB,selectBuy:n?.[0]?.currency?.currency||yd.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[zd({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:_d(r,d,n),value:r.inputSell,setValue:e=>Fd(d,n)(e,r.selectSell,r.selectBuy)}),zd({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Od(r,d,t),value:r.inputBuy,setValue:e=>Ed(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(ye,{text:a.text,version:a?.version,...a}):null]})})),_d=(e,t,n)=>l=>{t({selectSell:l}),Dd({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{Fd(t,n)(e.inputSell,l,a)}})},Od=(e,t,n)=>l=>{t({selectBuy:l}),Dd({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>Ed(t,n)(e.inputBuy,l,a)})},Fd=(e,t)=>(n,l,a)=>{e({inputSell:Vd(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(Rd(n,i,l===yd.RUB)||"")})},Ed=(e,t)=>(n,l,a)=>{e({inputBuy:Vd(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(Rd(n,i,l===yd.RUB)||"")})};const jd=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const a=function(e){const t=e?.code||"000",{data:n}=Gn(`/api/v1/exchangerates?regionCode=${t}`,st);return n||{}}(xd()),i=Ld(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:yd.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:yd.RUB}}),o(g,{className:u("box-border min-h-80",e),...l,children:o(Te,{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(Id,{className:"mb-xl",exchangeCurrencyItems:i}):null,o(Md,{address:a?.address})]}),o(Ad,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),Ld=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],$d=d((({className:e="",items:t})=>{const n=he();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(Ud(n))})})),Ud=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...pe(t),children:a||null})},String(l)):null},qd=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>o(os,{tag:"button",className:u("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:l,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[sd(a,t),e?o(Ve,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Wd=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Hd=(e=!1)=>e?"MinusIcon":"PlusIcon",Yd=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Kd=ht((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:l="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=ke();return o(g,{className:u("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(qi,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Wi,{className:u("gap-lg",Wd(m)),isUnfolded:e,children:R({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Xd({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),Xd=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?Yd(e):Hd(e))(a,r);return"accordion"===e?o(qd,{label:s,labelIcon:n,labelIconBgVersion:l,icon:c,onToggle:i}):o(cs,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Gd=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:Jd(e)}))),Jd=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(Kd,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o($d,{items:e.items}):null},String(t)))),Zd=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(Qd)}):null)),Qd=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Ve,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(em)})]},String(t)),em=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:tm(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),tm=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${nm(t)}`,children:o(Ve,{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})}},nm=e=>e.replaceAll(/\D/g,""),lm=d((({className:e="",index:t,text:n,...l})=>{const a=he(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:u("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),am=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Ve,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(lm,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),im=d((({className:e="",index:t,...n})=>{const l=he(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:u("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}`})})),rm=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Ve,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(im,{index:t,...e},String(t))))}):null]}))),sm=ht((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{};n.options?.page?.common;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:h,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Gd,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Zd,{items:r}),m?o(ye,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(Dc,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(ye,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(am,{title:d,links:i}),o(rm,{links:a,license:h})]})})),om=ht((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],h=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=n?.text?n.text:"Перейти";return o(g,{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(Cn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(ye,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:Mc(i,s?.key),children:f})}):null]})})})),cm={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},dm=d((({version:e,text:t,mobileText:n,...l})=>{const a=ke()?n:t;return a?o(ye,{className:u("py-s px-lg font-light whitespace-nowrap",cm["transparent"===e?"transparent":"default"]),...l,children:a}):null})),mm=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:l,version:a,backwardButton:r})=>{const s=V(),d="/"===s.pathname,{dataFooter:m,dataHeader:u,...h}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(ur,{className:"my-2xs",bgColor:e,logo:h,data:u,showTitle:!1})}):um(p,r),o(dm,{version:a,...l})]})})),um=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(W,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,hm={"bg-white":"primary",transparent:"transparent"},pm=ht((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=hm[e],portal:l,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=l||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:n,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(mm,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...i})})})})),gm=(e=!1)=>e?{}:{padding:"p-0"},fm={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},xm=ht((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=V();return o(g,{className:u("relative flex flex-col",fm[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:R({...c,extraProps:{className:u("w-full",Mr(r)),...gm(l)}})})}),{childrenTypes:[]}),bm=ht((e=>o(xm,{...e})),{childrenTypes:[]}),ym=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?u("flex",Os[n]):"";return o(g,{className:u(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:l})})})),vm=["байт","Кб","Мб","Гб","Тб","Пб"],Nm=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...pe(i),children:[e,t?c(Ve,{size:"text-l",font:"font-light",children:[t," ",wm(d,m),o(Ve,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),wm=(e,t)=>e||t?o("span",{children:", "}):"",km=(e,t)=>(n,l)=>{const a=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${vm[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Cm(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(Nm,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:Sm(t),data:n?.data}),o(Me,{__html:n?.__html})]},String(l))},Sm=e=>e?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,Cm=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},Tm=d((({href:e,__html:t,target:n})=>{const{close:l}=me(),a=V(),r=U(a)(e),s=i((()=>{l()}),[]);return c(Ti,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Me,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(ye,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o(Si,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Im=d((({text:e,href:t,target:n,__html:l,icon:a})=>{if(!e&&!l)return null;const r=(e=>{const{open:t,close:n}=me();return{open:(n={})=>t(o(Tm,{...e}),n),close:n}})({__html:l,href:t,target:n}),s=i((()=>r.open()),[r]);return c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[Sm(a),o(Ve,{font:"font-light",children:e})]})})),Bm={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Pm=ht((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=V();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Bm[r]),role:"list",children:a.map(Mm(d,i))}):null]})})),Mm=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?Rm(t)(n,l):km(e,t)(n,l)},Rm=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(Im,{...l,icon:e,href:Vm(t)?t?.href:t?.attachment?.src}),o(Me,{__html:t?.__html})]},String(n)):null},Vm=e=>"href"in e,Dm=ht((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:p="primary",...f})=>{const x="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Te,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:je(l,{className:"flex-wrap"}),children:[a?o(Ve,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:u("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Me,{__html:r,itemSize:"list-m"}):null,o(Ve,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:u("flex justify-center bg-white rounded-md @xl:-order-1",x),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),zm=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Am=(e=[],t={})=>e.filter((({content:e={}})=>ks(t,e))).length,_m=(e,t)=>e===t;const Om=(Fm=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(_m,((e=_m)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,n])=>Fm(n,t[e])))));var Fm;const Em=[],jm={},Lm={primary:"bg-white/30",secondary:"bg-main-divider"},$m={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Um=d((({count:e,version:t="secondary"})=>{const n=ke(),l=n?"bg-main-divider":Lm[t],a=$m[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Ve,{size:"text-xs",color:a,children:e})})})),qm=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:u("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:u("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},Wm={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Hm={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Ym={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Km={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Xm=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:h,...p}=t;return o(i,{className:u("h-12","block flex-1","cursor-pointer",Wm[l],n?Km[l]:Ym[l]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Hm[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[qm({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Um,{count:m,version:zm(n,l)})}):null]})})})),Gm=d((e=>o(e?.item?.href?Jm:Zm,{...e}))),Jm=d((e=>{const t=he(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(Xm,{...e,tag:"a",item:a,onClick:l})})),Zm=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(Xm,{item:e,onClick:l,...n})})),Qm=(e,t,n)=>(l,a)=>o(Gm,{isActive:l===e,onClick:t,type:n,item:l},String(a)),eu=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(Qm(l,a,t))}))),tu={categories:[],extraOptions:[],propertyType:[],stage:[]},nu=ht((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Cs(tu,{block:a.block,page:a.options?.page}),f=i(((e=tu)=>p(e)),[]),x=(({hotFilters:e=Em,filtrationState:t=jm,blocks:n=Em,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Om(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Am(n,t.filter),version:zm(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(eu,{...x}),o(bs,{filtrationSchema:n,resetButton:l,field:m,reset:h}),o(ps,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),lu=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),au=d((({children:e})=>lu?e:null)),iu="/icons/MapMarkerClusterIcon.svg",ru="/icons/MapMarkerClusterYellowIcon.svg";function su({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=ou("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=ou("workplaces",e,a),r=cu(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=cu(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=cu(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const ou=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?iu:ru,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),cu=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?iu:ru,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),du={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},mu={...du,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},uu=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(mu).join(" ")} ${n}`,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"})}),hu=e=>globalThis[e];function pu(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=hu(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(hu(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(hu(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}const gu={...du,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},fu=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(gu).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),xu=[55.753995,37.614069],bu=d((({points:e,className:t="",zoom:n=5,isLoad:l})=>{const i=s(null),r=pu("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{i.current?su({yandexMaps:r,map:i.current,points:e,isLoad:l}):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:yu(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),su({yandexMaps:r,map:i.current,points:e,isLoad:l})}))}),[r,e,n,l]),!r)return null;const d="z-10";return c("div",{id:"map",className:u("relative","w-full",t),children:[l?o(gr,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(fu,{yandexMaps:i}),o(fu,{yandexMaps:i,direction:"out"})]}),uu(i,r,u("right-2 top-80",d))]})})),yu=e=>{const t=[Nu(vu(e,0)),Nu(vu(e,1))];return t.every((e=>e))?t:xu},vu=(e,t)=>e.map((e=>e.coords?.[t])),Nu=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,wu={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},ku={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Su={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)},Cu=(e,t,n)=>{const l=zm("all"===t),a=zm("business"===t),i=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?r(l):l;return n(t),a},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(Si,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(Si,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Tu=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Me,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Ve,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Iu="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Bu=({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(Kt,{text:a[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(qi,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Iu,children:s}),o(Wi,{className:Iu,isUnfolded:e,children:d})]}),renderFoldButton:Pu(n,l)})}):null})},Pu=(e,t=!1)=>({isUnfolded:n,onToggle:l})=>c("div",{className:"flex space-x-lg",children:[t?o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:l}):null,o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:Mu()})]}),Mu=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),Ru=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Ve,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Vu=()=>{},Du=e=>"all"===e?"block":"hidden",zu=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=Vu,renderRemoteWorkplaceCard:s=Vu,getBalloon:d=Vu,getBalloonRemoteWorkplaces:m=Vu,descriptionData:h,title:p})=>{const g=p?.includes("Офис"),[f,{field:x,reset:b}]=_t(wu),[y,v,N,w]=r((()=>{const e=Au(t,f),n=Au(a,f),l=[...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,l,n,e.length+n?.length]}),[t,a,f]),[k,S]=l("all"),C={filters:_u([...t,...a]),field:{field:x,reset:b},onlyOffice:g,labels:ku};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Ru(p,w),h?Tu(h):null,g&&Cu(t,k,S),o("div",{className:u("pb-3xl",Du(k)),children:Bu(C)})]}),o("div",{className:"h-[600px]",children:o(au,{children:o(bu,{points:v,isLoad:n,className:"h-full"})})})]}),c(au,{children:[y.map(i),N.map(s)]})]})})),Au=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Su[t](e)))))},_u=e=>Object.keys(wu).filter((t=>e.filter((e=>Su[t](e))).length)),Ou={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"}},Fu=d((({className:e,children:t,color:n="gray"})=>c("div",{className:u("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Ou[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Ve,{size:"text-m",color:Ou[n].text,children:t})]}))),Eu=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:ju({textItems:i,subText:t,children:n,isPhone:l,...a})})),ju=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Ve,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Lu(n,s),a?o(Ve,{color:l,size:"text-m",children:a}):null]}),Lu=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Ve,{size:"text-l",children:t?o("a",{href:`tel:${$u(e)}`,children:e.trim()}):e.trim()},String(n)))),$u=e=>e.replace(/\D/g,""),Uu=d((({className:e,children:t})=>o("div",{className:u("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}))),qu=["ArrowDownIcon","ArrowUpIcon"],Wu=["Подробнее","Скрыть"],Hu=({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:Wu[Number(e)]}),o(W,{className:"text-primary-text",name:qu[Number(e)],width:"16",height:"16"})]}),Yu=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Gu(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ve,{size:"text-h4",children:Gu(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ve,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Fu,{color:"green",children:Gu(s)})})]}),o("div",{className:"hidden sm:block",children:o(Uu,{className:"flex-wrap",children:m?.map(Xu)})}),o(qi,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Wi,{isUnfolded:e,children:o(Uu,{className:"flex-wrap",children:m?.map(Xu)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Hu({isUnfolded:e,onToggle:t})})]},String(d))},Ku=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Gu(t)} №${n}`,body:e.toUpperCase()}),Xu=(e,t)=>o(Eu,{...e},String(t)),Gu=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Ju=[];const Zu=async e=>{const t=await rt(e,{method:"GET"});return Array.isArray(t)?t:Ju},Qu={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},eh={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)},th=d((({descriptionData:e,className:t})=>{const n=xd(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=Gn(`/api/v1/atms?regionCode=${e}`,Zu);return{data:t||Ju,isLoad:!t&&!n}}(l);return o(zu,{className:t,filterItems:nh,data:a,isLoad:i,initFilterState:Qu,renderCard:Yu,getBalloon:Ku,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),nh=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>eh[t](e))),n=!l.length||l.some((t=>eh[t](e)));return t&&n}))},lh=e=>{const t=ih(e);return o(Eu,{label:"Режим работы",value:t,className:"max-w-none"})},ah=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",ih=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[ah({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),ah({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},rh=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],sh=e=>rh.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),oh=e=>{if(!e)return null;const t=ch(e);return c(Uu,{className:"border-none",children:[o(Eu,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(dh)})}),o(Eu,{label:"Режим работы",className:"max-w-none",children:o(Ve,{children:e})})]})},ch=e=>{const t=rh.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},dh=({short:e,status:t},n)=>o("div",{className:u("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(Ve,{size:"text-xs",children:e})},String(n)),mh=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Eu,{label:"Валюта",value:e.currency}):null,t?o(Eu,{label:"Купить",value:String(t)}):null,n?o(Eu,{label:"Продать",value:String(n)}):null]},String(l)),uh=(new Date).getDay(),hh=e=>{const[t]=e?.slice(uh-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Fu,{color:"green",children:a}):null,n&&i?o(Fu,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Fu,{color:"red",children:"Выходной"})},ph=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",gh=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(Eu,{label:e,value:t&&n?n:"",subText:ph({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),fh=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,xh=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,bh=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,yh=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=sh(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(Ve,{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(Ve,{size:"text-l",children:t})]}):null]}),hh(h)]}),o("div",{className:"hidden sm:block",children:vh({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(qi,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Wi,{isUnfolded:e,children:vh({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Hu({isUnfolded:e,onToggle:t})})]},String(u))},vh=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=sh(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Uu,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Eu,{label:"Факс",value:t,isPhone:!0}),o(Eu,{label:"Телефон филиала",value:e,isPhone:!0}),o(Eu,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Eu,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(Eu,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Eu,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(Uu,{children:o(Eu,{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(gh)})})}):c(Uu,{children:[o(Eu,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(dh)})}),lh(d)]}),r?.businessScheduleVisibleTag?oh(r?.businessScheduleDescription):null,s?.currencies?.length?o(Uu,{className:"flex-wrap",children:s?.currencies?.map(mh)}):null]})},Nh=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=sh(e),n=e?ih(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?fh(n):bh(n,l):xh(n):null})(n)}`;return{header:l,body:i}},wh=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Ve,{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(Ve,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:kh({workScheduleDescription:t})}),o(qi,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Wi,{isUnfolded:e,children:kh({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Hu({isUnfolded:e,onToggle:t})})]},String(n)):null,kh=({workScheduleDescription:e})=>c("div",{children:[c(Uu,{className:"flex",children:[o(Eu,{label:"Операции для физических лиц",children:o(Ve,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Eu,{label:"Операции для физических лиц",children:o(Ve,{children:"Оформление и обслуживание банковских карт"})}),o(Eu,{label:"Операции для физических лиц",children:o(Ve,{children:"Инвестиционное и накопительное страхование"})}),o(Eu,{label:"Операции для физических лиц",children:o(Ve,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Eu,{label:"Режим работы",className:"max-w-none",children:o(Ve,{children:e})})]}),Sh=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Ch={branches:[],remoteWorkplaces:[]};const Th=async e=>await rt(e,{method:"GET"})||Ch,Ih=d((({className:e})=>{const t=xd(),n=t?.code??"000",{data:l,isLoad:a}=function(e){const{data:t,error:n}=Gn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,Th);return{data:t||Ch,isLoad:!t&&!n}}(n);return o(zu,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:yh,renderRemoteWorkplaceCard:wh,getBalloon:Nh,getBalloonRemoteWorkplaces:Sh,title:`Офисы филиала ${t?.name}`})})),Bh=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===l?o(Ih,{}):o(th,{descriptionData:e})})})),Ph=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:u("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),Mh=d((({className:e,padding:t,slides:n=[],...l})=>o(g,{className:u("overflow-hidden relative",e),padding:t,...l,children:o(is,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Ge,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),Rh=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",a),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ee(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Vh({__html:i,richVersion:r}):null,Dh({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Dh({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Dh({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?je([l]):null]})]}))),Vh=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Me,{...e,itemSize:"list-s"})}),Dh=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(W,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Ve,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ve,{size:"text-xl",color:l,children:t})]})]}):null,zh=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Me,{__html:t,richVersion:n})})})),Ah=d((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:u(rn.split(" ").filter((e=>"rounded"!==e)),Ht,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Ve,{color:"text-primary-text",children:t}):null]})}))),_h=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(Ah,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Ah,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Oh=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(Nn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),Fh=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Oh,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Oh,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Eh=["От 1 дня","До 365 дней"],jh=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ve,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(ol,{min:1,max:365,value:e,items:Eh,onChange:t})]}))),Lh=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Oh,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Oh,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),$h=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Fh,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:Uh(m)}),o(jh,{days:a,setDays:e=>m({days:e})}),o(Lh,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:qh(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ve,{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(_h,{}),o(ye,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),Uh=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},qh=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Wh=d((({days:e,tariffs:t=[]})=>{const n=Yh(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Hh("Аренда за",e),Hh("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{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:l})})]})]})})),Hh=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ve,{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})]}),Yh=(e,t)=>{const n=Kh(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},Kh=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},Xh=(e,t)=>e.find((e=>e.branchCode===t)),Gh=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=Xh(l,n.selectedBranch),d=Jh(s?.safeBoxCaseVolumes),m=Zh(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=Qh(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o($h,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Wh,{days:n.days,tariffs:u})]})})),Jh=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Zh=(e,t)=>e?.find((e=>e.volume===t)),Qh=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,ep=[];const tp=async e=>await rt(e,{method:"GET"})||ep,np=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,u]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=Na(),p=lp(m.selectedRegion,h),f=function(e){const{data:t}=Gn(e?`/api/v1/safeboxes?regionCode=${e}`:null,tp);return t||ep}(p),x=i((e=>u((t=>({...t,...e})))),[u]),b=(y=Xh(f,m.selectedBranch)||f,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Gh,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(bu,{points:b,className:"h-[640px]"}):null]})})),lp=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,ap={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"},ip=(e,t,n)=>(l,a)=>{const{button:i}=l;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:rp(e,n)(l,a)}),c("div",{className:u("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[sp(l),i?.text?o(ye,{className:"box-border py-s w-full max-w-60 mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},rp=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=op(e,i),s=i?"transparent"===t:t;return o(g,{className:u("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:cp({step:n,iconVersion:a,i:l,stepVersion:t})})})},sp=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:u("text-s font-light text-left",ap.description),children:e.description}):null,o(Me,{__html:e.__html})]}),op=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",cp=({step:e,iconVersion:t,i:n,stepVersion:l})=>{return Ee(e?.icon)?o(ne,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:u("text-h4","transparent"===l?ap.iconText:(a=l,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var a},dp=d((({className:e="",title:t,description:n,steps:l=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=l.length>3;return c(g,{className:u("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:l.map(ip(d,r,i))}):null,je(a,{isVertical:!0})]})})),mp=d((({isActive:e,item:t,onClick:n})=>c("div",{className:u(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(W,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),up=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=me(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:u("relative min-h-full bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(Ci,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),hp=({menuRef:e,dialogRef:t,closeDialog:n,openDialog:l,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();l(o(up,{onClick:e=>e.stopPropagation(),onClose:n,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:c[r].description||c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];function pp(e){throw new Error(e)}const gp=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(n),o()}),[n,e]),d=i((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return a((()=>de.observable.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:pp(e)}}))),[c,d]),n},fp=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const xp=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(Ve,{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(bp,{...e},String(t))))})]}):null,bp=d((({icon:e,...t})=>{const n=he(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Ve,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),yp=(e,t)=>n=>n.name?o(Rc,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Mc(e,n.name),children:o(Ve,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,vp=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:u(rn,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Np=d((({defaultLocation:e})=>{const t=xd(e),n=he(),{href:l}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Rc,{href:l,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),wp=d((({foreignOffices:e,branches:t})=>{const n=fd(t?.default),[a,s]=l(""),d=Na(),m=r((()=>Sp(d).sort(((e,t)=>(e.name??"").localeCompare(t.name??"")))),[d]),u=r((()=>((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(m,kp)),[m]),{close:h}=me(),p=i((e=>{n(e),h()}),[]);return c(Ti,{className:"pb-20",head:c("div",{children:[o(Ve,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Np,{defaultLocation:t?.default}),o(vp,{onSearch:s,searchTerm:a})]}),children:[a&&a.length>=3?o("div",{children:m.filter((({name:e})=>e&&fp(e.toLowerCase())(a.toLowerCase())>=.8)).map(yp(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((g=p,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ve,{size:"text-h6",children:e})}),t.map(yp(f,g))]},e)))}),xp(e)]});var g,f})),kp=e=>e.name?.charAt(0)??"",Sp=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),Cp=d((({menuRef:e,menuItem:t,locationDialogProps:n,closeAll:l})=>{const i=(e=>{const{open:t,close:n}=me();return{open:(n={})=>t(o(wp,{...e}),n),close:n}})(n||{}),{name:r}=xd(),s=e?.current?.getBoundingClientRect(),c=G(X.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open(),"reload"===e.data.type&&l(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(up,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),Tp="burgerMenuDialog",Ip=({menuRef:e,centralMenuItem:t,closeAll:n,openDialog:l,locationDialogProps:a})=>{const i=gp(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Tp,i);return[r,{toggle:()=>{r?n():l(o(Cp,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:n}),{id:Tp})}}]},Bp=[],Pp=ht((({sticky:e,...t})=>{const{menuItems:n=Bp}=e??{},a=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),u=r.slice(d),[h,p]=l(-1),[f,x]=l(""),{open:b,closeAll:y}=me(),v=i((()=>{p(-1),x(""),y()}),[y]),N=nn(v),w=s(null),[k,{toggle:S}]=Ip({menuRef:w,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.header}),[{openBottomMenuItemDialog:C}]=hp({menuRef:w,dialogRef:N,closeDialog:v,openDialog:b,leftItems:m,rightItems:u}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{x(t),p(e),y(),C(e,t)}),[y,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:w,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(Mp(I,"left",{activeIndex:h,currentItemPosition:f})),o(mp,{item:a,isActive:k,onClick:e=>T(e)}),u.map(Mp(I,"right",{activeIndex:h,currentItemPosition:f}))]})})})),Mp=(e,t,n)=>(l,a,i)=>o(mp,{item:l,isActive:i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t,onClick:r=>{i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t||r.stopPropagation(),e(a,t)}},l.title||String(a)),Rp="hidden sm:flex absolute z-40",Vp={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Dp=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=Kr({itemCount:t?.length||0});return a((()=>zp(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(Ar,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Vp[i].item,gap:Vp[i].gap,children:t.map(Qm(n,l,i))}),s.canScrollLeft?o(Qr,{className:u("left-6",Rp,Vp[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(es,{className:u("right-6",Rp,Vp[i].buttonTop),onClick:s.scrollRight}):null]})})),zp=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},Ap={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},_p=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(Ap[t].wrapper,e),children:o(Dp,{className:Ap[t].component,tabsType:t,...n})}):null,Op=ht((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=Fp(n??{}),p=V(),f=t.every((e=>"link"===e?.type)),x=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(Lp(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[h]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[h])):w;v(-1===e?0:e)}),[b,w,h]);const k=jp(x[y],y),S=i((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(h,e?.tabName??String(t)):n.delete(h),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:u({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[_p({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Ep(t,x),activeItem:N,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>M(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(jp)?.filter(Boolean)||[]}),Fp=({__id:e,anchor:t})=>t??e??"tabs",Ep=(e,t)=>t?.length?t:e,jp=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Lp=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),$p={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Up=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:$p[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),qp=d((({className:e="",isOpen:t,onClick:n})=>o(ye,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),Wp={Buttons:({buttons:e})=>je(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Me,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Ve,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Ve,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(qp,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},Hp=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return Yp({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Yp=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in Wp))return null;return o(Wp[n],{...t,...l})},Kp=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Hp,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Xp=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),Gp=(e,t)=>e?.length>0?o("div",{className:u("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Ve,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Jp=d((({rows:e})=>{return o(Ar,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=u("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Ve,{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(-${Xp(a,t)}px)`},children:a?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ve,{size:"text-xl",children:e.data}):null,e?.cols?Gp(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),Zp=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Ve,{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(Jp,{rows:t.rowsData})})})]},l)}))}))),Qp=(e=!1)=>""+(e?"text-white":"text-secondary-text"),eg=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:u("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(Ve,{size:"text-xl",font:"font-light",color:Qp(t===n),children:e||t+1})},e)))}):null,t?o(ye,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),tg=ht((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],u=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(eg,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Zp,{activeTabIndex:r,items:m}),o(qp,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ve,{size:"text-h6",children:"Данных нет"}),o(qp,{onClick:n,isOpen:!0})]})})),ng=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:u("@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(tg,{...t,onClick:n})}):null]}))),lg=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[h,p]=l(void 0),g=i((e=>p(e)),[]);return c(ng,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:u("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Ve,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Up,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Kp,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function ag({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?c("div",{children:[n?o(Zr,{className:u("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?o(Zr,{className:u("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const ig=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,ag({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),rg=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],h=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[f,x]=((e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:p,visibleItemCount:2}),b=(h||[]).map(((e,t)=>o(lg,{row:e,activeIndex:f,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?o(qi,{renderFoldableSection:({isUnfolded:e})=>c(ig,{controls:x,children:[y,o(Wi,{isUnfolded:e,children:v})]}),renderFoldButton:ds}):o(ig,{controls:x,children:b})})]})})),sg=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:u("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?og():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ve,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?cg(n):null,a?o(Me,{richVersion:i,__html:a}):null]})]}))),og=()=>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"}),cg=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),dg=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Ve,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Ve,{size:"text-h2",children:n})}):null]}))),mg=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(dg,{prefix:t,unit:n,suffix:l})})})),ug={AdTile:gt,ApplicationForm:Fi,ApplicationLeadForm:Tr,BankAccountFiltration:Bs,BenefitsBlock:Ds,BonusBenefitsBlock:_s,ButtonsBlock:Fs,CalculatorBonus:Qs,CalculatorBusinessDeposit:xo,CalculatorCredit:Vo,CalculatorDeposit:Go,CalculatorRefinancing:ac,CardTransfer:mc,Carousel:yc,CarouselCard:kc,CarouselCatalogCard:Cc,CarouselLinks:Bc,CarouselRecommendationCard:_c,CarouselTariffsCard:Uc,DepositFiltration:Kc,Depository:md,ErrorBlock:hd,ExchangeRateTile:jd,Footer:sm,GrantSupport:om,Header:pm,Headline:C,HorizontalLayout:bm,ImgBlock:ym,LinkDocs:Pm,MobileAppTile:Dm,MortgageFiltration:nu,OfficesAtmsMap:Bh,Placeholder:Ph,ProductBlock:pt,ProductGallery:Mh,RepresentativeOfficeInfo:Rh,RichTextBlock:zh,RollupItem:Kd,SafeDepositRental:np,StepsBlock:dp,StickyBottomMenu:Pp,TabsLayout:Op,TariffsTable:rg,TextBlock:sg,UnitBlock:mg,VerticalLayout:xm},hg=ue((()=>{a((()=>{Tt()}),[]);const e=zt();tn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");St({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const pg="cookie",gg=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=en();!function(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(pg)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(pg,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Me,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Ci,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null})),fg=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=gp({onCloseAll:e,onClose:t}),{close:l}=me(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return tn(globalThis.document,"keydown",r),a((()=>{n.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"))}),[n]),n.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},l)=>o("div",{className:u("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==n.length-1}),children:e},String(t||l))))}):null})),xg=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);a((()=>de.observable.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:pp(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return tn(globalThis.document,"keydown",r),e?o("div",{className:u("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})),bg="header",yg="footer",vg="sticky-footer",Ng={},wg=d((({className:e,data:t=Ng,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=ut(s,r);hg();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:u("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:M(a?.header,{...m,slotName:bg})}):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"}}),M(a?.footer,{...m,slotName:yg})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.["sticky-footer"],{...m,slotName:vg})}):null,o(fg,{}),o(xg,{}),o(gg,{__html:d?.cookieContent?.__html})]})}));Object.assign(wg,{childrenTypes:[],slots:()=>[bg,yg,vg]});e.Blocks=ug,e.ContentPage=wg,e.handlerDecorator=ue,e.joinList=fs,e.packageVersion="0.14.595",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=j,e.useRouter=V,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:u("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=v[n]||"h3";return o(i,{role:"heading",className:u("font-sans m-0",N[t],e),children:l||a})})),k=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=S[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(w,{className:u("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:l}):null,a?o(k,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...p,children:a}):null]})})),T=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function B(e,t,{className:n,...l}={}){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:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const P=[],M=(e,{key:t,ancestors:n=P,slotName:l=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||P,[r.parent,l]]:n},a)))};function R({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?M(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function D(){return D._impl()}D._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),D.setup=e=>{D._impl=e};const V=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return V.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),A=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),F=e=>Boolean(e?.startsWith("#")),O=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),E=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var j=Object.freeze({__proto__:null,isURL:A,isLocalURL:_,isHash:F,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:O,hasPrefix:E});const L="/api/",$=`${L}v1/storage`,U=e=>(t,n)=>{if([!t,A(t),F(t),[z.CDN,L].some((e=>E(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`${$}/${t}/attachment`;const l=t?.startsWith("/");return O(E(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},q={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const d=D(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,h=U(d)(O(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(K,{className:e,children:c("svg",{className:u(Y(r),q[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:h,xlinkHref:h})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},Y=e=>e?"":"w-full h-full",K=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),X=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.filter(Boolean).join("/")}`}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!A(t)?U(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const l=D();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:J(l)(e),type:te(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(l)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:u("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,ne=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(Q,{className:e,imageClassName:n,image:t}):null)),le={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},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:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" ");class ce{subscribersMap={};subjectsStateMap={};emitter=this;observable=this;subscribe(e,t){return this.subscribersMap[e]||=[],this.subscribersMap[e]?.push(t),this.fireSubscribers([t],this.subjectsStateMap[e]),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){const n=this.subscribersMap[e]?.indexOf(t);n&&-1!==n&&this.subscribersMap[e]?.splice(n,1)}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(this.subscribersMap[e],t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t,this.fireSubscribers(this.subscribersMap[e],t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){if(e&&t)for(const n of e)n(t)}}const de=new ce,me=()=>({open:(e,t={})=>de.emitter.fire("dialog",{type:"open",dialog:e,...t}),close:()=>de.emitter.fire("dialog",{type:"close"}),closeAll:()=>de.emitter.fire("dialog",{type:"close",all:!0})}),ue=e=>ue._impl(e);function he(){const e=G(X.SITE_URL),t=D(),{closeAll:n}=me();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:ue(l({...e,href:n}))}};function l({href:l,target:a,onClick:i}){return r=>{i&&i(r);const s=!E(l,e||"/");l&&!s&&_(l,a)&&(n(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(l,e)))}}}ue._impl=e=>e,ue.setup=e=>{ue._impl=e};const pe=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},ge=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=xe(e)&&"hidden lg:block";return c("div",{className:u(fe(e),"flex gap-xs"),children:[l?o("div",{className:u(r,se[i]),children:l}):null,xe(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:u(r,se[i]),children:a}):null]})})),fe=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return u("group/btn items-center justify-center",xe(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},xe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),be=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ye=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:l}),s=he()({onClick:r,href:l,...a}),c=t??o(ge,{...s});return o(e?Ne:ve,{...s,children:c})})),ve=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:u})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...pe(d),children:m}))),Ne=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:be({className:e,rounded:l,version:n}),children:a})));function we({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:u(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(ye,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const ke=()=>{const[e,t]=l(true);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",n)}}),[]),e},Se={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Ce=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&Se[n],t),children:e}):null,Te=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=ke(),v=D(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=f&&!y;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&we({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Ce(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[h,x]}),Be(R({...b,extraProps:{className:"@container-normal"}})),Ce(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Ie(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Ie=e=>u(e?"row-span-2":"@xl:row-span-2"),Be=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Pe=(e,t="normal")=>e?.icon||e?.src?o("div",{className:u("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Me=d((e=>{const{__html:t="",richVersion:n="",itemSize:l="list-m",isDotted:a=!0}=e,i=a?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(n,l,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Re=(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,De=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),Ve=(e,t)=>e?o(De,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,ze=(e,t)=>["label"in e?Ve(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Re(e.description,t)},String(t)):null,"__html"in e?o(Me,{...e},`rte-${t}`):null],Ae=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:u("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Pe(n.icon,t):null,o("div",{children:ze(n)})]}))),_e=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:u("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(Ae,{benefitsVersion:t,...e},String(n))))}):null)),Fe=d((({className:e,benefits:t})=>t?.length?o("div",{className:u("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(ze)}):null)),Oe=d((({isTabularBenefits:e,...t})=>o(e?Fe:_e,{...t}))),Ee=e=>Boolean(e?.src||e?.icon),je=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(Le(n))}):null,Le=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=$e(a,r),d=$e(i,r);return l||a?.icon?o(ye,{className:u("basis-full @lg:basis-auto",e),appendLeft:Ue({...a,iconVersion:c}),appendRight:Ue({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},$e=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Ue=e=>Ee(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),qe=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),We=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(He)}):null)),He=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(De,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[qe(2)(t)," ",n||"₽"]}):null]},String(l)),Ye=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ke)}):null)),Ke=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(De,{size:"text-m",font:"font-light",children:e})},String(t)),Xe={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Ge=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],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(ne,{image:y}):null,P=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Te,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Je(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:je(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?o(Oe,{benefitsVersion:s,isTabularBenefits:d,benefits:M}):null,h?o(Me,{richVersion:p,__html:h,isDotted:m,itemSize:Xe[i]}):null,T,f?.length?o(We,{priceList:f}):null,Ze(x)]})})})),Je=(e,t)=>t?{rightImage:e}:{leftImage:e},Ze=e=>e?.length?o(Ye,{tags:e}):null,Qe=e=>Boolean(e&&Array.isArray(e)),et=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),tt=(e,t)=>{return n=e,Boolean(et(n)&&"string"==typeof n.$ref)?t.ref(e):et(e)?t.record(e):Qe(e)?t.array(e):t.scalar?t.scalar(e):e;var n},nt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(lt,e),lt=(e,t)=>e&&t?et(e)?e[t]:Qe(e)?e[parseInt(t,10)]:e:e,at=(e,t)=>tt(e,{ref:({$ref:e,...n})=>at(e?nt(t(e),e):n,t),record:e=>Object.entries(e).map((([e,n])=>({[e]:at(n,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>at(e,t)))}),it=(e,t,n=[])=>{tt(e,{ref:e=>t(e.$ref,n),record:e=>{for(const l in e)it(e[l],t,[...n,l])},array:e=>{for(let l=0;l<e.length;l++)it(e[l],t,[...n,l])}})};async function rt(e,t){try{return e?await st(e,t):null}catch(e){console.error(e)}return null}const st=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),ot=e=>[...new Set(e)],ct={},dt=["/portal-resources"],mt=(e,t)=>at(e,(e=>t?.[e])),ut=(e,t)=>{const n=(e=>{const t=[];return it(e,(e=>t.push(e))),t})(e),[i,r]=l({});return a((()=>{n.length&&(async e=>Object.fromEntries((await Promise.allSettled(ot(e).filter((e=>!dt.some((t=>e.startsWith(t))))).map((async e=>[e,ct[e]||=await st(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(n).then(r)}),[n.join()]),n.length?mt(e,{...t,...i}):e};function ht(e,t={}){const n=d((t=>{const n=ut((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const pt=ht((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(Ge,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),gt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>ft(0,t?.length)),[t]),l=t?.[n];return l?o(pt,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(f,{})})})),ft=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),xt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},bt=e=>e?.replace(/[^+\d]/g,"");const yt=e=>e?{phone:bt(e)}:{},vt=(e,t="birthday")=>e?{[t]:xt(e)}:{},Nt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),wt=(e,t=!0)=>({[t?"email":"mail"]:e}),kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:bt(e)}:{},St=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e)t[l??""]?.(n,a)},Ct="rshb-query-params";function Tt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Ct)||"";return e&&globalThis.sessionStorage?.setItem(Ct,e),e}function It(e){if(!e)throw new Error("Value should be fulfilled");return e}const Bt=e=>t=>{const[,n]=It(e.find((([e])=>e(t))));return n(t)},Pt=e=>Bt(e.map((([e,t])=>[e,()=>t])));Pt.if=e=>new Mt(void 0,e);class Mt{parent;predicate;unit;get entry(){return[It(this.predicate),It(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Mt(this,e)}then(e){return new Mt(this.parent,this.predicate,e)}else(e){return Bt([...Rt(this),[()=>!0,e]])}}const Rt=e=>[...e?.parent?Rt(e.parent):[],e.entry],Dt=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=Tt();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;if(n){Vt(t?.target)?.(n)}}},Vt=Pt([[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 zt(){return zt._impl()}zt._impl=()=>({forwardQuery:Dt}),zt.setup=e=>{zt._impl=e};const At=e=>e,_t=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=l(e),c=i(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return Ft(t,n)?t:n}:r(e)):o,[r]);a((()=>{r&&o(r)}),[r]);const[d,m]=l(!1),[u,h]=l({}),p=i(((e,t)=>{const{parse:n=At,format:l=At}=t||{};return{value:l(s[e]),isDirty:d||u[e],onChange:t=>{c((l=>({...l,[e]:n(t)}))),h((t=>({...t,[e]:!0})))}}}),[c,d,u]),g=i((e=>{c(e),h(e)}),[]),f=i((()=>{c(e),m(!1),h({})}),[e]),x=i((e=>{e.preventDefault(),t?f():m(!0),n&&n(s,e)}),[n,s]);return[s,{isDirty:d||Object.values(u).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},Ft=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),Ot=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})})),Et=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],jt=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Lt=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],$t="/api/v1/outservice/outserviceregions",Ut=e=>"OUTSERVICE"===e?$t:void 0,qt=e=>o("div",{className:"h-6",children:e?o(De,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Wt=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Ht="appearance-none w-5 h-5 border-solid flex-none",Yt=[{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"}],Kt=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Wt,{paths:Yt,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:u("flex items-center relative group/box",Gt(l)),onClick:s,children:[o("div",{className:u(Ht,"m-0",a?"rounded-full border-2":Zt(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Jt(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,Xt(n)]})})})),Xt=e=>e?o("div",{className:"ml-s",children:o(De,{size:"text-l",font:"font-light",children:e})}):null,Gt=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Jt=(e=!1)=>e?"radio":"checkbox",Zt=(e=!1)=>u("rounded border",{"bg-primary-main":e}),Qt=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(Kt,{text:t,value:n,disabled:a,onChange:r},l),qt(i)]})));function en(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}function tn(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function nn(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return tn(globalThis.document,"click",n),t}const ln=({label:e,errors:t})=>e&&t?`${e}*`:e,an=()=>{},rn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",sn=e=>e?o(De,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,on=d((({key:e,className:t="",id:n,name:l,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1,disabled:w=!1})=>{const k=s(null),S=i((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);a((()=>{v&&k.current?.focus()}),[v,k]);const C=g?"pr-3xl":"",T=cn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[sn(d),N?o("textarea",{className:u("block resize-y min-h-24",dn,T),id:u("textarea",n),name:l||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,disabled:w},e):o("input",{type:r,className:u("h-14",dn,C,T),ref:k,id:n,name:l||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,pattern:y,disabled:w},e)]}),g]})})),cn=e=>e?rn:"border-error",dn="w-full border rounded-md text-primary-text outline-none p-m",mn=e=>e?.value||"",un={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"},dulSubdivisionCode:{url:"suggest/fms_unit",responseItemHandler:e=>e?.data?.code?.replace("-","")||""},dulIssuedBy:{url:"suggest/fms_unit"},organizationName:{url:"suggest/party"},inn:{url:"suggest/party",responseItemHandler:e=>e?.data?.inn||""},participantAddress:{url:"suggest/address"}},hn=()=>({open:(e,t)=>de.emitter.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>de.emitter.fire("popup",{type:"update",popup:e,...t}),close:()=>de.emitter.fire("popup",{type:"close"})}),pn=d((({options:e,onChange:t})=>o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,n)=>o("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem",onMouseDown:()=>t(e),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function gn({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=l([]),f=hn(),x=un[n],b=i((()=>{h.current=t,f.close()}),[t]),y=i((e=>{b(),h.current=e.processedValue,c&&c(e.processedValue),d&&d(e)}),[b,c]),v=s(null),N=r((()=>async e=>{if(!x)return;const t=await(e=>{const{url:t,query:n,queryPrefix:l,requestData:a={},responseItemHandler:i=mn}=e,r=(s=i,e=>(e?.suggestions||[]).map((e=>{const t=s(e);return{...e,processedValue:t}})));var s;const o=`${l?`${l}, `:""}${n}`;return fetch(`/api/v1/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...a,query:o})}).then((e=>e.json())).then(r)})({url:x.url,responseItemHandler:x.responseItemHandler,requestData:{...x?.requestData},query:e,queryPrefix:m});t?.length&&g(t)}),[m]),w=r((()=>((e,t=600)=>{let n;const l=(...a)=>{l.dispose(),n=setTimeout((()=>{e(...a)}),t)};return l.dispose=()=>{n&&clearTimeout(n)},l})(N,300)),[N]);return a((()=>{if(!e||!v.current||h.current===t)return void b();const n=v.current,{top:l,left:a,width:i,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.update(o(pn,{options:p,value:t,onChange:y}),{top:l+globalThis.scrollY+r,left:a,width:i})}),[e,p,t,y]),v}const fn=d((({className:e,label:t,value:n="",placeholder:l,error:a,errors:i,onChange:r=an,onDaDataChange:s,onBlur:d,isTextarea:m,type:h,name:p="",daDataQueryPrefix:g,dadata:f=!1})=>{const[x,{setFalse:b,setTrue:y}]=en(),v=nn(b),N=gn({isOpen:x&&f,name:p,value:n,daDataQueryPrefix:g,onChange:r,onDaDataChange:s});return c("div",{className:u("shrink-0 w-full",e),ref:v,onBlur:b,onFocus:y,children:[o("div",{ref:N,children:o(on,{type:h||"text","aria-label":t,label:ln({label:t,errors:i}),valid:Boolean(!a),value:n,onChange:r,onBlur:d,isTextarea:m,placeholder:xn(l,i,t)})}),qt(a)]})})),xn=(e,t,n)=>t&&!n?`${e}*`:e,bn=e=>e?.text||e?.key||"",yn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,vn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:yn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:bn(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const Nn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:h="",isSearch:p=!1,iconVersion:g="black",onChange:f,disabled:x=!1})=>{const[b,{setFalse:y,setTrue:v}]=en(),[N,w]=l(""),k=Sn(x,n.length),S=b&&!k,C=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=hn(),u=i((()=>{m.close(),c&&c()}),[c]),h=i((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=nn(u);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(vn,{popupRef:g,options:t,value:n,query:l,onChange:h,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:C,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[sn(t),c("div",{className:u("relative",S?"z-20":"z-10"),ref:T,children:[c("div",{className:u("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",kn(m,d,k)),onClick:S?C:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:bn(r)||h}),wn(S,g)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(on,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),wn=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),kn=(e,t,n)=>u(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Sn=(e,t)=>e||0===t,Cn=d((({className:e="",label:t,error:n,errors:l,...a})=>c("div",{className:e,children:[o(Nn,{...a,valid:!n,label:ln({label:t,errors:l})}),qt(n)]}))),Tn=e=>!e?.length,In=e=>t=>n=>e(n)?[]:[t],Bn=In((e=>null!=e&&""!==e)),Pn="Некорректно заполненное поле",Mn=e=>Bn(e||Pn),Rn=In((e=>e?.key&&""!==e?.key))(Pn),Dn=e=>In((e=>"string"==typeof e&&e.length>1))(e||Pn),Vn=(e,t)=>In((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t||Pn),zn=e=>In((e=>"string"==typeof e&&6===e.length))(e),An=e=>{return(t=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,In((e=>"string"==typeof e&&t.test(e))))(e);var t},_n=In((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Fn=e=>{const t=String(e).replace(/[^0-9]+/g,"");if(11===t.length){let e=0;for(let n=0;n<9;n++)e+=parseInt(t.charAt(n))*(9-n);return e>101&&(e%=101),100!==e&&101!==e||(e=0),e===parseInt(t.substr(9))}return!1},On={typeForm:Mn(),surname:Dn("Укажите свою фамилию"),name:Dn("Укажите своё имя"),middleName:Dn("Укажите своё отчество"),region:Rn,addressBranch:Rn,phone:An("Укажите номер телефона"),secondaryPhone:An("Укажите номер телефона"),birthday:Mn("Укажите дату рождения"),birthPlace:Mn("Укажите место рождения"),education:Mn("Выберите ваше образование"),housing:Mn("Выберите тип жилья"),employment:Mn("Выберите информацию о трудоустройстве"),organization:Mn("Выберите тип организации"),amountWorkers:Mn("Выберите информацию о количестве сотрудников"),employerActivities:Mn("Выберите вид деятельности организации"),employerOrganization:Mn("Выберите вид организации"),positionOrganization:Mn("Выберите вашу должность"),dulSerie:(En="Укажите серию паспорта",In((e=>"string"==typeof e&&4===e.length))(En)),dulNumber:zn("Укажите номер паспорта"),dulIssueDateField:Mn("Укажите дату выдачи паспорта"),dulSubdivisionCode:zn("Укажите код подразделения"),dulIssuedBy:Mn("Укажите организацию, выдавшую паспорт"),email:(e=>In((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2}$/.test(e)))(e))("Укажите электронную почту"),fullName:Dn(),inn:(e=>In((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),legalForm:Mn("Укажите ОПФ"),organizationName:Mn("Укажите наименование организации"),generalSeniority:Mn(),lastJobExperience:Mn("Укажите стаж на последнем месте работы"),experience5Years:Mn("Укажите общий стаж за последние 5 лет"),jobsNumber:Mn("Укажите количество лет стажа"),beginDate:Mn("Укажите дату заключения трудового договора"),fullAddress:Mn(),partnerComments:Mn(),collectionCount:Mn(),comment:Mn(),acquiringType:Rn,feedbackMethod:Rn,serviceType:Rn,serviceDirection:Rn,meetingDay:Mn(),product:Mn(),localities:Mn(),consentDataProcessing:_n,annualRevenue:Mn(),consentToReceiveMaterials:_n,processPersonalDataLeadFlg:_n,consentProviderFlg:_n,consentPhotoFlg:_n,consentPfrFlg:_n,consentAssignmentClaimsFlg:_n,consentCollectionFlg:_n,consentInformFlg:_n,familyStatus:Mn("Выберите семейное положение"),children:Vn(2,"Укажите количество детей"),familyMembers:Vn(2,"Укажите количество членов семьи"),dependents:Vn(2,"Укажите количество иждивенцев"),totalIncome:Vn(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:Vn(10,"Укажите сумму обязательных выплат"),snils:(e=>In(Fn)(e))("Некорректный номер СНИЛС"),conscription:Mn(),armyIdFlg:_n,sex:Mn("Укажите свой пол"),participantAddress:Mn("Необходимо выбрать адрес"),participantDateRegistration:Mn("Укажите дату регистрации")};var En;const jn=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,On?.[e]])))},Ln=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},$n=(e,t,n=!1)=>n?Ln(e,t):e,Un=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],qn=d((({field:e,input:t})=>o(Cn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Un,...$n(e("acquiringType"),On.acquiringType,t?.required)}))),Wn=(e="")=>Boolean("trade"===e||"all"===e),Hn=e=>null!=e,Yn=new Map,Kn=e=>Boolean(e?.every((e=>Array.isArray(e)?Kn(e):!e||"string"==typeof e))),Xn=e=>Kn(e)?e.toString():"";function Gn(e,t,{fallback:n,cache:i}={}){const s=r((()=>Jn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(Hn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=Yn)=>n=>{const l=Xn(n),a=t.get(l);if(l&&Hn(a))return a;const i=e(...n);return l&&Hn(i)&&t.set(l,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Jn(e){return Array.isArray(e)?e:e instanceof Function?Jn(e()):[e]}const Zn=[];const Qn=async e=>await rt(e,{method:"GET"})||Zn;function el(e=!1){const{data:t}=Gn(e?"/api/v1/premiumBranchesByRegions":"/api/v1/branchesByRegions",st);return Array.isArray(t)?t:[]}const tl=d((({field:e,input:t,isPremium:n=!1})=>{const l=e("region"),i=l?.value?.key,r=l?.value?.text,s=n?el(n)?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=Gn(e?`/api/v1/branches?regionCode=${e}`:null,Qn);return t||Zn}(i)?.filter((e=>e?.address));return a((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(Cn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...$n(e("addressBranch"),On.addressBranch,t?.required),isSearch:!0})})),nl=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),u=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:u}},ll=(e,t,n)=>Math.max(t,Math.min(e,n));function al(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function il({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:u("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:i,onChange:t=>{const n=al(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const rl=1,sl=100,ol=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:rl),max:s=(a.length?a.length-1:sl),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:p}=e,g=nl(e,{normalize:(e=0)=>a.length?cl(a)(e):ll(e,r,s),format:qe()}),f=i((e=>{p&&p(al(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(De,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:u("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",rn,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),il({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),dl(l)]})})),cl=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),dl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(De,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),ml=["От 1 000 ₽","До 1 000 000 000 ₽"],ul=d((({field:e})=>o(ol,{title:"Сумма, ₽",items:ml,min:1e3,max:1e9,...e("amount")}))),hl=e=>{const{data:t,error:n}=Gn(`https://portal-ui-cc.cprb.dev.rshbdev.ru/light-api-cash/v1/dictionary?dictionaryType=${e}`,pl);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},pl=async e=>await rt(e,{method:"POST"})||[],gl=ht((({field:e,source:t,label:n,fieldName:l,input:a})=>{const i=t&&t?.map((e=>e.description))||[];return o(Cn,{placeholder:"Выберите из списка",label:n,options:fl(i),...$n(e(l),On[l],a?.required)})})),fl=e=>(e??[]).map((e=>({key:e,value:e}))),xl=d((({field:e,input:t})=>{const{data:n}=hl("EMPLOYEES_NUMBER");return o(gl,{field:e,source:n,label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),bl=d((({field:e,input:t})=>o(fn,{label:"Годовая выручка, ₽",...$n(e("annualRevenue"),On.annualRevenue,t?.required)}))),yl=d((({field:e})=>o(Qt,{text:"Наличие военного билета",...$n(e("armyIdFlg"),On.armyIdFlg)}))),vl=d((({field:e})=>o(fn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),Nl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const u=[];for(let c=0;c<7;c++)if(0===m&&c<t)u.push(o("td",{},`empty-${c}`));else if(d>n)u.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=wl(t,e),c=kl(t,i,r);u.push(o("td",{children:o("div",{className:Sl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},wl=(e,t)=>t&&e.toDateString()===t.toDateString(),kl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),Sl=(e=!1,t=!1)=>u("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),Cl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Tl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=an,setValue:d=an})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:u,totalDays:h}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Cl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Nl({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:m})})]})})),Il=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Bl=Il.map((e=>({key:e}))),Pl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Ml={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Rl={className:"min-w-32",iconVersion:"black",isBorder:!1},Dl=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,onChange:m})=>{const[h,{setValue:p}]=en(!1),[g,f]=l(n?.getMonth()||(new Date).getMonth()),[x,b]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:y,handleNextMonth:v,handleSelectMonth:N,handleSelectYear:w,monthsOptions:k,yearsOptions:S,handleChangeVisibleCalendar:C,ref:T}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=nn(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>l(Il.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Bl,yearsOptions:Pl,ref:s}})({onYearSelect:b,onMonthSelect:f,onShowCalendar:p,selectedYear:x,selectedMonth:g,showCalendar:h}),I=((e,t)=>{const[n,i]=l(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();i(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(T,370);return c("div",{className:u("space-y-xs",e),ref:T,children:[sn(t),c("div",{className:"relative",children:[Vl(C,n,r),h?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":I}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:y,children:o(W,{...Ml,className:"-rotate-90 cursor-pointer"})}),o(Nn,{onChange:N,value:{key:Il[g]},options:k,...Rl}),o(Nn,{onChange:w,value:{key:String(x)},options:S,...Rl}),o("div",{className:"my-auto",onClick:v,children:o(W,{...Ml,className:"rotate-90 cursor-pointer"})})]}),o(Tl,{today:n,currentMonth:g,currentYear:x,onDateSelect:m,min:s,max:d,setValue:p})]}):null]})]})})),Vl=(e,t,n)=>c("div",{onClick:e,className:u("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",n?"border-gray":"border-error"),children:[o(k,{children:t&&xt(t)}),o(W,{...Ml,name:"CalendarIcon"})]}),zl=d((({className:e,label:t,error:n,errors:l,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Dl,{label:ln({label:t,errors:l}),valid:Boolean(!n),...a}),qt(n)]}))),Al=d((({field:e,input:t})=>o(zl,{label:"Дата начала работы на текущем месте",...$n(e("beginDate"),On.beginDate,t?.required),...t}))),_l=d((({field:e,input:t})=>o(zl,{label:"Дата рождения",...$n(e("birthday"),On.birthday,t?.required)}))),Fl=d((({field:e,input:t})=>o(fn,{label:"Место рождения",...$n(e("birthPlace"),On.birthPlace,t?.required),...t}))),Ol=d((({field:e,input:t})=>o(fn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",type:"number",...$n(e("children"),On.children,t?.required),...t}))),El=d((({field:e,input:t})=>o(fn,{label:"Количество объектов инкассации",type:"number",...$n(e("collectionCount"),On.collectionCount,t?.required)}))),jl=d((({field:e,input:t})=>o(fn,{className:"col-span-2",...$n(e("comment"),On.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Ll=d((({field:e,input:t})=>{const{data:n}=hl("MILITARY_STATUS");return o(gl,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),$l=d((({field:e,input:t})=>o(Qt,{text:"Прочие согласия (согласие на уступку прав требований)",...$n(e("consentAssignmentClaimsFlg"),On.consentAssignmentClaimsFlg,t?.required)}))),Ul=d((({field:e,input:t})=>o(Qt,{text:"Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)",...$n(e("consentCollectionFlg"),On.consentCollectionFlg,t?.required)}))),ql=d((({field:e,input:t})=>o(Qt,{text:"Согласие на информирование о продуктах и услугах Банка",...$n(e("consentInformFlg"),On.consentInformFlg,t?.required)}))),Wl=d((({field:e,input:t})=>o(Qt,{text:"Прочие согласия (согласие на фотографирование)",...$n(e("consentPhotoFlg"),On.consentPhotoFlg,t?.required)}))),Hl=d((({field:e,input:t})=>o(Qt,{text:"Согласие об использовании простой электронной подписи",...$n(e("consentProviderFlg"),On.consentProviderFlg,t?.required)}))),Yl=d((({field:e,input:t})=>o(Qt,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...$n(e("consentToReceiveMaterials"),On.consentToReceiveMaterials,t?.required)}))),Kl=d((({field:e,input:t})=>o(fn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",type:"number",...$n(e("dependents"),On.dependents,t?.required),...t}))),Xl=d((({field:e,input:t})=>o(zl,{label:"Желаемая дата встречи",...$n(e("desiredMeetingDate"),On.meetingDay,t?.required)}))),Gl=d((({field:e,input:t})=>o(zl,{label:"Дата выдачи",...$n(e("dulIssueDateField"),On.dulIssueDateField,t?.required)}))),Jl=d((({field:e,input:t})=>{const{value:n,onChange:l}=e("dulSubdivisionCode"),a=i((e=>{l?.(e?.data?.code?.replace("-",""))}),[]);return o(fn,{label:"Кем выдан",...t,...$n(e("dulIssuedBy"),On.dulIssuedBy,t?.required),onDaDataChange:a,daDataQueryPrefix:n})})),Zl=d((({field:e,input:t})=>o(fn,{label:"Номер документа",type:"number",...$n(e("dulNumber"),On.dulNumber,t?.required)}))),Ql=d((({field:e,input:t})=>o(fn,{label:"Серия документа",type:"number",...$n(e("dulSerie"),On.dulSerie,t?.required)}))),ea=d((({field:e,input:t})=>{const n=i((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(fn,{label:"Код подразделения",type:"number",...t,...$n(e("dulSubdivisionCode"),On.dulSubdivisionCode,t?.required),onDaDataChange:n})})),ta=d((({field:e,input:t})=>{const{data:n}=hl("EDUCATION_LEVEL");return o(gl,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),na=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(fn,{label:"Электронная почта",...$n(e("email"),On.email,n),...l})})),la=d((({field:e,input:t})=>{const{data:n}=hl("ORGANIZATION_ACTIVITY_TYPE");return o(gl,{field:e,source:n,label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),aa=d((({field:e,input:t})=>{const{data:n}=hl("ORGANIZATION_KIND");return o(gl,{field:e,source:n,label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),ia=d((({field:e,input:t})=>{const{data:n}=hl("EMPLOYMENT_TYPE");return o(gl,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),ra=d((({field:e,input:t})=>o(fn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",type:"number",...$n(e("expenses"),On.expenses,t?.required),...t}))),sa=d((({field:e,input:t})=>o(fn,{label:"Стаж",placeholder:"За последние 5 лет",...$n(e("experience5Years"),On.experience5Years,t?.required),...t}))),oa=d((({field:e,input:t})=>o(fn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",...$n(e("familyMembers"),On.familyMembers,t?.required),...t}))),ca=d((({field:e,input:t})=>{const{data:n}=hl("MARITAL_STATUS");return o(gl,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),da=d((({field:e,input:t})=>o(Cn,{label:"Способ получения ответа",options:Lt,...$n(e("feedbackMethod"),On.feedbackMethod,t?.required)}))),ma=d((({field:e,input:t})=>o(fn,{label:"Адрес",...$n(e("fullAddress"),On.fullAddress,t?.required),...t}))),ua=d((({field:e,input:t})=>o(fn,{label:"ФИО",...$n(e("fullName"),On.fullName,t?.required),...t}))),ha=d((({field:e,input:t})=>o(fn,{label:"Общий стаж",placeholder:"Количество лет",...$n(e("generalSeniority"),On.generalSeniority,t?.required),...t}))),pa=d((({field:e,input:t})=>{const{data:n}=hl("HOUSE_TYPE");return o(gl,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),ga=d((({field:e,input:t})=>{const n=i((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(fn,{label:"ИНН",type:"number",...t,...$n(e("inn"),On.inn,t?.required),onDaDataChange:n})})),fa=d((({field:e})=>o(Qt,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),xa=d((({field:e,input:t})=>o(fn,{label:"Общий стаж",placeholder:"Количество лет",type:"number",...$n(e("jobsNumber"),On.jobsNumber,t?.required),...t}))),ba=d((({field:e,input:t})=>o(fn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",...$n(e("lastJobExperience"),On.lastJobExperience,t?.required),...t}))),ya=d((({field:e,input:t})=>o(fn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...$n(e("legalForm"),On.legalForm,t?.required),...t}))),va=[];function Na(e="/api/v1/regions"){const{data:t}=Gn(e,st);return Array.isArray(t)?t:va}const wa=d((({field:e,input:t})=>{const n=e("region")?.value?.key,l=Na($t)?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(Cn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:l,...$n(e("localities"),On.localities,t?.required),isSearch:!0})})),ka=d((({field:e,input:t})=>o(fn,{label:"Отчество (Обязательно, при наличии)",...$n(e("middleName"),On.middleName),...t}))),Sa=d((({field:e,input:t})=>o(fn,{label:"Имя",...$n(e("name"),On.name,t?.required),...t}))),Ca=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:u("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:u("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(De,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Ta=d((({field:e})=>Wn(e("acquiringType")?.value?.key)?o(Ca,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Ia=d((({field:e,input:t})=>{const{data:n}=hl("ORGANIZATION_TYPE");return o(gl,{field:e,source:n,label:"Тип организации",fieldName:"organization",input:t})})),Ba=d((({field:e,input:t})=>{const n=i((t=>{e?.("inn")?.onChange?.(t.data?.inn),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(fn,{label:"Наименование организации",...t,...$n(e("organizationName"),On.organizationName,t?.required),onDaDataChange:n})})),Pa=d((({field:e,input:t})=>o(fn,{label:"Адрес",...$n(e("participantAddress"),On.participantAddress,t?.required),...t}))),Ma=d((({field:e,input:t})=>o(zl,{label:"Дата регистрации по месту жительства",...$n(e("participantDateRegistration"),On.participantDateRegistration,t?.required)}))),Ra=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(fn,{...$n(e("partnerComments"),On.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...l})})),Da=e=>"_"===e,Va=e=>/\d/.test(e),za=e=>Da(e)||Va(e),Aa=[..."+7 (___) ___-__-__"],_a=Aa.findIndex(Da),Fa=Aa.map(((e,t)=>za(e)?Aa.slice(0,t).filter(za).length:-1));const Oa=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=Aa.map(((e,n)=>Va(e)?e:t.charAt(Fa[n])||e)),l=Fa.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(_a,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(on,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),Ea=d((({className:e,label:t,error:n,...l})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Oa,{"aria-label":t,label:ln({label:t,errors:l?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...l}),qt(n)]}))),ja=d((({field:e,input:t})=>o(Ea,{label:"Телефон",...$n(e("phone"),On.phone,t?.required),...t}))),La=d((({field:e,input:t})=>{const{data:n}=hl("POSITION");return o(gl,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),$a=d((({field:e})=>Wn(e("acquiringType")?.value?.key)?o(Ca,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Ua=d((({field:e,input:t})=>o(Qt,{text:"Согласие на обработку персональных данных",...$n(e("processPersonalDataLeadFlg"),On.processPersonalDataLeadFlg,t?.required)}))),qa=ht((({field:e,source:t})=>o(Cn,{placeholder:"Выберите продукт",label:"Продукт",options:Wa(t?.productList),...Ln(e("product"),On.product)}))),Wa=e=>(e??[]).map((e=>({key:e,value:e}))),Ha=d((({field:e,input:t,url:n})=>{const l=Na(n);return o(Cn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...$n(e("region"),On.region,t?.required)})})),Ya=d((({field:e,input:t})=>{const n=el(!0),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(Cn,{label:"Регион",placeholder:"Выберите регион",options:l,...$n(e("region"),On.region,t?.required)})})),Ka=d((({field:e})=>{const t=e("secondaryPhone");return o(Ea,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Ln(t,On.secondaryPhone):t})})),Xa=d((({field:e,input:t})=>o(Cn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:jt,...$n(e("serviceDirection"),On.serviceDirection,t?.required)}))),Ga={horizontal:"@lg:flex-row",vertical:""},Ja=d((({label:e,items:t,value:n,className:l,onChange:a,disabled:i=!1,orientation:r="horizontal"})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(De,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",Ga[r],l),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Kt,{isRadio:!0,text:t,value:n===e,onChange:()=>a&&a(e),disabled:i},String(e))))})]}))),Za=d((({className:e,label:t,onChange:n,error:l,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ja,{label:ln({label:t,errors:a?.errors}),onChange:e=>n&&n(e),...a}),qt(l)]}))),Qa=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],ei=d((({field:e,input:t})=>o(Za,{label:"Пол",orientation:"horizontal",items:Qa,...$n(e("sex"),On.sex,t?.required)}))),ti=e=>"_"===e,ni=e=>/\d/.test(e),li=e=>ti(e)||ni(e),ai=[..."___-___-___ __"],ii=ai.findIndex(ti),ri=ai.map(((e,t)=>li(e)?ai.slice(0,t).filter(li).length:-1));const si=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=ai.map(((e,n)=>ni(e)?e:t.charAt(ri[n])||e)),l=ri.indexOf(t.length-1)+1;return 0===t.length?"":(l?n.slice(0,Math.max(ii,l)):n).join("")}(e))),[t]),a=i((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(on,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),oi=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(si,{"aria-label":t,label:ln({label:t,errors:r?.errors}),valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"___-___-___ __"}),qt(l)]}))),ci=d((({field:e,input:t})=>o(oi,{label:"СНИЛС",...$n(e("snils"),On.snils,t?.required),...t}))),di=d((({field:e,input:t})=>o(fn,{label:"Фамилия",...$n(e("surname"),On.surname,t?.required),...t}))),mi=["От 1 мес","До 15 лет"],ui=d((({field:e})=>o(ol,{title:"Срок, месяцев",items:mi,min:1,max:180,...e("term")}))),hi=d((({field:e,input:t})=>o(fn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",...$n(e("totalIncome"),On.totalIncome,t?.required),...t}))),pi=d((({field:e,input:t})=>o(Cn,{label:"Тип обслуживания",options:Et,...$n(e("serviceType"),On.serviceType,t?.required)}))),gi=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],fi=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(Ja,{className:"whitespace-normal",orientation:"horizontal",items:gi,value:t,onChange:e=>n&&n(e)})})}));const xi={$ref:"/wcms-resources/outservice-productlist.json"},bi=(e,t)=>(n,l)=>{const a="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,i={surname:o(di,{field:e,input:n}),name:o(Sa,{field:e,input:n}),middleName:o(ka,{field:e,input:n}),phone:o(ja,{field:e,input:n}),email:o(na,{field:e,input:n}),fullName:o(ua,{field:e,input:n}),inn:o(ga,{field:e,input:n}),legalForm:o(ya,{field:e,input:n}),organizationName:o(Ba,{field:e,input:n}),generalSeniority:o(ha,{field:e,input:n}),lastJobExperience:o(ba,{field:e,input:n}),experience5Years:o(sa,{field:e,input:n}),jobsNumber:o(xa,{field:e,input:n}),beginDate:o(Al,{field:e,input:n}),fullAddress:o(ma,{field:e,input:n}),comment:o(jl,{field:e,input:n}),addressBranch:o(tl,{field:e,input:n,isPremium:a}),sex:o(ei,{field:e,input:n}),birthday:o(_l,{field:e,input:n}),birthPlace:o(Fl,{field:e,input:n}),desiredMeetingDate:o(Xl,{field:e,input:n}),product:o(qa,{field:e,source:xi}),localities:o(wa,{field:e,input:n}),isClient:o(fa,{field:e}),partnerComments:o(Ra,{field:e,input:n}),collectionCount:o(El,{field:e,input:n}),acquiringType:o(qn,{field:e,input:n}),onlineCheckout:o(Ta,{field:e}),posTerminal:o($a,{field:e}),serviceType:o(pi,{field:e,input:n}),term:o(ui,{field:e}),amount:o(ul,{field:e}),annualRevenue:o(bl,{field:e,input:n}),vedTypes:o(fi,{field:e}),feedbackMethod:o(da,{field:e,input:n}),serviceDirection:o(Xa,{field:e,input:n}),bankEmpolee:o(vl,{field:e}),secondaryPhone:o(Ka,{field:e}),consentToReceiveMaterials:o(Yl,{field:e,input:n}),processPersonalDataLeadFlg:o(Ua,{field:e,input:n}),consentProviderFlg:o(Hl,{field:e,input:n}),consentPhotoFlg:o(Wl,{field:e,input:n}),consentAssignmentClaimsFlg:o($l,{field:e,input:n}),consentCollectionFlg:o(Ul,{field:e,input:n}),consentInformFlg:o(ql,{field:e,input:n}),applicationDate:o(fn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),consentPfrFlg:o(Qt,{text:"Согласие на запрос в ПФР",...e("consentPfrFlg")}),region:a?o(Ya,{field:e}):o(Ha,{field:e,input:n,url:Ut(t)}),education:o(ta,{field:e,input:n}),housing:o(pa,{field:e,input:n}),employment:o(ia,{field:e,input:n}),organization:o(Ia,{field:e,input:n}),amountWorkers:o(xl,{field:e,input:n}),employerActivities:o(la,{field:e,input:n}),employerOrganization:o(aa,{field:e,input:n}),positionOrganization:o(La,{field:e,input:n}),familyStatus:o(ca,{field:e,input:n}),children:o(Ol,{field:e,input:n}),familyMembers:o(oa,{field:e,input:n}),dependents:o(Kl,{field:e,input:n}),totalIncome:o(hi,{field:e,input:n}),expenses:o(ra,{field:e,input:n}),snils:o(ci,{field:e,input:n}),conscription:o(Ll,{field:e,input:n}),armyIdFlg:o(yl,{field:e,input:n}),dulSerie:o(Ql,{field:e,input:n}),dulNumber:o(Zl,{field:e,input:n}),dulIssueDateField:o(Gl,{field:e,input:n}),dulSubdivisionCode:o(ea,{field:e,input:n}),dulIssuedBy:o(Jl,{field:e,input:n}),participantAddress:o(Pa,{field:e,input:n}),participantDateRegistration:o(Ma,{field:e,input:n})};return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:n,field:e})?o("div",{children:i[n?.name]},String(l)):null},yi=e=>2===e?"@xl:grid-cols-2":"",vi=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(De,{size:"text-h6",children:e})}):null;function Ni({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const wi={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"},ki={primary:u("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:u("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")},Si=d((({children:e,...t})=>{const n=e=>({...e,onClick:ue(Ni(e))}),{className:l,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=n(t);return o("button",{className:u("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":u(wi[a],ki[a]),l),type:s,role:d,onClick:m,children:e})})),Ci=d((({className:e,onClose:t})=>o("button",{className:u("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(W,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),Ti=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=me(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:u("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(Ci,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),Ii=d((function({responseType:e,typeForm:t}){const n="OK"===e,l=n?"ResponseOKIcon":"ResponseFailIcon",{close:a}=me(),r=i((()=>{a()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Ti,{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(ne,{image:{icon:l,iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Si,{type:"button",onClick:r,children:"Хорошо"})]})})})),Bi=e=>{const{open:t,close:n}=me();return{open:(n={})=>t(o(Ii,{...e}),n),close:n}},Pi=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Mi=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Wn(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...d,...Di(o),...Ri(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Ri=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Di=e=>e?{vedTypes:Object.fromEntries(gi.map((({id:t})=>[t,t===e])))}:{},Vi={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Un[0],serviceType:Et[0],feedbackMethod:Lt[0],serviceDirection:jt[0],vedTypes:gi[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},zi=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(De,{children:e}):null,t?o(ye,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(De,{children:t.text})}):null]}))),Ai=(e,t)=>o(Si,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),_i=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Kt,{...e}),o(zi,{link:t})]}),qt(Ln(e,_n).error)]}):o(zi,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),Ai(n)]}),Fi={send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f=g?"/api/v1/lead":"/api/v1/sendcorporatelead",x={typeForm:n,...Nt(l,g),...wt(i,g),...yt(a),...vt(s,"desiredMeetingDate"),...g?vt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...kt(d)},...p};try{const e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},Oi=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:p,data:g,...f})=>{const x=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Vi[e.name]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=Et[1]),{...n,typeForm:{key:t,text:""}}})(x,n),[y,v]=l(""),N=i((async(e,t)=>{const l=Ei(x,e),a=Pi(jn(l));if(!Tn(a(e)))return"Fail";const i=Mi({...e,...h}),r=await Fi.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){Bi({responseType:r,typeForm:n}).open()}if("OK"===r&&g){const e=zt();St({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:S,reset:C}]=_t(b,{onSubmit:N}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return a((()=>{"OK"===y&&(v(""),C())}),[y]),c(Ot,{className:u("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:u(yi(e.columns),"grid gap-x-m"),children:[vi(e.title),(e?.inputs||[])?.map(bi(k,n))]},`section-${t}`))),_i(T?k("consentDataProcessing"):void 0,d,s)]}),p?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(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),Ei=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const l=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):n===(l?.key??l)})))),ji=["processPersonalDataLeadFlg","consentProviderFlg","consentPfrFlg","consentPhotoFlg","consentAssignmentClaimsFlg","consentCollectionFlg","consentInformFlg","consentToReceiveMaterials"],Li={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Un[0],serviceType:Et[0],feedbackMethod:Lt[0],serviceDirection:jt[0],vedTypes:gi[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataLeadFlg:!1,consentProviderFlg:!1,consentPhotoFlg:!1,consentAssignmentClaimsFlg:!1,consentCollectionFlg:!1,consentInformFlg:!1,participantAddress:"",participantDateRegistration:void 0},$i=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Li[e.name]]))),typeForm:{key:t,text:""}}),Ui=d((({className:e,children:t})=>o("div",{className:e,role:"group",children:t}))),qi=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),u=r?r({isUnfolded:s,onToggle:d}):null;return c(Ui,t?{className:e,children:[u,m]}:{className:e,children:[m,u]})}));const Wi=d((({className:e="",isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),Hi=d((({inputs:e=[],typeForm:t="",field:n,key:l})=>{const a=e.every((e=>Boolean(n(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(Ln(n(e?.name),On[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(qi,{isFoldButtonOnTop:!0,renderFoldableSection:({isUnfolded:l})=>o(Wi,{isUnfolded:l,className:"flex flex-col pl-2xl",children:e.map(bi(n,t))}),renderFoldButton:Yi(c("div",{children:[o(Kt,{value:a,onChange:t=>{for(const l of e){const e=n(l.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},l),qt(i?"Отметьте все обязательные соглашения":"")]}))})})})),Yi=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),Ki=(e,t)=>o(Si,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Xi=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},Gi=e=>"application/json"===e.headers.get("Content-Type"),Ji=async(e,t,n)=>await fetch("https://retail-light-api.cprb.dev.rshbdev.ru/api/v1"+e,{method:t,headers:{"Content-Type":"application/json",...Xi()},credentials:"include",body:n?JSON.stringify(n):null}).then((e=>{if(e.ok)return(e=>Gi(e)?e.json():e)(e);throw e})).catch((e=>{throw e})),Zi=e=>{sessionStorage.setItem("accessToken",e.access_token),sessionStorage.setItem("refreshToken",e.refresh_token)},Qi=async e=>await Ji("/public-data/createUserProfile","POST",e),er=async e=>await Ji("/user-data/updateUserProfile","PUT",e),tr=async e=>await Ji("/user-data/createDraftTask","POST",e),nr=async e=>await Ji("/user-data/updateUserTask","PUT",e),lr=async e=>await Ji("/sms/sendCode","POST",e),ar=async e=>await Ji("/sms/checkCode","POST",e).then(Zi),ir=async e=>await Ji(`/sms/createCaptcha?phoneNumber=${e}`,"GET"),rr=async e=>await Ji("/sms/checkCaptcha","POST",e),sr={width:"103",height:"21"},or={"bg-white":"color",transparent:"white"},cr={"bg-white":"text-primary-main",transparent:"text-white"},dr=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:or[e]},className:cr[e],width:n?.width,height:n?.height}),mr={"bg-white":"text-primary-text",transparent:"text-white"},ur=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:u("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...pe(s),children:[dr(i,n?.image,sr),r?l??o("div",{className:"ml-s",children:o(De,{font:"font-medium",color:mr[i],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),hr=async(e,t)=>{const n=await ir(t);e(URL.createObjectURL(await n.blob()))},pr=d((({phoneNumber:e,close:t,sendCode:n,onClose:i})=>{const[r,s]=l(""),[d,m]=l(""),[u,h]=l(!1);return a((()=>{hr(s,e)}),[]),o(Ti,{head:o(ur,{}),onClose:i,className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex h-[140px] w-[300px]",children:[o("img",{className:"grow",src:r}),o("div",{onClick:()=>hr(s,e),className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(on,{className:"w-[300px]",onChange:m,value:d,placeholder:"Введите код с картинки"}),u?o("div",{className:"text-error",children:"Неверный код"}):null,c("div",{className:"flex w-[310px] justify-between",children:[o(Si,{onClick:t,version:"secondary",children:"Вернуться"}),o(Si,{type:"submit",disabled:!d,onClick:()=>(async({code:e,setHasError:t,close:n,sendCode:l=an})=>{const a=await rr({captchaText:e});"ERROR"===await a.text()?t(!0):(l(),n?.())})({code:d,setHasError:h,close:t,sendCode:n}),version:"secondary",children:"Отправить"})]})]})})})),gr=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:u("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:u("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),fr=d((({time:e,setTime:t,className:n})=>(a((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:xr(e)})))),xr=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,br=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=l(0),u=s([]);a((()=>{u.current?.[d]?.focus()}),[d]);const h=i((n=>l=>{const{value:a}=l.currentTarget,i=n===e.length-1,r=a.length>1;i&&r||(t(e.map(((e,t)=>t===n?a:e))),m(n+1))}),[e]),p=i((n=>l=>{const{key:a}=l;if("Backspace"===a&&!e[n]){const l=n>0?n-1:e.length-1,a=e.map(((e,t)=>t===l?"":e));t(a),m(l)}}),[e]),g=i((n=>{n.preventDefault();const l=n.clipboardData.getData("text"),a=e.map(((e,t)=>t<l.length?l[t]:e));t(a),m(a.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,l)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(l),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[l]=e},onFocus:e=>e.target.select(),onKeyDown:p(l),className:yr(l,e,n)},l)))}),n?o("div",{className:"text-error",children:r}):null]})})),yr=(e,t,n=!1)=>{const l=!t[e];return`w-16 h-20 text-3xl text-center p-2 m-2 border ${n&&l?"border-error":"border-gray"} rounded-md caret-transparent outline-none`},vr=d((({isDisabled:e,onClick:t,text:n})=>o(Si,{type:"button",onClick:t,disabled:e,children:o(De,{font:"font-medium",children:n})}))),Nr=d((({close:e=an,onClose:t=an,title:n,description:s,__html:d,code:m=!0,codeLength:u=4,textButton:h="",phoneNumber:p="+79999999999"})=>{const[g,f]=l(Array(u).fill("")),{handleSubmit:x,hasError:b,errorText:y,isLoading:v,timeNextReq:N,isSubmitButtonDisabled:w,setTimeNextReq:k,setIsTimerStarted:S,setAttemps:T}=(({close:e,values:t})=>{const[n,s]=l(!1),[o,c]=l(""),[d,m]=l(!1),[u,h]=l(0),[p,g]=l(!1),[f,x]=l(0),b=i((()=>{s(!1),c("")}),[]),y=r((()=>0===u&&p),[u,p]),v=r((()=>f>2||!t.every(Boolean)||y),[t]),N=i((async()=>{try{g(!1),h(0),x(f+1),m(!0),await ar({smsText:t.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),b(),e&&e()}catch{m(!1),c(f>1?"Исчерпан лимит ввода смс-кода":"Неверный код"),s(!0)}}),[t,f]);return a((()=>{y?(s(!0),c("Код просрочен")):s(!1)}),[y]),{handleSubmit:N,hasError:n,errorText:o,isLoading:d,timeNextReq:u,isSubmitButtonDisabled:v,setTimeNextReq:h,setIsTimerStarted:g,setAttemps:x}})({values:g,close:e}),I=i((()=>{(async({phoneNumber:e,captchaDialog:t,setTimeNextReq:n,setIsTimerStarted:l,setAttemps:a})=>{try{await lr({phoneNumber:e,smsCodesSetName:{key:"AUTHENTICATION"}}),a(0),n(180),l(!0)}catch(e){429===e?.status&&t.open()}})({phoneNumber:p,captchaDialog:B,setTimeNextReq:k,setIsTimerStarted:S,setAttemps:T})}),[]),B=((e,t)=>{const{open:n,close:l,closeAll:a}=me();return{open:()=>n(o(pr,{close:l,onClose:t,...e})),close:l,closeAll:a}})({phoneNumber:p,sendCode:I},t);return a((()=>{I()}),[]),o(Ti,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[o(C,{className:"w-full",title:n,description:s,headlineVersion:"S",isEmbedded:!0}),m?o(br,{values:g,setValues:f,errorText:y,hasError:b}):null,kr(N,k,I),o(Me,{itemSize:"list-s",__html:d}),wr(h,w,x),v?o(gr,{blur:!1}):null]})})})),wr=(e,t,n)=>e?o(vr,{isDisabled:t,onClick:n,text:e}):null,kr=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-primary-main",children:["Получить новый код можно через",o(fr,{className:"text-primary-main ml-1",time:e,setTime:t})]}):o(ye,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),Sr=(e,t)=>{const[n,a]=l("");return{handleSubmit:i((async n=>{const l=Pi(jn(e));if(!Tn(l(n)))return"Fail";try{const{profile:e}=await Qi({profile:{phone:bt(n.phone)}}),l=e?.id;if(l&&n?.phone){const e=async()=>{try{await er(((e,t)=>{const{name:n="",surname:l="",middleName:a="",birthday:i="",phone:r="",email:s="",processPersonalDataLeadFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:l,midname:a,birthDate:i&&xt(i,!0),email:s,phone:bt(r),processPersonalDataLeadFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(l,n));const{taskId:e,participantId:a}=await tr({profileId:l,programId:t});await nr(((e,t,n,l)=>({sendToBank:!0,taskKind:"SHORT",task:{taskSource:globalThis.location.origin,id:t,participants:[{birthDate:l?.birthDate,id:e,midname:l?.midname,name:l?.name,surname:l?.surname,profile:{id:n},participantContacts:[{contactTypeCd:{key:"EMAIL"},value:l?.email},{contactTypeCd:{key:"MAIN_PHONE"},value:l?.phone}],roleCd:{key:"BORROWER",value:"Заемщик"}}]}}))(a,e,l,n)),globalThis.location.href="/credit-lead"}catch{a("Fail")}};(e=>{const{open:t,close:n}=me();return{open:(l={})=>t(o(Nr,{onClose:n,...e}),l),close:n}})({close:e,...Cr(n?.phone)}).open()}}catch{a("Fail")}}),[]),responseStatus:n}},Cr=e=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:bt(e),textButton:"Оформить",__html:"<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>\n <ul><li>соглашение о порядке использования простой электронной подписи,\n </li><li>согласие на обработку персональных данных,\n </li><li>предоставление и подписание прочих согласий Банка,\n </li><li>согласие на запрос в ПФР</li></ul>"}),Tr=d((({className:e,title:t,programId:n,typeForm:i="",sections:r=[],button:s,...d})=>{const m=r?.flatMap((e=>e?.inputs))||[],h=$i(m,i),[p,g]=l("");a((()=>{sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken")}),[]);const{handleSubmit:f,responseStatus:x}=Sr(m,n||"");if(x){Bi({responseType:x,typeForm:i}).open()}const[,{field:b,onSubmit:y,reset:v}]=_t(h,{onSubmit:f});return a((()=>{"OK"===p&&(g(""),v())}),[p]),o(Ot,{className:u("container space-y-m",e),title:t,...d,children:c("form",{onSubmit:y,className:"space-y-m",children:[r.map(((e,t)=>c("div",{className:u(yi(e.columns),"grid gap-x-m"),children:[vi(e.title),Ir({field:b,typeForm:i,inputs:e?.inputs})]},`section-${t}`))),Ki(s)]})})})),Ir=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:l,restInputs:a}=Br(n||[]);return l.length>2?c("div",{children:[a.map(bi(e,t)),o(Hi,{inputs:l,field:e})]}):(n||[])?.map(bi(e,t))},Br=e=>({consentInputs:e?.filter((e=>ji.includes(e.name)))||[],restInputs:e?.filter((e=>!ji.includes(e.name)))||[]}),Pr=d((({title:e,description:t})=>{const n=ke();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Mr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Rr=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Dr(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const Vr=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:Dr(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}(i((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:h,role:"listitem",children:d})})),zr=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Ar=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(Fr(n))}),[g,f]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?_r(c,v):{},...N?Rr(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(Vr,{className:u(m,a?zr[a-1]:"",{"h-full":N},t),style:w?_r(c/4):{},activeIndex:l,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),_r=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Fr=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Or={"horizontal-list":"w-6","vertical-list":"h-6"},Er=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?Or[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),jr=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:u("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:u("text-secondary-text font-light",s),children:n?.description})]},String(l))},Lr=e=>e,$r=(e=Lr)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),Ur=$r(),qr=(e=Lr)=>$r((t=>-e(t))),Wr=qr(),Hr=e=>t=>e.scrollWidth/t,Yr=e=>(t,n)=>{e.scrollBy({left:n*Hr(e)(t),behavior:"smooth"})},Kr=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[qr()(a),$r()(a)]:[-1,-1],m=c>0,u=d<e-1,h=i((()=>{var t;n.current&&(m?Yr(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(u?Yr(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:h,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:u,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Xr={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Gr=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=ke(),[h,p]=Kr({itemCount:s.length}),g=Jr(Boolean(s?.length));a((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Ar,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(jr({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",Xr[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Er({activeIndex:t,onClick:f,listType:l}))}):null})),Jr=(e=!1)=>({behavior:e?"auto":"smooth"}),Zr=d((({className:e,disabled:t,...n})=>o(ye,{rounded:!0,className:u("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,...n,children:o(ne,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),Qr=d((e=>o(Zr,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),es=d((e=>o(Zr,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),ts="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",ns=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?ls(t):null,i?o(Qr,{className:u(as(a),m?"left-1":"left-0"),onClick:s}):null,r?o(es,{className:u(as(a),m?"right-1":"right-0"),onClick:d}):null]})})),ls=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(ts,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(ts,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),as=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),is=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=Kr({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===i?"relative h-full":""),children:[o(Ar,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(ns,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(Gr,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),rs=({blocksToRender:e,...t})=>o(is,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:M(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Mr(!0)),children:B(e,t)},String(n))})}),ss=e=>e%2!=0,os=d((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,role:r,...s})=>c(n,{tag:n,className:u("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:l,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),cs=d((({className:e="",label:t,icon:n,dataTheme:l="pc",disabled:a=!1,onClick:i})=>o(os,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",role:"button",className:u("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(De,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),ds=({isUnfolded:e,onToggle:t})=>o(cs,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),ms=["ArrowDownIcon","ArrowUpIcon"],us="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",hs=({topItemsCount:e=0,label:t="",block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]];return c("div",{className:u("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:u(us),children:[M(i,{...a.options,parent:n}),ss(i.length)?o(gt,{className:"col-span-6",...a}):null]}),o(qi,{renderFoldableSection:({isUnfolded:e})=>c(Wi,{className:u(us),isUnfolded:e,children:[M(r,{...a.options,parent:n}),ss(r.length)?o(gt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:l})=>o(cs,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:ms[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:l})})]})},ps=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[gs(n,t),hs({...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[gs(n,t),rs({...l,blocksToRender:t})]});default:return null}})),gs=(e,t)=>e&&!t.length?o(Pr,{...e}):null,fs=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),xs=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(Ca,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),bs=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,fs(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(ys(l)).filter(Boolean))]}),n?o("div",{children:o(Si,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),ys=e=>([t,n])=>{const l=n?.type;return"array"===l?vs(t,e)(n):null},vs=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(De,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(xs,{items:l,multiple:!n?.single,...t(e)})]},e)};function Ns(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const ws=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,ks=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>ws(t[e])||ws(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>ws(t[e])||ws(n[e])||Ss(t[e])<=Ss(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>ws(t[e])||ws(n[e])||Ss(t[e]?.min)>=Ss(n[e]?.min)&&Ss(t[e]?.min)<=Ss(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>ws(t[e])||ws(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>ws(t[e])||ws(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Ss=e=>Number(e||0),Cs=(e,{block:t,page:n,normalize:l=At})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=_t(e),d=r((()=>Ns(a,a.map((e=>mt(e.content,n?.fallback))))),[a,n?.fallback]),m=i===e?a:((e,t)=>(n=At)=>e?.filter((([,e])=>ks(t,n(e)||{}))).map((([e])=>e)))(d,i)(l);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},Ts={},Is={},Bs=ht((({className:e,filtrationSchema:t=Ts,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Cs(Is,{block:a.block,page:a.options?.page}),d=o(Nn,{className:"w-64",label:n?.title,options:Ps(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Ps(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(bs,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Si,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(ps,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Ps=e=>Ns(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Ms=(e=!1)=>e?"text-left":"text-center",Rs={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Ds=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:u("rounded-icon object-fit flex justify-center items-center",Rs[n],e),children:o(W,{...i,width:"54%",height:"54%",name:a})}):null})),Vs=d((({className:e="",title:t,benefitList:n,...l})=>{const a=ke();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(w,{headingType:"h3",as:"h2",className:Ms(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(zs)}):null]})})),zs=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(Ds,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ne,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(w,{headingType:"h6",children:e}),o(De,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Me,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),As=(e,t,n)=>{return o(is,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>c("div",{className:u("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(De,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(De,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},_s=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?As(e,0,t):null]}))),Fs={start:"justify-start",center:"justify-center",end:"justify-end"},Os=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&u("flex",Fs[n]);return o(g,{className:u("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:je(e)})})),Es=d((({className:e,title:t,children:n,...l})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(w,{className:"text-center",title:t}):null,n]}))),js="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",Ls="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",$s="flex flex-col gap-y-xl min-w-52",Us=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(De,{size:"text-h3",children:"number"==typeof e?[l,qe(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),qs=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(De,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(Us,{value:n,...a}):o(De,{size:"text-h3",children:"-"})]}))),Ws=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Hs=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(De,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:qe(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Ys=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(De,{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:"Выберите другую сумму или срок"})})]}))),Ks=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(Ys,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(Hs,{title:e,rate:t,unit:n,fractionDigits:l,color:i,...s})}),o(qs,{className:"@xl:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:i,...s}),r]}),Xs=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(ol,{items:e?[`От ${qe(1)(l.min||0)} ${n}`,`До ${qe(1)(l.max||0)} ${n}`]:[],step:t,...l}),Gs={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Js={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Zs=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=Gs.prefMonthsNum,prefTravelBonusRate:i=Gs.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||Js,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},Qs=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=_t({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=Zs(r,n);return o(Es,{className:e,title:t,...i,children:c("section",{className:u(js,e),children:[c("div",{className:Ls,children:[Xs({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Xs({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Ks({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:$s,children:[f>=0?o(qs,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,je(l,{isVertical:!0}),Ws(a)]})]})})})),eo=Math.round(29.5),to=(e,t=0)=>e?.sum?e.sum:t,no=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,lo=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,ao=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(De,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(De,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(Ja,{orientation:l,items:e,value:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),io=e=>ao({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),ro=" (c капитализацией)",so=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:$s,children:[o(qs,{title:`Доход в конце срока${i?ro:""}`,value:e,postfix:n,prefix:"+"}),o(qs,{title:`Сумма в конце срока${i?ro:""}`,value:t,postfix:n}),je(l,{isVertical:!0}),a?.map(Ws)]}),oo=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:co([e,t],l),co=([e,t],n=[])=>({[e]:n.length?Wr(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?Ur(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),mo=(e,[t,n],l)=>e>=l[t]&&e<=l[n],uo={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const ho={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},po=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?uo[e?.rateType]:"",{data:n}=Gn(t?`/api/v1/depositrates/${t}`:null,st);return Array.isArray(n)?n:[]}(t);if(n<=30)return{...ho,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&go(s,e)&&mo(l,["minSum","maxSum"],e)&&mo(n,["minDays","maxDays"],e)))||ho,{rate:m}=d,u=fo(m,e),h=l+u,p=c||[ho];return{...d,...co(["minSum","maxSum"],p),...co(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},go=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,fo=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},xo=ht((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=_t({moneyValue:to(r,1e5),daysValue:no(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=po(m,s),{income:g,finalSum:f,rate:x,isUnavailableByTerm:b,depositeName:y}=p;return o(Es,{className:e,title:t,...d,children:c("section",{className:u(js,e),children:[c("div",{className:Ls,children:[Xs({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(ol,{items:[`От ${lo(v.min||0)}`,`До ${lo(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[bo(p,h),io({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Ks({rate:x,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),so({income:g,finalSum:f,buttons:n,footnotes:[l,a]})]})});var v})),bo=(e,t)=>c("div",{className:"space-y-s",children:[o(De,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Kt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Kt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),yo=(e=[],t=!1)=>vo([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),vo=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},No=({min:e=0,max:t=0,availableMonths:n,...l})=>o(ol,{items:[`От ${wo(e)}`,`До ${wo(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),wo=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,ko=e=>ao({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),So=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(ll(t?.[a],n.minMonths,n.maxMonths))},Co=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},To={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Io=e=>Bo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Bo({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Bo({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Bo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Bo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Po=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[To],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Io({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=oo(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=oo(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>Io({row:e,userInputParams:t,paramsViewSettings:n})&&mo(l,["minSum","maxSum"],e)&&mo(a,["minMonths","maxMonths"],e)))||To)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:u}=m,h=Co(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:h}},Mo=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Ro={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Do=ht((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(h=n?.rateRows,vo([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],h));var h;const[p,{field:g}]=_t({moneyValue:to(s,2e5),monthsValue:no(s,eo),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),f=Po(p,n,r),x=ko({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(ll(p.moneyValue,f.minSum,f.maxSum))}),[f.minSum,f.maxSum]),a((()=>{y&&y(ll(p.monthsValue,f.minMonths,f.maxMonths))}),[f.minMonths,f.maxMonths]),a((()=>{!Mo(s)&&m&&So({field:g,defParams:m,calcParams:f,map:Ro,monthsValue:"minMonths"})}),[n,s]),o(Es,{className:e,title:t,...d,children:c("section",{className:u(js,e),children:[c("div",{className:Ls,children:[Xs({title:"Сумма кредита, ₽",step:500,min:f.minSum,max:f.maxSum,...g("moneyValue"),value:f.moneyValue}),No({title:"Срок кредита, месяцев",min:f.minMonths,max:f.maxMonths,...g("monthsValue"),value:f.monthsValue}),Vo({...f,...r},g),o("div",{className:"sm:hidden",children:x})]}),c("div",{className:u($s,"@4xl:w-1/2"),children:[o(qs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(qs,{title:"Ставка",value:f?.rate,fractionDigits:2,postfix:"%"}),o(qs,{title:"Ежемесячный платёж",value:f.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:x}),je(l,{isVertical:!0}),Ws(i)]})]})})})),Vo=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Kt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Kt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Kt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Kt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),zo=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},Ao={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},_o=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?Eo(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Oo({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Oo({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Oo({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Oo({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,mo(l,["minSum","maxSum"],t),mo(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||Ao,{rate:u}=m,h=Fo(u,e),p=l+h,g=t||[Ao];return{...m,...co(["minSum","maxSum"],g),...co(["minMonths","maxMonths"],g),availableMonths:zo(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:h,finalSum:p}},Fo=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},Oo=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Eo=(e,t)=>e+Math.round((t-e)/2),jo=(e="rub")=>"rub"===e,Lo=(e,t)=>{const{minMonths:n,maxMonths:l}=co(["minMonths","maxMonths"],Wo(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:ll(a,n,l)}},$o=(e,t)=>{const{minSum:n,maxSum:l}=co(["minSum","maxSum"],Wo(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:ll(a,n,l)}},Uo=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),qo=e=>{const t=jo(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Wo=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},Ho=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?ao({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?ao({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),Yo(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?io({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},ao({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),Yo(e.isShowNewClient),e.isShowNewClient?o(Kt,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},Yo=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,Ko={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Xo={text:"₽",key:"rub"},Go=ht((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[Xo],g=i((e=>t=>e?{...t,...qo(t),...$o(t,e),...Lo(t,e),...Uo(t,e)}:t)(h),[h]),[f,{field:x}]=_t({moneyValue:to(d,2e4),monthsValue:no(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:Xo},{normalize:g}),b=x?.("currency")?.value??Xo,y=x?.("isNewClient")?.value,v=Wo(h,b),N=_o(f,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,T=i((()=>{So({field:x,defParams:yo(v,y),calcParams:N,monthsValue:"minMonths",map:Ko})}),[x,h]);a((()=>{!Mo(d)&&v&&T()}),[d,h]);const I=w===yo(v,y)?.rate;return o(Es,{className:e,title:t,...m,children:c("section",{className:u(js,e),children:[c("div",{className:Ls,children:[c("div",{className:"flex gap-m",children:[Xs({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:Jo(b?.key)}),h&&h?.length>1?o(Cn,{label:"Валюта",options:p,...x("currency")}):null]}),No({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),Ho({...N,...s},x)]}),Ks({rate:w,children:Qo(T,I)}),so({income:k,finalSum:S,buttons:[...l,Zo(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),Jo=(e="")=>jo(e)?1e3:100,Zo=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},Qo=(e,t=!1)=>t?null:o(Si,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),ec=e=>tc({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&tc({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),tc=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],nc={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},lc=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[nc],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>ec({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=oo(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=oo(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>ec({row:e,userInputParams:t,paramsViewSettings:n})&&mo(l+r,["minSum","maxSum"],e)&&mo(i,["minSumOld","maxSumOld"],e)&&mo(r,["minSumExtra","maxSumExtra"],e)&&mo(a,["minMonths","maxMonths"],e)))||nc)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=h,g=Co(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:f}},ac=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=_t({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=lc(s,n,i),h=ko({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Es,{className:e,title:t,...r,children:c("section",{className:u(js,e),children:[c("div",{className:Ls,children:[Xs({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Xs({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),No({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),ic({...m,...i},d),m.isExtraMoney?Xs({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})]}),c("div",{className:u($s,"@4xl:w-1/2"),children:[o(qs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(qs,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(qs,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(qs,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),je(l,{isVertical:!0}),Ws(a)]})]})})})),ic=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Kt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Kt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Kt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),rc=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=nl(e,{normalize:(e=a)=>n&&l?String(ll(Number(sc(e)),n,l)):sc(e),format:qe(r)}),d=i((e=>t&&t(sc(e))),[t]);return o(on,{onChange:d,...s,...c})})),sc=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),oc=d((e=>o(rc,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(De,{size:"text-xl",font:"font-light",children:"₽"})})}))),cc={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},dc={amount:1500},mc=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=_t(dc),[h,p]=l(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:u("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:cc[r],children:[o(oc,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(Si,{className:"w-full mt-lg",type:"submit",disabled:h,children:i.text}):null]})]})})),uc=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("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})]}),hc="relative h-full",pc={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},gc=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(bc),r=n?{defaultPadding:"p-6xl pb-m"}:{};return R({...l,renderProps:(n,l,a)=>c("div",{className:fc(n,{someCardsHighlighted:i}),children:[B(n,l,{className:xc(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),bc(n)?uc({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},fc=(e,{someCardsHighlighted:t})=>u(hc,t&&(bc(e)?"pt-3xl":"pt-3xl sm:pt-16")),xc=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>u(hc,"min-w-80",pc[l],t&&(bc(e)?"pt-3xl sm:pt-16":"pt-3xl"),Mr(n),n&&"h-full"),bc=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,yc=ht((({className:e,visibleItemCount:t=0,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(is,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?vc(s?.block?.blocks):[],hasBlur:!0,children:gc({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),vc=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Nc="z-10 border border-solid w-full h-full",wc=u(Nc,"absolute hidden @xl:block border-transparent"),kc=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:u(wc,"top-9 right-12 bg-green-dark")}),o("div",{className:u(wc,"top-6 right-8 bg-green")}),o("div",{className:u(wc,"top-3 right-4 bg-green-light")}),c("div",{className:u(Nc,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),je([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Sc={black:"bg-black",white:"bg-white"},Cc=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:u("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Te,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:je([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(De,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Tc)]}):null,a?c(De,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Tc=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Sc[e]}`},String(t)),Ic=d((({icon:e,...t})=>{const n=he(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:u("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),Bc=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?Pc(l):null]})}))),Pc=e=>o("div",{className:u("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(Ic,{...e},String(t))))}),Mc=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Rc=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=he()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...pe(a),children:i})})),Dc=[{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"}}],Vc=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>Dc.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ee(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),h=u("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},zc(a));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:je(m,{className:Ac(s??!1,a??!1,n),buttonClassName:h})}),r?o(De,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),zc=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",Ac=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),_c=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:u("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(Rc,{href:a,target:m,className:"h-full",data:Mc(v),children:c(Te,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Je(Ee(i)?o(ne,{image:i}):null,x),buttons:d.length?o(Vc,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Oe,{benefits:f}),s?o(Me,{__html:s,isDotted:r,itemSize:"list-s"}):null,Fc(l,p)]})})}))),Fc=(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,Oc=(e,t,n)=>{const[i,r]=l(n);return a((()=>e.subscribe(t,r)),[e,t]),i},Ec=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(De,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(De,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:je(a)}):null]},String(t))},jc=d((e=>{const{cardCells:t=[],visibleCellsCount:n=1,isUnfolded:l}=e,[a,i]=n>0&&t.length>=n?[t.slice(0,n),t.slice(n)]:[t,[]];return i.length?c(Ui,{children:[c("div",{children:[a.map(Ec),o(Wi,{isUnfolded:l,children:i.map(Ec)})]}),o(Lc,{...e})]}):o("div",{children:a.map(Ec)})})),Lc=d((({isUnfolded:e,data:t,onToggle:n})=>c("button",{type:"button",className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",...e?pe(t):{},onClick:n,children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}))),$c=new ce,Uc=d((({className:e,title:t,align:n="text-center",icon:l,button:a,visibleCellsCount:r=1,cardCells:s=[],options:d,data:m,...h})=>{const{isUnfolded:p,parent:f}=Oc($c.observable,"fold",{}),x=p&&f===d?.parent,b=i((()=>$c.emitter.fire("fold",{isUnfolded:!x,parent:d?.parent})),[x,d?.parent]);return c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...h,children:[Ee(l)?o("div",{className:"self-center",children:o(ne,{image:l})}):null,t?o(w,{className:u("pt-xs",n),headingType:"h5",title:t}):null,a?.text?o(ye,{className:"w-full mt-m mb-lg",...a}):null,o(jc,{cardCells:s,visibleCellsCount:r,isUnfolded:x,data:m,onToggle:b})]})})),qc=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Wc=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),Hc=1e9,Yc={sum:{min:1e4,max:Hc},period:3},Kc=ht((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Cs(Yc,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:Xc(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=Gc(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(bs,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(oc,{label:l?.title,min:500,max:Hc,...d("sum",{parse:e=>({min:Number(e),max:Hc}),format:({min:e})=>String(e)})}),o(ol,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(ps,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Xc=e=>ot((e?.paramsSource?.rateRows||[]).filter(qc).flatMap((e=>Wc(e.minMonths,e.maxMonths)))),Gc=e=>ot(e.flatMap((e=>e||[])).filter(qc).flatMap((e=>Wc(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Jc=[{key:"10"},{key:"50"},{key:"100"}],Zc=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(Nn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:Jc,iconVersion:"black"})]})},Qc="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",ed=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:Qc,"aria-label":`Страница ${i}`,children:i},String(t)):null},td={width:"24",height:"24"},nd=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:ld(1===e),...td})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Qc,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(ed),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Qc,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:ld(e===n),...td})})]})},ld=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",ad=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(nd,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(Zc,{itemCount:l,onItemCountChange:a}):null]}),id=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:u("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:u("h-14 w-full px-10 text-l text-black box-border rounded-md",rn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),rd=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(id,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Dl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Dl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(Si,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),sd=(e,t)=>o(Ds,{...e,iconBgVersion:t,className:"shrink-0"}),od=({title:e,timestamp:t,publicId:n})=>{const l=he(),{href:a}=l({href:`/api/v1/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[sd({icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(De,{size:"text-m","font-weight":"font-light",children:xt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)},cd="/api/v1/depository",dd={startDate:void 0,endDate:void 0,query:""},md=ht((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:h}]=_t(dd),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?xt(l,!0):"",r=a?xt(a,!0):"",s=new URLSearchParams(cd);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=Gn(cd+o,st);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(rd,{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-4 @lg:col-span-2 hidden @lg:block",children:o(De,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(De,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(od,{...e},String(e.publicId)))):o(Pr,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(ad,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),ud=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,hd=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:ud(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(ye,{version:a?.version,text:a?.text,...a}):null]})));const pd="/api/v1/region",gd="location";function fd(e="Москва"){return a((()=>de.subscribe("location",bd)),[]),t=de.emitter,n="location",l=function(e){return async()=>{globalThis.localStorage?.hasItem(gd)||bd(await rt(pd));const t=globalThis.localStorage?.getItem(gd);try{return t&&JSON.parse(t)}catch(e){}return{name:e}}}(e),a((()=>{const e=l instanceof Function?l():l;e instanceof Promise?e.then((e=>t.subject(n,e)),console.warn):t.subject(n,e)}),[t,n]),i((e=>t.fire(n,e)),[t,n]);var t,n,l}function xd(e="Москва"){return Oc(de.observable,"location",{name:e})}function bd(e){e&&globalThis.localStorage?.setItem(gd,JSON.stringify(e))}var yd;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(yd||(yd={}));const vd=new Intl.NumberFormat("ru",{style:"currency",currency:yd.RUB}),Nd=e=>e?vd.format(e):"",wd="text-m font-light text-secondary-text ",kd=`${wd} text-left`,Sd=`${wd} pl-5xl text-center`,Cd=`${wd} pl-5xl text-right`,Td={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Id=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:kd,children:o(De,{size:"text-m",children:"Валюта"})}),o("th",{className:Sd,children:o(De,{size:"text-m",children:"Купить"})}),o("th",{className:Cd,children:o(De,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Bd)})]}))),Bd=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(ne,{image:{icon:Td[t]},width:"24",height:"24"}):null,o(De,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(De,{size:"text-h6",children:Nd(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(De,{size:"text-h6",children:Nd(e?.buyExchangeRate)})})]},t)},Pd={icon:"GpsIcon"},Md=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Ds,{...Pd,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:"Курс указан для заданного офиса"})]})]}))),Rd=(e,t,n)=>{const l=Number(Dd(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},Dd=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Vd=e=>Pt([[e=>e.value!==yd.RUB&&e.oppositeValue!==yd.RUB,()=>e.handleConvert(e.value,yd.RUB)],[e=>e.value===yd.RUB&&e.oppositeValue===yd.RUB,()=>e.handleConvert(e.value,yd.USD)],[e=>e.value===yd.RUB&&e.oppositeValue===yd.RUB,()=>e.handleConvert(e.value,yd.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function zd(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(on,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(Nn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Ad=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||yd.RUB,selectBuy:n?.[0]?.currency?.currency||yd.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[zd({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:_d(r,d,n),value:r.inputSell,setValue:e=>Od(d,n)(e,r.selectSell,r.selectBuy)}),zd({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Fd(r,d,t),value:r.inputBuy,setValue:e=>Ed(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(ye,{text:a.text,version:a?.version,...a}):null]})})),_d=(e,t,n)=>l=>{t({selectSell:l}),Vd({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{Od(t,n)(e.inputSell,l,a)}})},Fd=(e,t,n)=>l=>{t({selectBuy:l}),Vd({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>Ed(t,n)(e.inputBuy,l,a)})},Od=(e,t)=>(n,l,a)=>{e({inputSell:Dd(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(Rd(n,i,l===yd.RUB)||"")})},Ed=(e,t)=>(n,l,a)=>{e({inputBuy:Dd(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(Rd(n,i,l===yd.RUB)||"")})};const jd=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const a=function(e){const t=e?.code||"000",{data:n}=Gn(`/api/v1/exchangerates?regionCode=${t}`,st);return n||{}}(xd()),i=Ld(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:yd.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:yd.RUB}}),o(g,{className:u("box-border min-h-80",e),...l,children:o(Te,{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(Id,{className:"mb-xl",exchangeCurrencyItems:i}):null,o(Md,{address:a?.address})]}),o(Ad,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),Ld=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],$d=d((({className:e="",items:t})=>{const n=he();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(Ud(n))})})),Ud=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...pe(t),children:a||null})},String(l)):null},qd=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>o(os,{tag:"button",className:u("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:l,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[sd(a,t),e?o(De,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Wd=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Hd=(e=!1)=>e?"MinusIcon":"PlusIcon",Yd=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Kd=ht((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:l="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=ke();return o(g,{className:u("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(qi,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Wi,{className:u("gap-lg",Wd(m)),isUnfolded:e,children:R({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Xd({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),Xd=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?Yd(e):Hd(e))(a,r);return"accordion"===e?o(qd,{label:s,labelIcon:n,labelIconBgVersion:l,icon:c,onToggle:i}):o(cs,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Gd=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:Jd(e)}))),Jd=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(Kd,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o($d,{items:e.items}):null},String(t)))),Zd=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(Qd)}):null)),Qd=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(De,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(em)})]},String(t)),em=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:tm(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),tm=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${nm(t)}`,children:o(De,{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})}},nm=e=>e.replaceAll(/\D/g,""),lm=d((({className:e="",index:t,text:n,...l})=>{const a=he(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:u("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),am=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(De,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(lm,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),im=d((({className:e="",index:t,...n})=>{const l=he(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:u("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}`})})),rm=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(De,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(im,{index:t,...e},String(t))))}):null]}))),sm=ht((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{};n.options?.page?.common;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:h,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Gd,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Zd,{items:r}),m?o(ye,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(Vc,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(ye,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(am,{title:d,links:i}),o(rm,{links:a,license:h})]})})),om=ht((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],h=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=n?.text?n.text:"Перейти";return o(g,{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(Cn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(ye,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:Mc(i,s?.key),children:f})}):null]})})})),cm={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},dm=d((({version:e,text:t,mobileText:n,...l})=>{const a=ke()?n:t;return a?o(ye,{className:u("py-s px-lg font-light whitespace-nowrap",cm["transparent"===e?"transparent":"default"]),...l,children:a}):null})),mm=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:l,version:a,backwardButton:r})=>{const s=D(),d="/"===s.pathname,{dataFooter:m,dataHeader:u,...h}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(ur,{className:"my-2xs",bgColor:e,logo:h,data:u,showTitle:!1})}):um(p,r),o(dm,{version:a,...l})]})})),um=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(W,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,hm={"bg-white":"primary",transparent:"transparent"},pm=ht((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=hm[e],portal:l,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=l||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:n,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(mm,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...i})})})})),gm=(e=!1)=>e?{}:{padding:"p-0"},fm={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},xm=ht((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=D();return o(g,{className:u("relative flex flex-col",fm[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:R({...c,extraProps:{className:u("w-full",Mr(r)),...gm(l)}})})}),{childrenTypes:[]}),bm=ht((e=>o(xm,{...e})),{childrenTypes:[]}),ym=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?u("flex",Fs[n]):"";return o(g,{className:u(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:l})})})),vm=["байт","Кб","Мб","Гб","Тб","Пб"],Nm=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...pe(i),children:[e,t?c(De,{size:"text-l",font:"font-light",children:[t," ",wm(d,m),o(De,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),wm=(e,t)=>e||t?o("span",{children:", "}):"",km=(e,t)=>(n,l)=>{const a=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${vm[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Cm(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(Nm,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:Sm(t),data:n?.data}),o(Me,{__html:n?.__html})]},String(l))},Sm=e=>e?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,Cm=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},Tm=d((({href:e,__html:t,target:n})=>{const{close:l}=me(),a=D(),r=U(a)(e),s=i((()=>{l()}),[]);return c(Ti,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Me,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(ye,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o(Si,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Im=d((({text:e,href:t,target:n,__html:l,icon:a})=>{if(!e&&!l)return null;const r=(e=>{const{open:t,close:n}=me();return{open:(n={})=>t(o(Tm,{...e}),n),close:n}})({__html:l,href:t,target:n}),s=i((()=>r.open()),[r]);return c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[Sm(a),o(De,{font:"font-light",children:e})]})})),Bm={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Pm=ht((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=D();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Bm[r]),role:"list",children:a.map(Mm(d,i))}):null]})})),Mm=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?Rm(t)(n,l):km(e,t)(n,l)},Rm=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(Im,{...l,icon:e,href:Dm(t)?t?.href:t?.attachment?.src}),o(Me,{__html:t?.__html})]},String(n)):null},Dm=e=>"href"in e,Vm=ht((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:p="primary",...f})=>{const x="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Te,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:je(l,{className:"flex-wrap"}),children:[a?o(De,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:u("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Me,{__html:r,itemSize:"list-m"}):null,o(De,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:u("flex justify-center bg-white rounded-md @xl:-order-1",x),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),zm=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Am=(e=[],t={})=>e.filter((({content:e={}})=>ks(t,e))).length,_m=(e,t)=>e===t;const Fm=(Om=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(_m,((e=_m)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,n])=>Om(n,t[e])))));var Om;const Em=[],jm={},Lm={primary:"bg-white/30",secondary:"bg-main-divider"},$m={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Um=d((({count:e,version:t="secondary"})=>{const n=ke(),l=n?"bg-main-divider":Lm[t],a=$m[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(De,{size:"text-xs",color:a,children:e})})})),qm=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:u("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:u("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},Wm={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Hm={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Ym={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Km={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Xm=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:h,...p}=t;return o(i,{className:u("h-12","block flex-1","cursor-pointer",Wm[l],n?Km[l]:Ym[l]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Hm[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[qm({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Um,{count:m,version:zm(n,l)})}):null]})})})),Gm=d((e=>o(e?.item?.href?Jm:Zm,{...e}))),Jm=d((e=>{const t=he(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(Xm,{...e,tag:"a",item:a,onClick:l})})),Zm=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(Xm,{item:e,onClick:l,...n})})),Qm=(e,t,n)=>(l,a)=>o(Gm,{isActive:l===e,onClick:t,type:n,item:l},String(a)),eu=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(Qm(l,a,t))}))),tu={categories:[],extraOptions:[],propertyType:[],stage:[]},nu=ht((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Cs(tu,{block:a.block,page:a.options?.page}),f=i(((e=tu)=>p(e)),[]),x=(({hotFilters:e=Em,filtrationState:t=jm,blocks:n=Em,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Fm(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Am(n,t.filter),version:zm(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(eu,{...x}),o(bs,{filtrationSchema:n,resetButton:l,field:m,reset:h}),o(ps,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),lu=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),au=d((({children:e})=>lu?e:null)),iu="/icons/MapMarkerClusterIcon.svg",ru="/icons/MapMarkerClusterYellowIcon.svg";function su({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=ou("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=ou("workplaces",e,a),r=cu(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=cu(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=cu(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const ou=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?iu:ru,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),cu=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?iu:ru,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),du={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},mu={...du,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},uu=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(mu).join(" ")} ${n}`,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"})}),hu=e=>globalThis[e];function pu(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=hu(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(hu(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(hu(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}const gu={...du,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},fu=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(gu).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),xu=[55.753995,37.614069],bu=d((({points:e,className:t="",zoom:n=5,isLoad:l})=>{const i=s(null),r=pu("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{i.current?su({yandexMaps:r,map:i.current,points:e,isLoad:l}):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:yu(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),su({yandexMaps:r,map:i.current,points:e,isLoad:l})}))}),[r,e,n,l]),!r)return null;const d="z-10";return c("div",{id:"map",className:u("relative","w-full",t),children:[l?o(gr,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(fu,{yandexMaps:i}),o(fu,{yandexMaps:i,direction:"out"})]}),uu(i,r,u("right-2 top-80",d))]})})),yu=e=>{const t=[Nu(vu(e,0)),Nu(vu(e,1))];return t.every((e=>e))?t:xu},vu=(e,t)=>e.map((e=>e.coords?.[t])),Nu=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,wu={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},ku={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Su={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)},Cu=(e,t,n)=>{const l=zm("all"===t),a=zm("business"===t),i=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?r(l):l;return n(t),a},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(Si,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(Si,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Tu=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Me,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(De,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Iu="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Bu=({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(Kt,{text:a[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(qi,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Iu,children:s}),o(Wi,{className:Iu,isUnfolded:e,children:d})]}),renderFoldButton:Pu(n,l)})}):null})},Pu=(e,t=!1)=>({isUnfolded:n,onToggle:l})=>c("div",{className:"flex space-x-lg",children:[t?o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:l}):null,o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:Mu()})]}),Mu=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),Ru=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(De,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Du=()=>{},Vu=e=>"all"===e?"block":"hidden",zu=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=Du,renderRemoteWorkplaceCard:s=Du,getBalloon:d=Du,getBalloonRemoteWorkplaces:m=Du,descriptionData:h,title:p})=>{const g=p?.includes("Офис"),[f,{field:x,reset:b}]=_t(wu),[y,v,N,w]=r((()=>{const e=Au(t,f),n=Au(a,f),l=[...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,l,n,e.length+n?.length]}),[t,a,f]),[k,S]=l("all"),C={filters:_u([...t,...a]),field:{field:x,reset:b},onlyOffice:g,labels:ku};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Ru(p,w),h?Tu(h):null,g&&Cu(t,k,S),o("div",{className:u("pb-3xl",Vu(k)),children:Bu(C)})]}),o("div",{className:"h-[600px]",children:o(au,{children:o(bu,{points:v,isLoad:n,className:"h-full"})})})]}),c(au,{children:[y.map(i),N.map(s)]})]})})),Au=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Su[t](e)))))},_u=e=>Object.keys(wu).filter((t=>e.filter((e=>Su[t](e))).length)),Fu={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"}},Ou=d((({className:e,children:t,color:n="gray"})=>c("div",{className:u("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Fu[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(De,{size:"text-m",color:Fu[n].text,children:t})]}))),Eu=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:ju({textItems:i,subText:t,children:n,isPhone:l,...a})})),ju=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(De,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Lu(n,s),a?o(De,{color:l,size:"text-m",children:a}):null]}),Lu=(e,t)=>e.filter(Boolean).map(((e,n)=>o(De,{size:"text-l",children:t?o("a",{href:`tel:${$u(e)}`,children:e.trim()}):e.trim()},String(n)))),$u=e=>e.replace(/\D/g,""),Uu=d((({className:e,children:t})=>o("div",{className:u("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}))),qu=["ArrowDownIcon","ArrowUpIcon"],Wu=["Подробнее","Скрыть"],Hu=({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:Wu[Number(e)]}),o(W,{className:"text-primary-text",name:qu[Number(e)],width:"16",height:"16"})]}),Yu=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Gu(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(De,{size:"text-h4",children:Gu(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(De,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Ou,{color:"green",children:Gu(s)})})]}),o("div",{className:"hidden sm:block",children:o(Uu,{className:"flex-wrap",children:m?.map(Xu)})}),o(qi,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Wi,{isUnfolded:e,children:o(Uu,{className:"flex-wrap",children:m?.map(Xu)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Hu({isUnfolded:e,onToggle:t})})]},String(d))},Ku=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Gu(t)} №${n}`,body:e.toUpperCase()}),Xu=(e,t)=>o(Eu,{...e},String(t)),Gu=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Ju=[];const Zu=async e=>{const t=await rt(e,{method:"GET"});return Array.isArray(t)?t:Ju},Qu={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},eh={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)},th=d((({descriptionData:e,className:t})=>{const n=xd(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=Gn(`/api/v1/atms?regionCode=${e}`,Zu);return{data:t||Ju,isLoad:!t&&!n}}(l);return o(zu,{className:t,filterItems:nh,data:a,isLoad:i,initFilterState:Qu,renderCard:Yu,getBalloon:Ku,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),nh=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>eh[t](e))),n=!l.length||l.some((t=>eh[t](e)));return t&&n}))},lh=e=>{const t=ih(e);return o(Eu,{label:"Режим работы",value:t,className:"max-w-none"})},ah=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",ih=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[ah({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),ah({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},rh=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],sh=e=>rh.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),oh=e=>{if(!e)return null;const t=ch(e);return c(Uu,{className:"border-none",children:[o(Eu,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(dh)})}),o(Eu,{label:"Режим работы",className:"max-w-none",children:o(De,{children:e})})]})},ch=e=>{const t=rh.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},dh=({short:e,status:t},n)=>o("div",{className:u("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(De,{size:"text-xs",children:e})},String(n)),mh=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Eu,{label:"Валюта",value:e.currency}):null,t?o(Eu,{label:"Купить",value:String(t)}):null,n?o(Eu,{label:"Продать",value:String(n)}):null]},String(l)),uh=(new Date).getDay(),hh=e=>{const[t]=e?.slice(uh-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Ou,{color:"green",children:a}):null,n&&i?o(Ou,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Ou,{color:"red",children:"Выходной"})},ph=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",gh=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(Eu,{label:e,value:t&&n?n:"",subText:ph({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),fh=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,xh=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,bh=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,yh=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=sh(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(De,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(De,{size:"text-l",children:t})]}):null]}),hh(h)]}),o("div",{className:"hidden sm:block",children:vh({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(qi,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Wi,{isUnfolded:e,children:vh({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Hu({isUnfolded:e,onToggle:t})})]},String(u))},vh=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=sh(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Uu,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Eu,{label:"Факс",value:t,isPhone:!0}),o(Eu,{label:"Телефон филиала",value:e,isPhone:!0}),o(Eu,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Eu,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(Eu,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Eu,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(Uu,{children:o(Eu,{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(gh)})})}):c(Uu,{children:[o(Eu,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(dh)})}),lh(d)]}),r?.businessScheduleVisibleTag?oh(r?.businessScheduleDescription):null,s?.currencies?.length?o(Uu,{className:"flex-wrap",children:s?.currencies?.map(mh)}):null]})},Nh=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=sh(e),n=e?ih(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?fh(n):bh(n,l):xh(n):null})(n)}`;return{header:l,body:i}},wh=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(De,{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(De,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:kh({workScheduleDescription:t})}),o(qi,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Wi,{isUnfolded:e,children:kh({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Hu({isUnfolded:e,onToggle:t})})]},String(n)):null,kh=({workScheduleDescription:e})=>c("div",{children:[c(Uu,{className:"flex",children:[o(Eu,{label:"Операции для физических лиц",children:o(De,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Eu,{label:"Операции для физических лиц",children:o(De,{children:"Оформление и обслуживание банковских карт"})}),o(Eu,{label:"Операции для физических лиц",children:o(De,{children:"Инвестиционное и накопительное страхование"})}),o(Eu,{label:"Операции для физических лиц",children:o(De,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Eu,{label:"Режим работы",className:"max-w-none",children:o(De,{children:e})})]}),Sh=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Ch={branches:[],remoteWorkplaces:[]};const Th=async e=>await rt(e,{method:"GET"})||Ch,Ih=d((({className:e})=>{const t=xd(),n=t?.code??"000",{data:l,isLoad:a}=function(e){const{data:t,error:n}=Gn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,Th);return{data:t||Ch,isLoad:!t&&!n}}(n);return o(zu,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:yh,renderRemoteWorkplaceCard:wh,getBalloon:Nh,getBalloonRemoteWorkplaces:Sh,title:`Офисы филиала ${t?.name}`})})),Bh=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===l?o(Ih,{}):o(th,{descriptionData:e})})})),Ph=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:u("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),Mh=d((({className:e,padding:t,slides:n=[],...l})=>o(g,{className:u("overflow-hidden relative",e),padding:t,...l,children:o(is,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Ge,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),Rh=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",a),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ee(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Dh({__html:i,richVersion:r}):null,Vh({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Vh({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Vh({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?je([l]):null]})]}))),Dh=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Me,{...e,itemSize:"list-s"})}),Vh=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(W,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(De,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(De,{size:"text-xl",color:l,children:t})]})]}):null,zh=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Me,{__html:t,richVersion:n})})})),Ah=d((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:u(rn.split(" ").filter((e=>"rounded"!==e)),Ht,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(De,{color:"text-primary-text",children:t}):null]})}))),_h=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(Ah,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Ah,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Fh=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(Nn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),Oh=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Fh,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Fh,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Eh=["От 1 дня","До 365 дней"],jh=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(De,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(ol,{min:1,max:365,value:e,items:Eh,onChange:t})]}))),Lh=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Fh,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Fh,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),$h=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Oh,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:Uh(m)}),o(jh,{days:a,setDays:e=>m({days:e})}),o(Lh,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:qh(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(De,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(_h,{}),o(ye,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),Uh=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},qh=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Wh=d((({days:e,tariffs:t=[]})=>{const n=Yh(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Hh("Аренда за",e),Hh("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{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:l})})]})]})})),Hh=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(De,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Yh=(e,t)=>{const n=Kh(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},Kh=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},Xh=(e,t)=>e.find((e=>e.branchCode===t)),Gh=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=Xh(l,n.selectedBranch),d=Jh(s?.safeBoxCaseVolumes),m=Zh(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=Qh(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o($h,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Wh,{days:n.days,tariffs:u})]})})),Jh=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Zh=(e,t)=>e?.find((e=>e.volume===t)),Qh=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,ep=[];const tp=async e=>await rt(e,{method:"GET"})||ep,np=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,u]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=Na(),p=lp(m.selectedRegion,h),f=function(e){const{data:t}=Gn(e?`/api/v1/safeboxes?regionCode=${e}`:null,tp);return t||ep}(p),x=i((e=>u((t=>({...t,...e})))),[u]),b=(y=Xh(f,m.selectedBranch)||f,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Gh,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(bu,{points:b,className:"h-[640px]"}):null]})})),lp=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,ap={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"},ip=(e,t,n)=>(l,a)=>{const{button:i}=l;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:rp(e,n)(l,a)}),c("div",{className:u("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[sp(l),i?.text?o(ye,{className:"box-border py-s w-full max-w-60 mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},rp=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=op(e,i),s=i?"transparent"===t:t;return o(g,{className:u("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:cp({step:n,iconVersion:a,i:l,stepVersion:t})})})},sp=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:u("text-s font-light text-left",ap.description),children:e.description}):null,o(Me,{__html:e.__html})]}),op=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",cp=({step:e,iconVersion:t,i:n,stepVersion:l})=>{return Ee(e?.icon)?o(ne,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:u("text-h4","transparent"===l?ap.iconText:(a=l,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var a},dp=d((({className:e="",title:t,description:n,steps:l=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=l.length>3;return c(g,{className:u("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:l.map(ip(d,r,i))}):null,je(a,{isVertical:!0})]})})),mp=d((({isActive:e,item:t,onClick:n})=>c("div",{className:u(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(W,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),up=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=me(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:u("relative min-h-full bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(Ci,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),hp=({menuRef:e,dialogRef:t,closeDialog:n,openDialog:l,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();l(o(up,{onClick:e=>e.stopPropagation(),onClose:n,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:c[r].description||c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];function pp(e){throw new Error(e)}const gp=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(n),o()}),[n,e]),d=i((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return a((()=>de.observable.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:pp(e)}}))),[c,d]),n},fp=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const xp=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(De,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(bp,{...e},String(t))))})]}):null,bp=d((({icon:e,...t})=>{const n=he(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(De,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),yp=(e,t)=>n=>n.name?o(Rc,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Mc(e,n.name),children:o(De,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,vp=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:u(rn,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Np=d((({defaultLocation:e})=>{const t=xd(e),n=he(),{href:l}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Rc,{href:l,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),wp=d((({foreignOffices:e,branches:t})=>{const n=fd(t?.default),[a,s]=l(""),d=Na(),m=r((()=>Sp(d).sort(((e,t)=>(e.name??"").localeCompare(t.name??"")))),[d]),u=r((()=>((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(m,kp)),[m]),{close:h}=me(),p=i((e=>{n(e),h()}),[]);return c(Ti,{className:"pb-20",head:c("div",{children:[o(De,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Np,{defaultLocation:t?.default}),o(vp,{onSearch:s,searchTerm:a})]}),children:[a&&a.length>=3?o("div",{children:m.filter((({name:e})=>e&&fp(e.toLowerCase())(a.toLowerCase())>=.8)).map(yp(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((g=p,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(De,{size:"text-h6",children:e})}),t.map(yp(f,g))]},e)))}),xp(e)]});var g,f})),kp=e=>e.name?.charAt(0)??"",Sp=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),Cp=d((({menuRef:e,menuItem:t,locationDialogProps:n,closeAll:l})=>{const i=(e=>{const{open:t,close:n}=me();return{open:(n={})=>t(o(wp,{...e}),n),close:n}})(n||{}),{name:r}=xd(),s=e?.current?.getBoundingClientRect(),c=G(X.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open(),"reload"===e.data.type&&l(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(up,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),Tp="burgerMenuDialog",Ip=({menuRef:e,centralMenuItem:t,closeAll:n,openDialog:l,locationDialogProps:a})=>{const i=gp(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Tp,i);return[r,{toggle:()=>{r?n():l(o(Cp,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:n}),{id:Tp})}}]},Bp=[],Pp=ht((({sticky:e,...t})=>{const{menuItems:n=Bp}=e??{},a=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),u=r.slice(d),[h,p]=l(-1),[f,x]=l(""),{open:b,closeAll:y}=me(),v=i((()=>{p(-1),x(""),y()}),[y]),N=nn(v),w=s(null),[k,{toggle:S}]=Ip({menuRef:w,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.header}),[{openBottomMenuItemDialog:C}]=hp({menuRef:w,dialogRef:N,closeDialog:v,openDialog:b,leftItems:m,rightItems:u}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{x(t),p(e),y(),C(e,t)}),[y,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:w,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(Mp(I,"left",{activeIndex:h,currentItemPosition:f})),o(mp,{item:a,isActive:k,onClick:e=>T(e)}),u.map(Mp(I,"right",{activeIndex:h,currentItemPosition:f}))]})})})),Mp=(e,t,n)=>(l,a,i)=>o(mp,{item:l,isActive:i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t,onClick:r=>{i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t||r.stopPropagation(),e(a,t)}},l.title||String(a)),Rp="hidden sm:flex absolute z-40",Dp={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Vp=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=Kr({itemCount:t?.length||0});return a((()=>zp(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(Ar,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Dp[i].item,gap:Dp[i].gap,children:t.map(Qm(n,l,i))}),s.canScrollLeft?o(Qr,{className:u("left-6",Rp,Dp[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(es,{className:u("right-6",Rp,Dp[i].buttonTop),onClick:s.scrollRight}):null]})})),zp=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},Ap={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},_p=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(Ap[t].wrapper,e),children:o(Vp,{className:Ap[t].component,tabsType:t,...n})}):null,Fp=ht((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=Op(n??{}),p=D(),f=t.every((e=>"link"===e?.type)),x=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(Lp(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[h]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[h])):w;v(-1===e?0:e)}),[b,w,h]);const k=jp(x[y],y),S=i((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(h,e?.tabName??String(t)):n.delete(h),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:u({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[_p({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Ep(t,x),activeItem:N,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>M(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(jp)?.filter(Boolean)||[]}),Op=({__id:e,anchor:t})=>t??e??"tabs",Ep=(e,t)=>t?.length?t:e,jp=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Lp=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),$p={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Up=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:$p[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),qp=d((({className:e="",isOpen:t,onClick:n})=>o(ye,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),Wp={Buttons:({buttons:e})=>je(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Me,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(De,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(De,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(qp,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},Hp=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return Yp({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Yp=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in Wp))return null;return o(Wp[n],{...t,...l})},Kp=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Hp,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Xp=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),Gp=(e,t)=>e?.length>0?o("div",{className:u("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(De,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Jp=d((({rows:e})=>{return o(Ar,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=u("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(De,{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(-${Xp(a,t)}px)`},children:a?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(De,{size:"text-xl",children:e.data}):null,e?.cols?Gp(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),Zp=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(De,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(Jp,{rows:t.rowsData})})})]},l)}))}))),Qp=(e=!1)=>""+(e?"text-white":"text-secondary-text"),eg=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:u("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(De,{size:"text-xl",font:"font-light",color:Qp(t===n),children:e||t+1})},e)))}):null,t?o(ye,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),tg=ht((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],u=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(eg,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Zp,{activeTabIndex:r,items:m}),o(qp,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(De,{size:"text-h6",children:"Данных нет"}),o(qp,{onClick:n,isOpen:!0})]})})),ng=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:u("@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(tg,{...t,onClick:n})}):null]}))),lg=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[h,p]=l(void 0),g=i((e=>p(e)),[]);return c(ng,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:u("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(De,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Up,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Kp,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function ag({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?c("div",{children:[n?o(Zr,{className:u("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?o(Zr,{className:u("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const ig=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,ag({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),rg=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],h=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[f,x]=((e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:p,visibleItemCount:2}),b=(h||[]).map(((e,t)=>o(lg,{row:e,activeIndex:f,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?o(qi,{renderFoldableSection:({isUnfolded:e})=>c(ig,{controls:x,children:[y,o(Wi,{isUnfolded:e,children:v})]}),renderFoldButton:ds}):o(ig,{controls:x,children:b})})]})})),sg=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:u("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?og():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(De,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?cg(n):null,a?o(Me,{richVersion:i,__html:a}):null]})]}))),og=()=>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"}),cg=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),dg=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(De,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(De,{size:"text-h2",children:n})}):null]}))),mg=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(dg,{prefix:t,unit:n,suffix:l})})})),ug={AdTile:gt,ApplicationForm:Oi,ApplicationLeadForm:Tr,BankAccountFiltration:Bs,BenefitsBlock:Vs,BonusBenefitsBlock:_s,ButtonsBlock:Os,CalculatorBonus:Qs,CalculatorBusinessDeposit:xo,CalculatorCredit:Do,CalculatorDeposit:Go,CalculatorRefinancing:ac,CardTransfer:mc,Carousel:yc,CarouselCard:kc,CarouselCatalogCard:Cc,CarouselLinks:Bc,CarouselRecommendationCard:_c,CarouselTariffsCard:Uc,DepositFiltration:Kc,Depository:md,ErrorBlock:hd,ExchangeRateTile:jd,Footer:sm,GrantSupport:om,Header:pm,Headline:C,HorizontalLayout:bm,ImgBlock:ym,LinkDocs:Pm,MobileAppTile:Vm,MortgageFiltration:nu,OfficesAtmsMap:Bh,Placeholder:Ph,ProductBlock:pt,ProductGallery:Mh,RepresentativeOfficeInfo:Rh,RichTextBlock:zh,RollupItem:Kd,SafeDepositRental:np,StepsBlock:dp,StickyBottomMenu:Pp,TabsLayout:Fp,TariffsTable:rg,TextBlock:sg,UnitBlock:mg,VerticalLayout:xm},hg=ue((()=>{a((()=>{Tt()}),[]);const e=zt();tn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");St({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const pg="cookie",gg=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=en();!function(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(pg)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(pg,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Me,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Ci,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null})),fg=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=gp({onCloseAll:e,onClose:t}),{close:l}=me(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return tn(globalThis.document,"keydown",r),a((()=>{n.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"))}),[n]),n.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},l)=>o("div",{className:u("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==n.length-1}),children:e},String(t||l))))}):null})),xg=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);a((()=>de.observable.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:pp(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return tn(globalThis.document,"keydown",r),e?o("div",{className:u("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})),bg="header",yg="footer",vg="sticky-footer",Ng={},wg=d((({className:e,data:t=Ng,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=ut(s,r);hg();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:u("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:M(a?.header,{...m,slotName:bg})}):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"}}),M(a?.footer,{...m,slotName:yg})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.["sticky-footer"],{...m,slotName:vg})}):null,o(fg,{}),o(xg,{}),o(gg,{__html:d?.cookieContent?.__html})]})}));Object.assign(wg,{childrenTypes:[],slots:()=>[bg,yg,vg]});e.Blocks=ug,e.ContentPage=wg,e.handlerDecorator=ue,e.joinList=fs,e.packageVersion="0.14.597",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=j,e.useRouter=D,Object.defineProperty(e,"__esModule",{value:!0})}));