@redneckz/wildless-cms-uni-blocks 0.13.4 → 0.13.5

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 (223) hide show
  1. package/bin/migration-scripts/0.13.4.js +30 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +110 -85
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Carousel/CarouselContent.d.ts +6 -0
  6. package/bundle/components/Carousel/renderCarouselCards.d.ts +3 -1
  7. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +1 -1
  8. package/bundle/ui-kit/Input/InputProps.d.ts +1 -0
  9. package/bundle/ui-kit/List/ListContent.d.ts +2 -2
  10. package/bundle/ui-kit/Select/Select.d.ts +1 -0
  11. package/dist/components/ApplicationForm/ApplicationFormCredit.js +2 -1
  12. package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  13. package/dist/components/ApplicationForm/PhoneInputControl.js +1 -1
  14. package/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
  15. package/dist/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
  16. package/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  17. package/dist/components/ApplicationForm/renderCreditParameters.js +1 -1
  18. package/dist/components/ApplicationForm/renderCreditParameters.js.map +1 -1
  19. package/dist/components/ApplicationForm/renderRegion.js +1 -1
  20. package/dist/components/ApplicationForm/renderRegion.js.map +1 -1
  21. package/dist/components/ApplicationForm/renderRegionDepartment.js +1 -1
  22. package/dist/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
  23. package/dist/components/Carousel/Carousel.js +2 -2
  24. package/dist/components/Carousel/Carousel.js.map +1 -1
  25. package/dist/components/Carousel/CarouselContent.d.ts +6 -0
  26. package/dist/components/Carousel/renderCarouselCards.d.ts +3 -1
  27. package/dist/components/Carousel/renderCarouselCards.js +12 -3
  28. package/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  29. package/dist/components/CarouselLinks/CarouselLinks.js +1 -1
  30. package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  31. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +1 -1
  32. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js +1 -1
  33. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js.map +1 -1
  34. package/dist/components/Headline/headlineVersionStyles.js +1 -1
  35. package/dist/ui-kit/BaseTile/BaseTile.js +1 -1
  36. package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  37. package/dist/ui-kit/Input/Input.js +2 -2
  38. package/dist/ui-kit/Input/Input.js.map +1 -1
  39. package/dist/ui-kit/Input/InputProps.d.ts +1 -0
  40. package/dist/ui-kit/List/List.js +2 -0
  41. package/dist/ui-kit/List/List.js.map +1 -1
  42. package/dist/ui-kit/List/ListContent.d.ts +2 -2
  43. package/dist/ui-kit/List/ListItem.js +1 -0
  44. package/dist/ui-kit/List/ListItem.js.map +1 -1
  45. package/dist/ui-kit/Select/Select.d.ts +1 -0
  46. package/dist/ui-kit/Select/Select.js +18 -4
  47. package/dist/ui-kit/Select/Select.js.map +1 -1
  48. package/lib/common.css +1 -1
  49. package/lib/components/ApplicationForm/ApplicationFormCredit.js +2 -1
  50. package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  51. package/lib/components/ApplicationForm/PhoneInputControl.js +1 -1
  52. package/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
  53. package/lib/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
  54. package/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  55. package/lib/components/ApplicationForm/renderCreditParameters.js +1 -1
  56. package/lib/components/ApplicationForm/renderCreditParameters.js.map +1 -1
  57. package/lib/components/ApplicationForm/renderRegion.js +1 -1
  58. package/lib/components/ApplicationForm/renderRegion.js.map +1 -1
  59. package/lib/components/ApplicationForm/renderRegionDepartment.js +1 -1
  60. package/lib/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
  61. package/lib/components/Carousel/Carousel.js +2 -2
  62. package/lib/components/Carousel/Carousel.js.map +1 -1
  63. package/lib/components/Carousel/CarouselContent.d.ts +6 -0
  64. package/lib/components/Carousel/renderCarouselCards.d.ts +3 -1
  65. package/lib/components/Carousel/renderCarouselCards.js +12 -3
  66. package/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  67. package/lib/components/CarouselLinks/CarouselLinks.js +1 -1
  68. package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  69. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +1 -1
  70. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js +1 -1
  71. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js.map +1 -1
  72. package/lib/components/Headline/headlineVersionStyles.js +1 -1
  73. package/lib/ui-kit/BaseTile/BaseTile.js +1 -1
  74. package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  75. package/lib/ui-kit/Input/Input.js +2 -2
  76. package/lib/ui-kit/Input/Input.js.map +1 -1
  77. package/lib/ui-kit/Input/InputProps.d.ts +1 -0
  78. package/lib/ui-kit/List/List.js +2 -0
  79. package/lib/ui-kit/List/List.js.map +1 -1
  80. package/lib/ui-kit/List/ListContent.d.ts +2 -2
  81. package/lib/ui-kit/List/ListItem.js +1 -0
  82. package/lib/ui-kit/List/ListItem.js.map +1 -1
  83. package/lib/ui-kit/Select/Select.d.ts +1 -0
  84. package/lib/ui-kit/Select/Select.js +19 -5
  85. package/lib/ui-kit/Select/Select.js.map +1 -1
  86. package/mobile/bundle/bundle.umd.js +111 -22
  87. package/mobile/bundle/bundle.umd.min.js +1 -1
  88. package/mobile/bundle/components/Carousel/CarouselContent.d.ts +6 -0
  89. package/mobile/bundle/components/Carousel/renderCarouselCards.d.ts +3 -1
  90. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  91. package/mobile/bundle/ui-kit/Input/InputProps.d.ts +1 -0
  92. package/mobile/bundle/ui-kit/List/ListContent.d.ts +2 -2
  93. package/mobile/bundle/ui-kit/Select/Select.d.ts +1 -0
  94. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +2 -1
  95. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  96. package/mobile/dist/components/ApplicationForm/PhoneInputControl.js +1 -1
  97. package/mobile/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
  98. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
  99. package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  100. package/mobile/dist/components/ApplicationForm/renderCreditParameters.js +1 -1
  101. package/mobile/dist/components/ApplicationForm/renderCreditParameters.js.map +1 -1
  102. package/mobile/dist/components/ApplicationForm/renderRegion.js +1 -1
  103. package/mobile/dist/components/ApplicationForm/renderRegion.js.map +1 -1
  104. package/mobile/dist/components/ApplicationForm/renderRegionDepartment.js +1 -1
  105. package/mobile/dist/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
  106. package/mobile/dist/components/Carousel/Carousel.js +2 -2
  107. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  108. package/mobile/dist/components/Carousel/CarouselContent.d.ts +6 -0
  109. package/mobile/dist/components/Carousel/renderCarouselCards.d.ts +3 -1
  110. package/mobile/dist/components/Carousel/renderCarouselCards.js +12 -3
  111. package/mobile/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  112. package/mobile/dist/components/CarouselLinks/CarouselLinks.js +1 -1
  113. package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  114. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  115. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
  116. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  117. package/mobile/dist/components/Footer/buttonSizeStyles.js +1 -1
  118. package/mobile/dist/components/Headline/headlineVersionStyles.js +1 -1
  119. package/mobile/dist/ui-kit/BaseTile/BaseTile.js +1 -1
  120. package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  121. package/mobile/dist/ui-kit/Input/Input.js +2 -2
  122. package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
  123. package/mobile/dist/ui-kit/Input/InputProps.d.ts +1 -0
  124. package/mobile/dist/ui-kit/List/List.js +2 -0
  125. package/mobile/dist/ui-kit/List/List.js.map +1 -1
  126. package/mobile/dist/ui-kit/List/ListContent.d.ts +2 -2
  127. package/mobile/dist/ui-kit/List/ListItem.js +1 -0
  128. package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
  129. package/mobile/dist/ui-kit/Select/Select.d.ts +1 -0
  130. package/mobile/dist/ui-kit/Select/Select.js +18 -4
  131. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  132. package/mobile/lib/common.css +1 -1
  133. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +2 -1
  134. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  135. package/mobile/lib/components/ApplicationForm/PhoneInputControl.js +1 -1
  136. package/mobile/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
  137. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
  138. package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
  139. package/mobile/lib/components/ApplicationForm/renderCreditParameters.js +1 -1
  140. package/mobile/lib/components/ApplicationForm/renderCreditParameters.js.map +1 -1
  141. package/mobile/lib/components/ApplicationForm/renderRegion.js +1 -1
  142. package/mobile/lib/components/ApplicationForm/renderRegion.js.map +1 -1
  143. package/mobile/lib/components/ApplicationForm/renderRegionDepartment.js +1 -1
  144. package/mobile/lib/components/ApplicationForm/renderRegionDepartment.js.map +1 -1
  145. package/mobile/lib/components/Carousel/Carousel.js +2 -2
  146. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  147. package/mobile/lib/components/Carousel/CarouselContent.d.ts +6 -0
  148. package/mobile/lib/components/Carousel/renderCarouselCards.d.ts +3 -1
  149. package/mobile/lib/components/Carousel/renderCarouselCards.js +12 -3
  150. package/mobile/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  151. package/mobile/lib/components/CarouselLinks/CarouselLinks.js +1 -1
  152. package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  153. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
  154. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
  155. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  156. package/mobile/lib/components/Footer/buttonSizeStyles.js +1 -1
  157. package/mobile/lib/components/Headline/headlineVersionStyles.js +1 -1
  158. package/mobile/lib/ui-kit/BaseTile/BaseTile.js +1 -1
  159. package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  160. package/mobile/lib/ui-kit/Input/Input.js +2 -2
  161. package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
  162. package/mobile/lib/ui-kit/Input/InputProps.d.ts +1 -0
  163. package/mobile/lib/ui-kit/List/List.js +2 -0
  164. package/mobile/lib/ui-kit/List/List.js.map +1 -1
  165. package/mobile/lib/ui-kit/List/ListContent.d.ts +2 -2
  166. package/mobile/lib/ui-kit/List/ListItem.js +1 -0
  167. package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
  168. package/mobile/lib/ui-kit/Select/Select.d.ts +1 -0
  169. package/mobile/lib/ui-kit/Select/Select.js +19 -5
  170. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  171. package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +2 -1
  172. package/mobile/src/components/ApplicationForm/PhoneInputControl.tsx +1 -0
  173. package/mobile/src/components/ApplicationForm/renderCreditDataOrganization.tsx +1 -1
  174. package/mobile/src/components/ApplicationForm/renderCreditParameters.tsx +2 -2
  175. package/mobile/src/components/ApplicationForm/renderRegion.tsx +1 -0
  176. package/mobile/src/components/ApplicationForm/renderRegionDepartment.tsx +1 -0
  177. package/mobile/src/components/Carousel/Carousel.example.json +2 -1
  178. package/mobile/src/components/Carousel/Carousel.tsx +2 -1
  179. package/mobile/src/components/Carousel/CarouselContent.ts +7 -0
  180. package/mobile/src/components/Carousel/renderCarouselCards.tsx +20 -4
  181. package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
  182. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +7 -7
  183. package/mobile/src/components/Footer/buttonSizeStyles.ts +1 -1
  184. package/mobile/src/components/Headline/headlineVersionStyles.ts +1 -1
  185. package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +1 -1
  186. package/mobile/src/ui-kit/Input/Input.tsx +2 -0
  187. package/mobile/src/ui-kit/Input/InputProps.ts +1 -0
  188. package/mobile/src/ui-kit/List/List.tsx +2 -0
  189. package/mobile/src/ui-kit/List/ListContent.ts +2 -2
  190. package/mobile/src/ui-kit/List/ListItem.tsx +1 -0
  191. package/mobile/src/ui-kit/Select/Select.tsx +46 -12
  192. package/package.json +1 -1
  193. package/src/components/ApplicationForm/ApplicationFormCredit.tsx +2 -1
  194. package/src/components/ApplicationForm/PhoneInputControl.tsx +1 -0
  195. package/src/components/ApplicationForm/renderCreditDataOrganization.tsx +1 -1
  196. package/src/components/ApplicationForm/renderCreditParameters.tsx +2 -2
  197. package/src/components/ApplicationForm/renderRegion.tsx +1 -0
  198. package/src/components/ApplicationForm/renderRegionDepartment.tsx +1 -0
  199. package/src/components/Carousel/Carousel.example.json +2 -1
  200. package/src/components/Carousel/Carousel.fixture.tsx +2 -0
  201. package/src/components/Carousel/Carousel.tsx +2 -1
  202. package/src/components/Carousel/CarouselContent.ts +7 -0
  203. package/src/components/Carousel/renderCarouselCards.tsx +20 -4
  204. package/src/components/CarouselLinks/CarouselLinks.fixture.tsx +12 -9
  205. package/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
  206. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.mobile.tsx +1 -1
  207. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.tsx +7 -7
  208. package/src/components/Headline/headlineVersionStyles.ts +1 -1
  209. package/src/ui-kit/BaseTile/BaseTile.tsx +1 -1
  210. package/src/ui-kit/Input/Input.tsx +2 -0
  211. package/src/ui-kit/Input/InputProps.ts +1 -0
  212. package/src/ui-kit/List/List.tsx +2 -0
  213. package/src/ui-kit/List/ListContent.ts +2 -2
  214. package/src/ui-kit/List/ListItem.tsx +1 -0
  215. package/src/ui-kit/Select/Select.tsx +46 -12
  216. package/bundle/components/Footer/buttonSizeStyles.mobile.d.ts +0 -4
  217. package/dist/components/Footer/buttonSizeStyles.mobile.d.ts +0 -4
  218. package/dist/components/Footer/buttonSizeStyles.mobile.js +0 -7
  219. package/dist/components/Footer/buttonSizeStyles.mobile.js.map +0 -1
  220. package/lib/components/Footer/buttonSizeStyles.mobile.d.ts +0 -4
  221. package/lib/components/Footer/buttonSizeStyles.mobile.js +0 -5
  222. package/lib/components/Footer/buttonSizeStyles.mobile.js.map +0 -1
  223. package/src/components/Footer/buttonSizeStyles.mobile.ts +0 -6
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get FOOTER(){return this._.FOOTER}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t};class f{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const b=new f;function y(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:v(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function v(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const N=new f;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),S={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},k=g((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return y(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];N.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[g,x]=n(!1);a((()=>b.subscribe("tab",(e=>{x(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:w("@container font-sans",f?"group":"",S[t],g?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),C={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=g((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=C[l]||"h3";return u(i,{className:w("font-sans m-0",I[t],e),children:n||a})})),B=e=>e,R=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=B,format:i=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),g=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:g}]},V=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],M=e=>!e?.length,P=e=>t=>l=>e(l)?[]:[t],_=e=>null!=e,z=new Map;function j(e,t,{fallback:l,cache:i}={}){const s=r((()=>A(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{!s.some(_)||(async()=>{try{const e=await(o?((e,t=z)=>l=>{const n=t.get(l);if(_(n))return n;const a=e(l);return _(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s));d(e),h(void 0)}catch(e){d(void 0),h(e)}})()}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function A(e){return Array.isArray(e)?e:e instanceof Function?A(e()):[e]}async function E(e,t){try{return e?await D(e,t):null}catch(e){console.error(e)}return null}async function D(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}const $=[];function O(){const{data:e}=j("/api/v1/regions",D);return e||$}const L=e=>Boolean(e?.includes(":")),F=(e,t)=>Boolean(e&&!L(e)&&(!t||"_self"===t)),U=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var H=Object.freeze({__proto__:null,isURL:L,isLocalURL:F,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:U});const K=e=>(t,l=d.BASE_PATH)=>{if(!t||L(t)||W(t,d.CDN))return t;const n=t.startsWith("/");return U(W(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W=(e,t)=>t&&e&&e.startsWith(t),G=(e,t)=>G._impl(e,t);function X(){return X._impl()}function J(e={}){const{isRemote:t,basePath:l}=e,n=X(),{closeAll:a}={open:(e,t={})=>b.fire("dialog",{type:"open",dialog:e,...t}),close:()=>b.fire("dialog",{type:"close"}),closeAll:()=>b.fire("dialog",{type:"close",all:!0})};return e=>({...e,href:t&&!l?e.href:K(n)(e.href,l),"aria-label":e.text,onClick:G(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&F(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}G._impl=e=>e,G.setup=e=>{G._impl=e},X._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),X.setup=e=>{X._impl=e};const Y={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},q="bg-main-divider text-main-disabled",Z={primary:q,secondary:q,white:q,link:"",transparent:"",gray:q,"":""},Q="text-center font-sans select-none",ee={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},te=g((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e;return p("div",{className:w(le(e),"flex gap-xs"),children:[n?u("div",{className:ee[i],children:n}):null,ne(e)?p("div",{children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:ee[i],children:a}):null]})})),le=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return["group/btn items-center justify-center",ne(e)?a:"h-12 w-12",n?"rounded-full":""].join(" ")},ne=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ae=({className:e,rounded:t,version:l})=>["inline-block",Q,l?Z[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ie=({className:e,rounded:t,version:l})=>[Q,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?Y[l]:"",t?"rounded-full":"rounded-md",e].join(" "),re=g((({disabled:e,children:t,...l})=>{const n=J()(l),a=t??u(te,{...n});return u(e?oe:se,{...n,children:a})})),se=g((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:ie({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),oe=g((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ae({className:e,rounded:n,version:l}),children:a}))),ce=g((({children:e,...t})=>u("p",{className:w("font-sans",Object.values(t)),children:e}))),de=g((({children:e,...t})=>u("span",{className:w("font-sans",Object.values(t)),children:e}))),me=g((({link:e})=>p(ce,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(de,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(re,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(de,{children:e.text})}):null]}))),he=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},ue=g((({key:e,className:t="",inputClassName:l="",id:n,name:a,type:r="text",label:s,placeholder:o,value:c="",valid:d=!0,children:m,onChange:h,onFocus:g,onBlur:x,pattern:f})=>{const b=i((e=>{h&&h(e.target?.value||"")}),[h]),y=m?"pr-3xl":"",v=d?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[s?u("div",{className:"mb-xs",children:u(de,{size:"text-m",font:"font-light",children:s})}):null,u("input",{className:w("w-full border rounded-md text-primary-text outline-none p-m",y,v,l),id:n,name:a||n,placeholder:o,type:r,value:c,onInput:b,onFocus:g,onBlur:x,pattern:f},e)]}),m]})})),pe=g((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(ue,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),ge=e=>"_"===e,xe=e=>/\d/.test(e),fe=e=>ge(e)||xe(e),be=[..."+7 (___) ___-__-__"],ye=be.findIndex(ge),ve=be.map(((e,t)=>fe(e)?be.slice(0,t).filter(fe).length:-1));const Ne=g((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=be.map(((e,l)=>xe(e)?e:t.charAt(ve[l])||e)),n=ve.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(ye,n)):l).join("")}(e))),[t]);return u(ue,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),we=g((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(Ne,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),Se="Некорректно заполненное поле",ke=P((e=>null!=e&&""!==e))(Se),Ce=P((e=>"string"==typeof e&&e.length>1))(Se),Ie=P((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Se),Te=(Be=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,P((e=>"string"==typeof e&&Be.test(e))))(Se);var Be;const Re=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Наименование организации",...he(e("fullName"),ke)}),u(pe,{className:"shrink-0 w-full",label:"Контактное лицо",...he(e("name"),Ce)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"ИНН",...he(e("inn"),Ie)}),u(we,{className:"shrink-0 w-full",label:"Телефон",...he(e("phone"),Te)})]})]}),Ve=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function Me(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const Pe={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},_e=g((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",...r})=>{const s=X(),o=K(s)(U(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(je,{className:e,children:p("svg",{className:w(ze(r.width),Pe[i],"white"===i?"invert":"",t),...r,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):(e.includes("h-")||(r.style={height:`${r.height}px`}),u("img",{className:e,src:o,alt:n,title:a,"aria-hidden":"true",...r}))})),ze=e=>e?"":"w-full h-full",je=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),Ae=g((({className:e="",label:t,options:l=[],value:n,valid:r=!0,isBorder:o=!0,placeholder:c="",onChange:d})=>{const[m,{setFalse:h,toggle:g}]=Me(),x=function(e){const t=s(null);return a((()=>{const l=l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[e]),t}(h),f=i((e=>{h(),d&&d(e)}),[d]);return p("div",{className:e,ref:x,children:[t?u("div",{className:"mb-xs",children:u(de,{size:"text-m",color:"text-primary-text",font:"font-light",children:t})}):null,p("div",{className:w("relative",m?"z-20":"z-10"),children:[p("div",{className:w("text-l flex justify-between items-center text-primary-text cursor-pointer",$e(o,r)),onClick:g,children:[u("p",{className:"p-m pr-3xl h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:De(n)||c}),u(_e,{className:w("absolute right-3",m?"":"rotate-180"),name:"ArrowUpIcon",width:"16",height:"16"})]}),l?.length?u("div",{className:w("h-0",m?"":"overflow-hidden"),children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:l.map(Ee(f,m,(e=>e.key===n?.key)))})}):null]})]})})),Ee=(e,t,l)=>(n,a)=>p("div",{onClick:()=>{e(n)},className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",children:[u("span",{className:"min-h-6",children:De(n)}),u(_e,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-3xs",l(n)&&t?"":"hidden")})]},String(a)),De=e=>e?.text||e?.key||"",$e=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Oe=g((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(Ae,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),Le=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider sm:border-none sm:flex sm:justify-between gap-lg ",children:[u("div",{className:"sm:w-1/2",children:u(Oe,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ve.map((({name:e=""})=>({key:e,text:e}))),...he(t("acquiringType"),ke)})}),u("div",{className:"sm:w-1/2",children:u(Oe,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(t("region"),ke)})})]}),Fe=g((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:w("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(de,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),Ue=e=>p("div",{children:[u(Fe,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Fe,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),He=(e,t)=>{const l=ie({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-m w-full sm:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},Ke={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},We=V({acquiringType:ke,region:ke,fullName:ke,inn:Ie,name:Ce,phone:Te}),Ge=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;M(We(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s})}),[n]),[,{field:r,...s}]=R(Ke,a),o=O();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"sm:text-center"}),Le({regions:o,field:r}),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Re(r),Ue(r),He(t),u(me,{link:l})]})})),Xe=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Контактное лицо",...he(e("name"),Ce)}),u(pe,{className:"shrink-0 w-full",label:"ИНН",...he(e("inn"),Ie)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(we,{className:"shrink-0 w-full",label:"Телефон",...he(e("phone"),Te)}),u(pe,{className:"shrink-0 w-full",label:"Электронная почта",...he(e("mail"),ke)})]})]}),Je=({regions:e,field:t})=>u(Oe,{className:"w-full",label:"Регион",placeholder:"Выберите регион",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(t("region"),ke)}),Ye={name:"",phone:"",inn:"",mail:""},qe=V({region:ke,name:Ce,phone:Te,inn:Ie,mail:ke}),Ze=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;M(qe(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,phone:a,inn:i,mail:r})}),[n]),[,{field:r,...s}]=R(Ye,a),o=O();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[Je({regions:o,field:r}),Xe(r),He(t),u(me,{link:l})]})})),Qe=[];const et=async e=>await E(e,{method:"GET"})||Qe,tt=["От 1 000 ₽","До 1 000 000 000 ₽"],lt=["От 1 мес","До 15 лет"],nt=e=>p("div",{className:"pb-2xs border-b border-b-main-divider sm:flex sm:justify-between sm:gap-lg sm:border-none sm:pb-0",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Наименование организации",...e("fullName")}),u(pe,{className:"shrink-0 w-full",label:"ИНН",...he(e("inn"),Ie)}),u(we,{className:"shrink-0 w-full",label:"Телефон",...he(e("phone"),Te)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...he(e("annualRevenue"),ke)}),u(pe,{className:"shrink-0 w-full",label:"Контактное лицо",...he(e("name"),Ce)}),u(pe,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})]}),at=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},it=(e,t,l)=>Math.max(t,Math.min(e,l)),rt=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function st(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function ot({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s-t)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:"w-2 h-2 rounded-full "+(s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=st(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const ct=1,dt=100,mt=g((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:ct),max:s=(a.length?a.length-1:dt),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=at(e,{normalize:(e=0)=>a.length?ht(a)(e):it(e,r,s),format:rt()}),g=i((e=>{m&&m(st(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(de,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:w("m-0 mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","p-0 pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:g,...h}),ot({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),ut(n)]})})),ht=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),ut=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),pt=e=>p("div",{className:"border-b border-b-main-divider sm:flex sm:justify-between gap-lg sm:border-none",children:[p("div",{className:"sm:w-1/2",children:[u("label",{children:u(de,{size:"text-m",font:"font-light",children:"Сумма кредита, ₽"})}),u(mt,{items:tt,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"sm:w-1/2",children:[u("label",{children:u(de,{size:"text-m",font:"font-light",children:"Срок кредита, месяцев"})}),u(mt,{items:lt,min:1,max:180,...e("term")})]})]}),gt=({regions:e,branches:t,field:l})=>p("div",{className:"sm:flex sm:justify-between sm:gap-m sm:mb-2xl sm:border-none sm:pb-0",children:[u("div",{className:"sm:w-1/2",children:u(Oe,{label:"Регион",placeholder:"Выберите регион",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(l("region"),ke)})}),u("div",{className:"sm:w-1/2",children:u(Oe,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...he(l("department"),ke)})})]}),xt={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},ft=V({annualRevenue:ke,inn:Ie,name:Ce,phone:Te,region:ke,department:ke}),bt=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;M(ft(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s,mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=R(xt,n),o=O(),c=function(e){const{data:t}=j(e?`/api/v1/branches?regionCode=${e}`:null,et);return t||Qe}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры кредита",className:"sm:text-center"}),pt(r),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),nt(r),u(T,{headingType:"h6",title:"Офис банка",className:"sm:text-center"}),gt({regions:o,branches:c,field:r}),He(e),u(me,{link:t})]})})),yt={name:"",phone:""},vt=V({name:Ce,phone:Te}),Nt=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{name:t,phone:l}=e;M(vt(e))&&n({typeForm:"dpst",name:t,phone:l})}),[n]),[,{field:r,...s}]=R(yt,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"sm:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Имя",...he(r("name"),Ce)}),u(we,{className:"shrink-0 w-full",label:"Телефон",...he(r("phone"),Te)})]}),p("div",{className:"flex justify-between flex-col-reverse sm:items-center sm:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(me,{link:l})}),He(t)]})]})})),wt={};function St(e,t=wt){const{data:l}=j(e?`/wcms-resources/${e}.json`:null,D,{fallback:t});return l||wt}const kt=g((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=St(l||"regions-grant-support"),[i,r]=n({key:""}),s=ie({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s sm:space-y-lg",children:[a?u(Oe,{label:"Ваш регион",placeholder:"Выберите регион",options:a.map((({name:e=""})=>({key:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(re,{href:o,target:"_blank",className:w("p-m w-full sm:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Ct=(e,t)=>e?.media&&t?.media?e.media-t.media:0,It=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=X();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Ct).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:Bt(a,n)(e),type:Rt(l),media:i?`(max-width: ${i}px)`:"",...t.size},`${r}_${e}`))):null,t?.src?Tt({...t,src:Bt(a,n)(t.src)},l):null]})})),Tt=(e,t="")=>u("img",{src:e.src,className:w("object-contain",t),alt:e.alt||e.title,title:e.title||"",style:{width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"auto"},...e.size}),Bt=(e,t)=>l=>l&&!L(l)?K(e)(U(t,l)):l,Rt=e=>e?`image/${String(e)}`:void 0,Vt=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(_e,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(It,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),Mt=g((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>u("path",{d:e,fill:t||"currentColor",...r,...l},n)))}))),Pt=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],_t=g((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Mt,{paths:Pt,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":zt(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(de,{size:"text-l",font:"font-light",children:l})}):null]})})})),zt=e=>w("rounded border",e?"bg-primary-main":""),jt=e=>{const t=e("text");return p("div",{className:"space-y-m",children:[p("div",{className:"sm:flex sm:items-center sm:gap-xl",children:[u(_t,{text:"Валютный контроль",...e("currencyControl")}),u(_t,{text:"Документарные операции",...e("documentaryOperations")}),u(_t,{text:"Конверсионные операции",...e("conversionOperations")})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-m outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},At=e=>p("div",{children:[p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"Наименование организации",...he(e("fullName"),ke)})}),u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"ФИО",...he(e("name"),Ce)})})]}),p("div",{className:"sm:flex sm:justify-between sm:gap-lg sm:mb-2xl",children:[u("div",{className:"sm:w-1/2",children:u(we,{className:"shrink-0 w-full mb-s",label:"Телефон",...he(e("phone"),Te)})}),u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"Электронная почта",...he(e("mail"),ke)})})]})]}),Et={fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""},Dt=V({fullName:ke,name:Ce,phone:Te,mail:ke}),$t={ApplicationFormBusinessCard:Ze,ApplicationFormWed:g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,currencyControl:r,documentaryOperations:s,conversionOperations:o,text:c}=e;M(Dt(e))&&n({typeForm:"kved",fullName:t,name:l,phone:a,mail:i,partnerComments:`Валютный контроль=${r}/Документарные операции=${s}/Конверсионные операции=${o}/Доп инф=${c}`})}),[n]),[,{field:r,...s}]=R(Et,a);return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),At(r),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"sm:text-center"}),jt(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg sm:items-center sm:flex-row sm:pb-4xl",children:[He(t),u(me,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"sm:text-center"}),p("div",{className:"flex gap-xl",children:[p("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(Vt,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(Vt,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Nt,ApplicationFormCredit:bt,ApplicationFormAcquiring:Ge,ApplicationFormGrantSupport:kt},Ot=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(Vt,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Lt={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},Ft=g((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async e=>{const t=await Lt.send(e)?"OK":"Fail";return s(t),t}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(T,{headingType:"h3",title:l.title,className:"sm:text-center"}):null,l?Ut(l,o):null,r?u(Ot,{responseType:r}):null]})})})),Ut=(e,t)=>{const l=e?.formType;if(!l||!(l in $t))return null;return u($t[l],{...e,onSubmit:t})},Ht={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Kt=g((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:w("rounded-icon object-fit flex justify-center items-center ",Ht[l],e),children:u(_e,{...i,width:"54%",height:"54%",name:a})}):null})),Wt=g((({className:e="",title:t,benefitList:l,...n})=>p(k,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(T,{headingType:"h3",as:"h2",className:"text-center",title:t}):null,l?.length?u("div",{className:"flex flex-wrap w-full sm:justify-center mt-xl gap-5xl",role:"list",children:l.map(Gt)}):null]}))),Gt=(e,t)=>p("div",{className:"flex gap-m items-center md:basis-1/2 md:max-w-[500px]",role:"listitem",children:[e?.icon?.icon?u(Kt,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(Vt,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"sm:h-full",children:[u(T,{headingType:"h6",children:e.label}),Xt(e.description)]}):null]},String(t)),Xt=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?Yt(e):Jt(e)}):null},Jt=e=>e?.name||null,Yt=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:e},`benefitListItem-${t}`)))}):null},qt={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-l",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},Zt={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},Qt=g((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=qt[l],m={marginTop:d.descriptionStyle};return p(k,{className:w(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(T,{className:w("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(ce,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),el=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),tl=g((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=y(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),ll=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],nl=g((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},x=s([]),f=i(((e,t)=>{const l=[...x.current||[]];l[e]=t,x.current=l,h&&h(l),p&&p(il(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?al(r,b):{},...y?el(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(S=(e,t)=>u(tl,{className:w(c,n?ll[n-1]:"",y?"h-full":""),style:v?al(r/4):{},activeIndex:l,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(m)});var S})),al=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),il=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),rl={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},sl={"horizontal-list":"w-6","vertical-list":"h-6"},ol=g((({containerRef:e,activeIndex:t,dotCount:l=0,listType:n="horizontal-list",version:a})=>l?u("div",{className:w("flex gap-xs",rl[n],a?"group":""),...a?{"data-ver":a}:{},children:new Array(l).fill(null).map(((l,a)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${a===t?sl[n]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(l=>{l!==t&&e?.current&&e.current.children[l]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(a)},String(a))))}):null)),cl=e=>e,dl=(e=cl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),ml=dl(),hl=(e=cl)=>dl((t=>-e(t))),ul=hl(),pl=e=>t=>e.scrollWidth/t,gl=e=>(t,l)=>{e.scrollBy({left:l*pl(e)(t),behavior:"smooth"})},xl=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[hl()(a),dl()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?gl(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?gl(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]);return[l,{scrollLeft:u,scrollRight:p,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},fl=g((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=!0,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=xl({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===o?"relative h-full":""),children:[u(nl,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(ol,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),bl="text-left",yl=(e,t,l)=>u(fl,{children:e.map(((e,t)=>(({icon:e,title:t,description:l},n)=>p("div",{className:w("flex flex-col","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(de,{size:"text-h6",font:"font-normal",align:bl,children:t}):null,e?u(Vt,{image:e,height:"180",className:"w-auto"}):null,l?u(de,{size:"text-h6",font:"font-normal",align:bl,children:l}):null]},String(n)))({...e},t)))}),vl=g((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(k,{className:l,defaultPadding:"p-6xl",...r,children:[u(Qt,{className:"mb-4xl sm:mb-3xl",title:i,description:a,headlineVersion:"M"}),e?.length?yl(e):null]}))),Nl=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap gap-m",t),children:e.map(wl(l))}):null,wl=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o="secondary"===r?"color":"white",c=a?.iconVersion?a?.iconVersion:o;return n||a?.icon?u(re,{className:w("basis-full sm:basis-auto",e),appendLeft:Sl({...a,iconVersion:c}),appendRight:Sl({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Sl=e=>e?.icon||e?.src?u(Vt,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,kl=g((({buttons:e,className:t,...l})=>u(k,{className:w("!bg-transparent",t),defaultPadding:"p-0",...l,children:Nl(e)}))),Cl=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),Il=g((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return a((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),Tl=g((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:w("flex justify-between md:flex-col",a),children:[e?u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(de,{size:"text-h3",children:[n," ",rt(2)(Math.round(t))," ",l]})}:{children:u(de,{size:"text-h3",children:"-"})})]}))),Bl=Math.round(23.5),Rl={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:12.5,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Vl={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:7.5,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ml={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Pl={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},_l={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},zl=g((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,rateBlockClassName:i,fractionDigits:r=2})=>p("div",{children:[u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:w("font-mohave text-title-huge pr-xl -mt-m",i),children:String(e.toFixed(r)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:n}):null]})]}))),jl=e=>e?u(ce,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null;function Al({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${rt(2)(l.min||0)} ₽`,`До ${rt(2)(l.max||0)} ₽`];return u(mt,{items:e?n:[],step:t,...l})}function El(e){const{data:t}=j(`/wcms-resources/${e}.json`,D);return t}const Dl=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=El(t||"bonus-calculator-data")||Ml,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},$l=g((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[a,{field:i}]=R({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Dl(a,t);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Al({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Al({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?u(zl,{title:"Баллов за месяц",rate:d,rateBlockClassName:"tracking-[-14px]",fractionDigits:0}):null,p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[m>=0?u(Tl,{title:"Баллов за год",value:m}):null,Nl(l,{isVertical:!0}),jl(n)]})]})})),Ol=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},Ll=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Fl([e,t],n),Fl=([e,t],l=[])=>({[e]:l.length?ul(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?ml(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Ul=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Hl=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Kl=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},Wl=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Gl={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Xl=g((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:w(`flex ${Gl[a]}`,l),children:e?.map((({id:e,text:l})=>u(_t,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Jl=({items:e,title:t,orientation:l="horizontal",value:n,radioGroupClassName:a,onChange:i})=>p("div",{className:"space-y-s",children:[t?u("div",{children:u(de,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(Xl,{orientation:l,items:e,checkedItem:e[n?0:1].id,className:w("flex-col sm:flex-row",a),onChange:t=>i&&i(t===e[0].id)})]}),Yl=e=>Jl({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),ql=g((({title:e="Ставка"})=>p("div",{children:[u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-2xs pt-2xs pl-lg pb-xs",children:u(_e,{name:"PercentIcon",width:"90",height:"85"})}),u("div",{className:"w-64 mt-m",children:p(ce,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]})})]}))),Zl=({rate:e,depositeName:t,isShowDepositeName:l})=>u(zl,{rate:e,depositeName:t,isShowDepositeName:l,rateBlockClassName:"tracking-[-25px]",unit:"%"}),Ql=({rate:e})=>u(Tl,{title:"Ставка",value:e,postfix:"%"}),en=e=>e.isShowUnknownRate?u(ql,{}):p("div",{children:[u("div",{className:"hidden md:block",children:Zl(e)}),u("div",{className:"md:hidden",children:Ql(e)})]}),tn=g((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i})=>{const[r,{field:s}]=R({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isSmallBusiness:r,isMonthlyInterestPayment:s}=e,o=El(t||"business-calculator-data"),c=i||a,d=l<90||l>730;if(l<=30)return{..._l,...e,isDisabledOperatingDeposit:d,isShowUnknownRate:!0};const m=o?.rateRows?.find((e=>s===e.isMonthlyInterestPayment&&r===e.isSmallBusiness&&Hl(c,e)&&Ul(n,["minSum","maxSum"],e)&&Ul(l,["minDays","maxDays"],e)))||_l,{rate:h}=m,u=Kl(h,e),p=n+u,g=o?.rateRows||[_l];return{...m,...Fl(["minSum","maxSum"],g),...Fl(["minDays","maxDays"],g),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})(r,t),{income:c,finalSum:d,rate:m,isShowUnknownRate:h,depositeName:g}=o;return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Al({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),(x={title:"Срок, дней",min:o.minDays,max:o.maxDays,...s("daysValue"),value:o.daysValue},u(mt,{items:[`От ${Wl(x.min||0)}`,`До ${Wl(x.max||0)}`],step:1,...x})),ln(o,s),Yl({title:"Выплата процентов",orientation:"vertical",...s("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]}),u("div",{className:"border-b border-main-divider md:hidden"}),en({rate:m,depositeName:g,isShowDepositeName:i,isShowUnknownRate:h}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[nn(d,c),Nl(l,{isVertical:!0}),jl(n),jl(a)]})]});var x})),ln=(e,t)=>p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(_t,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(_t,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal}),u(_t,{text:"ИП / малое предприятие",...t("isSmallBusiness"),value:e.isSmallBusiness})]}),nn=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Tl,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Tl,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),an=({min:e=0,max:t=0,availableMonths:l,...n})=>u(mt,{items:[`От ${rn(e)}`,`До ${rn(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),rn=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,sn=e=>on({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&on({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&on({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&on({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),on=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],cn=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},dn=(e,t,l)=>{let{moneyValue:n,monthsValue:a}=e;const i=El(t||"credit-calculator-data"),s=i?.rateRows||[Rl],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>sn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Ll(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Ll(["minMonths","maxMonths"],o,s);n=it(n,c,d),a=it(a,m,h);const u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>sn({row:e,userInputParams:t,paramsViewSettings:l})&&Ul(n,["minSum","maxSum"],e)&&Ul(a,["minMonths","maxMonths"],e)))||Rl)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=cn(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},mn=e=>Jl({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),hn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,isMobile:i})=>{const[r,{field:s}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:Bl}),o=dn(r,t,a),c=mn({title:i?"Тип платежа":"",orientation:"vertical",...s("isAnnuity")});return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Al({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),an({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),un({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),en({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Tl,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),Nl(l,{isVertical:!0}),jl(n)]})]})})),un=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(_t,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(_t,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(_t,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(_t,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),pn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=El(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?fn(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>xn({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&xn({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Ul(n,["minSum","maxSum"],t)&&Ul(a||r,["minMonths","maxMonths"],t)))||Pl,{rate:d}=c,m=gn(d,e),h=n+m,u=i?.rateRows||[Pl];return{...c,...Fl(["minSum","maxSum"],u),...Fl(["minMonths","maxMonths"],u),availableMonths:Ol(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},gn=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},xn=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],fn=(e,t)=>e+Math.round((t-e)/2),bn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[r,{field:s}]=R({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=pn(r,t,i),{defaultMonth:c,rate:d,income:m,finalSum:h}=o,{onChange:g}=s("monthsValue");return a((()=>{g&&g(c)}),[c]),p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Al({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),an({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),yn({...o,...i},s)]}),u("div",{className:"border-b border-main-divider md:hidden"}),en({rate:d}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Tl,{title:"Доход в конце срока",value:m,postfix:"₽",prefix:"+"}),u(Tl,{title:"Сумма в конце срока",value:h,postfix:"₽"}),Nl(l,{isVertical:!0}),jl(n)]})]})})),yn=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?Yl({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Jl({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},vn=e=>Nn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Nn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"})&&Nn({...e,fieldKey:"isExtraMoney",viewSettingFieldKey:"isShowExtraMoney"}),Nn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],wn=(e,t,l)=>{let{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e;const o=El(t||"refinancing-calculator-data"),c=o?.rateRows||[Vl],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>vn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=Ll(["minSum","maxSum"],d,c),{minSumOld:u,maxSumOld:p}=Ll(["minSumOld","maxSumOld"],d,c),{minSumExtra:g,maxSumExtra:x}=Ll(["minSumExtra","maxSumExtra"],d,c),{minMonths:f,maxMonths:b}=Ll(["minMonths","maxMonths"],d,c);n=it(n,m,h),i=it(i,u,p),s=it(s,g,x),a=it(a,f,b);const y=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>vn({row:e,userInputParams:t,paramsViewSettings:l})&&Ul(n,["minSum","maxSum"],e)&&Ul(i,["minSumOld","maxSumOld"],e)&&Ul(r,["minSumExtra","maxSumExtra"],e)&&Ul(a,["minMonths","maxMonths"],e)))||Vl)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:v}=y,N=cn(v,e),w=e.oldMonthlyPayment-N;return r((()=>({...y,...e,minSum:m,maxSum:h,minMonths:f,maxMonths:b,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:N,benefit:w})),[e,o])},Sn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=wn(i,t,a);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Al({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum,...r("moneyValue"),value:s.moneyValue}),Al({title:"Ежемесячный платеж в других банках, ₽",isShowItems:!1,step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),an({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),kn({...s,...a},r),s.isExtraMoney?Al({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null]}),u(zl,{title:"Ставка",rate:s.rate,fractionDigits:1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Tl,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Tl,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,mn({orientation:"vertical",...r("isAnnuity")}),Nl(l,{isVertical:!0}),jl(n)]})]})})),kn=(e,t)=>p("div",{className:"space-y-s",children:[e.isShowSalaryClient?u(_t,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(_t,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,e.isShowExtraMoney?u(_t,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney}):null]}),Cn={CreditCalculatorForm:hn,DepositCalculatorForm:bn,BusinessDepositCalculatorForm:tn,BonusCalculatorForm:$l,RefinancingCalculatorForm:Sn},In=g((({className:e,calculatorTabs:t=[]})=>u(k,{className:e,defaultPadding:"p-0",children:Bn(t)}))),Tn=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in Cn))return null;return u(Cn[t],{...e.calculatorBlock,isMobile:!0})},Bn=e=>{if(!e||!e.length)return null;return 1===e.length?u(k,{children:Tn(e[0])}):e.map(((e,t)=>u(Cl,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(Il,{isUnfolded:t,children:u(k,{children:Tn(e)})}),renderFoldButton:Rn(e)},t.toString())))},Rn=e=>({isUnfolded:t,onToggle:l})=>p("button",{onClick:l,className:"w-full p-xl bg-green flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(_e,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(de,{align:"text-left",color:"text-white",children:e.nav?.title}),u(de,{align:"text-left",size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(_e,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]}),Vn=g((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=at(e,{normalize:(e=a)=>l&&n?String(it(Number(Mn(e)),l,n)):Mn(e),format:rt(r)}),c=i((e=>t&&t(Mn(e))),[t]);return u(ue,{onChange:c,...s,...o})})),Mn=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Pn=g((e=>u(Vn,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(de,{size:"text-xl",font:"font-light",children:"₽"})})}))),_n={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},zn={amount:1500,_amount:1500},jn=g((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,formType:i="private",...r})=>{const[{amount:s,_amount:o},{field:c}]=R(zn),d=s<=0,m=d?ae({version:a?.version}):ie({className:"text-white",version:a?.version}),h=J();return p(k,{className:w("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?u(T,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h2",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:_n[i],children:[u(Pn,{name:"_amount",valid:!d,placeholder:n,label:l,...c("_amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:o}),a?.text?u("button",{type:"submit",className:w("w-full p-m mt-lg",m),disabled:d,...h(a),children:a.text}):null]})]})})),An=g((({className:e,disabled:t,...l})=>u(re,{rounded:!0,className:`group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...l,children:u(Vt,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),En=g((e=>u(An,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Dn=g((e=>u(An,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),$n="absolute top-[calc(50%-24px)] z-40",On="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Ln=g((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<l-1:c,x=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[Fn(e),h?u(En,{className:w($n,n?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(Dn,{className:w($n,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),Fn=e=>p("div",{children:[e.canScrollLeft?u("div",{className:w(On,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:w(On,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Un=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),Hn=[];function Kn(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=Un,blocksRegistry:r={},ancestors:s=Hn}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:w(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const Wn=[],Gn=(e,{key:t,ancestors:l=Wn,slotName:n=null,extraProps:a,renderProps:i=Kn,...r})=>{const s=a?(e,t)=>Kn(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||Wn,[r.parent,n]]:l},a)))};function Xn({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?Gn(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const Jn=({className:e,text:t="ХИТ"}={})=>p("div",{className:w("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",e),children:[u(_e,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(ce,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Yn="relative h-full",qn=({noCardBorder:e,activeIndex:t,...l})=>{const{blocks:n}=l.block||{},a=n?.some(ea);return Xn({...l,renderProps:(l,n,i)=>p("div",{className:Zn(l,{someCardsHighlighted:a}),children:[Kn(l,n,{className:Qn(l,{someCardsHighlighted:a,showBorder:!e}),blockIndex:i,isActive:i===t}),ea(l)?Jn({className:"absolute top-0 -right-4 z-40"}):null]})})},Zn=(e,{someCardsHighlighted:t})=>w(Yn,t&&(ea(e)?"pt-3xl":"pt-3xl sm:pt-16")),Qn=(e,{someCardsHighlighted:t,showBorder:l})=>w(Yn,"min-w-80 sm:min-w-96",t&&(ea(e)?"pt-3xl sm:pt-16":"pt-3xl"),l&&"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider"),ea=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,ta=g((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:a,isAlignCenter:r,showDots:s,arrowsPadded:o=!0,isGap:c=!0,...d})=>{const{blocks:m=[]}=d.block||{},h=t||m?.length,[g,{inc:x,dec:f}]=((e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:h,visibleItemCount:l},Math.floor(l/2)),[b,y]=xl({itemCount:h}),[v]=y.visibleIndicesRange,N=m&&"CarouselBankHistoryCard"===m[0]?.type;return u(k,{className:e,defaultPadding:"p-6xl",...d,children:p("div",{className:w(r?"flex justify-center":"","relative max-w-full"),children:[u(nl,{containerRef:b,visibleItemCount:l,snapAlign:"snap-start",gap:c?16:void 0,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:qn({noCardBorder:a,activeIndex:g,...d})}),u(Ln,{scroll:y,arrowsPadded:o,onScrollLeft:f,onScrollRight:x,hasEdgeBlocks:N,activeIndex:g,itemCount:h}),s?u(ol,{containerRef:b,activeIndex:v,dotCount:h,listType:"horizontal-list"}):null]})})}));ta.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"],ta.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const la=g((({title:e,description:t,className:l})=>u(k,{className:l,defaultPadding:"p-6xl",children:u(Qt,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),na="z-10 border border-solid w-full h-full",aa=w(na,"absolute hidden sm:block border-transparent"),ia=g((({className:e,title:t,description:l,button:n,...a})=>u(k,{className:w("sm:pl-6xl sm:pb-4xl",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative",children:[u("div",{className:w(aa,"top-9 right-12 bg-green-dark")}),u("div",{className:w(aa,"top-6 right-8 bg-green")}),u("div",{className:w(aa,"top-3 right-4 bg-green-light")}),p("div",{className:w(na,"relative p-xl sm:p-5xl bg-white border-green-light"),children:[u(Qt,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Nl([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),ra={black:"bg-black",white:"bg-white"},sa=g((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r,...s})=>p(k,{className:w("flex flex-col justify-left",e),defaultPadding:"p-2xl",...s,children:[n?.src?u(Vt,{className:"flex justify-center mb-xl",image:n}):null,u(Qt,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:"text-left",className:"mb-m"}),r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(de,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(oa)]}):null,a?p(de,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null,Nl([i],{buttonClassName:"w-full mt-lg"})]}))),oa=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${ra[e]}`},String(t)),ca=g((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=J({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?i:{},children:a})})),da={L:"w-1.5 h-1.5 mr-m",M:"w-1.5 h-1.5 mr-s",S:"w-1 h-1 mr-xs"},ma=g((({className:e,isDotted:t=!0,children:l,size:n="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",da[n])})}):null,u("span",{children:l})]}))),ha={S:"text-l font-light",M:"text-h6",L:"text-h5"},ua={S:"ml-xs",M:"ml-s",L:"ml-m"},pa=g((({className:e,hasIndent:t,isDotted:l,items:n,listItemSize:a="M"})=>n?.length?u("section",{className:w("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",ha[a],t?ua[a]:"",e),role:"list",children:n.map(((e,t)=>u(ma,{isDotted:l,size:a,children:e},String(t))))}):null)),ga=g((({additionalDescription:e,align:t="text-left",button:l={},className:n="",description:a,headlineSmallVersion:i="H6",href:r,icon:s,isDotted:o=!0,isButtonFullWidth:c=!0,isImageFullWidth:d=!1,isTopPosition:m=!1,items:h=[],target:u,title:g,version:x="primary",...f})=>p(k,{className:w("flex flex-col justify-between",t,n),defaultPadding:"p-0",version:x,...f,children:[p(ca,{className:"p-m flex flex-col gap-xs",href:r,target:u,children:[fa(i,g),ba(a),va(h,o,x),ya(e),xa(s,d,m)]}),Nl([l],{className:w("p-m pt-0",c?"":"self-center"),isVertical:c})]}))),xa=(e,t,l)=>p("div",{className:w("flex gap-lg",l?"order-first":"order-last",t?"":"justify-center"),children:[e?.src?u(Vt,{className:"shrink-0",image:e}):null,e?.icon?u(Vt,{className:w("shrink-0",t?"":"w-8 h-8 min-w-8"),image:e}):null]}),fa=(e,t)=>t?u(de,{size:Zt[e],children:t}):null,ba=e=>e?u(ce,{size:"text-l",children:e}):null,ya=e=>e?u(de,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e}):null,va=(e,t,l="primary")=>e?.length?u(pa,{className:w("text-s","primary"===l?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,listItemSize:"S"}):null,Na={start:"self-start",center:"self-center",end:"self-end"},wa=g((({className:e,defaultPadding:t,padding:l,title:n="",insetTitle:a="",buttons:i,leftImage:r,rightImage:s,imageAlign:o,backImage:c,children:d})=>p("div",{className:w("relative flex flex-col gap-3xl font-sans overflow-hidden",l||t,e),children:[n?u("div",{className:"relative",children:n}):null,p("div",{className:"grow relative flex flex-wrap @xl:flex-nowrap justify-around @xl:justify-between items-stretch gap-3xl",children:[Sa(r,{imageAlign:o}),p("div",{className:w("flex flex-col gap-3xl max-w-[600px] @xl:max-w-[728px]",r?"":"grow"),children:[a,u("div",{className:"grow",children:d}),c?u("div",{className:"mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4",children:c}):null,i]}),Sa(s,{className:"-order-1 @xl:order-1",imageAlign:o})]})]}))),Sa=(e,{className:t,imageAlign:l})=>{const n=e?.props?.image.size?.width>400;return e?u("div",{className:w("flex-shrink-0",n?"w-full @xl:w-auto":"",l&&Na[l],t),children:e}):null},ka=(e=[])=>e?.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e)/e.length:0,Ca=(e,t="normal")=>e?u("div",{className:w("w-12 h-12 min-w-12 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:u(Vt,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Ia=g((e=>{const{__html:t="",richVersion:l=""}=e;return u("div",{className:w(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})})),Ta=(e,t)=>e?u(ce,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ba=(e,t)=>e?u(de,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ra=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Ia,{...e},`rte-${t}`):["label"in e?Ba(e.label,t):null,"description"in e?Ta(e.description,t):null],Va=g((({className:e,benefitsVersion:t,...l})=>p("div",{className:w("flex gap-m","description"in l&&l.description?"items-start":"items-center",e),children:["icon"in l?Ca(l.icon,t):null,u("div",{children:Ra(l)})]}))),Ma=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Pa=e=>{return((t=e.map(Ma))?.length?Math.sqrt(Math.abs(ka(t.map((e=>e**2)))-ka(t)**2)):0)>16;var t},_a=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),za=e=>!e.some(_a),ja=g((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:w("flex gap-x-m gap-y-s",Pa(l)||za(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Va,{benefitsVersion:t,...e},String(l))))}):null)),Aa=g((({className:e,benefits:t})=>t?.length?u("div",{className:w("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Ra)}):null)),Ea=g((({isTabularBenefits:e,...t})=>u(e?Aa:ja,{...t}))),Da=g((({className:e,tags:t})=>t?.length?u("div",{className:w("flex flex-wrap gap-xs",e),role:"list",children:t.map($a)}):null)),$a=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(de,{size:"text-m",font:"font-light",children:e})},String(t)),Oa=g((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",isInsetTitle:s=!0,benefitsVersion:o,isTabularBenefits:c,benefits:d,__html:m,items:h,isDotted:g=!0,listItemSize:x,tags:f,buttons:b,image:y,imageOptions:{imageAlign:v="end",directionRight:N=!0,isBackground:w}={},children:S})=>{const k=y?.src?u(Vt,{image:y}):null,C=u(Qt,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0});return u(wa,{className:e,padding:t,defaultPadding:l,...s?{insetTitle:C}:{title:C},...w?{backImage:k}:La(k,N),imageAlign:v,buttons:Nl(b),children:p("div",{className:"flex flex-col gap-xl",children:[u(Ea,{benefitsVersion:o,isTabularBenefits:c,benefits:d}),m?u(Ia,{__html:m}):null,h?.length?u(pa,{items:h,isDotted:g,listItemSize:x}):null,S,f?.length?u(Da,{tags:f}):null]})})})),La=(e,t)=>t?{rightImage:e}:{leftImage:e},Fa=g((({className:e,title:t,icon:l,list:n,href:a,target:i,...r})=>u(k,{className:e,defaultPadding:"p-3xl",...r,children:u(ca,{className:"flex items-center h-full",href:a,target:i,children:u(Oa,{title:t,headlineVersion:"XS",image:l,imageOptions:{directionRight:!1,imageAlign:"center"},benefits:n?.map((e=>({type:"default",label:e.title,description:e.description})))})})}))),Ua={default:"w-24 h-14",stretched:"flex-1 h-14"},Ha=(e,t)=>e?"":w("py-m group/media flex items-center justify-center box-border",Ua[t]),Ka=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],Wa=e=>Ka.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},Ga=g((({buttonSize:e="default",rounded:t=!1,icon:l,...n})=>{const{href:a,version:i,text:r=""}=n,{iconMapped:s,label:o}=Wa(a),c=Xa(l)??s;return u(re,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",Ha(r,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:r,version:i,...n,children:c&&!r?u(Vt,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24"}):null})})),Xa=e=>e?.src||e?.icon?e:void 0,Ja=g((({className:e="",media:t,children:l,buttonSize:n})=>p("div",{className:"flex flex-col sm:flex-col-reverse gap-xs",children:[l?u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l}):null,u("div",{className:w("flex gap-xs",e),children:t?.map(((e,t)=>u(Ga,{buttonSize:n,...e},String(t))))})]}))),Ya=g((({className:e="",description:t,href:l,icon:n,items:a=[],socialMedia:i=[],target:r,title:s,align:o="text-left",...c})=>u(k,{className:w("relative group-data-gray:bg-main-divider/50 space-y-m",e),defaultPadding:"p-6xl",...c,children:p(ca,{href:l,target:r,children:[u(Qt,{title:s,description:t,headlineVersion:"S",isEmbedded:!0,align:o}),a.length?u(pa,{className:"flex flex-col gap-xs",items:a,listItemSize:"S"}):null,qa(n),i.length?u(Ja,{media:i}):null]})}))),qa=e=>e?.src||e?.icon?u("div",{children:u(Vt,{image:e})}):null,Za=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(de,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(de,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:Nl(a)}):null]},String(t))},Qa=g((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(Za),o=s.slice(0,1),c=s.slice(1);return p(k,{className:w("flex flex-col",e),defaultPadding:"p-3xl",...r,children:[ei(n),t?u(T,{className:w("pt-xs",l),headingType:"h5",title:t}):null,a?u(re,{className:"w-full mt-m",...a}):null,i.length?u(Cl,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(Il,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?ti:null}):null]})})),ei=e=>u("div",{className:"self-center",children:e?.src||e?.icon?u(Vt,{image:e}):null}),ti=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(_e,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),li=(e=!1)=>e?"text-white":"",ni=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),ai=g((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(Vt,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(Vt,{image:t})}),l?u(T,{headingType:"h4",className:li(a),title:l}):null,n?u("div",{className:ni(a),children:n}):null]}))),ii=g((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(ri(l,t))})}))),ri=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:"text-right "+(e?"text-white":""),children:l}):null,n?u("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:n}):null]})]},String(a)),si=g((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:`border border-gray rounded-md p-m mb-m ${n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[u(ai,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(ii,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(re,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,oi({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),oi=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:l?"Скрыть":"Показать описание"})}),ci=g((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(T,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(di,{...e})})]})})),di=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(si,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(fl,{onVisibleIndicesChange:m,children:h}):h}));var mi;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(mi||(mi={}));const hi=new Intl.NumberFormat("ru",{style:"currency",currency:mi.RUB}),ui=e=>e?hi.format(e):"",pi="text-left text-m font-light text-secondary-text",gi=`${pi} pl-5xl`,xi={USD:"DollarIcon",EUR:"EuroIcon"},fi=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:pi,children:u(de,{size:"text-m",children:"Валюта"})}),u("th",{className:gi,children:u(de,{size:"text-m",children:"Купить"})}),u("th",{className:gi,children:u(de,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(bi)})]}))),bi=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(Vt,{image:{icon:xi[t]},width:"24",height:"24"}):null,u(de,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(de,{size:"text-h6",children:ui(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(de,{size:"text-h6",children:ui(e?.buyExchangeRate)})})]},t)},yi={icon:"GpsIcon"},vi=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Kt,{...yi,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),Ni=(e,t,l)=>{const n=Number(wi(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},wi=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Si=e=>{return(t=[[e=>e.value!==mi.RUB&&e.oppositeValue!==mi.RUB,()=>e.handleConvert(e.value,mi.RUB)],[e=>e.value===mi.RUB&&e.oppositeValue===mi.RUB,()=>e.handleConvert(e.value,mi.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function ki(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(ue,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(Ae,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const Ci=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||mi.RUB,selectBuy:l?.[0]?.currency?.currency||mi.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[ki({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Ii(r,o,l),value:r.inputSell,setValue:e=>Bi(o,l)(e,r.selectSell,r.selectBuy)}),ki({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Ti(r,o,t),value:r.inputBuy,setValue:e=>Ri(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(re,{className:"py-4 px-9",version:a?.version,...a,children:a.text}):null]})})),Ii=(e,t,l)=>n=>{t({selectSell:n}),Si({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Bi(t,l)(e.inputSell,n,a)}})},Ti=(e,t,l)=>n=>{t({selectBuy:n}),Si({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Ri(t,l)(e.inputBuy,n,a)})},Bi=(e,t)=>(l,n,a)=>{e({inputSell:wi(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Ni(l,i,n===mi.RUB)||"")})},Ri=(e,t)=>(l,n,a)=>{e({inputBuy:wi(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Ni(l,i,n===mi.RUB)||"")})};const Vi=async e=>{const t=await Mi(),l=t?.code||"000";return{region:t,exchangeRates:await Pi(e,l)}},Mi=async()=>{try{return await D("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},Pi=async(e,t)=>{try{return await D(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},_i=g((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:a}=function(){const{data:e}=j("/api/v1/exchangerates",Vi);return e||{}}(),i=zi(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:mi.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:mi.RUB}}),u(k,{className:w("box-border min-h-80",e),...n,children:u(wa,{className:"h-full",title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[i?u(fi,{className:"mb-xl",exchangeCurrencyItems:i}):null,u(vi,{address:a?.address})]}),i.length&&r.length&&s.length?u(Ci,{className:"grow",currencyRatesBuy:r,currencyRatesSell:s,button:l}):null]})})})})),zi=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],ji=e=>St(d.SITEMAP||"sitemap",e),Ai=g((({className:e="",items:t})=>t?.length?u("ul",{className:w("flex flex-col","",e),children:t.map(Ei)}):null)),Ei=(e,t)=>{const{text:l,...n}=e;return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",...n,children:l||null})},`list_item_${String(t)}`)},Di=g((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>p("button",{className:w("flex justify-center w-full py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:i,disabled:a,"data-theme":n,children:[u("span",{className:"text-h4 pr-s",children:t}),l?u(Vt,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20"}):null]}))),$i=e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Oi=(e,t)=>u(Kt,{...e,iconBgVersion:t,className:"shrink-0"}),Li=g((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,version:r="primary",...s})=>u(k,{className:w("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...s,children:u(Cl,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(Il,{className:w("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:Xn({...s,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Fi({version:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));Li.childrenTypes={exclude:["RollupItem"]};const Fi=({version:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть");return"primary"===e?Ui({label:r,labelIcon:l,labelIconBgVersion:n,icon:$i(a),onToggle:i}):u(Di,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Ui=({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>p("button",{className:w("border-none bg-transparent flex justify-between items-center w-full group/button",a?.icon?"py-xs":"py-lg"),onClick:n,children:[p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Oi(a,t),e?u(de,{size:"text-h6",font:"font-normal",children:e}):null]}),l?u(_e,{name:l,iconVersion:"black",width:"24",height:"24"}):null]}),Hi=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(Ki):null,u(re,{version:"primary",className:"w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),Ki=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(de,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(Wi)})]},String(t)),Wi=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:Gi(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),Gi=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Xi(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},Xi=e=>e.replaceAll(/\D/g,""),Ji=g((({className:e="",index:t,text:l,...n})=>{const a=J(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),Yi=g((({title:e,links:t,className:l=""})=>p("div",{className:l,children:[u(de,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg mt-lg",children:t.map(((e,t)=>u(Ji,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),qi=g((({className:e="",index:t,...l})=>{const n=J({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),Zi=g((({className:e="",links:t})=>p("div",{className:e,children:[u("div",{className:"pt-lg",children:u(de,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col sm:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(qi,{index:t,...e},String(t))))}):null]}))),Qi=g((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=ji(l),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:o,documents:c}=St(d.FOOTER||"footer",l);return p(k,{tag:"footer",className:e,...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(Li,{label:e?.text,labelIcon:e?.icon,children:u(Ai,{items:e.items})},String(t))))}),u(Hi,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(Ja,{className:"mb-xl",media:r,buttonSize:"stretched",children:"Соцсети"}),u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"}),u("div",{className:"mt-xs",children:s?.map(er)})]}),u(Yi,{className:"py-lg border-y border-main-divider",title:o,links:a}),u(Zi,{links:c})]})})),er=({href:e="/"},t)=>{const{label:l}=Wa(e);return u(re,{className:"w-full mb-lg",text:l,version:"secondary",href:e,target:"_blank"},String(t))},tr={"bg-white":"color",transparent:"white"},lr={"bg-white":"text-primary-main",transparent:"text-white"},nr=(e,t,l)=>u(Vt,t?.src?{image:t,className:lr[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:tr[e]},className:lr[e],width:l?.width,height:l?.height}),ar={"bg-white":"text-primary-text",transparent:"text-white"},ir=(e,t,l)=>u("span",{className:`${ar[t]} ml-s font-medium ${l||""}`,children:e||"Россельхозбанк"}),rr=g((({bgColor:e="bg-white",children:t,className:l="",href:n,logo:a,showTitle:i=!0,targetBlank:r})=>p("a",{className:`inline-flex items-center font-sans no-underline ${l}`,href:n||"https://rshb.ru/",target:r?"_blank":"_self","aria-label":a?.title||"Россельхозбанк",children:[nr(e,a?.image,{width:"34",height:"34"}),i?ir(t||a?.title,e,"text-s"):null]}))),sr={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},or=g((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=X(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u(rr,{className:"mt-2xs",bgColor:e,logo:t}):cr(s),l?u(re,{href:l,ariaLabel:"Войти",target:"_blank",className:w("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",sr["transparent"===n?"transparent":"default"]),children:"Войти"}):null]})})),cr=e=>p("button",{className:"flex items-center text-l mt-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(Vt,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]}),dr={"bg-white":"primary",transparent:"transparent"},mr=g((({bgColor:e="bg-white",version:t=dr[e],...l})=>{const{logo:n,internetBankUrl:a}=ji(l.options?.page?.fallback);return u(k,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(or,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),hr={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},ur=g((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,...r})=>u(k,{className:w("relative flex flex-col",hr[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...r,children:Xn({...r,extraProps:{className:"w-full",padding:n?"":"p-0"}})})));ur.childrenTypes=[];const pr=g((e=>u(ur,{...e})));pr.childrenTypes=[];const gr=g((e=>{const{className:t,image:l,...n}=e;return u(k,{className:t,defaultPadding:"p-0",...n,children:u(Vt,{image:l})})})),xr=["байт","Кб","Мб","Гб","Тб","Пб"],fr=g((({icon:e,text:t,fileSize:l,...n})=>p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",...n,children:[e,t?p(de,{size:"text-l",font:"font-light",children:[t,u(de,{color:"text-secondary-text",children:n?.href&&br(yr(n.href),l)})]}):null]}))),br=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),yr=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},vr={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Nr=g((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=X();return p(k,{className:w("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(Qt,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:w("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",vr[r]),role:"list",children:a.map(wr(o,r,i))}):null]})})),wr=(e,t,l)=>(t,n)=>{const a="Attachment"===t?.docType?K(e)(t?.attachment?.src):t?.href,i="Attachment"===t?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${xr[l]}`})(t?.attachment?.fileSize||0):t?.fileSize;return u("div",{role:"listitem",children:u(fr,{text:t?.text,target:t?.target,href:a,fileSize:i,icon:l?u(Vt,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:l,width:"24",height:"24"}):null})},String(n))},Sr={left:"text-left",center:"text-center",right:"text-right"},kr=e=>e?u("div",{className:"mb-lg pt-3xs",children:u(de,{size:"text-xl","font-weight":"light",children:e})}):null,Cr=e=>e?.length?u(pa,{items:e,className:"text-l font-light"}):u("span",{className:"text-m font-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Ir=e=>{const t=e.length>2;return Nl(e,{className:w(t?"w-full":"flex-nowrap"),isVertical:t})},Tr=g((({className:e,padding:t,alignTitle:l="left",buttons:n=[],description:a,headingType:i="h4",image:r,items:s,qr:o,title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24";return u(k,{className:w("min-h-80",e),padding:"p-0",version:d,...m,children:p(wa,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:c?u(T,{headingType:i,title:c,className:w("whitespace-pre-wrap",Sr[l])}):null,rightImage:r?.src?u(Vt,{className:"hidden lg:block",image:r}):null,buttons:Ir(n),children:[kr(a),p("div",{className:"flex flex-1 flex-wrap gap-m items-center",children:[o?.src?u("div",{className:w("flex justify-center bg-white rounded-md",h),children:u(Vt,{className:"w-fit",image:o})}):null,Cr(s),r?.src?u(Vt,{className:"lg:hidden",image:r}):null]})]})})})),Br=(e,t)=>e||t?p("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:[Number(e)>0?Rr("Страховая сумма:",e):null,Number(t)>0?Rr("Ежемесячный лимит:",t):null]}):null,Rr=(e,t=0)=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre",children:[u(de,{font:"font-light",size:"text-l",children:e}),p(de,{size:"text-h6",color:"text-primary-text",children:[rt(2)(t)," ₽"]})]}),Vr=g((({className:e,padding:t,headlineVersion:l="M",align:n="text-center",sum:a,monthLimit:i,imageOptions:r,...s})=>u(k,{className:e,padding:"p-0",...s,children:u(Oa,{className:"h-full",defaultPadding:"p-6xl",padding:t,headlineVersion:l,align:n,isInsetTitle:!1,imageOptions:{directionRight:!1,imageAlign:"center",...r},...s,children:Br(Number(a),Number(i))})}))),Mr=g((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(k,{className:w("box-border",e),...n,children:[u(Qt,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:Pr()})]}))),Pr=(e=3)=>zr(100,e).map((e=>Math.floor(e))).map(_r),_r=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),zr=(e,t)=>[e].concat(t>0?zr(e/1.618,t-1):[]);function jr({text:e,href:t,target:l,icon:n},a){const i="primary"===a?"white":"black",r={text:e,href:t,target:l,ariaLabel:e};return p("div",{className:"flex items-center gap-s",children:[u(re,{className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:a,rounded:!0,...r,children:u(Vt,{className:"w-4 h-4",image:{...n,icon:n?.icon||"ArrowLeftIcon",iconVersion:n?.iconVersion||i}})}),u(re,{version:"link",...r})]})}const Ar=g((({className:e,padding:t,backwardButton:l,...n})=>p(k,{className:w("overflow-hidden flex flex-col gap-3xl box-border",e),defaultPadding:"p-6xl",padding:t,...n,children:[l?.text?jr(l,n.version&&"primary"!==n.version?"white":"primary"):null,u(Oa,{className:"grow h-full",...n})]}))),Er=g((({className:e,padding:t,slides:l=[],...n})=>u(k,{className:w("overflow-hidden relative",e),padding:t,...n,children:u(fl,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",role:"listitem",children:u(Oa,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),Dr=g((({className:e,padding:t,headlineVersion:l="S",isTabularBenefits:n=!0,additionalDescription:a,imageOptions:i,...r})=>u(k,{className:e,padding:"p-0",...r,children:u(Oa,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,isTabularBenefits:n,imageOptions:{isBackground:!0,...i},...r,children:a?u(ce,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:a}):null})}))),$r=g((e=>{const{__html:t,richVersion:l,...n}=e;return u(k,{defaultPadding:"p-0",...n,children:u(Ia,{__html:t,richVersion:l})})})),Or=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function Lr(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Fr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},Ur=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(Fr).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),Hr={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},Kr=(e,t,l)=>p("div",{className:`${Object.values(Hr).join(" ")} bg-white py-s pl-5xl pr-m w-full`,children:[u(_e,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),Wr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},Gr=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Wr).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(_e,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Xr=e=>globalThis[e];const Jr=()=>function(e,t){const[l,r]=n(),s=i((()=>r(Xr(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!Xr(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),Yr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},qr=g((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(Yr).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(_e,{name:l,width:"20",height:"16"})})})),Zr={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},Qr=g((({points:e,className:t="",zoom:l=5,showSearchField:i=!1})=>{const r=s(null),o=Jr(),[c,d]=n(),[m,h]=n(ns(Or)),g=es(e);if(a((()=>{r?.current||o?.ready((()=>{r.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),Lr(o,r.current,m)}))}),[o,r,m]),a((()=>{if(r.current&&m&&o){const e=m.length<1?ns(Or):m;Lr(o,r.current,e)}}),[r,m,o]),!o)return null;const x=c?"z-[100000]":"z-10";return p("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-1/2 ${x}`,children:i?Kr(Or,0,(e=>{if(e){const t=ns(e);h(t)}})):Ur(g)}),u("div",{className:`${Object.values(Zr).join(" ")} ${x} right-2 top-4 bg-white`,onClick:()=>{const e=r.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:u(_e,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${x}`,children:[u(qr,{yandexMaps:r}),u(qr,{yandexMaps:r,direction:"out"})]}),Gr(r.current,o,`right-2 top-80 ${x}`)]})})),es=e=>[ls(ts(e,0)),ls(ts(e,1))],ts=(e,t)=>e.map((e=>e[t])),ls=e=>e.reduce(((e,t)=>e+t))/e.length,ns=e=>e?e.map((e=>e.coords)):null,as=g((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(Ae,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),is=g((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(as,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(as,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),rs=g((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u("span",{className:"text-primary-text cursor-pointer",children:t}):null]})}))),ss=g((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:w("order-4",e),children:[u(rs,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(rs,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),os=["От 1 дня","До 365 дней"],cs=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(de,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(mt,{min:1,max:365,value:e,items:os,onChange:t})]}))),ds=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(as,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(as,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),ms=g((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents sm:block flex-1 space-y-xl",children:[u(is,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:hs(c)}),u(cs,{days:a,setDays:e=>c({days:e})}),u(ds,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:us(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents sm:flex justify-between items-center gap-m",children:[u(ss,{}),u(re,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),hs=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},us=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},ps=g((({days:e,tariffs:t=[]})=>{const l=xs(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents sm:flex flex-col justify-between order-2",children:[p("div",{className:"flex flex-col sm:flex-row gap-x-6xl gap-y-2xl order-5 sm:order-none py-2xl sm:py-0 border-t border-main-divider sm:border-none",children:[gs("Аренда за",e),gs("Цена",l+" ₽")]}),u("span",{className:"sm:hidden order-3 mb-xs text-s font-light text-secondary-text",children:n}),p("div",{className:"flex flex-col items-center gap-s order-3 sm:order-none mb-xl sm:mb-0 bg-primary-main py-s sm:p-3xl text-center",children:[u(Vt,{image:{icon:"PackA4Icon"},className:"sm:h-60"}),u("span",{className:"hidden sm:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),gs=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs sm:flex-col sm:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l sm:text-h3 text-primary-text",children:t})]}),xs=(e,t)=>{const l=fs(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},fs=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},bs=(e,t)=>e.find((e=>e.branchCode===t)),ys=g((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=bs(n,l.selectedBranch),o=vs(s?.safeBoxCaseVolumes),c=Ns(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=ws(c,l.selectedBoxSize);return p("div",{className:"flex flex-col sm:flex-row gap-4xl align-top",children:[u(ms,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(ps,{days:l.days,tariffs:d})]})})),vs=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Ns=(e,t)=>e?.find((e=>e.volume===t)),ws=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Ss=[];const ks=async e=>await E(e,{method:"GET"})||Ss,Cs=g((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=O(),h=Is(c.selectedRegion,m),g=function(e){const{data:t}=j(e?`/api/v1/safeboxes?regionCode=${e}`:null,ks);return t||Ss}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=bs(g,c.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(k,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(ys,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(ce,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(Qr,{points:f,className:"h-[640px]"}):null]})})),Is=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Ts(e){throw new Error(e)}const Bs=e=>Boolean(e?.icon||e?.src),Rs={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Vs={normal:"",small:"min-h-6xl"},Ms={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"},Ps=g((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",version:r="primary",...s})=>p(k,{className:w("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[u(Qt,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(_s(i,r))})}):null,Nl(a,{isVertical:!0})]}))),_s=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return zs(e,t)(l,n);case"rte":return u(Ia,{__html:l.__html});default:Ts(l)}},zs=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:js(e,t)(l,n)}),p("div",{className:w("flex flex-col justify-center h-fit",Vs[e]),children:[l.label?u("div",{className:"text-l text-left",children:l.label}):null,l.description?u("div",{className:w("text-s font-light text-left",Ms.description),children:l.description}):null]})]})},String(n)),js=(e,t)=>(l,n)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",r=Boolean(l?.icon?.src),s=Rs[e][r?"image":"icon"];return u("div",{className:w(s,r?"":`rounded-md ${Ms.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex self-center text-h4 text-secondary-text group-data-secondary:text-white",children:Bs(l?.icon)?u(Vt,{image:{...l.icon,iconVersion:l.icon?.iconVersion||i},width:a,height:a}):u("span",{children:n+1})})})},As={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Es={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Ds={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},$s={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Os=g((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,...s}=t;return u(i,{className:w("h-12","block flex-1","cursor-pointer",As[n],l?$s[n]:Ds[n]),role:"tab","aria-selected":l,onClick:a,...s,children:u("div",{className:w("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Es[n]:"text-secondary-text hover:text-primary-main"),children:u(de,{size:"text-m",children:r})})})})),Ls=g((e=>u(e?.item?.href?Fs:Us,{...e}))),Fs=g((e=>{const t=J(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(Os,{...e,tag:"a",item:a,onClick:n})})),Us=g((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(Os,{item:e,onClick:n,...l})})),Hs=(e,t,l)=>(n,a)=>u(Ls,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Ks="hidden sm:flex absolute z-40 top-0",Ws=g((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=xl({itemCount:t?.length||0});return p("div",{className:w("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(nl,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(Hs(l,n,a))}),r.canScrollLeft?u(En,{className:w("left-6",Ks),onClick:r.scrollLeft}):null,r.canScrollRight?u(Dn,{className:w("right-6",Ks),onClick:r.scrollRight}):null]})})),Gs=g((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:w("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(Hs(n,a,t))}))),Xs=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(Gs,{...t});case"centered":return u("div",{className:"flex",children:u(Gs,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Ws,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Js=g((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=r((()=>l.map(qs)),[l]),[d,m]=n(0);a((()=>{l&&l[0]&&Ys(l[0])}),[]),a((()=>{const e=l[d];"group"===e?.type&&b.subject("tab",{type:e.type,label:e.ref})}),[l,d]);const h=i((e=>{const t=c.indexOf(e);m(t),Ys(l[t])}),[l,c]);return u(k,{className:w(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:Xs({items:c,value:c[d],tabsMode:s,onChange:h})})})),Ys=e=>{"group"===e.type&&b.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&b.fire("tab",{type:e.type,label:e.href})},qs=e=>"group"===e?.type?{text:e.title}:e,Zs={Buttons:({buttons:e})=>Nl(e,{className:"mt-s",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(Vt,{image:e,className:"m-0",imageClassName:"m-0"}):null,List:({isDotted:e,...t})=>u(pa,{className:"flex flex-col justify-between items-start text-m pl-xs text-base",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"mb-xs",children:e}):null,t?u("div",{className:"text-s text-secondary-text",children:t}):null]})},Qs=g((({title:e,icon:t})=>p("div",{className:"mb-xs",children:[e?u(de,{size:"text-l",font:"font-light",children:e}):null,t?u(Vt,{className:"ml-auto min-w-6",image:t,width:"24",height:"24"}):null]}))),eo=g((({tile:e,...t})=>p("div",{className:"h-full",children:[u(Qs,{title:e?.header?.title}),e?.data?.length?e.data.map(((e,l)=>u("div",{className:"mb-xs",children:to(e,t)},String(l)))):null]})));function to(e,t){if(!e||!e.tableCellType||!(e.tableCellType in Zs))return null;const l=Zs[e.tableCellType];return u(l,{displayTable:()=>null,isVisible:!0,...e,...t})}const lo=g((({tiles:e,...t})=>e?.length?u(fl,{...t,padding:void 0,children:e.map(((e,l)=>u(eo,{tile:e,...t},String(l))))}):null)),no=g((({tiles:e,...t})=>e?.length?u("div",{className:"flex flex-col gap-s",children:e.map(((e,l)=>u(eo,{tile:e,...t},String(l))))}):null)),ao=g((({className:e,title:t,description:l,tariffsColumns:n,rowHeaders:a,orientation:i="vertical",...r})=>{const s=io(n),o=ro(a,s);return p("section",{className:`p-6xl space-3xl bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[u(Qt,{title:t,description:l,headlineVersion:"M",align:"text-left",isEmbedded:!0}),u("vertical"===i?no:lo,{tiles:o,...r})]})})),io=e=>e?.[0]?.data?e[0].data:[],ro=(e,t)=>e?.map(((e,l)=>({header:e,data:t?.[l]||[{}]}))),so=g((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(k,{className:w("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?oo():null,"big"===n?co(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(de,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?mo(l):null,r?.length?ho(r,!0):null,i?u(Ia,{__html:i}):null]})]}))),oo=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),co=e=>e?.src?u(Vt,{className:"h-fit flex-shrink-0",image:e}):null,mo=e=>u(ce,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),ho=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(de,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),uo=g((({className:e,padding:t,headlineVersion:l="S",listItemSize:n="M",...a})=>u(k,{className:e,padding:"p-0",...a,children:u(Oa,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,listItemSize:n,...a})}))),po={ApplicationForm:Ft,BenefitsBlock:Wt,BonusBenefitsBlock:vl,ButtonsBlock:kl,Calculator:In,CardTransfer:jn,Carousel:ta,CarouselBankHistoryCard:la,CarouselCard:ia,CarouselCatalogCard:sa,CarouselProductCard:ga,CarouselProgramsCard:Fa,CarouselRecommendationCard:Ya,CarouselTariffsCard:Qa,ComparisonTable:ci,ExchangeRateTile:_i,Footer:Qi,Header:mr,Headline:Qt,HorizontalLayout:pr,ImgBlock:gr,LinkDocs:Nr,MobileAppTile:Tr,PictureText:Vr,Placeholder:Mr,ProductBlock:Ar,ProductGallery:Er,ProductTile:Dr,RichTextBlock:$r,RollupItem:Li,SafeDepositRental:Cs,StepsBlock:Ps,Tabs:Js,TariffsTable:ao,TextBlock:so,Tile:uo,VerticalLayout:ur};const go=["Header","Footer"],xo=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function fo(e=globalThis){const t=s(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!go.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?hl(xo)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const bo=g((({className:e,onClose:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(Vt,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),yo="cookie",vo=g((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:r}]=Me();((e,t,l=300)=>{a((()=>{const t=setTimeout(e,l);return()=>{clearTimeout(t)}}),t)})((()=>{globalThis.localStorage?.getItem(yo)||n()}),[],3e3);const s=i((()=>{globalThis.localStorage?.setItem(yo,"true"),r()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u("div",{className:"sm:flex-1",children:p(ce,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(ca,{isRemote:!0,className:No(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(ca,{isRemote:!0,className:No(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(bo,{className:"bg-main-gray rounded-md",onClose:s})})]})}):null})),No=e=>w("inline mx-2xs",e?"text-green-dark":"");const wo=g((()=>{const[e,{push:t,pop:l,clear:r}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),s=i((()=>{for(const t of e)t.onClose&&t.onClose();r()}),[e]),o=i((()=>{const t=e[e.length-1];t?.onClose&&t.onClose(),l()}),[e]);return a((()=>b.subscribe("dialog",(e=>{switch(e.type){case"open":t(e);break;case"close":e.all?s():o();break;default:Ts(e)}}))),[s,o]),a((()=>{const e=({key:e})=>{"Escape"===e&&o()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[o]),a((()=>{e.length?globalThis.document?.body.classList.add("no-scrollbar"):globalThis.document?.body.classList.remove("no-scrollbar")}),[e]),e.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:e.map((({dialog:t,id:l},n)=>u("div",{className:w("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===e.length-1?"":"hidden"),children:t},String(l||n))))}):null})),So=h();const ko=g((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Co()}))),Co=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),u("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},Io=g((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await So.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await So.like(e))}),[e]),dislike:i((async()=>{l(await So.dislike(e))}),[e])}}(X().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(ko,{onClick:G(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(ko,{onClick:G(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),To=g((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return fo(),p("div",{children:[p("section",{className:w("relative @container",a,e),"data-theme":s,children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:Gn(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container @lg:grid @lg:grid-cols-12 @lg:gap-2xs",children:[Xn({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),Gn(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Io,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(wo,{}),u(vo,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));To.childrenTypes=[],To.slots=()=>["header","footer"];e.Blocks=po,e.ContentPage=To,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=G,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.13.4",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=H,e.useRouter=X,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get FOOTER(){return this._.FOOTER}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),g=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t};class f{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const b=new f;function y(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:v(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function v(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const N=new f;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),S={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},k=g((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return y(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];N.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[g,x]=n(!1);a((()=>b.subscribe("tab",(e=>{x(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:w("@container font-sans",f?"group":"",S[t],g?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),C={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=g((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=C[l]||"h3";return u(i,{className:w("font-sans m-0",I[t],e),children:n||a})})),B=e=>e,R=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=B,format:i=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),g=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:g}]},M=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],V=e=>!e?.length,_=e=>t=>l=>e(l)?[]:[t],P=e=>null!=e,z=new Map;function j(e,t,{fallback:l,cache:i}={}){const s=r((()=>A(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{!s.some(P)||(async()=>{try{const e=await(o?((e,t=z)=>l=>{const n=t.get(l);if(P(n))return n;const a=e(l);return P(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s));d(e),h(void 0)}catch(e){d(void 0),h(e)}})()}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function A(e){return Array.isArray(e)?e:e instanceof Function?A(e()):[e]}async function E(e,t){try{return e?await D(e,t):null}catch(e){console.error(e)}return null}async function D(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}const $=[];function L(){const{data:e}=j("/api/v1/regions",D);return e||$}const O=e=>Boolean(e?.includes(":")),F=(e,t)=>Boolean(e&&!O(e)&&(!t||"_self"===t)),U=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var H=Object.freeze({__proto__:null,isURL:O,isLocalURL:F,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:U});const K=e=>(t,l=d.BASE_PATH)=>{if(!t||O(t)||W(t,d.CDN))return t;const n=t.startsWith("/");return U(W(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W=(e,t)=>t&&e&&e.startsWith(t),X=(e,t)=>X._impl(e,t);function G(){return G._impl()}function J(e={}){const{isRemote:t,basePath:l}=e,n=G(),{closeAll:a}={open:(e,t={})=>b.fire("dialog",{type:"open",dialog:e,...t}),close:()=>b.fire("dialog",{type:"close"}),closeAll:()=>b.fire("dialog",{type:"close",all:!0})};return e=>({...e,href:t&&!l?e.href:K(n)(e.href,l),"aria-label":e.text,onClick:X(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&F(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}X._impl=e=>e,X.setup=e=>{X._impl=e},G._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),G.setup=e=>{G._impl=e};const Y={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},q="bg-main-divider text-main-disabled",Z={primary:q,secondary:q,white:q,link:"",transparent:"",gray:q,"":""},Q="text-center font-sans select-none",ee={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},te=g((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e;return p("div",{className:w(le(e),"flex gap-xs"),children:[n?u("div",{className:ee[i],children:n}):null,ne(e)?p("div",{children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:ee[i],children:a}):null]})})),le=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return["group/btn items-center justify-center",ne(e)?a:"h-12 w-12",n?"rounded-full":""].join(" ")},ne=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ae=({className:e,rounded:t,version:l})=>["inline-block",Q,l?Z[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ie=({className:e,rounded:t,version:l})=>[Q,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?Y[l]:"",t?"rounded-full":"rounded-md",e].join(" "),re=g((({disabled:e,children:t,...l})=>{const n=J()(l),a=t??u(te,{...n});return u(e?oe:se,{...n,children:a})})),se=g((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:ie({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),oe=g((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ae({className:e,rounded:n,version:l}),children:a}))),ce=g((({children:e,...t})=>u("p",{className:w("font-sans",Object.values(t)),children:e}))),de=g((({children:e,...t})=>u("span",{className:w("font-sans",Object.values(t)),children:e}))),me=g((({link:e})=>p(ce,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(de,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(re,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(de,{children:e.text})}):null]}))),he=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},ue=g((({key:e,className:t="",inputClassName:l="",id:n,name:a,type:r="text",label:s,placeholder:o,value:c="",valid:d=!0,children:m,onChange:h,onFocus:g,onBlur:x,pattern:f,autoFocus:b=!1})=>{const y=i((e=>{h&&h(e.target?.value||"")}),[h]),v=m?"pr-3xl":"",N=d?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[s?u("div",{className:"mb-xs",children:u(de,{size:"text-m",font:"font-light",children:s})}):null,u("input",{className:w("w-full border rounded-md text-primary-text outline-none p-m",v,N,l),id:n,name:a||n,placeholder:o,type:r,value:c,onInput:y,onFocus:g,onBlur:x,pattern:f,autoFocus:b},e)]}),m]})})),pe=g((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(ue,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),ge=e=>"_"===e,xe=e=>/\d/.test(e),fe=e=>ge(e)||xe(e),be=[..."+7 (___) ___-__-__"],ye=be.findIndex(ge),ve=be.map(((e,t)=>fe(e)?be.slice(0,t).filter(fe).length:-1));const Ne=g((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=be.map(((e,l)=>xe(e)?e:t.charAt(ve[l])||e)),n=ve.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(ye,n)):l).join("")}(e))),[t]);return u(ue,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),we=g((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(Ne,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),Se="Некорректно заполненное поле",ke=_((e=>null!=e&&""!==e))(Se),Ce=_((e=>"string"==typeof e&&e.length>1))(Se),Ie=_((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Se),Te=(Be=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,_((e=>"string"==typeof e&&Be.test(e))))(Se);var Be;const Re=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Наименование организации",...he(e("fullName"),ke)}),u(pe,{className:"shrink-0 w-full",label:"Контактное лицо",...he(e("name"),Ce)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"ИНН",...he(e("inn"),Ie)}),u(we,{className:"shrink-0 w-full",label:"Телефон",...he(e("phone"),Te)})]})]}),Me=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function Ve(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const _e=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=new Array(e.length),a=new Array(t.length);let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const Pe={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},ze=g((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",...r})=>{const s=G(),o=K(s)(U(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(Ae,{className:e,children:p("svg",{className:w(je(r.width),Pe[i],"white"===i?"invert":"",t),...r,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]})}):(e.includes("h-")||(r.style={height:`${r.height}px`}),u("img",{className:e,src:o,alt:n,title:a,"aria-hidden":"true",...r}))})),je=e=>e?"":"w-full h-full",Ae=g((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),Ee=g((({className:e="",label:t,options:l=[],value:r,valid:o=!0,isBorder:c=!0,placeholder:d="",onChange:m,isSearch:h=!1})=>{const[g,{setFalse:x,toggle:f}]=Ve(),[b,y]=n(""),v=i((()=>{x(),y("")}),[]),N=function(e){const t=s(null);return a((()=>{const l=l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[e]),t}(v),S=i((e=>{v(),m&&m(e)}),[m]);return p("div",{className:e,ref:N,children:[De(t),p("div",{className:w("relative",g?"z-20":"z-10"),children:[p("div",{className:w("text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",Ue(c,o)),onClick:f,children:[u("p",{className:"p-m pr-3xl h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:Fe(r)||d}),u(ze,{className:w("absolute right-3",g?"":"rotate-180"),name:"ArrowUpIcon",width:"16",height:"16"})]}),h?Le(g,b,y):null,l?.length?u("div",{className:w("h-0",g?"":"overflow-hidden"),children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:$e(l,b).map(Oe(S,g,(e=>e.key===r?.key)))})}):null]})]})})),De=e=>e?u("div",{className:"mb-xs",children:u(de,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,$e=(e,t)=>t?e.filter((e=>_e(e.text?.toLowerCase())(t.toLowerCase())>=.6)):e,Le=(e,t,l)=>e?u("div",{className:w("absolute top-0 w-full h-full z-20"),children:u(ue,{type:"text",autoFocus:!0,value:t,onChange:l})}):null,Oe=(e,t,l)=>(n,a)=>p("div",{onClick:()=>{e(n)},className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",children:[u("span",{className:"min-h-6",children:Fe(n)}),u(ze,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-3xs",l(n)&&t?"":"hidden")})]},String(a)),Fe=e=>e?.text||e?.key||"",Ue=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),He=g((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(Ee,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(de,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),Ke=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider sm:border-none sm:flex sm:justify-between gap-lg ",children:[u("div",{className:"sm:w-1/2",children:u(He,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Me.map((({name:e=""})=>({key:e,text:e}))),...he(t("acquiringType"),ke)})}),u("div",{className:"sm:w-1/2",children:u(He,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(t("region"),ke)})})]}),We=g((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:w("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(de,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),Xe=e=>p("div",{children:[u(We,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(We,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),Ge=(e,t)=>{const l=ie({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-m w-full sm:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},Je={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},Ye=M({acquiringType:ke,region:ke,fullName:ke,inn:Ie,name:Ce,phone:Te}),qe=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;V(Ye(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s})}),[n]),[,{field:r,...s}]=R(Je,a),o=L();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"sm:text-center"}),Ke({regions:o,field:r}),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Re(r),Xe(r),Ge(t),u(me,{link:l})]})})),Ze=e=>p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Контактное лицо",...he(e("name"),Ce)}),u(pe,{className:"shrink-0 w-full",label:"ИНН",...he(e("inn"),Ie)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(we,{className:"shrink-0 w-full",label:"Телефон",...he(e("phone"),Te)}),u(pe,{className:"shrink-0 w-full",label:"Электронная почта",...he(e("mail"),ke)})]})]}),Qe=({regions:e,field:t})=>u(He,{className:"w-full",label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(t("region"),ke)}),et={name:"",phone:"",inn:"",mail:""},tt=M({region:ke,name:Ce,phone:Te,inn:Ie,mail:ke}),lt=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;V(tt(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,phone:a,inn:i,mail:r})}),[n]),[,{field:r,...s}]=R(et,a),o=L();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[Qe({regions:o,field:r}),Ze(r),Ge(t),u(me,{link:l})]})})),nt=[];const at=async e=>await E(e,{method:"GET"})||nt,it=["От 1 000 ₽","До 1 000 000 000 ₽"],rt=["От 1 мес","До 15 лет"],st=e=>p("div",{className:"pb-2xs border-b border-b-main-divider sm:flex sm:justify-between sm:gap-lg sm:border-none sm:pb-0",children:[p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Наименование организации",...he(e("fullName"),ke)}),u(pe,{className:"shrink-0 w-full",label:"ИНН",...he(e("inn"),Ie)}),u(we,{className:"shrink-0 w-full",label:"Телефон",...he(e("phone"),Te)})]}),p("div",{className:"sm:w-1/2 space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...he(e("annualRevenue"),ke)}),u(pe,{className:"shrink-0 w-full",label:"Контактное лицо",...he(e("name"),Ce)}),u(pe,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})]}),ot=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},ct=(e,t,l)=>Math.max(t,Math.min(e,l)),dt=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function mt(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function ht({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s-t)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:"w-2 h-2 rounded-full "+(s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=mt(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const ut=1,pt=100,gt=g((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:ut),max:s=(a.length?a.length-1:pt),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=ot(e,{normalize:(e=0)=>a.length?xt(a)(e):ct(e,r,s),format:dt()}),g=i((e=>{m&&m(mt(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(de,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:w("m-0 mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","p-0 pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:g,...h}),ht({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),ft(n)]})})),xt=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),ft=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),bt=e=>p("div",{className:"border-b border-b-main-divider sm:flex sm:justify-between gap-lg sm:border-none",children:[p("div",{className:"sm:w-1/2",children:[u("label",{children:u(de,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(gt,{items:it,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"sm:w-1/2",children:[u("label",{children:u(de,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(gt,{items:rt,min:1,max:180,...e("term")})]})]}),yt=({regions:e,branches:t,field:l})=>p("div",{className:"sm:flex sm:justify-between sm:gap-m sm:mb-2xl sm:border-none sm:pb-0",children:[u("div",{className:"sm:w-1/2",children:u(He,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...he(l("region"),ke)})}),u("div",{className:"sm:w-1/2",children:u(He,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...he(l("department"),ke)})})]}),vt={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},Nt=M({fullName:ke,annualRevenue:ke,inn:Ie,name:Ce,phone:Te,region:ke,department:ke}),wt=g((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;V(Nt(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s,mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=R(vt,n),o=L(),c=function(e){const{data:t}=j(e?`/api/v1/branches?regionCode=${e}`:null,at);return t||nt}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры",className:"sm:text-center"}),bt(r),u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),st(r),u(T,{headingType:"h6",title:"Офис банка",className:"sm:text-center"}),yt({regions:o,branches:c,field:r}),Ge(e),u(me,{link:t})]})})),St={name:"",phone:""},kt=M({name:Ce,phone:Te}),Ct=g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{name:t,phone:l}=e;V(kt(e))&&n({typeForm:"dpst",name:t,phone:l})}),[n]),[,{field:r,...s}]=R(St,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"sm:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(pe,{className:"shrink-0 w-full",label:"Имя",...he(r("name"),Ce)}),u(we,{className:"shrink-0 w-full",label:"Телефон",...he(r("phone"),Te)})]}),p("div",{className:"flex justify-between flex-col-reverse sm:items-center sm:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(me,{link:l})}),Ge(t)]})]})})),It={};function Tt(e,t=It){const{data:l}=j(e?`/wcms-resources/${e}.json`:null,D,{fallback:t});return l||It}const Bt=g((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=Tt(l||"regions-grant-support"),[i,r]=n({key:""}),s=ie({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s sm:space-y-lg",children:[a?u(He,{label:"Ваш регион",placeholder:"Выберите регион",options:a.map((({name:e=""})=>({key:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(re,{href:o,target:"_blank",className:w("p-m w-full sm:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Rt=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Mt=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=G();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Rt).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:_t(a,n)(e),type:Pt(l),media:i?`(max-width: ${i}px)`:"",...t.size},`${r}_${e}`))):null,t?.src?Vt({...t,src:_t(a,n)(t.src)},l):null]})})),Vt=(e,t="")=>u("img",{src:e.src,className:w("object-contain",t),alt:e.alt||e.title,title:e.title||"",style:{width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"auto"},...e.size}),_t=(e,t)=>l=>l&&!O(l)?K(e)(U(t,l)):l,Pt=e=>e?`image/${String(e)}`:void 0,zt=g((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(ze,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(Mt,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),jt=g((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>u("path",{d:e,fill:t||"currentColor",...r,...l},n)))}))),At=[{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"}],Et=g((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(jt,{paths:At,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Dt(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(de,{size:"text-l",font:"font-light",children:l})}):null]})})})),Dt=e=>w("rounded border",e?"bg-primary-main":""),$t=e=>{const t=e("text");return p("div",{className:"space-y-m",children:[p("div",{className:"sm:flex sm:items-center sm:gap-xl",children:[u(Et,{text:"Валютный контроль",...e("currencyControl")}),u(Et,{text:"Документарные операции",...e("documentaryOperations")}),u(Et,{text:"Конверсионные операции",...e("conversionOperations")})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-m outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},Lt=e=>p("div",{children:[p("div",{className:"sm:flex sm:justify-between sm:gap-lg",children:[u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"Наименование организации",...he(e("fullName"),ke)})}),u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"ФИО",...he(e("name"),Ce)})})]}),p("div",{className:"sm:flex sm:justify-between sm:gap-lg sm:mb-2xl",children:[u("div",{className:"sm:w-1/2",children:u(we,{className:"shrink-0 w-full mb-s",label:"Телефон",...he(e("phone"),Te)})}),u("div",{className:"sm:w-1/2",children:u(pe,{className:"shrink-0 w-full mb-s",label:"Электронная почта",...he(e("mail"),ke)})})]})]}),Ot={fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""},Ft=M({fullName:ke,name:Ce,phone:Te,mail:ke}),Ut={ApplicationFormBusinessCard:lt,ApplicationFormWed:g((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,currencyControl:r,documentaryOperations:s,conversionOperations:o,text:c}=e;V(Ft(e))&&n({typeForm:"kved",fullName:t,name:l,phone:a,mail:i,partnerComments:`Валютный контроль=${r}/Документарные операции=${s}/Конверсионные операции=${o}/Доп инф=${c}`})}),[n]),[,{field:r,...s}]=R(Ot,a);return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Данные организации",className:"sm:text-center"}),Lt(r),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"sm:text-center"}),$t(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg sm:items-center sm:flex-row sm:pb-4xl",children:[Ge(t),u(me,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"sm:text-center"}),p("div",{className:"flex gap-xl",children:[p("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(zt,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(zt,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Ct,ApplicationFormCredit:wt,ApplicationFormAcquiring:qe,ApplicationFormGrantSupport:Bt},Ht=g((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(zt,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Kt={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},Wt=g((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async e=>{const t=await Kt.send(e)?"OK":"Fail";return s(t),t}),[]);return u(k,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(T,{headingType:"h3",title:l.title,className:"sm:text-center"}):null,l?Xt(l,o):null,r?u(Ht,{responseType:r}):null]})})})),Xt=(e,t)=>{const l=e?.formType;if(!l||!(l in Ut))return null;return u(Ut[l],{...e,onSubmit:t})},Gt={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Jt=g((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:w("rounded-icon object-fit flex justify-center items-center ",Gt[l],e),children:u(ze,{...i,width:"54%",height:"54%",name:a})}):null})),Yt=g((({className:e="",title:t,benefitList:l,...n})=>p(k,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(T,{headingType:"h3",as:"h2",className:"text-center",title:t}):null,l?.length?u("div",{className:"flex flex-wrap w-full sm:justify-center mt-xl gap-5xl",role:"list",children:l.map(qt)}):null]}))),qt=(e,t)=>p("div",{className:"flex gap-m items-center md:basis-1/2 md:max-w-[500px]",role:"listitem",children:[e?.icon?.icon?u(Jt,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(zt,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"sm:h-full",children:[u(T,{headingType:"h6",children:e.label}),Zt(e.description)]}):null]},String(t)),Zt=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?el(e):Qt(e)}):null},Qt=e=>e?.name||null,el=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:e},`benefitListItem-${t}`)))}):null},tl={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"}},ll={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},nl=g((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=tl[l],m={marginTop:d.descriptionStyle};return p(k,{className:w(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(T,{className:w("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(ce,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),al=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),il=g((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=y(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),rl=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],sl=g((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const g={sensitivity:1,rootRef:t},x=s([]),f=i(((e,t)=>{const l=[...x.current||[]];l[e]=t,x.current=l,h&&h(l),p&&p(cl(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?ol(r,b):{},...y?al(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(S=(e,t)=>u(il,{className:w(c,n?rl[n-1]:"",y?"h-full":""),style:v?ol(r/4):{},activeIndex:l,idx:t,observerOptions:g,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(m)});var S})),ol=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),cl=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),dl={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},ml={"horizontal-list":"w-6","vertical-list":"h-6"},hl=g((({containerRef:e,activeIndex:t,dotCount:l=0,listType:n="horizontal-list",version:a})=>l?u("div",{className:w("flex gap-xs",dl[n],a?"group":""),...a?{"data-ver":a}:{},children:new Array(l).fill(null).map(((l,a)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${a===t?ml[n]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(l=>{l!==t&&e?.current&&e.current.children[l]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(a)},String(a))))}):null)),ul=e=>e,pl=(e=ul)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),gl=pl(),xl=(e=ul)=>pl((t=>-e(t))),fl=xl(),bl=e=>t=>e.scrollWidth/t,yl=e=>(t,l)=>{e.scrollBy({left:l*bl(e)(t),behavior:"smooth"})},vl=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[xl()(a),pl()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?yl(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?yl(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]);return[l,{scrollLeft:u,scrollRight:p,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Nl=g((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=!0,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=vl({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===o?"relative h-full":""),children:[u(sl,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(hl,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),wl="text-left",Sl=(e,t,l)=>u(Nl,{children:e.map(((e,t)=>(({icon:e,title:t,description:l},n)=>p("div",{className:w("flex flex-col","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(de,{size:"text-h6",font:"font-normal",align:wl,children:t}):null,e?u(zt,{image:e,height:"180",className:"w-auto"}):null,l?u(de,{size:"text-h6",font:"font-normal",align:wl,children:l}):null]},String(n)))({...e},t)))}),kl=g((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(k,{className:l,defaultPadding:"p-6xl",...r,children:[u(nl,{className:"mb-4xl sm:mb-3xl",title:i,description:a,headlineVersion:"M"}),e?.length?Sl(e):null]}))),Cl=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap gap-m",t),children:e.map(Il(l))}):null,Il=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o="secondary"===r?"color":"white",c=a?.iconVersion?a?.iconVersion:o;return n||a?.icon?u(re,{className:w("basis-full sm:basis-auto",e),appendLeft:Tl({...a,iconVersion:c}),appendRight:Tl({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Tl=e=>e?.icon||e?.src?u(zt,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Bl=g((({buttons:e,className:t,...l})=>u(k,{className:w("!bg-transparent",t),defaultPadding:"p-0",...l,children:Cl(e)}))),Rl=g((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),Ml=g((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return a((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),Vl=g((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:w("flex justify-between md:flex-col",a),children:[e?u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(de,{size:"text-h3",children:[n," ",dt(2)(Math.round(t))," ",l]})}:{children:u(de,{size:"text-h3",children:"-"})})]}))),_l=Math.round(23.5),Pl={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:12.5,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},zl={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:7.5,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},jl={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Al={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},El={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},Dl=g((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,rateBlockClassName:i,fractionDigits:r=2})=>p("div",{children:[u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:w("font-mohave text-title-huge pr-xl -mt-m",i),children:String(e.toFixed(r)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:n}):null]})]}))),$l=e=>e?u(ce,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null;function Ll({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${dt(2)(l.min||0)} ₽`,`До ${dt(2)(l.max||0)} ₽`];return u(gt,{items:e?n:[],step:t,...l})}function Ol(e){const{data:t}=j(`/wcms-resources/${e}.json`,D);return t}const Fl=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=Ol(t||"bonus-calculator-data")||jl,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},Ul=g((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[a,{field:i}]=R({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Fl(a,t);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Ll({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Ll({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?u(Dl,{title:"Баллов за месяц",rate:d,rateBlockClassName:"tracking-[-14px]",fractionDigits:0}):null,p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[m>=0?u(Vl,{title:"Баллов за год",value:m}):null,Cl(l,{isVertical:!0}),$l(n)]})]})})),Hl=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},Kl=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Wl([e,t],n),Wl=([e,t],l=[])=>({[e]:l.length?fl(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?gl(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Xl=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Gl=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Jl=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},Yl=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,ql={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Zl=g((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:w(`flex ${ql[a]}`,l),children:e?.map((({id:e,text:l})=>u(Et,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Ql=({items:e,title:t,orientation:l="horizontal",value:n,radioGroupClassName:a,onChange:i})=>p("div",{className:"space-y-s",children:[t?u("div",{children:u(de,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(Zl,{orientation:l,items:e,checkedItem:e[n?0:1].id,className:w("flex-col sm:flex-row",a),onChange:t=>i&&i(t===e[0].id)})]}),en=e=>Ql({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),tn=g((({title:e="Ставка"})=>p("div",{children:[u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-2xs pt-2xs pl-lg pb-xs",children:u(ze,{name:"PercentIcon",width:"90",height:"85"})}),u("div",{className:"w-64 mt-m",children:p(ce,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]})})]}))),ln=({rate:e,depositeName:t,isShowDepositeName:l})=>u(Dl,{rate:e,depositeName:t,isShowDepositeName:l,rateBlockClassName:"tracking-[-25px]",unit:"%"}),nn=({rate:e})=>u(Vl,{title:"Ставка",value:e,postfix:"%"}),an=e=>e.isShowUnknownRate?u(tn,{}):p("div",{children:[u("div",{className:"hidden md:block",children:ln(e)}),u("div",{className:"md:hidden",children:nn(e)})]}),rn=g((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i})=>{const[r,{field:s}]=R({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isSmallBusiness:r,isMonthlyInterestPayment:s}=e,o=Ol(t||"business-calculator-data"),c=i||a,d=l<90||l>730;if(l<=30)return{...El,...e,isDisabledOperatingDeposit:d,isShowUnknownRate:!0};const m=o?.rateRows?.find((e=>s===e.isMonthlyInterestPayment&&r===e.isSmallBusiness&&Gl(c,e)&&Xl(n,["minSum","maxSum"],e)&&Xl(l,["minDays","maxDays"],e)))||El,{rate:h}=m,u=Jl(h,e),p=n+u,g=o?.rateRows||[El];return{...m,...Wl(["minSum","maxSum"],g),...Wl(["minDays","maxDays"],g),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})(r,t),{income:c,finalSum:d,rate:m,isShowUnknownRate:h,depositeName:g}=o;return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Ll({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),(x={title:"Срок, дней",min:o.minDays,max:o.maxDays,...s("daysValue"),value:o.daysValue},u(gt,{items:[`От ${Yl(x.min||0)}`,`До ${Yl(x.max||0)}`],step:1,...x})),sn(o,s),en({title:"Выплата процентов",orientation:"vertical",...s("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]}),u("div",{className:"border-b border-main-divider md:hidden"}),an({rate:m,depositeName:g,isShowDepositeName:i,isShowUnknownRate:h}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[on(d,c),Cl(l,{isVertical:!0}),$l(n),$l(a)]})]});var x})),sn=(e,t)=>p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(Et,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(Et,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal}),u(Et,{text:"ИП / малое предприятие",...t("isSmallBusiness"),value:e.isSmallBusiness})]}),on=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Vl,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Vl,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),cn=({min:e=0,max:t=0,availableMonths:l,...n})=>u(gt,{items:[`От ${dn(e)}`,`До ${dn(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),dn=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,mn=e=>hn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&hn({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&hn({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&hn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),hn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],un=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},pn=(e,t,l)=>{let{moneyValue:n,monthsValue:a}=e;const i=Ol(t||"credit-calculator-data"),s=i?.rateRows||[Pl],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>mn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Kl(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Kl(["minMonths","maxMonths"],o,s);n=ct(n,c,d),a=ct(a,m,h);const u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>mn({row:e,userInputParams:t,paramsViewSettings:l})&&Xl(n,["minSum","maxSum"],e)&&Xl(a,["minMonths","maxMonths"],e)))||Pl)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,g=un(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:g})),[e,i])},gn=e=>Ql({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),xn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,isMobile:i})=>{const[r,{field:s}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:_l}),o=pn(r,t,a),c=gn({title:i?"Тип платежа":"",orientation:"vertical",...s("isAnnuity")});return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Ll({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),cn({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),fn({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),an({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Vl,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),Cl(l,{isVertical:!0}),$l(n)]})]})})),fn=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(Et,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(Et,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(Et,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(Et,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),bn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Ol(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?Nn(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>vn({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&vn({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Xl(n,["minSum","maxSum"],t)&&Xl(a||r,["minMonths","maxMonths"],t)))||Al,{rate:d}=c,m=yn(d,e),h=n+m,u=i?.rateRows||[Al];return{...c,...Wl(["minSum","maxSum"],u),...Wl(["minMonths","maxMonths"],u),availableMonths:Hl(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},yn=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},vn=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Nn=(e,t)=>e+Math.round((t-e)/2),wn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[r,{field:s}]=R({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=bn(r,t,i),{defaultMonth:c,rate:d,income:m,finalSum:h}=o,{onChange:g}=s("monthsValue");return a((()=>{g&&g(c)}),[c]),p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Ll({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),cn({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),Sn({...o,...i},s)]}),u("div",{className:"border-b border-main-divider md:hidden"}),an({rate:d}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Vl,{title:"Доход в конце срока",value:m,postfix:"₽",prefix:"+"}),u(Vl,{title:"Сумма в конце срока",value:h,postfix:"₽"}),Cl(l,{isVertical:!0}),$l(n)]})]})})),Sn=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?en({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Ql({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},kn=e=>Cn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Cn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"})&&Cn({...e,fieldKey:"isExtraMoney",viewSettingFieldKey:"isShowExtraMoney"}),Cn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],In=(e,t,l)=>{let{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e;const o=Ol(t||"refinancing-calculator-data"),c=o?.rateRows||[zl],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>kn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=Kl(["minSum","maxSum"],d,c),{minSumOld:u,maxSumOld:p}=Kl(["minSumOld","maxSumOld"],d,c),{minSumExtra:g,maxSumExtra:x}=Kl(["minSumExtra","maxSumExtra"],d,c),{minMonths:f,maxMonths:b}=Kl(["minMonths","maxMonths"],d,c);n=ct(n,m,h),i=ct(i,u,p),s=ct(s,g,x),a=ct(a,f,b);const y=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>kn({row:e,userInputParams:t,paramsViewSettings:l})&&Xl(n,["minSum","maxSum"],e)&&Xl(i,["minSumOld","maxSumOld"],e)&&Xl(r,["minSumExtra","maxSumExtra"],e)&&Xl(a,["minMonths","maxMonths"],e)))||zl)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:v}=y,N=un(v,e),w=e.oldMonthlyPayment-N;return r((()=>({...y,...e,minSum:m,maxSum:h,minMonths:f,maxMonths:b,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:N,benefit:w})),[e,o])},Tn=g((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=In(i,t,a);return p("section",{className:w("flex flex-col justify-between sm:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:w-2/5 gap-2xl",children:[Ll({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum,...r("moneyValue"),value:s.moneyValue}),Ll({title:"Ежемесячный платеж в других банках, ₽",isShowItems:!1,step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),cn({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Bn({...s,...a},r),s.isExtraMoney?Ll({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null]}),u(Dl,{title:"Ставка",rate:s.rate,fractionDigits:1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Vl,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Vl,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,gn({orientation:"vertical",...r("isAnnuity")}),Cl(l,{isVertical:!0}),$l(n)]})]})})),Bn=(e,t)=>p("div",{className:"space-y-s",children:[e.isShowSalaryClient?u(Et,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(Et,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,e.isShowExtraMoney?u(Et,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney}):null]}),Rn={CreditCalculatorForm:xn,DepositCalculatorForm:wn,BusinessDepositCalculatorForm:rn,BonusCalculatorForm:Ul,RefinancingCalculatorForm:Tn},Mn=g((({className:e,calculatorTabs:t=[]})=>u(k,{className:e,defaultPadding:"p-0",children:_n(t)}))),Vn=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in Rn))return null;return u(Rn[t],{...e.calculatorBlock,isMobile:!0})},_n=e=>{if(!e||!e.length)return null;return 1===e.length?u(k,{children:Vn(e[0])}):e.map(((e,t)=>u(Rl,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(Ml,{isUnfolded:t,children:u(k,{children:Vn(e)})}),renderFoldButton:Pn(e)},t.toString())))},Pn=e=>({isUnfolded:t,onToggle:l})=>p("button",{onClick:l,className:"w-full p-xl bg-green flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(ze,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(de,{align:"text-left",color:"text-white",children:e.nav?.title}),u(de,{align:"text-left",size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(ze,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]}),zn=g((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=ot(e,{normalize:(e=a)=>l&&n?String(ct(Number(jn(e)),l,n)):jn(e),format:dt(r)}),c=i((e=>t&&t(jn(e))),[t]);return u(ue,{onChange:c,...s,...o})})),jn=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),An=g((e=>u(zn,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(de,{size:"text-xl",font:"font-light",children:"₽"})})}))),En={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Dn={amount:1500,_amount:1500},$n=g((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,formType:i="private",...r})=>{const[{amount:s,_amount:o},{field:c}]=R(Dn),d=s<=0,m=d?ae({version:a?.version}):ie({className:"text-white",version:a?.version}),h=J();return p(k,{className:w("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?u(T,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h2",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:En[i],children:[u(An,{name:"_amount",valid:!d,placeholder:n,label:l,...c("_amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:o}),a?.text?u("button",{type:"submit",className:w("w-full p-m mt-lg",m),disabled:d,...h(a),children:a.text}):null]})]})})),Ln=g((({className:e,disabled:t,...l})=>u(re,{rounded:!0,className:`group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...l,children:u(zt,{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"})}))),On=g((e=>u(Ln,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Fn=g((e=>u(Ln,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Un="absolute top-[calc(50%-24px)] z-40",Hn="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Kn=g((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,g=a?t<l-1:c,x=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[Wn(e),h?u(On,{className:w(Un,n?"left-1 @lg:left-8":"left-0"),onClick:x}):null,g?u(Fn,{className:w(Un,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),Wn=e=>p("div",{children:[e.canScrollLeft?u("div",{className:w(Hn,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:w(Hn,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Xn=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),Gn=[];function Jn(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=Xn,blocksRegistry:r={},ancestors:s=Gn}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:w(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const Yn=[],qn=(e,{key:t,ancestors:l=Yn,slotName:n=null,extraProps:a,renderProps:i=Jn,...r})=>{const s=a?(e,t)=>Jn(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||Yn,[r.parent,n]]:l},a)))};function Zn({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?qn(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const Qn=({className:e,text:t="ХИТ"}={})=>p("div",{className:w("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",e),children:[u(ze,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(ce,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),ea="relative h-full",ta={normal:"sm:min-w-96",big:"sm:min-w-[515px]"},la=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(ia);return Zn({...n,renderProps:(n,a,r)=>p("div",{className:na(n,{someCardsHighlighted:i}),children:[Jn(n,a,{className:aa(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),ia(n)?Qn({className:"absolute top-0 -right-4 z-40"}):null]})})},na=(e,{someCardsHighlighted:t})=>w(ea,t&&(ia(e)?"pt-3xl":"pt-3xl sm:pt-16")),aa=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>w(ea,"min-w-80",ta[n],t&&(ia(e)?"pt-3xl sm:pt-16":"pt-3xl"),l&&"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider"),ia=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,ra=g((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:a,isAlignCenter:r,showDots:s,arrowsPadded:o=!0,isGap:c=!0,cardSize:d="normal",...m})=>{const{blocks:h=[]}=m.block||{},g=t||h?.length,[x,{inc:f,dec:b}]=((e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:g,visibleItemCount:l},Math.floor(l/2)),[y,v]=vl({itemCount:g}),[N]=v.visibleIndicesRange,S=h&&"CarouselBankHistoryCard"===h[0]?.type;return u(k,{className:e,defaultPadding:"p-6xl",...m,children:p("div",{className:w(r?"flex justify-center":"","relative max-w-full"),children:[u(sl,{containerRef:y,visibleItemCount:l,snapAlign:"snap-start",gap:c?16:void 0,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:la({noCardBorder:a,activeIndex:x,cardSize:d,...m})}),u(Kn,{scroll:v,arrowsPadded:o,onScrollLeft:b,onScrollRight:f,hasEdgeBlocks:S,activeIndex:x,itemCount:g}),s?u(hl,{containerRef:y,activeIndex:N,dotCount:g,listType:"horizontal-list"}):null]})})}));ra.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"],ra.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const sa=g((({title:e,description:t,className:l})=>u(k,{className:l,defaultPadding:"p-6xl",children:u(nl,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),oa="z-10 border border-solid w-full h-full",ca=w(oa,"absolute hidden sm:block border-transparent"),da=g((({className:e,title:t,description:l,button:n,...a})=>u(k,{className:w("sm:pl-6xl sm:pb-4xl",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative",children:[u("div",{className:w(ca,"top-9 right-12 bg-green-dark")}),u("div",{className:w(ca,"top-6 right-8 bg-green")}),u("div",{className:w(ca,"top-3 right-4 bg-green-light")}),p("div",{className:w(oa,"relative p-xl sm:p-5xl bg-white border-green-light"),children:[u(nl,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Cl([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),ma={black:"bg-black",white:"bg-white"},ha=g((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r,...s})=>p(k,{className:w("flex flex-col justify-left",e),defaultPadding:"p-2xl",...s,children:[n?.src?u(zt,{className:"flex justify-center mb-xl",image:n}):null,u(nl,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:"text-left",className:"mb-m"}),r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(de,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(ua)]}):null,a?p(de,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null,Cl([i],{buttonClassName:"w-full mt-lg"})]}))),ua=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${ma[e]}`},String(t)),pa=g((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=J({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?i:{},children:a})})),ga={L:"w-1.5 h-1.5 mr-m",M:"w-1.5 h-1.5 mr-s",S:"w-1 h-1 mr-xs",XS:"w-1 h-1 mr-xs"},xa=g((({className:e,isDotted:t=!0,children:l,size:n="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",ga[n])})}):null,u("span",{children:l})]}))),fa={XS:"text-m font-light",S:"text-l font-light",M:"text-h6",L:"text-h5"},ba={XS:"ml-2xs",S:"ml-xs",M:"ml-s",L:"ml-m"},ya=g((({className:e,hasIndent:t,isDotted:l,items:n,listItemSize:a="M"})=>n?.length?u("section",{className:w("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",fa[a],t?ba[a]:"",e),role:"list",children:n.map(((e,t)=>u(xa,{isDotted:l,size:a,children:e},String(t))))}):null)),va=g((({additionalDescription:e,align:t="text-left",button:l={},className:n="",description:a,headlineSmallVersion:i="H6",href:r,icon:s,isDotted:o=!0,isButtonFullWidth:c=!0,isImageFullWidth:d=!1,isTopPosition:m=!1,items:h=[],target:u,title:g,version:x="primary",...f})=>p(k,{className:w("flex flex-col justify-between",t,n),defaultPadding:"p-0",version:x,...f,children:[p(pa,{className:"p-m flex flex-col gap-xs",href:r,target:u,children:[wa(i,g),Sa(a),Ca(h,o,x),ka(e),Na(s,d,m)]}),Cl([l],{className:w("p-m pt-0",c?"":"self-center"),isVertical:c})]}))),Na=(e,t,l)=>p("div",{className:w("flex gap-lg",l?"order-first":"order-last",t?"":"justify-center"),children:[e?.src?u(zt,{className:"shrink-0",image:e}):null,e?.icon?u(zt,{className:w("shrink-0",t?"":"w-8 h-8 min-w-8"),image:e}):null]}),wa=(e,t)=>t?u(de,{size:ll[e],children:t}):null,Sa=e=>e?u(ce,{size:"text-l",children:e}):null,ka=e=>e?u(de,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e}):null,Ca=(e,t,l="primary")=>e?.length?u(ya,{className:w("text-s","primary"===l?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,listItemSize:"S"}):null,Ia={start:"self-start",center:"self-center",end:"self-end"},Ta=g((({className:e,defaultPadding:t,padding:l,title:n="",insetTitle:a="",buttons:i,leftImage:r,rightImage:s,imageAlign:o,backImage:c,children:d})=>p("div",{className:w("relative flex flex-col gap-3xl font-sans overflow-hidden",l||t,e),children:[n?u("div",{className:"relative",children:n}):null,p("div",{className:"grow relative flex flex-wrap @xl:flex-nowrap justify-around @xl:justify-between items-stretch gap-3xl",children:[Ba(r,{imageAlign:o}),p("div",{className:w("flex flex-col gap-3xl max-w-[600px] @xl:max-w-[728px]",r?"":"grow"),children:[a,u("div",{className:"grow",children:d}),c?u("div",{className:"mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4",children:c}):null,i]}),Ba(s,{className:"-order-1 @xl:order-1",imageAlign:o})]})]}))),Ba=(e,{className:t,imageAlign:l})=>e?u("div",{className:w("flex-shrink-0",e?.props?.image?.size?.width>400?"w-full @xl:w-auto":"",l&&Ia[l],t),children:e}):null,Ra=(e=[])=>e?.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e)/e.length:0,Ma=(e,t="normal")=>e?u("div",{className:w("w-12 h-12 min-w-12 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:u(zt,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Va=g((e=>{const{__html:t="",richVersion:l=""}=e;return u("div",{className:w(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})})),_a=(e,t)=>e?u(ce,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Pa=(e,t)=>e?u(de,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,za=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Va,{...e},`rte-${t}`):["label"in e?Pa(e.label,t):null,"description"in e?_a(e.description,t):null],ja=g((({className:e,benefitsVersion:t,...l})=>p("div",{className:w("flex gap-m","description"in l&&l.description?"items-start":"items-center",e),children:["icon"in l?Ma(l.icon,t):null,u("div",{children:za(l)})]}))),Aa=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Ea=e=>{return((t=e.map(Aa))?.length?Math.sqrt(Math.abs(Ra(t.map((e=>e**2)))-Ra(t)**2)):0)>16;var t},Da=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),$a=e=>!e.some(Da),La=g((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:w("flex gap-x-m gap-y-s",Ea(l)||$a(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(ja,{benefitsVersion:t,...e},String(l))))}):null)),Oa=g((({className:e,benefits:t})=>t?.length?u("div",{className:w("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(za)}):null)),Fa=g((({isTabularBenefits:e,...t})=>u(e?Oa:La,{...t}))),Ua=g((({className:e,tags:t})=>t?.length?u("div",{className:w("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ha)}):null)),Ha=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(de,{size:"text-m",font:"font-light",children:e})},String(t)),Ka=g((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",isInsetTitle:s=!0,benefitsVersion:o,isTabularBenefits:c,benefits:d,__html:m,items:h,isDotted:g=!0,listItemSize:x,tags:f,buttons:b,image:y,imageOptions:{imageAlign:v="end",directionRight:N=!0,isBackground:w}={},children:S})=>{const k=y?.src?u(zt,{image:y}):null,C=u(nl,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0});return u(Ta,{className:e,padding:t,defaultPadding:l,...s?{insetTitle:C}:{title:C},...w?{backImage:k}:Wa(k,N),imageAlign:v,buttons:Cl(b),children:p("div",{className:"flex flex-col gap-xl",children:[u(Fa,{benefitsVersion:o,isTabularBenefits:c,benefits:d}),m?u(Va,{__html:m}):null,h?.length?u(ya,{items:h,isDotted:g,listItemSize:x}):null,S,f?.length?u(Ua,{tags:f}):null]})})})),Wa=(e,t)=>t?{rightImage:e}:{leftImage:e},Xa=g((({className:e,title:t,icon:l,list:n,href:a,target:i,...r})=>u(k,{className:e,defaultPadding:"p-3xl",...r,children:u(pa,{className:"flex items-center h-full",href:a,target:i,children:u(Ka,{title:t,headlineVersion:"XS",image:l,imageOptions:{directionRight:!1,imageAlign:"center"},benefits:n?.map((e=>({type:"default",label:e.title,description:e.description})))})})}))),Ga={default:"w-14 h-14",stretched:"flex-1 h-14"},Ja=(e,t)=>e?"":w("py-m group/media flex items-center justify-center box-border",Ga[t]),Ya=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],qa=e=>Ya.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},Za=g((({buttonSize:e="default",rounded:t=!1,icon:l,...n})=>{const{href:a,version:i,text:r=""}=n,{iconMapped:s,label:o}=qa(a),c=Qa(l)??s;return u(re,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",Ja(r,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:r,version:i,...n,children:c&&!r?u(zt,{image:c,imageClassName:"group-hover/media:text-white",width:"24",height:"24"}):null})})),Qa=e=>e?.src||e?.icon?e:void 0,ei=g((({className:e="",media:t,children:l,buttonSize:n})=>p("div",{className:"flex flex-col sm:flex-col-reverse gap-xs",children:[l?u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l}):null,u("div",{className:w("flex gap-xs",e),children:t?.map(((e,t)=>u(Za,{buttonSize:n,...e},String(t))))})]}))),ti=g((({className:e="",description:t,href:l,icon:n,items:a=[],socialMedia:i=[],target:r,title:s,align:o="text-left",...c})=>u(k,{className:w("relative group-data-gray:bg-main-divider/50",e),defaultPadding:"p-3xl",...c,children:p(pa,{href:l,target:r,className:"space-y-lg",children:[u(nl,{title:s,description:t,headlineVersion:"XS",isEmbedded:!0,align:o}),a.length?u(ya,{className:"flex flex-col gap-xs",items:a,listItemSize:"XS"}):null,li(n),i.length?u(ei,{media:i}):null]})}))),li=e=>e?.src||e?.icon?u("div",{children:u(zt,{image:e})}):null,ni=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(de,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(de,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:Cl(a)}):null]},String(t))},ai=g((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(ni),o=s.slice(0,1),c=s.slice(1);return p(k,{className:w("flex flex-col",e),defaultPadding:"p-3xl",...r,children:[ii(n),t?u(T,{className:w("pt-xs",l),headingType:"h5",title:t}):null,a?u(re,{className:"w-full mt-m",...a}):null,i.length?u(Rl,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(Ml,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?ri:null}):null]})})),ii=e=>u("div",{className:"self-center",children:e?.src||e?.icon?u(zt,{image:e}):null}),ri=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(ze,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),si=(e=!1)=>e?"text-white":"",oi=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),ci=g((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(zt,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(zt,{image:t})}),l?u(T,{headingType:"h4",className:si(a),title:l}):null,n?u("div",{className:oi(a),children:n}):null]}))),di=g((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(mi(l,t))})}))),mi=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:"text-right "+(e?"text-white":""),children:l}):null,n?u("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:n}):null]})]},String(a)),hi=g((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:`border border-gray rounded-md p-m mb-m ${n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[u(ci,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(di,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(re,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,ui({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),ui=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:l?"Скрыть":"Показать описание"})}),pi=g((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(T,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(gi,{...e})})]})})),gi=g((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(hi,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(Nl,{onVisibleIndicesChange:m,children:h}):h}));var xi;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(xi||(xi={}));const fi=new Intl.NumberFormat("ru",{style:"currency",currency:xi.RUB}),bi=e=>e?fi.format(e):"",yi="text-left text-m font-light text-secondary-text",vi=`${yi} pl-5xl`,Ni={USD:"DollarIcon",EUR:"EuroIcon"},wi=g((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:yi,children:u(de,{size:"text-m",children:"Валюта"})}),u("th",{className:vi,children:u(de,{size:"text-m",children:"Купить"})}),u("th",{className:vi,children:u(de,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Si)})]}))),Si=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(zt,{image:{icon:Ni[t]},width:"24",height:"24"}):null,u(de,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(de,{size:"text-h6",children:bi(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(de,{size:"text-h6",children:bi(e?.buyExchangeRate)})})]},t)},ki={icon:"GpsIcon"},Ci=g((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Jt,{...ki,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),Ii=(e,t,l)=>{const n=Number(Ti(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Ti=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Bi=e=>{return(t=[[e=>e.value!==xi.RUB&&e.oppositeValue!==xi.RUB,()=>e.handleConvert(e.value,xi.RUB)],[e=>e.value===xi.RUB&&e.oppositeValue===xi.RUB,()=>e.handleConvert(e.value,xi.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Ri(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(ue,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(Ee,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const Mi=g((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||xi.RUB,selectBuy:l?.[0]?.currency?.currency||xi.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Ri({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Vi(r,o,l),value:r.inputSell,setValue:e=>Pi(o,l)(e,r.selectSell,r.selectBuy)}),Ri({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:_i(r,o,t),value:r.inputBuy,setValue:e=>zi(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(re,{className:"py-4 px-9",version:a?.version,...a,children:a.text}):null]})})),Vi=(e,t,l)=>n=>{t({selectSell:n}),Bi({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Pi(t,l)(e.inputSell,n,a)}})},_i=(e,t,l)=>n=>{t({selectBuy:n}),Bi({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>zi(t,l)(e.inputBuy,n,a)})},Pi=(e,t)=>(l,n,a)=>{e({inputSell:Ti(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Ii(l,i,n===xi.RUB)||"")})},zi=(e,t)=>(l,n,a)=>{e({inputBuy:Ti(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Ii(l,i,n===xi.RUB)||"")})};const ji=async e=>{const t=await Ai(),l=t?.code||"000";return{region:t,exchangeRates:await Ei(e,l)}},Ai=async()=>{try{return await D("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},Ei=async(e,t)=>{try{return await D(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},Di=g((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:a}=function(){const{data:e}=j("/api/v1/exchangerates",ji);return e||{}}(),i=$i(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:xi.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:xi.RUB}}),u(k,{className:w("box-border min-h-80",e),...n,children:u(Ta,{className:"h-full",title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[i?u(wi,{className:"mb-xl",exchangeCurrencyItems:i}):null,u(Ci,{address:a?.address})]}),i.length&&r.length&&s.length?u(Mi,{className:"grow",currencyRatesBuy:r,currencyRatesSell:s,button:l}):null]})})})})),$i=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Li=e=>Tt(d.SITEMAP||"sitemap",e),Oi=g((({className:e="",items:t})=>t?.length?u("ul",{className:w("flex flex-col","",e),children:t.map(Fi)}):null)),Fi=(e,t)=>{const{text:l,...n}=e;return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",...n,children:l||null})},`list_item_${String(t)}`)},Ui=g((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>p("button",{className:w("flex justify-center w-full py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:i,disabled:a,"data-theme":n,children:[u("span",{className:"text-h4 pr-s",children:t}),l?u(zt,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20"}):null]}))),Hi=e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Ki=(e,t)=>u(Jt,{...e,iconBgVersion:t,className:"shrink-0"}),Wi=g((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,version:r="primary",...s})=>u(k,{className:w("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...s,children:u(Rl,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(Ml,{className:w("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:Zn({...s,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Xi({version:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));Wi.childrenTypes={exclude:["RollupItem"]};const Xi=({version:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть");return"primary"===e?Gi({label:r,labelIcon:l,labelIconBgVersion:n,icon:Hi(a),onToggle:i}):u(Ui,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Gi=({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>p("button",{className:w("border-none bg-transparent flex justify-between items-center w-full group/button",a?.icon?"py-xs":"py-lg"),onClick:n,children:[p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Ki(a,t),e?u(de,{size:"text-h6",font:"font-normal",children:e}):null]}),l?u(ze,{name:l,iconVersion:"black",width:"24",height:"24"}):null]}),Ji=g((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(Yi):null,u(re,{version:"primary",className:"w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),Yi=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(de,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(qi)})]},String(t)),qi=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:Zi(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),Zi=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Qi(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},Qi=e=>e.replaceAll(/\D/g,""),er=g((({className:e="",index:t,text:l,...n})=>{const a=J(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),tr=g((({title:e,links:t,className:l=""})=>p("div",{className:l,children:[u(de,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg mt-lg",children:t.map(((e,t)=>u(er,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),lr=g((({className:e="",index:t,...l})=>{const n=J({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),nr=g((({className:e="",links:t})=>p("div",{className:e,children:[u("div",{className:"pt-lg",children:u(de,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col sm:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(lr,{index:t,...e},String(t))))}):null]}))),ar=g((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=Li(l),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:o,documents:c}=Tt(d.FOOTER||"footer",l);return p(k,{tag:"footer",className:e,...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(Wi,{label:e?.text,labelIcon:e?.icon,children:u(Oi,{items:e.items})},String(t))))}),u(Ji,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(ei,{className:"mb-xl",media:r,buttonSize:"stretched",children:"Соцсети"}),u(de,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"}),u("div",{className:"mt-xs",children:s?.map(ir)})]}),u(tr,{className:"py-lg border-y border-main-divider",title:o,links:a}),u(nr,{links:c})]})})),ir=({href:e="/"},t)=>{const{label:l}=qa(e);return u(re,{className:"w-full mb-lg",text:l,version:"secondary",href:e,target:"_blank"},String(t))},rr={"bg-white":"color",transparent:"white"},sr={"bg-white":"text-primary-main",transparent:"text-white"},or=(e,t,l)=>u(zt,t?.src?{image:t,className:sr[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:rr[e]},className:sr[e],width:l?.width,height:l?.height}),cr={"bg-white":"text-primary-text",transparent:"text-white"},dr=(e,t,l)=>u("span",{className:`${cr[t]} ml-s font-medium ${l||""}`,children:e||"Россельхозбанк"}),mr=g((({bgColor:e="bg-white",children:t,className:l="",href:n,logo:a,showTitle:i=!0,targetBlank:r})=>p("a",{className:`inline-flex items-center font-sans no-underline ${l}`,href:n||"https://rshb.ru/",target:r?"_blank":"_self","aria-label":a?.title||"Россельхозбанк",children:[or(e,a?.image,{width:"34",height:"34"}),i?dr(t||a?.title,e,"text-s"):null]}))),hr={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},ur=g((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=G(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u(mr,{className:"mt-2xs",bgColor:e,logo:t}):pr(s),l?u(re,{href:l,ariaLabel:"Войти",target:"_blank",className:w("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",hr["transparent"===n?"transparent":"default"]),children:"Войти"}):null]})})),pr=e=>p("button",{className:"flex items-center text-l mt-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(zt,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]}),gr={"bg-white":"primary",transparent:"transparent"},xr=g((({bgColor:e="bg-white",version:t=gr[e],...l})=>{const{logo:n,internetBankUrl:a}=Li(l.options?.page?.fallback);return u(k,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(ur,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),fr={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},br=g((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,...r})=>u(k,{className:w("relative flex flex-col",fr[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...r,children:Zn({...r,extraProps:{className:"w-full",padding:n?"":"p-0"}})})));br.childrenTypes=[];const yr=g((e=>u(br,{...e})));yr.childrenTypes=[];const vr=g((e=>{const{className:t,image:l,...n}=e;return u(k,{className:t,defaultPadding:"p-0",...n,children:u(zt,{image:l})})})),Nr=["байт","Кб","Мб","Гб","Тб","Пб"],wr=g((({icon:e,text:t,fileSize:l,...n})=>p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",...n,children:[e,t?p(de,{size:"text-l",font:"font-light",children:[t,u(de,{color:"text-secondary-text",children:n?.href&&Sr(kr(n.href),l)})]}):null]}))),Sr=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),kr=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Cr={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Ir=g((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=G();return p(k,{className:w("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(nl,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:w("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Cr[r]),role:"list",children:a.map(Tr(o,r,i))}):null]})})),Tr=(e,t,l)=>(t,n)=>{const a="Attachment"===t?.docType?K(e)(t?.attachment?.src):t?.href,i="Attachment"===t?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Nr[l]}`})(t?.attachment?.fileSize||0):t?.fileSize;return u("div",{role:"listitem",children:u(wr,{text:t?.text,target:t?.target,href:a,fileSize:i,icon:l?u(zt,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:l,width:"24",height:"24"}):null})},String(n))},Br={left:"text-left",center:"text-center",right:"text-right"},Rr=e=>e?u("div",{className:"mb-lg pt-3xs",children:u(de,{size:"text-xl","font-weight":"light",children:e})}):null,Mr=e=>e?.length?u(ya,{items:e,className:"text-l font-light"}):u("span",{className:"text-m font-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Vr=e=>{const t=e.length>2;return Cl(e,{className:w(t?"w-full":"flex-nowrap"),isVertical:t})},_r=g((({className:e,padding:t,alignTitle:l="left",buttons:n=[],description:a,headingType:i="h4",image:r,items:s,qr:o,title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24";return u(k,{className:w("min-h-80",e),padding:"p-0",version:d,...m,children:p(Ta,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:c?u(T,{headingType:i,title:c,className:w("whitespace-pre-wrap",Br[l])}):null,rightImage:r?.src?u(zt,{className:"hidden lg:block",image:r}):null,buttons:Vr(n),children:[Rr(a),p("div",{className:"flex flex-1 flex-wrap gap-m items-center",children:[o?.src?u("div",{className:w("flex justify-center bg-white rounded-md",h),children:u(zt,{className:"w-fit",image:o})}):null,Mr(s),r?.src?u(zt,{className:"lg:hidden",image:r}):null]})]})})})),Pr=(e,t)=>e||t?p("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:[Number(e)>0?zr("Страховая сумма:",e):null,Number(t)>0?zr("Ежемесячный лимит:",t):null]}):null,zr=(e,t=0)=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre",children:[u(de,{font:"font-light",size:"text-l",children:e}),p(de,{size:"text-h6",color:"text-primary-text",children:[dt(2)(t)," ₽"]})]}),jr=g((({className:e,padding:t,headlineVersion:l="M",align:n="text-center",sum:a,monthLimit:i,imageOptions:r,...s})=>u(k,{className:e,padding:"p-0",...s,children:u(Ka,{className:"h-full",defaultPadding:"p-6xl",padding:t,headlineVersion:l,align:n,isInsetTitle:!1,imageOptions:{directionRight:!1,imageAlign:"center",...r},...s,children:Pr(Number(a),Number(i))})}))),Ar=g((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(k,{className:w("box-border",e),...n,children:[u(nl,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:Er()})]}))),Er=(e=3)=>$r(100,e).map((e=>Math.floor(e))).map(Dr),Dr=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),$r=(e,t)=>[e].concat(t>0?$r(e/1.618,t-1):[]);function Lr({text:e,href:t,target:l,icon:n},a){const i="primary"===a?"white":"black",r={text:e,href:t,target:l,ariaLabel:e};return p("div",{className:"flex items-center gap-s",children:[u(re,{className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:a,rounded:!0,...r,children:u(zt,{className:"w-4 h-4",image:{...n,icon:n?.icon||"ArrowLeftIcon",iconVersion:n?.iconVersion||i}})}),u(re,{version:"link",...r})]})}const Or=g((({className:e,padding:t,backwardButton:l,...n})=>p(k,{className:w("overflow-hidden flex flex-col gap-3xl box-border",e),defaultPadding:"p-6xl",padding:t,...n,children:[l?.text?Lr(l,n.version&&"primary"!==n.version?"white":"primary"):null,u(Ka,{className:"grow h-full",...n})]}))),Fr=g((({className:e,padding:t,slides:l=[],...n})=>u(k,{className:w("overflow-hidden relative",e),padding:t,...n,children:u(Nl,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",role:"listitem",children:u(Ka,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),Ur=g((({className:e,padding:t,headlineVersion:l="S",isTabularBenefits:n=!0,additionalDescription:a,imageOptions:i,...r})=>u(k,{className:e,padding:"p-0",...r,children:u(Ka,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,isTabularBenefits:n,imageOptions:{isBackground:!0,...i},...r,children:a?u(ce,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:a}):null})}))),Hr=g((e=>{const{__html:t,richVersion:l,...n}=e;return u(k,{defaultPadding:"p-0",...n,children:u(Va,{__html:t,richVersion:l})})})),Kr=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function Wr(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Xr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},Gr=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(Xr).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),Jr={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},Yr=(e,t,l)=>p("div",{className:`${Object.values(Jr).join(" ")} bg-white py-s pl-5xl pr-m w-full`,children:[u(ze,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),qr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},Zr=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(qr).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(ze,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Qr=e=>globalThis[e];const es=()=>function(e,t){const[l,r]=n(),s=i((()=>r(Qr(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!Qr(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),ts={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},ls=g((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(ts).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(ze,{name:l,width:"20",height:"16"})})})),ns={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},as=g((({points:e,className:t="",zoom:l=5,showSearchField:i=!1})=>{const r=s(null),o=es(),[c,d]=n(),[m,h]=n(os(Kr)),g=is(e);if(a((()=>{r?.current||o?.ready((()=>{r.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),Wr(o,r.current,m)}))}),[o,r,m]),a((()=>{if(r.current&&m&&o){const e=m.length<1?os(Kr):m;Wr(o,r.current,e)}}),[r,m,o]),!o)return null;const x=c?"z-[100000]":"z-10";return p("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-1/2 ${x}`,children:i?Yr(Kr,0,(e=>{if(e){const t=os(e);h(t)}})):Gr(g)}),u("div",{className:`${Object.values(ns).join(" ")} ${x} right-2 top-4 bg-white`,onClick:()=>{const e=r.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:u(ze,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${x}`,children:[u(ls,{yandexMaps:r}),u(ls,{yandexMaps:r,direction:"out"})]}),Zr(r.current,o,`right-2 top-80 ${x}`)]})})),is=e=>[ss(rs(e,0)),ss(rs(e,1))],rs=(e,t)=>e.map((e=>e[t])),ss=e=>e.reduce(((e,t)=>e+t))/e.length,os=e=>e?e.map((e=>e.coords)):null,cs=g((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(Ee,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),ds=g((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(cs,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(cs,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),ms=g((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u("span",{className:"text-primary-text cursor-pointer",children:t}):null]})}))),hs=g((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:w("order-4",e),children:[u(ms,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(ms,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),us=["От 1 дня","До 365 дней"],ps=g((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(de,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(gt,{min:1,max:365,value:e,items:us,onChange:t})]}))),gs=g((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col sm:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(cs,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(cs,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),xs=g((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents sm:block flex-1 space-y-xl",children:[u(ds,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:fs(c)}),u(ps,{days:a,setDays:e=>c({days:e})}),u(gs,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:bs(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(de,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents sm:flex justify-between items-center gap-m",children:[u(hs,{}),u(re,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),fs=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},bs=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},ys=g((({days:e,tariffs:t=[]})=>{const l=Ns(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents sm:flex flex-col justify-between order-2",children:[p("div",{className:"flex flex-col sm:flex-row gap-x-6xl gap-y-2xl order-5 sm:order-none py-2xl sm:py-0 border-t border-main-divider sm:border-none",children:[vs("Аренда за",e),vs("Цена",l+" ₽")]}),u("span",{className:"sm:hidden order-3 mb-xs text-s font-light text-secondary-text",children:n}),p("div",{className:"flex flex-col items-center gap-s order-3 sm:order-none mb-xl sm:mb-0 bg-primary-main py-s sm:p-3xl text-center",children:[u(zt,{image:{icon:"PackA4Icon"},className:"sm:h-60"}),u("span",{className:"hidden sm:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),vs=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs sm:flex-col sm:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l sm:text-h3 text-primary-text",children:t})]}),Ns=(e,t)=>{const l=ws(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},ws=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},Ss=(e,t)=>e.find((e=>e.branchCode===t)),ks=g((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Ss(n,l.selectedBranch),o=Cs(s?.safeBoxCaseVolumes),c=Is(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Ts(c,l.selectedBoxSize);return p("div",{className:"flex flex-col sm:flex-row gap-4xl align-top",children:[u(xs,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(ys,{days:l.days,tariffs:d})]})})),Cs=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Is=(e,t)=>e?.find((e=>e.volume===t)),Ts=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Bs=[];const Rs=async e=>await E(e,{method:"GET"})||Bs,Ms=g((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=L(),h=Vs(c.selectedRegion,m),g=function(e){const{data:t}=j(e?`/api/v1/safeboxes?regionCode=${e}`:null,Rs);return t||Bs}(h),x=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Ss(g,c.selectedBranch)||g,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(k,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(ks,{regions:m,branches:g,data:{...c,selectedRegion:h},onClick:o,onChange:x}),t?u(ce,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(as,{points:f,className:"h-[640px]"}):null]})})),Vs=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function _s(e){throw new Error(e)}const Ps=e=>Boolean(e?.icon||e?.src),zs={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},js={normal:"",small:"min-h-6xl"},As={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"},Es=g((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",version:r="primary",...s})=>p(k,{className:w("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[u(nl,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(Ds(i,r))})}):null,Cl(a,{isVertical:!0})]}))),Ds=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return $s(e,t)(l,n);case"rte":return u(Va,{__html:l.__html});default:_s(l)}},$s=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Ls(e,t)(l,n)}),p("div",{className:w("flex flex-col justify-center h-fit",js[e]),children:[l.label?u("div",{className:"text-l text-left",children:l.label}):null,l.description?u("div",{className:w("text-s font-light text-left",As.description),children:l.description}):null]})]})},String(n)),Ls=(e,t)=>(l,n)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",r=Boolean(l?.icon?.src),s=zs[e][r?"image":"icon"];return u("div",{className:w(s,r?"":`rounded-md ${As.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex self-center text-h4 text-secondary-text group-data-secondary:text-white",children:Ps(l?.icon)?u(zt,{image:{...l.icon,iconVersion:l.icon?.iconVersion||i},width:a,height:a}):u("span",{children:n+1})})})},Os={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Fs={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Us={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Hs={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Ks=g((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,...s}=t;return u(i,{className:w("h-12","block flex-1","cursor-pointer",Os[n],l?Hs[n]:Us[n]),role:"tab","aria-selected":l,onClick:a,...s,children:u("div",{className:w("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Fs[n]:"text-secondary-text hover:text-primary-main"),children:u(de,{size:"text-m",children:r})})})})),Ws=g((e=>u(e?.item?.href?Xs:Gs,{...e}))),Xs=g((e=>{const t=J(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(Ks,{...e,tag:"a",item:a,onClick:n})})),Gs=g((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(Ks,{item:e,onClick:n,...l})})),Js=(e,t,l)=>(n,a)=>u(Ws,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Ys="hidden sm:flex absolute z-40 top-0",qs=g((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=vl({itemCount:t?.length||0});return p("div",{className:w("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(sl,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(Js(l,n,a))}),r.canScrollLeft?u(On,{className:w("left-6",Ys),onClick:r.scrollLeft}):null,r.canScrollRight?u(Fn,{className:w("right-6",Ys),onClick:r.scrollRight}):null]})})),Zs=g((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:w("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(Js(n,a,t))}))),Qs=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(Zs,{...t});case"centered":return u("div",{className:"flex",children:u(Zs,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(qs,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},eo=g((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=r((()=>l.map(lo)),[l]),[d,m]=n(0);a((()=>{l&&l[0]&&to(l[0])}),[]),a((()=>{const e=l[d];"group"===e?.type&&b.subject("tab",{type:e.type,label:e.ref})}),[l,d]);const h=i((e=>{const t=c.indexOf(e);m(t),to(l[t])}),[l,c]);return u(k,{className:w(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:Qs({items:c,value:c[d],tabsMode:s,onChange:h})})})),to=e=>{"group"===e.type&&b.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&b.fire("tab",{type:e.type,label:e.href})},lo=e=>"group"===e?.type?{text:e.title}:e,no={Buttons:({buttons:e})=>Cl(e,{className:"mt-s",buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(zt,{image:e,className:"m-0",imageClassName:"m-0"}):null,List:({isDotted:e,...t})=>u(ya,{className:"flex flex-col justify-between items-start text-m pl-xs text-base",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"mb-xs",children:e}):null,t?u("div",{className:"text-s text-secondary-text",children:t}):null]})},ao=g((({title:e,icon:t})=>p("div",{className:"mb-xs",children:[e?u(de,{size:"text-l",font:"font-light",children:e}):null,t?u(zt,{className:"ml-auto min-w-6",image:t,width:"24",height:"24"}):null]}))),io=g((({tile:e,...t})=>p("div",{className:"h-full",children:[u(ao,{title:e?.header?.title}),e?.data?.length?e.data.map(((e,l)=>u("div",{className:"mb-xs",children:ro(e,t)},String(l)))):null]})));function ro(e,t){if(!e||!e.tableCellType||!(e.tableCellType in no))return null;const l=no[e.tableCellType];return u(l,{displayTable:()=>null,isVisible:!0,...e,...t})}const so=g((({tiles:e,...t})=>e?.length?u(Nl,{...t,padding:void 0,children:e.map(((e,l)=>u(io,{tile:e,...t},String(l))))}):null)),oo=g((({tiles:e,...t})=>e?.length?u("div",{className:"flex flex-col gap-s",children:e.map(((e,l)=>u(io,{tile:e,...t},String(l))))}):null)),co=g((({className:e,title:t,description:l,tariffsColumns:n,rowHeaders:a,orientation:i="vertical",...r})=>{const s=mo(n),o=ho(a,s);return p("section",{className:`p-6xl space-3xl bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[u(nl,{title:t,description:l,headlineVersion:"M",align:"text-left",isEmbedded:!0}),u("vertical"===i?oo:so,{tiles:o,...r})]})})),mo=e=>e?.[0]?.data?e[0].data:[],ho=(e,t)=>e?.map(((e,l)=>({header:e,data:t?.[l]||[{}]}))),uo=g((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(k,{className:w("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?po():null,"big"===n?go(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(de,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?xo(l):null,r?.length?fo(r,!0):null,i?u(Va,{__html:i}):null]})]}))),po=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),go=e=>e?.src?u(zt,{className:"h-fit flex-shrink-0",image:e}):null,xo=e=>u(ce,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),fo=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(de,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),bo=g((({className:e,padding:t,headlineVersion:l="S",listItemSize:n="M",...a})=>u(k,{className:e,padding:"p-0",...a,children:u(Ka,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,listItemSize:n,...a})}))),yo={ApplicationForm:Wt,BenefitsBlock:Yt,BonusBenefitsBlock:kl,ButtonsBlock:Bl,Calculator:Mn,CardTransfer:$n,Carousel:ra,CarouselBankHistoryCard:sa,CarouselCard:da,CarouselCatalogCard:ha,CarouselProductCard:va,CarouselProgramsCard:Xa,CarouselRecommendationCard:ti,CarouselTariffsCard:ai,ComparisonTable:pi,ExchangeRateTile:Di,Footer:ar,Header:xr,Headline:nl,HorizontalLayout:yr,ImgBlock:vr,LinkDocs:Ir,MobileAppTile:_r,PictureText:jr,Placeholder:Ar,ProductBlock:Or,ProductGallery:Fr,ProductTile:Ur,RichTextBlock:Hr,RollupItem:Wi,SafeDepositRental:Ms,StepsBlock:Es,Tabs:eo,TariffsTable:co,TextBlock:uo,Tile:bo,VerticalLayout:br};const vo=["Header","Footer"],No=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function wo(e=globalThis){const t=s(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!vo.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?xl(No)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const So=g((({className:e,onClose:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(zt,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),ko="cookie",Co=g((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:r}]=Ve();((e,t,l=300)=>{a((()=>{const t=setTimeout(e,l);return()=>{clearTimeout(t)}}),t)})((()=>{globalThis.localStorage?.getItem(ko)||n()}),[],3e3);const s=i((()=>{globalThis.localStorage?.setItem(ko,"true"),r()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u("div",{className:"sm:flex-1",children:p(ce,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(pa,{isRemote:!0,className:Io(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(pa,{isRemote:!0,className:Io(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(So,{className:"bg-main-gray rounded-md",onClose:s})})]})}):null})),Io=e=>w("inline mx-2xs",e?"text-green-dark":"");const To=g((()=>{const[e,{push:t,pop:l,clear:r}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),s=i((()=>{for(const t of e)t.onClose&&t.onClose();r()}),[e]),o=i((()=>{const t=e[e.length-1];t?.onClose&&t.onClose(),l()}),[e]);return a((()=>b.subscribe("dialog",(e=>{switch(e.type){case"open":t(e);break;case"close":e.all?s():o();break;default:_s(e)}}))),[s,o]),a((()=>{const e=({key:e})=>{"Escape"===e&&o()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[o]),a((()=>{e.length?globalThis.document?.body.classList.add("no-scrollbar"):globalThis.document?.body.classList.remove("no-scrollbar")}),[e]),e.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:e.map((({dialog:t,id:l},n)=>u("div",{className:w("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===e.length-1?"":"hidden"),children:t},String(l||n))))}):null})),Bo=h();const Ro=g((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Mo()}))),Mo=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),u("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},Vo=g((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Bo.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Bo.like(e))}),[e]),dislike:i((async()=>{l(await Bo.dislike(e))}),[e])}}(G().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(Ro,{onClick:X(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(Ro,{onClick:X(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),_o=g((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return wo(),p("div",{children:[p("section",{className:w("relative @container",a,e),"data-theme":s,children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:qn(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container @lg:grid @lg:grid-cols-12 @lg:gap-2xs",children:[Zn({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),qn(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Vo,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(To,{}),u(Co,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));_o.childrenTypes=[],_o.slots=()=>["header","footer"];e.Blocks=yo,e.ContentPage=_o,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=X,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.13.5",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=H,e.useRouter=G,Object.defineProperty(e,"__esModule",{value:!0})}));