@redneckz/wildless-cms-uni-blocks 0.14.293 → 0.14.294

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 (323) hide show
  1. package/bin/migration-scripts/0.14.294.js +23 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +104 -89
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Calculator/CalculatorContent.d.ts +1 -8
  6. package/bundle/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
  7. package/bundle/components/Calculator/constants.d.ts +0 -5
  8. package/bundle/components/CalculatorBonus/CalculatorBonus.d.ts +9 -0
  9. package/bundle/components/CalculatorBonus/CalculatorBonusContent.d.ts +12 -0
  10. package/bundle/ui-kit/Calculator/CalculatorLayout.d.ts +5 -0
  11. package/{mobile/dist/components → bundle/ui-kit}/Calculator/renderRate.d.ts +1 -1
  12. package/bundle/{components → ui-kit}/Calculator/renderWantedSumInput.d.ts +1 -1
  13. package/dist/components/Blocks.js +2 -0
  14. package/dist/components/Blocks.js.map +1 -1
  15. package/dist/components/Blocks.mobile.js +2 -0
  16. package/dist/components/Blocks.mobile.js.map +1 -1
  17. package/dist/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
  18. package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  19. package/dist/components/Calculator/CalculatorContent.d.ts +1 -8
  20. package/dist/components/Calculator/CreditCalculatorForm.js +4 -4
  21. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  22. package/dist/components/Calculator/DepositCalculatorForm.js +4 -4
  23. package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  24. package/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
  25. package/dist/components/Calculator/EmbeddableCalcBlocks.js +0 -2
  26. package/dist/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
  27. package/dist/components/Calculator/RefinancingCalculatorForm.js +4 -4
  28. package/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  29. package/dist/components/Calculator/constants.d.ts +0 -5
  30. package/dist/components/Calculator/constants.js +1 -16
  31. package/dist/components/Calculator/constants.js.map +1 -1
  32. package/dist/components/CalculatorBonus/CalculatorBonus.d.ts +9 -0
  33. package/dist/components/CalculatorBonus/CalculatorBonus.js +46 -0
  34. package/dist/components/CalculatorBonus/CalculatorBonus.js.map +1 -0
  35. package/dist/components/CalculatorBonus/CalculatorBonusContent.d.ts +12 -0
  36. package/dist/components/CalculatorBonus/CalculatorBonusContent.js +2 -0
  37. package/dist/components/CalculatorBonus/CalculatorBonusContent.js.map +1 -0
  38. package/dist/components/CalculatorBonus/getBonus.js +25 -0
  39. package/dist/components/CalculatorBonus/getBonus.js.map +1 -0
  40. package/dist/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.js +13 -2
  41. package/dist/components/CalculatorBonus/getBonusCalculatorParams.js.map +1 -0
  42. package/dist/ui-kit/Calculator/CalculatorLayout.d.ts +5 -0
  43. package/dist/ui-kit/Calculator/CalculatorLayout.js +9 -0
  44. package/dist/ui-kit/Calculator/CalculatorLayout.js.map +1 -0
  45. package/dist/{components → ui-kit}/Calculator/CalculatorValueBlock.js +1 -1
  46. package/dist/ui-kit/Calculator/CalculatorValueBlock.js.map +1 -0
  47. package/dist/{components → ui-kit}/Calculator/Rate.js +1 -1
  48. package/dist/ui-kit/Calculator/Rate.js.map +1 -0
  49. package/{mobile/dist/components → dist/ui-kit}/Calculator/renderFootnote.js +1 -1
  50. package/dist/ui-kit/Calculator/renderFootnote.js.map +1 -0
  51. package/dist/{components → ui-kit}/Calculator/renderRate.d.ts +1 -1
  52. package/{mobile/dist/components → dist/ui-kit}/Calculator/renderRate.js +1 -1
  53. package/dist/ui-kit/Calculator/renderRate.js.map +1 -0
  54. package/{lib/components → dist/ui-kit}/Calculator/renderWantedSumInput.d.ts +1 -1
  55. package/{mobile/dist/components → dist/ui-kit}/Calculator/renderWantedSumInput.js +1 -1
  56. package/dist/ui-kit/Calculator/renderWantedSumInput.js.map +1 -0
  57. package/lib/common.css +1 -1
  58. package/lib/components/Blocks.js +2 -0
  59. package/lib/components/Blocks.js.map +1 -1
  60. package/lib/components/Blocks.mobile.js +2 -0
  61. package/lib/components/Blocks.mobile.js.map +1 -1
  62. package/lib/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
  63. package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  64. package/lib/components/Calculator/Calculator.fixture.d.ts +0 -1
  65. package/lib/components/Calculator/Calculator.fixture.mobile.d.ts +0 -1
  66. package/lib/components/Calculator/CalculatorContent.d.ts +1 -8
  67. package/lib/components/Calculator/CreditCalculatorForm.js +4 -4
  68. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  69. package/lib/components/Calculator/DepositCalculatorForm.js +4 -4
  70. package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  71. package/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
  72. package/lib/components/Calculator/EmbeddableCalcBlocks.js +0 -2
  73. package/lib/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
  74. package/lib/components/Calculator/RefinancingCalculatorForm.js +4 -4
  75. package/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  76. package/lib/components/Calculator/constants.d.ts +0 -5
  77. package/lib/components/Calculator/constants.js +0 -15
  78. package/lib/components/Calculator/constants.js.map +1 -1
  79. package/lib/components/CalculatorBonus/CalculatorBonus.d.ts +9 -0
  80. package/lib/components/CalculatorBonus/CalculatorBonus.fixture.d.ts +6 -0
  81. package/lib/components/CalculatorBonus/CalculatorBonus.js +44 -0
  82. package/lib/components/CalculatorBonus/CalculatorBonus.js.map +1 -0
  83. package/lib/components/CalculatorBonus/CalculatorBonusContent.d.ts +12 -0
  84. package/lib/components/CalculatorBonus/CalculatorBonusContent.js +2 -0
  85. package/lib/components/CalculatorBonus/CalculatorBonusContent.js.map +1 -0
  86. package/lib/components/{Calculator → CalculatorBonus}/getBonus.js +13 -1
  87. package/lib/components/CalculatorBonus/getBonus.js.map +1 -0
  88. package/{mobile/lib/components/Calculator → lib/components/CalculatorBonus}/getBonusCalculatorParams.js +12 -1
  89. package/lib/components/CalculatorBonus/getBonusCalculatorParams.js.map +1 -0
  90. package/lib/ui-kit/Calculator/CalculatorLayout.d.ts +5 -0
  91. package/lib/ui-kit/Calculator/CalculatorLayout.js +7 -0
  92. package/lib/ui-kit/Calculator/CalculatorLayout.js.map +1 -0
  93. package/{mobile/lib/components → lib/ui-kit}/Calculator/CalculatorValueBlock.js +1 -1
  94. package/lib/ui-kit/Calculator/CalculatorValueBlock.js.map +1 -0
  95. package/lib/{components → ui-kit}/Calculator/Rate.js +1 -1
  96. package/lib/ui-kit/Calculator/Rate.js.map +1 -0
  97. package/{mobile/lib/components → lib/ui-kit}/Calculator/renderFootnote.js +1 -1
  98. package/lib/ui-kit/Calculator/renderFootnote.js.map +1 -0
  99. package/lib/{components → ui-kit}/Calculator/renderRate.d.ts +1 -1
  100. package/{mobile/lib/components → lib/ui-kit}/Calculator/renderRate.js +1 -1
  101. package/lib/ui-kit/Calculator/renderRate.js.map +1 -0
  102. package/{dist/components → lib/ui-kit}/Calculator/renderWantedSumInput.d.ts +1 -1
  103. package/{mobile/lib/components → lib/ui-kit}/Calculator/renderWantedSumInput.js +1 -1
  104. package/lib/ui-kit/Calculator/renderWantedSumInput.js.map +1 -0
  105. package/mobile/bundle/bundle.umd.js +104 -89
  106. package/mobile/bundle/bundle.umd.min.js +1 -1
  107. package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +1 -8
  108. package/mobile/bundle/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
  109. package/mobile/bundle/components/Calculator/constants.d.ts +0 -5
  110. package/mobile/bundle/components/CalculatorBonus/CalculatorBonus.d.ts +9 -0
  111. package/mobile/bundle/components/CalculatorBonus/CalculatorBonusContent.d.ts +12 -0
  112. package/mobile/bundle/ui-kit/Calculator/CalculatorLayout.d.ts +5 -0
  113. package/mobile/bundle/{components → ui-kit}/Calculator/renderRate.d.ts +1 -1
  114. package/mobile/bundle/{components → ui-kit}/Calculator/renderWantedSumInput.d.ts +1 -1
  115. package/mobile/dist/components/Blocks.js +2 -0
  116. package/mobile/dist/components/Blocks.js.map +1 -1
  117. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
  118. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  119. package/mobile/dist/components/Calculator/CalculatorContent.d.ts +1 -8
  120. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +4 -4
  121. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  122. package/mobile/dist/components/Calculator/DepositCalculatorForm.js +4 -4
  123. package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  124. package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
  125. package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.js +0 -2
  126. package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
  127. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js +4 -4
  128. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  129. package/mobile/dist/components/Calculator/constants.d.ts +0 -5
  130. package/mobile/dist/components/Calculator/constants.js +1 -16
  131. package/mobile/dist/components/Calculator/constants.js.map +1 -1
  132. package/mobile/dist/components/CalculatorBonus/CalculatorBonus.d.ts +9 -0
  133. package/mobile/dist/components/CalculatorBonus/CalculatorBonus.js +46 -0
  134. package/mobile/dist/components/CalculatorBonus/CalculatorBonus.js.map +1 -0
  135. package/mobile/dist/components/CalculatorBonus/CalculatorBonusContent.d.ts +12 -0
  136. package/mobile/dist/components/CalculatorBonus/CalculatorBonusContent.js +2 -0
  137. package/mobile/dist/components/CalculatorBonus/CalculatorBonusContent.js.map +1 -0
  138. package/mobile/dist/components/CalculatorBonus/getBonus.js +25 -0
  139. package/mobile/dist/components/CalculatorBonus/getBonus.js.map +1 -0
  140. package/mobile/dist/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.js +13 -2
  141. package/mobile/dist/components/CalculatorBonus/getBonusCalculatorParams.js.map +1 -0
  142. package/mobile/dist/ui-kit/Calculator/CalculatorLayout.d.ts +5 -0
  143. package/mobile/dist/ui-kit/Calculator/CalculatorLayout.js +9 -0
  144. package/mobile/dist/ui-kit/Calculator/CalculatorLayout.js.map +1 -0
  145. package/mobile/dist/{components → ui-kit}/Calculator/CalculatorValueBlock.js +1 -1
  146. package/mobile/dist/ui-kit/Calculator/CalculatorValueBlock.js.map +1 -0
  147. package/mobile/dist/{components → ui-kit}/Calculator/Rate.js +1 -1
  148. package/mobile/dist/ui-kit/Calculator/Rate.js.map +1 -0
  149. package/{dist/components → mobile/dist/ui-kit}/Calculator/renderFootnote.js +1 -1
  150. package/mobile/dist/ui-kit/Calculator/renderFootnote.js.map +1 -0
  151. package/{bundle/components → mobile/dist/ui-kit}/Calculator/renderRate.d.ts +1 -1
  152. package/{dist/components → mobile/dist/ui-kit}/Calculator/renderRate.js +1 -1
  153. package/mobile/dist/ui-kit/Calculator/renderRate.js.map +1 -0
  154. package/mobile/dist/ui-kit/Calculator/renderWantedSumInput.d.ts +7 -0
  155. package/{dist/components → mobile/dist/ui-kit}/Calculator/renderWantedSumInput.js +1 -1
  156. package/mobile/dist/ui-kit/Calculator/renderWantedSumInput.js.map +1 -0
  157. package/mobile/lib/common.css +1 -1
  158. package/mobile/lib/components/Blocks.js +2 -0
  159. package/mobile/lib/components/Blocks.js.map +1 -1
  160. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
  161. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  162. package/mobile/lib/components/Calculator/CalculatorContent.d.ts +1 -8
  163. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +4 -4
  164. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  165. package/mobile/lib/components/Calculator/DepositCalculatorForm.js +4 -4
  166. package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  167. package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +1 -3
  168. package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.js +0 -2
  169. package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
  170. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js +4 -4
  171. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  172. package/mobile/lib/components/Calculator/constants.d.ts +0 -5
  173. package/mobile/lib/components/Calculator/constants.js +0 -15
  174. package/mobile/lib/components/Calculator/constants.js.map +1 -1
  175. package/mobile/lib/components/CalculatorBonus/CalculatorBonus.d.ts +9 -0
  176. package/mobile/lib/components/CalculatorBonus/CalculatorBonus.js +44 -0
  177. package/mobile/lib/components/CalculatorBonus/CalculatorBonus.js.map +1 -0
  178. package/mobile/lib/components/CalculatorBonus/CalculatorBonusContent.d.ts +12 -0
  179. package/mobile/lib/components/CalculatorBonus/CalculatorBonusContent.js +2 -0
  180. package/mobile/lib/components/CalculatorBonus/CalculatorBonusContent.js.map +1 -0
  181. package/mobile/lib/components/{Calculator → CalculatorBonus}/getBonus.js +13 -1
  182. package/mobile/lib/components/CalculatorBonus/getBonus.js.map +1 -0
  183. package/{lib/components/Calculator → mobile/lib/components/CalculatorBonus}/getBonusCalculatorParams.js +12 -1
  184. package/mobile/lib/components/CalculatorBonus/getBonusCalculatorParams.js.map +1 -0
  185. package/mobile/lib/ui-kit/Calculator/CalculatorLayout.d.ts +5 -0
  186. package/mobile/lib/ui-kit/Calculator/CalculatorLayout.js +7 -0
  187. package/mobile/lib/ui-kit/Calculator/CalculatorLayout.js.map +1 -0
  188. package/{lib/components → mobile/lib/ui-kit}/Calculator/CalculatorValueBlock.js +1 -1
  189. package/mobile/lib/ui-kit/Calculator/CalculatorValueBlock.js.map +1 -0
  190. package/mobile/lib/{components → ui-kit}/Calculator/Rate.js +1 -1
  191. package/mobile/lib/ui-kit/Calculator/Rate.js.map +1 -0
  192. package/{lib/components → mobile/lib/ui-kit}/Calculator/renderFootnote.js +1 -1
  193. package/mobile/lib/ui-kit/Calculator/renderFootnote.js.map +1 -0
  194. package/mobile/lib/ui-kit/Calculator/renderRate.d.ts +8 -0
  195. package/{lib/components → mobile/lib/ui-kit}/Calculator/renderRate.js +1 -1
  196. package/mobile/lib/ui-kit/Calculator/renderRate.js.map +1 -0
  197. package/mobile/lib/ui-kit/Calculator/renderWantedSumInput.d.ts +7 -0
  198. package/{lib/components → mobile/lib/ui-kit}/Calculator/renderWantedSumInput.js +1 -1
  199. package/mobile/lib/ui-kit/Calculator/renderWantedSumInput.js.map +1 -0
  200. package/mobile/src/components/Blocks.ts +2 -0
  201. package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +4 -4
  202. package/mobile/src/components/Calculator/CalculatorContent.ts +1 -11
  203. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +4 -4
  204. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +4 -4
  205. package/mobile/src/components/Calculator/EmbeddableCalcBlocks.tsx +0 -3
  206. package/mobile/src/components/Calculator/RefinancingCalculatorForm.tsx +4 -4
  207. package/mobile/src/components/Calculator/constants.ts +0 -18
  208. package/mobile/src/components/CalculatorBonus/CalculatorBonus.example.json +1 -0
  209. package/mobile/src/components/CalculatorBonus/CalculatorBonus.tsx +75 -0
  210. package/mobile/src/components/CalculatorBonus/CalculatorBonus.ui.json +1 -0
  211. package/mobile/src/components/CalculatorBonus/CalculatorBonusContent.ts +16 -0
  212. package/mobile/src/components/{Calculator → CalculatorBonus}/getBonus.ts +15 -1
  213. package/mobile/src/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.ts +13 -1
  214. package/mobile/src/ui-kit/Calculator/CalculatorLayout.tsx +17 -0
  215. package/mobile/src/{components → ui-kit}/Calculator/CalculatorValueBlock.tsx +1 -1
  216. package/mobile/src/{components → ui-kit}/Calculator/Rate.tsx +1 -1
  217. package/mobile/src/{components → ui-kit}/Calculator/renderFootnote.tsx +1 -1
  218. package/mobile/src/{components → ui-kit}/Calculator/renderRate.tsx +1 -1
  219. package/mobile/src/{components → ui-kit}/Calculator/renderWantedSumInput.tsx +2 -2
  220. package/package.json +1 -1
  221. package/src/components/Blocks.mobile.ts +2 -0
  222. package/src/components/Blocks.ts +2 -0
  223. package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +4 -4
  224. package/src/components/Calculator/Calculator.fixture.mobile.tsx +0 -24
  225. package/src/components/Calculator/Calculator.fixture.tsx +0 -33
  226. package/src/components/Calculator/CalculatorContent.ts +1 -11
  227. package/src/components/Calculator/CreditCalculatorForm.tsx +4 -4
  228. package/src/components/Calculator/DepositCalculatorForm.tsx +4 -4
  229. package/src/components/Calculator/EmbeddableCalcBlocks.tsx +0 -3
  230. package/src/components/Calculator/RefinancingCalculatorForm.tsx +4 -4
  231. package/src/components/Calculator/constants.ts +0 -18
  232. package/src/components/CalculatorBonus/CalculatorBonus.example.json +1 -0
  233. package/src/components/CalculatorBonus/CalculatorBonus.fixture.tsx +34 -0
  234. package/src/components/CalculatorBonus/CalculatorBonus.tsx +75 -0
  235. package/src/components/CalculatorBonus/CalculatorBonus.ui.json +1 -0
  236. package/src/components/CalculatorBonus/CalculatorBonusContent.ts +16 -0
  237. package/src/components/{Calculator → CalculatorBonus}/getBonus.ts +15 -1
  238. package/src/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.ts +13 -1
  239. package/src/ui-kit/Calculator/CalculatorLayout.tsx +17 -0
  240. package/src/{components → ui-kit}/Calculator/CalculatorValueBlock.tsx +1 -1
  241. package/src/{components → ui-kit}/Calculator/Rate.tsx +1 -1
  242. package/src/{components → ui-kit}/Calculator/renderFootnote.tsx +1 -1
  243. package/src/{components → ui-kit}/Calculator/renderRate.tsx +1 -1
  244. package/src/{components → ui-kit}/Calculator/renderWantedSumInput.tsx +2 -2
  245. package/bundle/components/Calculator/BonusCalculatorForm.d.ts +0 -8
  246. package/dist/components/Calculator/BonusCalculatorForm.d.ts +0 -8
  247. package/dist/components/Calculator/BonusCalculatorForm.js +0 -44
  248. package/dist/components/Calculator/BonusCalculatorForm.js.map +0 -1
  249. package/dist/components/Calculator/CalculatorValueBlock.js.map +0 -1
  250. package/dist/components/Calculator/Rate.js.map +0 -1
  251. package/dist/components/Calculator/getBonus.js +0 -13
  252. package/dist/components/Calculator/getBonus.js.map +0 -1
  253. package/dist/components/Calculator/getBonusCalculatorParams.js.map +0 -1
  254. package/dist/components/Calculator/renderFootnote.js.map +0 -1
  255. package/dist/components/Calculator/renderRate.js.map +0 -1
  256. package/dist/components/Calculator/renderWantedSumInput.js.map +0 -1
  257. package/lib/components/Calculator/BonusCalculatorForm.d.ts +0 -8
  258. package/lib/components/Calculator/BonusCalculatorForm.js +0 -42
  259. package/lib/components/Calculator/BonusCalculatorForm.js.map +0 -1
  260. package/lib/components/Calculator/CalculatorValueBlock.js.map +0 -1
  261. package/lib/components/Calculator/Rate.js.map +0 -1
  262. package/lib/components/Calculator/getBonus.js.map +0 -1
  263. package/lib/components/Calculator/getBonusCalculatorParams.js.map +0 -1
  264. package/lib/components/Calculator/renderFootnote.js.map +0 -1
  265. package/lib/components/Calculator/renderRate.js.map +0 -1
  266. package/lib/components/Calculator/renderWantedSumInput.js.map +0 -1
  267. package/mobile/bundle/components/Calculator/BonusCalculatorForm.d.ts +0 -8
  268. package/mobile/dist/components/Calculator/BonusCalculatorForm.d.ts +0 -8
  269. package/mobile/dist/components/Calculator/BonusCalculatorForm.js +0 -44
  270. package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +0 -1
  271. package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +0 -1
  272. package/mobile/dist/components/Calculator/Rate.js.map +0 -1
  273. package/mobile/dist/components/Calculator/getBonus.js +0 -13
  274. package/mobile/dist/components/Calculator/getBonus.js.map +0 -1
  275. package/mobile/dist/components/Calculator/getBonusCalculatorParams.js.map +0 -1
  276. package/mobile/dist/components/Calculator/renderFootnote.js.map +0 -1
  277. package/mobile/dist/components/Calculator/renderRate.js.map +0 -1
  278. package/mobile/dist/components/Calculator/renderWantedSumInput.d.ts +0 -7
  279. package/mobile/dist/components/Calculator/renderWantedSumInput.js.map +0 -1
  280. package/mobile/lib/components/Calculator/BonusCalculatorForm.d.ts +0 -8
  281. package/mobile/lib/components/Calculator/BonusCalculatorForm.js +0 -42
  282. package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +0 -1
  283. package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +0 -1
  284. package/mobile/lib/components/Calculator/Rate.js.map +0 -1
  285. package/mobile/lib/components/Calculator/getBonus.js.map +0 -1
  286. package/mobile/lib/components/Calculator/getBonusCalculatorParams.js.map +0 -1
  287. package/mobile/lib/components/Calculator/renderFootnote.js.map +0 -1
  288. package/mobile/lib/components/Calculator/renderRate.d.ts +0 -8
  289. package/mobile/lib/components/Calculator/renderRate.js.map +0 -1
  290. package/mobile/lib/components/Calculator/renderWantedSumInput.d.ts +0 -7
  291. package/mobile/lib/components/Calculator/renderWantedSumInput.js.map +0 -1
  292. package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +0 -68
  293. package/src/components/Calculator/BonusCalculatorForm.tsx +0 -68
  294. /package/bundle/components/{Calculator → CalculatorBonus}/getBonus.d.ts +0 -0
  295. /package/bundle/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.d.ts +0 -0
  296. /package/bundle/{components → ui-kit}/Calculator/CalculatorValueBlock.d.ts +0 -0
  297. /package/bundle/{components → ui-kit}/Calculator/Rate.d.ts +0 -0
  298. /package/bundle/{components → ui-kit}/Calculator/renderFootnote.d.ts +0 -0
  299. /package/dist/components/{Calculator → CalculatorBonus}/getBonus.d.ts +0 -0
  300. /package/dist/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.d.ts +0 -0
  301. /package/dist/{components → ui-kit}/Calculator/CalculatorValueBlock.d.ts +0 -0
  302. /package/dist/{components → ui-kit}/Calculator/Rate.d.ts +0 -0
  303. /package/dist/{components → ui-kit}/Calculator/renderFootnote.d.ts +0 -0
  304. /package/lib/components/{Calculator → CalculatorBonus}/getBonus.d.ts +0 -0
  305. /package/lib/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.d.ts +0 -0
  306. /package/lib/{components → ui-kit}/Calculator/CalculatorValueBlock.d.ts +0 -0
  307. /package/lib/{components → ui-kit}/Calculator/Rate.d.ts +0 -0
  308. /package/lib/{components → ui-kit}/Calculator/renderFootnote.d.ts +0 -0
  309. /package/mobile/bundle/components/{Calculator → CalculatorBonus}/getBonus.d.ts +0 -0
  310. /package/mobile/bundle/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.d.ts +0 -0
  311. /package/mobile/bundle/{components → ui-kit}/Calculator/CalculatorValueBlock.d.ts +0 -0
  312. /package/mobile/bundle/{components → ui-kit}/Calculator/Rate.d.ts +0 -0
  313. /package/mobile/bundle/{components → ui-kit}/Calculator/renderFootnote.d.ts +0 -0
  314. /package/mobile/dist/components/{Calculator → CalculatorBonus}/getBonus.d.ts +0 -0
  315. /package/mobile/dist/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.d.ts +0 -0
  316. /package/mobile/dist/{components → ui-kit}/Calculator/CalculatorValueBlock.d.ts +0 -0
  317. /package/mobile/dist/{components → ui-kit}/Calculator/Rate.d.ts +0 -0
  318. /package/mobile/dist/{components → ui-kit}/Calculator/renderFootnote.d.ts +0 -0
  319. /package/mobile/lib/components/{Calculator → CalculatorBonus}/getBonus.d.ts +0 -0
  320. /package/mobile/lib/components/{Calculator → CalculatorBonus}/getBonusCalculatorParams.d.ts +0 -0
  321. /package/mobile/lib/{components → ui-kit}/Calculator/CalculatorValueBlock.d.ts +0 -0
  322. /package/mobile/lib/{components → ui-kit}/Calculator/Rate.d.ts +0 -0
  323. /package/mobile/lib/{components → ui-kit}/Calculator/renderFootnote.d.ts +0 -0
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t};const h=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}};function u(){return u._impl()}u._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),u.setup=e=>{u._impl=e};const p=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),g={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},x=d((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:i="p-xl",padding:r,block:s,tag:c="section",role:d,children:m,style:x})=>{const f=c,b=u(),[y,v]=n(!1);a((()=>h.subscribe("tab",(e=>{e.groupName&&e.groupName!==s?.labelGroup||v(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s,b]);const N=t&&l;return o(f,{className:p("@container font-sans",N?"group":"",g[t],y?"hidden":"",r||i,e),...N?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:d,style:x,children:m})})),f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=d((({children:e})=>f?e:null)),y=d((({className:e,size:t})=>o("figure",{className:p("m-0 mt-xl min-w-[80%]",e),children:v(t)}))),v=(e=3)=>w(100,e).map((e=>Math.floor(e))).map(N),N=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),w=(e,t)=>[e].concat(t>0?w(e/1.618,t-1):[]),k={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},C={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},S=d((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=k[l]||"h3";return o(i,{role:"heading",className:p("font-sans m-0",C[t],e),children:n||a})})),T=d((({children:e,...t})=>o("p",{className:p("font-sans",Object.values(t)),children:e}))),I={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"}},B=d((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=I[l],u={marginTop:h.descriptionStyle};return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[n?o(S,{className:p("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:n}):null,a?o(T,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...u,children:a}):null]})})),M=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),R=[];function V(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=M,blocksRegistry:r={},ancestors:s=R}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:p(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return d?o(d,{className:i,block:e,options:t,...r,...n},a):null}},a)}const P=[],z=(e,{key:t,ancestors:l=P,slotName:n=null,extraProps:a,renderProps:i=V,...r})=>{const s=a?(e,t)=>V(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||P,[r.parent,n]]:l},a)))};function A({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?z(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const D=e=>e&&!e.endsWith("/")?`${e}/`:e,j=["CDN","BASE_PATH"],E=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return j.includes(t)?D(l):l}}),$=e=>Boolean(e?.includes(":")),O=(e,t)=>Boolean(e&&!$(e)&&(!t||"_self"===t)),L=e=>Boolean(e?.startsWith("#")),_=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),F=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var U=Object.freeze({__proto__:null,isURL:$,isLocalURL:O,isHash:L,withoutQuery:_,joinPath:F});const H="/api/",W=`${H}v1/storage`,K=e=>(t,l=E.BASE_PATH)=>{if([!t,$(t),L(t),[E.CDN,H].some((e=>q(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${W}/${t}/attachment`;const n=t?.startsWith("/");return F(q(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},q=(e,t)=>t&&e&&e.startsWith(t),G={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},Y=d((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const d=u(),m="normal"===i?`${l}.svg`:`sprites.svg#${l}`,h=K(d)(F(E.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:X(e,s)}):o(Z,{className:e,children:c("svg",{className:p(J(r),G[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,n?o("desc",{children:n}):null,o("use",{href:h,xlinkHref:h})]})})})),X=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},J=e=>e?"":"w-full h-full",Z=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Q=(e,t)=>l=>l&&!$(l)?K(e)(F(t,l)):l,ee=(e,t)=>e?.media&&t?.media?e.media-t.media:0,te=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=u();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(ee).map((({src:e,format:l,media:i},r)=>o("source",{srcSet:Q(a,n)(e),type:ne(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?le({...t,src:Q(a,n)(t.src)},l):null]})})),le=(e,t="")=>o("img",{src:e.src,className:p("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),ne=e=>e?`image/${String(e)}`:void 0,ae=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?o(Y,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):o(te,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),ie={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},re="bg-main-divider text-main-disabled",se={primary:re,secondary:re,white:re,link:"",transparent:"",gray:re,"":""},oe="text-center font-sans select-none",ce={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},de=({className:e,rounded:t,version:l})=>[oe,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?ie[l]:"",t?"rounded-full":"rounded-md",e].join(" "),me=()=>({open:(e,t={})=>h.fire("dialog",{type:"open",dialog:e,...t}),close:()=>h.fire("dialog",{type:"close"}),closeAll:()=>h.fire("dialog",{type:"close",all:!0})}),he=e=>he._impl(e);function ue(e={}){const{isRemote:t,basePath:l}=e,n=u(),{closeAll:a}=me();return e=>({...e,href:t&&!l?e.href:K(n)(e.href,l),"aria-label":e.text,onClick:he(i(e))});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&O(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}he._impl=e=>e,he.setup=e=>{he._impl=e};const pe=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},ge=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=fe(e)?"hidden lg:block":"";return c("div",{className:p(xe(e),"flex gap-xs"),children:[n?o("div",{className:p(r,ce[i]),children:n}):null,fe(e)?c("div",{className:"whitespace-pre",children:[l?o("div",{className:"text-xs font-light text-left",children:l}):null,o("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:p(r,ce[i]),children:a}):null]})})),xe=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return p("group/btn items-center justify-center",fe(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},fe=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),be=({className:e,rounded:t,version:l})=>["inline-block",oe,l?se[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ye=d((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault(),l.stopPropagation();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=ue()({onClick:r,href:n,...a}),c=t??o(ge,{...s});return o(e?Ne:ve,{...s,children:c})})),ve=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m})=>o("a",{className:de({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,type:c,...pe(d),children:m}))),Ne=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:be({className:e,rounded:n,version:l}),children:a})));function we(e,t,l=!1){const n="primary"===e?"white":"black",a="Вернуться назад";return c("div",{className:p(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:de({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:o(ae,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:n}})}),o(ye,{version:"link",className:"group-data-secondary:text-white/80",text:a,ariaLabel:a,onClick:t,type:"button"})]})}const ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Ce=d((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:r="",buttons:s,leftImage:d,rightImage:m,imageAlign:h,isImageAlwaysOnRight:g=!1,isImageSecondary:x=!1,backwardButton:f,children:b,...y})=>{const v=u(),N=i((()=>{v.back()}),[]);return c("div",{className:Se(n,l,e),children:[f?we(t,N):null,a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:p("grow relative flex flex-col @xl:flex-row gap-3xl w-full",d?"self-start @xl:w-auto":""),children:[Re(d,{imageAlign:h,className:"mx-auto"}),c("div",{className:p("grid gap-3xl",m?"@xl:grid-cols-2":"",d?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[r,b]}),Me(A({...y,extraProps:{className:"@container-normal"}})),Re(m,{className:p("@xl:justify-self-end @xl:col-start-2",s?Te(g):"",Ie(g),Ve(x)),imageAlign:h}),Be(s)]})]})]})})),Se=(e="",t="",l="")=>p("relative flex flex-col gap-3xl overflow-hidden",e||t,l),Te=e=>e?"row-span-2":"@xl:row-span-2",Ie=e=>e?"col-start-2 self-center":"",Be=e=>e?o("div",{className:"self-end",children:e}):null,Me=e=>e&&e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Re=(e,{className:t,imageAlign:l})=>e?o("div",{className:p("shrink-1/2 justify-self-center",l&&ke[l],t),children:e}):null,Ve=e=>e?"hidden @xl:block":"",Pe=(e=[])=>e.reduce(((e,t)=>e+t),0),ze=(e=[])=>e?.length?Pe(e)/e.length:0,Ae=(e,t="normal")=>e?o("div",{className:p("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ae,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:p(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),je=(e,t)=>e?o(T,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ee=d((({children:e,...t})=>o("span",{className:p("font-sans",Object.values(t)),children:e}))),$e=(e,t)=>e?o(Ee,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Oe=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?o(De,{...e},`rte-${t}`):["label"in e?$e(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:je(e.description,t)},String(t)):null],Le=d((({className:e,benefitsVersion:t,...l})=>c("div",{className:p("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in l?Ae(l.icon,t):null,o("div",{children:Oe(l)})]}))),_e=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Fe=e=>{return((t=e.map(_e))?.length?Math.sqrt(Math.abs(ze(t.map((e=>e**2)))-ze(t)**2)):0)>16;var t},Ue=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),He=e=>!e.some(Ue),We=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:p("flex gap-x-m gap-y-s",Fe(l)||He(l)?"flex-col":"flex-wrap",e),role:"list",children:l.map(((e,l)=>o(Le,{benefitsVersion:t,...e},String(l))))}):null)),Ke=d((({className:e,benefits:t})=>t?.length?o("div",{className:p("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Oe)}):null)),qe=d((({isTabularBenefits:e,...t})=>o(e?Ke:We,{...t}))),Ge=e=>Boolean(e?.src||e?.icon),Ye=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:p("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),role:"group",children:e.map(Xe(l))}):null,Xe=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=Je(a,r),d=Je(i,r);return n||a?.icon?o(ye,{className:p("basis-full @lg:basis-auto",e),appendLeft:Ze({...a,iconVersion:c}),appendRight:Ze({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},Je=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Ze=e=>Ge(e)?o(ae,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Qe=d((({className:e,isDotted:t,dotClassName:l,children:n})=>c("div",{className:p("font-sans flex",e),role:"listitem",children:[t?o("div",{className:"shrink-0",children:o("div",{className:p("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,o("span",{children:n})]}))),et={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},tt=d((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=et[n];return l?.length?o("section",{className:p("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>o(Qe,{isDotted:t,dotClassName:p(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),lt=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),nt=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(at)}):null)),at=({label:e,amount:t},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Ee,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[lt(2)(t)," ₽"]}):null]},String(l)),it=d((({className:e,tags:t})=>t?.length?o("div",{className:p("flex flex-wrap gap-xs",e),role:"list",children:t.map(rt)}):null)),rt=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ee,{size:"text-m",font:"font-light",children:e})},String(t)),st={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},ot=d((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,benefits:m,__html:h,isFullWidthTitle:u,items:p,isDotted:g=!0,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:C,children:S,...T})=>{const I=y?.src?o(ae,{image:y}):null,M=o(B,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),R=m?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return o(Ce,{className:e,padding:t,defaultPadding:l,...u?{title:M}:{insetTitle:M},...ct(I,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ye(b),backwardButton:C,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?o(qe,{benefitsVersion:s,isTabularBenefits:d,benefits:R}):null,h?o(De,{__html:h}):null,p?.length?o(tt,{items:p,isDotted:g,listItemSize:st[i]}):null,S,x?.length?o(nt,{priceList:x}):null,dt(f)]})})})),ct=(e,t)=>t?{rightImage:e}:{leftImage:e},dt=e=>e?.length?o(it,{tags:e}):null,mt=e=>Boolean(e&&Array.isArray(e)),ht=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),ut=(e,t)=>{return l=e,Boolean(ht(l)&&"string"==typeof l.$ref)?t.ref(e):ht(e)?t.record(e):mt(e)?t.array(e):t.scalar?t.scalar(e):e;var l},pt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(gt,e),gt=(e,t)=>e&&t?ht(e)?e[t]:mt(e)?e[parseInt(t,10)]:e:e,xt=(e,t)=>ut(e,{ref:({$ref:e,...l})=>xt(e?pt(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:xt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>xt(e,t)))}),ft=(e,t,l=[])=>{ut(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)ft(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)ft(e[n],t,[...l,n])}})};async function bt(e,t){try{return e?await yt(e,t):null}catch(e){console.error(e)}return null}const yt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),vt=e=>[...new Set(e)],Nt={},wt=["/portal-resources"],kt=(e,t)=>xt(e,(e=>t?.[e])),Ct=(e,t)=>{const l=(e=>{const t=[];return ft(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(vt(e).filter((e=>!wt.some((t=>e.startsWith(t))))).map((async e=>[e,Nt[e]||=await yt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?kt(e,{...t,...i}):e};function St(e,t={}){const l=d((t=>{const l=Ct((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...l})}));return Object.assign(l,t),l}const Tt=St((({className:e,padding:t,...l})=>o(x,{className:p("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(ot,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),It=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>Bt(0,t?.length)),[t]),n=t?.[l];return n?o(b,{children:o(Tt,{...n,...e})}):o(x,{...e,children:o(y,{})})})),Bt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Mt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Rt=e=>e?.replace(/[^+\d]/g,"");const Vt=e=>e?{phone:Rt(e)}:{},Pt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),zt=(e,t=!0)=>({[t?"email":"mail"]:e}),At=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Rt(e)}:{},Dt=({aspectsAttributes:e,aspects:t,ev:l,formData:n})=>{for(const{aspectName:a,params:i}of e){const e="mindboxEvent"===a?{...i,eventJson:JSON.stringify(n)}:i;t[a??""]?.(l,e)}},jt="rshb-query-params";function Et(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(jt)||"";return e&&globalThis.sessionStorage?.setItem(jt,e),e}const $t=e=>t=>{const[,l]=e.find((([e])=>e(t)))||[];return l},Ot=e=>{const t=e.target?.closest("a");if($(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=Et();if(!$(e)||!t)return e;const l=new URL(e);for(const[e,n]of new URLSearchParams(t))l.searchParams.set(e,n);return l.toString()})(t?.href)||t?.href;if(l){Lt(t?.target)?.(l)}}},Lt=$t([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function _t(){return _t._impl()}_t._impl=()=>({forwardQuery:Ot}),_t.setup=e=>{_t._impl=e};const Ft=e=>e,Ut=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[a,r]=n(e),[o,c]=n(!1),[d,m]=n({}),h=s({}),u=i(((e,t)=>{const{parse:l=Ft,format:n=Ft}=t||{};return h.current||(h.current={}),h.current[e]||=t=>{r((n=>({...n,[e]:l(t)}))),m((t=>({...t,[e]:!0})))},{value:n(a[e]),isDirty:o||d[e],onChange:h.current[e]}}),[a,o,d]),p=i((e=>{r(e),m(e)}),[]),g=i((()=>{r(e),c(!1),m({})}),[e]),x=i((e=>{e.preventDefault(),t?g():c(!0),l&&l(a,e)}),[l,a]);return[a,{isDirty:o||Object.values(d).some(Boolean),field:u,update:p,reset:g,onSubmit:x}]},Ht=d((({responseType:e})=>{const t="OK"===e,l=t?"ResponseOKIcon":"ResponseFailIcon";return c("div",{className:p("flex items-center p-lg rounded-md space-x-m",t?"bg-ok":"bg-fail"),children:[o(ae,{image:{icon:l,iconVersion:"normal"},width:"42",height:"42"}),c("div",{children:[o(S,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Wt=d((e=>{const{className:t,title:l,responseType:n,children:a,...i}=e;return o(x,{className:t,defaultPadding:"p-6xl",...i,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[l?o(S,{headingType:"h3",title:l,className:"@xl:text-center"}):null,a,n?o(Ht,{responseType:n}):null]})})})),Kt=e=>t=>l=>e(l)?[]:[t],qt=e=>o("div",{className:"h-6",children:e?o(Ee,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Gt=d((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),Yt=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Xt=d((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Gt,{paths:Yt,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[o("div",{className:p("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:Jt(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?d:null,l?o("div",{className:"ml-s",children:o(Ee,{size:"text-l",font:"font-light",children:l})}):null]})})})),Jt=e=>e?"radio":"checkbox",Zt=e=>p("rounded border",e?"bg-primary-main":""),Qt=d((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Xt,{text:t,value:l,disabled:a,onChange:r},n),qt(i)]})));function el(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 tl=e=>e?o(Ee,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,ll=d((({key:e,className:t="",id:l,name:n,type:r="text",label:d,placeholder:m,value:h="",valid:u=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&w.current?.focus()}),[v,w]);const C="w-full border rounded-md text-primary-text outline-none p-m",S=g?"pr-3xl":"",T=nl(u);return c("div",{className:p("relative",t),children:[c("label",{className:"space-y-xs",children:[tl(d),N?o("textarea",{className:p("block resize-y min-h-24",C,T),id:p("textarea",l),name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:p("h-14",C,S,T),ref:w,id:l,name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),nl=e=>e?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error",al=e=>e?.text||e?.key||"";function il(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function rl(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return il(globalThis.document,"click",l),t}const sl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,ol=d((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:sl(t,n).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:al(e)}),o(Y,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:p("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function cl({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>h.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>h.fire("popup",{type:"update",popup:e,...t}),close:()=>h.fire("popup",{type:"close"})},u=i((()=>{m.close(),c&&c()}),[c]),p=i((e=>{u(),r&&r(e)}),[u,r]),g=s(null),x=rl(u);return a((()=>{if(!e||!g.current)return;const a=g.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(ol,{popupRef:x,options:t,value:l,query:n,onChange:p,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,l,n,p]),g}const dl=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:h="black",onChange:u,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=el(),[y,v]=n(""),N=g||0===l.length,w=x&&!N,k=i((()=>{v(""),f()}),[]),C=cl({isOpen:x,options:l,value:a,query:y,onChange:u,onClose:k,iconVersion:h});return c("div",{className:p("space-y-xs",e),children:[tl(t),c("div",{className:p("relative",w?"z-20":"z-10"),ref:C,children:[c("div",{className:p("h-14 [&>*]:p-m pr-8 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",hl(s,r,N)),onClick:w?k:b,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:al(a)||d}),ml(w,h)]}),m&&w?o("div",{className:p("absolute top-0 w-full z-20"),children:o(ll,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),ml=(e,t)=>o(Y,{className:p("absolute right-3 flex self-center",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),hl=(e,t,l)=>p(e?"border rounded-md ":"",e&&!l?"hover:border-primary-hover":"",l?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),ul=()=>{},pl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>l)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,n,d),l=gl(t,e),c=xl(t,i,r);h.push(o("td",{children:o("div",{className:fl(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},gl=(e,t)=>t&&e.toDateString()===t.toDateString(),xl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),fl=(e,t)=>p("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),bl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],yl=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=ul})=>{const d=i((e=>s(e)),[]),{firstDayOfWeek:m,totalDays:h}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:bl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:pl({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),vl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Nl=vl.map((e=>({key:e}))),wl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),kl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Cl={className:"min-w-32",iconVersion:"black",isBorder:!1},Sl=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=el(!1),[u,g]=n(l?.getMonth()||(new Date).getMonth()),[x,f]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:C,ref:S}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=rl(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(vl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Nl,yearsOptions:wl,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:h,selectedYear:x,selectedMonth:u,showCalendar:m});return c("div",{className:p("space-y-xs",e),ref:S,children:[tl(t),c("div",{className:"relative",children:[Tl(C,l,a),m?c("div",{className:"absolute bg-white z-20 select-none",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(Y,{...kl,className:"-rotate-90 cursor-pointer"})}),o(dl,{onChange:v,value:{key:vl[u]},options:w,...Cl}),o(dl,{onChange:N,value:{key:String(x)},options:k,...Cl}),o("div",{className:"my-auto",onClick:y,children:o(Y,{...kl,className:"rotate-90 cursor-pointer"})})]}),o(yl,{today:l,currentMonth:u,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),Tl=(e,t,l)=>c("div",{onClick:e,className:p("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[o(T,{children:t&&Mt(t)}),o(Y,{...kl,name:"CalendarIcon"})]}),Il=d((({className:e,label:t,error:l,...n})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Sl,{label:t&&n?.errors?`${t}*`:t,valid:Boolean(!l),...n}),qt(l)]}))),Bl=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,type:d,...m})=>c("div",{className:p("shrink-0 w-full",e),children:[o(ll,{type:d||"text","aria-label":t,label:t&&m?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:m?.errors&&!t?`${n}*`:n}),qt(a)]}))),Ml=e=>"_"===e,Rl=e=>/\d/.test(e),Vl=e=>Ml(e)||Rl(e),Pl=[..."+7 (___) ___-__-__"],zl=Pl.findIndex(Ml),Al=Pl.map(((e,t)=>Vl(e)?Pl.slice(0,t).filter(Vl).length:-1));const Dl=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Pl.map(((e,l)=>Rl(e)?e:t.charAt(Al[l])||e)),n=Al.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(zl,n)):l).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&(t&&t(""))}),[]);return o(ll,{...l,onChange:n,onFocus:e=>n(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),jl=d((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Dl,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),qt(n)]}))),El=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(dl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),qt(l)]}))),$l="Некорректно заполненное поле",Ol=Kt((e=>null!=e&&""!==e))($l),Ll=Kt((e=>e?.key&&""!==e?.key))($l),_l=Kt((e=>"string"==typeof e&&e.length>1))($l),Fl=Kt((e=>"string"==typeof e&&(10===e.length||12===e.length)))($l),Ul=(Hl=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Kt((e=>"string"==typeof e&&Hl.test(e))))($l);var Hl;const Wl=Kt((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Kl={typeForm:Ol,surname:_l,name:_l,region:Ll,addressBranch:Ll,phone:Ul,secondaryPhone:Ul,birthday:Ol,email:Ol,fullName:_l,inn:Fl,partnerComments:Ol,collectionCount:Ol,comment:Ol,acquiringType:Ll,feedbackType:Ll,feedbackMethod:Ll,serviceType:Ll,serviceDirection:Ll,consentDataProcessing:Wl,annualRevenue:Ol},ql=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Kl?.[e]])))},Gl=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Yl=(e,t,l=!1)=>l?Gl(e,t):e,Xl=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Jl=d((({field:e,input:t})=>o(El,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Xl,...Yl(e("acquiringType"),Kl.acquiringType,t?.required)}))),Zl=(e="")=>Boolean("trade"===e||"all"===e),Ql=e=>null!=e,en=new Map,tn=e=>Boolean(e?.every((e=>Array.isArray(e)?tn(e):!e||"string"==typeof e))),ln=e=>tn(e)?e.toString():"";function nn(e,t,{fallback:l,cache:i}={}){const s=r((()=>an(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(Ql))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=en)=>l=>{const n=ln(l),a=t.get(n);if(n&&Ql(a))return a;const i=e(...l);return n&&Ql(i)&&t.set(n,Promise.resolve(i)),i})(t,i)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function an(e){return Array.isArray(e)?e:e instanceof Function?an(e()):[e]}const rn=[];const sn=async e=>await bt(e,{method:"GET"})||rn;function on(){const{data:e}=nn("/api/v1/branchesByRegions",yt);return Array.isArray(e)?e:[]}const cn=d((({field:e,input:t,isPremium:l=!1})=>{const n=e("region"),i=n?.value?.key,r=n?.value?.text,s=l?on()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=nn(e?`/api/v1/branches?regionCode=${e}`:null,sn);return t||rn}(i)?.filter((e=>e?.address));return a((()=>{""!==n?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[n?.value]),o(El,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...Yl(e("addressBranch"),Kl.addressBranch,t?.required)})})),dn=(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}},mn=(e,t,l)=>Math.max(t,Math.min(e,l));function hn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function un({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:p("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=hn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const pn=1,gn=100,xn=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:pn),max:s=(a.length?a.length-1:gn),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:u}=e,g=dn(e,{normalize:(e=0)=>a.length?fn(a)(e):mn(e,r,s),format:lt()}),x=i((e=>{u&&u(hn(e.target?.value))}),[u]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,o("input",{className:p("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:h,onInput:x,...g}),un({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:u})]}),bn(n)]})})),fn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),bn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),yn=["От 1 000 ₽","До 1 000 000 000 ₽"],vn=d((({field:e})=>o(xn,{title:"Сумма, ₽",items:yn,min:1e3,max:1e9,...e("amount")}))),Nn=d((({field:e,input:t})=>o(Bl,{className:"col-span-2",...Yl(e("comment"),Kl.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),wn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],kn=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Cn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],Sn=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Tn=d((({field:e})=>o(El,{label:"Способ получения ответа",options:Sn,...Gl(e("feedbackMethod"),Kl.feedbackMethod)}))),In=d((({field:e})=>{const t=e("feedbackType");return a((()=>{"FEEDBACK"===t?.value?.key&&e("serviceDirection")?.onChange?.(kn[0])}),[t?.value]),o(El,{label:"Тема",placeholder:"Выберите тему",options:Cn,...Gl(t,Kl.feedbackType)})})),Bn=d((({field:e})=>o(Qt,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Mn=d((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>c("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[o("div",{className:p("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:p("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Rn=d((({field:e})=>Zl(e("acquiringType")?.value?.key)?o(Mn,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Vn=d((({field:e})=>{const t=e("secondaryPhone");return o(jl,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Gl(t,Kl.secondaryPhone):t})})),Pn=d((({field:e})=>Zl(e("acquiringType")?.value?.key)?o(Mn,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null));function zn(){const{data:e}=nn("/api/v1/regions",yt);return Array.isArray(e)?e:[]}const An=d((({field:e,input:t})=>{const l=zn();return o(El,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...Yl(e("region"),Kl.region,t?.required)})})),Dn=d((({field:e,input:t})=>{const l=on(),n=r((()=>l?.map((({region:e})=>({key:e,text:e})))),[l]);return o(El,{label:"Регион",placeholder:"Выберите регион",options:n,...Yl(e("region"),Kl.region,t?.required)})})),jn=d((({field:e})=>o(El,{label:"Направление обслуживания",placeholder:"Выберите направление",options:kn,...Gl(e("serviceDirection"),Kl.serviceDirection)}))),En=["От 1 мес","До 15 лет"],$n=d((({field:e})=>o(xn,{title:"Срок, месяцев",items:En,min:1,max:180,...e("term")}))),On=d((({field:e})=>o(El,{label:"Тип обслуживания",options:wn,...Gl(e("serviceType"),Kl.serviceType)}))),Ln=d((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:"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),role:"radio"}),t?o(Ee,{color:"text-primary-text",children:t}):null]})}))),_n=["currencyControl","documentOperations","conversionTransactions","otherIssues"],Fn=d((({field:e})=>{const{value:t,onChange:l}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(Ln,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:l}),o(Ln,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:l}),o(Ln,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:l}),o(Ln,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:l})]})})),Un=(e,t)=>(l,n)=>{const{required:a,...i}=l,r="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,s={surname:o(Bl,{label:"Фамилия",...Yl(e("surname"),Kl.surname,a)}),name:o(Bl,{label:"Имя",...Yl(e("name"),Kl.name,a),...i}),middleName:o(Bl,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),phone:o(jl,{label:"Телефон",...Yl(e("phone"),Kl.phone,a)}),email:o(Bl,{label:"Электронная почта",...Yl(e("email"),Kl.email,a)}),fullName:o(Bl,{label:"ФИО",...Yl(e("fullName"),Kl.fullName,a),...i}),inn:o(Bl,{label:"ИНН",type:"number",...Yl(e("inn"),Kl.inn,a)}),comment:o(Nn,{field:e,input:l}),region:r?o(Dn,{field:e}):o(An,{field:e,input:l}),addressBranch:o(cn,{field:e,input:l,isPremium:r}),birthday:o(Il,{label:"Дата рождения",...Yl(e("birthday"),Kl.birthday,a)}),isClient:o(Bn,{field:e}),consentToReceiveMaterials:o(Qt,{...e("consentToReceiveMaterials"),text:"Согласен на получение информационных и аналитических материалов по электронной почте"}),partnerComments:o(Bl,{...Yl(e("partnerComments"),Kl.partnerComments,a),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...i}),collectionCount:o(Bl,{label:"Количество объектов инкассации",type:"number",...Yl(e("collectionCount"),Kl.collectionCount,a)}),acquiringType:o(Jl,{field:e,input:l}),onlineCheckout:o(Rn,{field:e}),posTerminal:o(Pn,{field:e}),serviceType:o(On,{field:e}),term:o($n,{field:e}),amount:o(vn,{field:e}),annualRevenue:o(Bl,{label:"Годовая выручка, ₽",...Yl(e("annualRevenue"),Kl.annualRevenue,a)}),vedTypes:o(Fn,{field:e}),feedbackType:o(In,{field:e}),feedbackMethod:o(Tn,{field:e}),serviceDirection:o(jn,{field:e}),bankEmpolee:o(Bl,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}),applicationDate:o(Bl,{label:"Дата и время обращения в Банк",...e("applicationDate")}),secondaryPhone:o(Vn,{field:e})};return function({input:e,field:t}){const{condition:l}=e,{value:n}=t(l?.name||"");return!l||l?.values?.find((e=>e===(n?.key??n)))}({input:l,field:e})?o("div",{children:s[l?.name]},String(n)):null};const Hn=e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:n,amount:a,term:i,annualRevenue:r,serviceType:s,feedbackType:o,vedTypes:c,region:d,...m}=e,h=t||r?(e=>{const{acquiringType:t,onlineCheckout:l=!1,posTerminal:n=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Zl(t?.key)?`/Онлайн касса=${l}/POS-терминал=${n}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...m,...Kn(c),...Wn(d),...h?{partnerComments:h}:{},...s?{typeForm:s}:{},...o?{typeForm:o}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Wn=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Kn=e=>e?{vedTypes:Object.fromEntries(_n.map((t=>[t,t===e])))}:{},qn={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e3,acquiringType:Xl[0],serviceType:wn[0],feedbackType:Cn[0],feedbackMethod:Sn[0],serviceDirection:kn[0],vedTypes:_n[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Gn=(e,t="")=>{const l=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||qn[e.name]])));return l?.serviceType&&"PREMIUMSERVICE"===t&&(l.serviceType=wn[1]),{...l,typeForm:{key:t,text:""}}},Yn=d((({text:e,link:t})=>c(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[o(Ee,{children:e}),t?o(ye,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:o(Ee,{children:t.text})}):null]})));function Xn({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const Jn={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"},Zn={primary:p("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:p("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},Qn=d((({children:e,...t})=>{const l=e=>({...e,onClick:he(Xn(e))}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=l(t);return o("button",{className:p("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":p(Jn[a],Zn[a]),c?"rounded-md":"",n),type:s,role:d,onClick:m,children:e})})),ea=(e,t)=>o(Qn,{className:p("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ta=(e,t,l)=>c("div",{className:"flex col-span-2 gap-m flex-col lg:flex-row w-full justify-between items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3",children:[o(Xt,{...e}),o(Yn,{link:t})]}),qt(Gl(e,Wl).error)]}):o(Yn,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),ea(l)]}),la={send:async function(e,t=!1){const{typeForm:l,region:n,phone:a="",email:i,birthday:r,inn:s,fullName:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:l,...Pt(n,g),...zt(i,g),...Vt(a),...g?{birthday:Mt(r)}:{inn:s,fullName:o},..."FEEDBACK"===l?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...At(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},na=d((({className:e,title:t,typeForm:l="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:u,data:g,...x})=>{const f=r?.flatMap((e=>e?.inputs))||[],b=Gn(f,l),[y,v]=n(""),N=i((async(e,t)=>{const l=sa(f,e),n=(a=ql(l),e=>e&&Object.entries(a).flatMap((([t,l])=>l(e[t])))||[]);var a;if(n(e)?.length)return"Fail";const i=Hn({...e,...h}),r=await la.send(i,"lead"===m)?"OK":"Fail";if(v(r),"OK"===r&&g){const e=_t();Dt({aspectsAttributes:g,aspects:e,ev:t,formData:i})}return r}),[]),[,{field:w,onSubmit:k,reset:C}]=Ut(b,{onSubmit:N}),T=ra(f)?.name;return a((()=>{"OK"===y&&C()}),[y]),c(Wt,{className:p("container space-y-m",e),title:t,responseType:y,...x,children:[c("form",{onSubmit:k,children:[r.map(((e,t)=>c("div",{className:p(ia(e.columns),"grid gap-x-m"),children:[aa(e.title),(e?.inputs||[])?.map(Un(w,l))]},`section-${t}`))),ta(T?w("consentDataProcessing"):void 0,d,s)]}),u?c("div",{className:"space-y-m",children:[o(S,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[o(ae,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ae,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),aa=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ee,{size:"text-h6",children:e})}):null,ia=e=>2===e?"@xl:grid-cols-2":"",ra=e=>e?.find((e=>"consentDataProcessing"===e?.name)),sa=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((l=>{const n=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):l===(n?.key??n)})))),oa="text-left",ca=d((({title:e,description:t})=>c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ae,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(B,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:oa})]}))),da=(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}]},ma=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function ha(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const ua=d((({className:e,style:t,idx:l,activeIndex:n,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:ha(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}(i((e=>{e.length&&m&&m(l||0,e[e.length-1])}),[m,l]),c);return o("div",{className:p("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:h,role:"listitem",children:d})})),pa=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],ga=d((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:u,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:l},b=s([]),y=i(((e,t)=>{const l=[...b.current||[]];l[e]=t,b.current=l,g&&g(l),x&&x(fa(l))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?xa(c,v):{},...N?ma(h):{},gap:`${r}px`};return o("div",{className:p("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,role:"list",children:(C=(e,l)=>o(ua,{className:p(m,a?pa[a-1]:"",N?"h-full":"",t),style:w?xa(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(C):C(e,0))(u)});var C})),xa=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),fa=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ba={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},ya={"horizontal-list":"w-6","vertical-list":"h-6"},va=d((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?o("div",{className:p("flex gap-xs",ba[a],i?"group":"",e),"data-ver":i,children:Array.from({length:n}).fill(null).map(((e,n)=>o("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?ya[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Na=e=>e,wa=(e=Na)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),ka=wa(),Ca=(e=Na)=>wa((t=>-e(t))),Sa=Ca(),Ta=e=>t=>e.scrollWidth/t,Ia=e=>(t,l)=>{e.scrollBy({left:l*Ta(e)(t),behavior:"smooth"})},Ba=({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?[Ca()(a),wa()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Ia(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Ia(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Ma=d((({className:e,disabled:t,...l})=>o(ye,{rounded:!0,className:p("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:o(ae,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),Ra=d((e=>o(Ma,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Va=d((e=>o(Ma,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Pa="absolute top-[calc(50%-24px)] z-40",za="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Aa=d((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:d,canScrollRight:m,scrollLeft:h,scrollRight:u}=e,g=a?t>0:d,x=a?t<l-1:m,f=i((()=>{a?(d&&t!==l-1&&h(),r()):h()}),[h,r,a,d,t,l]),b=i((()=>{a?(m&&0!==t&&u(),s()):u()}),[u,s,a,d,t,l]);return c("div",{className:"m:hidden block",children:[Da(e),g?o(Ra,{className:p(Pa,n?"left-1 m:left-8":"left-0"),onClick:f}):null,x?o(Va,{className:p(Pa,n?"right-1 m:right-8":"right-0"),onClick:b}):null]})})),Da=e=>c("div",{children:[e.canScrollLeft?o("div",{className:p(za,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:p(za,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),ja=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Ea=({className:e,text:t="ХИТ"}={})=>c("div",{className:p("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(Y,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(T,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),$a="relative h-full",Oa={small:"sm:min-w-64",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(Ua);return A({...n,renderProps:(n,a,r)=>c("div",{className:_a(n,{someCardsHighlighted:i}),children:[V(n,a,{className:Fa(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Ua(n)?Ea({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},_a=(e,{someCardsHighlighted:t})=>p($a,t&&(Ua(e)?"pt-3xl":"pt-3xl sm:pt-16")),Fa=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>p($a,"min-w-80",Oa[n],t&&(Ua(e)?"pt-3xl sm:pt-16":"pt-3xl"),ja(l),l&&"h-full"),Ua=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Ha=St((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,isEmbedded:s=!1,cardSize:d="normal",...m})=>{const{blocks:h=[]}=m.block||{},u=t||h?.length,[g,{inc:f,dec:b}]=da({itemCount:u,visibleItemCount:l},Math.floor(l/2)),[y,v]=Ba({itemCount:u}),[N]=v.visibleIndicesRange,w=h&&"CarouselBankHistoryCard"===h[0]?.type;return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:"p-6xl",...m,children:[c("div",{className:p(a?"flex justify-center":"","relative max-w-full"),children:[o(ga,{containerRef:y,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:La({noCardBorder:n,activeIndex:g,cardSize:d,...m})}),o(Aa,{scroll:v,arrowsPadded:i,onScrollLeft:b,onScrollRight:f,hasEdgeBlocks:w,activeIndex:g,itemCount:u})]}),o(va,{className:"@5xl:hidden",containerRef:y,activeIndex:N,dotCount:u,listType:"horizontal-list"})]})}),{childrenTypes:["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Wa=({blocksToRender:e,...t})=>o(Ha,{padding:"p-0",isEmbedded:!0,itemCount:e?.length,visibleItemCount:0,isAlignCenter:!0,isGap:!1,children:z(e,{...t.options,parent:t.block,renderProps:(e,t,l)=>o("div",{className:p("relative min-w-80",ja(!0)),children:V(e,t)},String(l))})}),Ka=e=>e%2!=0,qa=d((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,role:r,...s})=>c(l,{tag:l,className:p("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Ga=d((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>o(qa,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",role:"button",className:p("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Ee,{size:"text-h4",children:t}),iconNode:l?o(ae,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Ya=({isUnfolded:e,onToggle:t})=>o(Ga,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Xa=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const Ja=d((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:l})})})),Za=["ArrowDownIcon","ArrowUpIcon"],Qa="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",ei=({topItemsCount:e=0,label:t="",block:l,blocksToRender:n=[],...a})=>{const[i,r]=e>0?[n.slice(0,e),n.slice(e)]:[n,[]];return c("div",{className:p("space-y-2xs",n.length?"":"hidden"),children:[c("div",{className:p(Qa),children:[z(i,{...a.options,parent:l}),Ka(i.length)?o(It,{className:"col-span-6",...a}):null]}),o(Xa,{renderFoldableSection:({isUnfolded:e})=>c(Ja,{className:p(Qa),isUnfolded:e,children:[z(r,{...a.options,parent:l}),Ka(r.length)?o(It,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:l,onToggle:n})=>o(Ga,{className:p(e<1?"hidden":""),disabled:!r?.length,label:t,icon:Za[Number(l)],dataTheme:a.options?.page?.colorPalette,onClick:n})})]})},ti=d((({blocksSection:e,blocksToRender:t=[],notFound:l,...n})=>{switch(e?.view){case"grid":return c("div",{children:[li(l,t),ei({...e,...n,blocksToRender:t})]});case"carousel":return c("div",{children:[li(l,t),Wa({...n,blocksToRender:t})]});default:return null}})),li=(e,t)=>e&&!t.length?o(ca,{...e}):null,ni=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),ai=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(Mn,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),ii=d((({children:e,filtrationSchema:t,resetButton:l,field:n,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,ni(o("div",{className:"h-full w-px bg-gray"}))(Object.entries(t).map(ri(n)).filter(Boolean))]}),l?o("div",{children:o(Qn,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:l?.text})}):null]}))),ri=e=>([t,l])=>{const n=l?.type;return"array"===n?si(t,e)(l):null},si=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[l?.title?o("div",{className:"mb-m",children:o(Ee,{size:"text-m",font:"font-medium",color:"text-primary-text",children:l.title})}):null,o(ai,{items:n,multiple:!l?.single,...t(e)})]},e)};function oi(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const ci=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,di=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>ci(t[e])||ci(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>ci(t[e])||ci(l[e])||mi(t[e])<=mi(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>ci(t[e])||ci(l[e])||mi(t[e]?.min)>=mi(l[e]?.min)&&mi(t[e]?.min)<=mi(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>ci(t[e])||ci(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>ci(t[e])||ci(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),mi=e=>Number(e||0),hi=(e,{block:t,page:l,normalize:n=Ft})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=Ut(e),d=r((()=>oi(a,a.map((e=>kt(e.content,l?.fallback))))),[a,l?.fallback]),m=i===e?a:((e,t)=>(l=Ft)=>e?.filter((([,e])=>di(t,l(e)||{}))).map((([e])=>e)))(d,i)(n);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},ui={},pi={},gi=St((({className:e,filtrationSchema:t=ui,consumerField:l={},resetButton:n,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=hi(pi,{block:a.block,page:a.options?.page}),d=o(dl,{className:"w-64",label:l?.title,options:xi(l),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>xi(l).find((t=>t.key===e))||{key:""}})});return c(x,{className:p(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(ii,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Qn,{type:"reset",className:"mt-lg w-64",onClick:s,version:n?.version,children:n?.text})})]})}),o(ti,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>e?.filtrationSchema||{}}),xi=e=>oi(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),fi={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},bi=d((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:p("rounded-icon object-fit flex justify-center items-center",fi[l],e),children:o(Y,{...i,width:"54%",height:"54%",name:a})}):null})),yi=d((({className:e="",title:t,benefitList:l,...n})=>c(x,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(S,{headingType:"h3",as:"h2",className:oa,title:t}):null,l?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(vi)}):null]}))),vi=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?o(bi,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?o(ae,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(S,{headingType:"h6",children:e}),o(Ee,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),o(tt,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Ni=d((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=true,minHeight:i,children:r,onVisibleIndicesChange:s,listType:d="horizontal-list"})=>{const m=Array.isArray(r)?r.length:0,[h,u]=Ba({itemCount:m,onVisibleIndicesChange:s}),[g]=u.visibleIndicesRange;return c("div",{className:p(e,"vertical-list"===d?"relative h-full":""),children:[o(ga,{containerRef:h,activeIndex:g,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:u.handleVisibleIndicesChange,listType:d,minHeight:i,children:r}),a?o(va,{containerRef:h,activeIndex:g,dotCount:m,listType:d,version:t}):null]})})),wi=(e,t,l)=>{return o(Ni,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>c("div",{className:p("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?o(Ee,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?o(ae,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?o(Ee,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},ki=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>c(x,{className:p("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[o(B,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?wi(e,0,t):null]}))),Ci={start:"justify-start",center:"justify-center",end:"justify-end"},Si=d((({buttons:e,className:t="",align:l,...n})=>{const a=l?p("flex",Ci[l]):"";return o(x,{className:p("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Ye(e)})})),Ti=d((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r})=>c("div",{className:p("flex justify-between @xl:flex-col",e),children:[t?o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,o("div",l?{children:o(Ee,{size:"text-h3",children:[i,lt(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:o(Ee,{size:"text-h3",children:"-"})})]}))),Ii=Math.round(29.5),Bi={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Mi={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ri={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Vi={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Pi={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},zi=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,[a,i]=((e,t,l)=>{const{maxBonus:n=5e3,prefMonthsNum:a=Ri.prefMonthsNum,prefTravelBonusRate:i=Ri.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*l),n);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*l),n)*(12-a)]})(t||Ri,l,n);return{...t,...e,monthBonus:a,yearBonus:i}},Ai=e=>e?o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,Di=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>c("div",{children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),c("div",{className:"relative",children:[c("div",{className:"flex justify-start gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:lt(n,{fixed:!0})(e)}),l?o("span",{className:"text-7xl",children:l}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),ji=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(Y,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Ei=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?o(ji,{title:e,...i}):c("div",{children:[o("div",{className:"hidden @xl:block",children:o(Di,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),o("div",{className:"@xl:hidden",children:o(Ti,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function $i({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${lt(2)(l.min||0)} ₽`,`До ${lt(2)(l.max||0)} ₽`];return o(xn,{items:e?n:[],step:t,...l})}const Oi=d((({className:e="",calcSource:t,buttons:l,footnote:n})=>{const[a,{field:i}]=Ut({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:d,maxSumOther:m,monthBonus:h,yearBonus:u}=zi(a,t);return c("section",{className:p("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[c("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[$i({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),$i({title:"Сумма покупок в остальных категориях, ₽",min:d,max:m,step:500,isShowItems:!1,...i("restExpenseValue")})]}),h>=0?Ei({title:"Баллов за месяц",rate:h,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,c("div",{className:"flex flex-col gap-y-xl @xl:w-96",children:[u>=0?o(Ti,{title:"Баллов за год",value:u}):null,Ye(l,{isVertical:!0}),Ai(n)]})]})})),Li=d((({className:e,inputChildren:t,rateChildren:l,resultChildren:n})=>c("section",{className:p("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[o("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:t}),o("div",{className:"border-b border-main-divider md:hidden"}),l,o("div",{className:"flex flex-col gap-2xl sm:w-96 max-w-full",children:n})]}))),_i=(e,t=0)=>e?.sum?e.sum:t,Fi=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Ui=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Hi={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Wi=d((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>o("div",{className:p(`flex ${Hi[a]}`,l),role:"radiogroup",children:e?.map((({id:e,text:l})=>o(Xt,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Ki=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>c("div",{className:"space-y-s",children:[t?o("div",{className:"hidden @5xl:block",children:o(Ee,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",children:o(Ee,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(Wi,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:p("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),qi=e=>Ki({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Gi=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Yi([e,t],n),Yi=([e,t],l=[])=>({[e]:l.length?Sa(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?ka(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Xi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Ji={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Zi=(e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=l<90||l>730,c=function(e){const t=e?.rateType?Ji[e?.rateType]:"",{data:l}=nn(t?`/api/v1/depositrates/${t}`:null,yt);return Array.isArray(l)?l:[]}(t);if(l<=30)return{...Pi,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&Qi(s,e)&&Xi(n,["minSum","maxSum"],e)&&Xi(l,["minDays","maxDays"],e)))||Pi,{rate:m}=d,h=er(m,e),u=n+h,p=c||[Pi];return{...d,...Yi(["minSum","maxSum"],p),...Yi(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},Qi=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,er=(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)},tr=d((({className:e="",buttons:t,footnote:l,bottomFootnote:n,isShowDepositeName:a,defaultParams:i,rateParams:r})=>{const[s,{field:d}]=Ut({moneyValue:_i(i,1e5),daysValue:Fi(i,60),isReplenished:Boolean(i?.isReplenished),isPartialWithdrawal:Boolean(i?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(i?.isMonthlyInterestPayment)}),m=Zi(s,r),{income:h,finalSum:u,rate:p,isUnavailableByTerm:g,depositeName:x}=m;return o(Li,{className:e,inputChildren:c("div",{children:[$i({title:"Сумма, ₽",min:m.minSum,max:m.maxSum,...d("moneyValue"),value:m.moneyValue}),(f={title:"Срок, дней",min:m.minDays,max:m.maxDays,...d("daysValue"),value:m.daysValue},o(xn,{items:[`От ${Ui(f.min||0)}`,`До ${Ui(f.max||0)}`],step:1,...f})),c("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[lr(m,d),qi({title:"Выплата процентов",orientation:"vertical",...d("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),rateChildren:Ei({rate:p,depositeName:x,isShowDepositeName:a,isUnavailableByTerm:g}),resultChildren:c("div",{children:[nr(u,h),Ye(t,{isVertical:!0}),Ai(l),Ai(n)]})});var f})),lr=(e,t)=>c("div",{className:"space-y-s",children:[o(Ee,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[o(Xt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Xt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),nr=(e,t)=>c("div",{className:"flex flex-col gap-2xl sm:gap-0 mb-lg",children:[o(Ti,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),o(Ti,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),ar=e=>ir({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ir({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&ir({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&ir({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ir=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],rr=(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)},sr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows||[Bi],r=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>ar({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:s,maxSum:o}=Gi(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=Gi(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>ar({row:e,userInputParams:t,paramsViewSettings:l})&&Xi(n,["minSum","maxSum"],e)&&Xi(a,["minMonths","maxMonths"],e)))||Bi)({rateRows:i,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:h}=m,u=rr(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:n,monthsValue:a,monthlyPayment:u}},or=({min:e=0,max:t=0,availableMonths:l,...n})=>o(xn,{items:[`От ${cr(e)}`,`До ${cr(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),cr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,dr=e=>Ki({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),mr=d((({className:e,calcSource:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:d}]=Ut({moneyValue:_i(r,2e5),monthsValue:Fi(r,Ii),isAnnuity:Boolean(r?.isAnnuity),isInsurance:Boolean(r?.isEnableInsurance),isSalaryClient:Boolean(r?.isEnableSalaryClient),isPensionClient:Boolean(r?.isEnablePensionClient),isStateEmployee:Boolean(r?.isEnableStateEmployee)}),m=sr(s,t,i),h=dr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")}),{onChange:u}=d("moneyValue"),{onChange:p}=d("monthsValue");return a((()=>{u&&u(mn(s.moneyValue,m.minSum,m.maxSum))}),[m.minSum,m.maxSum]),a((()=>{p&&p(mn(s.monthsValue,m.minMonths,m.maxMonths))}),[m.minMonths,m.maxMonths]),o(Li,{className:e,inputChildren:c("div",{children:[$i({title:"Сумма кредита, ₽",step:500,min:m.minSum,max:m.maxSum,...d("moneyValue"),value:m.moneyValue}),or({title:"Срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),hr({...m,...i},d),o("div",{className:"sm:hidden",children:h})]}),rateChildren:Ei({rate:m.rate}),resultChildren:c("div",{children:[o(Ti,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:h}),Ye(l,{isVertical:!0}),Ai(n)]})})})),hr=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Xt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Xt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Xt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Xt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),ur=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},pr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows?.[0]?fr(t.rateRows[0].minMonths,t.rateRows[0].maxMonths):0,r=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=t?.rateRows?.find((t=>xr({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r})&&xr({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&Xi(n,["minSum","maxSum"],t)&&Xi(a||i,["minMonths","maxMonths"],t)))||Vi,{rate:c}=o,d=gr(c,e),m=n+d,h=t?.rateRows||[Vi];return{...o,...Yi(["minSum","maxSum"],h),...Yi(["minMonths","maxMonths"],h),availableMonths:ur(h.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:i,income:d,finalSum:m}},gr=(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)},xr=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],fr=(e,t)=>e+Math.round((t-e)/2),br=d((e=>{const{className:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s}=e,[d,{field:m}]=Ut({moneyValue:_i(s,2e4),monthsValue:Fi(s),isMonthlyInterestPayment:Boolean(s?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(s?.isRemoteRegistration)}),h=pr(d,l,r),{defaultMonth:u,rate:p,income:g,finalSum:x}=h,{onChange:f}=m("monthsValue"),{onChange:b}=m("moneyValue");return a((()=>{!d.monthsValue&&f&&f(u)}),[u]),a((()=>{b&&b(mn(d.moneyValue,h.minSum,h.maxSum))}),[h.minSum,h.maxSum]),o(Li,{className:t,inputChildren:c("div",{children:[$i({title:"Сумма, ₽",min:h.minSum,max:h.maxSum,...m("moneyValue"),value:h.moneyValue}),or({title:"Срок, месяцев",min:h.minMonths,max:h.maxMonths,availableMonths:h.availableMonths,...m("monthsValue"),value:h.monthsValue}),yr({...h,...r},m)]}),rateChildren:Ei({rate:p}),resultChildren:c("div",{children:[o(Ti,{title:"Доход в конце срока",value:g,postfix:"₽",prefix:"+"}),o(Ti,{title:"Сумма в конце срока",value:x,postfix:"₽"}),Ye(n,{isVertical:!0}),Ai(i)]})})})),yr=(e,t)=>{return c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?qi({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Ki({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},vr=e=>Nr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Nr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Nr=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],wr=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[Mi],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>vr({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Gi(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Gi(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>vr({row:e,userInputParams:t,paramsViewSettings:l})&&Xi(n+r,["minSum","maxSum"],e)&&Xi(i,["minSumOld","maxSumOld"],e)&&Xi(r,["minSumExtra","maxSumExtra"],e)&&Xi(a,["minMonths","maxMonths"],e)))||Mi)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=rr(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},kr=d((({className:e,calcSource:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=Ut({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=wr(i,t,a),d=dr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return o(Li,{className:e,inputChildren:c("div",{children:[$i({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),$i({title:"Ежемесячный платёж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),or({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Cr({...s,...a},r),s.isExtraMoney?$i({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:d})]}),rateChildren:Ei({rate:s.rate,fractionDigits:1}),resultChildren:c("div",{children:[o(Ti,{title:"Ежемесячный платёж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?o(Ti,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:d}),Ye(l,{isVertical:!0}),Ai(n)]})})})),Cr=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Xt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Xt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Xt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Sr={CreditCalculatorForm:mr,DepositCalculatorForm:br,BusinessDepositCalculatorForm:tr,BonusCalculatorForm:Oi,RefinancingCalculatorForm:kr},Tr=St((({className:e,calculatorTabs:t=[],...l})=>o(x,{className:e,defaultPadding:"p-0",...l,children:Br(t)}))),Ir=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in Sr))return null;const l=Sr[t];return c("div",{className:"p-xl",children:[e?.calculatorBlock?.title?o(S,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,o(l,{...e.calculatorBlock,isMobile:!0})]})},Br=e=>{if(!e||!e.length)return null;return 1===e.length?Ir(e[0]):e.map(((e,t)=>o(Xa,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>o(Ja,{isUnfolded:t,children:Ir(e)}),renderFoldButton:Mr(e)},t.toString())))},Mr=e=>({isUnfolded:t,onToggle:l})=>{const n=e.nav?.align||"text-left";return c("button",{type:"button",onClick:l,className:"w-full p-xl bg-primary-main flex items-center border-b border-white",children:[o("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:o(Y,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),c("div",{className:"flex-1 flex flex-col pl-s",children:[o(Ee,{align:n,color:"text-white",children:e.nav?.title}),o(Ee,{align:n,size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),o(Y,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]})},Rr=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=dn(e,{normalize:(e=a)=>l&&n?String(mn(Number(Vr(e)),l,n)):Vr(e),format:lt(r)}),d=i((e=>t&&t(Vr(e))),[t]);return o(ll,{onChange:d,...s,...c})})),Vr=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Pr=d((e=>o(Rr,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ee,{size:"text-xl",font:"font-light",children:"₽"})})}))),zr={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Ar={amount:1500},Dr=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...d})=>{const[{amount:m},{field:h}]=Ut(Ar),[u,g]=n(!1);return a((()=>{g(m<=0)}),[m]),c(x,{className:p("flex flex-col items-center",e),defaultPadding:"p-6xl",...d,children:[t?o(S,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:zr[s],children:[o(Pr,{valid:!u,placeholder:i,label:l,max:3e5,min:1,...h("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:m}),r?.text?o(Qn,{className:"w-full mt-lg",type:"submit",disabled:u,children:r.text}):null]})]})})),jr=d((({title:e,description:t,className:l})=>o(x,{className:l,defaultPadding:"p-6xl",children:o(B,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),Er="z-10 border border-solid w-full h-full",$r=p(Er,"absolute hidden @xl:block border-transparent"),Or=d((({className:e,title:t,description:l,button:n,...a})=>o(x,{className:p("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:p($r,"top-9 right-12 bg-green-dark")}),o("div",{className:p($r,"top-6 right-8 bg-green")}),o("div",{className:p($r,"top-3 right-4 bg-green-light")}),c("div",{className:p(Er,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(B,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ye([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Lr={black:"bg-black",white:"bg-white"},_r=d((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(x,{className:p("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ce,{className:"h-full",padding:d,title:o(B,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(ae,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Ye([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Ee,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Fr)]}):null,a?c(Ee,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Fr=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Lr[e]}`},String(t)),Ur="20",Hr="absolute w-full h-full border border-white",Wr=d((({className:e="",icon:t,...l})=>{const n=ue(),{text:a,href:i,target:r,onClick:s}=n(l);return a?o("div",{className:p("flex relative group/link pl-s pb-s sm:pr-2xs min-w-64 sm:min-w-72",e),children:c("div",{className:"relative min-h-16 w-full pb-lg sm:pb-0",children:[c("a",{className:p("absolute border\n bg-white flex items-center justify-between group-hover/link:text-primary-main","flex rounded-md lg:rounded-none w-full w-full p-lg whitespace-nowrap z-10"),role:"link",href:i,target:r,onClick:s,children:[c("div",{className:"flex items-center space-x-lg",children:[t?o(ae,{imageClassName:"text-green-dark",image:t,width:Ur,height:Ur}):null,o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})]}),o(ae,{className:"group-hover/link:brightness-100 sm:ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"color"},imageClassName:"group-hover/link:text-primary-main",width:Ur,height:Ur})]}),o("div",{className:p(Hr,"-bottom-1 -left-1")}),o("div",{className:p(Hr,"-bottom-2 -left-2")})]})}):null})),Kr=d((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>o(x,{defaultPadding:"p-5xl",className:p("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row sm:items-center gap-s justify-between",children:[c("div",{children:[o(B,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),o(B,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?qr(n,"sm:self-end sm:pt-s"):null]})}))),qr=(e,t="")=>{const l=Math.ceil(e.length/3);return o(Ha,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",visibleItemCount:0,isEmbedded:!0,children:Array.from({length:l}).fill(null).map(((t,l)=>o("div",{className:"flex flex-wrap gap-2xs sm:gap-0 sm:justify-center",children:e.slice(3*l,3*(l+1)).map(((e,t)=>o(Wr,{...e},String(t))))},String(l))))})},Gr=d((({className:e="",href:t,target:l,isRemote:n=!1,onClick:a,data:i,children:r})=>{const s=ue({isRemote:n})({href:t,target:l,onClick:a});return o(t?"a":"div",{className:p("block",e),...t?s:{},role:t?"link":"none",...pe(i),children:r})})),Yr=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Xr=d((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,d]=n(),m=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=(e=>Yr.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ge(n)?n:r,c=l?{text:a}:{text:""};return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:"color"},version:e?.version??i}})),h=p("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",a?"flex-1 justify-center":"");return c("div",{className:p("flex flex-col gap-xs",e),children:[o("div",{className:"flex gap-xs",children:Ye(m,{className:p(a||s?"basis-full":""),buttonClassName:h})}),r?o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Jr=d((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:d=[],target:m,title:h,align:u="text-left",benefits:g,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},...v})=>o(x,{className:p("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...v,children:o(Gr,{href:a,target:m,className:"h-full",children:c(Ce,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(B,{title:h,description:l,headlineVersion:"XS",isEmbedded:!0,align:u}),...ct(Ge(i)?o(ae,{image:i}):null,f),buttons:d.length?o(Xr,{media:d,showButtonText:!0,version:v?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(qe,{benefits:g}),o(tt,{items:r,isDotted:s,listItemSize:"S"}),Zr(n,u)]})})}))),Zr=(e,t)=>e?o(T,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Qr=(e,t)=>{const{title:l,description:n,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[l?o("div",{className:"opacity-80",children:o(Ee,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(Ee,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:Ye(a)}):null]},String(t))},es=d((({className:e="",title:t,align:l="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,...u})=>{const g=d.map(Qr),[f,b]=s>0?[g.slice(0,s),g.slice(s)]:[g,[]],[y,v]=n(!1);return a((()=>h.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[]),c(x,{className:p("flex flex-col",e),defaultPadding:"p-2xl",...u,children:[Ge(i)?o("div",{className:"self-center",children:o(ae,{image:i})}):null,t?o(S,{className:p("pt-xs",l),headingType:"h5",title:t}):null,r?.text?o(ye,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(Xa,{renderFoldableSection:()=>c("div",{children:[f,o(Ja,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>1?ts(y,m?.parent):null}):o("div",{children:f})]})})),ts=(e,t)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&h.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(Y,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),ls=(e=!1)=>e?"text-white":"",ns=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),as=d((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>c("th",{className:"space-y-4 flex flex-col items-start",children:[e?o(ae,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&o("div",{children:o(ae,{image:t})}),l?o(S,{headingType:"h4",className:ls(a),title:l}):null,n?o("div",{className:ns(a),children:n}):null]}))),is=d((({cell:e,rowHeader:t,isFillGradient:l=!1})=>o("div",{className:"box-border flex flex-col",role:"cell",children:o("div",{className:p("h-full","border-main-divider border-b"),children:e?e.map(os(l,t)):null})}))),rs=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),ss=(e=!1)=>""+(e?"text-white":""),os=(e,t)=>({label:l,description:n},a)=>c("div",{className:"flex justify-between text-s py-s",children:[o(T,{size:"text-s",color:rs(e),children:t}),c("div",{className:"basis-1/2",children:[l?o("div",{className:"text-right",children:o(T,{size:"text-s",align:"text-right",color:ss(e),children:l})}):null,n?o("div",{className:"text-right",children:o(T,{size:"text-s",color:rs(e),children:n})}):null]})]},String(a)),cs=d((({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 o("tr",{className:"mb-m",children:c("td",{className:p("border border-gray rounded-md p-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),children:[o(as,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>o(is,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?o(ye,{href:e.link.href,target:e.link?.target,version:s,ariaLabel:"Подробнее",className:"text-s font-medium mt-m p-s",children:e.link.text}):null,ds({onToggleColumn:i,isFillGradient:n,showRow:a})]})})})),ds=({onToggleColumn:e,isFillGradient:t,showRow:l})=>o("td",{className:"pt-lg",children:o("a",{role:"link",onClick:e,className:"cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:o(Ee,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),ms=d((e=>{const{className:t,title:l}=e;return c("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?o(S,{headingType:"h3",className:"font-medium text-center",title:l}):null,o("table",{className:"border-separate",children:o(hs,{...e})})]})})),hs=d((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[c,d]=n(Array.from({length:e.length}).fill(!a)),m=i((e=>{const t=(t,l)=>l===e?!t:t;d((e=>e.map(t)))}),[]),h=i((()=>d((e=>Array.from({length:e.length}).fill(!1)))),[]),u=e?.map((({data:e,header:n},i)=>{return o(cs,{visibleRowLength:a,showRow:c[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>m(i),...s},String(i));var r}));return o("tbody","horizontal"===r?{children:o(Ni,{onVisibleIndicesChange:h,children:u})}:{children:u})})),us=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,ps=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),gs=1e9,xs={sum:{min:1e4,max:gs},period:3},fs=St((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=hi(xs,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:bs(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),u=ys(h);return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(ii,{filtrationSchema:t,resetButton:l,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs",children:[o(Pr,{label:n?.title,min:500,max:gs,...d("sum",{parse:e=>({min:Number(e),max:gs}),format:({min:e})=>String(e)})}),o(xn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:u,...d("period")})]})}),o(ti,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),bs=e=>vt((e?.paramsSource?.rateRows||[]).filter(us).flatMap((e=>ps(e.minMonths,e.maxMonths)))),ys=e=>vt(e.flatMap((e=>e||[])).filter(us).flatMap((e=>ps(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],vs=e=>"Image"===e?.contentType&&e?.image?o(ae,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Ns=d((({className:e="",title:t,description:l,error:n,button:a,...i})=>c(x,{className:p("flex flex-col justify-center items-center",e),defaultPadding:p("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:vs(n)}),o(B,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(ye,{version:a?.version,text:a?.text,...a}):null]}))),ws="location";function ks(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(h,"location",Ss()??{name:e}),r=i((e=>{Ts(e),l(e)}),[]),{data:s}=nn(Cs()?null:"/api/v1/region",yt);return a((()=>{s&&!Cs()&&l(s)}),[s]),[t??{name:e},r]}const Cs=()=>Boolean(globalThis.localStorage?.getItem(ws)),Ss=()=>{try{const e=globalThis.localStorage?.getItem(ws);return e&&JSON.parse(e)}catch(e){return null}},Ts=e=>{try{globalThis.localStorage?.setItem(ws,JSON.stringify(e))}catch(e){}};var Is;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Is||(Is={}));const Bs=new Intl.NumberFormat("ru",{style:"currency",currency:Is.RUB}),Ms=e=>e?Bs.format(e):"",Rs="text-m font-light text-secondary-text ",Vs=`${Rs} text-left`,Ps=`${Rs} pl-5xl text-center`,zs=`${Rs} pl-5xl text-right`,As={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Ds=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:p("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Vs,children:o(Ee,{size:"text-m",children:"Валюта"})}),o("th",{className:Ps,children:o(Ee,{size:"text-m",children:"Купить"})}),o("th",{className:zs,children:o(Ee,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(js)})]}))),js=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ae,{image:{icon:As[t]},width:"24",height:"24"}):null,o(Ee,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Ee,{size:"text-h6",children:Ms(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ee,{size:"text-h6",children:Ms(e?.buyExchangeRate)})})]},t)},Es={icon:"GpsIcon"},$s=d((({className:e="",address:t})=>c("div",{className:p("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(bi,{...Es,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(T,{size:"text-l",color:"text-primary-main",children:t}):null,o(T,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Os=(e,t,l)=>{const n=Number(Ls(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)},Ls=e=>e.replace(/[^\d.,]/g,"").replace(",","."),_s=e=>$t([[e=>e.value!==Is.RUB&&e.oppositeValue!==Is.RUB,()=>e.handleConvert(e.value,Is.RUB)],[e=>e.value===Is.RUB&&e.oppositeValue===Is.RUB,()=>e.handleConvert(e.value,Is.USD)],[e=>e.value===Is.RUB&&e.oppositeValue===Is.RUB,()=>e.handleConvert(e.value,Is.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Fs(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:n,text:n};return c("div",{className:"relative flex",children:[o(ll,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(dl,{isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Us=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Is.RUB,selectBuy:l?.[0]?.currency?.currency||Is.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[Fs({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Hs(r,d,l),value:r.inputSell,setValue:e=>Ks(d,l)(e,r.selectSell,r.selectBuy)}),Fs({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Ws(r,d,t),value:r.inputBuy,setValue:e=>qs(d,t)(e,r.selectBuy,r.selectSell)}),a?.text?o(ye,{text:a.text,version:a?.version,...a}):null]})})),Hs=(e,t,l)=>n=>{t({selectSell:n}),_s({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Ks(t,l)(e.inputSell,n,a)}})},Ws=(e,t,l)=>n=>{t({selectBuy:n}),_s({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>qs(t,l)(e.inputBuy,n,a)})},Ks=(e,t)=>(l,n,a)=>{e({inputSell:Ls(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputBuy:String(Os(l,i,n===Is.RUB)||"")})},qs=(e,t)=>(l,n,a)=>{e({inputBuy:Ls(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputSell:String(Os(l,i,n===Is.RUB)||"")})};const Gs=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=ks(),i=function(e){const t=e?.code||"000",{data:l}=nn(`/api/v1/exchangerates?regionCode=${t}`,yt);return l||{}}(a),r=Ys(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Is.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:Is.RUB}}),o(x,{className:p("box-border min-h-80",e),...n,children:o(Ce,{className:"h-full",title:o(S,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(Ds,{className:"mb-xl",exchangeCurrencyItems:r}):null,o($s,{address:i?.address})]}),r.length&&s.length&&d.length?o(Us,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:l}):null]})})})})),Ys=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Xs=(e,t)=>o(bi,{...e,iconBgVersion:t,className:"shrink-0"}),Js=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(qa,{tag:"button",className:p("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Xs(a,t),e?o(Ee,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(Y,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),Zs=St((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>o(x,{className:p("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(Xa,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Ja,{className:p("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:A({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Qs({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),Qs=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"accordion"===e?o(Js,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):o(Ga,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},eo=d((({className:e="",items:t})=>c("div",{className:e,children:[t?.length?t.map(to):null,o(ye,{version:"primary",className:"w-full",href:"https://www.rshb.ru/natural/feedback/question",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),to=(e,t)=>c("div",{className:"mb-m space-y-m",children:[o("div",{children:o(Ee,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(lo)})]},String(t)),lo=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:no(e.type,e.text)}),o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),no=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${ao(t)}`,children:o(Ee,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},ao=e=>e.replaceAll(/\D/g,""),io=["split_version","New","Old"],ro=d((({className:e="",index:t,text:l,...n})=>{const a=ue(),{href:i,target:r,onClick:s}=a(n);return o("a",{className:p("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),so=d((({title:e,links:t,className:l=""})=>c("div",{className:p("flex flex-col gap-4",l),children:[o(Ee,{size:"text-l",font:"font-normal",children:e}),t?.length?o("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>o(ro,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),oo=d((({className:e="",items:t,basePath:l})=>{const n=ue({isRemote:!(!E.BASE_PATH||!l)&&!E.BASE_PATH.startsWith(l),basePath:l});return o("ul",{className:p("flex flex-col",e),children:t?.map(co(n))})})),co=e=>(t,l)=>{const{text:n,...a}=t,{href:i,target:r,onClick:s}=e(a);return o("li",{className:"list-none my-xs",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,children:n||null})},`list_item_${String(l)}`)},mo=d((({className:e="",index:t,...l})=>{const n=ue({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return o("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}`})})),ho=d((({className:e="",links:t})=>c("div",{className:p("@container",e),children:[o("div",{className:"pt-lg",children:o(Ee,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>o(mo,{index:t,...e},String(t))))}):null]}))),uo=St((({className:e,footer:t,...l})=>{const{topItems:n}=l.options?.page?.sitemap??{},{relatedEnterprises:a,contacts:r,socialMedia:s,mobileApps:d,horizontalNavigationTitle:m,documents:h}=t||{},u=i((()=>{const[e,t,l]=io;((e,t)=>{const l=globalThis.document?.cookie.split(";")??[],[,n]=l.map((e=>e.split("="))).find((([t])=>t.trim()===e))||[];t(n)&&(globalThis.document.cookie=`${e}=${t(n)}`)})(e,(e=>e?.replace(t,l)))}),[]);return c(x,{tag:"footer",className:e,defaultPadding:"p-4xl pb-24",...l,children:[o("div",{className:"mb-lg pb-xs border-b border-main-divider",role:"menu",children:po(n)}),o(eo,{className:"overflow-hidden",items:r}),c("div",{className:"mt-xl",children:[o(Xr,{className:"mb-xl",media:s,stretched:!0,children:"Соцсети"}),c("div",{className:"mb-xl",children:[o(Xr,{className:"mb-m",media:d,stretched:!0,showButtonText:!1}),o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),o("div",{className:"py-lg border-t border-main-divider",children:o(ro,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:u})}),o(so,{className:"py-lg border-y border-main-divider",title:m,links:a}),o(ho,{links:h})]})})),po=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(Zs,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(oo,{items:e.items,basePath:D(e.href)}):null},String(t)))),go={width:"34",height:"34"},xo={"bg-white":"color",transparent:"white"},fo={"bg-white":"text-primary-main",transparent:"text-white"},bo=(e,t,l)=>o(ae,t?.src?{image:t,className:fo[e],width:l?.width,height:l?.height}:{image:{icon:t?.icon||"LogoIcon",iconVersion:xo[e]},className:fo[e],width:l?.width,height:l?.height}),yo={"bg-white":"text-primary-text",transparent:"text-white"},vo=d((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>c("a",{className:p("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",...pe(l?.data),children:[bo(i,l?.image,go),r?n??o("div",{className:"ml-s",children:o(Ee,{font:"font-medium",color:yo[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),No={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},wo=d((({bgColor:e,logo:t,alwaysShowLogo:l,internetBankUrl:n,version:a})=>{const r=u(),s=E.BASE_PATH?.startsWith(r.pathname),d=i((()=>{r.back()}),[]);return c("div",{className:"flex items-center justify-between w-full",children:[l||s?o("div",{children:o(vo,{className:"my-2xs",bgColor:e,logo:t})}):ko(d),n?o("div",{children:o(ye,{href:n,ariaLabel:"Войти",target:"_blank",className:p("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",No["transparent"===a?"transparent":"default"]),children:"Войти"})}):null]})})),ko=e=>o("div",{children:c("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,type:"button",children:[o(ae,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),Co={"bg-white":"primary",transparent:"transparent"},So=St((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:l=Co[e],portal:n,...a})=>{const{logo:i}=a.options?.page?.sitemap??{},{internetBankUrl:r}=n||{};return o(x,{tag:"header",defaultPadding:"",version:l,...a,children:o("div",{className:"container px-lg py-2xs box-border",children:o(wo,{bgColor:e,logo:i,alwaysShowLogo:t,internetBankUrl:r,version:l,...a})})})})),To=(e=!1)=>e?{}:{padding:"p-0"},Io={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Bo=St((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=u();return o(x,{className:p("relative flex flex-col",Io[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:A({...c,extraProps:{className:p("w-full",ja(r)),...To(n)}})})}),{childrenTypes:[]}),Mo=St((e=>o(Bo,{...e})),{childrenTypes:[]}),Ro=d((e=>{const{className:t,align:l,image:n,...a}=e,i=l?p("flex",Ci[l]):"";return o(x,{className:p(i,t),defaultPadding:"p-0",...a,children:o(ae,{image:n})})})),Vo=["байт","Кб","Мб","Гб","Тб","Пб"],Po=d((({icon:e,text:t,href:l,target:n,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:l,target:n,...pe(i),children:[e,t?c(Ee,{size:"text-l",font:"font-light",children:[t," ",zo(d,m),o(Ee,{color:"text-secondary-text",children:l&&`${d+s+m}`})]}):null]})})),zo=(e,t)=>e||t?o("span",{children:", "}):"",Ao={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Do=d((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=u();return c(x,{className:p("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(B,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:p("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Ao[r]),role:"list",children:a.map(jo(d,i))}):null]})})),jo=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a=K(e)("Attachment"===l?.docType?l?.attachment?.src:l?.href),i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Vo[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?Eo(a):l?.fileFormat;return o("div",{role:"listitem",children:o(Po,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?o(ae,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:t,width:"24",height:"24"}):null,data:l?.data})},String(n))},Eo=e=>{if(!e)return"";const t=e.lastIndexOf("."),l=new RegExp(/\/(.*)/),n=-1!==t?e.substring(t+1):"";return n.includes("/")?n.replace(l,""):n},$o=St((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,headingType:d,additionalDescription:m="",title:h="Мобильное приложение",version:u="primary",...g})=>{const f="secondary"===u?"p-m min-w-32":"min-w-24",b=i?.src?o(ae,{className:"hidden lg:block",image:i}):null;return o(x,{className:p("min-h-80",e),padding:"p-0",version:u,...g,children:c(Ce,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(S,{headingType:d,title:h,className:p("whitespace-pre-wrap",l)}),rightImage:b,buttons:Ye(n,{className:"flex-wrap"}),children:[a?o(Ee,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:p("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[o(tt,{items:r,listItemSize:"M"}),o(Ee,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),s?.src?o("div",{className:p("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ae,{className:"w-fit",image:s})}):null,i?.src?o(ae,{className:"lg:hidden",image:i}):null]})]})})})),Oo={primary:"bg-white/30",secondary:"bg-main-divider"},Lo={primary:"text-white",secondary:"text-secondary-text"},_o=d((({count:e,version:t="secondary"})=>o("div",{className:p("w-6 h-6 rounded-full flex items-center justify-center",Oo[t]),role:"status",children:o(Ee,{size:"text-xs",color:Lo[t],children:e})}))),Fo=(e=[],t={})=>e.filter((({content:e={}})=>di(t,e))).length,Uo=(e,t)=>e===t;const Ho=(Wo=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Uo,((e=Uo)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Wo(l,t[e])))));var Wo;const Ko=[],qo={},Go={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Yo={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Xo={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Jo={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Zo=d((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...d}=t;return o(i,{className:p("h-12","block flex-1","cursor-pointer",Go[n],l?Jo[n]:Xo[n]),role:"tab","aria-selected":l,onClick:a,...d,children:c("div",{className:p("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Yo[n]:"text-secondary-text hover:text-primary-main"),children:[o(Ee,{size:"text-m",children:r}),s?o("div",{className:"ml-xs",children:s}):null]})})})),Qo=d((e=>o(e?.item?.href?ec:tc,{...e}))),ec=d((e=>{const t=ue(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(Zo,{...e,tag:"a",item:a,onClick:n})})),tc=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(Zo,{item:e,onClick:n,...l})})),lc=(e,t,l)=>(n,a)=>o(Qo,{isActive:n===e,onClick:t,type:l,item:n},String(a)),nc=d((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>o("div",{className:p("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(lc(n,a,t))}))),ac={categories:[],extraOptions:[],propertyType:[],stage:[]},ic=St((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:u}]=hi(ac,{block:a.block,page:a.options?.page}),g=i(((e=ac)=>u(e)),[]),f=(({hotFilters:e=Ko,filtrationState:t=qo,blocks:l=Ko,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Ho(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:o(_o,{version:t===e[a]?"primary":"secondary",count:Fo(l,t.filter)})})))),[e,l,a]),c=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:c}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:g});return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(nc,{...f}),o(ii,{filtrationSchema:l,resetButton:n,field:m,reset:h}),o(ti,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}});function rc(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((({coords:t,content:l})=>new e.Placemark(t,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{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.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const sc={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"},oc=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(sc).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:o(Y,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),cc=e=>globalThis[e];function dc(e,t,l=!0){const[i,r]=n(void 0);return a((()=>{let n=!0;return((e,t)=>{const l=document.getElementById(t);if(l){const t=cc(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(cc(e))}))}))}return new Promise(((l,n)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{l(cc(e))})),a.addEventListener("error",(e=>{n(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{n&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(n=!1,l){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,l]),i}const mc={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"},hc=d((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(mc).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(Y,{name:l,width:"20",height:"16"})})})),uc=[55.753995,37.614069],pc=d((({points:e,className:t="",zoom:l=5})=>{const n=s(null),i=dc("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${E.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{n?.current?i&&(rc(i,n.current,e),e?.length||n.current.setCenter(uc)):i?.ready((()=>{n.current||(n.current=new i.Map("map",{center:e?gc(e):uc,zoom:l,controls:[],suppressMapOpenBlock:!0}),rc(i,n.current,e))}))}),[i,n,e,l]),!i)return null;const r="z-10";return c("div",{id:"map",className:p("relative","w-full",t),children:[c("div",{className:p("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",r),children:[o(hc,{yandexMaps:n}),o(hc,{yandexMaps:n,direction:"out"})]}),oc(n.current,i,p("right-2 top-80",r))]})})),gc=e=>[fc(xc(e,0)),fc(xc(e,1))],xc=(e,t)=>e.map((e=>e.coords[t])),fc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,bc={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему"},yc="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",vc=(e,{field:t,reset:l},n=3)=>{const a=(e||[]).map((e=>o(Xt,{text:bc[e],...t(e)},e))),[i,r]=n>0?[a.slice(0,n),a.slice(n)]:[a,[]];return o("div",{children:e?.length?o("div",{children:r.length>0?o(Xa,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:yc,children:i}),o(Ja,{className:yc,isUnfolded:e,children:r})]}),renderFoldButton:Nc(l)}):o("div",{className:yc,children:i})}):null})},Nc=e=>({isUnfolded:t,onToggle:l})=>c("div",{className:"flex",children:[o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0 mr-lg",appendRight:o(Y,{name:["ArrowDownIcon","ArrowUpIcon"][Number(t)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(t)],onClick:l}),o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,text:"Очистить фильтр",appendRight:o(Y,{name:"CloseIcon",width:"16",height:"16"})})]}),wc=()=>{},kc=()=>[],Cc=e=>"all"===e?"block":"hidden",Sc=d((({className:e,data:t=[],renderCard:l=wc,filterItems:a=kc,getBalloon:i=wc,initFilterState:s={},descriptionData:d,title:m})=>{const[h,{field:u,reset:g}]=Ut(s),[x,f,y]=r((()=>{const e=a(t,h),l=e.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:i(e)}))).filter((e=>e.coords&&2===e.coords.length));return[e,l,e.length]}),[t,h]),[v,N]=n("all");return c("div",{className:p("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-6xl pb-0",children:[c("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:[o(S,{headingType:"h2",children:m}),y?o(Ee,{size:"text-h2",color:"text-secondary-text",children:`(${y})`}):null]}),d?Ic(d):null,Tc(t,v,N),o("div",{className:p("pb-2xl",Cc(v)),children:vc(Object.keys(s),{field:u,reset:g})})]}),o("div",{className:"h-[600px]",children:o(b,{children:o(pc,{points:f,className:"h-full"})})})]}),x.map(l)]})})),Tc=(e,t,l)=>{const n="business"===t?"primary":"secondary",a=(e,t,n)=>(e.currentTarget===e.target&&"business"===t&&n.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),l(t),n);return c("div",{className:"flex pb-lg",children:[o(Qn,{className:"mr-m","data-id":"all",onClick:t=>a(t,"all",e),version:"all"===t?"primary":"secondary",children:"Для физических лиц"}),o(Qn,{"data-id":"business",onClick:t=>a(t,"business",e),version:n,children:"Для юридических лиц"})]})},Ic=({__html:e,list:t})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(De,{__html:e})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ae,{image:e.image}):null,e?.text?o(Ee,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Bc={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Mc=d((({className:e,children:t,color:l="gray"})=>c("div",{className:p("sm:p-s sm:border sm:border-gray rounded-md flex items-center",Bc[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ae,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Ee,{size:"text-m",color:Bc[l].text,children:t})]}))),Rc=d((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:Vc({textItems:a,subText:t,children:l,...n})})),Vc=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>c("div",{className:p("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Ee,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>o(Ee,{size:"text-l",children:e.trim()},String(t)))),a?o(Ee,{color:n,size:"text-m",children:a}):null]}),Pc=d((({className:e,children:t})=>o("div",{className:p("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),zc=["ArrowDownIcon","ArrowUpIcon"],Ac=["Подробнее","Скрыть"],Dc=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:Ac[Number(e)]}),o(Y,{className:"text-primary-text",name:zc[Number(e)],width:"16",height:"16"})]}),jc=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Oc(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ee,{size:"text-h4",children:Oc(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(Y,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),o(Mc,{color:"green",children:Oc(s)})]}),o("div",{className:"hidden sm:block",children:o(Pc,{className:"flex-wrap",children:m?.map($c)})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:o(Pc,{className:"flex-wrap",children:m?.map($c)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Dc({isUnfolded:e,onToggle:t})})]},String(d))},Ec=({address:e="",terminalType:t,atmCode:l=""})=>({header:`${Oc(t)} №${l}`,body:e.toUpperCase()}),$c=(e,t)=>o(Rc,{...e},String(t)),Oc=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Lc=[];const _c=async e=>{const t=await bt(e,{method:"GET"});return Array.isArray(t)?t:Lc},Fc={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Uc={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Hc=d((({data:e,className:t})=>{const[l]=ks(),n=function(e){const{data:t=Lc}=nn(`/api/v1/atms?regionCode=${e}`,_c);return t}(l?.code??"000");return o(Sc,{className:t,filterItems:Wc,data:n,initFilterState:Fc,renderCard:jc,getBalloon:Ec,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),Wc=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Uc[t](e))),l=!n.length||n.some((t=>Uc[t](e)));return t&&l}))},Kc=e=>{const t=Gc(e);return o(Rc,{label:"Режим работы",value:t,className:"max-w-none"})},qc=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",Gc=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[qc({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),qc({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean)},Yc=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Xc=e=>Yc.map((([t,l,n])=>({key:t,title:n,short:l,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Jc=e=>{if(!e)return null;const t=Zc(e);return c(Pc,{className:"border-none",children:[o(Rc,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Qc)})}),o(Rc,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]})},Zc=e=>{const t=Yc.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},Qc=({short:e,status:t},l)=>o("div",{className:p("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Ee,{size:"text-xs",children:e})},String(l)),ed=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Rc,{label:"Валюта",value:e.currency}):null,t?o(Rc,{label:"Купить",value:String(t)}):null,l?o(Rc,{label:"Продать",value:String(l)}):null]},String(n)),td=(new Date).getDay(),ld=e=>{const[t]=e?.slice(td-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Mc,{color:"green",children:a}):null,l&&i?o(Mc,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(Mc,{color:"red",children:"Выходной"})},nd=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",ad=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(Rc,{label:e,value:t&&l?l:"",subText:nd({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),id=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,rd=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,sd=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,od=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=Xc(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ee,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(Y,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),ld(u)]}),o("div",{className:"hidden sm:block",children:cd({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:cd({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Dc({isUnfolded:e,onToggle:t})})]},String(h))},cd=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Xc(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Pc,{className:"flex-wrap",children:[o(Rc,{label:"Факс",value:t}),o(Rc,{label:"Телефон филиала",value:e}),o(Rc,{label:"Для обращений юридических лиц",value:l}),o(Rc,{label:"Обслуживание физических лиц",value:n}),o(Rc,{label:"Для консультаций по валютному контролю",value:i}),o(Rc,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?o(Pc,{children:o(Rc,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(ad)})})}):c(Pc,{children:[o(Rc,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Qc)})}),Kc(d)]}),r?.businessScheduleVisibleTag?Jc(r?.businessScheduleDescription):null,s?.currencies?.length?o(Pc,{className:"flex-wrap",children:s?.currencies?.map(ed)}):null]})},dd=({name:e="",address:t="",workSchedule:l})=>{const n=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Xc(e),l=e?Gc(t):"",n=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?id(l):sd(l,n):rd(l):null})(l)}`;return{header:n,body:i}},md=[];const hd=async e=>{const t=await bt(e,{method:"GET"});return Array.isArray(t)?t:md},ud={workingSaturday:!1,premiumService:!1,privateBanking:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},pd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday),premiumService:e=>Boolean(e.premiumService),privateBanking:e=>Boolean(e.privateBanking),sellingCoins:e=>Boolean(e.sellingCoins),buyingCoins:e=>Boolean(e.buyingCoins),bullionOperations:e=>Boolean(e.bullionOperations),preciousMetalsOperations:e=>Boolean(e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean(e.transferringDataToBiometricSystem)},gd=d((({className:e})=>{const[t]=ks(),l=function(e){const{data:t=md}=nn(`/api/v1/branches?regionCode=${e}`,hd);return t}(t?.code??"000");return o(Sc,{className:e,filterItems:xd,data:l,initFilterState:ud,renderCard:od,getBalloon:dd,title:`Офисы филиала ${t?.name}`})})),xd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>pd[t](e)))))},fd=d((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return o(x,{version:"transparent",className:p(t),defaultPadding:"p-0",...l,children:"offices"===n?o(gd,{}):o(Hc,{data:e})})})),bd=d((({className:e,title:t,description:l="Блок в разработке...",...n})=>c(x,{className:p("box-border",e),...n,children:[o(B,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(y,{})]}))),yd=d((({className:e,padding:t,slides:l=[],...n})=>o(x,{className:p("overflow-hidden relative",e),padding:t,...n,children:o(Ni,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(ot,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),vd=d((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:d="primary",...m})=>c(x,{className:p("box-border text-left space-y-s",a),version:d,...m,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ge(r)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ae,{image:r})}):null,s?o(S,{headingType:"h3",as:"h3",title:s}):null]}),c("div",{className:"w-full space-y-m",children:[i?Nd(i):null,wd({label:"Адрес",data:e,iconName:"GeolocationIcon"}),wd({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),wd({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Ye([n]):null]})]}))),Nd=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{__html:e})}),wd=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(Y,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Ee,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ee,{size:"text-xl",color:n,children:t})]})]}):null,kd=d((e=>{const{__html:t,richVersion:l,...n}=e;return o(x,{defaultPadding:"p-0",...n,children:o(De,{__html:t,richVersion:l})})})),Cd=d((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return c("div",{className:p("order-4",e),role:"radiogroup",children:[o(Ln,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Ln,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Sd=d((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),c=s.find((e=>e.key===n));return o(dl,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),Td=d((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Sd,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Sd,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Id=["От 1 дня","До 365 дней"],Bd=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ee,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(xn,{min:1,max:365,value:e,items:Id,onChange:t})]}))),Md=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Sd,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Sd,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Rd=d((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Td,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Vd(m)}),o(Bd,{days:a,setDays:e=>m({days:e})}),o(Md,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Pd(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Cd,{}),o(ye,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),Vd=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Pd=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},zd=d((({days:e,tariffs:t=[]})=>{const l=Dd(e,t),n="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Ad("Аренда за",e),Ad("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ae,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(T,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),Ad=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Dd=(e,t)=>{const l=jd(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},jd=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},Ed=(e,t)=>e.find((e=>e.branchCode===t)),$d=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Ed(n,l.selectedBranch),d=Od(s?.safeBoxCaseVolumes),m=Ld(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=_d(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Rd,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(zd,{days:l.days,tariffs:h})]})})),Od=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Ld=(e,t)=>e?.find((e=>e.volume===t)),_d=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Fd=[];const Ud=async e=>await bt(e,{method:"GET"})||Fd,Hd=d((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),d=i((()=>s((e=>!e))),[]),[m,h]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=zn(),p=Wd(m.selectedRegion,u),g=function(e){const{data:t}=nn(e?`/api/v1/safeboxes?regionCode=${e}`:null,Ud);return t||Fd}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=Ed(g,m.selectedBranch)||g,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(x,{className:l,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(S,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o($d,{regions:u,branches:g,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(T,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(pc,{points:b,className:"h-[640px]"}):null]})})),Wd=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Kd(e){throw new Error(e)}const qd={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Gd={normal:"",small:"min-h-6xl"},Yd={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"},Xd=d((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",stepVersion:r="gray",version:s="primary",...d})=>c(x,{className:p("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...d,children:[o(B,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?o("div",{className:"box-border",children:o("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(Jd(i,r))})}):null,Ye(a,{isVertical:!0})]}))),Jd=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Zd(e,t)(l,n);case"rte":return o(De,{__html:l.__html});default:Kd(l)}},Zd=(e,t)=>(l,n)=>o("div",{className:"contents",children:c("div",{className:"flex flex-row items-center relative",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Qd(e,t)(l,n)}),c("div",{className:p("flex flex-col justify-center h-fit",Gd[e]),children:[l.label?o(T,{size:"text-l",align:"text-left",children:l.label}):null,l.description?o("div",{className:p("text-s font-light text-left",Yd.description),children:l.description}):null]})]})},String(n)),Qd=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=qd[e][i?"image":"icon"],s=i?"transparent"===t:t;return o(x,{className:p(r,"z-10 mr-s flex justify-center content-center rounded-md"),defaultPadding:"",version:s,children:o("span",{className:"flex max-w-full max-h-full items-center justify-center",children:Ge(l?.icon)?o(ae,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:em(e),height:em(e)}):o("span",{className:p("text-h4","transparent"===t?Yd.iconText:(c=t,"secondary"===c?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var c},em=e=>"normal"===e?"38":"24",tm=d((({isActive:e,onClick:t})=>c("button",{className:p(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:t,type:"button",children:[o(Y,{className:"w-6 h-6",name:"BurgerIcon",iconVersion:e?"color":"black"}),"Меню"]}))),lm=d((({isActive:e,item:t,onClick:l})=>c("div",{className:p(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:l,children:[o(Y,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),nm=d((({className:e,onClose:t})=>o("button",{className:p("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(ae,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),am=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=me(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white p-0 rounded-xl mt-[20%]",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(nm,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),im=({menuRef:e,dialogRef:t,closeDialog:l,openDialog:n,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();n(o(am,{onClick:e=>e.stopPropagation(),onClose:l,head:o("div",{className:"flex items-center px-xl",children:o(S,{as:"h4",title:c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];const rm=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>h.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Kd(e)}}))),[c,d]),l},sm=e=>({href:t})=>!!t&&_(om(t,e)).startsWith(_(t)),om=(e,t)=>$(e)?t.href:t.pathname;function cm(e=[]){const t=u(),l=e.findIndex((e=>sm(E.BASE_PATH?{pathname:E.BASE_PATH}:e))(t));return[l,e[l]]}const dm=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=me(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(nm,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),mm=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const hm=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Ee,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(um,{...e},String(t))))})]}):null,um=d((({icon:e,...t})=>{const l=ue(),{text:n,target:a,href:i,onClick:r}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ae,{pathPrefix:"/wcms-resources/",image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),pm=e=>t=>t.name?o(Gr,{isRemote:!0,href:`/branches/${t.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>{e&&e(t)},data:[{aspectName:"mindboxEvent",params:{eventAction:"headerRegionNewSelect",eventCategory:"header",eventValueText:t.name}}],children:o(Ee,{size:"text-l",font:"font-light",children:t.name})},String(t.id)):null,gm=d((({className:e,searchTerm:t,onSearch:l})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),xm=d((({foreignOffices:e,branches:t})=>{const[l,a]=ks(t?.default),r=ue({isRemote:!0}),{href:s}=r({href:`/branches/${l.slug}`}),[d,m]=n(""),h=bm(zn()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(h,fm),{close:p}=me(),g=i((e=>{a(e),p()}),[]);return c(dm,{className:"pb-20",head:c("div",{children:[o(Ee,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?o("div",{className:"mb-s",children:c(T,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Gr,{isRemote:!0,href:s,className:"inline mx-2xs text-primary-main",children:l.name})]})}):null,o(gm,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&mm(e.toLowerCase())(d.toLowerCase())>=.8)).map(pm(g))}):o("div",{className:"columns-1 sm:columns-5",children:Array.from(u.entries()).map((x=g,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ee,{size:"text-h6",children:e})}),t.map(pm(x))]},e)))}),hm(e)]});var x})),fm=e=>e.name?.charAt(0)||"",bm=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),ym=d((({item:e,basePath:t})=>{const l=ue({isRemote:!(!E.BASE_PATH||!t)&&!E.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=u(),s=sm(r)({href:n});return o("div",{className:"mt-3",children:c("a",{className:p(s?"text-primary-main":"text-primary-text","p-4 text-h5 font-light flex justify-between cursor-pointer","shadow-main-black","rounded-xl"),href:n,target:a,onClick:i,children:[e.text,o(ae,{image:{icon:"ArrowRightIcon",iconVersion:"color"},width:"24",height:"24",className:"text-secondary-text opacity-30"})]})})})),vm=({item:e,isActive:t,onClick:l})=>o("div",{className:p("relative rounded-2xl p-2",t?"bg-primary-main":"bg-main-gray"),children:o("button",{type:"button",className:"relative",onClick:l,children:o("span",{className:p("whitespace-nowrap",t?"text-white":""),children:e.text})})}),Nm=d((e=>{const{topItems:t,branches:l,officesAtms:s}=e,[d]=ks(l?.default),m=(e=>{const{open:t,close:l}=me();return{open:(l={})=>t(o(xm,{...e}),l),close:l}})(e),[h,u]=Ba({itemCount:t?.length??0}),[p]=cm(t),[g,x]=n(p),f=r((()=>t?.[g]),[t,g]),b=f?.items||[],y=ue();a((()=>{x(p)}),[p]),a((()=>{g>0&&u.scrollTo(g)}),[g,u]);const v=i((e=>x(e)),[]);return o(dm,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center",children:o(S,{as:"h4",title:"Меню"})}),children:c("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[o("div",{className:"w-full mb-3",children:o(ga,{containerRef:h,visibleItemCount:0,gap:10,className:"pb-3",children:t?.map(((e,t)=>o(vm,{item:e,isActive:g===t,onClick:()=>v(t)},String(t))))})}),c("div",{className:"relative grow",children:[wm(b,f?.href),s?.href?km(y)(s):null,Cm(d,(()=>m.open()))]})]})})})),wm=(e,t)=>e?o("div",{children:e.map(((e,l)=>o(ym,{item:e,basePath:t},String(l))))}):null,km=e=>t=>{const{href:l,target:n,onClick:a}=e(t);return o("div",{className:"mt-3",children:c("a",{className:p("text-primary-text","p-4 text-h5 font-light flex justify-between cursor-pointer","shadow-main-black","rounded-xl"),href:l,target:n,onClick:a,rel:"noopener noreferrer","aria-label":"Отделения и банкоматы",...pe(t?.data),children:[o("span",{children:"Офисы и банкоматы"}),o(ae,{image:{icon:"ArrowRightIcon",iconVersion:"color"},width:"24",height:"24",className:"text-secondary-text opacity-30"})]})})},Cm=(e,t)=>c("div",{className:p("text-primary-text","p-4 text-h5 font-light flex justify-between cursor-pointer","shadow-main-black","rounded-xl","mt-3"),onClick:t,children:[o("div",{className:"flex flex-col items-start",children:c("span",{children:["Ваша локация - ",e.name]})}),o(ae,{image:{icon:"ArrowRightIcon",iconVersion:"color"},width:"24",height:"24",className:"text-secondary-text opacity-30"})]}),Sm="burgerMenuDialog",Tm=e=>{const{open:t,closeAll:l,close:n}=me(),a=rm(),i=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Sm,a);return[i,{close:n,toggle:()=>{i?l():t(o(Nm,{...e}),{id:Sm})},openDialog:t}]},Im=[],Bm=St((({sticky:e,...t})=>{const{menuItems:l=Im}=e??{},[a,{toggle:r,close:d,openDialog:m}]=Tm(t.options?.page?.sitemap??{}),h=Math.floor(l.length/2),u=l.slice(0,h),p=l.slice(h),[g,f]=n(-1),[b,y]=n(""),v=i((()=>{f(-1),y(""),d()}),[d]),N=s(null),w=rl(v),[{openBottomMenuItemDialog:k}]=im({menuRef:N,dialogRef:w,closeDialog:v,openDialog:m,leftItems:u,rightItems:p}),C=i((e=>{v(),e.stopPropagation(),r()}),[v,r]),S=i(((e,t)=>{y(t),f(e),d(),k(e,t)}),[d,k]);return o(x,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[u.map(Mm(S,"left",{activeIndex:g,currentItemPosition:b})),o(tm,{isActive:a,onClick:e=>C(e)}),p.map(Mm(S,"right",{activeIndex:g,currentItemPosition:b}))]})})})),Mm=(e,t,l)=>(n,a,i)=>o(lm,{item:n,isActive:i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t,onClick:r=>{i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t||r.stopPropagation(),e(a,t)}},n.title||String(a)),Rm="hidden sm:flex absolute z-40 top-0",Vm=d((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Ba({itemCount:t?.length||0});return c("div",{className:p("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[o(ga,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(lc(l,n,a))}),r.canScrollLeft?o(Ra,{className:p("left-6",Rm),onClick:r.scrollLeft}):null,r.canScrollRight?o(Va,{className:p("right-6",Rm),onClick:r.scrollRight}):null]})})),Pm=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return o(nc,{...t});case"centered":return o("div",{className:"flex",children:o(nc,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return o("div",{className:"flex",children:o(Vm,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},zm="tab",Am=d((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...c})=>{const d=u(),{isReady:m}=d,g=r((()=>l.map(jm)),[l]),[f,b]=n(0);a((()=>{if(!l||!l[0])return;const e=d.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===d.query.tab))||0,t=l[e]||l[0];b(e),Dm(t)}),[m]),a((()=>{const e=l[f];"group"===e?.type&&h.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,f]);const y=i((e=>{const t=g.indexOf(e),n=l[t];b(t),Dm(n),"group"===n.type&&(e=>{const t=new URLSearchParams(d.query);e.name?t.set(zm,e.name):t.delete(zm),d.replace(`${d.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,g]);return o(x,{className:p(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...c,children:Pm({items:g,value:g[f],tabsMode:s,onChange:y})})})),Dm=e=>{"group"===e.type&&h.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&h.fire("tab",{type:e.type,label:e.href})},jm=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,Em={start:"text-start",center:"text-center",end:"text-end"},$m=d((({tab:e,className:t,onClick:l,isActive:n})=>{const a=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white text-primary-text"),title:e?"mb-xs text-xl":"mb-2xs text-l",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal"}))(n);return c("button",{type:"button",onClick:l,"aria-label":e?.title,className:p("border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs",a.btn,t),...pe(e?.data),children:[e?.icon?o(ae,{className:p("h-6 w-6 min-w-6 min-h-6",a.icon),image:{...e?.icon,iconVersion:e?.icon?.iconVersion??a.iconVersion},width:"24",height:"24"}):null,c("div",{className:"border-0",children:[e?.title?o("div",{className:a.title,children:e.title}):null,e?.description?o("div",{className:a.desc,children:e.description}):null]})]})}));function Om(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const Lm=d((({tab:e})=>{const t=ue(),{onClick:l}=t({...e,onClick:()=>{e.href&&!O(e.href)&&(globalThis.location.href=e.href)}});return Om(l,[],800),o(y,{className:"col-span-12 p-xl",size:5})})),_m=St((({className:e="",tabs:t=[],block:l,tabAlign:a,...i})=>{const[r,s]=n(Um(t)),d=Fm(t[r],r),m=t.length,[h,{inc:u,dec:g}]=da({itemCount:m},r),[f,b]=Ba({itemCount:m});return c(x,{className:p(e),defaultPadding:"p-0",...i,children:[c("div",{className:"relative border-b-8 border-primary-main",children:[o(ga,{itemClassName:"flex",containerRef:f,snapAlign:"snap-end",gap:8,onVisibleIndicesChange:b.handleVisibleIndicesChange,children:t.map(Hm(r,s,a))}),o(Aa,{scroll:b,arrowsPadded:!0,onScrollLeft:g,onScrollRight:u,activeIndex:h,itemCount:m})]}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:t[r]?.href?o(Lm,{tab:t[r]}):z(l?.slots?.[d],{...i?.options,key:`${d}-${l?.type}`,slotName:d,parent:l})})]})}),{slots:({tabs:e})=>e?.filter((e=>!e.href)).map(Fm)||[],childrenTypes:{exclude:["TabsLayout"]}}),Fm=(e,t)=>e?.title||`Слот №${t}`,Um=e=>e.reduce(((e,t,l)=>t.selected?l:e),0),Hm=(e,t,l="start")=>(n,a)=>o($m,{className:Em[l],tab:n,isActive:e===a,onClick:()=>t(a)},String(a)),Wm={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Km=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Wm[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),qm=d((({className:e="",isOpen:t,onClick:l})=>o(ye,{className:e,appendRight:o(ae,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),Gm={Buttons:({buttons:e})=>Ye(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ae,{image:e}):null,List:({isDotted:e,...t})=>o(tt,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Ee,{size:"text-h6",children:e})}):null,t?o("div",{children:o(Ee,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?o(qm,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},Ym=d((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return Xm({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Xm=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in Gm))return null;return o(Gm[l],{...t,...n})},Jm=d((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Ym,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Zm=(e,t)=>140*Pe(e.slice(0,t).map((e=>e?.cols?.length??1))),Qm=(e,t)=>e?.length>0?o("div",{className:p("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Ee,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,eh=d((({rows:e})=>{return o(ga,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=p("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Ee,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${Zm(a,t)}px)`},children:a?.map(((e,l)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ee,{size:"text-xl",children:e.data}):null,e?.cols?Qm(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),th=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Ee,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(eh,{rows:t.rowsData})})})]},n)}))}))),lh=(e=!1)=>""+(e?"text-white":"text-secondary-text"),nh=d((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:p("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:o(Ee,{size:"text-xl",font:"font-light",color:lh(t===l),children:e||t+1})},e)))}):null,t?o(ye,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(Y,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function ah(e){const t=await fetch(e);return await t.json()}const ih=d((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=nn(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),ah);return t||{}}(e),[r,s]=n(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(nh,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(th,{activeTabIndex:r,items:m}),o(qm,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ee,{size:"text-h6",children:"Данных нет"}),o(qm,{onClick:l,isOpen:!0})]})})),rh=d((({children:e,tableInner:t,onHideContentClick:l})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:p("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(ih,{...t,onClick:l})}):null]}))),sh=d((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,d]=n(void 0),m=i((e=>d(e)),[]),[h,u]=n(void 0),g=i((e=>u(e)),[]);return c(rh,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:p("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ae,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Km,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Jm,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function oh({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(Ma,{className:p("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(Ma,{className:p("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const ch=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return c("div",{role:"table",children:[c("div",{className:"relative space-y-xs",children:[e,oh({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),dh=d((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],d=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,u]=da({itemCount:m,visibleItemCount:2}),g=(d||[]).map(((e,t)=>o(sh,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[f,b]=i>0?[g.slice(0,-i),g.slice(-i)]:[g,[]];return c(x,{className:p("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(B,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m",children:i>0?o(Xa,{renderFoldableSection:({isUnfolded:e})=>c(ch,{controls:u,children:[f,o(Ja,{isUnfolded:e,children:b})]}),renderFoldButton:Ya}):o(ch,{controls:u,children:g})})]})})),mh=d((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>c(x,{className:p("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?hh():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ee,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?uh(l):null,a?o(De,{__html:a}):null]})]}))),hh=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),uh=e=>o(T,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),ph=d((({prefix:e,unit:t,suffix:l})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Ee,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?o("div",{className:"gradient-color-text",children:o(Ee,{size:"text-h2",children:l})}):null]}))),gh=d((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return o(x,{defaultPadding:"p-0",...a,children:o(ph,{prefix:t,unit:l,suffix:n})})})),xh={AdTile:It,ApplicationFormCustom:na,BankAccountFiltration:gi,BenefitsBlock:yi,BonusBenefitsBlock:ki,ButtonsBlock:Si,Calculator:Tr,CardTransfer:Dr,Carousel:Ha,CarouselBankHistoryCard:jr,CarouselCard:Or,CarouselCatalogCard:_r,CarouselLinks:Kr,CarouselRecommendationCard:Jr,CarouselTariffsCard:es,ComparisonTable:ms,DepositFiltration:fs,ErrorBlock:Ns,ExchangeRateTile:Gs,Footer:uo,Header:So,Headline:B,HorizontalLayout:Mo,ImgBlock:Ro,LinkDocs:Do,MobileAppTile:$o,MortgageFiltration:ic,OfficesAtmsMap:fd,Placeholder:bd,ProductBlock:Tt,ProductGallery:yd,RepresentativeOfficeInfo:vd,RichTextBlock:kd,RollupItem:Zs,SafeDepositRental:Hd,StepsBlock:Xd,StickyBottomMenu:Bm,Tabs:Am,TabsLayout:_m,TariffsTable:dh,TextBlock:mh,UnitBlock:gh,VerticalLayout:Bo},fh=he((()=>{a((()=>{Et()}),[]);const e=_t();il(globalThis,"click",(e=>t=>{const l=t.target?.closest("[data-aspects]");try{const n=JSON.parse(l?.dataset?.aspects??"[]");Dt({aspectsAttributes:n,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),bh="cookie",yh=d((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=el();Om((()=>{globalThis.localStorage?.getItem(bh)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(bh,"true"),a()}),[]);return l?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:c(T,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",o(Gr,{isRemote:!0,className:vh(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",o(Gr,{isRemote:!0,className:vh(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),o("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:o(nm,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),vh=e=>p("inline mx-2xs",e?"text-green-dark":""),Nh=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=rm({onCloseAll:e,onClose:t}),{close:n}=me(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return il(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>o("div",{className:p("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),wh=d((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>h.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Kd(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return il(globalThis.document,"keydown",r),e?o("div",{className:p("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),kh="header",Ch="footer",Sh="sticky-footer",Th={},Ih=d((({className:e,data:t=Th,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=Ct(s,r);fh();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:l,blockDecorator:n,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:p("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:z(a?.header,{...m,slotName:kh})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[A({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),z(a?.footer,{...m,slotName:Ch})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:z(a?.["sticky-footer"],{...m,slotName:Sh})}):null,o(Nh,{}),o(wh,{}),o(yh,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Object.assign(Ih,{childrenTypes:[],slots:()=>[kh,Ch,Sh]});e.Blocks=xh,e.ContentPage=Ih,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=he,e.joinList=ni,e.packageVersion="0.14.292",e.projectSettings=E,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=U,e.useRouter=u,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).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)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t};const h=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}};function u(){return u._impl()}u._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),u.setup=e=>{u._impl=e};const p=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),g={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},x=d((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:i="p-xl",padding:r,block:s,tag:c="section",role:d,children:m,style:x})=>{const f=c,b=u(),[y,v]=n(!1);a((()=>h.subscribe("tab",(e=>{e.groupName&&e.groupName!==s?.labelGroup||v(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s,b]);const N=t&&l;return o(f,{className:p("@container font-sans",N?"group":"",g[t],y?"hidden":"",r||i,e),...N?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:d,style:x,children:m})})),f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=d((({children:e})=>f?e:null)),y=d((({className:e,size:t})=>o("figure",{className:p("m-0 mt-xl min-w-[80%]",e),children:v(t)}))),v=(e=3)=>w(100,e).map((e=>Math.floor(e))).map(N),N=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),w=(e,t)=>[e].concat(t>0?w(e/1.618,t-1):[]),k={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},C={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},S=d((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=k[l]||"h3";return o(i,{role:"heading",className:p("font-sans m-0",C[t],e),children:n||a})})),T=d((({children:e,...t})=>o("p",{className:p("font-sans",Object.values(t)),children:e}))),I={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"}},B=d((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=I[l],u={marginTop:h.descriptionStyle};return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[n?o(S,{className:p("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:n}):null,a?o(T,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...u,children:a}):null]})})),M=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),R=[];function V(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=M,blocksRegistry:r={},ancestors:s=R}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:p(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return d?o(d,{className:i,block:e,options:t,...r,...n},a):null}},a)}const P=[],z=(e,{key:t,ancestors:l=P,slotName:n=null,extraProps:a,renderProps:i=V,...r})=>{const s=a?(e,t)=>V(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||P,[r.parent,n]]:l},a)))};function A({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?z(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const D=e=>e&&!e.endsWith("/")?`${e}/`:e,j=["CDN","BASE_PATH"],E=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return j.includes(t)?D(l):l}}),$=e=>Boolean(e?.includes(":")),O=(e,t)=>Boolean(e&&!$(e)&&(!t||"_self"===t)),L=e=>Boolean(e?.startsWith("#")),_=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),F=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var U=Object.freeze({__proto__:null,isURL:$,isLocalURL:O,isHash:L,withoutQuery:_,joinPath:F});const H="/api/",W=`${H}v1/storage`,K=e=>(t,l=E.BASE_PATH)=>{if([!t,$(t),L(t),[E.CDN,H].some((e=>q(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${W}/${t}/attachment`;const n=t?.startsWith("/");return F(q(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},q=(e,t)=>t&&e&&e.startsWith(t),G={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},Y=d((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const d=u(),m="normal"===i?`${l}.svg`:`sprites.svg#${l}`,h=K(d)(F(E.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:X(e,s)}):o(Z,{className:e,children:c("svg",{className:p(J(r),G[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,n?o("desc",{children:n}):null,o("use",{href:h,xlinkHref:h})]})})})),X=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},J=e=>e?"":"w-full h-full",Z=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Q=(e,t)=>l=>l&&!$(l)?K(e)(F(t,l)):l,ee=(e,t)=>e?.media&&t?.media?e.media-t.media:0,te=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=u();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(ee).map((({src:e,format:l,media:i},r)=>o("source",{srcSet:Q(a,n)(e),type:ne(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?le({...t,src:Q(a,n)(t.src)},l):null]})})),le=(e,t="")=>o("img",{src:e.src,className:p("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),ne=e=>e?`image/${String(e)}`:void 0,ae=d((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?o(Y,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):o(te,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),ie={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},re="bg-main-divider text-main-disabled",se={primary:re,secondary:re,white:re,link:"",transparent:"",gray:re,"":""},oe="text-center font-sans select-none",ce={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},de=({className:e,rounded:t,version:l})=>[oe,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?ie[l]:"",t?"rounded-full":"rounded-md",e].join(" "),me=()=>({open:(e,t={})=>h.fire("dialog",{type:"open",dialog:e,...t}),close:()=>h.fire("dialog",{type:"close"}),closeAll:()=>h.fire("dialog",{type:"close",all:!0})}),he=e=>he._impl(e);function ue(e={}){const{isRemote:t,basePath:l}=e,n=u(),{closeAll:a}=me();return e=>({...e,href:t&&!l?e.href:K(n)(e.href,l),"aria-label":e.text,onClick:he(i(e))});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&O(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}he._impl=e=>e,he.setup=e=>{he._impl=e};const pe=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},ge=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=fe(e)?"hidden lg:block":"";return c("div",{className:p(xe(e),"flex gap-xs"),children:[n?o("div",{className:p(r,ce[i]),children:n}):null,fe(e)?c("div",{className:"whitespace-pre",children:[l?o("div",{className:"text-xs font-light text-left",children:l}):null,o("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:p(r,ce[i]),children:a}):null]})})),xe=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return p("group/btn items-center justify-center",fe(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},fe=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),be=({className:e,rounded:t,version:l})=>["inline-block",oe,l?se[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ye=d((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault(),l.stopPropagation();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=ue()({onClick:r,href:n,...a}),c=t??o(ge,{...s});return o(e?Ne:ve,{...s,children:c})})),ve=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m})=>o("a",{className:de({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,type:c,...pe(d),children:m}))),Ne=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:be({className:e,rounded:n,version:l}),children:a})));function we(e,t,l=!1){const n="primary"===e?"white":"black",a="Вернуться назад";return c("div",{className:p(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:de({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:o(ae,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:n}})}),o(ye,{version:"link",className:"group-data-secondary:text-white/80",text:a,ariaLabel:a,onClick:t,type:"button"})]})}const ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Ce=d((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:r="",buttons:s,leftImage:d,rightImage:m,imageAlign:h,isImageAlwaysOnRight:g=!1,isImageSecondary:x=!1,backwardButton:f,children:b,...y})=>{const v=u(),N=i((()=>{v.back()}),[]);return c("div",{className:Se(n,l,e),children:[f?we(t,N):null,a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:p("grow relative flex flex-col @xl:flex-row gap-3xl w-full",d?"self-start @xl:w-auto":""),children:[Re(d,{imageAlign:h,className:"mx-auto"}),c("div",{className:p("grid gap-3xl",m?"@xl:grid-cols-2":"",d?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[r,b]}),Me(A({...y,extraProps:{className:"@container-normal"}})),Re(m,{className:p("@xl:justify-self-end @xl:col-start-2",s?Te(g):"",Ie(g),Ve(x)),imageAlign:h}),Be(s)]})]})]})})),Se=(e="",t="",l="")=>p("relative flex flex-col gap-3xl overflow-hidden",e||t,l),Te=e=>e?"row-span-2":"@xl:row-span-2",Ie=e=>e?"col-start-2 self-center":"",Be=e=>e?o("div",{className:"self-end",children:e}):null,Me=e=>e&&e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Re=(e,{className:t,imageAlign:l})=>e?o("div",{className:p("shrink-1/2 justify-self-center",l&&ke[l],t),children:e}):null,Ve=e=>e?"hidden @xl:block":"",Pe=(e=[])=>e.reduce(((e,t)=>e+t),0),ze=(e=[])=>e?.length?Pe(e)/e.length:0,Ae=(e,t="normal")=>e?o("div",{className:p("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ae,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:p(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),je=(e,t)=>e?o(T,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ee=d((({children:e,...t})=>o("span",{className:p("font-sans",Object.values(t)),children:e}))),$e=(e,t)=>e?o(Ee,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Oe=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?o(De,{...e},`rte-${t}`):["label"in e?$e(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:je(e.description,t)},String(t)):null],Le=d((({className:e,benefitsVersion:t,...l})=>c("div",{className:p("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in l?Ae(l.icon,t):null,o("div",{children:Oe(l)})]}))),_e=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Fe=e=>{return((t=e.map(_e))?.length?Math.sqrt(Math.abs(ze(t.map((e=>e**2)))-ze(t)**2)):0)>16;var t},Ue=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),He=e=>!e.some(Ue),We=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:p("flex gap-x-m gap-y-s",Fe(l)||He(l)?"flex-col":"flex-wrap",e),role:"list",children:l.map(((e,l)=>o(Le,{benefitsVersion:t,...e},String(l))))}):null)),Ke=d((({className:e,benefits:t})=>t?.length?o("div",{className:p("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Oe)}):null)),qe=d((({isTabularBenefits:e,...t})=>o(e?Ke:We,{...t}))),Ge=e=>Boolean(e?.src||e?.icon),Ye=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:p("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),role:"group",children:e.map(Xe(l))}):null,Xe=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=Je(a,r),d=Je(i,r);return n||a?.icon?o(ye,{className:p("basis-full @lg:basis-auto",e),appendLeft:Ze({...a,iconVersion:c}),appendRight:Ze({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},Je=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Ze=e=>Ge(e)?o(ae,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Qe=d((({className:e,isDotted:t,dotClassName:l,children:n})=>c("div",{className:p("font-sans flex",e),role:"listitem",children:[t?o("div",{className:"shrink-0",children:o("div",{className:p("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,o("span",{children:n})]}))),et={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},tt=d((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=et[n];return l?.length?o("section",{className:p("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>o(Qe,{isDotted:t,dotClassName:p(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),lt=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),nt=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(at)}):null)),at=({label:e,amount:t},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Ee,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[lt(2)(t)," ₽"]}):null]},String(l)),it=d((({className:e,tags:t})=>t?.length?o("div",{className:p("flex flex-wrap gap-xs",e),role:"list",children:t.map(rt)}):null)),rt=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ee,{size:"text-m",font:"font-light",children:e})},String(t)),st={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},ot=d((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,benefits:m,__html:h,isFullWidthTitle:u,items:p,isDotted:g=!0,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:C,children:S,...T})=>{const I=y?.src?o(ae,{image:y}):null,M=o(B,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),R=m?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return o(Ce,{className:e,padding:t,defaultPadding:l,...u?{title:M}:{insetTitle:M},...ct(I,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ye(b),backwardButton:C,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?o(qe,{benefitsVersion:s,isTabularBenefits:d,benefits:R}):null,h?o(De,{__html:h}):null,p?.length?o(tt,{items:p,isDotted:g,listItemSize:st[i]}):null,S,x?.length?o(nt,{priceList:x}):null,dt(f)]})})})),ct=(e,t)=>t?{rightImage:e}:{leftImage:e},dt=e=>e?.length?o(it,{tags:e}):null,mt=e=>Boolean(e&&Array.isArray(e)),ht=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),ut=(e,t)=>{return l=e,Boolean(ht(l)&&"string"==typeof l.$ref)?t.ref(e):ht(e)?t.record(e):mt(e)?t.array(e):t.scalar?t.scalar(e):e;var l},pt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(gt,e),gt=(e,t)=>e&&t?ht(e)?e[t]:mt(e)?e[parseInt(t,10)]:e:e,xt=(e,t)=>ut(e,{ref:({$ref:e,...l})=>xt(e?pt(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:xt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>xt(e,t)))}),ft=(e,t,l=[])=>{ut(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)ft(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)ft(e[n],t,[...l,n])}})};async function bt(e,t){try{return e?await yt(e,t):null}catch(e){console.error(e)}return null}const yt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),vt=e=>[...new Set(e)],Nt={},wt=["/portal-resources"],kt=(e,t)=>xt(e,(e=>t?.[e])),Ct=(e,t)=>{const l=(e=>{const t=[];return ft(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(vt(e).filter((e=>!wt.some((t=>e.startsWith(t))))).map((async e=>[e,Nt[e]||=await yt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?kt(e,{...t,...i}):e};function St(e,t={}){const l=d((t=>{const l=Ct((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...l})}));return Object.assign(l,t),l}const Tt=St((({className:e,padding:t,...l})=>o(x,{className:p("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(ot,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),It=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>Bt(0,t?.length)),[t]),n=t?.[l];return n?o(b,{children:o(Tt,{...n,...e})}):o(x,{...e,children:o(y,{})})})),Bt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Mt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Rt=e=>e?.replace(/[^+\d]/g,"");const Vt=e=>e?{phone:Rt(e)}:{},Pt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),zt=(e,t=!0)=>({[t?"email":"mail"]:e}),At=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Rt(e)}:{},Dt=({aspectsAttributes:e,aspects:t,ev:l,formData:n})=>{for(const{aspectName:a,params:i}of e){const e="mindboxEvent"===a?{...i,eventJson:JSON.stringify(n)}:i;t[a??""]?.(l,e)}},jt="rshb-query-params";function Et(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(jt)||"";return e&&globalThis.sessionStorage?.setItem(jt,e),e}const $t=e=>t=>{const[,l]=e.find((([e])=>e(t)))||[];return l},Ot=e=>{const t=e.target?.closest("a");if($(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=Et();if(!$(e)||!t)return e;const l=new URL(e);for(const[e,n]of new URLSearchParams(t))l.searchParams.set(e,n);return l.toString()})(t?.href)||t?.href;if(l){Lt(t?.target)?.(l)}}},Lt=$t([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function _t(){return _t._impl()}_t._impl=()=>({forwardQuery:Ot}),_t.setup=e=>{_t._impl=e};const Ft=e=>e,Ut=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[a,r]=n(e),[o,c]=n(!1),[d,m]=n({}),h=s({}),u=i(((e,t)=>{const{parse:l=Ft,format:n=Ft}=t||{};return h.current||(h.current={}),h.current[e]||=t=>{r((n=>({...n,[e]:l(t)}))),m((t=>({...t,[e]:!0})))},{value:n(a[e]),isDirty:o||d[e],onChange:h.current[e]}}),[a,o,d]),p=i((e=>{r(e),m(e)}),[]),g=i((()=>{r(e),c(!1),m({})}),[e]),x=i((e=>{e.preventDefault(),t?g():c(!0),l&&l(a,e)}),[l,a]);return[a,{isDirty:o||Object.values(d).some(Boolean),field:u,update:p,reset:g,onSubmit:x}]},Ht=d((({responseType:e})=>{const t="OK"===e,l=t?"ResponseOKIcon":"ResponseFailIcon";return c("div",{className:p("flex items-center p-lg rounded-md space-x-m",t?"bg-ok":"bg-fail"),children:[o(ae,{image:{icon:l,iconVersion:"normal"},width:"42",height:"42"}),c("div",{children:[o(S,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Wt=d((e=>{const{className:t,title:l,responseType:n,children:a,...i}=e;return o(x,{className:t,defaultPadding:"p-6xl",...i,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[l?o(S,{headingType:"h3",title:l,className:"@xl:text-center"}):null,a,n?o(Ht,{responseType:n}):null]})})})),Kt=e=>t=>l=>e(l)?[]:[t],qt=e=>o("div",{className:"h-6",children:e?o(Ee,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Gt=d((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),Yt=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Xt=d((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Gt,{paths:Yt,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[o("div",{className:p("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:Jt(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?d:null,l?o("div",{className:"ml-s",children:o(Ee,{size:"text-l",font:"font-light",children:l})}):null]})})})),Jt=e=>e?"radio":"checkbox",Zt=e=>p("rounded border",e?"bg-primary-main":""),Qt=d((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Xt,{text:t,value:l,disabled:a,onChange:r},n),qt(i)]})));function el(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 tl=e=>e?o(Ee,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,ll=d((({key:e,className:t="",id:l,name:n,type:r="text",label:d,placeholder:m,value:h="",valid:u=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&w.current?.focus()}),[v,w]);const C="w-full border rounded-md text-primary-text outline-none p-m",S=g?"pr-3xl":"",T=nl(u);return c("div",{className:p("relative",t),children:[c("label",{className:"space-y-xs",children:[tl(d),N?o("textarea",{className:p("block resize-y min-h-24",C,T),id:p("textarea",l),name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:p("h-14",C,S,T),ref:w,id:l,name:n||l,placeholder:m,value:h,onInput:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),nl=e=>e?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error",al=e=>e?.text||e?.key||"";function il(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function rl(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return il(globalThis.document,"click",l),t}const sl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,ol=d((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:sl(t,n).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:al(e)}),o(Y,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:p("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function cl({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>h.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>h.fire("popup",{type:"update",popup:e,...t}),close:()=>h.fire("popup",{type:"close"})},u=i((()=>{m.close(),c&&c()}),[c]),p=i((e=>{u(),r&&r(e)}),[u,r]),g=s(null),x=rl(u);return a((()=>{if(!e||!g.current)return;const a=g.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(ol,{popupRef:x,options:t,value:l,query:n,onChange:p,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,l,n,p]),g}const dl=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:h="black",onChange:u,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=el(),[y,v]=n(""),N=g||0===l.length,w=x&&!N,k=i((()=>{v(""),f()}),[]),C=cl({isOpen:x,options:l,value:a,query:y,onChange:u,onClose:k,iconVersion:h});return c("div",{className:p("space-y-xs",e),children:[tl(t),c("div",{className:p("relative",w?"z-20":"z-10"),ref:C,children:[c("div",{className:p("h-14 [&>*]:p-m pr-8 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",hl(s,r,N)),onClick:w?k:b,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:al(a)||d}),ml(w,h)]}),m&&w?o("div",{className:p("absolute top-0 w-full z-20"),children:o(ll,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),ml=(e,t)=>o(Y,{className:p("absolute right-3 flex self-center",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),hl=(e,t,l)=>p(e?"border rounded-md ":"",e&&!l?"hover:border-primary-hover":"",l?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),ul=()=>{},pl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>l)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,n,d),l=gl(t,e),c=xl(t,i,r);h.push(o("td",{children:o("div",{className:fl(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},gl=(e,t)=>t&&e.toDateString()===t.toDateString(),xl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),fl=(e,t)=>p("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),bl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],yl=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=ul})=>{const d=i((e=>s(e)),[]),{firstDayOfWeek:m,totalDays:h}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:bl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:pl({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),vl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Nl=vl.map((e=>({key:e}))),wl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),kl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Cl={className:"min-w-32",iconVersion:"black",isBorder:!1},Sl=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=el(!1),[u,g]=n(l?.getMonth()||(new Date).getMonth()),[x,f]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:C,ref:S}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=rl(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(vl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Nl,yearsOptions:wl,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:h,selectedYear:x,selectedMonth:u,showCalendar:m});return c("div",{className:p("space-y-xs",e),ref:S,children:[tl(t),c("div",{className:"relative",children:[Tl(C,l,a),m?c("div",{className:"absolute bg-white z-20 select-none",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(Y,{...kl,className:"-rotate-90 cursor-pointer"})}),o(dl,{onChange:v,value:{key:vl[u]},options:w,...Cl}),o(dl,{onChange:N,value:{key:String(x)},options:k,...Cl}),o("div",{className:"my-auto",onClick:y,children:o(Y,{...kl,className:"rotate-90 cursor-pointer"})})]}),o(yl,{today:l,currentMonth:u,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),Tl=(e,t,l)=>c("div",{onClick:e,className:p("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[o(T,{children:t&&Mt(t)}),o(Y,{...kl,name:"CalendarIcon"})]}),Il=d((({className:e,label:t,error:l,...n})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Sl,{label:t&&n?.errors?`${t}*`:t,valid:Boolean(!l),...n}),qt(l)]}))),Bl=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,type:d,...m})=>c("div",{className:p("shrink-0 w-full",e),children:[o(ll,{type:d||"text","aria-label":t,label:t&&m?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:m?.errors&&!t?`${n}*`:n}),qt(a)]}))),Ml=e=>"_"===e,Rl=e=>/\d/.test(e),Vl=e=>Ml(e)||Rl(e),Pl=[..."+7 (___) ___-__-__"],zl=Pl.findIndex(Ml),Al=Pl.map(((e,t)=>Vl(e)?Pl.slice(0,t).filter(Vl).length:-1));const Dl=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Pl.map(((e,l)=>Rl(e)?e:t.charAt(Al[l])||e)),n=Al.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(zl,n)):l).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&(t&&t(""))}),[]);return o(ll,{...l,onChange:n,onFocus:e=>n(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),jl=d((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Dl,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),qt(n)]}))),El=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(dl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),qt(l)]}))),$l="Некорректно заполненное поле",Ol=Kt((e=>null!=e&&""!==e))($l),Ll=Kt((e=>e?.key&&""!==e?.key))($l),_l=Kt((e=>"string"==typeof e&&e.length>1))($l),Fl=Kt((e=>"string"==typeof e&&(10===e.length||12===e.length)))($l),Ul=(Hl=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Kt((e=>"string"==typeof e&&Hl.test(e))))($l);var Hl;const Wl=Kt((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Kl={typeForm:Ol,surname:_l,name:_l,region:Ll,addressBranch:Ll,phone:Ul,secondaryPhone:Ul,birthday:Ol,email:Ol,fullName:_l,inn:Fl,partnerComments:Ol,collectionCount:Ol,comment:Ol,acquiringType:Ll,feedbackType:Ll,feedbackMethod:Ll,serviceType:Ll,serviceDirection:Ll,consentDataProcessing:Wl,annualRevenue:Ol},ql=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Kl?.[e]])))},Gl=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Yl=(e,t,l=!1)=>l?Gl(e,t):e,Xl=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Jl=d((({field:e,input:t})=>o(El,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Xl,...Yl(e("acquiringType"),Kl.acquiringType,t?.required)}))),Zl=(e="")=>Boolean("trade"===e||"all"===e),Ql=e=>null!=e,en=new Map,tn=e=>Boolean(e?.every((e=>Array.isArray(e)?tn(e):!e||"string"==typeof e))),ln=e=>tn(e)?e.toString():"";function nn(e,t,{fallback:l,cache:i}={}){const s=r((()=>an(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(Ql))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=en)=>l=>{const n=ln(l),a=t.get(n);if(n&&Ql(a))return a;const i=e(...l);return n&&Ql(i)&&t.set(n,Promise.resolve(i)),i})(t,i)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function an(e){return Array.isArray(e)?e:e instanceof Function?an(e()):[e]}const rn=[];const sn=async e=>await bt(e,{method:"GET"})||rn;function on(){const{data:e}=nn("/api/v1/branchesByRegions",yt);return Array.isArray(e)?e:[]}const cn=d((({field:e,input:t,isPremium:l=!1})=>{const n=e("region"),i=n?.value?.key,r=n?.value?.text,s=l?on()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=nn(e?`/api/v1/branches?regionCode=${e}`:null,sn);return t||rn}(i)?.filter((e=>e?.address));return a((()=>{""!==n?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[n?.value]),o(El,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...Yl(e("addressBranch"),Kl.addressBranch,t?.required)})})),dn=(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}},mn=(e,t,l)=>Math.max(t,Math.min(e,l));function hn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function un({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:p("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=hn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const pn=1,gn=100,xn=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:pn),max:s=(a.length?a.length-1:gn),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:u}=e,g=dn(e,{normalize:(e=0)=>a.length?fn(a)(e):mn(e,r,s),format:lt()}),x=i((e=>{u&&u(hn(e.target?.value))}),[u]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,o("input",{className:p("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:h,onInput:x,...g}),un({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:u})]}),bn(n)]})})),fn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),bn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),yn=["От 1 000 ₽","До 1 000 000 000 ₽"],vn=d((({field:e})=>o(xn,{title:"Сумма, ₽",items:yn,min:1e3,max:1e9,...e("amount")}))),Nn=d((({field:e,input:t})=>o(Bl,{className:"col-span-2",...Yl(e("comment"),Kl.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),wn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],kn=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Cn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],Sn=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Tn=d((({field:e})=>o(El,{label:"Способ получения ответа",options:Sn,...Gl(e("feedbackMethod"),Kl.feedbackMethod)}))),In=d((({field:e})=>{const t=e("feedbackType");return a((()=>{"FEEDBACK"===t?.value?.key&&e("serviceDirection")?.onChange?.(kn[0])}),[t?.value]),o(El,{label:"Тема",placeholder:"Выберите тему",options:Cn,...Gl(t,Kl.feedbackType)})})),Bn=d((({field:e})=>o(Qt,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Mn=d((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>c("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[o("div",{className:p("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:p("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Rn=d((({field:e})=>Zl(e("acquiringType")?.value?.key)?o(Mn,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Vn=d((({field:e})=>{const t=e("secondaryPhone");return o(jl,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Gl(t,Kl.secondaryPhone):t})})),Pn=d((({field:e})=>Zl(e("acquiringType")?.value?.key)?o(Mn,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null));function zn(){const{data:e}=nn("/api/v1/regions",yt);return Array.isArray(e)?e:[]}const An=d((({field:e,input:t})=>{const l=zn();return o(El,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...Yl(e("region"),Kl.region,t?.required)})})),Dn=d((({field:e,input:t})=>{const l=on(),n=r((()=>l?.map((({region:e})=>({key:e,text:e})))),[l]);return o(El,{label:"Регион",placeholder:"Выберите регион",options:n,...Yl(e("region"),Kl.region,t?.required)})})),jn=d((({field:e})=>o(El,{label:"Направление обслуживания",placeholder:"Выберите направление",options:kn,...Gl(e("serviceDirection"),Kl.serviceDirection)}))),En=["От 1 мес","До 15 лет"],$n=d((({field:e})=>o(xn,{title:"Срок, месяцев",items:En,min:1,max:180,...e("term")}))),On=d((({field:e})=>o(El,{label:"Тип обслуживания",options:wn,...Gl(e("serviceType"),Kl.serviceType)}))),Ln=d((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:"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),role:"radio"}),t?o(Ee,{color:"text-primary-text",children:t}):null]})}))),_n=["currencyControl","documentOperations","conversionTransactions","otherIssues"],Fn=d((({field:e})=>{const{value:t,onChange:l}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(Ln,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:l}),o(Ln,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:l}),o(Ln,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:l}),o(Ln,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:l})]})})),Un=(e,t)=>(l,n)=>{const{required:a,...i}=l,r="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,s={surname:o(Bl,{label:"Фамилия",...Yl(e("surname"),Kl.surname,a)}),name:o(Bl,{label:"Имя",...Yl(e("name"),Kl.name,a),...i}),middleName:o(Bl,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),phone:o(jl,{label:"Телефон",...Yl(e("phone"),Kl.phone,a)}),email:o(Bl,{label:"Электронная почта",...Yl(e("email"),Kl.email,a)}),fullName:o(Bl,{label:"ФИО",...Yl(e("fullName"),Kl.fullName,a),...i}),inn:o(Bl,{label:"ИНН",type:"number",...Yl(e("inn"),Kl.inn,a)}),comment:o(Nn,{field:e,input:l}),region:r?o(Dn,{field:e}):o(An,{field:e,input:l}),addressBranch:o(cn,{field:e,input:l,isPremium:r}),birthday:o(Il,{label:"Дата рождения",...Yl(e("birthday"),Kl.birthday,a)}),isClient:o(Bn,{field:e}),consentToReceiveMaterials:o(Qt,{...e("consentToReceiveMaterials"),text:"Согласен на получение информационных и аналитических материалов по электронной почте"}),partnerComments:o(Bl,{...Yl(e("partnerComments"),Kl.partnerComments,a),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...i}),collectionCount:o(Bl,{label:"Количество объектов инкассации",type:"number",...Yl(e("collectionCount"),Kl.collectionCount,a)}),acquiringType:o(Jl,{field:e,input:l}),onlineCheckout:o(Rn,{field:e}),posTerminal:o(Pn,{field:e}),serviceType:o(On,{field:e}),term:o($n,{field:e}),amount:o(vn,{field:e}),annualRevenue:o(Bl,{label:"Годовая выручка, ₽",...Yl(e("annualRevenue"),Kl.annualRevenue,a)}),vedTypes:o(Fn,{field:e}),feedbackType:o(In,{field:e}),feedbackMethod:o(Tn,{field:e}),serviceDirection:o(jn,{field:e}),bankEmpolee:o(Bl,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}),applicationDate:o(Bl,{label:"Дата и время обращения в Банк",...e("applicationDate")}),secondaryPhone:o(Vn,{field:e})};return function({input:e,field:t}){const{condition:l}=e,{value:n}=t(l?.name||"");return!l||l?.values?.find((e=>e===(n?.key??n)))}({input:l,field:e})?o("div",{children:s[l?.name]},String(n)):null};const Hn=e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:n,amount:a,term:i,annualRevenue:r,serviceType:s,feedbackType:o,vedTypes:c,region:d,...m}=e,h=t||r?(e=>{const{acquiringType:t,onlineCheckout:l=!1,posTerminal:n=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Zl(t?.key)?`/Онлайн касса=${l}/POS-терминал=${n}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...m,...Kn(c),...Wn(d),...h?{partnerComments:h}:{},...s?{typeForm:s}:{},...o?{typeForm:o}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Wn=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Kn=e=>e?{vedTypes:Object.fromEntries(_n.map((t=>[t,t===e])))}:{},qn={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e3,acquiringType:Xl[0],serviceType:wn[0],feedbackType:Cn[0],feedbackMethod:Sn[0],serviceDirection:kn[0],vedTypes:_n[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Gn=(e,t="")=>{const l=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||qn[e.name]])));return l?.serviceType&&"PREMIUMSERVICE"===t&&(l.serviceType=wn[1]),{...l,typeForm:{key:t,text:""}}},Yn=d((({text:e,link:t})=>c(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[o(Ee,{children:e}),t?o(ye,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:o(Ee,{children:t.text})}):null]})));function Xn({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const Jn={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"},Zn={primary:p("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:p("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},Qn=d((({children:e,...t})=>{const l=e=>({...e,onClick:he(Xn(e))}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=l(t);return o("button",{className:p("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":p(Jn[a],Zn[a]),c?"rounded-md":"",n),type:s,role:d,onClick:m,children:e})})),ea=(e,t)=>o(Qn,{className:p("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ta=(e,t,l)=>c("div",{className:"flex col-span-2 gap-m flex-col lg:flex-row w-full justify-between items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3",children:[o(Xt,{...e}),o(Yn,{link:t})]}),qt(Gl(e,Wl).error)]}):o(Yn,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),ea(l)]}),la={send:async function(e,t=!1){const{typeForm:l,region:n,phone:a="",email:i,birthday:r,inn:s,fullName:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:l,...Pt(n,g),...zt(i,g),...Vt(a),...g?{birthday:Mt(r)}:{inn:s,fullName:o},..."FEEDBACK"===l?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...At(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},na=d((({className:e,title:t,typeForm:l="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:u,data:g,...x})=>{const f=r?.flatMap((e=>e?.inputs))||[],b=Gn(f,l),[y,v]=n(""),N=i((async(e,t)=>{const l=sa(f,e),n=(a=ql(l),e=>e&&Object.entries(a).flatMap((([t,l])=>l(e[t])))||[]);var a;if(n(e)?.length)return"Fail";const i=Hn({...e,...h}),r=await la.send(i,"lead"===m)?"OK":"Fail";if(v(r),"OK"===r&&g){const e=_t();Dt({aspectsAttributes:g,aspects:e,ev:t,formData:i})}return r}),[]),[,{field:w,onSubmit:k,reset:C}]=Ut(b,{onSubmit:N}),T=ra(f)?.name;return a((()=>{"OK"===y&&C()}),[y]),c(Wt,{className:p("container space-y-m",e),title:t,responseType:y,...x,children:[c("form",{onSubmit:k,children:[r.map(((e,t)=>c("div",{className:p(ia(e.columns),"grid gap-x-m"),children:[aa(e.title),(e?.inputs||[])?.map(Un(w,l))]},`section-${t}`))),ta(T?w("consentDataProcessing"):void 0,d,s)]}),u?c("div",{className:"space-y-m",children:[o(S,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[o(ae,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ae,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),aa=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ee,{size:"text-h6",children:e})}):null,ia=e=>2===e?"@xl:grid-cols-2":"",ra=e=>e?.find((e=>"consentDataProcessing"===e?.name)),sa=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((l=>{const n=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):l===(n?.key??n)})))),oa="text-left",ca=d((({title:e,description:t})=>c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ae,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(B,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:oa})]}))),da=(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}]},ma=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function ha(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const ua=d((({className:e,style:t,idx:l,activeIndex:n,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:ha(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}(i((e=>{e.length&&m&&m(l||0,e[e.length-1])}),[m,l]),c);return o("div",{className:p("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:h,role:"listitem",children:d})})),pa=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],ga=d((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:u,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:l},b=s([]),y=i(((e,t)=>{const l=[...b.current||[]];l[e]=t,b.current=l,g&&g(l),x&&x(fa(l))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?xa(c,v):{},...N?ma(h):{},gap:`${r}px`};return o("div",{className:p("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,role:"list",children:(C=(e,l)=>o(ua,{className:p(m,a?pa[a-1]:"",N?"h-full":"",t),style:w?xa(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(C):C(e,0))(u)});var C})),xa=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),fa=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ba={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},ya={"horizontal-list":"w-6","vertical-list":"h-6"},va=d((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?o("div",{className:p("flex gap-xs",ba[a],i?"group":"",e),"data-ver":i,children:Array.from({length:n}).fill(null).map(((e,n)=>o("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?ya[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Na=e=>e,wa=(e=Na)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),ka=wa(),Ca=(e=Na)=>wa((t=>-e(t))),Sa=Ca(),Ta=e=>t=>e.scrollWidth/t,Ia=e=>(t,l)=>{e.scrollBy({left:l*Ta(e)(t),behavior:"smooth"})},Ba=({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?[Ca()(a),wa()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Ia(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Ia(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Ma=d((({className:e,disabled:t,...l})=>o(ye,{rounded:!0,className:p("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:o(ae,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),Ra=d((e=>o(Ma,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Va=d((e=>o(Ma,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Pa="absolute top-[calc(50%-24px)] z-40",za="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Aa=d((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:d,canScrollRight:m,scrollLeft:h,scrollRight:u}=e,g=a?t>0:d,x=a?t<l-1:m,f=i((()=>{a?(d&&t!==l-1&&h(),r()):h()}),[h,r,a,d,t,l]),b=i((()=>{a?(m&&0!==t&&u(),s()):u()}),[u,s,a,d,t,l]);return c("div",{className:"m:hidden block",children:[Da(e),g?o(Ra,{className:p(Pa,n?"left-1 m:left-8":"left-0"),onClick:f}):null,x?o(Va,{className:p(Pa,n?"right-1 m:right-8":"right-0"),onClick:b}):null]})})),Da=e=>c("div",{children:[e.canScrollLeft?o("div",{className:p(za,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:p(za,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),ja=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Ea=({className:e,text:t="ХИТ"}={})=>c("div",{className:p("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(Y,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(T,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),$a="relative h-full",Oa={small:"sm:min-w-64",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(Ua);return A({...n,renderProps:(n,a,r)=>c("div",{className:_a(n,{someCardsHighlighted:i}),children:[V(n,a,{className:Fa(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Ua(n)?Ea({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},_a=(e,{someCardsHighlighted:t})=>p($a,t&&(Ua(e)?"pt-3xl":"pt-3xl sm:pt-16")),Fa=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>p($a,"min-w-80",Oa[n],t&&(Ua(e)?"pt-3xl sm:pt-16":"pt-3xl"),ja(l),l&&"h-full"),Ua=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Ha=St((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,isEmbedded:s=!1,cardSize:d="normal",...m})=>{const{blocks:h=[]}=m.block||{},u=t||h?.length,[g,{inc:f,dec:b}]=da({itemCount:u,visibleItemCount:l},Math.floor(l/2)),[y,v]=Ba({itemCount:u}),[N]=v.visibleIndicesRange,w=h&&"CarouselBankHistoryCard"===h[0]?.type;return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:"p-6xl",...m,children:[c("div",{className:p(a?"flex justify-center":"","relative max-w-full"),children:[o(ga,{containerRef:y,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:La({noCardBorder:n,activeIndex:g,cardSize:d,...m})}),o(Aa,{scroll:v,arrowsPadded:i,onScrollLeft:b,onScrollRight:f,hasEdgeBlocks:w,activeIndex:g,itemCount:u})]}),o(va,{className:"@5xl:hidden",containerRef:y,activeIndex:N,dotCount:u,listType:"horizontal-list"})]})}),{childrenTypes:["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Wa=({blocksToRender:e,...t})=>o(Ha,{padding:"p-0",isEmbedded:!0,itemCount:e?.length,visibleItemCount:0,isAlignCenter:!0,isGap:!1,children:z(e,{...t.options,parent:t.block,renderProps:(e,t,l)=>o("div",{className:p("relative min-w-80",ja(!0)),children:V(e,t)},String(l))})}),Ka=e=>e%2!=0,qa=d((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,role:r,...s})=>c(l,{tag:l,className:p("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Ga=d((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>o(qa,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",role:"button",className:p("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Ee,{size:"text-h4",children:t}),iconNode:l?o(ae,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Ya=({isUnfolded:e,onToggle:t})=>o(Ga,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Xa=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const Ja=d((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:l})})})),Za=["ArrowDownIcon","ArrowUpIcon"],Qa="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",ei=({topItemsCount:e=0,label:t="",block:l,blocksToRender:n=[],...a})=>{const[i,r]=e>0?[n.slice(0,e),n.slice(e)]:[n,[]];return c("div",{className:p("space-y-2xs",n.length?"":"hidden"),children:[c("div",{className:p(Qa),children:[z(i,{...a.options,parent:l}),Ka(i.length)?o(It,{className:"col-span-6",...a}):null]}),o(Xa,{renderFoldableSection:({isUnfolded:e})=>c(Ja,{className:p(Qa),isUnfolded:e,children:[z(r,{...a.options,parent:l}),Ka(r.length)?o(It,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:l,onToggle:n})=>o(Ga,{className:p(e<1?"hidden":""),disabled:!r?.length,label:t,icon:Za[Number(l)],dataTheme:a.options?.page?.colorPalette,onClick:n})})]})},ti=d((({blocksSection:e,blocksToRender:t=[],notFound:l,...n})=>{switch(e?.view){case"grid":return c("div",{children:[li(l,t),ei({...e,...n,blocksToRender:t})]});case"carousel":return c("div",{children:[li(l,t),Wa({...n,blocksToRender:t})]});default:return null}})),li=(e,t)=>e&&!t.length?o(ca,{...e}):null,ni=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),ai=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(Mn,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),ii=d((({children:e,filtrationSchema:t,resetButton:l,field:n,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,ni(o("div",{className:"h-full w-px bg-gray"}))(Object.entries(t).map(ri(n)).filter(Boolean))]}),l?o("div",{children:o(Qn,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:l?.text})}):null]}))),ri=e=>([t,l])=>{const n=l?.type;return"array"===n?si(t,e)(l):null},si=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[l?.title?o("div",{className:"mb-m",children:o(Ee,{size:"text-m",font:"font-medium",color:"text-primary-text",children:l.title})}):null,o(ai,{items:n,multiple:!l?.single,...t(e)})]},e)};function oi(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const ci=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,di=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>ci(t[e])||ci(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>ci(t[e])||ci(l[e])||mi(t[e])<=mi(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>ci(t[e])||ci(l[e])||mi(t[e]?.min)>=mi(l[e]?.min)&&mi(t[e]?.min)<=mi(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>ci(t[e])||ci(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>ci(t[e])||ci(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),mi=e=>Number(e||0),hi=(e,{block:t,page:l,normalize:n=Ft})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=Ut(e),d=r((()=>oi(a,a.map((e=>kt(e.content,l?.fallback))))),[a,l?.fallback]),m=i===e?a:((e,t)=>(l=Ft)=>e?.filter((([,e])=>di(t,l(e)||{}))).map((([e])=>e)))(d,i)(n);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},ui={},pi={},gi=St((({className:e,filtrationSchema:t=ui,consumerField:l={},resetButton:n,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=hi(pi,{block:a.block,page:a.options?.page}),d=o(dl,{className:"w-64",label:l?.title,options:xi(l),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>xi(l).find((t=>t.key===e))||{key:""}})});return c(x,{className:p(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(ii,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Qn,{type:"reset",className:"mt-lg w-64",onClick:s,version:n?.version,children:n?.text})})]})}),o(ti,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>e?.filtrationSchema||{}}),xi=e=>oi(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),fi={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},bi=d((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:p("rounded-icon object-fit flex justify-center items-center",fi[l],e),children:o(Y,{...i,width:"54%",height:"54%",name:a})}):null})),yi=d((({className:e="",title:t,benefitList:l,...n})=>c(x,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(S,{headingType:"h3",as:"h2",className:oa,title:t}):null,l?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(vi)}):null]}))),vi=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?o(bi,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?o(ae,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(S,{headingType:"h6",children:e}),o(Ee,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),o(tt,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Ni=d((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=true,minHeight:i,children:r,onVisibleIndicesChange:s,listType:d="horizontal-list"})=>{const m=Array.isArray(r)?r.length:0,[h,u]=Ba({itemCount:m,onVisibleIndicesChange:s}),[g]=u.visibleIndicesRange;return c("div",{className:p(e,"vertical-list"===d?"relative h-full":""),children:[o(ga,{containerRef:h,activeIndex:g,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:u.handleVisibleIndicesChange,listType:d,minHeight:i,children:r}),a?o(va,{containerRef:h,activeIndex:g,dotCount:m,listType:d,version:t}):null]})})),wi=(e,t,l)=>{return o(Ni,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>c("div",{className:p("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?o(Ee,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?o(ae,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?o(Ee,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},ki=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>c(x,{className:p("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[o(B,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?wi(e,0,t):null]}))),Ci={start:"justify-start",center:"justify-center",end:"justify-end"},Si=d((({buttons:e,className:t="",align:l,...n})=>{const a=l?p("flex",Ci[l]):"";return o(x,{className:p("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Ye(e)})})),Ti=d((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r})=>c("div",{className:p("flex justify-between @xl:flex-col",e),children:[t?o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}):null,o("div",l?{children:o(Ee,{size:"text-h3",children:[i,lt(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:o(Ee,{size:"text-h3",children:"-"})})]}))),Ii=e=>e?o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,Bi=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(Y,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Mi=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i})=>c("div",{children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),c("div",{className:"relative",children:[c("div",{className:"flex justify-start gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:lt(n,{fixed:!0})(e)}),l?o("span",{className:"text-7xl",children:l}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Ri=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,...i})=>a&&0===t?o(Bi,{title:e,...i}):c("div",{children:[o("div",{className:"hidden @xl:block",children:o(Mi,{title:e,rate:t,unit:l,fractionDigits:n,...i})}),o("div",{className:"@xl:hidden",children:o(Ti,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,...i})})]});function Vi({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${lt(2)(l.min||0)} ₽`,`До ${lt(2)(l.max||0)} ₽`];return o(xn,{items:e?n:[],step:t,...l})}const Pi=d((({className:e,inputChildren:t,rateChildren:l,resultChildren:n})=>c("section",{className:p("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[o("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:t}),o("div",{className:"border-b border-main-divider md:hidden"}),l,o("div",{className:"flex flex-col gap-2xl sm:w-96 max-w-full",children:n})]}))),zi=Math.round(29.5),Ai={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Di={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},ji={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Ei={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},$i=(e,t=0)=>e?.sum?e.sum:t,Oi=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Li=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,_i={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Fi=d((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>o("div",{className:p(`flex ${_i[a]}`,l),role:"radiogroup",children:e?.map((({id:e,text:l})=>o(Xt,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Ui=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>c("div",{className:"space-y-s",children:[t?o("div",{className:"hidden @5xl:block",children:o(Ee,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",children:o(Ee,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(Fi,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:p("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),Hi=e=>Ui({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Wi=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Ki([e,t],n),Ki=([e,t],l=[])=>({[e]:l.length?Sa(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?ka(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),qi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Gi={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Yi=(e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=l<90||l>730,c=function(e){const t=e?.rateType?Gi[e?.rateType]:"",{data:l}=nn(t?`/api/v1/depositrates/${t}`:null,yt);return Array.isArray(l)?l:[]}(t);if(l<=30)return{...Ei,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&Xi(s,e)&&qi(n,["minSum","maxSum"],e)&&qi(l,["minDays","maxDays"],e)))||Ei,{rate:m}=d,h=Ji(m,e),u=n+h,p=c||[Ei];return{...d,...Ki(["minSum","maxSum"],p),...Ki(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},Xi=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ji=(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)},Zi=d((({className:e="",buttons:t,footnote:l,bottomFootnote:n,isShowDepositeName:a,defaultParams:i,rateParams:r})=>{const[s,{field:d}]=Ut({moneyValue:$i(i,1e5),daysValue:Oi(i,60),isReplenished:Boolean(i?.isReplenished),isPartialWithdrawal:Boolean(i?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(i?.isMonthlyInterestPayment)}),m=Yi(s,r),{income:h,finalSum:u,rate:p,isUnavailableByTerm:g,depositeName:x}=m;return o(Pi,{className:e,inputChildren:c("div",{children:[Vi({title:"Сумма, ₽",min:m.minSum,max:m.maxSum,...d("moneyValue"),value:m.moneyValue}),(f={title:"Срок, дней",min:m.minDays,max:m.maxDays,...d("daysValue"),value:m.daysValue},o(xn,{items:[`От ${Li(f.min||0)}`,`До ${Li(f.max||0)}`],step:1,...f})),c("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[Qi(m,d),Hi({title:"Выплата процентов",orientation:"vertical",...d("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),rateChildren:Ri({rate:p,depositeName:x,isShowDepositeName:a,isUnavailableByTerm:g}),resultChildren:c("div",{children:[er(u,h),Ye(t,{isVertical:!0}),Ii(l),Ii(n)]})});var f})),Qi=(e,t)=>c("div",{className:"space-y-s",children:[o(Ee,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[o(Xt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Xt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),er=(e,t)=>c("div",{className:"flex flex-col gap-2xl sm:gap-0 mb-lg",children:[o(Ti,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),o(Ti,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),tr=e=>lr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&lr({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&lr({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&lr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),lr=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],nr=(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)},ar=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows||[Ai],r=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>tr({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:s,maxSum:o}=Wi(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=Wi(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>tr({row:e,userInputParams:t,paramsViewSettings:l})&&qi(n,["minSum","maxSum"],e)&&qi(a,["minMonths","maxMonths"],e)))||Ai)({rateRows:i,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:h}=m,u=nr(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:n,monthsValue:a,monthlyPayment:u}},ir=({min:e=0,max:t=0,availableMonths:l,...n})=>o(xn,{items:[`От ${rr(e)}`,`До ${rr(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),rr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,sr=e=>Ui({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),or=d((({className:e,calcSource:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:d}]=Ut({moneyValue:$i(r,2e5),monthsValue:Oi(r,zi),isAnnuity:Boolean(r?.isAnnuity),isInsurance:Boolean(r?.isEnableInsurance),isSalaryClient:Boolean(r?.isEnableSalaryClient),isPensionClient:Boolean(r?.isEnablePensionClient),isStateEmployee:Boolean(r?.isEnableStateEmployee)}),m=ar(s,t,i),h=sr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")}),{onChange:u}=d("moneyValue"),{onChange:p}=d("monthsValue");return a((()=>{u&&u(mn(s.moneyValue,m.minSum,m.maxSum))}),[m.minSum,m.maxSum]),a((()=>{p&&p(mn(s.monthsValue,m.minMonths,m.maxMonths))}),[m.minMonths,m.maxMonths]),o(Pi,{className:e,inputChildren:c("div",{children:[Vi({title:"Сумма кредита, ₽",step:500,min:m.minSum,max:m.maxSum,...d("moneyValue"),value:m.moneyValue}),ir({title:"Срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),cr({...m,...i},d),o("div",{className:"sm:hidden",children:h})]}),rateChildren:Ri({rate:m.rate}),resultChildren:c("div",{children:[o(Ti,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:h}),Ye(l,{isVertical:!0}),Ii(n)]})})})),cr=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Xt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Xt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Xt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Xt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),dr=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},mr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows?.[0]?pr(t.rateRows[0].minMonths,t.rateRows[0].maxMonths):0,r=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=t?.rateRows?.find((t=>ur({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r})&&ur({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&qi(n,["minSum","maxSum"],t)&&qi(a||i,["minMonths","maxMonths"],t)))||ji,{rate:c}=o,d=hr(c,e),m=n+d,h=t?.rateRows||[ji];return{...o,...Ki(["minSum","maxSum"],h),...Ki(["minMonths","maxMonths"],h),availableMonths:dr(h.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:i,income:d,finalSum:m}},hr=(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)},ur=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],pr=(e,t)=>e+Math.round((t-e)/2),gr=d((e=>{const{className:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s}=e,[d,{field:m}]=Ut({moneyValue:$i(s,2e4),monthsValue:Oi(s),isMonthlyInterestPayment:Boolean(s?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(s?.isRemoteRegistration)}),h=mr(d,l,r),{defaultMonth:u,rate:p,income:g,finalSum:x}=h,{onChange:f}=m("monthsValue"),{onChange:b}=m("moneyValue");return a((()=>{!d.monthsValue&&f&&f(u)}),[u]),a((()=>{b&&b(mn(d.moneyValue,h.minSum,h.maxSum))}),[h.minSum,h.maxSum]),o(Pi,{className:t,inputChildren:c("div",{children:[Vi({title:"Сумма, ₽",min:h.minSum,max:h.maxSum,...m("moneyValue"),value:h.moneyValue}),ir({title:"Срок, месяцев",min:h.minMonths,max:h.maxMonths,availableMonths:h.availableMonths,...m("monthsValue"),value:h.monthsValue}),xr({...h,...r},m)]}),rateChildren:Ri({rate:p}),resultChildren:c("div",{children:[o(Ti,{title:"Доход в конце срока",value:g,postfix:"₽",prefix:"+"}),o(Ti,{title:"Сумма в конце срока",value:x,postfix:"₽"}),Ye(n,{isVertical:!0}),Ii(i)]})})})),xr=(e,t)=>{return c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?Hi({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Ui({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},fr=e=>br({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&br({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),br=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],yr=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[Di],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>fr({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Wi(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Wi(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>fr({row:e,userInputParams:t,paramsViewSettings:l})&&qi(n+r,["minSum","maxSum"],e)&&qi(i,["minSumOld","maxSumOld"],e)&&qi(r,["minSumExtra","maxSumExtra"],e)&&qi(a,["minMonths","maxMonths"],e)))||Di)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=nr(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},vr=d((({className:e,calcSource:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=Ut({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=yr(i,t,a),d=sr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return o(Pi,{className:e,inputChildren:c("div",{children:[Vi({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),Vi({title:"Ежемесячный платёж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),ir({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Nr({...s,...a},r),s.isExtraMoney?Vi({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:d})]}),rateChildren:Ri({rate:s.rate,fractionDigits:1}),resultChildren:c("div",{children:[o(Ti,{title:"Ежемесячный платёж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?o(Ti,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:d}),Ye(l,{isVertical:!0}),Ii(n)]})})})),Nr=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Xt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Xt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Xt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),wr={CreditCalculatorForm:or,DepositCalculatorForm:gr,BusinessDepositCalculatorForm:Zi,RefinancingCalculatorForm:vr},kr=St((({className:e,calculatorTabs:t=[],...l})=>o(x,{className:e,defaultPadding:"p-0",...l,children:Sr(t)}))),Cr=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in wr))return null;const l=wr[t];return c("div",{className:"p-xl",children:[e?.calculatorBlock?.title?o(S,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,o(l,{...e.calculatorBlock,isMobile:!0})]})},Sr=e=>{if(!e||!e.length)return null;return 1===e.length?Cr(e[0]):e.map(((e,t)=>o(Xa,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>o(Ja,{isUnfolded:t,children:Cr(e)}),renderFoldButton:Tr(e)},t.toString())))},Tr=e=>({isUnfolded:t,onToggle:l})=>{const n=e.nav?.align||"text-left";return c("button",{type:"button",onClick:l,className:"w-full p-xl bg-primary-main flex items-center border-b border-white",children:[o("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:o(Y,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),c("div",{className:"flex-1 flex flex-col pl-s",children:[o(Ee,{align:n,color:"text-white",children:e.nav?.title}),o(Ee,{align:n,size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),o(Y,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]})},Ir=d((({className:e,title:t,children:l,...n})=>c(x,{className:p("space-y-xl",e),defaultPadding:"p-4xl",...n,children:[t?o(S,{className:"text-center",title:t}):null,l]}))),Br={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Mr={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Rr=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,[a,i]=((e,t,l)=>{const{maxBonus:n=5e3,prefMonthsNum:a=Br.prefMonthsNum,prefTravelBonusRate:i=Br.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*l),n);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*l),n)*(12-a)]})(t||Mr,l,n);return{...t,...e,monthBonus:a,yearBonus:i}},Vr=St((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,...i})=>{const[r,{field:s}]=Ut({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:u,monthBonus:g,yearBonus:x}=Rr(r,l);return o(Ir,{className:e,title:t,...i,children:c("section",{className:p("flex flex-col justify-between @4xl:flex-row gap-y-4xl",e),children:[c("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[Vi({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Vi({title:"Сумма покупок в остальных категориях, ₽",min:h,max:u,step:500,isShowItems:!1,...s("restExpenseValue")})]}),g>=0?Ri({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,c("div",{className:"flex flex-col gap-y-xl @xl:w-96",children:[x>=0?o(Ti,{title:"Баллов за год",value:x}):null,Ye(n,{isVertical:!0}),Ii(a)]})]})})})),Pr=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=dn(e,{normalize:(e=a)=>l&&n?String(mn(Number(zr(e)),l,n)):zr(e),format:lt(r)}),d=i((e=>t&&t(zr(e))),[t]);return o(ll,{onChange:d,...s,...c})})),zr=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Ar=d((e=>o(Pr,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ee,{size:"text-xl",font:"font-light",children:"₽"})})}))),Dr={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},jr={amount:1500},Er=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...d})=>{const[{amount:m},{field:h}]=Ut(jr),[u,g]=n(!1);return a((()=>{g(m<=0)}),[m]),c(x,{className:p("flex flex-col items-center",e),defaultPadding:"p-6xl",...d,children:[t?o(S,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Dr[s],children:[o(Ar,{valid:!u,placeholder:i,label:l,max:3e5,min:1,...h("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:m}),r?.text?o(Qn,{className:"w-full mt-lg",type:"submit",disabled:u,children:r.text}):null]})]})})),$r=d((({title:e,description:t,className:l})=>o(x,{className:l,defaultPadding:"p-6xl",children:o(B,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),Or="z-10 border border-solid w-full h-full",Lr=p(Or,"absolute hidden @xl:block border-transparent"),_r=d((({className:e,title:t,description:l,button:n,...a})=>o(x,{className:p("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:p(Lr,"top-9 right-12 bg-green-dark")}),o("div",{className:p(Lr,"top-6 right-8 bg-green")}),o("div",{className:p(Lr,"top-3 right-4 bg-green-light")}),c("div",{className:p(Or,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(B,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ye([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Fr={black:"bg-black",white:"bg-white"},Ur=d((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(x,{className:p("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ce,{className:"h-full",padding:d,title:o(B,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(ae,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Ye([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Ee,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Hr)]}):null,a?c(Ee,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Hr=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Fr[e]}`},String(t)),Wr="20",Kr="absolute w-full h-full border border-white",qr=d((({className:e="",icon:t,...l})=>{const n=ue(),{text:a,href:i,target:r,onClick:s}=n(l);return a?o("div",{className:p("flex relative group/link pl-s pb-s sm:pr-2xs min-w-64 sm:min-w-72",e),children:c("div",{className:"relative min-h-16 w-full pb-lg sm:pb-0",children:[c("a",{className:p("absolute border\n bg-white flex items-center justify-between group-hover/link:text-primary-main","flex rounded-md lg:rounded-none w-full w-full p-lg whitespace-nowrap z-10"),role:"link",href:i,target:r,onClick:s,children:[c("div",{className:"flex items-center space-x-lg",children:[t?o(ae,{imageClassName:"text-green-dark",image:t,width:Wr,height:Wr}):null,o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})]}),o(ae,{className:"group-hover/link:brightness-100 sm:ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"color"},imageClassName:"group-hover/link:text-primary-main",width:Wr,height:Wr})]}),o("div",{className:p(Kr,"-bottom-1 -left-1")}),o("div",{className:p(Kr,"-bottom-2 -left-2")})]})}):null})),Gr=d((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>o(x,{defaultPadding:"p-5xl",className:p("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row sm:items-center gap-s justify-between",children:[c("div",{children:[o(B,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),o(B,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?Yr(n,"sm:self-end sm:pt-s"):null]})}))),Yr=(e,t="")=>{const l=Math.ceil(e.length/3);return o(Ha,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",visibleItemCount:0,isEmbedded:!0,children:Array.from({length:l}).fill(null).map(((t,l)=>o("div",{className:"flex flex-wrap gap-2xs sm:gap-0 sm:justify-center",children:e.slice(3*l,3*(l+1)).map(((e,t)=>o(qr,{...e},String(t))))},String(l))))})},Xr=d((({className:e="",href:t,target:l,isRemote:n=!1,onClick:a,data:i,children:r})=>{const s=ue({isRemote:n})({href:t,target:l,onClick:a});return o(t?"a":"div",{className:p("block",e),...t?s:{},role:t?"link":"none",...pe(i),children:r})})),Jr=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Zr=d((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,d]=n(),m=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=(e=>Jr.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ge(n)?n:r,c=l?{text:a}:{text:""};return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:"color"},version:e?.version??i}})),h=p("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",a?"flex-1 justify-center":"");return c("div",{className:p("flex flex-col gap-xs",e),children:[o("div",{className:"flex gap-xs",children:Ye(m,{className:p(a||s?"basis-full":""),buttonClassName:h})}),r?o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Qr=d((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:d=[],target:m,title:h,align:u="text-left",benefits:g,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},...v})=>o(x,{className:p("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...v,children:o(Xr,{href:a,target:m,className:"h-full",children:c(Ce,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(B,{title:h,description:l,headlineVersion:"XS",isEmbedded:!0,align:u}),...ct(Ge(i)?o(ae,{image:i}):null,f),buttons:d.length?o(Zr,{media:d,showButtonText:!0,version:v?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(qe,{benefits:g}),o(tt,{items:r,isDotted:s,listItemSize:"S"}),es(n,u)]})})}))),es=(e,t)=>e?o(T,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,ts=(e,t)=>{const{title:l,description:n,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[l?o("div",{className:"opacity-80",children:o(Ee,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(Ee,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:Ye(a)}):null]},String(t))},ls=d((({className:e="",title:t,align:l="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,...u})=>{const g=d.map(ts),[f,b]=s>0?[g.slice(0,s),g.slice(s)]:[g,[]],[y,v]=n(!1);return a((()=>h.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[]),c(x,{className:p("flex flex-col",e),defaultPadding:"p-2xl",...u,children:[Ge(i)?o("div",{className:"self-center",children:o(ae,{image:i})}):null,t?o(S,{className:p("pt-xs",l),headingType:"h5",title:t}):null,r?.text?o(ye,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(Xa,{renderFoldableSection:()=>c("div",{children:[f,o(Ja,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>1?ns(y,m?.parent):null}):o("div",{children:f})]})})),ns=(e,t)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&h.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(Y,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),as=(e=!1)=>e?"text-white":"",is=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),rs=d((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>c("th",{className:"space-y-4 flex flex-col items-start",children:[e?o(ae,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&o("div",{children:o(ae,{image:t})}),l?o(S,{headingType:"h4",className:as(a),title:l}):null,n?o("div",{className:is(a),children:n}):null]}))),ss=d((({cell:e,rowHeader:t,isFillGradient:l=!1})=>o("div",{className:"box-border flex flex-col",role:"cell",children:o("div",{className:p("h-full","border-main-divider border-b"),children:e?e.map(ds(l,t)):null})}))),os=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),cs=(e=!1)=>""+(e?"text-white":""),ds=(e,t)=>({label:l,description:n},a)=>c("div",{className:"flex justify-between text-s py-s",children:[o(T,{size:"text-s",color:os(e),children:t}),c("div",{className:"basis-1/2",children:[l?o("div",{className:"text-right",children:o(T,{size:"text-s",align:"text-right",color:cs(e),children:l})}):null,n?o("div",{className:"text-right",children:o(T,{size:"text-s",color:os(e),children:n})}):null]})]},String(a)),ms=d((({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 o("tr",{className:"mb-m",children:c("td",{className:p("border border-gray rounded-md p-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),children:[o(rs,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>o(ss,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?o(ye,{href:e.link.href,target:e.link?.target,version:s,ariaLabel:"Подробнее",className:"text-s font-medium mt-m p-s",children:e.link.text}):null,hs({onToggleColumn:i,isFillGradient:n,showRow:a})]})})})),hs=({onToggleColumn:e,isFillGradient:t,showRow:l})=>o("td",{className:"pt-lg",children:o("a",{role:"link",onClick:e,className:"cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:o(Ee,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),us=d((e=>{const{className:t,title:l}=e;return c("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?o(S,{headingType:"h3",className:"font-medium text-center",title:l}):null,o("table",{className:"border-separate",children:o(ps,{...e})})]})})),ps=d((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[c,d]=n(Array.from({length:e.length}).fill(!a)),m=i((e=>{const t=(t,l)=>l===e?!t:t;d((e=>e.map(t)))}),[]),h=i((()=>d((e=>Array.from({length:e.length}).fill(!1)))),[]),u=e?.map((({data:e,header:n},i)=>{return o(ms,{visibleRowLength:a,showRow:c[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>m(i),...s},String(i));var r}));return o("tbody","horizontal"===r?{children:o(Ni,{onVisibleIndicesChange:h,children:u})}:{children:u})})),gs=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,xs=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),fs=1e9,bs={sum:{min:1e4,max:fs},period:3},ys=St((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=hi(bs,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:vs(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),u=Ns(h);return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(ii,{filtrationSchema:t,resetButton:l,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs",children:[o(Ar,{label:n?.title,min:500,max:fs,...d("sum",{parse:e=>({min:Number(e),max:fs}),format:({min:e})=>String(e)})}),o(xn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:u,...d("period")})]})}),o(ti,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),vs=e=>vt((e?.paramsSource?.rateRows||[]).filter(gs).flatMap((e=>xs(e.minMonths,e.maxMonths)))),Ns=e=>vt(e.flatMap((e=>e||[])).filter(gs).flatMap((e=>xs(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],ws=e=>"Image"===e?.contentType&&e?.image?o(ae,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,ks=d((({className:e="",title:t,description:l,error:n,button:a,...i})=>c(x,{className:p("flex flex-col justify-center items-center",e),defaultPadding:p("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:ws(n)}),o(B,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(ye,{version:a?.version,text:a?.text,...a}):null]}))),Cs="location";function Ss(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(h,"location",Is()??{name:e}),r=i((e=>{Bs(e),l(e)}),[]),{data:s}=nn(Ts()?null:"/api/v1/region",yt);return a((()=>{s&&!Ts()&&l(s)}),[s]),[t??{name:e},r]}const Ts=()=>Boolean(globalThis.localStorage?.getItem(Cs)),Is=()=>{try{const e=globalThis.localStorage?.getItem(Cs);return e&&JSON.parse(e)}catch(e){return null}},Bs=e=>{try{globalThis.localStorage?.setItem(Cs,JSON.stringify(e))}catch(e){}};var Ms;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Ms||(Ms={}));const Rs=new Intl.NumberFormat("ru",{style:"currency",currency:Ms.RUB}),Vs=e=>e?Rs.format(e):"",Ps="text-m font-light text-secondary-text ",zs=`${Ps} text-left`,As=`${Ps} pl-5xl text-center`,Ds=`${Ps} pl-5xl text-right`,js={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Es=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:p("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:zs,children:o(Ee,{size:"text-m",children:"Валюта"})}),o("th",{className:As,children:o(Ee,{size:"text-m",children:"Купить"})}),o("th",{className:Ds,children:o(Ee,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map($s)})]}))),$s=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ae,{image:{icon:js[t]},width:"24",height:"24"}):null,o(Ee,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Ee,{size:"text-h6",children:Vs(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ee,{size:"text-h6",children:Vs(e?.buyExchangeRate)})})]},t)},Os={icon:"GpsIcon"},Ls=d((({className:e="",address:t})=>c("div",{className:p("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(bi,{...Os,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(T,{size:"text-l",color:"text-primary-main",children:t}):null,o(T,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),_s=(e,t,l)=>{const n=Number(Fs(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)},Fs=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Us=e=>$t([[e=>e.value!==Ms.RUB&&e.oppositeValue!==Ms.RUB,()=>e.handleConvert(e.value,Ms.RUB)],[e=>e.value===Ms.RUB&&e.oppositeValue===Ms.RUB,()=>e.handleConvert(e.value,Ms.USD)],[e=>e.value===Ms.RUB&&e.oppositeValue===Ms.RUB,()=>e.handleConvert(e.value,Ms.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Hs(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:n,text:n};return c("div",{className:"relative flex",children:[o(ll,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(dl,{isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Ws=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Ms.RUB,selectBuy:l?.[0]?.currency?.currency||Ms.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[Hs({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Ks(r,d,l),value:r.inputSell,setValue:e=>Gs(d,l)(e,r.selectSell,r.selectBuy)}),Hs({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:qs(r,d,t),value:r.inputBuy,setValue:e=>Ys(d,t)(e,r.selectBuy,r.selectSell)}),a?.text?o(ye,{text:a.text,version:a?.version,...a}):null]})})),Ks=(e,t,l)=>n=>{t({selectSell:n}),Us({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Gs(t,l)(e.inputSell,n,a)}})},qs=(e,t,l)=>n=>{t({selectBuy:n}),Us({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Ys(t,l)(e.inputBuy,n,a)})},Gs=(e,t)=>(l,n,a)=>{e({inputSell:Fs(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputBuy:String(_s(l,i,n===Ms.RUB)||"")})},Ys=(e,t)=>(l,n,a)=>{e({inputBuy:Fs(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputSell:String(_s(l,i,n===Ms.RUB)||"")})};const Xs=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=Ss(),i=function(e){const t=e?.code||"000",{data:l}=nn(`/api/v1/exchangerates?regionCode=${t}`,yt);return l||{}}(a),r=Js(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Ms.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:Ms.RUB}}),o(x,{className:p("box-border min-h-80",e),...n,children:o(Ce,{className:"h-full",title:o(S,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(Es,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Ls,{address:i?.address})]}),r.length&&s.length&&d.length?o(Ws,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:l}):null]})})})})),Js=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Zs=(e,t)=>o(bi,{...e,iconBgVersion:t,className:"shrink-0"}),Qs=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(qa,{tag:"button",className:p("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Zs(a,t),e?o(Ee,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(Y,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),eo=St((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>o(x,{className:p("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(Xa,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Ja,{className:p("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:A({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>to({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),to=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"accordion"===e?o(Qs,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):o(Ga,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},lo=d((({className:e="",items:t})=>c("div",{className:e,children:[t?.length?t.map(no):null,o(ye,{version:"primary",className:"w-full",href:"https://www.rshb.ru/natural/feedback/question",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),no=(e,t)=>c("div",{className:"mb-m space-y-m",children:[o("div",{children:o(Ee,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(ao)})]},String(t)),ao=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:io(e.type,e.text)}),o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),io=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${ro(t)}`,children:o(Ee,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(T,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},ro=e=>e.replaceAll(/\D/g,""),so=["split_version","New","Old"],oo=d((({className:e="",index:t,text:l,...n})=>{const a=ue(),{href:i,target:r,onClick:s}=a(n);return o("a",{className:p("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),co=d((({title:e,links:t,className:l=""})=>c("div",{className:p("flex flex-col gap-4",l),children:[o(Ee,{size:"text-l",font:"font-normal",children:e}),t?.length?o("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>o(oo,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),mo=d((({className:e="",items:t,basePath:l})=>{const n=ue({isRemote:!(!E.BASE_PATH||!l)&&!E.BASE_PATH.startsWith(l),basePath:l});return o("ul",{className:p("flex flex-col",e),children:t?.map(ho(n))})})),ho=e=>(t,l)=>{const{text:n,...a}=t,{href:i,target:r,onClick:s}=e(a);return o("li",{className:"list-none my-xs",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,children:n||null})},`list_item_${String(l)}`)},uo=d((({className:e="",index:t,...l})=>{const n=ue({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return o("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}`})})),po=d((({className:e="",links:t})=>c("div",{className:p("@container",e),children:[o("div",{className:"pt-lg",children:o(Ee,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>o(uo,{index:t,...e},String(t))))}):null]}))),go=St((({className:e,footer:t,...l})=>{const{topItems:n}=l.options?.page?.sitemap??{},{relatedEnterprises:a,contacts:r,socialMedia:s,mobileApps:d,horizontalNavigationTitle:m,documents:h}=t||{},u=i((()=>{const[e,t,l]=so;((e,t)=>{const l=globalThis.document?.cookie.split(";")??[],[,n]=l.map((e=>e.split("="))).find((([t])=>t.trim()===e))||[];t(n)&&(globalThis.document.cookie=`${e}=${t(n)}`)})(e,(e=>e?.replace(t,l)))}),[]);return c(x,{tag:"footer",className:e,defaultPadding:"p-4xl pb-24",...l,children:[o("div",{className:"mb-lg pb-xs border-b border-main-divider",role:"menu",children:xo(n)}),o(lo,{className:"overflow-hidden",items:r}),c("div",{className:"mt-xl",children:[o(Zr,{className:"mb-xl",media:s,stretched:!0,children:"Соцсети"}),c("div",{className:"mb-xl",children:[o(Zr,{className:"mb-m",media:d,stretched:!0,showButtonText:!1}),o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),o("div",{className:"py-lg border-t border-main-divider",children:o(oo,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:u})}),o(co,{className:"py-lg border-y border-main-divider",title:m,links:a}),o(po,{links:h})]})})),xo=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(eo,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(mo,{items:e.items,basePath:D(e.href)}):null},String(t)))),fo={width:"34",height:"34"},bo={"bg-white":"color",transparent:"white"},yo={"bg-white":"text-primary-main",transparent:"text-white"},vo=(e,t,l)=>o(ae,t?.src?{image:t,className:yo[e],width:l?.width,height:l?.height}:{image:{icon:t?.icon||"LogoIcon",iconVersion:bo[e]},className:yo[e],width:l?.width,height:l?.height}),No={"bg-white":"text-primary-text",transparent:"text-white"},wo=d((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>c("a",{className:p("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",...pe(l?.data),children:[vo(i,l?.image,fo),r?n??o("div",{className:"ml-s",children:o(Ee,{font:"font-medium",color:No[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),ko={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Co=d((({bgColor:e,logo:t,alwaysShowLogo:l,internetBankUrl:n,version:a})=>{const r=u(),s=E.BASE_PATH?.startsWith(r.pathname),d=i((()=>{r.back()}),[]);return c("div",{className:"flex items-center justify-between w-full",children:[l||s?o("div",{children:o(wo,{className:"my-2xs",bgColor:e,logo:t})}):So(d),n?o("div",{children:o(ye,{href:n,ariaLabel:"Войти",target:"_blank",className:p("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",ko["transparent"===a?"transparent":"default"]),children:"Войти"})}):null]})})),So=e=>o("div",{children:c("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,type:"button",children:[o(ae,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),To={"bg-white":"primary",transparent:"transparent"},Io=St((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:l=To[e],portal:n,...a})=>{const{logo:i}=a.options?.page?.sitemap??{},{internetBankUrl:r}=n||{};return o(x,{tag:"header",defaultPadding:"",version:l,...a,children:o("div",{className:"container px-lg py-2xs box-border",children:o(Co,{bgColor:e,logo:i,alwaysShowLogo:t,internetBankUrl:r,version:l,...a})})})})),Bo=(e=!1)=>e?{}:{padding:"p-0"},Mo={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Ro=St((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=u();return o(x,{className:p("relative flex flex-col",Mo[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:A({...c,extraProps:{className:p("w-full",ja(r)),...Bo(n)}})})}),{childrenTypes:[]}),Vo=St((e=>o(Ro,{...e})),{childrenTypes:[]}),Po=d((e=>{const{className:t,align:l,image:n,...a}=e,i=l?p("flex",Ci[l]):"";return o(x,{className:p(i,t),defaultPadding:"p-0",...a,children:o(ae,{image:n})})})),zo=["байт","Кб","Мб","Гб","Тб","Пб"],Ao=d((({icon:e,text:t,href:l,target:n,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:l,target:n,...pe(i),children:[e,t?c(Ee,{size:"text-l",font:"font-light",children:[t," ",Do(d,m),o(Ee,{color:"text-secondary-text",children:l&&`${d+s+m}`})]}):null]})})),Do=(e,t)=>e||t?o("span",{children:", "}):"",jo={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Eo=d((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=u();return c(x,{className:p("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(B,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:p("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",jo[r]),role:"list",children:a.map($o(d,i))}):null]})})),$o=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a=K(e)("Attachment"===l?.docType?l?.attachment?.src:l?.href),i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${zo[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?Oo(a):l?.fileFormat;return o("div",{role:"listitem",children:o(Ao,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?o(ae,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:t,width:"24",height:"24"}):null,data:l?.data})},String(n))},Oo=e=>{if(!e)return"";const t=e.lastIndexOf("."),l=new RegExp(/\/(.*)/),n=-1!==t?e.substring(t+1):"";return n.includes("/")?n.replace(l,""):n},Lo=St((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,headingType:d,additionalDescription:m="",title:h="Мобильное приложение",version:u="primary",...g})=>{const f="secondary"===u?"p-m min-w-32":"min-w-24",b=i?.src?o(ae,{className:"hidden lg:block",image:i}):null;return o(x,{className:p("min-h-80",e),padding:"p-0",version:u,...g,children:c(Ce,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(S,{headingType:d,title:h,className:p("whitespace-pre-wrap",l)}),rightImage:b,buttons:Ye(n,{className:"flex-wrap"}),children:[a?o(Ee,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:p("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[o(tt,{items:r,listItemSize:"M"}),o(Ee,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),s?.src?o("div",{className:p("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ae,{className:"w-fit",image:s})}):null,i?.src?o(ae,{className:"lg:hidden",image:i}):null]})]})})})),_o={primary:"bg-white/30",secondary:"bg-main-divider"},Fo={primary:"text-white",secondary:"text-secondary-text"},Uo=d((({count:e,version:t="secondary"})=>o("div",{className:p("w-6 h-6 rounded-full flex items-center justify-center",_o[t]),role:"status",children:o(Ee,{size:"text-xs",color:Fo[t],children:e})}))),Ho=(e=[],t={})=>e.filter((({content:e={}})=>di(t,e))).length,Wo=(e,t)=>e===t;const Ko=(qo=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Wo,((e=Wo)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>qo(l,t[e])))));var qo;const Go=[],Yo={},Xo={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Jo={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Zo={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Qo={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},ec=d((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...d}=t;return o(i,{className:p("h-12","block flex-1","cursor-pointer",Xo[n],l?Qo[n]:Zo[n]),role:"tab","aria-selected":l,onClick:a,...d,children:c("div",{className:p("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Jo[n]:"text-secondary-text hover:text-primary-main"),children:[o(Ee,{size:"text-m",children:r}),s?o("div",{className:"ml-xs",children:s}):null]})})})),tc=d((e=>o(e?.item?.href?lc:nc,{...e}))),lc=d((e=>{const t=ue(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(ec,{...e,tag:"a",item:a,onClick:n})})),nc=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(ec,{item:e,onClick:n,...l})})),ac=(e,t,l)=>(n,a)=>o(tc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),ic=d((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>o("div",{className:p("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(ac(n,a,t))}))),rc={categories:[],extraOptions:[],propertyType:[],stage:[]},sc=St((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:u}]=hi(rc,{block:a.block,page:a.options?.page}),g=i(((e=rc)=>u(e)),[]),f=(({hotFilters:e=Go,filtrationState:t=Yo,blocks:l=Go,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Ko(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:o(Uo,{version:t===e[a]?"primary":"secondary",count:Ho(l,t.filter)})})))),[e,l,a]),c=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:c}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:g});return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(ic,{...f}),o(ii,{filtrationSchema:l,resetButton:n,field:m,reset:h}),o(ti,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}});function oc(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((({coords:t,content:l})=>new e.Placemark(t,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{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.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const cc={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"},dc=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(cc).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:o(Y,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),mc=e=>globalThis[e];function hc(e,t,l=!0){const[i,r]=n(void 0);return a((()=>{let n=!0;return((e,t)=>{const l=document.getElementById(t);if(l){const t=mc(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(mc(e))}))}))}return new Promise(((l,n)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{l(mc(e))})),a.addEventListener("error",(e=>{n(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{n&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(n=!1,l){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,l]),i}const uc={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"},pc=d((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(uc).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(Y,{name:l,width:"20",height:"16"})})})),gc=[55.753995,37.614069],xc=d((({points:e,className:t="",zoom:l=5})=>{const n=s(null),i=hc("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${E.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{n?.current?i&&(oc(i,n.current,e),e?.length||n.current.setCenter(gc)):i?.ready((()=>{n.current||(n.current=new i.Map("map",{center:e?fc(e):gc,zoom:l,controls:[],suppressMapOpenBlock:!0}),oc(i,n.current,e))}))}),[i,n,e,l]),!i)return null;const r="z-10";return c("div",{id:"map",className:p("relative","w-full",t),children:[c("div",{className:p("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",r),children:[o(pc,{yandexMaps:n}),o(pc,{yandexMaps:n,direction:"out"})]}),dc(n.current,i,p("right-2 top-80",r))]})})),fc=e=>[yc(bc(e,0)),yc(bc(e,1))],bc=(e,t)=>e.map((e=>e.coords[t])),yc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,vc={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему"},Nc="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",wc=(e,{field:t,reset:l},n=3)=>{const a=(e||[]).map((e=>o(Xt,{text:vc[e],...t(e)},e))),[i,r]=n>0?[a.slice(0,n),a.slice(n)]:[a,[]];return o("div",{children:e?.length?o("div",{children:r.length>0?o(Xa,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Nc,children:i}),o(Ja,{className:Nc,isUnfolded:e,children:r})]}),renderFoldButton:kc(l)}):o("div",{className:Nc,children:i})}):null})},kc=e=>({isUnfolded:t,onToggle:l})=>c("div",{className:"flex",children:[o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0 mr-lg",appendRight:o(Y,{name:["ArrowDownIcon","ArrowUpIcon"][Number(t)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(t)],onClick:l}),o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,text:"Очистить фильтр",appendRight:o(Y,{name:"CloseIcon",width:"16",height:"16"})})]}),Cc=()=>{},Sc=()=>[],Tc=e=>"all"===e?"block":"hidden",Ic=d((({className:e,data:t=[],renderCard:l=Cc,filterItems:a=Sc,getBalloon:i=Cc,initFilterState:s={},descriptionData:d,title:m})=>{const[h,{field:u,reset:g}]=Ut(s),[x,f,y]=r((()=>{const e=a(t,h),l=e.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:i(e)}))).filter((e=>e.coords&&2===e.coords.length));return[e,l,e.length]}),[t,h]),[v,N]=n("all");return c("div",{className:p("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-6xl pb-0",children:[c("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:[o(S,{headingType:"h2",children:m}),y?o(Ee,{size:"text-h2",color:"text-secondary-text",children:`(${y})`}):null]}),d?Mc(d):null,Bc(t,v,N),o("div",{className:p("pb-2xl",Tc(v)),children:wc(Object.keys(s),{field:u,reset:g})})]}),o("div",{className:"h-[600px]",children:o(b,{children:o(xc,{points:f,className:"h-full"})})})]}),x.map(l)]})})),Bc=(e,t,l)=>{const n="business"===t?"primary":"secondary",a=(e,t,n)=>(e.currentTarget===e.target&&"business"===t&&n.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),l(t),n);return c("div",{className:"flex pb-lg",children:[o(Qn,{className:"mr-m","data-id":"all",onClick:t=>a(t,"all",e),version:"all"===t?"primary":"secondary",children:"Для физических лиц"}),o(Qn,{"data-id":"business",onClick:t=>a(t,"business",e),version:n,children:"Для юридических лиц"})]})},Mc=({__html:e,list:t})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(De,{__html:e})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ae,{image:e.image}):null,e?.text?o(Ee,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Rc={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Vc=d((({className:e,children:t,color:l="gray"})=>c("div",{className:p("sm:p-s sm:border sm:border-gray rounded-md flex items-center",Rc[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ae,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Ee,{size:"text-m",color:Rc[l].text,children:t})]}))),Pc=d((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:zc({textItems:a,subText:t,children:l,...n})})),zc=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>c("div",{className:p("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Ee,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>o(Ee,{size:"text-l",children:e.trim()},String(t)))),a?o(Ee,{color:n,size:"text-m",children:a}):null]}),Ac=d((({className:e,children:t})=>o("div",{className:p("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Dc=["ArrowDownIcon","ArrowUpIcon"],jc=["Подробнее","Скрыть"],Ec=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:jc[Number(e)]}),o(Y,{className:"text-primary-text",name:Dc[Number(e)],width:"16",height:"16"})]}),$c=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:_c(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ee,{size:"text-h4",children:_c(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(Y,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),o(Vc,{color:"green",children:_c(s)})]}),o("div",{className:"hidden sm:block",children:o(Ac,{className:"flex-wrap",children:m?.map(Lc)})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:o(Ac,{className:"flex-wrap",children:m?.map(Lc)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ec({isUnfolded:e,onToggle:t})})]},String(d))},Oc=({address:e="",terminalType:t,atmCode:l=""})=>({header:`${_c(t)} №${l}`,body:e.toUpperCase()}),Lc=(e,t)=>o(Pc,{...e},String(t)),_c=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Fc=[];const Uc=async e=>{const t=await bt(e,{method:"GET"});return Array.isArray(t)?t:Fc},Hc={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Wc={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Kc=d((({data:e,className:t})=>{const[l]=Ss(),n=function(e){const{data:t=Fc}=nn(`/api/v1/atms?regionCode=${e}`,Uc);return t}(l?.code??"000");return o(Ic,{className:t,filterItems:qc,data:n,initFilterState:Hc,renderCard:$c,getBalloon:Oc,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),qc=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Wc[t](e))),l=!n.length||n.some((t=>Wc[t](e)));return t&&l}))},Gc=e=>{const t=Xc(e);return o(Pc,{label:"Режим работы",value:t,className:"max-w-none"})},Yc=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",Xc=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Yc({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Yc({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean)},Jc=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Zc=e=>Jc.map((([t,l,n])=>({key:t,title:n,short:l,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Qc=e=>{if(!e)return null;const t=ed(e);return c(Ac,{className:"border-none",children:[o(Pc,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(td)})}),o(Pc,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]})},ed=e=>{const t=Jc.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},td=({short:e,status:t},l)=>o("div",{className:p("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Ee,{size:"text-xs",children:e})},String(l)),ld=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Pc,{label:"Валюта",value:e.currency}):null,t?o(Pc,{label:"Купить",value:String(t)}):null,l?o(Pc,{label:"Продать",value:String(l)}):null]},String(n)),nd=(new Date).getDay(),ad=e=>{const[t]=e?.slice(nd-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Vc,{color:"green",children:a}):null,l&&i?o(Vc,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(Vc,{color:"red",children:"Выходной"})},id=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",rd=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(Pc,{label:e,value:t&&l?l:"",subText:id({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),sd=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,od=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,cd=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,dd=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=Zc(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ee,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(Y,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),ad(u)]}),o("div",{className:"hidden sm:block",children:md({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:md({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Ec({isUnfolded:e,onToggle:t})})]},String(h))},md=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Zc(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Ac,{className:"flex-wrap",children:[o(Pc,{label:"Факс",value:t}),o(Pc,{label:"Телефон филиала",value:e}),o(Pc,{label:"Для обращений юридических лиц",value:l}),o(Pc,{label:"Обслуживание физических лиц",value:n}),o(Pc,{label:"Для консультаций по валютному контролю",value:i}),o(Pc,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?o(Ac,{children:o(Pc,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(rd)})})}):c(Ac,{children:[o(Pc,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(td)})}),Gc(d)]}),r?.businessScheduleVisibleTag?Qc(r?.businessScheduleDescription):null,s?.currencies?.length?o(Ac,{className:"flex-wrap",children:s?.currencies?.map(ld)}):null]})},hd=({name:e="",address:t="",workSchedule:l})=>{const n=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Zc(e),l=e?Xc(t):"",n=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?sd(l):cd(l,n):od(l):null})(l)}`;return{header:n,body:i}},ud=[];const pd=async e=>{const t=await bt(e,{method:"GET"});return Array.isArray(t)?t:ud},gd={workingSaturday:!1,premiumService:!1,privateBanking:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},xd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday),premiumService:e=>Boolean(e.premiumService),privateBanking:e=>Boolean(e.privateBanking),sellingCoins:e=>Boolean(e.sellingCoins),buyingCoins:e=>Boolean(e.buyingCoins),bullionOperations:e=>Boolean(e.bullionOperations),preciousMetalsOperations:e=>Boolean(e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean(e.transferringDataToBiometricSystem)},fd=d((({className:e})=>{const[t]=Ss(),l=function(e){const{data:t=ud}=nn(`/api/v1/branches?regionCode=${e}`,pd);return t}(t?.code??"000");return o(Ic,{className:e,filterItems:bd,data:l,initFilterState:gd,renderCard:dd,getBalloon:hd,title:`Офисы филиала ${t?.name}`})})),bd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>xd[t](e)))))},yd=d((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return o(x,{version:"transparent",className:p(t),defaultPadding:"p-0",...l,children:"offices"===n?o(fd,{}):o(Kc,{data:e})})})),vd=d((({className:e,title:t,description:l="Блок в разработке...",...n})=>c(x,{className:p("box-border",e),...n,children:[o(B,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(y,{})]}))),Nd=d((({className:e,padding:t,slides:l=[],...n})=>o(x,{className:p("overflow-hidden relative",e),padding:t,...n,children:o(Ni,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(ot,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),wd=d((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:d="primary",...m})=>c(x,{className:p("box-border text-left space-y-s",a),version:d,...m,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ge(r)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ae,{image:r})}):null,s?o(S,{headingType:"h3",as:"h3",title:s}):null]}),c("div",{className:"w-full space-y-m",children:[i?kd(i):null,Cd({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Cd({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Cd({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Ye([n]):null]})]}))),kd=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{__html:e})}),Cd=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(Y,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Ee,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ee,{size:"text-xl",color:n,children:t})]})]}):null,Sd=d((e=>{const{__html:t,richVersion:l,...n}=e;return o(x,{defaultPadding:"p-0",...n,children:o(De,{__html:t,richVersion:l})})})),Td=d((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return c("div",{className:p("order-4",e),role:"radiogroup",children:[o(Ln,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Ln,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Id=d((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),c=s.find((e=>e.key===n));return o(dl,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),Bd=d((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Id,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Id,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Md=["От 1 дня","До 365 дней"],Rd=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ee,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(xn,{min:1,max:365,value:e,items:Md,onChange:t})]}))),Vd=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Id,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Id,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Pd=d((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Bd,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:zd(m)}),o(Rd,{days:a,setDays:e=>m({days:e})}),o(Vd,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Ad(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Td,{}),o(ye,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),zd=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Ad=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Dd=d((({days:e,tariffs:t=[]})=>{const l=Ed(e,t),n="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[jd("Аренда за",e),jd("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(T,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ae,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(T,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),jd=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Ed=(e,t)=>{const l=$d(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},$d=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},Od=(e,t)=>e.find((e=>e.branchCode===t)),Ld=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Od(n,l.selectedBranch),d=_d(s?.safeBoxCaseVolumes),m=Fd(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=Ud(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Pd,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Dd,{days:l.days,tariffs:h})]})})),_d=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Fd=(e,t)=>e?.find((e=>e.volume===t)),Ud=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Hd=[];const Wd=async e=>await bt(e,{method:"GET"})||Hd,Kd=d((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),d=i((()=>s((e=>!e))),[]),[m,h]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=zn(),p=qd(m.selectedRegion,u),g=function(e){const{data:t}=nn(e?`/api/v1/safeboxes?regionCode=${e}`:null,Wd);return t||Hd}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=Od(g,m.selectedBranch)||g,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(x,{className:l,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(S,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Ld,{regions:u,branches:g,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(T,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(xc,{points:b,className:"h-[640px]"}):null]})})),qd=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Gd(e){throw new Error(e)}const Yd={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Xd={normal:"",small:"min-h-6xl"},Jd={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"},Zd=d((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",stepVersion:r="gray",version:s="primary",...d})=>c(x,{className:p("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...d,children:[o(B,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?o("div",{className:"box-border",children:o("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(Qd(i,r))})}):null,Ye(a,{isVertical:!0})]}))),Qd=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return em(e,t)(l,n);case"rte":return o(De,{__html:l.__html});default:Gd(l)}},em=(e,t)=>(l,n)=>o("div",{className:"contents",children:c("div",{className:"flex flex-row items-center relative",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:tm(e,t)(l,n)}),c("div",{className:p("flex flex-col justify-center h-fit",Xd[e]),children:[l.label?o(T,{size:"text-l",align:"text-left",children:l.label}):null,l.description?o("div",{className:p("text-s font-light text-left",Jd.description),children:l.description}):null]})]})},String(n)),tm=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=Yd[e][i?"image":"icon"],s=i?"transparent"===t:t;return o(x,{className:p(r,"z-10 mr-s flex justify-center content-center rounded-md"),defaultPadding:"",version:s,children:o("span",{className:"flex max-w-full max-h-full items-center justify-center",children:Ge(l?.icon)?o(ae,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:lm(e),height:lm(e)}):o("span",{className:p("text-h4","transparent"===t?Jd.iconText:(c=t,"secondary"===c?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var c},lm=e=>"normal"===e?"38":"24",nm=d((({isActive:e,onClick:t})=>c("button",{className:p(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:t,type:"button",children:[o(Y,{className:"w-6 h-6",name:"BurgerIcon",iconVersion:e?"color":"black"}),"Меню"]}))),am=d((({isActive:e,item:t,onClick:l})=>c("div",{className:p(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:l,children:[o(Y,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),im=d((({className:e,onClose:t})=>o("button",{className:p("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(ae,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),rm=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=me(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white p-0 rounded-xl mt-[20%]",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(im,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),sm=({menuRef:e,dialogRef:t,closeDialog:l,openDialog:n,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();n(o(rm,{onClick:e=>e.stopPropagation(),onClose:l,head:o("div",{className:"flex items-center px-xl",children:o(S,{as:"h4",title:c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];const om=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>h.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Gd(e)}}))),[c,d]),l},cm=e=>({href:t})=>!!t&&_(dm(t,e)).startsWith(_(t)),dm=(e,t)=>$(e)?t.href:t.pathname;function mm(e=[]){const t=u(),l=e.findIndex((e=>cm(E.BASE_PATH?{pathname:E.BASE_PATH}:e))(t));return[l,e[l]]}const hm=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=me(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(im,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),um=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const pm=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Ee,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(gm,{...e},String(t))))})]}):null,gm=d((({icon:e,...t})=>{const l=ue(),{text:n,target:a,href:i,onClick:r}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ae,{pathPrefix:"/wcms-resources/",image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),xm=e=>t=>t.name?o(Xr,{isRemote:!0,href:`/branches/${t.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>{e&&e(t)},data:[{aspectName:"mindboxEvent",params:{eventAction:"headerRegionNewSelect",eventCategory:"header",eventValueText:t.name}}],children:o(Ee,{size:"text-l",font:"font-light",children:t.name})},String(t.id)):null,fm=d((({className:e,searchTerm:t,onSearch:l})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),bm=d((({foreignOffices:e,branches:t})=>{const[l,a]=Ss(t?.default),r=ue({isRemote:!0}),{href:s}=r({href:`/branches/${l.slug}`}),[d,m]=n(""),h=vm(zn()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(h,ym),{close:p}=me(),g=i((e=>{a(e),p()}),[]);return c(hm,{className:"pb-20",head:c("div",{children:[o(Ee,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?o("div",{className:"mb-s",children:c(T,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Xr,{isRemote:!0,href:s,className:"inline mx-2xs text-primary-main",children:l.name})]})}):null,o(fm,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&um(e.toLowerCase())(d.toLowerCase())>=.8)).map(xm(g))}):o("div",{className:"columns-1 sm:columns-5",children:Array.from(u.entries()).map((x=g,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ee,{size:"text-h6",children:e})}),t.map(xm(x))]},e)))}),pm(e)]});var x})),ym=e=>e.name?.charAt(0)||"",vm=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Nm=d((({item:e,basePath:t})=>{const l=ue({isRemote:!(!E.BASE_PATH||!t)&&!E.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=u(),s=cm(r)({href:n});return o("div",{className:"mt-3",children:c("a",{className:p(s?"text-primary-main":"text-primary-text","p-4 text-h5 font-light flex justify-between cursor-pointer","shadow-main-black","rounded-xl"),href:n,target:a,onClick:i,children:[e.text,o(ae,{image:{icon:"ArrowRightIcon",iconVersion:"color"},width:"24",height:"24",className:"text-secondary-text opacity-30"})]})})})),wm=({item:e,isActive:t,onClick:l})=>o("div",{className:p("relative rounded-2xl p-2",t?"bg-primary-main":"bg-main-gray"),children:o("button",{type:"button",className:"relative",onClick:l,children:o("span",{className:p("whitespace-nowrap",t?"text-white":""),children:e.text})})}),km=d((e=>{const{topItems:t,branches:l,officesAtms:s}=e,[d]=Ss(l?.default),m=(e=>{const{open:t,close:l}=me();return{open:(l={})=>t(o(bm,{...e}),l),close:l}})(e),[h,u]=Ba({itemCount:t?.length??0}),[p]=mm(t),[g,x]=n(p),f=r((()=>t?.[g]),[t,g]),b=f?.items||[],y=ue();a((()=>{x(p)}),[p]),a((()=>{g>0&&u.scrollTo(g)}),[g,u]);const v=i((e=>x(e)),[]);return o(hm,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center",children:o(S,{as:"h4",title:"Меню"})}),children:c("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[o("div",{className:"w-full mb-3",children:o(ga,{containerRef:h,visibleItemCount:0,gap:10,className:"pb-3",children:t?.map(((e,t)=>o(wm,{item:e,isActive:g===t,onClick:()=>v(t)},String(t))))})}),c("div",{className:"relative grow",children:[Cm(b,f?.href),s?.href?Sm(y)(s):null,Tm(d,(()=>m.open()))]})]})})})),Cm=(e,t)=>e?o("div",{children:e.map(((e,l)=>o(Nm,{item:e,basePath:t},String(l))))}):null,Sm=e=>t=>{const{href:l,target:n,onClick:a}=e(t);return o("div",{className:"mt-3",children:c("a",{className:p("text-primary-text","p-4 text-h5 font-light flex justify-between cursor-pointer","shadow-main-black","rounded-xl"),href:l,target:n,onClick:a,rel:"noopener noreferrer","aria-label":"Отделения и банкоматы",...pe(t?.data),children:[o("span",{children:"Офисы и банкоматы"}),o(ae,{image:{icon:"ArrowRightIcon",iconVersion:"color"},width:"24",height:"24",className:"text-secondary-text opacity-30"})]})})},Tm=(e,t)=>c("div",{className:p("text-primary-text","p-4 text-h5 font-light flex justify-between cursor-pointer","shadow-main-black","rounded-xl","mt-3"),onClick:t,children:[o("div",{className:"flex flex-col items-start",children:c("span",{children:["Ваша локация - ",e.name]})}),o(ae,{image:{icon:"ArrowRightIcon",iconVersion:"color"},width:"24",height:"24",className:"text-secondary-text opacity-30"})]}),Im="burgerMenuDialog",Bm=e=>{const{open:t,closeAll:l,close:n}=me(),a=om(),i=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Im,a);return[i,{close:n,toggle:()=>{i?l():t(o(km,{...e}),{id:Im})},openDialog:t}]},Mm=[],Rm=St((({sticky:e,...t})=>{const{menuItems:l=Mm}=e??{},[a,{toggle:r,close:d,openDialog:m}]=Bm(t.options?.page?.sitemap??{}),h=Math.floor(l.length/2),u=l.slice(0,h),p=l.slice(h),[g,f]=n(-1),[b,y]=n(""),v=i((()=>{f(-1),y(""),d()}),[d]),N=s(null),w=rl(v),[{openBottomMenuItemDialog:k}]=sm({menuRef:N,dialogRef:w,closeDialog:v,openDialog:m,leftItems:u,rightItems:p}),C=i((e=>{v(),e.stopPropagation(),r()}),[v,r]),S=i(((e,t)=>{y(t),f(e),d(),k(e,t)}),[d,k]);return o(x,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[u.map(Vm(S,"left",{activeIndex:g,currentItemPosition:b})),o(nm,{isActive:a,onClick:e=>C(e)}),p.map(Vm(S,"right",{activeIndex:g,currentItemPosition:b}))]})})})),Vm=(e,t,l)=>(n,a,i)=>o(am,{item:n,isActive:i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t,onClick:r=>{i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t||r.stopPropagation(),e(a,t)}},n.title||String(a)),Pm="hidden sm:flex absolute z-40 top-0",zm=d((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Ba({itemCount:t?.length||0});return c("div",{className:p("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[o(ga,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(ac(l,n,a))}),r.canScrollLeft?o(Ra,{className:p("left-6",Pm),onClick:r.scrollLeft}):null,r.canScrollRight?o(Va,{className:p("right-6",Pm),onClick:r.scrollRight}):null]})})),Am=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return o(ic,{...t});case"centered":return o("div",{className:"flex",children:o(ic,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return o("div",{className:"flex",children:o(zm,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Dm="tab",jm=d((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...c})=>{const d=u(),{isReady:m}=d,g=r((()=>l.map($m)),[l]),[f,b]=n(0);a((()=>{if(!l||!l[0])return;const e=d.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===d.query.tab))||0,t=l[e]||l[0];b(e),Em(t)}),[m]),a((()=>{const e=l[f];"group"===e?.type&&h.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,f]);const y=i((e=>{const t=g.indexOf(e),n=l[t];b(t),Em(n),"group"===n.type&&(e=>{const t=new URLSearchParams(d.query);e.name?t.set(Dm,e.name):t.delete(Dm),d.replace(`${d.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,g]);return o(x,{className:p(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...c,children:Am({items:g,value:g[f],tabsMode:s,onChange:y})})})),Em=e=>{"group"===e.type&&h.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&h.fire("tab",{type:e.type,label:e.href})},$m=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,Om={start:"text-start",center:"text-center",end:"text-end"},Lm=d((({tab:e,className:t,onClick:l,isActive:n})=>{const a=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white text-primary-text"),title:e?"mb-xs text-xl":"mb-2xs text-l",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal"}))(n);return c("button",{type:"button",onClick:l,"aria-label":e?.title,className:p("border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs",a.btn,t),...pe(e?.data),children:[e?.icon?o(ae,{className:p("h-6 w-6 min-w-6 min-h-6",a.icon),image:{...e?.icon,iconVersion:e?.icon?.iconVersion??a.iconVersion},width:"24",height:"24"}):null,c("div",{className:"border-0",children:[e?.title?o("div",{className:a.title,children:e.title}):null,e?.description?o("div",{className:a.desc,children:e.description}):null]})]})}));function _m(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const Fm=d((({tab:e})=>{const t=ue(),{onClick:l}=t({...e,onClick:()=>{e.href&&!O(e.href)&&(globalThis.location.href=e.href)}});return _m(l,[],800),o(y,{className:"col-span-12 p-xl",size:5})})),Um=St((({className:e="",tabs:t=[],block:l,tabAlign:a,...i})=>{const[r,s]=n(Wm(t)),d=Hm(t[r],r),m=t.length,[h,{inc:u,dec:g}]=da({itemCount:m},r),[f,b]=Ba({itemCount:m});return c(x,{className:p(e),defaultPadding:"p-0",...i,children:[c("div",{className:"relative border-b-8 border-primary-main",children:[o(ga,{itemClassName:"flex",containerRef:f,snapAlign:"snap-end",gap:8,onVisibleIndicesChange:b.handleVisibleIndicesChange,children:t.map(Km(r,s,a))}),o(Aa,{scroll:b,arrowsPadded:!0,onScrollLeft:g,onScrollRight:u,activeIndex:h,itemCount:m})]}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:t[r]?.href?o(Fm,{tab:t[r]}):z(l?.slots?.[d],{...i?.options,key:`${d}-${l?.type}`,slotName:d,parent:l})})]})}),{slots:({tabs:e})=>e?.filter((e=>!e.href)).map(Hm)||[],childrenTypes:{exclude:["TabsLayout"]}}),Hm=(e,t)=>e?.title||`Слот №${t}`,Wm=e=>e.reduce(((e,t,l)=>t.selected?l:e),0),Km=(e,t,l="start")=>(n,a)=>o(Lm,{className:Om[l],tab:n,isActive:e===a,onClick:()=>t(a)},String(a)),qm={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Gm=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:qm[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),Ym=d((({className:e="",isOpen:t,onClick:l})=>o(ye,{className:e,appendRight:o(ae,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),Xm={Buttons:({buttons:e})=>Ye(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ae,{image:e}):null,List:({isDotted:e,...t})=>o(tt,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Ee,{size:"text-h6",children:e})}):null,t?o("div",{children:o(Ee,{size:"text-l",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?o(Ym,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},Jm=d((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return Zm({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Zm=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in Xm))return null;return o(Xm[l],{...t,...n})},Qm=d((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Jm,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),eh=(e,t)=>140*Pe(e.slice(0,t).map((e=>e?.cols?.length??1))),th=(e,t)=>e?.length>0?o("div",{className:p("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Ee,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,lh=d((({rows:e})=>{return o(ga,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=p("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Ee,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${eh(a,t)}px)`},children:a?.map(((e,l)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ee,{size:"text-xl",children:e.data}):null,e?.cols?th(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),nh=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Ee,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(lh,{rows:t.rowsData})})})]},n)}))}))),ah=(e=!1)=>""+(e?"text-white":"text-secondary-text"),ih=d((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:p("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:o(Ee,{size:"text-xl",font:"font-light",color:ah(t===l),children:e||t+1})},e)))}):null,t?o(ye,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(Y,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function rh(e){const t=await fetch(e);return await t.json()}const sh=d((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=nn(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),rh);return t||{}}(e),[r,s]=n(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(ih,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(nh,{activeTabIndex:r,items:m}),o(Ym,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ee,{size:"text-h6",children:"Данных нет"}),o(Ym,{onClick:l,isOpen:!0})]})})),oh=d((({children:e,tableInner:t,onHideContentClick:l})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:p("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(sh,{...t,onClick:l})}):null]}))),ch=d((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,d]=n(void 0),m=i((e=>d(e)),[]),[h,u]=n(void 0),g=i((e=>u(e)),[]);return c(oh,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:p("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ae,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Gm,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Qm,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function dh({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(Ma,{className:p("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(Ma,{className:p("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const mh=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return c("div",{role:"table",children:[c("div",{className:"relative space-y-xs",children:[e,dh({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),hh=d((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],d=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,u]=da({itemCount:m,visibleItemCount:2}),g=(d||[]).map(((e,t)=>o(ch,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[f,b]=i>0?[g.slice(0,-i),g.slice(-i)]:[g,[]];return c(x,{className:p("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(B,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m",children:i>0?o(Xa,{renderFoldableSection:({isUnfolded:e})=>c(mh,{controls:u,children:[f,o(Ja,{isUnfolded:e,children:b})]}),renderFoldButton:Ya}):o(mh,{controls:u,children:g})})]})})),uh=d((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>c(x,{className:p("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?ph():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ee,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?gh(l):null,a?o(De,{__html:a}):null]})]}))),ph=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),gh=e=>o(T,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),xh=d((({prefix:e,unit:t,suffix:l})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Ee,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?o("div",{className:"gradient-color-text",children:o(Ee,{size:"text-h2",children:l})}):null]}))),fh=d((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return o(x,{defaultPadding:"p-0",...a,children:o(xh,{prefix:t,unit:l,suffix:n})})})),bh={AdTile:It,ApplicationFormCustom:na,BankAccountFiltration:gi,BenefitsBlock:yi,BonusBenefitsBlock:ki,ButtonsBlock:Si,Calculator:kr,CalculatorBonus:Vr,CardTransfer:Er,Carousel:Ha,CarouselBankHistoryCard:$r,CarouselCard:_r,CarouselCatalogCard:Ur,CarouselLinks:Gr,CarouselRecommendationCard:Qr,CarouselTariffsCard:ls,ComparisonTable:us,DepositFiltration:ys,ErrorBlock:ks,ExchangeRateTile:Xs,Footer:go,Header:Io,Headline:B,HorizontalLayout:Vo,ImgBlock:Po,LinkDocs:Eo,MobileAppTile:Lo,MortgageFiltration:sc,OfficesAtmsMap:yd,Placeholder:vd,ProductBlock:Tt,ProductGallery:Nd,RepresentativeOfficeInfo:wd,RichTextBlock:Sd,RollupItem:eo,SafeDepositRental:Kd,StepsBlock:Zd,StickyBottomMenu:Rm,Tabs:jm,TabsLayout:Um,TariffsTable:hh,TextBlock:uh,UnitBlock:fh,VerticalLayout:Ro},yh=he((()=>{a((()=>{Et()}),[]);const e=_t();il(globalThis,"click",(e=>t=>{const l=t.target?.closest("[data-aspects]");try{const n=JSON.parse(l?.dataset?.aspects??"[]");Dt({aspectsAttributes:n,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),vh="cookie",Nh=d((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=el();_m((()=>{globalThis.localStorage?.getItem(vh)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(vh,"true"),a()}),[]);return l?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:c(T,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",o(Xr,{isRemote:!0,className:wh(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",o(Xr,{isRemote:!0,className:wh(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),o("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:o(im,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),wh=e=>p("inline mx-2xs",e?"text-green-dark":""),kh=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=om({onCloseAll:e,onClose:t}),{close:n}=me(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return il(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>o("div",{className:p("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Ch=d((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>h.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Gd(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return il(globalThis.document,"keydown",r),e?o("div",{className:p("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Sh="header",Th="footer",Ih="sticky-footer",Bh={},Mh=d((({className:e,data:t=Bh,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=Ct(s,r);yh();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:l,blockDecorator:n,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:p("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:z(a?.header,{...m,slotName:Sh})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[A({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),z(a?.footer,{...m,slotName:Th})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:z(a?.["sticky-footer"],{...m,slotName:Ih})}):null,o(kh,{}),o(Ch,{}),o(Nh,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Object.assign(Mh,{childrenTypes:[],slots:()=>[Sh,Th,Ih]});e.Blocks=bh,e.ContentPage=Mh,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=he,e.joinList=ni,e.packageVersion="0.14.293",e.projectSettings=E,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=U,e.useRouter=u,Object.defineProperty(e,"__esModule",{value:!0})}));