@redneckz/wildless-cms-uni-blocks 0.3.11 → 0.3.12

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 (356) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +153 -75
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/cosmos-static/icons/GpsIcon.svg +1 -0
  5. package/dist/components/BaseTile/BaseTile.js +1 -1
  6. package/dist/components/BaseTile/BaseTile.js.map +1 -1
  7. package/dist/components/Blocks.d.ts +1 -0
  8. package/dist/components/Blocks.js +2 -0
  9. package/dist/components/Blocks.js.map +1 -1
  10. package/dist/components/ContentPage/ContentPageContext.d.ts +1 -1
  11. package/dist/components/CreditCalculator/CreditCalculator.d.ts +2 -2
  12. package/dist/components/CreditCalculator/CreditCalculator.js +18 -22
  13. package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
  14. package/dist/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
  15. package/dist/components/CreditCalculator/getCreditRate.d.ts +1 -1
  16. package/dist/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
  17. package/dist/components/CreditCalculator/getDefaultMonths.js +8 -0
  18. package/dist/components/CreditCalculator/getDefaultMonths.js.map +1 -0
  19. package/dist/components/CreditCalculator/getDefaultSum.d.ts +2 -0
  20. package/dist/components/CreditCalculator/getDefaultSum.js +8 -0
  21. package/dist/components/CreditCalculator/getDefaultSum.js.map +1 -0
  22. package/dist/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
  23. package/dist/components/CreditCalculator/renderButton.d.ts +1 -0
  24. package/dist/components/CreditCalculator/renderButton.js +8 -0
  25. package/dist/components/CreditCalculator/renderButton.js.map +1 -0
  26. package/dist/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
  27. package/dist/components/CreditCalculator/renderMonthsInput.js +11 -0
  28. package/dist/components/CreditCalculator/renderMonthsInput.js.map +1 -0
  29. package/dist/components/CreditCalculator/renderProposal.d.ts +1 -0
  30. package/dist/components/CreditCalculator/renderProposal.js +9 -0
  31. package/dist/components/CreditCalculator/renderProposal.js.map +1 -0
  32. package/dist/components/CreditCalculator/renderTermsButton.d.ts +1 -0
  33. package/dist/components/CreditCalculator/renderTermsButton.js +9 -0
  34. package/dist/components/CreditCalculator/renderTermsButton.js.map +1 -0
  35. package/dist/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
  36. package/dist/components/CreditCalculator/renderWantedSumInput.js +18 -0
  37. package/dist/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
  38. package/dist/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
  39. package/dist/components/ExchangeRateTile/CurrencyTable.js +19 -0
  40. package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
  41. package/dist/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
  42. package/dist/components/ExchangeRateTile/CurrentLocation.js +7 -0
  43. package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
  44. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
  45. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -0
  46. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
  47. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
  48. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  49. package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
  50. package/dist/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
  51. package/dist/components/ExchangeRateTile/formatCurrency.js +6 -0
  52. package/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -0
  53. package/dist/hooks/useCreditCalculatorData.js +3 -3
  54. package/dist/hooks/useCreditCalculatorData.js.map +1 -1
  55. package/dist/hooks/useExchangeRates.d.ts +9 -0
  56. package/dist/hooks/useExchangeRates.js +18 -0
  57. package/dist/hooks/useExchangeRates.js.map +1 -0
  58. package/dist/icons/IconName.d.ts +3 -2
  59. package/dist/icons/IconName.js +1 -0
  60. package/dist/icons/IconName.js.map +1 -1
  61. package/dist/model/InputTypes.d.ts +1 -0
  62. package/dist/model/InputTypes.js +2 -0
  63. package/dist/model/InputTypes.js.map +1 -0
  64. package/dist/setup-fixture.js +1 -1
  65. package/dist/setup-fixture.js.map +1 -1
  66. package/dist/ui-kit/Input/Input.d.ts +2 -0
  67. package/dist/ui-kit/Input/Input.js +8 -0
  68. package/dist/ui-kit/Input/Input.js.map +1 -0
  69. package/dist/ui-kit/Input/InputProps.d.ts +8 -0
  70. package/dist/ui-kit/Input/InputProps.js +2 -0
  71. package/dist/ui-kit/Input/InputProps.js.map +1 -0
  72. package/dist/ui-kit/Select/Select.d.ts +6 -0
  73. package/dist/ui-kit/Select/Select.js +8 -0
  74. package/dist/ui-kit/Select/Select.js.map +1 -0
  75. package/dist/ui-kit/Select/SelectOption.d.ts +5 -0
  76. package/dist/ui-kit/Select/SelectOption.js +8 -0
  77. package/dist/ui-kit/Select/SelectOption.js.map +1 -0
  78. package/lib/common.css +1 -1
  79. package/lib/components/BaseTile/BaseTile.js +1 -1
  80. package/lib/components/BaseTile/BaseTile.js.map +1 -1
  81. package/lib/components/Blocks.d.ts +1 -0
  82. package/lib/components/Blocks.js +2 -0
  83. package/lib/components/Blocks.js.map +1 -1
  84. package/lib/components/ContentPage/ContentPageContext.d.ts +1 -1
  85. package/lib/components/CreditCalculator/CreditCalculator.d.ts +2 -2
  86. package/lib/components/CreditCalculator/CreditCalculator.js +19 -23
  87. package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
  88. package/lib/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
  89. package/lib/components/CreditCalculator/getCreditRate.d.ts +1 -1
  90. package/lib/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
  91. package/lib/components/CreditCalculator/getDefaultMonths.js +5 -0
  92. package/lib/components/CreditCalculator/getDefaultMonths.js.map +1 -0
  93. package/lib/components/CreditCalculator/getDefaultSum.d.ts +2 -0
  94. package/lib/components/CreditCalculator/getDefaultSum.js +5 -0
  95. package/lib/components/CreditCalculator/getDefaultSum.js.map +1 -0
  96. package/lib/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
  97. package/lib/components/CreditCalculator/renderButton.d.ts +1 -0
  98. package/lib/components/CreditCalculator/renderButton.js +5 -0
  99. package/lib/components/CreditCalculator/renderButton.js.map +1 -0
  100. package/lib/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
  101. package/lib/components/CreditCalculator/renderMonthsInput.js +8 -0
  102. package/lib/components/CreditCalculator/renderMonthsInput.js.map +1 -0
  103. package/lib/components/CreditCalculator/renderProposal.d.ts +1 -0
  104. package/lib/components/CreditCalculator/renderProposal.js +6 -0
  105. package/lib/components/CreditCalculator/renderProposal.js.map +1 -0
  106. package/lib/components/CreditCalculator/renderTermsButton.d.ts +1 -0
  107. package/lib/components/CreditCalculator/renderTermsButton.js +6 -0
  108. package/lib/components/CreditCalculator/renderTermsButton.js.map +1 -0
  109. package/lib/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
  110. package/lib/components/CreditCalculator/renderWantedSumInput.js +15 -0
  111. package/lib/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
  112. package/lib/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
  113. package/lib/components/ExchangeRateTile/CurrencyTable.js +17 -0
  114. package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
  115. package/lib/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
  116. package/lib/components/ExchangeRateTile/CurrentLocation.js +5 -0
  117. package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
  118. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
  119. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +13 -0
  120. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
  121. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
  122. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  123. package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
  124. package/lib/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
  125. package/lib/components/ExchangeRateTile/formatCurrency.js +3 -0
  126. package/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -0
  127. package/lib/hooks/useCreditCalculatorData.js +3 -3
  128. package/lib/hooks/useCreditCalculatorData.js.map +1 -1
  129. package/lib/hooks/useExchangeRates.d.ts +9 -0
  130. package/lib/hooks/useExchangeRates.js +15 -0
  131. package/lib/hooks/useExchangeRates.js.map +1 -0
  132. package/lib/icons/IconName.d.ts +3 -2
  133. package/lib/icons/IconName.js +1 -0
  134. package/lib/icons/IconName.js.map +1 -1
  135. package/lib/model/InputTypes.d.ts +1 -0
  136. package/lib/model/InputTypes.js +2 -0
  137. package/lib/model/InputTypes.js.map +1 -0
  138. package/lib/setup-fixture.js +1 -1
  139. package/lib/setup-fixture.js.map +1 -1
  140. package/lib/ui-kit/Input/Input.d.ts +2 -0
  141. package/lib/ui-kit/Input/Input.js +6 -0
  142. package/lib/ui-kit/Input/Input.js.map +1 -0
  143. package/lib/ui-kit/Input/InputProps.d.ts +8 -0
  144. package/lib/ui-kit/Input/InputProps.js +2 -0
  145. package/lib/ui-kit/Input/InputProps.js.map +1 -0
  146. package/lib/ui-kit/Select/Select.d.ts +6 -0
  147. package/lib/ui-kit/Select/Select.js +6 -0
  148. package/lib/ui-kit/Select/Select.js.map +1 -0
  149. package/lib/ui-kit/Select/SelectOption.d.ts +5 -0
  150. package/lib/ui-kit/Select/SelectOption.js +6 -0
  151. package/lib/ui-kit/Select/SelectOption.js.map +1 -0
  152. package/mobile/bundle/bundle.umd.js +69 -21
  153. package/mobile/bundle/bundle.umd.min.js +1 -1
  154. package/mobile/dist/components/BaseTile/BaseTile.js +1 -1
  155. package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
  156. package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +1 -1
  157. package/mobile/dist/components/CreditCalculator/CreditCalculator.d.ts +2 -2
  158. package/mobile/dist/components/CreditCalculator/CreditCalculator.js +18 -22
  159. package/mobile/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
  160. package/mobile/dist/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
  161. package/mobile/dist/components/CreditCalculator/getCreditRate.d.ts +1 -1
  162. package/mobile/dist/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
  163. package/mobile/dist/components/CreditCalculator/getDefaultMonths.js +8 -0
  164. package/mobile/dist/components/CreditCalculator/getDefaultMonths.js.map +1 -0
  165. package/mobile/dist/components/CreditCalculator/getDefaultSum.d.ts +2 -0
  166. package/mobile/dist/components/CreditCalculator/getDefaultSum.js +8 -0
  167. package/mobile/dist/components/CreditCalculator/getDefaultSum.js.map +1 -0
  168. package/mobile/dist/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
  169. package/mobile/dist/components/CreditCalculator/renderButton.d.ts +1 -0
  170. package/mobile/dist/components/CreditCalculator/renderButton.js +8 -0
  171. package/mobile/dist/components/CreditCalculator/renderButton.js.map +1 -0
  172. package/mobile/dist/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
  173. package/mobile/dist/components/CreditCalculator/renderMonthsInput.js +11 -0
  174. package/mobile/dist/components/CreditCalculator/renderMonthsInput.js.map +1 -0
  175. package/mobile/dist/components/CreditCalculator/renderProposal.d.ts +1 -0
  176. package/mobile/dist/components/CreditCalculator/renderProposal.js +9 -0
  177. package/mobile/dist/components/CreditCalculator/renderProposal.js.map +1 -0
  178. package/mobile/dist/components/CreditCalculator/renderTermsButton.d.ts +1 -0
  179. package/mobile/dist/components/CreditCalculator/renderTermsButton.js +9 -0
  180. package/mobile/dist/components/CreditCalculator/renderTermsButton.js.map +1 -0
  181. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
  182. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.js +18 -0
  183. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
  184. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
  185. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +19 -0
  186. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
  187. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
  188. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +7 -0
  189. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
  190. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
  191. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -0
  192. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
  193. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
  194. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  195. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
  196. package/mobile/dist/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
  197. package/mobile/dist/components/ExchangeRateTile/formatCurrency.js +6 -0
  198. package/mobile/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -0
  199. package/mobile/dist/hooks/useCreditCalculatorData.js +3 -3
  200. package/mobile/dist/hooks/useCreditCalculatorData.js.map +1 -1
  201. package/mobile/dist/hooks/useExchangeRates.d.ts +9 -0
  202. package/mobile/dist/hooks/useExchangeRates.js +18 -0
  203. package/mobile/dist/hooks/useExchangeRates.js.map +1 -0
  204. package/mobile/dist/icons/IconName.d.ts +3 -2
  205. package/mobile/dist/icons/IconName.js +1 -0
  206. package/mobile/dist/icons/IconName.js.map +1 -1
  207. package/mobile/dist/model/InputTypes.d.ts +1 -0
  208. package/mobile/dist/model/InputTypes.js +2 -0
  209. package/mobile/dist/model/InputTypes.js.map +1 -0
  210. package/mobile/dist/setup-fixture.js +1 -1
  211. package/mobile/dist/setup-fixture.js.map +1 -1
  212. package/mobile/dist/ui-kit/Input/Input.d.ts +2 -0
  213. package/mobile/dist/ui-kit/Input/Input.js +8 -0
  214. package/mobile/dist/ui-kit/Input/Input.js.map +1 -0
  215. package/mobile/dist/ui-kit/Input/InputProps.d.ts +8 -0
  216. package/mobile/dist/ui-kit/Input/InputProps.js +2 -0
  217. package/mobile/dist/ui-kit/Input/InputProps.js.map +1 -0
  218. package/mobile/dist/ui-kit/Select/Select.d.ts +6 -0
  219. package/mobile/dist/ui-kit/Select/Select.js +8 -0
  220. package/mobile/dist/ui-kit/Select/Select.js.map +1 -0
  221. package/mobile/dist/ui-kit/Select/SelectOption.d.ts +5 -0
  222. package/mobile/dist/ui-kit/Select/SelectOption.js +8 -0
  223. package/mobile/dist/ui-kit/Select/SelectOption.js.map +1 -0
  224. package/mobile/lib/components/BaseTile/BaseTile.js +1 -1
  225. package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
  226. package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +1 -1
  227. package/mobile/lib/components/CreditCalculator/CreditCalculator.d.ts +2 -2
  228. package/mobile/lib/components/CreditCalculator/CreditCalculator.js +19 -23
  229. package/mobile/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
  230. package/mobile/lib/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
  231. package/mobile/lib/components/CreditCalculator/getCreditRate.d.ts +1 -1
  232. package/mobile/lib/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
  233. package/mobile/lib/components/CreditCalculator/getDefaultMonths.js +5 -0
  234. package/mobile/lib/components/CreditCalculator/getDefaultMonths.js.map +1 -0
  235. package/mobile/lib/components/CreditCalculator/getDefaultSum.d.ts +2 -0
  236. package/mobile/lib/components/CreditCalculator/getDefaultSum.js +5 -0
  237. package/mobile/lib/components/CreditCalculator/getDefaultSum.js.map +1 -0
  238. package/mobile/lib/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
  239. package/mobile/lib/components/CreditCalculator/renderButton.d.ts +1 -0
  240. package/mobile/lib/components/CreditCalculator/renderButton.js +5 -0
  241. package/mobile/lib/components/CreditCalculator/renderButton.js.map +1 -0
  242. package/mobile/lib/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
  243. package/mobile/lib/components/CreditCalculator/renderMonthsInput.js +8 -0
  244. package/mobile/lib/components/CreditCalculator/renderMonthsInput.js.map +1 -0
  245. package/mobile/lib/components/CreditCalculator/renderProposal.d.ts +1 -0
  246. package/mobile/lib/components/CreditCalculator/renderProposal.js +6 -0
  247. package/mobile/lib/components/CreditCalculator/renderProposal.js.map +1 -0
  248. package/mobile/lib/components/CreditCalculator/renderTermsButton.d.ts +1 -0
  249. package/mobile/lib/components/CreditCalculator/renderTermsButton.js +6 -0
  250. package/mobile/lib/components/CreditCalculator/renderTermsButton.js.map +1 -0
  251. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
  252. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.js +15 -0
  253. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
  254. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
  255. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +17 -0
  256. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
  257. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
  258. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +5 -0
  259. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
  260. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
  261. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +13 -0
  262. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
  263. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
  264. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  265. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
  266. package/mobile/lib/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
  267. package/mobile/lib/components/ExchangeRateTile/formatCurrency.js +3 -0
  268. package/mobile/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -0
  269. package/mobile/lib/hooks/useCreditCalculatorData.js +3 -3
  270. package/mobile/lib/hooks/useCreditCalculatorData.js.map +1 -1
  271. package/mobile/lib/hooks/useExchangeRates.d.ts +9 -0
  272. package/mobile/lib/hooks/useExchangeRates.js +15 -0
  273. package/mobile/lib/hooks/useExchangeRates.js.map +1 -0
  274. package/mobile/lib/icons/IconName.d.ts +3 -2
  275. package/mobile/lib/icons/IconName.js +1 -0
  276. package/mobile/lib/icons/IconName.js.map +1 -1
  277. package/mobile/lib/model/InputTypes.d.ts +1 -0
  278. package/mobile/lib/model/InputTypes.js +2 -0
  279. package/mobile/lib/model/InputTypes.js.map +1 -0
  280. package/mobile/lib/setup-fixture.js +1 -1
  281. package/mobile/lib/setup-fixture.js.map +1 -1
  282. package/mobile/lib/ui-kit/Input/Input.d.ts +2 -0
  283. package/mobile/lib/ui-kit/Input/Input.js +6 -0
  284. package/mobile/lib/ui-kit/Input/Input.js.map +1 -0
  285. package/mobile/lib/ui-kit/Input/InputProps.d.ts +8 -0
  286. package/mobile/lib/ui-kit/Input/InputProps.js +2 -0
  287. package/mobile/lib/ui-kit/Input/InputProps.js.map +1 -0
  288. package/mobile/lib/ui-kit/Select/Select.d.ts +6 -0
  289. package/mobile/lib/ui-kit/Select/Select.js +6 -0
  290. package/mobile/lib/ui-kit/Select/Select.js.map +1 -0
  291. package/mobile/lib/ui-kit/Select/SelectOption.d.ts +5 -0
  292. package/mobile/lib/ui-kit/Select/SelectOption.js +6 -0
  293. package/mobile/lib/ui-kit/Select/SelectOption.js.map +1 -0
  294. package/mobile/src/common.css +12 -0
  295. package/mobile/src/components/BaseTile/BaseTile.tsx +1 -1
  296. package/mobile/src/components/ContentPage/ContentPageContext.tsx +1 -1
  297. package/mobile/src/components/CreditCalculator/CreditCalculator.tsx +26 -87
  298. package/mobile/src/components/CreditCalculator/getCalculatorParams.ts +1 -1
  299. package/mobile/src/components/CreditCalculator/getCreditRate.ts +1 -1
  300. package/mobile/src/components/CreditCalculator/getDefaultMonths.ts +7 -0
  301. package/mobile/src/components/CreditCalculator/getDefaultSum.ts +7 -0
  302. package/mobile/src/components/CreditCalculator/getMonthlyPayment.ts +1 -1
  303. package/mobile/src/components/CreditCalculator/renderButton.tsx +13 -0
  304. package/mobile/src/components/CreditCalculator/renderMonthsInput.tsx +29 -0
  305. package/mobile/src/components/CreditCalculator/renderProposal.tsx +13 -0
  306. package/mobile/src/components/CreditCalculator/renderTermsButton.tsx +16 -0
  307. package/mobile/src/components/CreditCalculator/renderWantedSumInput.tsx +36 -0
  308. package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +47 -0
  309. package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +22 -0
  310. package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +47 -0
  311. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +48 -79
  312. package/mobile/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +11 -0
  313. package/mobile/src/components/ExchangeRateTile/formatCurrency.ts +3 -0
  314. package/mobile/src/hooks/useCreditCalculatorData.ts +3 -7
  315. package/mobile/src/hooks/useExchangeRates.ts +25 -0
  316. package/mobile/src/icons/GpsIcon.svg +8 -0
  317. package/mobile/src/icons/IconName.ts +3 -3
  318. package/mobile/src/model/InputTypes.ts +1 -0
  319. package/mobile/src/setup-fixture.ts +1 -1
  320. package/mobile/src/ui-kit/Input/Input.tsx +8 -0
  321. package/mobile/src/ui-kit/Input/InputProps.ts +9 -0
  322. package/mobile/src/ui-kit/Select/Select.tsx +15 -0
  323. package/mobile/src/ui-kit/Select/SelectOption.tsx +14 -0
  324. package/package.json +1 -1
  325. package/src/common.css +12 -0
  326. package/src/components/BaseTile/BaseTile.tsx +1 -1
  327. package/src/components/Blocks.ts +2 -0
  328. package/src/components/ContentPage/ContentPageContext.tsx +1 -1
  329. package/src/components/CreditCalculator/CreditCalculator.tsx +26 -87
  330. package/src/components/CreditCalculator/getCalculatorParams.ts +1 -1
  331. package/src/components/CreditCalculator/getCreditRate.ts +1 -1
  332. package/src/components/CreditCalculator/getDefaultMonths.ts +7 -0
  333. package/src/components/CreditCalculator/getDefaultSum.ts +7 -0
  334. package/src/components/CreditCalculator/getMonthlyPayment.ts +1 -1
  335. package/src/components/CreditCalculator/renderButton.tsx +13 -0
  336. package/src/components/CreditCalculator/renderMonthsInput.tsx +29 -0
  337. package/src/components/CreditCalculator/renderProposal.tsx +13 -0
  338. package/src/components/CreditCalculator/renderTermsButton.tsx +16 -0
  339. package/src/components/CreditCalculator/renderWantedSumInput.tsx +36 -0
  340. package/src/components/ExchangeRateTile/CurrencyTable.tsx +47 -0
  341. package/src/components/ExchangeRateTile/CurrentLocation.tsx +22 -0
  342. package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +47 -0
  343. package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
  344. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +48 -79
  345. package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +11 -0
  346. package/src/components/ExchangeRateTile/formatCurrency.ts +3 -0
  347. package/src/hooks/useCreditCalculatorData.ts +3 -7
  348. package/src/hooks/useExchangeRates.ts +25 -0
  349. package/src/icons/GpsIcon.svg +8 -0
  350. package/src/icons/IconName.ts +3 -3
  351. package/src/model/InputTypes.ts +1 -0
  352. package/src/setup-fixture.ts +1 -1
  353. package/src/ui-kit/Input/Input.tsx +8 -0
  354. package/src/ui-kit/Input/InputProps.ts +9 -0
  355. package/src/ui-kit/Select/Select.tsx +15 -0
  356. package/src/ui-kit/Select/SelectOption.tsx +14 -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).UniBlocks={})}(this,(function(e){"use strict";const t=(e,r)=>{t._jsx=e,t._jsxs=r||e};t.vue=e=>{t(((t,{children:r,dangerouslySetInnerHTML:a,...n}={})=>{const i=Object.assign({},n,a?{innerHTML:a.__html}:{});return e(t,i,"string"!=typeof t?()=>r:r)}))};const r=(...e)=>t._jsx(...e),a=(...e)=>t._jsxs(...e),n=e=>(e._tmpl||(e._tmpl=function(t,r){const{children:a,...n}=t||{},i=r?.slots?.default,l=a||i&&i();return e(Object.assign(n,l&&{children:l}),r)},e._tmpl.inheritAttrs=!1),e._tmpl);const i="likesToken";const l={h1:"text-title-lg tracking-[-0.3px]",h2:"text-title",h3:"text-title-sm",h4:"text-title-xs",h5:"text-title-2xs tracking-[0.2px]",h6:"text-title-2xs tracking-[0.2px]"},s=n((e=>{const{className:t,headingType:a,title:n}=e;if(!a)return;return r(a,{className:`font-sans font-medium m-0 ${l[a]} ${t||""}`,children:n})})),o=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ENABLE_ASSIST(){return this._.ENABLE_ASSIST}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}},c={none:"",primary:"text-primary-main"},m=n((({className:e="",name:t,alt:n=`Icon ${t}`,title:i=n,asSVG:l,color:s="primary",...m})=>{const d=`${o.CDN||""}icons/${t}.svg`;return l?a("svg",{className:`${c[s]} ${e}`,...m,"aria-hidden":"true",children:[i?r("title",{children:i}):null,n?r("desc",{children:n}):null,r("use",{href:`${d}#icon`,xlinkHref:`${d}#icon`})]}):r("img",{className:e,src:d,alt:n,title:i,...m,"aria-hidden":"true"})})),d={left:"text-left",center:"text-center",right:"text-right"},h=n((({bgColor:e="transparent",align:t="left",className:n="",title:i,description:l})=>{const o=d[t];return a("section",{className:`p-[50px] ${e} ${n}`,children:[i&&r(s,{headingType:"h2",className:`text-primary-text ${o}`,title:i}),l&&r("p",{className:`font-normal text-base mt-4 ${o}`,children:l})]})})),x=n((({className:e,iconClassName:t,textClassName:n,suffixClassName:i,doc:l,icon:s})=>{const{text:o,fileSize:c,...d}=l;return a("a",{className:e,role:"link",...d,children:[s?r(m,{className:t,name:s,width:"24px",height:"24px",asSVG:!0}):null,o?a("span",{className:n,children:[o,r("span",{className:i,children:d?.href&&p(u(d.href),c)})]}):null]})})),p=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),u=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},b=n((({className:e="",doc:t,icon:a})=>r(x,{className:`flex h-full box-border ${e}`,iconClassName:"mr-2.5 min-w-6 min-h-6 text-primary-text",textClassName:"self-center",suffixClassName:"text-secondary-text group-hover:text-primary-main",doc:t,icon:a}))),f=n((({className:e,documents:t,columnsMode:a="double",icon:n})=>t?.length?r("div",{className:e,role:"list",children:t.map(((e,t)=>r("div",{className:"double"===a?"basis-[calc(50%-20px)]":"",role:"listitem",children:r(b,{className:"group flex text-sm align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:n})},String(t))))}):null)),g={left:"text-left",center:"text-center",right:"text-right"},N={double:"mb-8",single:"mb-[26px]"},v={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},y=n((({className:e="",title:t,subtitle:n,align:i,documents:l,icon:o="DocIcon",columnsMode:c="double"})=>a("section",{className:`font-sans text-primary-text p-12 bg-white ${e}`,children:[t?r(s,{headingType:"h2",className:`${n?"mb-2.5":N[c]} ${g[i??"center"]}`,title:t}):null,n?r("h3",{className:`text-base mt-0 font-normal ${N[c]} ${g[i??"center"]}`,children:n}):null,r(f,{className:v[c],columnsMode:c,documents:l,icon:o})]}))),w=n((({className:e="",image:{size:t,...n}})=>{const i={width:t?.width?`${t?.width}px`:"100%",height:t?.height?`${t?.height}px`:"100%"};return a("picture",{className:`flex-none ${e}`,children:[n.sources?.length?n.sources.map((({src:e,format:t},a)=>r("source",{srcSet:e,type:k(t)},`${a}_${e}`))):null,r("img",{className:n.className||"",src:n.src,alt:n.alt||n.title,title:n.title,style:i,...t})]})}));function k(e){return e?`image/${String(e)}`:void 0}const $=n((({className:e="",title:t,image:n,benefits:i})=>a("section",{className:`relative font-sans text-primary-text bg-white p-14 ${e}`,children:[r(s,{headingType:"h2",className:"text-center",title:t}),a("div",{className:"flex justify-center mt-9",children:[n?.src&&r(w,{className:"mr-6",image:n}),i?.length?r("div",{className:"flex flex-col",children:i.map(C)}):null]})]})));function C(e,t){return a("div",{className:"flex flex-row mb-8",children:[e.icon&&r(m,{className:"w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]",name:e.icon,width:"48",height:"48",asSVG:!0}),a("div",{className:"flex gap-1 flex-col h-full ml-5 max-w-[490px]",children:[e.label&&r("div",{className:"font-medium text-primary-text text-xl m-0",children:e.label}),e.description&&r("div",{className:"font-normal text-sm text-secondary-text",children:e.description})]})]},String(t))}const S={primary:{background:"bg-white",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"},secondary:{background:"bg-primary-main",icon:"bg-white text-primary-main",title:"text-white",description:"text-white"},"secondary-light":{background:"bg-primary-main/10",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"}},T=n((({title:e,description:t,blockVersion:n="primary",iconVersion:i,image:l,className:s})=>{const o=S[n];return a("section",{className:`font-sans px-9 py-4 flex ${o.background} ${s||""}`,children:["small"===i?L(o.icon):null,"big"===i?D(l):null,a("div",{className:"py-0.5",children:[e&&r("div",{className:`font-medium text-base mb-1 ${o.title}`,children:e}),t&&r("div",{className:`text-sm ${o.description}`,children:t})]})]})}));function L(e){return r("div",{className:"pt-1.5 pl-1 pr-4",children:r("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function D(e){return e?.src?r(w,{className:"pt-0.5 pr-3",image:e}):null}const I=e=>e?.includes("//"),j=e=>(e||"").replace(/\/?\?.*/,""),_=e=>{if(!e||!I(e))return;const t=e,r=t.indexOf("//"),a=t.indexOf("/",r+"//".length);return-1!==a?t.substring(0,a):t};var R=Object.freeze({__proto__:null,isURL:I,withoutQuery:j,getOrigin:_});const A="/mobile",M=(e,t)=>{if(!e)return e;const r=_(t?.href);return r?e.replace(r,"")||"/":e},B=e=>e;function P({router:e,handlerDecorator:t=B},r){const a=((e,t)=>{if(!e)return e;const r=M(e,t)||"",a=t?.pathname.startsWith(A);return a&&!I(r)?`/mobile${r}`:r})(r.href,e);return{...r,href:a,ariaLabel:r.text,onClick:t((t=>{const n=a&&!I(a),i=!r.target||"_self"===r.target;n&&i&&(t.preventDefault(),e.push(a))}),r)}}const V=n((({text:e,aboveText:t,appendLeft:n,rounded:i,version:l})=>{const s=!e&&!t&&Boolean(n);return function({buttonInnerClasses:e,appendLeft:t,withoutText:n,aboveText:i,text:l}){return a("div",{className:e,children:[t||null,n?null:a("div",{children:[r("div",{className:"text-m-2xs text-left",children:i}),r("div",{className:"text-m-button font-medium text-left",children:l})]})]})}({buttonInnerClasses:"link"!==l?`flex items-center justify-center\n ${s?"h-12 w-12":"px-8 gap-2 "+(t?"py-2":"py-3.5")} ${i?"rounded-full":""}`:null,appendLeft:n,withoutText:s,aboveText:t,text:e})}));const O={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active",link:""},F={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},Z="text-center font-sans select-none",H=n((({className:e,text:t,aboveText:a,appendLeft:n,href:i,target:l,onClick:s,children:o,disabled:c,rounded:m,version:d="none",ariaLabel:h,...x})=>{const p=o??r(V,{text:t,aboveText:a,appendLeft:n,rounded:m});return c?function({className:e,buttonInner:t,ariaLabel:a,version:n,rounded:i}){return r("div",{role:"button","aria-disabled":"true","aria-label":a,tabIndex:"-1",className:`inline-block ${Z} ${F[n]||""} ${i?"rounded-full":"rounded-md"} ${e||""}`,children:t})}({buttonInner:p,ariaLabel:h,className:e,version:d,rounded:m}):function({className:e,buttonInner:t,ariaLabel:a,version:n,rounded:i,href:l,target:s,onClick:o,rest:c}){return r("a",{className:`${Z} inline-block cursor-pointer no-underline ${O[n]||""} ${i?"rounded-full":"rounded-md"} ${e||""}`,href:l,target:s,onClick:o,"aria-label":a,role:l?"link":"button",...c,children:t})}({buttonInner:p,ariaLabel:h,className:e,version:d,rounded:m,href:i,target:l,onClick:s,rest:x})}));const G=n((({context:e,className:t="",buttons:a})=>{const{handlerDecorator:n}=e,i=e.useRouter();return a?.length?r("div",{className:`${t}`,children:a.map(((e,t)=>function({icon:e,...t},a){if(!t?.text)return;return r(H,e?{appendLeft:r(m,{name:e,width:"24",height:"24",asSVG:!0}),...t}:{...t},String(a))}(P({router:i,handlerDecorator:n},e),t)))}):null}));const E=n((e=>{const{className:t="",description:a}=e;return r("div",{className:`font-normal text-m-md ${t}`,children:a})})),W={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text"},z={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},U=n((({className:e="",isDotted:t=!0,children:n,version:i="primary"})=>a("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&r("div",{className:J(i)}),r("span",{className:`text-m-md ${W[i]}`,children:n})]}))),J=e=>`rounded-full inline-block mr-3 mt-2 ${z[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,X=n((e=>{const{className:t="",itemClassName:a,isDotted:n,items:i,version:l}=e;return r("section",{className:`${t}`,role:"list",children:i?.length?i.map(((e,t)=>r(U,{className:a,isDotted:n,version:l,children:e},String(t)))):null})})),Q=n((({className:e="",title:t,children:n,buttons:i,image:l})=>a("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,a("div",{className:"flex grow w-full justify-between",children:[a("div",{className:"flex flex-col justify-between w-full",children:[r("div",{children:n}),r("div",{children:i})]}),l]})]}))),q=e=>{const t="col-span-",r=e.split(/\s+/).find((e=>e.startsWith(t)));return r?parseInt(r.substring(t.length),10):12};function K(e=""){const t=q(e);return t<=4?"h4":t<=8?"h3":"h2"}function Y(e=""){const t=q(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function ee(e=""){const t=q(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const te={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},re=n((e=>{const{context:t,title:n,description:i,items:l,children:o,buttons:c,image:m,className:d="",version:h="primary",role:x}=e;return r("section",{className:`overflow-hidden font-sans p-9 box-border ${d} ${te[h]} ${ee(d)} ${Y(d)} `,role:x,children:a(Q,{context:t,title:n&&r(s,{headingType:K(d),title:n,className:`whitespace-pre-wrap max-w-[600px] ${n?"mb-3":""}\n ${"primary"===h?"text-primary-text":""}`}),buttons:c?.length?r(G,{context:t,buttons:c,className:"flex mt-9 gap-3"}):null,image:m?.src&&r(w,{className:"mt-auto ml-7",image:m}),children:[i&&r(E,{className:"mt-4 max-w-[600px]",description:i}),o,ae(l,h)]})})}));function ae(e,t){return e?.length?r(X,{items:e,version:t}):null}const ne={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ie=n((({context:e,className:t="",title:n,description:i,benefits:l,buttons:o,image:c,version:m="primary"})=>r("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${t} ${ne[m]} ${ee(t)} ${Y(t)} `,children:a(Q,{context:e,title:n&&r(s,{headingType:K(t),title:n,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:o?.length?r(G,{context:e,buttons:o,className:"flex mt-9 gap-3"}):null,image:c?.src&&r(w,{className:"mt-auto ml-7",image:c}),children:[i&&r(E,{className:"mt-4 max-w-[600px]",description:i}),a("div",{className:"flex mt-5 mb-1",children:[l?.length?r("div",{className:"mr-8",children:l.map(le)}):null,l?.length?r("div",{className:"pt-1",children:l.map(((e,t)=>function(e,t,a="primary"){return r("div",{className:`text-sm ${t?"mt-4":""} ${{primary:"text-secondary-text",secondary:"text-white"}[a]}`,children:e.description},String(t))}(e,t,m)))}):null]})]})})));function le(e,t){return r("div",{className:"text-xl font-medium "+(t?"mt-2.5":""),children:e.label},String(t))}const se=n((({className:e,viewBox:t,fill:a="none",width:n,height:i,paths:l,...s})=>r("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:a,width:n,height:i,children:l.map((({d:e,fill:t,...a},n)=>r("path",{d:e,fill:t||"currentColor",...s,...a},n)))}))),oe=[{d:"m9 12 4-4-4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",fill:"none"},{d:"M2 9a1 1 0 0 1 0-2v2Zm6-2a1 1 0 0 1 0 2V7ZM2 7h6v2H2V7Z"}],ce=n((({className:e,disabled:t,...a})=>r(H,{rounded:!0,className:`shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...a,children:r(se,{paths:oe,viewBox:"0 0 16 16",fill:"none",width:"16",height:"16"})}))),me={primary:"bg-white text-secondary-text",secondary:"bg-primary-main text-white"},de={normal:3,mini:4},he={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},xe={normal:380,mini:276},pe={primary:"text-secondary-text",secondary:"text-white",gray:"text-secondary-text"},ue={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},be=n((({className:e="",isDotted:t=!0,text:n,children:i,version:l="primary"})=>a("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&r("div",{className:fe(l)}),r("span",{className:pe[l],children:n||i})]}))),fe=e=>`rounded-full inline-block mr-3 mt-2 ${ue[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,ge=n((({title:e,description:t,image:n,items:i,button:l,version:s})=>{const o=function(e,t,r){return`font-medium text-xl m-0\n ${"secondary"!==e?"text-primary-text":""}\n ${t||r?.length?"":"text-center"}\n `}(s,t,i);return a("div",{children:[a("div",{children:[n?.src?r("div",{className:"flex justify-center",children:r(w,{className:"mb-6",image:n})}):null,e?ve(e,o):null,t?r("div",{className:"font-normal text-sm "+(e?"mt-2":""),children:t}):null,i?.length?ye(i,s):null]}),l?.text?Ne(l):null]})}));function Ne(e){return r(H,{className:"mt-6 w-full",appendLeft:e.icon&&r(m,{name:e.icon,width:"24px",height:"24px",asSVG:!0}),...e})}function ve(e,t){return r("div",{className:`font-medium text-xl m-0 ${t}`,children:e})}function ye(e,t){return r("section",{className:"max-w-[308px] mt-2",role:"list",children:e.filter((e=>e?.text)).map(((e,a)=>function(e,t,a){return r(be,{version:a??"primary",children:r("span",{className:"text-sm",children:e})},String(t))}(e.text,a,t)))})}const we=n((({context:e,title:t,description:n,cards:i=[],version:l="normal",activeCardIndex:o})=>a("div",{children:[r("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent"}),a("div",{className:"flex flex-col items-center mb-8",children:[t?r(s,{headingType:"h2",className:"text-center",title:t}):null,n?r("div",{className:"font-normal text-base max-w-[600px] mt-2.5",children:n}):null]}),r("div",{className:`flex ${i?.length<=de[l]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${o*xe[l]}px)`},role:"list",children:i?.map(((t,a)=>function({card:e,version:t},a){return r("section",{className:`box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between\n items-stretch ${he[t]} ${me[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:r(ge,{...e})},String(a))}({card:t,version:l,context:e},a)))})]})));const ke=n((({context:e,cards:t=[],className:n="",version:i="normal",...l})=>{const[s,o]=e.useState(0),c=t?.length>de[i],m=c&&t?.length-s>de[i],d=c&&s>0;return a("section",{className:`relative font-sans text-primary-text bg-white p-[50px] overflow-hidden ${n}`,children:[r(we,{context:e,cards:t,version:i,activeCardIndex:s,...l}),d&&r(ce,{className:"absolute top-1/2 left-8 rotate-180 z-10 mt-[25px]",onClick:()=>o(s-1),ariaLabel:"Пролистать влево"}),m&&r(ce,{className:"absolute top-1/2 right-8 z-10 mt-[25px]",onClick:()=>o(s+1),ariaLabel:"Пролистать вправо"}),r("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white"}),r("div",{className:"absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white"})]})})),$e=n((e=>r(ke,{...e,version:"normal"}))),Ce=n((e=>r(ke,{...e,version:"mini"}))),Se=n((({className:e="",documents:t})=>r("section",{className:`font-sans bg-white mt-[10px] ${e}`,children:r("ul",{className:"flex flex-col text-sm text-secondary-text p-0",children:t?.length?Te(t):null})}))),Te=e=>e.map(((e,t)=>{const{text:a,...n}=e;return r("li",{className:"mb-4 list-none",children:r("a",{className:"hover:text-primary-main",role:"link",...n,children:a||null})},`list_item_${String(t)}`)})),Le={Headline:h,LinkDocs:y,TextBlock:T,PictureText:$,Tile:re,ProductTile:ie,Gallery:$e,MiniGallery:Ce,LinkList:Se},De=n((({blocks:e,context:t})=>r("div",{className:"transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0",children:e?.length?e.map(Ie(t)):null}))),Ie=e=>(t,a)=>{const n=t?.accordionBlockType;if(!n||!(n in Le))return null;return r("div",{className:"mb-5 last:mb-0 pb-5",children:r(Le[n],{context:e,...t,className:"!p-0"})},`block_${a}`)},je=n((({label:e,blocks:t,context:n})=>{const{hasContent:i,icon:l,handleToggle:s}=(({context:e,blocks:t})=>{const[r,a]=e.useState(!1),n=t?.length;return{isActive:r,hasContent:n,icon:r?"MinusIcon":"PlusIcon",handleToggle:e=>{if(!n)return;a(!r);const t=(({currentTarget:e})=>e.nextSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:n,blocks:t});return a("li",{className:"border-0 border-b border-solid border-main-divider last:border-b-0",children:[a("button",{className:"border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans text-primary-text\n "+(i?"group cursor-pointer":""),onClick:s,children:[r("span",{className:"text-xl pr-2.5 font-medium "+(i?"group-hover:text-primary-main":""),children:e}),i?r(m,{name:l,width:"24",height:"24",asSVG:!0}):null]}),i?r(De,{blocks:t,context:n}):null]})})),_e=n((({title:e,accordionItems:t,context:n,className:i})=>a("section",{className:`p-[50px] font-sans bg-white text-primary-text ${i||""}`,children:[e?r(s,{headingType:"h4",className:"mb-2.5",title:e}):null,t?.length?r("ul",{className:"list-none m-0 p-0",children:t.map(((e,t)=>r(je,{...e,context:n},`AccordionItem${t}`)))}):null]}))),Re=n((({className:e,title:t,benefits:n})=>a("section",{className:`font-sans text-primary-text bg-white p-12 flex flex-col items-center ${e||""}`,children:[t?r(s,{headingType:"h2",className:"max-w-[47rem] text-center",title:t}):null,n?.length?r("div",{className:"grid grid-cols-2 gap-8 mt-9",children:n.map(Ae)}):null]}))),Ae=(e,t)=>a("div",{className:"flex items-center gap-5 max-w-[500px]",children:[e.icon&&r(m,{className:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",name:e.icon,width:"70",height:"70"}),a("div",{children:[r("h3",{className:"font-medium text-xl m-0",children:e.label}),e.description&&r("div",{className:"font-normal text-sm mt-2",children:e.description})]})]},String(t)),Me=({colData:e,colsLengthForScroll:t,activeCardIndex:r,setActiveCardIndex:a})=>{const n=e?.length&&e.length>t;return{nextClick:()=>a(r+1),prevClick:()=>a(r-1),isScrollAvailable:n,showNextButton:n&&e?.length-r>t,showPrevButton:n&&r>0}},Be="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",Pe="border-main-stroke border-solid border",Ve="border-main-divider border border-t-0 border-x-0",Oe="w-[200px] mr-6",Fe=n((({icon:e,image:t,title:n,link:i})=>a("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${Pe} ${Be}`,role:"columnheader",scope:"col",children:[e&&!t?.src&&r(m,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",name:e,width:"63",height:"63"}),t?.src&&r(w,{className:"mb-[18px]",image:t}),n&&r(s,{headingType:"h4",className:"text-center text-white",title:n}),i?.text&&r("div",{className:"mt-auto w-full",children:r(H,{href:i.href,target:i.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:r("div",{className:"font-medium text-xs py-[11px]",children:i.text})})})]}))),Ze={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},He=n((({children:e,activeCardIndex:t,columnWidth:a,version:n="comparison"})=>r("div",{className:"flex flex-1 overflow-hidden",children:r("div",{className:Ze[n],style:{transform:`translateX(-${t*a}px)`},children:e})}))),Ge=n((({cell:e,isFirstRow:t,isLastRow:a,isFillGradient:n})=>r("div",{className:`w-80 box-border flex flex-col ${Pe} ${a?"border-t-0 rounded-b-md":"border-y-0"} ${n?Be:""}`,role:"cell",children:r("div",{className:`mx-7 h-full ${Ve} ${n&&t?"border-t":""} ${a?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>Ee(e,t,n)))})}))),Ee=({label:e,description:t},n,i)=>a("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e&&r("h5",{className:"text-xl font-medium m-0 "+(i?"text-white":""),children:e}),t&&r("div",{className:"text-sm opacity-80 "+(i?"text-white":"text-secondary-text"),children:t})]},String(n)),We=n((({children:e})=>r("div",{className:"self-start flex flex-col",role:"row",children:r("div",{className:"flex",children:e})}))),ze=n((({row:{header:e,data:t},activeCardIndex:n,isColoredFirstColumn:i,isFirstRow:l,isLastRow:s})=>a(We,{children:[e?.title?r("div",{className:`text-sm py-7 ${Ve} w-[200px] mr-6 ${s?"border-b-0":"border-solid"}`,children:e.title}):null,t?.length?r(He,{activeCardIndex:n,columnWidth:336,children:t.map(((e,t)=>r(Ge,{cell:e,isFirstRow:l,isLastRow:s,isFillGradient:i&&0===t},String(t))))}):null]}))),Ue=n((({className:e,context:t,title:n,rowHeaders:i,columns:l,visibleRowLength:o=0,isColoredFirstColumn:c=!1})=>{const m=t.useRouter(),{handlerDecorator:d}=t,[h,x]=t.useState(0),[p,u]=t.useState(!o),b=l?.map((({header:e})=>e||{})),f=l?.map((({data:e})=>e))||[],g=i?.map(((e,t)=>({header:e,data:f.map((e=>e?.[t]||[{}]))}))).slice(0,p?i.length:o),{nextClick:N,prevClick:v,isScrollAvailable:y,showNextButton:w,showPrevButton:k}=Me({colData:f,colsLengthForScroll:2,activeCardIndex:h,setActiveCardIndex:x});return a("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,children:[r(s,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:n}),a("div",{role:"table",children:[b?.length?a(We,{children:[r("div",{className:Oe,role:"columnheader",scope:"col"}),r(He,{activeCardIndex:h,columnWidth:336,children:b.map(((e,t)=>r(Fe,{...e,link:e.link&&P({router:m,handlerDecorator:d},e.link)},String(t))))})]}):null,g?.length?a("div",{className:"relative",children:[g.map(((e,t,{length:a})=>r(ze,{row:e,isFirstRow:0===t,isLastRow:t+1===a,activeCardIndex:h,isColoredFirstColumn:c},String(t)))),y?r("div",{children:a("div",{className:"absolute top-7 right-7 z-10",children:[r(ce,{onClick:N,disabled:!w,ariaLabel:"Пролистать вправо"}),r(ce,{className:"mt-4 rotate-180",onClick:v,disabled:!k,ariaLabel:"Пролистать влево"})]})}):null]}):null]}),y?r("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null,o?r("div",{className:"pr-[50px]",children:a("div",{className:"flex w-full",children:[r("div",{className:Oe}),r("button",{onClick:()=>u(!p),className:"mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:r("div",{className:"font-sans font-medium text-xs py-[11px]",children:p?"Скрыть":"Показать все параметры"})})]})}):null]})}));function Je(e,t){const{data:r}=e(Xe(t),(()=>async function(e){const t=await fetch(Xe(e));return await t.json()}(t)));return r||{}}function Xe(e){return`/wcms-resources/${e||"credit-calculator-data"}.json`}const Qe=[{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"}],qe=n((({text:e,checked:t,onChange:n,className:i})=>r("div",{className:i,children:a("label",{className:"flex items-center cursor-pointer relative",children:[r("input",{className:`peer appearance-none w-5 h-5 border-solid border ${t?"border-black":"border-main-stroke"} rounded checked:bg-primary-main checked:border-primary-main m-0`,type:"checkbox",onChange:e=>{n(e.target.checked)},checked:t}),r(se,{paths:Qe,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),e?r("span",{className:"font-sans ml-3 text-sm leading-5 cursor-pointer",children:e}):null]})}))),Ke=e=>new Intl.NumberFormat("ru-RU",{maximumSignificantDigits:3}).format(e),Ye=n((({className:e,title:t,items:n=[],min:i=1,max:l=100,step:s=1,value:o=i,onChange:c})=>{const m=e=>{if(!c)return;const t=Number(e.replace(/\D/g,""));c(t)},d={backgroundSize:`${(100*(o-i)/(l-i)).toFixed(2)}% 100%`};return a("div",{className:e,children:[a("label",{className:"block relative",children:[t?r("span",{className:"absolute text-xs text-secondary-text top-1 mt-0.5 pl-4 ml-0.5",children:t}):null,r("input",{className:"m-0 font-sans text-sm w-full h-12 border border-solid border-main-stroke rounded-md\n outline-none p-0 pl-4 m-0 box-border text-primary-text "+(t?"pt-4":""),value:Ke(o),onChange:e=>m(e.target.value),onBlur:()=>{c&&(o<i&&c(i),o>l&&c(l))}}),r("div",{className:"absolute inset-x-0 top-[35px] px-4 leading-[18px]",children:r("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:i,max:l,step:s,value:o,onChange:e=>m(e.target.value),style:d})})]}),r("div",{className:"flex justify-between my-3",children:n.map(((e,t)=>a("span",{className:"text-xs leading-[14px] text-secondary-text pl-4",children:[" ",e," "]},String(t))))})]})})),et=(e,t,r)=>Math.max(t,Math.min(e,r)),tt=3e4,rt=3e6,at=Math.round(41.5),nt=n((({context:e,className:t,directoryName:n})=>{const[i,l]=e.useState(void 0),[s,o]=e.useState(void 0),[c,m]=e.useState(!0),[d,h]=e.useState(!0),x=(e=>{const{tableRows:t,isAnnuity:r=!1}=e;return t&&t.find((e=>e.isAnnuity===r))||{}})({tableRows:Je(e.useAsyncData,n).rows,isAnnuity:c}),p=x.maxSum&&x.minSum?(x.maxSum-x.minSum)/2:1485e3,u=x.maxMonths&&x.minMonths?Math.round((x.maxMonths-x.minMonths)/2):at,b=x?.minSum||tt,f=x?.maxSum||rt,g=x?.minMonths||1,N=x?.maxMonths||84,v=(e=>{const{calculatorParams:t,isInsurance:r}=e;return t?r?t?.rateWithInsurance||5:t?.rateWithoutInsurance||5:5})({calculatorParams:x,isInsurance:d}),y=(e=>{const{calculatorParams:t,paymentType:r,rate:a,sum:n,months:i}=e;if(!t)return 0;const l=et(n,t.minSum||tt,t.maxSum||rt);if("annuity"===r){const e=Number(a)/1200;return l*(e+e/(Math.pow(1+e,i)-1))}return l/i+l*(Number(a)/12)})({calculatorParams:x,paymentType:"annuity",rate:v,sum:i||p,months:s||u}),w=((e,t)=>{const r=Math.ceil((t-e)/12),a=Math.floor(e/12)+1,n=new Array(Math.min(r-1,5)).fill(0).map(((e,t)=>a+t)),i=r+a-1;return n.concat(i)})(g,N);function k(e){o(et(12*e,g,N))}return r("section",{className:`font-sans text-primary-text p-10 bg-white ${t||""}`,children:a("div",{className:"box-border p-[49px] pr-[56px] mx-auto w-max border-solid border-[3px] border-primary-main rounded-md",children:[a("div",{className:"flex justify-between ",children:[a("div",{className:"mr-[42px]",children:[r(Ye,{title:"Желаемая сумма кредита, ₽",items:[`От ${Ke(b)} рублей`,`До ${Ke(f)} рублей`],min:b,max:f,step:1e3,value:i||p,onChange:l}),r(Ye,{className:"mt-[23px]",title:"Срок кредита, месяцев",items:["Или выберите из предложенных вариантов ниже"],min:g,max:N,step:1,value:s||u,onChange:o}),r("div",{className:"flex mb-7",children:w.map(((e,t)=>function(e,t,n){return r("button",{className:"bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none",onClick:()=>n(e),children:a("span",{className:"font-semibold text-sm",children:[e," ",1===e?"год":e>4?"лет":"года"]})},String(t))}(e,t,k)))}),r(qe,{text:"Получаю пенсию на карту Россельхозбанка",checked:c,onChange:m}),r(qe,{className:"mt-3 mb-7",text:"Комплексная страховая защита",checked:d,onChange:h})]}),a("div",{className:"box-border h-fit p-9 bg-primary-main rounded-md text-white",children:[r("div",{className:"text-base mb-[18px]",children:"Наше предложение"}),r("div",{className:"text-sm opacity-60",children:"Ежемесячный платёж"}),a("div",{className:"text-lg mb-3",children:[Ke(Math.round(y))," ₽"]}),r("div",{className:"text-sm opacity-60",children:"Ставка"}),a("div",{className:"text-lg",children:[v," %"]})]})]}),a("div",{className:"flex items-center",children:[r(H,{className:"mr-3",text:"Отправить заявку",version:"primary",href:"#"}),r("div",{className:"w-80 text-2xs leading-4 text-secondary-text","aria-label":"Соглашение на обработку персональных данных",children:"Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно требованиям ФЗ «О персональных данных»"})]})]})})}));const it="https://www.cbr-xml-daily.ru/daily_json.js",lt=["USD","EUR"],st={USD:"DollarIcon",EUR:"EuroIcon"},ot=[{text:"Все показатели",href:"https://cbr.ru/currency_base/daily/",version:"secondary"}],ct=n((({className:e="",context:t,title:n="Курсы обмена валют"})=>{const{data:i}=t.useAsyncData(it,ht);return r("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${ee(e)} ${Y(e)} `,children:r(Q,{context:t,title:n&&r(s,{headingType:K(e),title:n,className:"whitespace-pre-wrap max-w-[600px] "+(n?"mb-3":"")}),buttons:ot?.length?r(G,{context:t,buttons:ot,className:"flex mt-9 gap-3"}):null,children:a("table",{children:[r("thead",{children:a("tr",{children:[r(mt,{children:"Валюта"}),r(mt,{className:"pl-11",children:"Курс"})]})}),r("tbody",{children:lt.map(ut(i))})]})})})})),mt=n((({className:e="",children:t})=>r("th",{className:`text-left font-normal text-sm text-secondary-text ${e}`,children:t}))),dt=n((({className:e="",children:t})=>r("td",{className:`text-left font-normal text-base text-primary-text ${e}`,children:t})));async function ht(){const e=await fetch(it);return await e.json()}const xt=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),pt=e=>e?xt.format(e):"",ut=e=>t=>{const n=(e?.Valute||{})[t]?.Value;return a("tr",{children:[r(dt,{className:"pt-4",children:a("div",{className:"flex items-center",children:[r(m,{name:st[t],width:"24",height:"24"}),r("span",{className:"ml-2",children:t})]})}),r(dt,{className:"pt-4 pl-11",children:pt(n)})]},t)},bt=["m13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z","M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z","M33.93 35.53c.3-.41.6-.85.87-1.3v-2.66h-.87v3.96Zm2.54-4.92c.12-.4.24-.78.34-1.16h-2.88v.7h.43c.77-.02 1.63-.03 2.11.46Zm-19.19-1.27h-.78v7.91h.78v-7.9Z","M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z","M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z"],ft={"bg-white":"text-primary-main",transparent:"text-white"},gt={"bg-white":"text-black",transparent:"text-white"},Nt=n((({className:e,href:t,children:n,targetBlank:i,bgColor:l="bg-white",hideTitle:s})=>a("a",{className:`inline-flex items-center font-sans no-underline ${e||""}`,href:t||"https://rshb.ru/",target:i?"_blank":"_self","aria-label":"Россельхозбанк",children:[r(se,{className:`${ft[l]} w-10`,viewBox:"0 0 40 45",paths:bt.map((e=>({d:e})))}),!s&&r("span",{className:`${gt[l]} text-base font-medium ml-2.5`,children:n||"Россельхозбанк"})]}))),vt=n((({className:e,context:t})=>{const{term:n,setTerm:i}=t.useSearch();return a("form",{className:`relative ${e||""}`,children:[a("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[r("div",{className:"w-[24px] h-[24px]",children:r(m,{name:"LoupeIcon",width:"24",height:"24"})}),!n&&r("label",{htmlFor:"search-bar-input",className:"font-sans font-normal text-base text-secondary-text",children:"Поиск по сайту"})]}),r("input",{id:"search-bar-input",className:"h-12 pl-12 w-full peer font-sans font-normal text-base text-black border border-solid rounded h-full box-border outline-none pr-[6%] border-main-divider focus:border-primary-text",value:n,onChange:e=>i(e.target.value),type:"text",name:"search-bar-input"}),r(H,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-1 right-1",onClick:e=>{e.preventDefault(),console.log("click")},children:r("div",{className:"font-normal text-sm px-9 py-[9px]",children:"Найти"})})]})})),yt=n((({className:e,items:t,hasButton:n,context:i})=>{const l=i.useRouter(),{handlerDecorator:s}=i;return a("div",{className:`flex flex-col ${e||""}`,children:[t?.length?t.map(wt):null,n?r(H,{version:"primary",className:"mt-0.5 mb-5",...P({router:l,handlerDecorator:s},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),wt=(e,t)=>{const{type:n,text:i,description:l}=e;return a("div",{className:"mb-3.5",children:[r("div",{children:kt(n,i)}),r("div",{className:"font-sans text-sm text-secondary-text",children:l})]},String(t))},kt=(e,t="")=>{switch(e){case"tel":return r("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`tel:${$t(t)}`,children:t});case"email":return r("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return r("span",{children:t})}},$t=e=>e.replaceAll(/\D/g,""),Ct=n((({links:e,className:t="",context:a})=>{const n=a.useRouter(),{handlerDecorator:i}=a;return r("div",{className:t,children:e?.length?r("div",{className:"flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider",children:e.map(((e,t)=>r(St,{index:t,...P({router:n,handlerDecorator:i},e)},String(t))))}):null})})),St=n((({className:e="",index:t,text:a,href:n,target:i,onClick:l})=>r("a",{className:`font-sans font-normal text-sm text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:n,target:i,onClick:l,children:a||`Документ ${t}`}))),Tt=e=>t=>e?.href===t?.href,Lt=(e,t)=>{return(a=e,n=t,(a||[]).map((e=>n?.find(Tt(e))||e))).concat((r=e,(t||[]).filter((e=>!r?.find(Tt(e))))));var r,a,n};function Dt(e){const{data:t}=e(jt(),It);return t||{}}async function It(){const e=await fetch(jt());return await e.json()}function jt(){return`/wcms-resources/${o.SITEMAP||"sitemap"}.json`}const _t=n((({className:e,items:t,context:a})=>{const n=Dt(a.useAsyncData),i=Lt(n.topItems,t),l={router:a.useRouter(),handlerDecorator:a.handlerDecorator};return r("div",{className:`flex items-start justify-start gap-11 xl:gap-5 ${e||""}`,children:i?.map(((e,t)=>Rt(e,t,l)))})})),Rt=(e,t,{router:n,handlerDecorator:i})=>{const{text:l,href:s,items:o,target:c}=e;return a("div",{className:"flex flex-col gap-[14px]",children:[r("a",{className:"block font-sans font-medium text-base text-primary-text no-underline",href:s,target:c||"_self",children:l||`Раздел ${t}`}),o?.map(((e,t)=>r(At,{...P({router:n,handlerDecorator:i},e),index:t},String(t))))]},String(t))},At=n((({text:e,href:t,target:a,index:n})=>r("a",{className:"block font-sans font-normal text-base text-secondary-text hover:text-primary-main no-underline",href:t,target:a||"_self",children:e||`Раздел ${n}`}))),Mt=[{origins:["t.me","telegram.org"],icon:"TelegramIcon",label:"Телеграм",width:"20px",height:"16px"},{origins:["vk.com"],icon:"VKIcon",label:"ВКонтакте",width:"24px",height:"12px"},{origins:["ok.ru"],icon:"OkIcon",label:"Одноклассники",width:"12px",height:"20px"}],Bt=n((({href:e})=>{const{icon:t,width:a,height:n,label:i}=Mt.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};return t?r("a",{className:"flex items-center justify-center border border-solid border-main-divider rounded-full no-underline outline-none w-[38px] h-[38px] hover:text-primary-main",href:e,"aria-label":i,target:"_blank",rel:"noopener noreferrer",children:m&&r(m,{name:t,width:a,height:n,asSVG:!0,className:"block",color:"none"})}):null})),Pt=n((({className:e,media:t,context:a})=>{const n=a.useRouter(),{handlerDecorator:i}=a;return r("div",{className:`flex items-end justify-end gap-2 pt-[30px] pb-7 ${e||""}`,children:t?.map(((e,t)=>r(Bt,{...P({router:n,handlerDecorator:i},e)},String(t))))})})),Vt=n((({className:e,links:t,context:n})=>{const i=n.useRouter(),{handlerDecorator:l}=n;return a("div",{className:`${e||""}`,children:[r("div",{className:"pt-5 pb-[5px]",children:r("span",{className:"font-sans font-normal text-xs text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?r("div",{className:"flex justify-start items-start gap-5 pt-[5px]",children:t.map(((e,t)=>r(Ot,{index:t,...P({router:i,handlerDecorator:l},e)},String(t))))}):null]})})),Ot=n((({className:e,index:t,text:a,href:n,target:i,onClick:l})=>r("a",{className:`font-sans font-normal text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:n,target:i,onClick:l,children:a||`Документ ${t}`}))),Ft=n((({className:e,documents:t,relatedEnterprises:n,contacts:i,socialMedia:l,topItems:s,context:o})=>a("footer",{className:`px-9 py-10 bg-white ${e||""}`,children:[a("div",{className:"flex items-stretch gap-[54px] pb-8 xl:gap-8",children:[r(Nt,{className:"w-[280px] xl:w-[220px]"}),r(vt,{context:o,className:"grow"})]}),a("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[r(yt,{className:"w-[280px] shrink-0 overflow-hidden xl:w-[220px]",items:i,context:o,hasButton:!0}),r(_t,{className:"pt-[3px]",context:o,items:s})]}),r(Pt,{media:l,context:o}),r(Ct,{links:n,context:o}),r(Vt,{links:t,context:o})]}))),Zt=(e,t,r=((e,t)=>t.startsWith(e)))=>r(j(e),(e=>(e||"").replace(A,""))(j(I(e)?t.href:t.pathname))),Ht=e=>t=>Zt(t.href,e),Gt=e=>(t=[])=>{const r=t?.filter(Ht(e));var a;return r?.length?(a=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>a(e)>a(t)?e:t)))(r):null},Et=e=>t=>t.items?.some(Ht(e))||Zt(t.href,e)||((e,t)=>_(e)===_(t.href))(t.href,e),Wt="absolute left-0 -bottom-3 w-full h-[2px]",zt=n((({className:e,text:t,href:n,target:i,active:l,onClick:s,children:o,bgColor:c="bg-white"})=>a("a",{className:`relative inline-block bg-transparent text-center no-underline ${e||""}`,href:n,target:i,onClick:s,children:[r("span",{className:Ut(c,l),children:t||o}),l?r("div",{className:Jt(c,l)}):null]}))),Ut=(e,t)=>{let r="text-white";return"bg-white"===e&&(r=t?"text-primary-main":"text-primary-text hover:text-primary-main"),`${r} font-sans font-normal text-base`},Jt=(e,t)=>t?`${"bg-white"===e?"bg-primary-main":e} ${Wt}`:Wt,Xt=n((({className:e="",text:t,href:a,target:n,active:i,flat:l,onClick:s,children:o,ariaLabel:c,bgColor:m="bg-white"})=>r("a",{className:`${Qt(m,i,l)} ${e}`,href:a,target:n,onClick:s,rel:"noopener noreferrer","aria-label":c,children:r("span",{className:qt(m,i,l),children:t||o})}))),Qt=(e,t,r)=>{let a="border-transparent";return t&&(a="rounded-md "+("bg-white"===e?"border-primary-main":"border-white")),`${a} inline-block border border-solid bg-transparent text-center no-underline ${r?"":"px-4 py-2"}`},qt=(e,t,r)=>{let a="text-white";return"bg-white"===e&&(a=t?"text-primary-main":(r?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"),`${a} font-sans font-normal text-sm`},Kt=n((({className:e="",children:t,ariaLabel:a})=>r("button",{type:"button",className:`border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${e}`,disabled:!0,"aria-label":a,children:t}))),Yt={"bg-white":"text-primary-text hover:text-primary-main",transparent:"text-white"},er={"bg-white":"text-secondary-light hover:text-secondary-hover",transparent:"text-white"},tr={"bg-white":"GridIcon",transparent:"GridIconWhite"},rr=n((({context:e,className:t,defaultLocation:n="",bgColor:i="bg-white"})=>{const[l,s]=e.useGeolocation(n);return a("div",{className:`flex items-center ${t||""}`,children:[r(Xt,{className:"mr-5",flat:!0,href:"#",text:l,ariaLabel:"Местоположение",onClick:s,bgColor:i}),r(Xt,{className:"mr-7",flat:!0,href:"#",text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов",bgColor:i}),r(Kt,{className:`mr-5 ${Yt[i]}`,ariaLabel:"Поиск по сайту",children:r(m,{name:"LoupeIcon",className:"h-full",asSVG:!0,color:"none"})}),r(Kt,{className:`mr-5 ${Yt[i]}`,ariaLabel:"Профиль",children:r(m,{name:"ProfileIcon",className:"h-full",asSVG:!0,color:"none"})}),r(Kt,{className:`${er[i]} min-w-[32px] min-h-[32px]`,ariaLabel:"Дополнительные ссылки",children:r(m,{name:tr[i],className:"h-full",asSVG:!0,color:"none"})})]})})),ar={"bg-white":"bg-main-divider",transparent:"bg-main-divider opacity-30"},nr=n((({className:e,defaultLocation:t,bgColor:n="bg-white",context:i,topItems:l})=>{const s=i.useRouter(),o=Dt(i.useAsyncData),{handlerDecorator:c}=i,m=Lt(o.topItems,l),d=m.find(Et(s)),h=d?.items,x=Gt(s)(h),p=m.map(((e,t)=>r(Xt,{active:e===d,...P({router:s,handlerDecorator:c},e),ariaLabel:e.text,bgColor:n},String(t)))),u=h?.map((e=>r(zt,{className:"mr-8",active:e===x,...P({router:s,handlerDecorator:c},e),bgColor:n},e.href)));return r("header",{className:`pt-5 pb-8 px-20 ${n} ${e||""}`,children:a("div",{className:"container",children:[a("div",{className:"flex items-center",children:[r(Nt,{className:"mr-8",bgColor:n}),p,r(rr,{context:i,className:"ml-auto",defaultLocation:t,bgColor:n})]}),r("div",{className:`mt-5 h-[1px] ${ar[n]}`}),r("nav",{className:"mt-5",children:u})]})})})),ir=n((({className:e="",context:t,title:n="Мобильное приложение",qr:i,buttons:l=[]})=>r("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${ee(e)} ${Y(e)} `,children:r(Q,{context:t,title:n&&r(s,{headingType:K(e),title:n,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:l?.length?r(G,{context:t,buttons:l,className:"flex mt-9 gap-3"}):null,children:a("div",{className:"flex items-center",children:[i?.src&&i?.href&&r("a",{href:i.href,target:"_blank",children:r("img",{src:i.src,alt:n,title:n,width:"164",height:"164",className:"w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light"})}),r("span",{className:"font-normal text-sm text-secondary-text ml-4",children:"Наведите камеру телефона на QR-код и скачайте приложение"})]})})}))),lr=n((({className:e,text:t,onClick:a,href:n,target:i,isActive:l})=>r("a",{className:`bg-inherit no-underline px-4 py-2.5 cursor-pointer rounded text-sm border border-solid hover:text-primary-main ${e||""} ${l?"border-primary-main text-primary-main":"border-white text-secondary-text"}`,onClick:a,href:n,target:i,children:t}))),sr=n((({className:e,context:t,title:n,buttons:i})=>{const l=t.useRouter(),{handlerDecorator:s}=t,o=Gt(l)(i);return a("section",{className:`font-sans text-primary-text rounded-[40px] flex items-center justify-between ${e||""}`,children:[r("h2",{className:"font-medium text-xl m-0",children:n}),i?.length?r("div",{className:"flex rounded-md overflow-hidden bg-white",children:i.filter((({text:e})=>e)).map(((e,t)=>r(lr,{className:"first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md",isActive:e===o,...P({router:l,handlerDecorator:s},e)},String(t))))}):null]})})),or=n((({text:e,href:t,target:a,onClick:n,className:i="",children:l})=>t?r("a",{className:`no-underline ${i}`,href:t,target:a,onClick:n,children:r("span",{className:i,children:e||l})}):r("span",{className:i,children:e||l})));function cr(e){return t=>t.reduce(((t,r,a)=>t.length?t.concat({...e,key:a},r):[r]),[])}const mr={primary:"bg-main",secondary:"bg-white/30"},dr={primary:"text-primary-text",secondary:"text-white"},hr={primary:"text-secondary-text",secondary:"text-white"};const xr=n((({className:e="",context:t,title:n,headingType:i="h2",description:l,benefits:o,buttons:c,image:d,items:h,version:x="primary"})=>a("div",{className:`flex grow justify-between items-stretch ${e}`,children:[r("div",{className:"flex flex-col",children:a(Q,{context:t,title:n&&r(s,{headingType:i,title:n,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:c?.length?r(G,{context:t,buttons:c,className:"flex mt-9 gap-3"}):null,children:[l&&r(E,{className:"text-m-base mt-4 max-w-[600px]",description:l}),o?.filter((e=>e.label))?.length?r("div",{className:"flex gap-6 mt-6",children:o.map(((e,t)=>function(e,t,n){return a("div",{className:"flex gap-4 items-center",children:[e.icon&&r(m,{className:`w-[50px] h-[50px] min-w-[50px] min-h-[50px] rounded-full p-[10px] box-border ${mr[n]}`,name:e.icon,width:"24",height:"24",asSVG:!0}),a("div",{className:"flex gap-1 flex-col h-full max-w-[149px]",children:[r("div",{className:`font-medium text-xl m-0 ${dr[n]}`,children:e.label}),e.description&&r("div",{className:`font-normal text-sm ${hr[n]}`,children:e.description})]})]},String(t))}(e,t,x)))}):null,h?.length?r(X,{className:"mt-5",items:h,itemClassName:"mb-[10px]",version:x}):null]})}),d?.src&&r(w,{className:"mt-auto",image:d})]}))),pr={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ur={primary:"text-secondary-text",secondary:"text-white/80"},br=n((e=>{const{context:t,className:n,breadcrumbs:i,version:l="primary"}=e,s=t.useRouter(),{handlerDecorator:o}=t;return a("section",{className:`font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${n||""} ${pr[l]}`,children:[i?.length?r("div",{className:"text-xs mb-6",children:cr(r("span",{className:`mx-2 ${ur[l]}`,children:"/"}))(i.map(((e,t)=>r(or,{...P({router:s,handlerDecorator:o},{className:ur[l],...e})},String(t)))))}):null,r(xr,{...e})]})})),fr=n((({className:e,context:t,duration:n=0,slides:i=[]})=>{const l=i.map((e=>e.nav)),s=i.map((e=>e.productBlock)),[o,c]=t.useState(0);return a("section",{className:`font-sans bg-white overflow-hidden w-100 ${e||""}`,children:[r("div",{className:"flex duration-1000",style:{transform:`translateX(-${o}00%)`},role:"list",children:s.map(((e,a)=>function(e,t,a){return r("section",{className:"flex grow-0 shrink-0 basis-full",role:"listitem",children:r("div",{className:"p-10 flex grow",children:r(xr,{className:"pl-2.5 pt-2.5 pb-1.5 pr-[6.25rem]",context:a,...e})})},String(t))}(e,a,t)))}),r("div",{className:"flex",children:l.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:n,onClick:i,duration:l}){const s=t===n,o=s?"animate-slide":"",c=s?"text-primary-text":"text-secondary-text";return a("button",{type:"button",onClick:i,"aria-label":e?.title,className:"font-sans group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 pt-4 pb-[23px] grow basis-0",children:[a("div",{className:"border-0 border-r border-solid border-main-divider px-6",children:[r("div",{className:`text-sm font-medium pb-[3px] group-hover:text-primary-text ${c}`,children:e?.title}),r("div",{className:"text-xs text-secondary-text",children:e.desc})]}),r("div",{className:`absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${o}`,style:{animationDuration:`${l}s`,animationFillMode:"forwards"}})]},String(t))}({slide:e,i:t,activeSlideIndex:o,onClick:()=>c(t),duration:n})))})]})}));const gr={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Nr=n((({className:e="",context:t,title:n="Акции и спецпредложения",date:i,description:l,buttons:o=[],version:c="primary"})=>r("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${gr[c]} ${ee(e)} ${Y(e)} `,children:r(Q,{context:t,title:n?r(s,{headingType:K(e),title:n,className:"whitespace-pre-wrap max-w-[600px]"}):null,buttons:o?.length?r(G,{context:t,buttons:o,className:"flex mt-9 gap-3"}):null,children:a("div",{className:"mt-1.5",children:[i?r("div",{className:"text-sm mb-2",children:vr(i)}):null,r("div",{className:"text-base",children:l})]})})})));function vr(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const yr=n((({className:e,title:t,showLines:n=!0,steps:i})=>a("section",{className:`box-border font-sans text-primary-text bg-white px-20 py-[50px] flex flex-col items-center ${e||""}`,children:[r(s,{headingType:"h2",className:"max-w-[47rem] text-center",title:t}),i?.length?a("div",{className:"box-border py-0.5 mb-0.5 "+(t?"mt-9":""),children:[r("div",{className:"flex items-center px-[88px]",children:cr(r("div",{className:"h-0.5 w-full bg-secondary-light "+(n?"":"opacity-0")}))(i.map(((e,t)=>wr(e,t))))}),r("div",{className:"flex justify-between gap-x-[101px]",children:i.map(kr)})]}):null]}))),wr=(e,t)=>r("div",{className:"flex flex-col items-center text-center relative",children:r("div",{className:"h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10",children:e.icon&&r(m,{name:e.icon,width:"48",height:"48"})||r("span",{className:"font-medium text-title-sm text-secondary-text",children:t+1})})},String(t)),kr=(e,t)=>a("div",{className:"flex flex-col items-center text-center relative w-[276px] whitespace-pre-line overflow-hidden",children:[e.label&&r("div",{className:"font-medium text-xl m-0 mt-4",children:e.label}),e.description&&r("div",{className:"font-normal text-sm text-secondary-text "+(e.label?"mt-2":"mt-4"),children:e.description})]},String(t)),$r=n((({cell:e,isLastRow:t})=>r("div",{className:"first:pl-0 pl-10 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0 "+(t?"border-t-0 rounded-b-md":""),role:"cell",children:r("div",{children:e.map(((e,t)=>Cr(e,t)))})}))),Cr=({label:e,description:t,list:n,image:i,buttons:l},s)=>a("div",{className:"first:pt-5 last:pb-5",children:[s>0&&r("div",{className:"border-main-divider border border-solid border-t-0 border-x-0 my-4"}),e&&r("div",{className:"text-xl font-medium m-0",children:e}),t&&r("div",{className:"text-sm text-secondary-text",children:t}),n?.items?.length?r("div",{className:"flex flex-col justify-between items-start",children:r("div",{role:"list",children:n.items.map(((e,t)=>r(be,{className:"text-sm",text:e,version:"gray",isDotted:n.isDotted??!0},String(t))))})}):null,i&&r(w,{image:i}),l?.length?l.map((({icon:e,...t},a)=>r(H,{className:(a>0?"ml-3":"")+" w-12 h-12",appendLeft:e&&r(m,{name:e,width:"24px",height:"24px",asSVG:!0}),...t},String(a)))):null]},String(s)),Sr=n((({row:{header:e,data:t},activeCardIndex:n,isLastRow:i})=>a(We,{children:[r("div",{className:"text-sm py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0 "+(i?"":"border-solid"),children:a("div",{className:"flex items-center text-primary-text",children:[e?.icon&&r(m,{className:"mr-[14px] max-w-6 max-h-6",name:e.icon,width:"24px",height:"24px",asSVG:!0}),e?.title]})}),t?.length?r(He,{activeCardIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>r($r,{cell:e,isLastRow:i},String(t))))}):null]}))),Tr={Accordion:_e,BenefitsBlock:Re,ComparisonTable:Ue,CreditCalculator:nt,ExchangeRateTile:ct,Footer:Ft,Gallery:$e,Header:nr,Headline:h,LinkDocs:y,MiniGallery:Ce,MobileAppTile:ir,PictureText:$,ProductBlock:br,ProductGallery:fr,ProductTile:ie,PromoTile:Nr,StepsBlock:yr,TariffsTable:n((({className:e,context:t,title:n,rowHeaders:i,columns:l})=>{const[o,c]=t.useState(0),m=l?.map((({data:e})=>e))||[],d=i?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[{}]))}))),{nextClick:h,prevClick:x,isScrollAvailable:p,showNextButton:u,showPrevButton:b}=Me({colData:m,colsLengthForScroll:2,activeCardIndex:o,setActiveCardIndex:c});return a("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,children:[r(s,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:n}),a("div",{role:"table",children:[d?.length?a("div",{className:"relative",children:[d.map(((e,t,{length:a})=>r(Sr,{row:e,isLastRow:t+1===a,activeCardIndex:o},String(t)))),p?r("div",{children:a("div",{className:"absolute top-7 right-7 z-10",children:[r(ce,{onClick:h,disabled:!u,ariaLabel:"Пролистать вправо"}),r(ce,{className:"mt-4 rotate-180",onClick:x,disabled:!b,ariaLabel:"Пролистать влево"})]})}):null]}):null,p?r("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})]})})),TextBlock:T,Tile:re,Navigation:sr},Lr=n((({className:e,onClick:t,ariaLabel:a})=>r("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":a,children:Dr()}))),Dr=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return a("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),r("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},Ir=n((({className:e,context:t})=>{const n=t.useLikeService();return a("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,children:[r(Lr,{onClick:n.like,ariaLabel:"Поставить отметку «лайк»"}),r(Lr,{onClick:n.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),r("span",{className:"select-none",children:n.likeCount})]})})),jr=n((({className:e,context:t,title:n,description:i="Блок в разработке..."})=>r("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${ee(e)} ${Y(e)} `,children:a(Q,{context:t,title:n?r(s,{headingType:K(e),title:n,className:"whitespace-pre-wrap max-w-[600px]"}):null,children:[i?r(E,{className:"mt-4 max-w-[600px]",description:i}):null,r("figure",{className:"m-0 min-w-[600px]",children:_r()})]})}))),_r=(e=3)=>Ar(100,e).map((e=>Math.floor(e))).map(Rr),Rr=(e=100,t)=>r("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Ar=(e,t)=>[e].concat(t>0?Ar(e/1.618,t-1):[]),Mr=({blockClassName:e,block:t,render:r})=>r({blockClassName:e,block:t}),Br=n((({className:e,context:t,blocksRegistry:n,data:{style:i,blocks:l,slots:s={},likeControl:o,colorPalette:c="pc"},blockDecorator:m=Mr})=>{const{header:d}=s;return a("section",{className:`relative ${Vr(i)} ${e||""}`,"data-theme":c,children:[d?.blocks?.length?r("div",{className:`${Vr(d?.style)}`,children:d.blocks.map(((e,r)=>Pr({block:e,blockDecorator:m,blocksRegistry:n,context:t},r)))}):null,l?.length?r("div",{className:"container grid grid-cols-12 gap-1",children:l.map(((e,r)=>Pr({block:e,blockDecorator:m,blocksRegistry:n,context:t},r)))}):null,o&&r("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:r(Ir,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t})})]})}));function Pr({block:e,blockDecorator:t,blocksRegistry:a,context:n},i){const{type:l}=e;l&&l in a||console.warn(`No block with "${l}" is registered`);const s=a[l||"Placeholder"]||jr;return t({blockClassName:Vr(e.style),block:e,render:e=>{const{version:t,content:a}=e.block;return r(s,{className:e.blockClassName,version:t,context:n,...a},`${l}-${i}`)}},`block-${i}`)}function Vr(e){return e?e.join(" "):""}const Or=n((({HeadComponent:e,data:t,children:n})=>{const{title:i,main:l,og:s,twitter:o,jsonLd:c}=t,{description:m,keywords:d,canonical:h,robots:x}=l||{};return a(e,{children:[r("title",{children:i}),r("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),m&&r("meta",{name:"description",content:m}),d&&r("meta",{name:"keywords",content:d.join(",")}),x&&r("meta",{name:"robots",content:x.join(",")}),Fr(s),Zr(o),h&&r("link",{rel:"canonical",href:h}),c&&r("script",{type:"application/ld+json",children:c}),n]})}));function Fr(e){return e?Object.entries(e).map((([e,t])=>r("meta",{name:`og:${e}`,content:t},e))):null}function Zr(e){return e?Object.entries(e).map((([e,t])=>r("meta",{name:`twitter:${e}`,content:t},e))):null}function Hr(e){const{mobile:t,...r}=e;return r}function Gr(e){return e?.filter((e=>{return t=e?.type,(t||"")in Tr;var t})).map(Hr)}e.Blocks=Tr,e.ContentPage=Br,e.ContentPageHead=Or,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))))))(),r=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await r.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.Header=nr,e.Icon=m,e.LikeAPI=function(e,t=""){async function r(){try{const e=JSON.parse(globalThis.localStorage.getItem(i)||"");if(e?.token)return e}catch(e){}try{const e=await fetch(`${t}/assist/v1/public/auth`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:r,name:a}=await e.json();return globalThis.localStorage.setItem(i,JSON.stringify({token:r,name:a})),{token:r,name:a}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...a){if(!a.length)return[];const{token:n}=await r();try{const r=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n},body:JSON.stringify({node_ids:a})}),{likes:i}=await r.json();return i||[]}catch(e){return console.error(e),[]}},like:async function(a){if(!a)return 0;const{token:n,name:i}=await r();try{const r=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:i},body:JSON.stringify({node_id:a,user_name:i})}),{likes:l}=await r.json();return l||0}catch(e){return console.error(e),0}},dislike:async function(a){if(!a)return 0;const{token:n,name:i}=await r();try{const r=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:i},body:JSON.stringify({node_id:a,user_name:i})}),{likes:l}=await r.json();return l||0}catch(e){return console.error(e),0}}}},e.joinList=cr,e.normalizePage=function(e){if(!e)return;const{blocks:t,slots:r}=e;return{...e,blocks:Gr(t),slots:r&&Object.keys(r).reduce(((e,t)=>({...e,[t]:{...r[t],blocks:Gr(r[t].blocks)}})),{})}},e.projectSettings=o,e.setup=t,e.url=R,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";const t=(e,a)=>{t._jsx=e,t._jsxs=a||e};t.vue=e=>{t(((t,{children:a,dangerouslySetInnerHTML:n,...r}={})=>{const l=Object.assign({},r,n?{innerHTML:n.__html}:{});return e(t,l,"string"!=typeof t?()=>a:a)}))};const a=(...e)=>t._jsx(...e),n=(...e)=>t._jsxs(...e),r=e=>(e._tmpl||(e._tmpl=function(t,a){const{children:n,...r}=t||{},l=a?.slots?.default,i=n||l&&l();return e(Object.assign(r,i&&{children:i}),a)},e._tmpl.inheritAttrs=!1),e._tmpl);const l="likesToken";const i={h1:"text-title-lg tracking-[-0.3px]",h2:"text-title",h3:"text-title-sm",h4:"text-title-xs",h5:"text-title-2xs tracking-[0.2px]",h6:"text-title-2xs tracking-[0.2px]"},s=r((e=>{const{className:t,headingType:n,title:r}=e;if(!n)return;return a(n,{className:`font-sans font-medium m-0 ${i[n]} ${t||""}`,children:r})})),c=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ENABLE_ASSIST(){return this._.ENABLE_ASSIST}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}},o={none:"",primary:"text-primary-main"},m=r((({className:e="",name:t,alt:r=`Icon ${t}`,title:l=r,asSVG:i,color:s="primary",...m})=>{const d=`${c.CDN||""}icons/${t}.svg`;return i?n("svg",{className:`${o[s]} ${e}`,...m,"aria-hidden":"true",children:[l?a("title",{children:l}):null,r?a("desc",{children:r}):null,a("use",{href:`${d}#icon`,xlinkHref:`${d}#icon`})]}):a("img",{className:e,src:d,alt:r,title:l,...m,"aria-hidden":"true"})})),d={left:"text-left",center:"text-center",right:"text-right"},h=r((({bgColor:e="transparent",align:t="left",className:r="",title:l,description:i})=>{const c=d[t];return n("section",{className:`p-[50px] ${e} ${r}`,children:[l&&a(s,{headingType:"h2",className:`text-primary-text ${c}`,title:l}),i&&a("p",{className:`font-normal text-base mt-4 ${c}`,children:i})]})})),x=r((({className:e,iconClassName:t,textClassName:r,suffixClassName:l,doc:i,icon:s})=>{const{text:c,fileSize:o,...d}=i;return n("a",{className:e,role:"link",...d,children:[s?a(m,{className:t,name:s,width:"24px",height:"24px",asSVG:!0}):null,c?n("span",{className:r,children:[c,a("span",{className:l,children:d?.href&&p(u(d.href),o)})]}):null]})})),p=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),u=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},b=r((({className:e="",doc:t,icon:n})=>a(x,{className:`flex h-full box-border ${e}`,iconClassName:"mr-2.5 min-w-6 min-h-6 text-primary-text",textClassName:"self-center",suffixClassName:"text-secondary-text group-hover:text-primary-main",doc:t,icon:n}))),f=r((({className:e,documents:t,columnsMode:n="double",icon:r})=>t?.length?a("div",{className:e,role:"list",children:t.map(((e,t)=>a("div",{className:"double"===n?"basis-[calc(50%-20px)]":"",role:"listitem",children:a(b,{className:"group flex text-sm align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:r})},String(t))))}):null)),g={left:"text-left",center:"text-center",right:"text-right"},N={double:"mb-8",single:"mb-[26px]"},v={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},y=r((({className:e="",title:t,subtitle:r,align:l,documents:i,icon:c="DocIcon",columnsMode:o="double"})=>n("section",{className:`font-sans text-primary-text p-12 bg-white ${e}`,children:[t?a(s,{headingType:"h2",className:`${r?"mb-2.5":N[o]} ${g[l??"center"]}`,title:t}):null,r?a("h3",{className:`text-base mt-0 font-normal ${N[o]} ${g[l??"center"]}`,children:r}):null,a(f,{className:v[o],columnsMode:o,documents:i,icon:c})]}))),w=r((({className:e="",image:{size:t,...r}})=>{const l={width:t?.width?`${t?.width}px`:"100%",height:t?.height?`${t?.height}px`:"100%"};return n("picture",{className:`flex-none ${e}`,children:[r.sources?.length?r.sources.map((({src:e,format:t},n)=>a("source",{srcSet:e,type:$(t)},`${n}_${e}`))):null,a("img",{className:r.className||"",src:r.src,alt:r.alt||r.title,title:r.title,style:l,...t})]})}));function $(e){return e?`image/${String(e)}`:void 0}const k=r((({className:e="",title:t,image:r,benefits:l})=>n("section",{className:`relative font-sans text-primary-text bg-white p-14 ${e}`,children:[a(s,{headingType:"h2",className:"text-center",title:t}),n("div",{className:"flex justify-center mt-9",children:[r?.src&&a(w,{className:"mr-6",image:r}),l?.length?a("div",{className:"flex flex-col",children:l.map(C)}):null]})]})));function C(e,t){return n("div",{className:"flex flex-row mb-8",children:[e.icon&&a(m,{className:"w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]",name:e.icon,width:"48",height:"48",asSVG:!0}),n("div",{className:"flex gap-1 flex-col h-full ml-5 max-w-[490px]",children:[e.label&&a("div",{className:"font-medium text-primary-text text-xl m-0",children:e.label}),e.description&&a("div",{className:"font-normal text-sm text-secondary-text",children:e.description})]})]},String(t))}const S={primary:{background:"bg-white",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"},secondary:{background:"bg-primary-main",icon:"bg-white text-primary-main",title:"text-white",description:"text-white"},"secondary-light":{background:"bg-primary-main/10",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"}},T=r((({title:e,description:t,blockVersion:r="primary",iconVersion:l,image:i,className:s})=>{const c=S[r];return n("section",{className:`font-sans px-9 py-4 flex ${c.background} ${s||""}`,children:["small"===l?D(c.icon):null,"big"===l?L(i):null,n("div",{className:"py-0.5",children:[e&&a("div",{className:`font-medium text-base mb-1 ${c.title}`,children:e}),t&&a("div",{className:`text-sm ${c.description}`,children:t})]})]})}));function D(e){return a("div",{className:"pt-1.5 pl-1 pr-4",children:a("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function L(e){return e?.src?a(w,{className:"pt-0.5 pr-3",image:e}):null}const I=e=>e?.includes("//"),R=e=>(e||"").replace(/\/?\?.*/,""),j=e=>{if(!e||!I(e))return;const t=e,a=t.indexOf("//"),n=t.indexOf("/",a+"//".length);return-1!==n?t.substring(0,n):t};var _=Object.freeze({__proto__:null,isURL:I,withoutQuery:R,getOrigin:j});const M="/mobile",A=(e,t)=>{if(!e)return e;const a=j(t?.href);return a?e.replace(a,"")||"/":e},V=e=>e;function P({router:e,handlerDecorator:t=V},a){const n=((e,t)=>{if(!e)return e;const a=A(e,t)||"",n=t?.pathname.startsWith(M);return n&&!I(a)?`/mobile${a}`:a})(a.href,e);return{...a,href:n,ariaLabel:a.text,onClick:t((t=>{const r=n&&!I(n),l=!a.target||"_self"===a.target;r&&l&&(t.preventDefault(),e.push(n))}),a)}}const B=r((({text:e,aboveText:t,appendLeft:r,rounded:l,version:i})=>{const s=!e&&!t&&Boolean(r);return function({buttonInnerClasses:e,appendLeft:t,withoutText:r,aboveText:l,text:i}){return n("div",{className:e,children:[t||null,r?null:n("div",{children:[a("div",{className:"text-m-2xs text-left",children:l}),a("div",{className:"text-m-button font-medium text-left",children:i})]})]})}({buttonInnerClasses:"link"!==i?`flex items-center justify-center\n ${s?"h-12 w-12":"px-8 gap-2 "+(t?"py-2":"py-3.5")} ${l?"rounded-full":""}`:null,appendLeft:r,withoutText:s,aboveText:t,text:e})}));const O={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active",link:""},F={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},Z="text-center font-sans select-none",E=r((({className:e,text:t,aboveText:n,appendLeft:r,href:l,target:i,onClick:s,children:c,disabled:o,rounded:m,version:d="none",ariaLabel:h,...x})=>{const p=c??a(B,{text:t,aboveText:n,appendLeft:r,rounded:m});return o?function({className:e,buttonInner:t,ariaLabel:n,version:r,rounded:l}){return a("div",{role:"button","aria-disabled":"true","aria-label":n,tabIndex:"-1",className:`inline-block ${Z} ${F[r]||""} ${l?"rounded-full":"rounded-md"} ${e||""}`,children:t})}({buttonInner:p,ariaLabel:h,className:e,version:d,rounded:m}):function({className:e,buttonInner:t,ariaLabel:n,version:r,rounded:l,href:i,target:s,onClick:c,rest:o}){return a("a",{className:`${Z} inline-block cursor-pointer no-underline ${O[r]||""} ${l?"rounded-full":"rounded-md"} ${e||""}`,href:i,target:s,onClick:c,"aria-label":n,role:i?"link":"button",...o,children:t})}({buttonInner:p,ariaLabel:h,className:e,version:d,rounded:m,href:l,target:i,onClick:s,rest:x})}));const G=r((({context:e,className:t="",buttons:n})=>{const{handlerDecorator:r}=e,l=e.useRouter();return n?.length?a("div",{className:`${t}`,children:n.map(((e,t)=>function({icon:e,...t},n){if(!t?.text)return;return a(E,e?{appendLeft:a(m,{name:e,width:"24",height:"24",asSVG:!0}),...t}:{...t},String(n))}(P({router:l,handlerDecorator:r},e),t)))}):null}));const H=r((e=>{const{className:t="",description:n}=e;return a("div",{className:`font-normal text-m-md ${t}`,children:n})})),U={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text"},W={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},z=r((({className:e="",isDotted:t=!0,children:r,version:l="primary"})=>n("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&a("div",{className:J(l)}),a("span",{className:`text-m-md ${U[l]}`,children:r})]}))),J=e=>`rounded-full inline-block mr-3 mt-2 ${W[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,X=r((e=>{const{className:t="",itemClassName:n,isDotted:r,items:l,version:i}=e;return a("section",{className:`${t}`,role:"list",children:l?.length?l.map(((e,t)=>a(z,{className:n,isDotted:r,version:i,children:e},String(t)))):null})})),Q=r((({className:e="",title:t,children:r,buttons:l,image:i})=>n("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,n("div",{className:"flex grow w-full justify-between",children:[n("div",{className:"flex flex-col justify-between w-full",children:[a("div",{children:r}),l?.length?a("div",{children:l}):null]}),i]})]}))),q=e=>{const t="col-span-",a=e.split(/\s+/).find((e=>e.startsWith(t)));return a?parseInt(a.substring(t.length),10):12};function K(e=""){const t=q(e);return t<=4?"h4":t<=8?"h3":"h2"}function Y(e=""){const t=q(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function ee(e=""){const t=q(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const te={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ae=r((e=>{const{context:t,title:r,description:l,items:i,children:c,buttons:o,image:m,className:d="",version:h="primary",role:x}=e;return a("section",{className:`overflow-hidden font-sans p-9 box-border ${d} ${te[h]} ${ee(d)} ${Y(d)} `,role:x,children:n(Q,{context:t,title:r&&a(s,{headingType:K(d),title:r,className:`whitespace-pre-wrap max-w-[600px] ${r?"mb-3":""}\n ${"primary"===h?"text-primary-text":""}`}),buttons:o?.length?a(G,{context:t,buttons:o,className:"flex mt-9 gap-3"}):null,image:m?.src&&a(w,{className:"mt-auto ml-7",image:m}),children:[l&&a(H,{className:"mt-4 max-w-[600px]",description:l}),c,ne(i,h)]})})}));function ne(e,t){return e?.length?a(X,{items:e,version:t}):null}const re={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},le=r((({context:e,className:t="",title:r,description:l,benefits:i,buttons:c,image:o,version:m="primary"})=>a("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${t} ${re[m]} ${ee(t)} ${Y(t)} `,children:n(Q,{context:e,title:r&&a(s,{headingType:K(t),title:r,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:c?.length?a(G,{context:e,buttons:c,className:"flex mt-9 gap-3"}):null,image:o?.src&&a(w,{className:"mt-auto ml-7",image:o}),children:[l&&a(H,{className:"mt-4 max-w-[600px]",description:l}),n("div",{className:"flex mt-5 mb-1",children:[i?.length?a("div",{className:"mr-8",children:i.map(ie)}):null,i?.length?a("div",{className:"pt-1",children:i.map(((e,t)=>function(e,t,n="primary"){return a("div",{className:`text-sm ${t?"mt-4":""} ${{primary:"text-secondary-text",secondary:"text-white"}[n]}`,children:e.description},String(t))}(e,t,m)))}):null]})]})})));function ie(e,t){return a("div",{className:"text-xl font-medium "+(t?"mt-2.5":""),children:e.label},String(t))}const se=r((({className:e,viewBox:t,fill:n="none",width:r,height:l,paths:i,...s})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:r,height:l,children:i.map((({d:e,fill:t,...n},r)=>a("path",{d:e,fill:t||"currentColor",...s,...n},r)))}))),ce=[{d:"m9 12 4-4-4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",fill:"none"},{d:"M2 9a1 1 0 0 1 0-2v2Zm6-2a1 1 0 0 1 0 2V7ZM2 7h6v2H2V7Z"}],oe=r((({className:e,disabled:t,...n})=>a(E,{rounded:!0,className:`shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...n,children:a(se,{paths:ce,viewBox:"0 0 16 16",fill:"none",width:"16",height:"16"})}))),me={primary:"bg-white text-secondary-text",secondary:"bg-primary-main text-white"},de={normal:3,mini:4},he={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},xe={normal:380,mini:276},pe={primary:"text-secondary-text",secondary:"text-white",gray:"text-secondary-text"},ue={primary:"bg-primary-main",secondary:"bg-white",gray:"bg-secondary-text"},be=r((({className:e="",isDotted:t=!0,text:r,children:l,version:i="primary"})=>n("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&a("div",{className:fe(i)}),a("span",{className:pe[i],children:r||l})]}))),fe=e=>`rounded-full inline-block mr-3 mt-2 ${ue[e]} ${"gray"===e?"w-[6px] h-[6px] min-w-[6px] min-h-[6px]":"w-2 h-2 min-w-2 min-h-2"}`,ge=r((({title:e,description:t,image:r,items:l,button:i,version:s})=>{const c=function(e,t,a){return`font-medium text-xl m-0\n ${"secondary"!==e?"text-primary-text":""}\n ${t||a?.length?"":"text-center"}\n `}(s,t,l);return n("div",{children:[n("div",{children:[r?.src?a("div",{className:"flex justify-center",children:a(w,{className:"mb-6",image:r})}):null,e?ve(e,c):null,t?a("div",{className:"font-normal text-sm "+(e?"mt-2":""),children:t}):null,l?.length?ye(l,s):null]}),i?.text?Ne(i):null]})}));function Ne(e){return a(E,{className:"mt-6 w-full",appendLeft:e.icon&&a(m,{name:e.icon,width:"24px",height:"24px",asSVG:!0}),...e})}function ve(e,t){return a("div",{className:`font-medium text-xl m-0 ${t}`,children:e})}function ye(e,t){return a("section",{className:"max-w-[308px] mt-2",role:"list",children:e.filter((e=>e?.text)).map(((e,n)=>function(e,t,n){return a(be,{version:n??"primary",children:a("span",{className:"text-sm",children:e})},String(t))}(e.text,n,t)))})}const we=r((({context:e,title:t,description:r,cards:l=[],version:i="normal",activeCardIndex:c})=>n("div",{children:[a("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent"}),n("div",{className:"flex flex-col items-center mb-8",children:[t?a(s,{headingType:"h2",className:"text-center",title:t}):null,r?a("div",{className:"font-normal text-base max-w-[600px] mt-2.5",children:r}):null]}),a("div",{className:`flex ${l?.length<=de[i]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${c*xe[i]}px)`},role:"list",children:l?.map(((t,n)=>function({card:e,version:t},n){return a("section",{className:`box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between\n items-stretch ${he[t]} ${me[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:a(ge,{...e})},String(n))}({card:t,version:i,context:e},n)))})]})));const $e=r((({context:e,cards:t=[],className:r="",version:l="normal",...i})=>{const[s,c]=e.useState(0),o=t?.length>de[l],m=o&&t?.length-s>de[l],d=o&&s>0;return n("section",{className:`relative font-sans text-primary-text bg-white p-[50px] overflow-hidden ${r}`,children:[a(we,{context:e,cards:t,version:l,activeCardIndex:s,...i}),d&&a(oe,{className:"absolute top-1/2 left-8 rotate-180 z-10 mt-[25px]",onClick:()=>c(s-1),ariaLabel:"Пролистать влево"}),m&&a(oe,{className:"absolute top-1/2 right-8 z-10 mt-[25px]",onClick:()=>c(s+1),ariaLabel:"Пролистать вправо"}),a("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white"}),a("div",{className:"absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white"})]})})),ke=r((e=>a($e,{...e,version:"normal"}))),Ce=r((e=>a($e,{...e,version:"mini"}))),Se=r((({className:e="",documents:t})=>a("section",{className:`font-sans bg-white mt-[10px] ${e}`,children:a("ul",{className:"flex flex-col text-sm text-secondary-text p-0",children:t?.length?Te(t):null})}))),Te=e=>e.map(((e,t)=>{const{text:n,...r}=e;return a("li",{className:"mb-4 list-none",children:a("a",{className:"hover:text-primary-main",role:"link",...r,children:n||null})},`list_item_${String(t)}`)})),De={Headline:h,LinkDocs:y,TextBlock:T,PictureText:k,Tile:ae,ProductTile:le,Gallery:ke,MiniGallery:Ce,LinkList:Se},Le=r((({blocks:e,context:t})=>a("div",{className:"transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0",children:e?.length?e.map(Ie(t)):null}))),Ie=e=>(t,n)=>{const r=t?.accordionBlockType;if(!r||!(r in De))return null;return a("div",{className:"mb-5 last:mb-0 pb-5",children:a(De[r],{context:e,...t,className:"!p-0"})},`block_${n}`)},Re=r((({label:e,blocks:t,context:r})=>{const{hasContent:l,icon:i,handleToggle:s}=(({context:e,blocks:t})=>{const[a,n]=e.useState(!1),r=t?.length;return{isActive:a,hasContent:r,icon:a?"MinusIcon":"PlusIcon",handleToggle:e=>{if(!r)return;n(!a);const t=(({currentTarget:e})=>e.nextSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:r,blocks:t});return n("li",{className:"border-0 border-b border-solid border-main-divider last:border-b-0",children:[n("button",{className:"border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans text-primary-text\n "+(l?"group cursor-pointer":""),onClick:s,children:[a("span",{className:"text-xl pr-2.5 font-medium "+(l?"group-hover:text-primary-main":""),children:e}),l?a(m,{name:i,width:"24",height:"24",asSVG:!0}):null]}),l?a(Le,{blocks:t,context:r}):null]})})),je=r((({title:e,accordionItems:t,context:r,className:l})=>n("section",{className:`p-[50px] font-sans bg-white text-primary-text ${l||""}`,children:[e?a(s,{headingType:"h4",className:"mb-2.5",title:e}):null,t?.length?a("ul",{className:"list-none m-0 p-0",children:t.map(((e,t)=>a(Re,{...e,context:r},`AccordionItem${t}`)))}):null]}))),_e=r((({className:e,title:t,benefits:r})=>n("section",{className:`font-sans text-primary-text bg-white p-12 flex flex-col items-center ${e||""}`,children:[t?a(s,{headingType:"h2",className:"max-w-[47rem] text-center",title:t}):null,r?.length?a("div",{className:"grid grid-cols-2 gap-8 mt-9",children:r.map(Me)}):null]}))),Me=(e,t)=>n("div",{className:"flex items-center gap-5 max-w-[500px]",children:[e.icon&&a(m,{className:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",name:e.icon,width:"70",height:"70"}),n("div",{children:[a("h3",{className:"font-medium text-xl m-0",children:e.label}),e.description&&a("div",{className:"font-normal text-sm mt-2",children:e.description})]})]},String(t)),Ae=({colData:e,colsLengthForScroll:t,activeCardIndex:a,setActiveCardIndex:n})=>{const r=e?.length&&e.length>t;return{nextClick:()=>n(a+1),prevClick:()=>n(a-1),isScrollAvailable:r,showNextButton:r&&e?.length-a>t,showPrevButton:r&&a>0}},Ve="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",Pe="border-main-stroke border-solid border",Be="border-main-divider border border-t-0 border-x-0",Oe="w-[200px] mr-6",Fe=r((({icon:e,image:t,title:r,link:l})=>n("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${Pe} ${Ve}`,role:"columnheader",scope:"col",children:[e&&!t?.src&&a(m,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",name:e,width:"63",height:"63"}),t?.src&&a(w,{className:"mb-[18px]",image:t}),r&&a(s,{headingType:"h4",className:"text-center text-white",title:r}),l?.text&&a("div",{className:"mt-auto w-full",children:a(E,{href:l.href,target:l.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:a("div",{className:"font-medium text-xs py-[11px]",children:l.text})})})]}))),Ze={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},Ee=r((({children:e,activeCardIndex:t,columnWidth:n,version:r="comparison"})=>a("div",{className:"flex flex-1 overflow-hidden",children:a("div",{className:Ze[r],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Ge=r((({cell:e,isFirstRow:t,isLastRow:n,isFillGradient:r})=>a("div",{className:`w-80 box-border flex flex-col ${Pe} ${n?"border-t-0 rounded-b-md":"border-y-0"} ${r?Ve:""}`,role:"cell",children:a("div",{className:`mx-7 h-full ${Be} ${r&&t?"border-t":""} ${n?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>He(e,t,r)))})}))),He=({label:e,description:t},r,l)=>n("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e&&a("h5",{className:"text-xl font-medium m-0 "+(l?"text-white":""),children:e}),t&&a("div",{className:"text-sm opacity-80 "+(l?"text-white":"text-secondary-text"),children:t})]},String(r)),Ue=r((({children:e})=>a("div",{className:"self-start flex flex-col",role:"row",children:a("div",{className:"flex",children:e})}))),We=r((({row:{header:e,data:t},activeCardIndex:r,isColoredFirstColumn:l,isFirstRow:i,isLastRow:s})=>n(Ue,{children:[e?.title?a("div",{className:`text-sm py-7 ${Be} w-[200px] mr-6 ${s?"border-b-0":"border-solid"}`,children:e.title}):null,t?.length?a(Ee,{activeCardIndex:r,columnWidth:336,children:t.map(((e,t)=>a(Ge,{cell:e,isFirstRow:i,isLastRow:s,isFillGradient:l&&0===t},String(t))))}):null]}))),ze=r((({className:e,context:t,title:r,rowHeaders:l,columns:i,visibleRowLength:c=0,isColoredFirstColumn:o=!1})=>{const m=t.useRouter(),{handlerDecorator:d}=t,[h,x]=t.useState(0),[p,u]=t.useState(!c),b=i?.map((({header:e})=>e||{})),f=i?.map((({data:e})=>e))||[],g=l?.map(((e,t)=>({header:e,data:f.map((e=>e?.[t]||[{}]))}))).slice(0,p?l.length:c),{nextClick:N,prevClick:v,isScrollAvailable:y,showNextButton:w,showPrevButton:$}=Ae({colData:f,colsLengthForScroll:2,activeCardIndex:h,setActiveCardIndex:x});return n("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,children:[a(s,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:r}),n("div",{role:"table",children:[b?.length?n(Ue,{children:[a("div",{className:Oe,role:"columnheader",scope:"col"}),a(Ee,{activeCardIndex:h,columnWidth:336,children:b.map(((e,t)=>a(Fe,{...e,link:e.link&&P({router:m,handlerDecorator:d},e.link)},String(t))))})]}):null,g?.length?n("div",{className:"relative",children:[g.map(((e,t,{length:n})=>a(We,{row:e,isFirstRow:0===t,isLastRow:t+1===n,activeCardIndex:h,isColoredFirstColumn:o},String(t)))),y?a("div",{children:n("div",{className:"absolute top-7 right-7 z-10",children:[a(oe,{onClick:N,disabled:!w,ariaLabel:"Пролистать вправо"}),a(oe,{className:"mt-4 rotate-180",onClick:v,disabled:!$,ariaLabel:"Пролистать влево"})]})}):null]}):null]}),y?a("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null,c?a("div",{className:"pr-[50px]",children:n("div",{className:"flex w-full",children:[a("div",{className:Oe}),a("button",{onClick:()=>u(!p),className:"mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:a("div",{className:"font-sans font-medium text-xs py-[11px]",children:p?"Скрыть":"Показать все параметры"})})]})}):null]})}));async function Je(e){const t=await fetch(e);return await t.json()}const Xe=[{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"}],Qe=r((({text:e,checked:t,onChange:r,className:l})=>a("div",{className:l,children:n("label",{className:"flex items-center cursor-pointer relative",children:[a("input",{className:`peer appearance-none w-5 h-5 border-solid border ${t?"border-black":"border-main-stroke"} rounded checked:bg-primary-main checked:border-primary-main m-0`,type:"checkbox",onChange:e=>{r(e.target.checked)},checked:t}),a(se,{paths:Xe,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),e?a("span",{className:"font-sans ml-3 text-sm leading-5 cursor-pointer",children:e}):null]})}))),qe=(e,t,a)=>Math.max(t,Math.min(e,a)),Ke=3e4,Ye=3e6,et=Math.round(41.5);const tt=e=>new Intl.NumberFormat("ru-RU",{maximumSignificantDigits:3}).format(e),at=r((({className:e,title:t,items:r=[],min:l=1,max:i=100,step:s=1,value:c=l,onChange:o})=>{const m=e=>{if(!o)return;const t=Number(e.replace(/\D/g,""));o(t)},d={backgroundSize:`${(100*(c-l)/(i-l)).toFixed(2)}% 100%`};return n("div",{className:e,children:[n("label",{className:"block relative",children:[t?a("span",{className:"absolute text-xs text-secondary-text top-1 mt-0.5 pl-4 ml-0.5",children:t}):null,a("input",{className:"m-0 font-sans text-sm w-full h-12 border border-solid border-main-stroke rounded-md\n outline-none p-0 pl-4 m-0 box-border text-primary-text "+(t?"pt-4":""),value:tt(c),onChange:e=>m(e.target.value),onBlur:()=>{o&&(c<l&&o(l),c>i&&o(i))}}),a("div",{className:"absolute inset-x-0 top-[35px] px-4 leading-[18px]",children:a("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:l,max:i,step:s,value:c,onChange:e=>m(e.target.value),style:d})})]}),a("div",{className:"flex justify-between my-3",children:r.map(((e,t)=>n("span",{className:"text-xs leading-[14px] text-secondary-text pl-4",children:[" ",e," "]},String(t))))})]})}));function nt(e){const{minMonths:t,maxMonths:n,monthsValue:r,defaultMonths:l,setMonthsValue:i}=e;return a(at,{className:"mt-[23px]",title:"Срок кредита, месяцев",items:["Или выберите из предложенных вариантов ниже"],min:t,max:n,step:1,value:r||l,onChange:i})}function rt(e,t){return n("div",{className:"box-border h-fit p-9 bg-primary-main rounded-md text-white",children:[a("div",{className:"text-base mb-[18px]",children:"Наше предложение"}),a("div",{className:"text-sm opacity-60",children:"Ежемесячный платёж"}),n("div",{className:"text-lg mb-3",children:[tt(Math.round(e))," ₽"]}),a("div",{className:"text-sm opacity-60",children:"Ставка"}),n("div",{className:"text-lg",children:[t," %"]})]})}function lt(e){const{calculatorParams:t,moneyValue:n,defaultSum:r,setMoneyValue:l}=e,i=t?.minSum||Ke,s=t?.maxSum||Ye;return a(at,{title:"Желаемая сумма кредита, ₽",items:[`От ${tt(i)} рублей`,`До ${tt(s)} рублей`],min:i,max:s,step:1e3,value:n||r,onChange:l})}const it=r((({context:e,className:t="",directoryName:r})=>{const[l,i]=e.useState(void 0),[s,c]=e.useState(void 0),[o,m]=e.useState(!0),[d,h]=e.useState(!0),x=function(e,t){const{data:a}=e(function(e){return`/wcms-resources/${e||"credit-calculator-data"}.json`}(t),Je);return a||{}}(e.useAsyncData,r).rows,p=(e=>{const{tableRows:t,isAnnuity:a=!1}=e;return t&&t.find((e=>e.isAnnuity===a))||{}})({tableRows:x,isAnnuity:o}),u=(e=>e.maxSum&&e.minSum?(e.maxSum-e.minSum)/2:1485e3)(p),b=(e=>e.maxMonths&&e.minMonths?Math.round((e.maxMonths-e.minMonths)/2):et)(p),f=p?.minMonths||1,g=p?.maxMonths||84,N=(e=>{const{calculatorParams:t,isInsurance:a}=e;return t?a?t?.rateWithInsurance||5:t?.rateWithoutInsurance||5:5})({calculatorParams:p,isInsurance:d}),v=(e=>{const{calculatorParams:t,paymentType:a,rate:n,sum:r,months:l}=e;if(!t)return 0;const i=qe(r,t.minSum||Ke,t.maxSum||Ye);if("annuity"===a){const e=Number(n)/1200;return i*(e+e/(Math.pow(1+e,l)-1))}return i/l+i*(Number(n)/12)})({calculatorParams:p,paymentType:"annuity",rate:N,sum:l||u,months:s||b}),y=((e,t)=>{const a=Math.ceil((t-e)/12),n=Math.floor(e/12)+1,r=new Array(Math.min(a-1,5)).fill(0).map(((e,t)=>n+t)),l=a+n-1;return r.concat(l)})(f,g);function w(e){c(qe(12*e,f,g))}return a("section",{className:`font-sans text-primary-text p-10 bg-white ${t}`,children:n("div",{className:"box-border p-[49px] pr-[56px] mx-auto w-max border-solid border-[3px] border-primary-main rounded-md",children:[n("div",{className:"flex justify-between",children:[n("div",{className:"mr-[42px]",children:[lt({calculatorParams:p,moneyValue:l,defaultSum:u,setMoneyValue:i}),nt({minMonths:f,maxMonths:g,monthsValue:s,defaultMonths:b,setMonthsValue:c}),a("div",{className:"flex mb-7",children:y.map(((e,t)=>function(e,t,r){return a("button",{className:"bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none",onClick:()=>r(e),children:n("span",{className:"font-semibold text-sm",children:[e," ",1===e?"год":e>4?"лет":"года"]})},String(t))}(e,t,w)))}),a(Qe,{text:"Получаю пенсию на карту Россельхозбанка",checked:o,onChange:m}),a(Qe,{className:"mt-3 mb-7",text:"Комплексная страховая защита",checked:d,onChange:h})]}),rt(v,N)]}),n("div",{className:"flex items-center",children:[a(E,{className:"mr-3",text:"Отправить заявку",version:"primary",href:"#"}),a("div",{className:"w-80 text-2xs leading-4 text-secondary-text","aria-label":"Соглашение на обработку персональных данных",children:"Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно требованиям ФЗ «О персональных данных»"})]})]})})}));async function st(){try{const e=await fetch(ct);return await e.json()}catch(e){console.error(e)}}const ct="/api/v1/exchangerates.json",ot=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),mt=e=>e?ot.format(e):"",dt="text-left font-normal text-sm text-secondary-text",ht={USD:"DollarIcon",EUR:"EuroIcon"},xt=r((({className:e,exchangeCurrencyItems:t})=>n("table",{className:`h-fit w-fit ${e}`,children:[a("thead",{children:n("tr",{children:[a("th",{className:dt,children:"Валюта"}),a("th",{className:`${dt} pl-11`,children:"Купить"}),a("th",{className:`${dt} pl-11`,children:"Продать"})]})}),a("tbody",{children:t.map((e=>pt(e)))})]}))),pt=e=>{const t=e?.currency?.currency;return n("tr",{children:[a("td",{className:"pt-4",children:n("div",{className:"flex items-center",children:[t?a(m,{name:ht[t],width:"24",height:"24"}):null,a("span",{className:"ml-2",children:t})]})}),a("td",{className:"pt-4 pl-11",children:mt(e.buyExchangeRate)}),a("td",{className:"pt-4 pl-11",children:mt(e.saleExchangeRate)})]},t)},ut=r((({className:e="",address:t,distance:r})=>n("div",{className:`flex text-sm ${e}`,children:[a(m,{className:"min-w-fit",name:"GpsIcon",width:"24",height:"24",asSVG:!0}),n("div",{className:"ml-1.5",children:[t?a("p",{className:"m-0",children:t}):null,r?n("p",{className:"text-secondary-text m-0",children:["Курс указан для ближайшего офиса - ",r]}):null]})]}))),bt=r((({className:e="",id:t,name:n,type:r="text",placeholder:l})=>a("input",{className:e,id:t,name:n||t,type:r,placeholder:l}))),ft=r((({className:e="",id:t,name:n,children:r})=>a("select",{className:e,id:t,name:n||t,children:r}))),gt=r((({className:e="",value:t,children:n})=>a("option",{className:e,value:`${t}`,children:n}))),Nt=r((({codes:e,className:t=""})=>n("div",{className:`grid gap-3.5 ${t}`,children:[vt("Хочу продать",e),vt("Получу",e),a(E,{className:"box-border mt-3.5 py-3 h-12 w-44",version:"primary",href:"#",children:"Купить валюту"})]})));function vt(e,t){return n("div",{className:"flex items-center",children:[a(bt,{className:"h-10 border pl-2.5 rounded-md text-m-sm w-full appearance-none",type:"number",placeholder:`${e}`}),t.length?a(ft,{className:"h-9 -translate-x-16",children:t.map(((e,t)=>a(gt,{value:e,children:e},String(t))))}):null]})}const yt=["USD","EUR"],wt=["RUB","USD","EUR"],$t=[{buyExchangeRate:90.6,saleExchangeRate:92.8,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:73.75,saleExchangeRate:75.95,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],kt={address:"Москва, ул.Ленина д.28",distance:"6км"},Ct=r((({className:e="",context:t,title:r="Курсы обмена валют"})=>{const l=function(e){const{data:t}=e(ct,st);return t||{}}(t.useAsyncData)?.exchangeRate?.currencies?.filter((e=>-1!==yt.indexOf(e?.currency?.currency||"")))||$t;return a("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,children:a(Q,{context:t,title:a(s,{headingType:K(e),title:r,className:"whitespace-pre-wrap mb-3"}),children:n("div",{className:"flex",children:[n("div",{className:"mr-20 pt-3",children:[l?a(xt,{className:"mb-7",exchangeCurrencyItems:l}):null,a(ut,{...kt})]}),l?.length?a(Nt,{className:"grow",exchangeCurrencyItems:l,codes:wt}):null]})})})})),St=["m13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z","M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z","M33.93 35.53c.3-.41.6-.85.87-1.3v-2.66h-.87v3.96Zm2.54-4.92c.12-.4.24-.78.34-1.16h-2.88v.7h.43c.77-.02 1.63-.03 2.11.46Zm-19.19-1.27h-.78v7.91h.78v-7.9Z","M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z","M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z"],Tt={"bg-white":"text-primary-main",transparent:"text-white"},Dt={"bg-white":"text-black",transparent:"text-white"},Lt=r((({className:e,href:t,children:r,targetBlank:l,bgColor:i="bg-white",hideTitle:s})=>n("a",{className:`inline-flex items-center font-sans no-underline ${e||""}`,href:t||"https://rshb.ru/",target:l?"_blank":"_self","aria-label":"Россельхозбанк",children:[a(se,{className:`${Tt[i]} w-10`,viewBox:"0 0 40 45",paths:St.map((e=>({d:e})))}),!s&&a("span",{className:`${Dt[i]} text-base font-medium ml-2.5`,children:r||"Россельхозбанк"})]}))),It=r((({className:e,context:t})=>{const{term:r,setTerm:l}=t.useSearch();return n("form",{className:`relative ${e||""}`,children:[n("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[a("div",{className:"w-[24px] h-[24px]",children:a(m,{name:"LoupeIcon",width:"24",height:"24"})}),!r&&a("label",{htmlFor:"search-bar-input",className:"font-sans font-normal text-base text-secondary-text",children:"Поиск по сайту"})]}),a("input",{id:"search-bar-input",className:"h-12 pl-12 w-full peer font-sans font-normal text-base text-black border border-solid rounded h-full box-border outline-none pr-[6%] border-main-divider focus:border-primary-text",value:r,onChange:e=>l(e.target.value),type:"text",name:"search-bar-input"}),a(E,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-1 right-1",onClick:e=>{e.preventDefault(),console.log("click")},children:a("div",{className:"font-normal text-sm px-9 py-[9px]",children:"Найти"})})]})})),Rt=r((({className:e,items:t,hasButton:r,context:l})=>{const i=l.useRouter(),{handlerDecorator:s}=l;return n("div",{className:`flex flex-col ${e||""}`,children:[t?.length?t.map(jt):null,r?a(E,{version:"primary",className:"mt-0.5 mb-5",...P({router:i,handlerDecorator:s},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),jt=(e,t)=>{const{type:r,text:l,description:i}=e;return n("div",{className:"mb-3.5",children:[a("div",{children:_t(r,l)}),a("div",{className:"font-sans text-sm text-secondary-text",children:i})]},String(t))},_t=(e,t="")=>{switch(e){case"tel":return a("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`tel:${Mt(t)}`,children:t});case"email":return a("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return a("span",{children:t})}},Mt=e=>e.replaceAll(/\D/g,""),At=r((({links:e,className:t="",context:n})=>{const r=n.useRouter(),{handlerDecorator:l}=n;return a("div",{className:t,children:e?.length?a("div",{className:"flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider",children:e.map(((e,t)=>a(Vt,{index:t,...P({router:r,handlerDecorator:l},e)},String(t))))}):null})})),Vt=r((({className:e="",index:t,text:n,href:r,target:l,onClick:i})=>a("a",{className:`font-sans font-normal text-sm text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:r,target:l,onClick:i,children:n||`Документ ${t}`}))),Pt=e=>t=>e?.href===t?.href,Bt=(e,t)=>{return(n=e,r=t,(n||[]).map((e=>r?.find(Pt(e))||e))).concat((a=e,(t||[]).filter((e=>!a?.find(Pt(e))))));var a,n,r};function Ot(e){const{data:t}=e(Zt(),Ft);return t||{}}async function Ft(){const e=await fetch(Zt());return await e.json()}function Zt(){return`/wcms-resources/${c.SITEMAP||"sitemap"}.json`}const Et=r((({className:e,items:t,context:n})=>{const r=Ot(n.useAsyncData),l=Bt(r.topItems,t),i={router:n.useRouter(),handlerDecorator:n.handlerDecorator};return a("div",{className:`flex items-start justify-start gap-11 xl:gap-5 ${e||""}`,children:l?.map(((e,t)=>Gt(e,t,i)))})})),Gt=(e,t,{router:r,handlerDecorator:l})=>{const{text:i,href:s,items:c,target:o}=e;return n("div",{className:"flex flex-col gap-[14px]",children:[a("a",{className:"block font-sans font-medium text-base text-primary-text no-underline",href:s,target:o||"_self",children:i||`Раздел ${t}`}),c?.map(((e,t)=>a(Ht,{...P({router:r,handlerDecorator:l},e),index:t},String(t))))]},String(t))},Ht=r((({text:e,href:t,target:n,index:r})=>a("a",{className:"block font-sans font-normal text-base text-secondary-text hover:text-primary-main no-underline",href:t,target:n||"_self",children:e||`Раздел ${r}`}))),Ut=[{origins:["t.me","telegram.org"],icon:"TelegramIcon",label:"Телеграм",width:"20px",height:"16px"},{origins:["vk.com"],icon:"VKIcon",label:"ВКонтакте",width:"24px",height:"12px"},{origins:["ok.ru"],icon:"OkIcon",label:"Одноклассники",width:"12px",height:"20px"}],Wt=r((({href:e})=>{const{icon:t,width:n,height:r,label:l}=Ut.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};return t?a("a",{className:"flex items-center justify-center border border-solid border-main-divider rounded-full no-underline outline-none w-[38px] h-[38px] hover:text-primary-main",href:e,"aria-label":l,target:"_blank",rel:"noopener noreferrer",children:m&&a(m,{name:t,width:n,height:r,asSVG:!0,className:"block",color:"none"})}):null})),zt=r((({className:e,media:t,context:n})=>{const r=n.useRouter(),{handlerDecorator:l}=n;return a("div",{className:`flex items-end justify-end gap-2 pt-[30px] pb-7 ${e||""}`,children:t?.map(((e,t)=>a(Wt,{...P({router:r,handlerDecorator:l},e)},String(t))))})})),Jt=r((({className:e,links:t,context:r})=>{const l=r.useRouter(),{handlerDecorator:i}=r;return n("div",{className:`${e||""}`,children:[a("div",{className:"pt-5 pb-[5px]",children:a("span",{className:"font-sans font-normal text-xs text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?a("div",{className:"flex justify-start items-start gap-5 pt-[5px]",children:t.map(((e,t)=>a(Xt,{index:t,...P({router:l,handlerDecorator:i},e)},String(t))))}):null]})})),Xt=r((({className:e,index:t,text:n,href:r,target:l,onClick:i})=>a("a",{className:`font-sans font-normal text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:r,target:l,onClick:i,children:n||`Документ ${t}`}))),Qt=r((({className:e,documents:t,relatedEnterprises:r,contacts:l,socialMedia:i,topItems:s,context:c})=>n("footer",{className:`px-9 py-10 bg-white ${e||""}`,children:[n("div",{className:"flex items-stretch gap-[54px] pb-8 xl:gap-8",children:[a(Lt,{className:"w-[280px] xl:w-[220px]"}),a(It,{context:c,className:"grow"})]}),n("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[a(Rt,{className:"w-[280px] shrink-0 overflow-hidden xl:w-[220px]",items:l,context:c,hasButton:!0}),a(Et,{className:"pt-[3px]",context:c,items:s})]}),a(zt,{media:i,context:c}),a(At,{links:r,context:c}),a(Jt,{links:t,context:c})]}))),qt=(e,t,a=((e,t)=>t.startsWith(e)))=>a(R(e),(e=>(e||"").replace(M,""))(R(I(e)?t.href:t.pathname))),Kt=e=>t=>qt(t.href,e),Yt=e=>(t=[])=>{const a=t?.filter(Kt(e));var n;return a?.length?(n=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>n(e)>n(t)?e:t)))(a):null},ea=e=>t=>t.items?.some(Kt(e))||qt(t.href,e)||((e,t)=>j(e)===j(t.href))(t.href,e),ta="absolute left-0 -bottom-3 w-full h-[2px]",aa=r((({className:e,text:t,href:r,target:l,active:i,onClick:s,children:c,bgColor:o="bg-white"})=>n("a",{className:`relative inline-block bg-transparent text-center no-underline ${e||""}`,href:r,target:l,onClick:s,children:[a("span",{className:na(o,i),children:t||c}),i?a("div",{className:ra(o,i)}):null]}))),na=(e,t)=>{let a="text-white";return"bg-white"===e&&(a=t?"text-primary-main":"text-primary-text hover:text-primary-main"),`${a} font-sans font-normal text-base`},ra=(e,t)=>t?`${"bg-white"===e?"bg-primary-main":e} ${ta}`:ta,la=r((({className:e="",text:t,href:n,target:r,active:l,flat:i,onClick:s,children:c,ariaLabel:o,bgColor:m="bg-white"})=>a("a",{className:`${ia(m,l,i)} ${e}`,href:n,target:r,onClick:s,rel:"noopener noreferrer","aria-label":o,children:a("span",{className:sa(m,l,i),children:t||c})}))),ia=(e,t,a)=>{let n="border-transparent";return t&&(n="rounded-md "+("bg-white"===e?"border-primary-main":"border-white")),`${n} inline-block border border-solid bg-transparent text-center no-underline ${a?"":"px-4 py-2"}`},sa=(e,t,a)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":(a?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"),`${n} font-sans font-normal text-sm`},ca=r((({className:e="",children:t,ariaLabel:n})=>a("button",{type:"button",className:`border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${e}`,disabled:!0,"aria-label":n,children:t}))),oa={"bg-white":"text-primary-text hover:text-primary-main",transparent:"text-white"},ma={"bg-white":"text-secondary-light hover:text-secondary-hover",transparent:"text-white"},da={"bg-white":"GridIcon",transparent:"GridIconWhite"},ha=r((({context:e,className:t,defaultLocation:r="",bgColor:l="bg-white"})=>{const[i,s]=e.useGeolocation(r);return n("div",{className:`flex items-center ${t||""}`,children:[a(la,{className:"mr-5",flat:!0,href:"#",text:i,ariaLabel:"Местоположение",onClick:s,bgColor:l}),a(la,{className:"mr-7",flat:!0,href:"#",text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов",bgColor:l}),a(ca,{className:`mr-5 ${oa[l]}`,ariaLabel:"Поиск по сайту",children:a(m,{name:"LoupeIcon",className:"h-full",asSVG:!0,color:"none"})}),a(ca,{className:`mr-5 ${oa[l]}`,ariaLabel:"Профиль",children:a(m,{name:"ProfileIcon",className:"h-full",asSVG:!0,color:"none"})}),a(ca,{className:`${ma[l]} min-w-[32px] min-h-[32px]`,ariaLabel:"Дополнительные ссылки",children:a(m,{name:da[l],className:"h-full",asSVG:!0,color:"none"})})]})})),xa={"bg-white":"bg-main-divider",transparent:"bg-main-divider opacity-30"},pa=r((({className:e,defaultLocation:t,bgColor:r="bg-white",context:l,topItems:i})=>{const s=l.useRouter(),c=Ot(l.useAsyncData),{handlerDecorator:o}=l,m=Bt(c.topItems,i),d=m.find(ea(s)),h=d?.items,x=Yt(s)(h),p=m.map(((e,t)=>a(la,{active:e===d,...P({router:s,handlerDecorator:o},e),ariaLabel:e.text,bgColor:r},String(t)))),u=h?.map((e=>a(aa,{className:"mr-8",active:e===x,...P({router:s,handlerDecorator:o},e),bgColor:r},e.href)));return a("header",{className:`pt-5 pb-8 px-20 ${r} ${e||""}`,children:n("div",{className:"container",children:[n("div",{className:"flex items-center",children:[a(Lt,{className:"mr-8",bgColor:r}),p,a(ha,{context:l,className:"ml-auto",defaultLocation:t,bgColor:r})]}),a("div",{className:`mt-5 h-[1px] ${xa[r]}`}),a("nav",{className:"mt-5",children:u})]})})})),ua=r((({className:e="",context:t,title:r="Мобильное приложение",qr:l,buttons:i=[]})=>a("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${ee(e)} ${Y(e)} `,children:a(Q,{context:t,title:r&&a(s,{headingType:K(e),title:r,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:i?.length?a(G,{context:t,buttons:i,className:"flex mt-9 gap-3"}):null,children:n("div",{className:"flex items-center",children:[l?.src&&l?.href&&a("a",{href:l.href,target:"_blank",children:a("img",{src:l.src,alt:r,title:r,width:"164",height:"164",className:"w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light"})}),a("span",{className:"font-normal text-sm text-secondary-text ml-4",children:"Наведите камеру телефона на QR-код и скачайте приложение"})]})})}))),ba=r((({className:e,text:t,onClick:n,href:r,target:l,isActive:i})=>a("a",{className:`bg-inherit no-underline px-4 py-2.5 cursor-pointer rounded text-sm border border-solid hover:text-primary-main ${e||""} ${i?"border-primary-main text-primary-main":"border-white text-secondary-text"}`,onClick:n,href:r,target:l,children:t}))),fa=r((({className:e,context:t,title:r,buttons:l})=>{const i=t.useRouter(),{handlerDecorator:s}=t,c=Yt(i)(l);return n("section",{className:`font-sans text-primary-text rounded-[40px] flex items-center justify-between ${e||""}`,children:[a("h2",{className:"font-medium text-xl m-0",children:r}),l?.length?a("div",{className:"flex rounded-md overflow-hidden bg-white",children:l.filter((({text:e})=>e)).map(((e,t)=>a(ba,{className:"first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md",isActive:e===c,...P({router:i,handlerDecorator:s},e)},String(t))))}):null]})})),ga=r((({className:e,context:t,title:r,description:l="Блок в разработке..."})=>a("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${ee(e)} ${Y(e)} `,children:n(Q,{context:t,title:r?a(s,{headingType:K(e),title:r,className:"whitespace-pre-wrap max-w-[600px]"}):null,children:[l?a(H,{className:"mt-4 max-w-[600px]",description:l}):null,a("figure",{className:"m-0 min-w-[600px]",children:Na()})]})}))),Na=(e=3)=>ya(100,e).map((e=>Math.floor(e))).map(va),va=(e=100,t)=>a("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),ya=(e,t)=>[e].concat(t>0?ya(e/1.618,t-1):[]),wa=r((({text:e,href:t,target:n,onClick:r,className:l="",children:i})=>t?a("a",{className:`no-underline ${l}`,href:t,target:n,onClick:r,children:a("span",{className:l,children:e||i})}):a("span",{className:l,children:e||i})));function $a(e){return t=>t.reduce(((t,a,n)=>t.length?t.concat({...e,key:n},a):[a]),[])}const ka={primary:"bg-main",secondary:"bg-white/30"},Ca={primary:"text-primary-text",secondary:"text-white"},Sa={primary:"text-secondary-text",secondary:"text-white"};const Ta=r((({className:e="",context:t,title:r,headingType:l="h2",description:i,benefits:c,buttons:o,image:d,items:h,version:x="primary"})=>n("div",{className:`flex grow justify-between items-stretch ${e}`,children:[a("div",{className:"flex flex-col",children:n(Q,{context:t,title:r&&a(s,{headingType:l,title:r,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:o?.length?a(G,{context:t,buttons:o,className:"flex mt-9 gap-3"}):null,children:[i&&a(H,{className:"text-m-base mt-4 max-w-[600px]",description:i}),c?.filter((e=>e.label))?.length?a("div",{className:"flex gap-6 mt-6",children:c.map(((e,t)=>function(e,t,r){return n("div",{className:"flex gap-4 items-center",children:[e.icon&&a(m,{className:`w-[50px] h-[50px] min-w-[50px] min-h-[50px] rounded-full p-[10px] box-border ${ka[r]}`,name:e.icon,width:"24",height:"24",asSVG:!0}),n("div",{className:"flex gap-1 flex-col h-full max-w-[149px]",children:[a("div",{className:`font-medium text-xl m-0 ${Ca[r]}`,children:e.label}),e.description&&a("div",{className:`font-normal text-sm ${Sa[r]}`,children:e.description})]})]},String(t))}(e,t,x)))}):null,h?.length?a(X,{className:"mt-5",items:h,itemClassName:"mb-[10px]",version:x}):null]})}),d?.src&&a(w,{className:"mt-auto",image:d})]}))),Da={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},La={primary:"text-secondary-text",secondary:"text-white/80"},Ia=r((e=>{const{context:t,className:r,breadcrumbs:l,version:i="primary"}=e,s=t.useRouter(),{handlerDecorator:c}=t;return n("section",{className:`font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${r||""} ${Da[i]}`,children:[l?.length?a("div",{className:"text-xs mb-6",children:$a(a("span",{className:`mx-2 ${La[i]}`,children:"/"}))(l.map(((e,t)=>a(wa,{...P({router:s,handlerDecorator:c},{className:La[i],...e})},String(t)))))}):null,a(Ta,{...e})]})})),Ra=r((({className:e,context:t,duration:r=0,slides:l=[]})=>{const i=l.map((e=>e.nav)),s=l.map((e=>e.productBlock)),[c,o]=t.useState(0);return n("section",{className:`font-sans bg-white overflow-hidden w-100 ${e||""}`,children:[a("div",{className:"flex duration-1000",style:{transform:`translateX(-${c}00%)`},role:"list",children:s.map(((e,n)=>function(e,t,n){return a("section",{className:"flex grow-0 shrink-0 basis-full",role:"listitem",children:a("div",{className:"p-10 flex grow",children:a(Ta,{className:"pl-2.5 pt-2.5 pb-1.5 pr-[6.25rem]",context:n,...e})})},String(t))}(e,n,t)))}),a("div",{className:"flex",children:i.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:r,onClick:l,duration:i}){const s=t===r,c=s?"animate-slide":"",o=s?"text-primary-text":"text-secondary-text";return n("button",{type:"button",onClick:l,"aria-label":e?.title,className:"font-sans group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 pt-4 pb-[23px] grow basis-0",children:[n("div",{className:"border-0 border-r border-solid border-main-divider px-6",children:[a("div",{className:`text-sm font-medium pb-[3px] group-hover:text-primary-text ${o}`,children:e?.title}),a("div",{className:"text-xs text-secondary-text",children:e.desc})]}),a("div",{className:`absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${c}`,style:{animationDuration:`${i}s`,animationFillMode:"forwards"}})]},String(t))}({slide:e,i:t,activeSlideIndex:c,onClick:()=>o(t),duration:r})))})]})}));const ja={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},_a=r((({className:e="",context:t,title:r="Акции и спецпредложения",date:l,description:i,buttons:c=[],version:o="primary"})=>a("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${ja[o]} ${ee(e)} ${Y(e)} `,children:a(Q,{context:t,title:r?a(s,{headingType:K(e),title:r,className:"whitespace-pre-wrap max-w-[600px]"}):null,buttons:c?.length?a(G,{context:t,buttons:c,className:"flex mt-9 gap-3"}):null,children:n("div",{className:"mt-1.5",children:[l?a("div",{className:"text-sm mb-2",children:Ma(l)}):null,a("div",{className:"text-base",children:i})]})})})));function Ma(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const Aa=r((({className:e,title:t,showLines:r=!0,steps:l})=>n("section",{className:`box-border font-sans text-primary-text bg-white px-20 py-[50px] flex flex-col items-center ${e||""}`,children:[a(s,{headingType:"h2",className:"max-w-[47rem] text-center",title:t}),l?.length?n("div",{className:"box-border py-0.5 mb-0.5 "+(t?"mt-9":""),children:[a("div",{className:"flex items-center px-[88px]",children:$a(a("div",{className:"h-0.5 w-full bg-secondary-light "+(r?"":"opacity-0")}))(l.map(((e,t)=>Va(e,t))))}),a("div",{className:"flex justify-between gap-x-[101px]",children:l.map(Pa)})]}):null]}))),Va=(e,t)=>a("div",{className:"flex flex-col items-center text-center relative",children:a("div",{className:"h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10",children:e.icon&&a(m,{name:e.icon,width:"48",height:"48"})||a("span",{className:"font-medium text-title-sm text-secondary-text",children:t+1})})},String(t)),Pa=(e,t)=>n("div",{className:"flex flex-col items-center text-center relative w-[276px] whitespace-pre-line overflow-hidden",children:[e.label&&a("div",{className:"font-medium text-xl m-0 mt-4",children:e.label}),e.description&&a("div",{className:"font-normal text-sm text-secondary-text "+(e.label?"mt-2":"mt-4"),children:e.description})]},String(t)),Ba=r((({cell:e,isLastRow:t})=>a("div",{className:"first:pl-0 pl-10 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0 "+(t?"border-t-0 rounded-b-md":""),role:"cell",children:a("div",{children:e.map(((e,t)=>Oa(e,t)))})}))),Oa=({label:e,description:t,list:r,image:l,buttons:i},s)=>n("div",{className:"first:pt-5 last:pb-5",children:[s>0&&a("div",{className:"border-main-divider border border-solid border-t-0 border-x-0 my-4"}),e&&a("div",{className:"text-xl font-medium m-0",children:e}),t&&a("div",{className:"text-sm text-secondary-text",children:t}),r?.items?.length?a("div",{className:"flex flex-col justify-between items-start",children:a("div",{role:"list",children:r.items.map(((e,t)=>a(be,{className:"text-sm",text:e,version:"gray",isDotted:r.isDotted??!0},String(t))))})}):null,l&&a(w,{image:l}),i?.length?i.map((({icon:e,...t},n)=>a(E,{className:(n>0?"ml-3":"")+" w-12 h-12",appendLeft:e&&a(m,{name:e,width:"24px",height:"24px",asSVG:!0}),...t},String(n)))):null]},String(s)),Fa=r((({row:{header:e,data:t},activeCardIndex:r,isLastRow:l})=>n(Ue,{children:[a("div",{className:"text-sm py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0 "+(l?"":"border-solid"),children:n("div",{className:"flex items-center text-primary-text",children:[e?.icon&&a(m,{className:"mr-[14px] max-w-6 max-h-6",name:e.icon,width:"24px",height:"24px",asSVG:!0}),e?.title]})}),t?.length?a(Ee,{activeCardIndex:r,columnWidth:360,version:"tariff",children:t.map(((e,t)=>a(Ba,{cell:e,isLastRow:l},String(t))))}):null]}))),Za={Accordion:je,BenefitsBlock:_e,ComparisonTable:ze,CreditCalculator:it,ExchangeRateTile:Ct,Footer:Qt,Gallery:ke,Header:pa,Headline:h,LinkDocs:y,MiniGallery:Ce,MobileAppTile:ua,PictureText:k,ProductBlock:Ia,ProductGallery:Ra,ProductTile:le,PromoTile:_a,StepsBlock:Aa,TariffsTable:r((({className:e,context:t,title:r,rowHeaders:l,columns:i})=>{const[c,o]=t.useState(0),m=i?.map((({data:e})=>e))||[],d=l?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[{}]))}))),{nextClick:h,prevClick:x,isScrollAvailable:p,showNextButton:u,showPrevButton:b}=Ae({colData:m,colsLengthForScroll:2,activeCardIndex:c,setActiveCardIndex:o});return n("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,children:[a(s,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:r}),n("div",{role:"table",children:[d?.length?n("div",{className:"relative",children:[d.map(((e,t,{length:n})=>a(Fa,{row:e,isLastRow:t+1===n,activeCardIndex:c},String(t)))),p?a("div",{children:n("div",{className:"absolute top-7 right-7 z-10",children:[a(oe,{onClick:h,disabled:!u,ariaLabel:"Пролистать вправо"}),a(oe,{className:"mt-4 rotate-180",onClick:x,disabled:!b,ariaLabel:"Пролистать влево"})]})}):null]}):null,p?a("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})]})})),TextBlock:T,Tile:ae,Navigation:fa,Placeholder:ga},Ea=r((({className:e,onClick:t,ariaLabel:n})=>a("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:Ga()}))),Ga=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return n("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),a("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},Ha=r((({className:e,context:t})=>{const r=t.useLikeService();return n("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,children:[a(Ea,{onClick:r.like,ariaLabel:"Поставить отметку «лайк»"}),a(Ea,{onClick:r.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),a("span",{className:"select-none",children:r.likeCount})]})})),Ua=({blockClassName:e,block:t,render:a})=>a({blockClassName:e,block:t}),Wa=r((({className:e,context:t,blocksRegistry:r,data:{style:l,blocks:i,slots:s={},likeControl:c,colorPalette:o="pc"},blockDecorator:m=Ua})=>{const{header:d}=s;return n("section",{className:`relative ${Ja(l)} ${e||""}`,"data-theme":o,children:[d?.blocks?.length?a("div",{className:`${Ja(d?.style)}`,children:d.blocks.map(((e,a)=>za({block:e,blockDecorator:m,blocksRegistry:r,context:t},a)))}):null,i?.length?a("div",{className:"container grid grid-cols-12 gap-1",children:i.map(((e,a)=>za({block:e,blockDecorator:m,blocksRegistry:r,context:t},a)))}):null,c&&a("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:a(Ha,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t})})]})}));function za({block:e,blockDecorator:t,blocksRegistry:n,context:r},l){const{type:i}=e;i&&i in n||console.warn(`No block with "${i}" is registered`);const s=n[i||"Placeholder"]||ga;return t({blockClassName:Ja(e.style),block:e,render:e=>{const{version:t,content:n}=e.block;return a(s,{className:e.blockClassName,version:t,context:r,...n},`${i}-${l}`)}},`block-${l}`)}function Ja(e){return e?e.join(" "):""}const Xa=r((({HeadComponent:e,data:t,children:r})=>{const{title:l,main:i,og:s,twitter:c,jsonLd:o}=t,{description:m,keywords:d,canonical:h,robots:x}=i||{};return n(e,{children:[a("title",{children:l}),a("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),m&&a("meta",{name:"description",content:m}),d&&a("meta",{name:"keywords",content:d.join(",")}),x&&a("meta",{name:"robots",content:x.join(",")}),Qa(s),qa(c),h&&a("link",{rel:"canonical",href:h}),o&&a("script",{type:"application/ld+json",children:o}),r]})}));function Qa(e){return e?Object.entries(e).map((([e,t])=>a("meta",{name:`og:${e}`,content:t},e))):null}function qa(e){return e?Object.entries(e).map((([e,t])=>a("meta",{name:`twitter:${e}`,content:t},e))):null}function Ka(e){const{mobile:t,...a}=e;return a}function Ya(e){return e?.filter((e=>{return t=e?.type,(t||"")in Za;var t})).map(Ka)}e.Blocks=Za,e.ContentPage=Wa,e.ContentPageHead=Xa,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))))))(),a=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await a.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.Header=pa,e.Icon=m,e.LikeAPI=function(e,t=""){async function a(){try{const e=JSON.parse(globalThis.localStorage.getItem(l)||"");if(e?.token)return e}catch(e){}try{const e=await fetch(`${t}/assist/v1/public/auth`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:a,name:n}=await e.json();return globalThis.localStorage.setItem(l,JSON.stringify({token:a,name:n})),{token:a,name:n}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...n){if(!n.length)return[];const{token:r}=await a();try{const a=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:r},body:JSON.stringify({node_ids:n})}),{likes:l}=await a.json();return l||[]}catch(e){return console.error(e),[]}},like:async function(n){if(!n)return 0;const{token:r,name:l}=await a();try{const a=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:r,UserID:l},body:JSON.stringify({node_id:n,user_name:l})}),{likes:i}=await a.json();return i||0}catch(e){return console.error(e),0}},dislike:async function(n){if(!n)return 0;const{token:r,name:l}=await a();try{const a=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:r,UserID:l},body:JSON.stringify({node_id:n,user_name:l})}),{likes:i}=await a.json();return i||0}catch(e){return console.error(e),0}}}},e.joinList=$a,e.normalizePage=function(e){if(!e)return;const{blocks:t,slots:a}=e;return{...e,blocks:Ya(t),slots:a&&Object.keys(a).reduce(((e,t)=>({...e,[t]:{...a[t],blocks:Ya(a[t].blocks)}})),{})}},e.projectSettings=c,e.setup=t,e.url=_,Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -0,0 +1 @@
1
+ <svg id="icon" width="25" height="25" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.351 5.45a7.5 7.5 0 1 1-3.135 3.135" stroke="#1C1C1C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12.851 15.086a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM12.851 4.086v-2M4.851 12.086h-2M12.851 20.086v2M20.851 12.086h2" stroke="#1C1C1C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -3,6 +3,6 @@ exports.BaseTile = void 0;
3
3
  const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const uni_jsx_1 = require("@redneckz/uni-jsx");
5
5
  exports.BaseTile = (0, uni_jsx_1.JSX)(({ className = '', title, children, buttons, image }) => {
6
- return ((0, jsx_runtime_1.jsxs)("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, (0, jsx_runtime_1.jsxs)("div", { className: "flex grow w-full justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col justify-between w-full", children: [(0, jsx_runtime_1.jsx)("div", { children: children }), (0, jsx_runtime_1.jsx)("div", { children: buttons })] }), image] })] }));
6
+ return ((0, jsx_runtime_1.jsxs)("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, (0, jsx_runtime_1.jsxs)("div", { className: "flex grow w-full justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col justify-between w-full", children: [(0, jsx_runtime_1.jsx)("div", { children: children }), buttons?.length ? (0, jsx_runtime_1.jsx)("div", { children: buttons }) : null] }), image] })] }));
7
7
  });
8
8
  //# sourceMappingURL=BaseTile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseTile.js","sourceRoot":"","sources":["../../../src/components/BaseTile/BaseTile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAM3B,QAAA,QAAQ,GAAG,IAAA,aAAG,EACzB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;IACtD,OAAO,CACL,iCAAK,SAAS,EAAE,mDAAmD,SAAS,EAAE,aAC3E,KAAK,EACN,iCAAK,SAAS,EAAC,kCAAkC,aAC/C,iCAAK,SAAS,EAAC,sCAAsC,aACnD,0CAAM,QAAQ,GAAO,EACrB,0CAAM,OAAO,GAAO,IAChB,EACL,KAAK,IACF,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"BaseTile.js","sourceRoot":"","sources":["../../../src/components/BaseTile/BaseTile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAM3B,QAAA,QAAQ,GAAG,IAAA,aAAG,EACzB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;IACtD,OAAO,CACL,iCAAK,SAAS,EAAE,mDAAmD,SAAS,EAAE,aAC3E,KAAK,EACN,iCAAK,SAAS,EAAC,kCAAkC,aAC/C,iCAAK,SAAS,EAAC,sCAAsC,aACnD,0CAAM,QAAQ,GAAO,EACpB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,0CAAM,OAAO,GAAO,CAAC,CAAC,CAAC,IAAI,IAC1C,EACL,KAAK,IACF,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -21,4 +21,5 @@ export declare const Blocks: {
21
21
  TextBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./TextBlock/TextBlock").TextBlockProps, any>, context?: any) => any;
22
22
  Tile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Tile/Tile").TileProps, any>, context?: any) => any;
23
23
  Navigation: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Navigation/Navigation").NavigationProps, any>, context?: any) => any;
24
+ Placeholder: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Placeholder/Placeholder").PlaceholderProps, any>, context?: any) => any;
24
25
  };
@@ -14,6 +14,7 @@ const MiniGallery_1 = require("./MiniGallery/MiniGallery");
14
14
  const MobileAppTile_1 = require("./MobileAppTile/MobileAppTile");
15
15
  const Navigation_1 = require("./Navigation/Navigation");
16
16
  const PictureText_1 = require("./PictureText/PictureText");
17
+ const Placeholder_1 = require("./Placeholder/Placeholder");
17
18
  const ProductBlock_1 = require("./ProductBlock/ProductBlock");
18
19
  const ProductGallery_1 = require("./ProductGallery/ProductGallery");
19
20
  const ProductTile_1 = require("./ProductTile/ProductTile");
@@ -45,5 +46,6 @@ exports.Blocks = {
45
46
  TextBlock: TextBlock_1.TextBlock,
46
47
  Tile: Tile_1.Tile,
47
48
  Navigation: Navigation_1.Navigation,
49
+ Placeholder: Placeholder_1.Placeholder,
48
50
  };
49
51
  //# sourceMappingURL=Blocks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Blocks.js","sourceRoot":"","sources":["../../src/components/Blocks.ts"],"names":[],"mappings":";;AAAA,qDAAkD;AAClD,iEAA8D;AAC9D,uEAAoE;AACpE,0EAAuE;AACvE,0EAAuE;AACvE,4CAAyC;AACzC,+CAA4C;AAC5C,4CAAyC;AACzC,kDAA+C;AAC/C,kDAA+C;AAC/C,2DAAwD;AACxD,iEAA8D;AAC9D,wDAAqD;AACrD,2DAAwD;AACxD,8DAA2D;AAC3D,oEAAiE;AACjE,2DAAwD;AACxD,qDAAkD;AAClD,wDAAqD;AACrD,8DAA2D;AAC3D,qDAAkD;AAClD,sCAAmC;AAEtB,QAAA,MAAM,GAAG;IACpB,SAAS,EAAT,qBAAS;IACT,aAAa,EAAb,6BAAa;IACb,eAAe,EAAf,iCAAe;IACf,gBAAgB,EAAhB,mCAAgB;IAChB,gBAAgB,EAAhB,mCAAgB;IAChB,MAAM,EAAN,eAAM;IACN,OAAO,EAAP,iBAAO;IACP,MAAM,EAAN,eAAM;IACN,QAAQ,EAAR,mBAAQ;IACR,QAAQ,EAAR,mBAAQ;IACR,WAAW,EAAX,yBAAW;IACX,aAAa,EAAb,6BAAa;IACb,WAAW,EAAX,yBAAW;IACX,YAAY,EAAZ,2BAAY;IACZ,cAAc,EAAd,+BAAc;IACd,WAAW,EAAX,yBAAW;IACX,SAAS,EAAT,qBAAS;IACT,UAAU,EAAV,uBAAU;IACV,YAAY,EAAZ,2BAAY;IACZ,SAAS,EAAT,qBAAS;IACT,IAAI,EAAJ,WAAI;IACJ,UAAU,EAAV,uBAAU;CACX,CAAC"}
1
+ {"version":3,"file":"Blocks.js","sourceRoot":"","sources":["../../src/components/Blocks.ts"],"names":[],"mappings":";;AAAA,qDAAkD;AAClD,iEAA8D;AAC9D,uEAAoE;AACpE,0EAAuE;AACvE,0EAAuE;AACvE,4CAAyC;AACzC,+CAA4C;AAC5C,4CAAyC;AACzC,kDAA+C;AAC/C,kDAA+C;AAC/C,2DAAwD;AACxD,iEAA8D;AAC9D,wDAAqD;AACrD,2DAAwD;AACxD,2DAAwD;AACxD,8DAA2D;AAC3D,oEAAiE;AACjE,2DAAwD;AACxD,qDAAkD;AAClD,wDAAqD;AACrD,8DAA2D;AAC3D,qDAAkD;AAClD,sCAAmC;AAEtB,QAAA,MAAM,GAAG;IACpB,SAAS,EAAT,qBAAS;IACT,aAAa,EAAb,6BAAa;IACb,eAAe,EAAf,iCAAe;IACf,gBAAgB,EAAhB,mCAAgB;IAChB,gBAAgB,EAAhB,mCAAgB;IAChB,MAAM,EAAN,eAAM;IACN,OAAO,EAAP,iBAAO;IACP,MAAM,EAAN,eAAM;IACN,QAAQ,EAAR,mBAAQ;IACR,QAAQ,EAAR,mBAAQ;IACR,WAAW,EAAX,yBAAW;IACX,aAAa,EAAb,6BAAa;IACb,WAAW,EAAX,yBAAW;IACX,YAAY,EAAZ,2BAAY;IACZ,cAAc,EAAd,+BAAc;IACd,WAAW,EAAX,yBAAW;IACX,SAAS,EAAT,qBAAS;IACT,UAAU,EAAV,uBAAU;IACV,YAAY,EAAZ,2BAAY;IACZ,SAAS,EAAT,qBAAS;IACT,IAAI,EAAJ,WAAI;IACJ,UAAU,EAAV,uBAAU;IACV,WAAW,EAAX,yBAAW;CACZ,CAAC"}
@@ -15,7 +15,7 @@ export interface Search {
15
15
  term: string;
16
16
  setTerm: (t: string) => void;
17
17
  }
18
- export declare type AsyncDataHook = <Data, Error = any>(key: string, fetcher: () => Promise<Data>) => {
18
+ export declare type AsyncDataHook = <Data, Error = any>(key: string, fetcher: (key: string) => Promise<Data>) => {
19
19
  data?: Data;
20
20
  error?: Error;
21
21
  };
@@ -1,5 +1,5 @@
1
- import { UniBlockProps } from '../../types';
2
- import { CreditCalculatorContent } from './CreditCalculatorContent';
1
+ import type { UniBlockProps } from '../../types';
2
+ import type { CreditCalculatorContent } from './CreditCalculatorContent';
3
3
  export interface CreditCalculatorProps extends CreditCalculatorContent, UniBlockProps {
4
4
  }
5
5
  export declare const CreditCalculator: (props: import("@redneckz/uni-jsx").PropsWithChildren<CreditCalculatorProps, any>, context?: any) => any;
@@ -3,39 +3,35 @@ exports.CreditCalculator = void 0;
3
3
  const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const uni_jsx_1 = require("@redneckz/uni-jsx");
5
5
  const useCreditCalculatorData_1 = require("../../hooks/useCreditCalculatorData");
6
- const Button_1 = require("../../ui-kit/Button/Button");
7
6
  const Checkbox_1 = require("../../ui-kit/Checkbox/Checkbox");
8
- const InputRange_1 = require("../../ui-kit/InputRange/InputRange");
9
- const addSpacesBetweenNumbers_1 = require("../../utils/addSpacesBetweenNumbers");
10
7
  const clamp_1 = require("../../utils/clamp");
11
8
  const constants_1 = require("./constants");
12
9
  const getCalculatorParams_1 = require("./getCalculatorParams");
13
10
  const getCreditRate_1 = require("./getCreditRate");
14
11
  const getCreditTermYears_1 = require("./getCreditTermYears");
12
+ const getDefaultMonths_1 = require("./getDefaultMonths");
13
+ const getDefaultSum_1 = require("./getDefaultSum");
15
14
  const getMonthlyPayment_1 = require("./getMonthlyPayment");
16
- const STEP_MONEY = 1000;
17
- const STEP_MONTHS = 1;
15
+ const renderButton_1 = require("./renderButton");
16
+ const renderMonthsInput_1 = require("./renderMonthsInput");
17
+ const renderProposal_1 = require("./renderProposal");
18
+ const renderTermsButton_1 = require("./renderTermsButton");
19
+ const renderWantedSumInput_1 = require("./renderWantedSumInput");
18
20
  const DEFAULT_PAYMENT_TYPE = 'annuity';
19
21
  const borderStyle = 'border-solid border-[3px] border-primary-main rounded-md';
20
- exports.CreditCalculator = (0, uni_jsx_1.JSX)(({ context, className, directoryName }) => {
22
+ exports.CreditCalculator = (0, uni_jsx_1.JSX)(({ context, className = '', directoryName }) => {
21
23
  const [moneyValue, setMoneyValue] = context.useState(undefined);
22
24
  const [monthsValue, setMonthsValue] = context.useState(undefined);
23
25
  const [isAnnuityChecked, setIsAnnuityChecked] = context.useState(true);
24
26
  const [isInsuranceChecked, setIsInsuranceChecked] = context.useState(true);
25
27
  const tableRows = (0, useCreditCalculatorData_1.useCreditCalculatorData)(context.useAsyncData, directoryName).rows;
26
28
  const calculatorParams = (0, getCalculatorParams_1.getCalculatorParams)({ tableRows, isAnnuity: isAnnuityChecked });
27
- const defaultSum = calculatorParams.maxSum && calculatorParams.minSum
28
- ? (calculatorParams.maxSum - calculatorParams.minSum) / 2
29
- : constants_1.DEFAULT_SUM;
30
- const defaultMonths = calculatorParams.maxMonths && calculatorParams.minMonths
31
- ? Math.round((calculatorParams.maxMonths - calculatorParams.minMonths) / 2)
32
- : constants_1.DEFAULT_MONTHS;
33
- const minSum = calculatorParams?.minSum || constants_1.DEFAULT_MIN_SUM;
34
- const maxSum = calculatorParams?.maxSum || constants_1.DEFAULT_MAX_SUM;
29
+ const defaultSum = (0, getDefaultSum_1.getDefaultSum)(calculatorParams);
30
+ const defaultMonths = (0, getDefaultMonths_1.getDefaultMonths)(calculatorParams);
35
31
  const minMonths = calculatorParams?.minMonths || constants_1.DEFAULT_MIN_MONTHS;
36
32
  const maxMonths = calculatorParams?.maxMonths || constants_1.DEFAULT_MAX_MONTHS;
37
33
  const rate = (0, getCreditRate_1.getCreditRate)({ calculatorParams, isInsurance: isInsuranceChecked });
38
- const montlyPayment = (0, getMonthlyPayment_1.getMonthlyPayment)({
34
+ const monthlyPayment = (0, getMonthlyPayment_1.getMonthlyPayment)({
39
35
  calculatorParams,
40
36
  paymentType: DEFAULT_PAYMENT_TYPE,
41
37
  rate,
@@ -46,12 +42,12 @@ exports.CreditCalculator = (0, uni_jsx_1.JSX)(({ context, className, directoryNa
46
42
  function handleButtonClick(value) {
47
43
  setMonthsValue((0, clamp_1.clamp)(value * constants_1.MONTHS_IN_YEAR, minMonths, maxMonths));
48
44
  }
49
- return ((0, jsx_runtime_1.jsx)("section", { className: `font-sans text-primary-text p-10 bg-white ${className || ''}`, children: (0, jsx_runtime_1.jsxs)("div", { className: `box-border p-[49px] pr-[56px] mx-auto w-max ${borderStyle}`, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between ", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mr-[42px]", children: [(0, jsx_runtime_1.jsx)(InputRange_1.InputRange, { title: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0441\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u20BD", items: [
50
- `От ${(0, addSpacesBetweenNumbers_1.addSpacesBetweenNumbers)(minSum)} рублей`,
51
- `До ${(0, addSpacesBetweenNumbers_1.addSpacesBetweenNumbers)(maxSum)} рублей`,
52
- ], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }), (0, jsx_runtime_1.jsx)(InputRange_1.InputRange, { className: "mt-[23px]", title: "\u0421\u0440\u043E\u043A \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ['Или выберите из предложенных вариантов ниже'], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: monthsValue || defaultMonths, onChange: setMonthsValue }), (0, jsx_runtime_1.jsx)("div", { className: "flex mb-7", children: creditTermYears.map((number, i) => renderButton(number, i, handleButtonClick)) }), (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", checked: isAnnuityChecked, onChange: setIsAnnuityChecked }), (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { className: "mt-3 mb-7", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsuranceChecked, onChange: setIsInsuranceChecked })] }), (0, jsx_runtime_1.jsxs)("div", { className: "box-border h-fit p-9 bg-primary-main rounded-md text-white", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-base mb-[18px]", children: "\u041D\u0430\u0448\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm opacity-60", children: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0451\u0436" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg mb-3", children: [(0, addSpacesBetweenNumbers_1.addSpacesBetweenNumbers)(Math.round(montlyPayment)), " \u20BD"] }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm opacity-60", children: "\u0421\u0442\u0430\u0432\u043A\u0430" }), (0, jsx_runtime_1.jsxs)("div", { className: "text-lg", children: [rate, " %"] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { className: "mr-3", text: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443", version: "primary", href: "#" }), (0, jsx_runtime_1.jsx)("div", { className: "w-80 text-2xs leading-4 text-secondary-text", "aria-label": "\u0421\u043E\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u0435 \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u044F \u0437\u0430\u044F\u0432\u043A\u0443, \u0432\u044B \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u0435\u0442\u0435\u0441\u044C \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E \u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043D\u0438\u044F\u043C \u0424\u0417 \u00AB\u041E \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445\u00BB" })] })] }) }));
45
+ return ((0, jsx_runtime_1.jsx)("section", { className: `font-sans text-primary-text p-10 bg-white ${className}`, children: (0, jsx_runtime_1.jsxs)("div", { className: `box-border p-[49px] pr-[56px] mx-auto w-max ${borderStyle}`, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mr-[42px]", children: [(0, renderWantedSumInput_1.renderWantedSumInput)({ calculatorParams, moneyValue, defaultSum, setMoneyValue }), (0, renderMonthsInput_1.renderMonthsInput)({
46
+ minMonths,
47
+ maxMonths,
48
+ monthsValue,
49
+ defaultMonths,
50
+ setMonthsValue,
51
+ }), (0, jsx_runtime_1.jsx)("div", { className: "flex mb-7", children: creditTermYears.map((number, i) => (0, renderButton_1.renderButton)(number, i, handleButtonClick)) }), (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", checked: isAnnuityChecked, onChange: setIsAnnuityChecked }), (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { className: "mt-3 mb-7", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsuranceChecked, onChange: setIsInsuranceChecked })] }), (0, renderProposal_1.renderProposal)(monthlyPayment, rate)] }), (0, renderTermsButton_1.renderTermsButton)()] }) }));
53
52
  });
54
- function renderButton(number, i, handleClick) {
55
- return ((0, jsx_runtime_1.jsx)("button", { className: "bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none", onClick: () => handleClick(number), children: (0, jsx_runtime_1.jsxs)("span", { className: "font-semibold text-sm", children: [number, " ", number === 1 ? 'год' : number > 4 ? 'лет' : 'года'] }) }, String(i)));
56
- }
57
53
  //# sourceMappingURL=CreditCalculator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreditCalculator.js","sourceRoot":"","sources":["../../../src/components/CreditCalculator/CreditCalculator.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iFAA8E;AAE9E,uDAAoD;AACpD,6DAA0D;AAC1D,mEAAgE;AAChE,iFAA8E;AAC9E,6CAA0C;AAC1C,2CAQqB;AAErB,+DAA4D;AAC5D,mDAAgD;AAChD,6DAA0D;AAC1D,2DAAwD;AAIxD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAEvC,MAAM,WAAW,GAAG,0DAA0D,CAAC;AAElE,QAAA,gBAAgB,GAAG,IAAA,aAAG,EACjC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,EAAE,EAAE;IACxC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAqB,SAAS,CAAC,CAAC;IACpF,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAqB,SAAS,CAAC,CAAC;IACtF,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACvE,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE3E,MAAM,SAAS,GAAG,IAAA,iDAAuB,EAAC,OAAO,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC,IAAI,CAAC;IAEpF,MAAM,gBAAgB,GAAG,IAAA,yCAAmB,EAAC,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAEzF,MAAM,UAAU,GACd,gBAAgB,CAAC,MAAM,IAAI,gBAAgB,CAAC,MAAM;QAChD,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC;QACzD,CAAC,CAAC,uBAAW,CAAC;IAElB,MAAM,aAAa,GACjB,gBAAgB,CAAC,SAAS,IAAI,gBAAgB,CAAC,SAAS;QACtD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,SAAS,GAAG,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAC3E,CAAC,CAAC,0BAAc,CAAC;IAErB,MAAM,MAAM,GAAG,gBAAgB,EAAE,MAAM,IAAI,2BAAe,CAAC;IAC3D,MAAM,MAAM,GAAG,gBAAgB,EAAE,MAAM,IAAI,2BAAe,CAAC;IAC3D,MAAM,SAAS,GAAG,gBAAgB,EAAE,SAAS,IAAI,8BAAkB,CAAC;IACpE,MAAM,SAAS,GAAG,gBAAgB,EAAE,SAAS,IAAI,8BAAkB,CAAC;IAEpE,MAAM,IAAI,GAAG,IAAA,6BAAa,EAAC,EAAE,gBAAgB,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAElF,MAAM,aAAa,GAAG,IAAA,qCAAiB,EAAC;QACtC,gBAAgB;QAChB,WAAW,EAAE,oBAAoB;QACjC,IAAI;QACJ,GAAG,EAAE,UAAU,IAAI,UAAU;QAC7B,MAAM,EAAE,WAAW,IAAI,aAAa;KACrC,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,IAAA,uCAAkB,EAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAEjE,SAAS,iBAAiB,CAAC,KAAa;QACtC,cAAc,CAAC,IAAA,aAAK,EAAC,KAAK,GAAG,0BAAc,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,CACL,oCAAS,SAAS,EAAE,6CAA6C,SAAS,IAAI,EAAE,EAAE,YAChF,iCAAK,SAAS,EAAE,+CAA+C,WAAW,EAAE,aAC1E,iCAAK,SAAS,EAAC,uBAAuB,aACpC,iCAAK,SAAS,EAAC,WAAW,aACxB,uBAAC,uBAAU,IACT,KAAK,EAAC,oIAA2B,EACjC,KAAK,EAAE;wCACL,MAAM,IAAA,iDAAuB,EAAC,MAAM,CAAC,SAAS;wCAC9C,MAAM,IAAA,iDAAuB,EAAC,MAAM,CAAC,SAAS;qCAC/C,EACD,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,UAAU,IAAI,UAAU,EAC/B,QAAQ,EAAE,aAAa,GACvB,EACF,uBAAC,uBAAU,IACT,SAAS,EAAC,WAAW,EACrB,KAAK,EAAC,iHAAuB,EAC7B,KAAK,EAAE,CAAC,6CAA6C,CAAC,EACtD,GAAG,EAAE,SAAS,EACd,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,WAAW,IAAI,aAAa,EACnC,QAAQ,EAAE,cAAc,GACxB,EACF,gCAAK,SAAS,EAAC,WAAW,YACvB,eAAe,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,iBAAiB,CAAC,CAAC,GAC3E,EACN,uBAAC,mBAAQ,IACP,IAAI,EAAC,wNAAyC,EAC9C,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,mBAAmB,GAC7B,EACF,uBAAC,mBAAQ,IACP,SAAS,EAAC,WAAW,EACrB,IAAI,EAAC,gKAA8B,EACnC,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,qBAAqB,GAC/B,IACE,EACN,iCAAK,SAAS,EAAC,4DAA4D,aACzE,gCAAK,SAAS,EAAC,qBAAqB,4GAAuB,EAC3D,gCAAK,SAAS,EAAC,oBAAoB,wHAAyB,EAC5D,iCAAK,SAAS,EAAC,cAAc,aAC1B,IAAA,iDAAuB,EAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,eAC/C,EACN,gCAAK,SAAS,EAAC,oBAAoB,qDAAa,EAChD,iCAAK,SAAS,EAAC,SAAS,aAAE,IAAI,UAAS,IACnC,IACF,EACN,iCAAK,SAAS,EAAC,mBAAmB,aAChC,uBAAC,eAAM,IAAC,SAAS,EAAC,MAAM,EAAC,IAAI,EAAC,6FAAkB,EAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,GAAG,GAAG,EAC9E,gCACE,SAAS,EAAC,6CAA6C,gBAC5C,gPAA6C,2pBAIpD,IACF,IACF,GACE,CACX,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,YAAY,CAAC,MAAc,EAAE,CAAS,EAAE,WAAqC;IACpF,OAAO,CACL,mCAEE,SAAS,EAAC,0HAA0H,EACpI,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,YAElC,kCAAM,SAAS,EAAC,uBAAuB,aACpC,MAAM,OAAG,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,IACvD,IANF,MAAM,CAAC,CAAC,CAAC,CAOP,CACV,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"CreditCalculator.js","sourceRoot":"","sources":["../../../src/components/CreditCalculator/CreditCalculator.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iFAA8E;AAE9E,6DAA0D;AAC1D,6CAA0C;AAC1C,2CAAqF;AAErF,+DAA4D;AAC5D,mDAAgD;AAChD,6DAA0D;AAC1D,yDAAsD;AACtD,mDAAgD;AAChD,2DAAwD;AACxD,iDAA8C;AAC9C,2DAAwD;AACxD,qDAAkD;AAClD,2DAAwD;AACxD,iEAA8D;AAI9D,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAEvC,MAAM,WAAW,GAAG,0DAA0D,CAAC;AAElE,QAAA,gBAAgB,GAAG,IAAA,aAAG,EACjC,CAAC,EAAE,OAAO,EAAE,SAAS,GAAG,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE;IAC7C,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAqB,SAAS,CAAC,CAAC;IACpF,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAqB,SAAS,CAAC,CAAC;IACtF,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACvE,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE3E,MAAM,SAAS,GAAG,IAAA,iDAAuB,EAAC,OAAO,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC,IAAI,CAAC;IACpF,MAAM,gBAAgB,GAAG,IAAA,yCAAmB,EAAC,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAEzF,MAAM,UAAU,GAAG,IAAA,6BAAa,EAAC,gBAAgB,CAAC,CAAC;IACnD,MAAM,aAAa,GAAG,IAAA,mCAAgB,EAAC,gBAAgB,CAAC,CAAC;IAEzD,MAAM,SAAS,GAAG,gBAAgB,EAAE,SAAS,IAAI,8BAAkB,CAAC;IACpE,MAAM,SAAS,GAAG,gBAAgB,EAAE,SAAS,IAAI,8BAAkB,CAAC;IAEpE,MAAM,IAAI,GAAG,IAAA,6BAAa,EAAC,EAAE,gBAAgB,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAElF,MAAM,cAAc,GAAG,IAAA,qCAAiB,EAAC;QACvC,gBAAgB;QAChB,WAAW,EAAE,oBAAoB;QACjC,IAAI;QACJ,GAAG,EAAE,UAAU,IAAI,UAAU;QAC7B,MAAM,EAAE,WAAW,IAAI,aAAa;KACrC,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,IAAA,uCAAkB,EAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAEjE,SAAS,iBAAiB,CAAC,KAAa;QACtC,cAAc,CAAC,IAAA,aAAK,EAAC,KAAK,GAAG,0BAAc,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,CACL,oCAAS,SAAS,EAAE,6CAA6C,SAAS,EAAE,YAC1E,iCAAK,SAAS,EAAE,+CAA+C,WAAW,EAAE,aAC1E,iCAAK,SAAS,EAAC,sBAAsB,aACnC,iCAAK,SAAS,EAAC,WAAW,aACvB,IAAA,2CAAoB,EAAC,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC,EACjF,IAAA,qCAAiB,EAAC;oCACjB,SAAS;oCACT,SAAS;oCACT,WAAW;oCACX,aAAa;oCACb,cAAc;iCACf,CAAC,EACF,gCAAK,SAAS,EAAC,WAAW,YACvB,eAAe,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,IAAA,2BAAY,EAAC,MAAM,EAAE,CAAC,EAAE,iBAAiB,CAAC,CAAC,GAC3E,EACN,uBAAC,mBAAQ,IACP,IAAI,EAAC,wNAAyC,EAC9C,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,mBAAmB,GAC7B,EACF,uBAAC,mBAAQ,IACP,SAAS,EAAC,WAAW,EACrB,IAAI,EAAC,gKAA8B,EACnC,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,qBAAqB,GAC/B,IACE,EACL,IAAA,+BAAc,EAAC,cAAc,EAAE,IAAI,CAAC,IACjC,EACL,IAAA,qCAAiB,GAAE,IAChB,GACE,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { CalculatorParams } from './CreditCalculatorContent';
1
+ import type { CalculatorParams } from './CreditCalculatorContent';
2
2
  interface GetCalculatorParamsParams {
3
3
  tableRows?: CalculatorParams[];
4
4
  isAnnuity?: boolean;
@@ -1,4 +1,4 @@
1
- import { CalculatorParams } from './CreditCalculatorContent';
1
+ import type { CalculatorParams } from './CreditCalculatorContent';
2
2
  interface GetCreditRateParams {
3
3
  calculatorParams?: CalculatorParams;
4
4
  isInsurance: boolean;
@@ -0,0 +1,2 @@
1
+ import type { CalculatorParams } from './CreditCalculatorContent';
2
+ export declare const getDefaultMonths: (calculatorParams: CalculatorParams) => number;
@@ -0,0 +1,8 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.getDefaultMonths = void 0;
3
+ const constants_1 = require("./constants");
4
+ const getDefaultMonths = (calculatorParams) => calculatorParams.maxMonths && calculatorParams.minMonths
5
+ ? Math.round((calculatorParams.maxMonths - calculatorParams.minMonths) / 2)
6
+ : constants_1.DEFAULT_MONTHS;
7
+ exports.getDefaultMonths = getDefaultMonths;
8
+ //# sourceMappingURL=getDefaultMonths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDefaultMonths.js","sourceRoot":"","sources":["../../../src/components/CreditCalculator/getDefaultMonths.ts"],"names":[],"mappings":";;AAAA,2CAA6C;AAGtC,MAAM,gBAAgB,GAAG,CAAC,gBAAkC,EAAE,EAAE,CACrE,gBAAgB,CAAC,SAAS,IAAI,gBAAgB,CAAC,SAAS;IACtD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,SAAS,GAAG,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC3E,CAAC,CAAC,0BAAc,CAAC;AAHR,QAAA,gBAAgB,oBAGR"}
@@ -0,0 +1,2 @@
1
+ import type { CalculatorParams } from './CreditCalculatorContent';
2
+ export declare const getDefaultSum: (calculatorParams: CalculatorParams) => number;
@@ -0,0 +1,8 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.getDefaultSum = void 0;
3
+ const constants_1 = require("./constants");
4
+ const getDefaultSum = (calculatorParams) => calculatorParams.maxSum && calculatorParams.minSum
5
+ ? (calculatorParams.maxSum - calculatorParams.minSum) / 2
6
+ : constants_1.DEFAULT_SUM;
7
+ exports.getDefaultSum = getDefaultSum;
8
+ //# sourceMappingURL=getDefaultSum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDefaultSum.js","sourceRoot":"","sources":["../../../src/components/CreditCalculator/getDefaultSum.ts"],"names":[],"mappings":";;AAAA,2CAA0C;AAGnC,MAAM,aAAa,GAAG,CAAC,gBAAkC,EAAE,EAAE,CAClE,gBAAgB,CAAC,MAAM,IAAI,gBAAgB,CAAC,MAAM;IAChD,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC;IACzD,CAAC,CAAC,uBAAW,CAAC;AAHL,QAAA,aAAa,iBAGR"}
@@ -1,4 +1,4 @@
1
- import { CalculatorParams } from './CreditCalculatorContent';
1
+ import type { CalculatorParams } from './CreditCalculatorContent';
2
2
  declare type PaymentType = 'annuity' | 'differentiated';
3
3
  interface GetMonthlyPaymentParams {
4
4
  calculatorParams?: CalculatorParams;
@@ -0,0 +1 @@
1
+ export declare function renderButton(number: number, i: number, handleClick: (number: number) => void): any;