@redneckz/wildless-cms-uni-blocks 0.3.69 → 0.3.71

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 (1165) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +467 -423
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/cosmos-static/icons/DoneIcon.svg +1 -0
  5. package/dist/components/Accordion/Accordion.mobile.js.map +1 -1
  6. package/dist/components/BlockContent.d.ts +3 -1
  7. package/dist/components/Blocks.d.ts +1 -1
  8. package/dist/components/Blocks.js +2 -2
  9. package/dist/components/Blocks.js.map +1 -1
  10. package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
  11. package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
  12. package/dist/components/Calculator/Calculator.js +7 -3
  13. package/dist/components/Calculator/Calculator.js.map +1 -1
  14. package/dist/components/Calculator/getCalculatorParams.js +2 -1
  15. package/dist/components/Calculator/getCalculatorParams.js.map +1 -1
  16. package/dist/components/Calculator/getCreditRate.js +2 -1
  17. package/dist/components/Calculator/getCreditRate.js.map +1 -1
  18. package/dist/components/Calculator/getMonthlyPayment.js +2 -1
  19. package/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
  20. package/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
  21. package/dist/components/ComparisonTable/HeaderCell.mobile.js +4 -2
  22. package/dist/components/ComparisonTable/HeaderCell.mobile.js.map +1 -1
  23. package/dist/components/ComparisonTable/TableCell.js +3 -1
  24. package/dist/components/ComparisonTable/TableCell.js.map +1 -1
  25. package/dist/components/ComparisonTable/TableCell.mobile.js +3 -1
  26. package/dist/components/ComparisonTable/TableCell.mobile.js.map +1 -1
  27. package/dist/components/ComparisonTable/TableRow.js +2 -1
  28. package/dist/components/ComparisonTable/TableRow.js.map +1 -1
  29. package/dist/components/ContentPage/ContentPageContext.d.ts +14 -3
  30. package/dist/components/ExchangeRateTile/CurrencyProps.d.ts +5 -0
  31. package/dist/components/ExchangeRateTile/CurrencyProps.js +9 -0
  32. package/dist/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
  33. package/dist/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
  34. package/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
  35. package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  36. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +16 -4
  37. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +68 -9
  38. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  39. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +7 -19
  40. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  41. package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -10
  42. package/dist/components/ExchangeRateTile/calculateResult.d.ts +2 -0
  43. package/dist/components/ExchangeRateTile/calculateResult.js +11 -0
  44. package/dist/components/ExchangeRateTile/calculateResult.js.map +1 -0
  45. package/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
  46. package/dist/components/ExchangeRateTile/callbackCurrencySelect.js +17 -0
  47. package/dist/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
  48. package/dist/components/ExchangeRateTile/formatCurrency.js +5 -1
  49. package/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -1
  50. package/dist/components/ExchangeRateTile/renderButton.d.ts +1 -0
  51. package/dist/components/ExchangeRateTile/renderButton.js +9 -0
  52. package/dist/components/ExchangeRateTile/renderButton.js.map +1 -0
  53. package/dist/components/ExchangeRateTile/renderInput.d.ts +12 -0
  54. package/dist/components/ExchangeRateTile/renderInput.js +12 -0
  55. package/dist/components/ExchangeRateTile/renderInput.js.map +1 -0
  56. package/dist/components/Footer/Footer.js +1 -1
  57. package/dist/components/Footer/Footer.js.map +1 -1
  58. package/dist/components/Footer/MediaButton.js +4 -13
  59. package/dist/components/Footer/MediaButton.js.map +1 -1
  60. package/dist/components/Footer/TextInformation.js +1 -1
  61. package/dist/components/Footer/TextInformation.js.map +1 -1
  62. package/dist/components/Gallery/Gallery.mobile.js +2 -2
  63. package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
  64. package/dist/components/Gallery/GalleryCardInner.js +2 -2
  65. package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  66. package/dist/components/Gallery/GalleryInner.js +7 -2
  67. package/dist/components/Gallery/GalleryInner.js.map +1 -1
  68. package/dist/components/GroupBlock/BlocksTypeProps.d.ts +4 -1
  69. package/dist/components/GroupBlock/GroupBlock.js +3 -3
  70. package/dist/components/GroupBlock/GroupBlock.js.map +1 -1
  71. package/dist/components/GroupBlock/GroupBlockTabs.js +2 -2
  72. package/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -1
  73. package/dist/components/GroupBlock/GroupBlocksItem.js +1 -1
  74. package/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -1
  75. package/dist/components/Header/DropdownMenu.d.ts +13 -0
  76. package/dist/components/Header/DropdownMenu.js +18 -0
  77. package/dist/components/Header/DropdownMenu.js.map +1 -0
  78. package/dist/components/Header/HeaderSubMenu.js +19 -32
  79. package/dist/components/Header/HeaderSubMenu.js.map +1 -1
  80. package/dist/components/Insurance/Insurance.js +4 -6
  81. package/dist/components/Insurance/Insurance.js.map +1 -1
  82. package/dist/components/Insurance/InsuranceContent.d.ts +2 -5
  83. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +5 -0
  84. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +34 -0
  85. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -0
  86. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +30 -0
  87. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +2 -0
  88. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +1 -0
  89. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +5 -0
  90. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +55 -0
  91. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -0
  92. package/dist/components/LinkDocs/LinkDocsListItemBase.js +2 -1
  93. package/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
  94. package/dist/components/Placeholder/Placeholder.js +1 -1
  95. package/dist/components/Placeholder/Placeholder.js.map +1 -1
  96. package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  97. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  98. package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  99. package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  100. package/dist/components/ProductTile/ProductTile.js +2 -2
  101. package/dist/components/ProductTile/ProductTile.js.map +1 -1
  102. package/dist/components/Recommendation/Recommendation.js +7 -2
  103. package/dist/components/Recommendation/Recommendation.js.map +1 -1
  104. package/dist/components/StepsBlock/StepsBlock.js +1 -1
  105. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  106. package/dist/components/Tile/Tile.js +4 -4
  107. package/dist/components/Tile/Tile.js.map +1 -1
  108. package/dist/components/Tile/TileContent.d.ts +5 -0
  109. package/dist/content-page-repository/mapJSON.d.ts +1 -1
  110. package/dist/content-page-repository/mapJSON.js +9 -7
  111. package/dist/content-page-repository/mapJSON.js.map +1 -1
  112. package/dist/content-page-repository/transformMarkdown.js +2 -1
  113. package/dist/content-page-repository/transformMarkdown.js.map +1 -1
  114. package/dist/content-page-repository/transformPicture.js +6 -3
  115. package/dist/content-page-repository/transformPicture.js.map +1 -1
  116. package/dist/hooks/useCreditCalculatorData.d.ts +1 -2
  117. package/dist/hooks/useCreditCalculatorData.js.map +1 -1
  118. package/dist/hooks/useExchangeRates.d.ts +2 -8
  119. package/dist/hooks/useExchangeRates.js +52 -3
  120. package/dist/hooks/useExchangeRates.js.map +1 -1
  121. package/dist/hooks/useTableArrowScrollControl.js +3 -3
  122. package/dist/hooks/useTableArrowScrollControl.js.map +1 -1
  123. package/dist/icons/IconName.d.ts +4 -2
  124. package/dist/icons/IconName.js +2 -0
  125. package/dist/icons/IconName.js.map +1 -1
  126. package/dist/model/Insurance.d.ts +6 -0
  127. package/dist/{components/CreditCalculator/CreditCalculatorContent.js → model/Insurance.js} +1 -1
  128. package/dist/model/Insurance.js.map +1 -0
  129. package/dist/react/IntersectionObserverTag.d.ts +3 -0
  130. package/dist/react/IntersectionObserverTag.js +17 -0
  131. package/dist/react/IntersectionObserverTag.js.map +1 -0
  132. package/dist/{setup-fixture.d.ts → react/setup-fixture.d.ts} +1 -1
  133. package/{mobile/dist → dist/react}/setup-fixture.js +3 -1
  134. package/dist/react/setup-fixture.js.map +1 -0
  135. package/dist/services/sitemap/isHrefActive.d.ts +1 -1
  136. package/dist/services/sitemap/isHrefActive.js +1 -1
  137. package/dist/services/sitemap/isHrefActive.js.map +1 -1
  138. package/dist/ui-kit/Button/ArrowButton.d.ts +1 -1
  139. package/dist/ui-kit/Button/ArrowButton.js.map +1 -1
  140. package/dist/ui-kit/Button/ButtonSection.js +2 -1
  141. package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
  142. package/dist/ui-kit/Button/renderArrows.d.ts +10 -0
  143. package/dist/ui-kit/Button/renderArrows.js +9 -0
  144. package/dist/ui-kit/Button/renderArrows.js.map +1 -0
  145. package/dist/ui-kit/Img/Img.mobile.js +1 -1
  146. package/dist/ui-kit/Img/Img.mobile.js.map +1 -1
  147. package/dist/ui-kit/Input/Input.js +6 -2
  148. package/dist/ui-kit/Input/Input.js.map +1 -1
  149. package/dist/ui-kit/Input/InputProps.d.ts +3 -0
  150. package/dist/ui-kit/InputRange/InputRange.js +10 -6
  151. package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  152. package/dist/ui-kit/SVG.js +1 -1
  153. package/dist/ui-kit/SVG.js.map +1 -1
  154. package/dist/ui-kit/SearchBar.mobile.js +1 -1
  155. package/dist/ui-kit/SearchBar.mobile.js.map +1 -1
  156. package/dist/ui-kit/Select/Select.d.ts +2 -0
  157. package/dist/ui-kit/Select/Select.js +2 -2
  158. package/dist/ui-kit/Select/Select.js.map +1 -1
  159. package/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  160. package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  161. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -1
  162. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  163. package/dist/ui-kit/SwipeListControl/utils/getIndexParts.js +3 -2
  164. package/dist/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
  165. package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +9 -3
  166. package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
  167. package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +5 -4
  168. package/dist/ui-kit/Tabs/Tabs.js +2 -1
  169. package/dist/ui-kit/Tabs/Tabs.js.map +1 -1
  170. package/dist/ui-kit/TopItem/TopItem.js +6 -8
  171. package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
  172. package/dist/utils/changeHashOnScroll.js +2 -1
  173. package/dist/utils/changeHashOnScroll.js.map +1 -1
  174. package/dist/utils/getCurrentDate.js +1 -1
  175. package/dist/utils/roundTo.d.ts +1 -0
  176. package/dist/utils/roundTo.js +8 -0
  177. package/dist/utils/roundTo.js.map +1 -0
  178. package/lib/common.css +1 -1
  179. package/lib/components/Accordion/Accordion.mobile.js.map +1 -1
  180. package/lib/components/BlockContent.d.ts +3 -1
  181. package/lib/components/Blocks.d.ts +1 -1
  182. package/lib/components/Blocks.js +2 -2
  183. package/lib/components/Blocks.js.map +1 -1
  184. package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
  185. package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
  186. package/lib/components/Calculator/Calculator.js +8 -4
  187. package/lib/components/Calculator/Calculator.js.map +1 -1
  188. package/lib/components/Calculator/getCalculatorParams.js +2 -1
  189. package/lib/components/Calculator/getCalculatorParams.js.map +1 -1
  190. package/lib/components/Calculator/getCreditRate.js +2 -1
  191. package/lib/components/Calculator/getCreditRate.js.map +1 -1
  192. package/lib/components/Calculator/getMonthlyPayment.js +2 -1
  193. package/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
  194. package/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
  195. package/lib/components/ComparisonTable/HeaderCell.mobile.js +4 -2
  196. package/lib/components/ComparisonTable/HeaderCell.mobile.js.map +1 -1
  197. package/lib/components/ComparisonTable/TableCell.js +3 -1
  198. package/lib/components/ComparisonTable/TableCell.js.map +1 -1
  199. package/lib/components/ComparisonTable/TableCell.mobile.js +3 -1
  200. package/lib/components/ComparisonTable/TableCell.mobile.js.map +1 -1
  201. package/lib/components/ComparisonTable/TableRow.js +2 -1
  202. package/lib/components/ComparisonTable/TableRow.js.map +1 -1
  203. package/lib/components/ContentPage/ContentPageContext.d.ts +14 -3
  204. package/lib/components/ExchangeRateTile/CurrencyProps.d.ts +5 -0
  205. package/lib/components/ExchangeRateTile/CurrencyProps.js +7 -0
  206. package/lib/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
  207. package/lib/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
  208. package/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
  209. package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  210. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +16 -4
  211. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +69 -10
  212. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  213. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +7 -19
  214. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  215. package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -10
  216. package/lib/components/ExchangeRateTile/calculateResult.d.ts +2 -0
  217. package/lib/components/ExchangeRateTile/calculateResult.js +7 -0
  218. package/lib/components/ExchangeRateTile/calculateResult.js.map +1 -0
  219. package/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
  220. package/lib/components/ExchangeRateTile/callbackCurrencySelect.js +14 -0
  221. package/lib/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
  222. package/lib/components/ExchangeRateTile/formatCurrency.js +5 -1
  223. package/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -1
  224. package/lib/components/ExchangeRateTile/renderButton.d.ts +1 -0
  225. package/lib/components/ExchangeRateTile/renderButton.js +6 -0
  226. package/lib/components/ExchangeRateTile/renderButton.js.map +1 -0
  227. package/lib/components/ExchangeRateTile/renderInput.d.ts +12 -0
  228. package/lib/components/ExchangeRateTile/renderInput.js +9 -0
  229. package/lib/components/ExchangeRateTile/renderInput.js.map +1 -0
  230. package/lib/components/Footer/Footer.js +1 -1
  231. package/lib/components/Footer/Footer.js.map +1 -1
  232. package/lib/components/Footer/MediaButton.js +4 -13
  233. package/lib/components/Footer/MediaButton.js.map +1 -1
  234. package/lib/components/Footer/TextInformation.js +1 -1
  235. package/lib/components/Footer/TextInformation.js.map +1 -1
  236. package/lib/components/Gallery/Gallery.mobile.js +2 -2
  237. package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
  238. package/lib/components/Gallery/GalleryCardInner.js +2 -2
  239. package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  240. package/lib/components/Gallery/GalleryInner.js +7 -2
  241. package/lib/components/Gallery/GalleryInner.js.map +1 -1
  242. package/lib/components/GroupBlock/BlocksTypeProps.d.ts +4 -1
  243. package/lib/components/GroupBlock/GroupBlock.fixture.d.ts +1 -0
  244. package/lib/components/GroupBlock/GroupBlock.js +3 -3
  245. package/lib/components/GroupBlock/GroupBlock.js.map +1 -1
  246. package/lib/components/GroupBlock/GroupBlockTabs.js +2 -2
  247. package/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -1
  248. package/lib/components/GroupBlock/GroupBlocksItem.js +1 -1
  249. package/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -1
  250. package/lib/components/Header/DropdownMenu.d.ts +13 -0
  251. package/lib/components/Header/DropdownMenu.js +16 -0
  252. package/lib/components/Header/DropdownMenu.js.map +1 -0
  253. package/lib/components/Header/HeaderSubMenu.js +19 -32
  254. package/lib/components/Header/HeaderSubMenu.js.map +1 -1
  255. package/lib/components/Headline/Headline.fixture.d.ts +9 -3
  256. package/lib/components/Headline/Headline.fixture.mobile.d.ts +13 -3
  257. package/lib/components/Insurance/Insurance.fixture.d.ts +2 -1
  258. package/lib/components/Insurance/Insurance.js +4 -6
  259. package/lib/components/Insurance/Insurance.js.map +1 -1
  260. package/lib/components/Insurance/InsuranceContent.d.ts +2 -5
  261. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +5 -0
  262. package/lib/components/{CreditCalculator/CreditCalculator.fixture.d.ts → InsuranceAmountBlock/InsuranceAmountBlock.fixture.d.ts} +0 -0
  263. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +32 -0
  264. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -0
  265. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +30 -0
  266. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +2 -0
  267. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +1 -0
  268. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +5 -0
  269. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +53 -0
  270. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -0
  271. package/lib/components/LinkDocs/LinkDocsListItemBase.js +2 -1
  272. package/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
  273. package/lib/components/Placeholder/Placeholder.js +1 -1
  274. package/lib/components/Placeholder/Placeholder.js.map +1 -1
  275. package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +10 -2
  276. package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  277. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  278. package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  279. package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  280. package/lib/components/ProductTile/ProductTile.js +2 -2
  281. package/lib/components/ProductTile/ProductTile.js.map +1 -1
  282. package/lib/components/Recommendation/Recommendation.fixture.d.ts +3 -0
  283. package/lib/components/Recommendation/Recommendation.js +7 -2
  284. package/lib/components/Recommendation/Recommendation.js.map +1 -1
  285. package/lib/components/StepsBlock/StepsBlock.fixture.mobile.d.ts +7 -1
  286. package/lib/components/StepsBlock/StepsBlock.js +1 -1
  287. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  288. package/lib/components/TextBlock/TextBlock.fixture.d.ts +3 -1
  289. package/lib/components/TextBlock/TextBlock.fixture.mobile.d.ts +3 -1
  290. package/lib/components/Tile/Tile.js +4 -4
  291. package/lib/components/Tile/Tile.js.map +1 -1
  292. package/lib/components/Tile/TileContent.d.ts +5 -0
  293. package/lib/content-page-repository/mapJSON.d.ts +1 -1
  294. package/lib/content-page-repository/mapJSON.js +9 -7
  295. package/lib/content-page-repository/mapJSON.js.map +1 -1
  296. package/lib/content-page-repository/transformMarkdown.js +2 -1
  297. package/lib/content-page-repository/transformMarkdown.js.map +1 -1
  298. package/lib/content-page-repository/transformPicture.js +6 -3
  299. package/lib/content-page-repository/transformPicture.js.map +1 -1
  300. package/lib/hooks/useCreditCalculatorData.d.ts +1 -2
  301. package/lib/hooks/useCreditCalculatorData.js.map +1 -1
  302. package/lib/hooks/useExchangeRates.d.ts +2 -8
  303. package/lib/hooks/useExchangeRates.js +52 -3
  304. package/lib/hooks/useExchangeRates.js.map +1 -1
  305. package/lib/hooks/useTableArrowScrollControl.js +3 -3
  306. package/lib/hooks/useTableArrowScrollControl.js.map +1 -1
  307. package/lib/icons/IconName.d.ts +4 -2
  308. package/lib/icons/IconName.js +2 -0
  309. package/lib/icons/IconName.js.map +1 -1
  310. package/lib/model/Insurance.d.ts +6 -0
  311. package/lib/model/Insurance.js +2 -0
  312. package/lib/model/Insurance.js.map +1 -0
  313. package/lib/react/IntersectionObserverTag.d.ts +3 -0
  314. package/lib/react/IntersectionObserverTag.js +14 -0
  315. package/lib/react/IntersectionObserverTag.js.map +1 -0
  316. package/lib/{setup-fixture.d.ts → react/setup-fixture.d.ts} +1 -1
  317. package/{mobile/lib → lib/react}/setup-fixture.js +3 -1
  318. package/lib/react/setup-fixture.js.map +1 -0
  319. package/lib/services/sitemap/isHrefActive.d.ts +1 -1
  320. package/lib/services/sitemap/isHrefActive.js +1 -1
  321. package/lib/services/sitemap/isHrefActive.js.map +1 -1
  322. package/lib/ui-kit/Button/ArrowButton.d.ts +1 -1
  323. package/lib/ui-kit/Button/ArrowButton.js.map +1 -1
  324. package/lib/ui-kit/Button/Button.fixture.d.ts +1 -1
  325. package/lib/ui-kit/Button/Button.fixture.mobile.d.ts +1 -1
  326. package/lib/ui-kit/Button/ButtonSection.js +2 -1
  327. package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
  328. package/lib/ui-kit/Button/renderArrows.d.ts +10 -0
  329. package/lib/ui-kit/Button/renderArrows.js +6 -0
  330. package/lib/ui-kit/Button/renderArrows.js.map +1 -0
  331. package/lib/ui-kit/HeaderItem/HeaderItem.fixture.d.ts +1 -1
  332. package/lib/ui-kit/Icon/Icon.fixture.d.ts +1 -1
  333. package/lib/ui-kit/Img/Img.mobile.js +1 -1
  334. package/lib/ui-kit/Img/Img.mobile.js.map +1 -1
  335. package/lib/ui-kit/Input/Input.js +6 -2
  336. package/lib/ui-kit/Input/Input.js.map +1 -1
  337. package/lib/ui-kit/Input/InputProps.d.ts +3 -0
  338. package/lib/ui-kit/InputRange/InputRange.js +10 -6
  339. package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  340. package/lib/ui-kit/List/List.fixture.d.ts +1 -1
  341. package/lib/ui-kit/Logo/Logo.fixture.d.ts +1 -1
  342. package/lib/ui-kit/SVG.js +1 -1
  343. package/lib/ui-kit/SVG.js.map +1 -1
  344. package/lib/ui-kit/SearchBar.mobile.js +1 -1
  345. package/lib/ui-kit/SearchBar.mobile.js.map +1 -1
  346. package/lib/ui-kit/Select/Select.d.ts +2 -0
  347. package/lib/ui-kit/Select/Select.js +2 -2
  348. package/lib/ui-kit/Select/Select.js.map +1 -1
  349. package/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  350. package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  351. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -1
  352. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  353. package/lib/ui-kit/SwipeListControl/utils/getIndexParts.js +3 -2
  354. package/lib/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
  355. package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +10 -4
  356. package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
  357. package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +5 -4
  358. package/lib/ui-kit/Tabs/Tabs.js +2 -1
  359. package/lib/ui-kit/Tabs/Tabs.js.map +1 -1
  360. package/lib/ui-kit/TopItem/TopItem.fixture.d.ts +1 -1
  361. package/lib/ui-kit/TopItem/TopItem.js +6 -8
  362. package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
  363. package/lib/utils/changeHashOnScroll.js +2 -1
  364. package/lib/utils/changeHashOnScroll.js.map +1 -1
  365. package/lib/utils/getCurrentDate.js +1 -1
  366. package/lib/utils/roundTo.d.ts +1 -0
  367. package/lib/utils/roundTo.js +5 -0
  368. package/lib/utils/roundTo.js.map +1 -0
  369. package/mobile/bundle/bundle.umd.js +216 -69
  370. package/mobile/bundle/bundle.umd.min.js +1 -1
  371. package/mobile/dist/components/Accordion/Accordion.js.map +1 -1
  372. package/mobile/dist/components/BlockContent.d.ts +3 -1
  373. package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
  374. package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
  375. package/mobile/dist/components/Calculator/Calculator.js +7 -3
  376. package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
  377. package/mobile/dist/components/Calculator/getCalculatorParams.js +2 -1
  378. package/mobile/dist/components/Calculator/getCalculatorParams.js.map +1 -1
  379. package/mobile/dist/components/Calculator/getCreditRate.js +2 -1
  380. package/mobile/dist/components/Calculator/getCreditRate.js.map +1 -1
  381. package/mobile/dist/components/Calculator/getMonthlyPayment.js +2 -1
  382. package/mobile/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
  383. package/mobile/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
  384. package/mobile/dist/components/ComparisonTable/HeaderCell.js +4 -2
  385. package/mobile/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
  386. package/mobile/dist/components/ComparisonTable/TableCell.js +3 -1
  387. package/mobile/dist/components/ComparisonTable/TableCell.js.map +1 -1
  388. package/mobile/dist/components/ComparisonTable/TableRow.js +2 -1
  389. package/mobile/dist/components/ComparisonTable/TableRow.js.map +1 -1
  390. package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +14 -3
  391. package/mobile/dist/components/ExchangeRateTile/CurrencyProps.d.ts +5 -0
  392. package/mobile/dist/components/ExchangeRateTile/CurrencyProps.js +9 -0
  393. package/mobile/dist/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
  394. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
  395. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
  396. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  397. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +16 -4
  398. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +68 -9
  399. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  400. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +7 -19
  401. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  402. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -10
  403. package/mobile/dist/components/ExchangeRateTile/calculateResult.d.ts +2 -0
  404. package/mobile/dist/components/ExchangeRateTile/calculateResult.js +11 -0
  405. package/mobile/dist/components/ExchangeRateTile/calculateResult.js.map +1 -0
  406. package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
  407. package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.js +17 -0
  408. package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
  409. package/mobile/dist/components/ExchangeRateTile/formatCurrency.js +5 -1
  410. package/mobile/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -1
  411. package/mobile/dist/components/ExchangeRateTile/renderButton.d.ts +1 -0
  412. package/mobile/dist/components/ExchangeRateTile/renderButton.js +9 -0
  413. package/mobile/dist/components/ExchangeRateTile/renderButton.js.map +1 -0
  414. package/mobile/dist/components/ExchangeRateTile/renderInput.d.ts +12 -0
  415. package/mobile/dist/components/ExchangeRateTile/renderInput.js +12 -0
  416. package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +1 -0
  417. package/mobile/dist/components/Footer/MediaButton.js +4 -13
  418. package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
  419. package/mobile/dist/components/Gallery/Gallery.js +2 -2
  420. package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
  421. package/mobile/dist/components/Gallery/GalleryCardInner.js +2 -2
  422. package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  423. package/mobile/dist/components/Gallery/GalleryInner.js +7 -2
  424. package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
  425. package/mobile/dist/components/GroupBlock/BlocksTypeProps.d.ts +4 -1
  426. package/mobile/dist/components/GroupBlock/GroupBlock.js +3 -3
  427. package/mobile/dist/components/GroupBlock/GroupBlock.js.map +1 -1
  428. package/mobile/dist/components/GroupBlock/GroupBlockTabs.js +2 -2
  429. package/mobile/dist/components/GroupBlock/GroupBlockTabs.js.map +1 -1
  430. package/mobile/dist/components/GroupBlock/GroupBlocksItem.js +1 -1
  431. package/mobile/dist/components/GroupBlock/GroupBlocksItem.js.map +1 -1
  432. package/mobile/dist/components/Header/DropdownMenu.d.ts +13 -0
  433. package/mobile/dist/components/Header/DropdownMenu.js +18 -0
  434. package/mobile/dist/components/Header/DropdownMenu.js.map +1 -0
  435. package/mobile/dist/components/Header/HeaderSubMenu.js +19 -32
  436. package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
  437. package/mobile/dist/components/Insurance/Insurance.js +4 -6
  438. package/mobile/dist/components/Insurance/Insurance.js.map +1 -1
  439. package/mobile/dist/components/Insurance/InsuranceContent.d.ts +2 -5
  440. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +5 -0
  441. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +34 -0
  442. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -0
  443. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +30 -0
  444. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +2 -0
  445. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +1 -0
  446. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +5 -0
  447. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +55 -0
  448. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -0
  449. package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.js +2 -1
  450. package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
  451. package/mobile/dist/components/Placeholder/Placeholder.js +1 -1
  452. package/mobile/dist/components/Placeholder/Placeholder.js.map +1 -1
  453. package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  454. package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  455. package/mobile/dist/components/ProductTile/ProductTile.js +2 -2
  456. package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
  457. package/mobile/dist/components/Recommendation/Recommendation.js +7 -2
  458. package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
  459. package/mobile/dist/components/Tile/Tile.js +4 -4
  460. package/mobile/dist/components/Tile/Tile.js.map +1 -1
  461. package/mobile/dist/components/Tile/TileContent.d.ts +5 -0
  462. package/mobile/dist/content-page-repository/mapJSON.d.ts +1 -1
  463. package/mobile/dist/content-page-repository/mapJSON.js +9 -7
  464. package/mobile/dist/content-page-repository/mapJSON.js.map +1 -1
  465. package/mobile/dist/content-page-repository/transformMarkdown.js +2 -1
  466. package/mobile/dist/content-page-repository/transformMarkdown.js.map +1 -1
  467. package/mobile/dist/content-page-repository/transformPicture.js +6 -3
  468. package/mobile/dist/content-page-repository/transformPicture.js.map +1 -1
  469. package/mobile/dist/hooks/useCreditCalculatorData.d.ts +1 -2
  470. package/mobile/dist/hooks/useCreditCalculatorData.js.map +1 -1
  471. package/mobile/dist/hooks/useExchangeRates.d.ts +2 -8
  472. package/mobile/dist/hooks/useExchangeRates.js +52 -3
  473. package/mobile/dist/hooks/useExchangeRates.js.map +1 -1
  474. package/mobile/dist/hooks/useTableArrowScrollControl.js +3 -3
  475. package/mobile/dist/hooks/useTableArrowScrollControl.js.map +1 -1
  476. package/mobile/dist/icons/IconName.d.ts +4 -2
  477. package/mobile/dist/icons/IconName.js +2 -0
  478. package/mobile/dist/icons/IconName.js.map +1 -1
  479. package/mobile/dist/model/Insurance.d.ts +6 -0
  480. package/mobile/dist/{components/CreditCalculator/CreditCalculatorContent.js → model/Insurance.js} +1 -1
  481. package/mobile/dist/model/Insurance.js.map +1 -0
  482. package/mobile/dist/react/IntersectionObserverTag.d.ts +3 -0
  483. package/mobile/dist/react/IntersectionObserverTag.js +17 -0
  484. package/mobile/dist/react/IntersectionObserverTag.js.map +1 -0
  485. package/mobile/dist/{setup-fixture.d.ts → react/setup-fixture.d.ts} +1 -1
  486. package/{dist → mobile/dist/react}/setup-fixture.js +3 -1
  487. package/mobile/dist/react/setup-fixture.js.map +1 -0
  488. package/mobile/dist/services/sitemap/isHrefActive.d.ts +1 -1
  489. package/mobile/dist/services/sitemap/isHrefActive.js +1 -1
  490. package/mobile/dist/services/sitemap/isHrefActive.js.map +1 -1
  491. package/mobile/dist/ui-kit/Button/ArrowButton.d.ts +1 -1
  492. package/mobile/dist/ui-kit/Button/ArrowButton.js.map +1 -1
  493. package/mobile/dist/ui-kit/Button/ButtonSection.js +2 -1
  494. package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
  495. package/mobile/dist/ui-kit/Button/renderArrows.d.ts +10 -0
  496. package/mobile/dist/ui-kit/Button/renderArrows.js +9 -0
  497. package/mobile/dist/ui-kit/Button/renderArrows.js.map +1 -0
  498. package/mobile/dist/ui-kit/Img/Img.js +1 -1
  499. package/mobile/dist/ui-kit/Img/Img.js.map +1 -1
  500. package/mobile/dist/ui-kit/Input/Input.js +6 -2
  501. package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
  502. package/mobile/dist/ui-kit/Input/InputProps.d.ts +3 -0
  503. package/mobile/dist/ui-kit/InputRange/InputRange.js +10 -6
  504. package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  505. package/mobile/dist/ui-kit/SVG.js +1 -1
  506. package/mobile/dist/ui-kit/SVG.js.map +1 -1
  507. package/mobile/dist/ui-kit/Select/Select.d.ts +2 -0
  508. package/mobile/dist/ui-kit/Select/Select.js +2 -2
  509. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  510. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  511. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  512. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -1
  513. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  514. package/mobile/dist/ui-kit/SwipeListControl/utils/getIndexParts.js +3 -2
  515. package/mobile/dist/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
  516. package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +9 -3
  517. package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
  518. package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +5 -4
  519. package/mobile/dist/ui-kit/Tabs/Tabs.js +2 -1
  520. package/mobile/dist/ui-kit/Tabs/Tabs.js.map +1 -1
  521. package/mobile/dist/ui-kit/TopItem/TopItem.js +6 -8
  522. package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
  523. package/mobile/dist/utils/changeHashOnScroll.js +2 -1
  524. package/mobile/dist/utils/changeHashOnScroll.js.map +1 -1
  525. package/mobile/dist/utils/getCurrentDate.js +1 -1
  526. package/mobile/dist/utils/roundTo.d.ts +1 -0
  527. package/mobile/dist/utils/roundTo.js +8 -0
  528. package/mobile/dist/utils/roundTo.js.map +1 -0
  529. package/mobile/lib/components/Accordion/Accordion.js.map +1 -1
  530. package/mobile/lib/components/BlockContent.d.ts +3 -1
  531. package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
  532. package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
  533. package/mobile/lib/components/Calculator/Calculator.js +8 -4
  534. package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
  535. package/mobile/lib/components/Calculator/getCalculatorParams.js +2 -1
  536. package/mobile/lib/components/Calculator/getCalculatorParams.js.map +1 -1
  537. package/mobile/lib/components/Calculator/getCreditRate.js +2 -1
  538. package/mobile/lib/components/Calculator/getCreditRate.js.map +1 -1
  539. package/mobile/lib/components/Calculator/getMonthlyPayment.js +2 -1
  540. package/mobile/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
  541. package/mobile/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
  542. package/mobile/lib/components/ComparisonTable/HeaderCell.js +4 -2
  543. package/mobile/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
  544. package/mobile/lib/components/ComparisonTable/TableCell.js +3 -1
  545. package/mobile/lib/components/ComparisonTable/TableCell.js.map +1 -1
  546. package/mobile/lib/components/ComparisonTable/TableRow.js +2 -1
  547. package/mobile/lib/components/ComparisonTable/TableRow.js.map +1 -1
  548. package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +14 -3
  549. package/mobile/lib/components/ExchangeRateTile/CurrencyProps.d.ts +5 -0
  550. package/mobile/lib/components/ExchangeRateTile/CurrencyProps.js +7 -0
  551. package/mobile/lib/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
  552. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.d.ts +1 -1
  553. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
  554. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  555. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +16 -4
  556. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +69 -10
  557. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  558. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +7 -19
  559. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  560. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +0 -10
  561. package/mobile/lib/components/ExchangeRateTile/calculateResult.d.ts +2 -0
  562. package/mobile/lib/components/ExchangeRateTile/calculateResult.js +7 -0
  563. package/mobile/lib/components/ExchangeRateTile/calculateResult.js.map +1 -0
  564. package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
  565. package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.js +14 -0
  566. package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
  567. package/mobile/lib/components/ExchangeRateTile/formatCurrency.js +5 -1
  568. package/mobile/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -1
  569. package/mobile/lib/components/ExchangeRateTile/renderButton.d.ts +1 -0
  570. package/mobile/lib/components/ExchangeRateTile/renderButton.js +6 -0
  571. package/mobile/lib/components/ExchangeRateTile/renderButton.js.map +1 -0
  572. package/mobile/lib/components/ExchangeRateTile/renderInput.d.ts +12 -0
  573. package/mobile/lib/components/ExchangeRateTile/renderInput.js +9 -0
  574. package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +1 -0
  575. package/mobile/lib/components/Footer/MediaButton.js +4 -13
  576. package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
  577. package/mobile/lib/components/Gallery/Gallery.js +2 -2
  578. package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
  579. package/mobile/lib/components/Gallery/GalleryCardInner.js +2 -2
  580. package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  581. package/mobile/lib/components/Gallery/GalleryInner.js +7 -2
  582. package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
  583. package/mobile/lib/components/GroupBlock/BlocksTypeProps.d.ts +4 -1
  584. package/mobile/lib/components/GroupBlock/GroupBlock.js +3 -3
  585. package/mobile/lib/components/GroupBlock/GroupBlock.js.map +1 -1
  586. package/mobile/lib/components/GroupBlock/GroupBlockTabs.js +2 -2
  587. package/mobile/lib/components/GroupBlock/GroupBlockTabs.js.map +1 -1
  588. package/mobile/lib/components/GroupBlock/GroupBlocksItem.js +1 -1
  589. package/mobile/lib/components/GroupBlock/GroupBlocksItem.js.map +1 -1
  590. package/mobile/lib/components/Header/DropdownMenu.d.ts +13 -0
  591. package/mobile/lib/components/Header/DropdownMenu.js +16 -0
  592. package/mobile/lib/components/Header/DropdownMenu.js.map +1 -0
  593. package/mobile/lib/components/Header/HeaderSubMenu.js +19 -32
  594. package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
  595. package/mobile/lib/components/Insurance/Insurance.js +4 -6
  596. package/mobile/lib/components/Insurance/Insurance.js.map +1 -1
  597. package/mobile/lib/components/Insurance/InsuranceContent.d.ts +2 -5
  598. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.d.ts +5 -0
  599. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +32 -0
  600. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -0
  601. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.d.ts +30 -0
  602. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js +2 -0
  603. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockContent.js.map +1 -0
  604. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.d.ts +5 -0
  605. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +53 -0
  606. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -0
  607. package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.js +2 -1
  608. package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
  609. package/mobile/lib/components/Placeholder/Placeholder.js +1 -1
  610. package/mobile/lib/components/Placeholder/Placeholder.js.map +1 -1
  611. package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  612. package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  613. package/mobile/lib/components/ProductTile/ProductTile.js +2 -2
  614. package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
  615. package/mobile/lib/components/Recommendation/Recommendation.js +7 -2
  616. package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
  617. package/mobile/lib/components/Tile/Tile.js +4 -4
  618. package/mobile/lib/components/Tile/Tile.js.map +1 -1
  619. package/mobile/lib/components/Tile/TileContent.d.ts +5 -0
  620. package/mobile/lib/content-page-repository/mapJSON.d.ts +1 -1
  621. package/mobile/lib/content-page-repository/mapJSON.js +9 -7
  622. package/mobile/lib/content-page-repository/mapJSON.js.map +1 -1
  623. package/mobile/lib/content-page-repository/transformMarkdown.js +2 -1
  624. package/mobile/lib/content-page-repository/transformMarkdown.js.map +1 -1
  625. package/mobile/lib/content-page-repository/transformPicture.js +6 -3
  626. package/mobile/lib/content-page-repository/transformPicture.js.map +1 -1
  627. package/mobile/lib/hooks/useCreditCalculatorData.d.ts +1 -2
  628. package/mobile/lib/hooks/useCreditCalculatorData.js.map +1 -1
  629. package/mobile/lib/hooks/useExchangeRates.d.ts +2 -8
  630. package/mobile/lib/hooks/useExchangeRates.js +52 -3
  631. package/mobile/lib/hooks/useExchangeRates.js.map +1 -1
  632. package/mobile/lib/hooks/useTableArrowScrollControl.js +3 -3
  633. package/mobile/lib/hooks/useTableArrowScrollControl.js.map +1 -1
  634. package/mobile/lib/icons/IconName.d.ts +4 -2
  635. package/mobile/lib/icons/IconName.js +2 -0
  636. package/mobile/lib/icons/IconName.js.map +1 -1
  637. package/mobile/lib/model/Insurance.d.ts +6 -0
  638. package/mobile/lib/model/Insurance.js +2 -0
  639. package/mobile/lib/model/Insurance.js.map +1 -0
  640. package/mobile/lib/react/IntersectionObserverTag.d.ts +3 -0
  641. package/mobile/lib/react/IntersectionObserverTag.js +14 -0
  642. package/mobile/lib/react/IntersectionObserverTag.js.map +1 -0
  643. package/mobile/lib/{setup-fixture.d.ts → react/setup-fixture.d.ts} +1 -1
  644. package/{lib → mobile/lib/react}/setup-fixture.js +3 -1
  645. package/mobile/lib/react/setup-fixture.js.map +1 -0
  646. package/mobile/lib/services/sitemap/isHrefActive.d.ts +1 -1
  647. package/mobile/lib/services/sitemap/isHrefActive.js +1 -1
  648. package/mobile/lib/services/sitemap/isHrefActive.js.map +1 -1
  649. package/mobile/lib/ui-kit/Button/ArrowButton.d.ts +1 -1
  650. package/mobile/lib/ui-kit/Button/ArrowButton.js.map +1 -1
  651. package/mobile/lib/ui-kit/Button/ButtonSection.js +2 -1
  652. package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
  653. package/mobile/lib/ui-kit/Button/renderArrows.d.ts +10 -0
  654. package/mobile/lib/ui-kit/Button/renderArrows.js +6 -0
  655. package/mobile/lib/ui-kit/Button/renderArrows.js.map +1 -0
  656. package/mobile/lib/ui-kit/Img/Img.js +1 -1
  657. package/mobile/lib/ui-kit/Img/Img.js.map +1 -1
  658. package/mobile/lib/ui-kit/Input/Input.js +6 -2
  659. package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
  660. package/mobile/lib/ui-kit/Input/InputProps.d.ts +3 -0
  661. package/mobile/lib/ui-kit/InputRange/InputRange.js +10 -6
  662. package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  663. package/mobile/lib/ui-kit/SVG.js +1 -1
  664. package/mobile/lib/ui-kit/SVG.js.map +1 -1
  665. package/mobile/lib/ui-kit/Select/Select.d.ts +2 -0
  666. package/mobile/lib/ui-kit/Select/Select.js +2 -2
  667. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  668. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  669. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  670. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -1
  671. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  672. package/mobile/lib/ui-kit/SwipeListControl/utils/getIndexParts.js +3 -2
  673. package/mobile/lib/ui-kit/SwipeListControl/utils/getIndexParts.js.map +1 -1
  674. package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +10 -4
  675. package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
  676. package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.d.ts +5 -4
  677. package/mobile/lib/ui-kit/Tabs/Tabs.js +2 -1
  678. package/mobile/lib/ui-kit/Tabs/Tabs.js.map +1 -1
  679. package/mobile/lib/ui-kit/TopItem/TopItem.js +6 -8
  680. package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
  681. package/mobile/lib/utils/changeHashOnScroll.js +2 -1
  682. package/mobile/lib/utils/changeHashOnScroll.js.map +1 -1
  683. package/mobile/lib/utils/getCurrentDate.js +1 -1
  684. package/mobile/lib/utils/roundTo.d.ts +1 -0
  685. package/mobile/lib/utils/roundTo.js +5 -0
  686. package/mobile/lib/utils/roundTo.js.map +1 -0
  687. package/mobile/src/components/Accordion/Accordion.tsx +1 -3
  688. package/mobile/src/components/BlockContent.ts +5 -1
  689. package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +1 -1
  690. package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +4 -8
  691. package/mobile/src/components/Calculator/Calculator.tsx +8 -22
  692. package/mobile/src/components/Calculator/getCalculatorParams.ts +3 -1
  693. package/mobile/src/components/Calculator/getCreditRate.ts +3 -1
  694. package/mobile/src/components/Calculator/getMonthlyPayment.ts +3 -1
  695. package/mobile/src/components/Calculator/renderCalculatorBlock.tsx +0 -7
  696. package/mobile/src/components/ComparisonTable/HeaderCell.tsx +7 -13
  697. package/mobile/src/components/ComparisonTable/TableCell.tsx +7 -8
  698. package/mobile/src/components/ComparisonTable/TableRow.tsx +6 -9
  699. package/mobile/src/components/ContentPage/ContentPage.page.json +50 -6
  700. package/mobile/src/components/ContentPage/ContentPageContext.tsx +20 -4
  701. package/mobile/src/components/ExchangeRateTile/CurrencyProps.ts +5 -0
  702. package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +4 -4
  703. package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +120 -35
  704. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +14 -28
  705. package/mobile/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +0 -11
  706. package/mobile/src/components/ExchangeRateTile/calculateResult.ts +8 -0
  707. package/mobile/src/components/ExchangeRateTile/callbackCurrencySelect.ts +21 -0
  708. package/mobile/src/components/ExchangeRateTile/formatCurrency.ts +6 -1
  709. package/mobile/src/components/ExchangeRateTile/renderButton.tsx +14 -0
  710. package/mobile/src/components/ExchangeRateTile/renderInput.tsx +43 -0
  711. package/mobile/src/components/Footer/MediaButton.tsx +7 -17
  712. package/mobile/src/components/Gallery/Gallery.tsx +2 -2
  713. package/mobile/src/components/Gallery/GalleryCardInner.tsx +2 -2
  714. package/mobile/src/components/Gallery/GalleryInner.tsx +10 -20
  715. package/mobile/src/components/GroupBlock/BlocksTypeProps.ts +4 -1
  716. package/mobile/src/components/GroupBlock/GroupBlock.example.json +8 -7
  717. package/mobile/src/components/GroupBlock/GroupBlock.tsx +9 -4
  718. package/mobile/src/components/GroupBlock/GroupBlockTabs.tsx +4 -4
  719. package/mobile/src/components/GroupBlock/GroupBlocksItem.tsx +1 -1
  720. package/mobile/src/components/Header/DropdownMenu.tsx +72 -0
  721. package/mobile/src/components/Header/HeaderSubMenu.tsx +45 -87
  722. package/mobile/src/components/Insurance/Insurance.example.json +21 -0
  723. package/mobile/src/components/Insurance/Insurance.tsx +10 -9
  724. package/mobile/src/components/Insurance/InsuranceContent.ts +9 -11
  725. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +44 -0
  726. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +84 -0
  727. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +33 -0
  728. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +147 -0
  729. package/mobile/src/components/LinkDocs/LinkDocsListItemBase.tsx +3 -1
  730. package/mobile/src/components/Placeholder/Placeholder.tsx +6 -2
  731. package/mobile/src/components/ProductBlock/ProductBlock.example.json +1 -5
  732. package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
  733. package/mobile/src/components/ProductTile/ProductTile.tsx +2 -2
  734. package/mobile/src/components/Recommendation/Recommendation.tsx +7 -15
  735. package/mobile/src/components/TariffsTable/TariffsTable.example.json +1 -5
  736. package/mobile/src/components/Tile/Tile.example.json +1 -0
  737. package/mobile/src/components/Tile/Tile.tsx +4 -2
  738. package/mobile/src/components/Tile/TileContent.ts +5 -0
  739. package/mobile/src/content-page-repository/mapJSON.ts +11 -7
  740. package/mobile/src/content-page-repository/transformMarkdown.ts +3 -1
  741. package/mobile/src/content-page-repository/transformPicture.ts +8 -3
  742. package/mobile/src/hooks/useCreditCalculatorData.ts +2 -3
  743. package/mobile/src/hooks/useExchangeRates.ts +70 -10
  744. package/mobile/src/hooks/useTableArrowScrollControl.ts +3 -3
  745. package/mobile/src/icons/DoneIcon.svg +4 -0
  746. package/mobile/src/icons/IconName.ts +4 -4
  747. package/mobile/src/model/Insurance.ts +6 -0
  748. package/mobile/src/react/IntersectionObserverTag.tsx +23 -0
  749. package/mobile/src/{setup-fixture.ts → react/setup-fixture.ts} +5 -2
  750. package/mobile/src/services/sitemap/isHrefActive.ts +2 -1
  751. package/mobile/src/ui-kit/Button/ArrowButton.tsx +1 -1
  752. package/mobile/src/ui-kit/Button/ButtonSection.tsx +3 -1
  753. package/mobile/src/ui-kit/Button/renderArrows.tsx +41 -0
  754. package/mobile/src/ui-kit/Img/Img.tsx +1 -0
  755. package/mobile/src/ui-kit/Input/Input.tsx +21 -5
  756. package/mobile/src/ui-kit/Input/InputProps.ts +3 -0
  757. package/mobile/src/ui-kit/InputRange/InputRange.tsx +14 -6
  758. package/mobile/src/ui-kit/SVG.tsx +2 -2
  759. package/mobile/src/ui-kit/Select/Select.tsx +17 -7
  760. package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +9 -4
  761. package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +3 -1
  762. package/mobile/src/ui-kit/SwipeListControl/utils/getIndexParts.ts +6 -2
  763. package/mobile/src/ui-kit/TableArrowScrollControl/TableArrowScrollControl.tsx +9 -18
  764. package/mobile/src/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.ts +6 -4
  765. package/mobile/src/ui-kit/Tabs/Tabs.tsx +4 -3
  766. package/mobile/src/ui-kit/TopItem/TopItem.tsx +8 -9
  767. package/mobile/src/utils/changeHashOnScroll.ts +3 -1
  768. package/mobile/src/utils/getCurrentDate.ts +1 -1
  769. package/mobile/src/utils/roundTo.ts +4 -0
  770. package/package.json +3 -3
  771. package/src/components/Accordion/Accordion.fixture.mobile.tsx +1 -1
  772. package/src/components/Accordion/Accordion.fixture.tsx +11 -11
  773. package/src/components/Accordion/Accordion.mobile.tsx +1 -3
  774. package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +1 -1
  775. package/src/components/BlockContent.ts +5 -1
  776. package/src/components/Blocks.ts +2 -2
  777. package/src/components/Bonus/Bonus.fixture.tsx +1 -1
  778. package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +1 -1
  779. package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.fixture.tsx +1 -1
  780. package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +4 -8
  781. package/src/components/Calculator/Calculator.fixture.tsx +4 -4
  782. package/src/components/Calculator/Calculator.tsx +8 -22
  783. package/src/components/Calculator/getCalculatorParams.ts +3 -1
  784. package/src/components/Calculator/getCreditRate.ts +3 -1
  785. package/src/components/Calculator/getMonthlyPayment.ts +3 -1
  786. package/src/components/Calculator/renderCalculatorBlock.tsx +0 -7
  787. package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +2 -26
  788. package/src/components/ComparisonTable/ComparisonTable.fixture.tsx +1 -1
  789. package/src/components/ComparisonTable/HeaderCell.mobile.tsx +7 -13
  790. package/src/components/ComparisonTable/TableCell.mobile.tsx +7 -8
  791. package/src/components/ComparisonTable/TableCell.tsx +7 -10
  792. package/src/components/ComparisonTable/TableRow.tsx +6 -9
  793. package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +1 -1
  794. package/src/components/ContentPage/ContentPage.fixture.tsx +1 -1
  795. package/src/components/ContentPage/ContentPage.page.json +50 -6
  796. package/src/components/ContentPage/ContentPageContext.tsx +20 -4
  797. package/src/components/ExchangeRateTile/CurrencyProps.ts +5 -0
  798. package/src/components/ExchangeRateTile/CurrencyTable.tsx +4 -4
  799. package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +120 -35
  800. package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
  801. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +14 -28
  802. package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +0 -11
  803. package/src/components/ExchangeRateTile/calculateResult.ts +8 -0
  804. package/src/components/ExchangeRateTile/callbackCurrencySelect.ts +21 -0
  805. package/src/components/ExchangeRateTile/formatCurrency.ts +6 -1
  806. package/src/components/ExchangeRateTile/renderButton.tsx +14 -0
  807. package/src/components/ExchangeRateTile/renderInput.tsx +43 -0
  808. package/src/components/Footer/Footer.fixture.mobile.tsx +1 -1
  809. package/src/components/Footer/Footer.fixture.tsx +1 -1
  810. package/src/components/Footer/Footer.tsx +1 -1
  811. package/src/components/Footer/MediaButton.tsx +7 -17
  812. package/src/components/Footer/TextInformation.tsx +2 -2
  813. package/src/components/Gallery/Gallery.fixture.mobile.tsx +2 -24
  814. package/src/components/Gallery/Gallery.fixture.tsx +1 -1
  815. package/src/components/Gallery/Gallery.mobile.tsx +2 -2
  816. package/src/components/Gallery/GalleryCardInner.tsx +2 -2
  817. package/src/components/Gallery/GalleryInner.tsx +10 -20
  818. package/src/components/GracePeriod/GracePeriod.fixture.tsx +1 -1
  819. package/src/components/GroupBlock/BlocksTypeProps.ts +4 -1
  820. package/src/components/GroupBlock/GroupBlock.example.json +8 -7
  821. package/src/components/GroupBlock/GroupBlock.fixture.tsx +19 -3
  822. package/src/components/GroupBlock/GroupBlock.tsx +9 -4
  823. package/src/components/GroupBlock/GroupBlockTabs.tsx +4 -4
  824. package/src/components/GroupBlock/GroupBlocksItem.tsx +1 -1
  825. package/src/components/Header/DropdownMenu.tsx +72 -0
  826. package/src/components/Header/Header.fixture.mobile.tsx +1 -1
  827. package/src/components/Header/Header.fixture.tsx +1 -1
  828. package/src/components/Header/HeaderSubMenu.tsx +45 -87
  829. package/src/components/Headline/Headline.fixture.mobile.tsx +45 -4
  830. package/src/components/Headline/Headline.fixture.tsx +31 -7
  831. package/src/components/Insurance/Insurance.example.json +21 -0
  832. package/src/components/Insurance/Insurance.fixture.tsx +11 -6
  833. package/src/components/Insurance/Insurance.tsx +10 -9
  834. package/src/components/Insurance/InsuranceContent.ts +9 -11
  835. package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.example.json +44 -0
  836. package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.fixture.tsx +52 -0
  837. package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +84 -0
  838. package/src/components/InsuranceAmountBlock/InsuranceAmountBlockContent.ts +33 -0
  839. package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +147 -0
  840. package/src/components/LikeControl/LikeControl.fixture.tsx +1 -1
  841. package/src/components/LinkDocs/LinkDocs.fixture.mobile.tsx +2 -2
  842. package/src/components/LinkDocs/LinkDocs.fixture.tsx +2 -2
  843. package/src/components/LinkDocs/LinkDocsListItemBase.tsx +3 -1
  844. package/src/components/LinkList/LinkList.fixture.tsx +1 -1
  845. package/src/components/MiniGallery/MiniGallery.fixture.tsx +1 -1
  846. package/src/components/MobileAppTile/MobileAppTile.fixture.mobile.tsx +1 -1
  847. package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +1 -1
  848. package/src/components/Navigation/Navigation.fixture.tsx +1 -1
  849. package/src/components/NavigatorTabs/NavigatorTabs.fixture.tsx +1 -1
  850. package/src/components/OtherProducts/OtherProducts.fixture.tsx +1 -1
  851. package/src/components/PictureText/PictureText.fixture.tsx +1 -1
  852. package/src/components/Placeholder/Placeholder.fixture.mobile.tsx +1 -1
  853. package/src/components/Placeholder/Placeholder.fixture.tsx +1 -1
  854. package/src/components/Placeholder/Placeholder.tsx +6 -2
  855. package/src/components/ProductBlock/ProductBlock.example.json +1 -5
  856. package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +2 -2
  857. package/src/components/ProductBlock/ProductBlock.fixture.tsx +35 -5
  858. package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +1 -1
  859. package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
  860. package/src/components/ProductGallery/ProductGallery.fixture.mobile.tsx +1 -1
  861. package/src/components/ProductGallery/ProductGallery.fixture.tsx +2 -2
  862. package/src/components/ProductTile/ProductTile.fixture.tsx +1 -1
  863. package/src/components/ProductTile/ProductTile.tsx +2 -2
  864. package/src/components/PromoTile/PromoTile.fixture.tsx +2 -2
  865. package/src/components/Recommendation/Recommendation.fixture.tsx +18 -13
  866. package/src/components/Recommendation/Recommendation.tsx +7 -15
  867. package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +38 -3
  868. package/src/components/StepsBlock/StepsBlock.fixture.tsx +4 -4
  869. package/src/components/StepsBlock/StepsBlock.tsx +1 -1
  870. package/src/components/TariffsTable/TariffsTable.example.json +1 -5
  871. package/src/components/TariffsTable/TariffsTable.fixture.mobile.tsx +2 -30
  872. package/src/components/TariffsTable/TariffsTable.fixture.tsx +1 -1
  873. package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +106 -103
  874. package/src/components/TextBlock/TextBlock.fixture.tsx +65 -87
  875. package/src/components/Tile/Tile.example.json +1 -0
  876. package/src/components/Tile/Tile.fixture.tsx +2 -1
  877. package/src/components/Tile/Tile.tsx +4 -2
  878. package/src/components/Tile/TileContent.ts +5 -0
  879. package/src/content-page-repository/mapJSON.ts +11 -7
  880. package/src/content-page-repository/transformMarkdown.ts +3 -1
  881. package/src/content-page-repository/transformPicture.ts +8 -3
  882. package/src/hooks/useCreditCalculatorData.ts +2 -3
  883. package/src/hooks/useExchangeRates.ts +70 -10
  884. package/src/hooks/useTableArrowScrollControl.ts +3 -3
  885. package/src/icons/DoneIcon.svg +4 -0
  886. package/src/icons/IconName.ts +4 -1
  887. package/src/model/Insurance.ts +6 -0
  888. package/src/react/IntersectionObserverTag.tsx +23 -0
  889. package/src/{setup-fixture.ts → react/setup-fixture.ts} +5 -2
  890. package/src/services/sitemap/isHrefActive.ts +2 -1
  891. package/src/ui-kit/Button/ArrowButton.tsx +1 -1
  892. package/src/ui-kit/Button/Button.fixture.mobile.tsx +1 -1
  893. package/src/ui-kit/Button/Button.fixture.tsx +1 -1
  894. package/src/ui-kit/Button/ButtonSection.tsx +3 -1
  895. package/src/ui-kit/Button/renderArrows.tsx +41 -0
  896. package/src/ui-kit/HeaderItem/HeaderItem.fixture.tsx +1 -1
  897. package/src/ui-kit/Icon/Icon.fixture.tsx +2 -2
  898. package/src/ui-kit/Img/Img.mobile.tsx +1 -0
  899. package/src/ui-kit/Input/Input.tsx +21 -5
  900. package/src/ui-kit/Input/InputProps.ts +3 -0
  901. package/src/ui-kit/InputRange/InputRange.tsx +14 -6
  902. package/src/ui-kit/List/List.fixture.tsx +1 -1
  903. package/src/ui-kit/Logo/Logo.fixture.tsx +1 -1
  904. package/src/ui-kit/SVG.tsx +2 -2
  905. package/src/ui-kit/SearchBar.mobile.tsx +1 -3
  906. package/src/ui-kit/Select/Select.tsx +17 -7
  907. package/src/ui-kit/SwipeListControl/SwipeListControl.fixture.mobile.tsx +1 -1
  908. package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +9 -4
  909. package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +3 -1
  910. package/src/ui-kit/SwipeListControl/utils/getIndexParts.ts +6 -2
  911. package/src/ui-kit/TableArrowScrollControl/TableArrowScrollControl.tsx +9 -18
  912. package/src/ui-kit/TableArrowScrollControl/TableArrowScrollControlProps.ts +6 -4
  913. package/src/ui-kit/Tabs/Tabs.tsx +4 -3
  914. package/src/ui-kit/TopItem/TopItem.fixture.tsx +1 -1
  915. package/src/ui-kit/TopItem/TopItem.tsx +8 -9
  916. package/src/utils/changeHashOnScroll.ts +3 -1
  917. package/src/utils/getCurrentDate.ts +1 -1
  918. package/src/utils/roundTo.ts +4 -0
  919. package/dist/components/CreditCalculator/CreditCalculator.d.ts +0 -5
  920. package/dist/components/CreditCalculator/CreditCalculator.js +0 -14
  921. package/dist/components/CreditCalculator/CreditCalculator.js.map +0 -1
  922. package/dist/components/CreditCalculator/CreditCalculatorContent.d.ts +0 -30
  923. package/dist/components/CreditCalculator/CreditCalculatorContent.js.map +0 -1
  924. package/dist/components/CreditCalculator/CreditCalculatorForm.d.ts +0 -5
  925. package/dist/components/CreditCalculator/CreditCalculatorForm.js +0 -53
  926. package/dist/components/CreditCalculator/CreditCalculatorForm.js.map +0 -1
  927. package/dist/components/CreditCalculator/constants.d.ts +0 -7
  928. package/dist/components/CreditCalculator/constants.js +0 -10
  929. package/dist/components/CreditCalculator/constants.js.map +0 -1
  930. package/dist/components/CreditCalculator/defaultTabs.d.ts +0 -2
  931. package/dist/components/CreditCalculator/defaultTabs.js +0 -23
  932. package/dist/components/CreditCalculator/defaultTabs.js.map +0 -1
  933. package/dist/components/CreditCalculator/getCalculatorParams.d.ts +0 -7
  934. package/dist/components/CreditCalculator/getCalculatorParams.js +0 -11
  935. package/dist/components/CreditCalculator/getCalculatorParams.js.map +0 -1
  936. package/dist/components/CreditCalculator/getCreditRate.d.ts +0 -7
  937. package/dist/components/CreditCalculator/getCreditRate.js +0 -13
  938. package/dist/components/CreditCalculator/getCreditRate.js.map +0 -1
  939. package/dist/components/CreditCalculator/getCreditTermYears.d.ts +0 -1
  940. package/dist/components/CreditCalculator/getCreditTermYears.js +0 -15
  941. package/dist/components/CreditCalculator/getCreditTermYears.js.map +0 -1
  942. package/dist/components/CreditCalculator/getDefaultMonths.d.ts +0 -2
  943. package/dist/components/CreditCalculator/getDefaultMonths.js +0 -8
  944. package/dist/components/CreditCalculator/getDefaultMonths.js.map +0 -1
  945. package/dist/components/CreditCalculator/getDefaultSum.d.ts +0 -2
  946. package/dist/components/CreditCalculator/getDefaultSum.js +0 -8
  947. package/dist/components/CreditCalculator/getDefaultSum.js.map +0 -1
  948. package/dist/components/CreditCalculator/getMonthlyPayment.d.ts +0 -11
  949. package/dist/components/CreditCalculator/getMonthlyPayment.js +0 -19
  950. package/dist/components/CreditCalculator/getMonthlyPayment.js.map +0 -1
  951. package/dist/components/CreditCalculator/renderButton.d.ts +0 -1
  952. package/dist/components/CreditCalculator/renderButton.js +0 -15
  953. package/dist/components/CreditCalculator/renderButton.js.map +0 -1
  954. package/dist/components/CreditCalculator/renderMonthsInput.d.ts +0 -10
  955. package/dist/components/CreditCalculator/renderMonthsInput.js +0 -11
  956. package/dist/components/CreditCalculator/renderMonthsInput.js.map +0 -1
  957. package/dist/components/CreditCalculator/renderProposal.d.ts +0 -1
  958. package/dist/components/CreditCalculator/renderProposal.js +0 -9
  959. package/dist/components/CreditCalculator/renderProposal.js.map +0 -1
  960. package/dist/components/CreditCalculator/renderTermsButton.d.ts +0 -1
  961. package/dist/components/CreditCalculator/renderTermsButton.js +0 -9
  962. package/dist/components/CreditCalculator/renderTermsButton.js.map +0 -1
  963. package/dist/components/CreditCalculator/renderWantedSumInput.d.ts +0 -10
  964. package/dist/components/CreditCalculator/renderWantedSumInput.js +0 -18
  965. package/dist/components/CreditCalculator/renderWantedSumInput.js.map +0 -1
  966. package/dist/components/Header/HeaderSubMenuObserver.d.ts +0 -1
  967. package/dist/components/Header/HeaderSubMenuObserver.js +0 -36
  968. package/dist/components/Header/HeaderSubMenuObserver.js.map +0 -1
  969. package/dist/setup-fixture.js.map +0 -1
  970. package/lib/components/CreditCalculator/CreditCalculator.d.ts +0 -5
  971. package/lib/components/CreditCalculator/CreditCalculator.js +0 -12
  972. package/lib/components/CreditCalculator/CreditCalculator.js.map +0 -1
  973. package/lib/components/CreditCalculator/CreditCalculatorContent.d.ts +0 -30
  974. package/lib/components/CreditCalculator/CreditCalculatorContent.js +0 -2
  975. package/lib/components/CreditCalculator/CreditCalculatorContent.js.map +0 -1
  976. package/lib/components/CreditCalculator/CreditCalculatorForm.d.ts +0 -5
  977. package/lib/components/CreditCalculator/CreditCalculatorForm.js +0 -51
  978. package/lib/components/CreditCalculator/CreditCalculatorForm.js.map +0 -1
  979. package/lib/components/CreditCalculator/constants.d.ts +0 -7
  980. package/lib/components/CreditCalculator/constants.js +0 -8
  981. package/lib/components/CreditCalculator/constants.js.map +0 -1
  982. package/lib/components/CreditCalculator/defaultTabs.d.ts +0 -2
  983. package/lib/components/CreditCalculator/defaultTabs.js +0 -21
  984. package/lib/components/CreditCalculator/defaultTabs.js.map +0 -1
  985. package/lib/components/CreditCalculator/getCalculatorParams.d.ts +0 -7
  986. package/lib/components/CreditCalculator/getCalculatorParams.js +0 -8
  987. package/lib/components/CreditCalculator/getCalculatorParams.js.map +0 -1
  988. package/lib/components/CreditCalculator/getCreditRate.d.ts +0 -7
  989. package/lib/components/CreditCalculator/getCreditRate.js +0 -10
  990. package/lib/components/CreditCalculator/getCreditRate.js.map +0 -1
  991. package/lib/components/CreditCalculator/getCreditTermYears.d.ts +0 -1
  992. package/lib/components/CreditCalculator/getCreditTermYears.js +0 -12
  993. package/lib/components/CreditCalculator/getCreditTermYears.js.map +0 -1
  994. package/lib/components/CreditCalculator/getDefaultMonths.d.ts +0 -2
  995. package/lib/components/CreditCalculator/getDefaultMonths.js +0 -5
  996. package/lib/components/CreditCalculator/getDefaultMonths.js.map +0 -1
  997. package/lib/components/CreditCalculator/getDefaultSum.d.ts +0 -2
  998. package/lib/components/CreditCalculator/getDefaultSum.js +0 -5
  999. package/lib/components/CreditCalculator/getDefaultSum.js.map +0 -1
  1000. package/lib/components/CreditCalculator/getMonthlyPayment.d.ts +0 -11
  1001. package/lib/components/CreditCalculator/getMonthlyPayment.js +0 -16
  1002. package/lib/components/CreditCalculator/getMonthlyPayment.js.map +0 -1
  1003. package/lib/components/CreditCalculator/renderButton.d.ts +0 -1
  1004. package/lib/components/CreditCalculator/renderButton.js +0 -12
  1005. package/lib/components/CreditCalculator/renderButton.js.map +0 -1
  1006. package/lib/components/CreditCalculator/renderMonthsInput.d.ts +0 -10
  1007. package/lib/components/CreditCalculator/renderMonthsInput.js +0 -8
  1008. package/lib/components/CreditCalculator/renderMonthsInput.js.map +0 -1
  1009. package/lib/components/CreditCalculator/renderProposal.d.ts +0 -1
  1010. package/lib/components/CreditCalculator/renderProposal.js +0 -6
  1011. package/lib/components/CreditCalculator/renderProposal.js.map +0 -1
  1012. package/lib/components/CreditCalculator/renderTermsButton.d.ts +0 -1
  1013. package/lib/components/CreditCalculator/renderTermsButton.js +0 -6
  1014. package/lib/components/CreditCalculator/renderTermsButton.js.map +0 -1
  1015. package/lib/components/CreditCalculator/renderWantedSumInput.d.ts +0 -10
  1016. package/lib/components/CreditCalculator/renderWantedSumInput.js +0 -15
  1017. package/lib/components/CreditCalculator/renderWantedSumInput.js.map +0 -1
  1018. package/lib/components/Header/HeaderSubMenuObserver.d.ts +0 -1
  1019. package/lib/components/Header/HeaderSubMenuObserver.js +0 -34
  1020. package/lib/components/Header/HeaderSubMenuObserver.js.map +0 -1
  1021. package/lib/setup-fixture.js.map +0 -1
  1022. package/mobile/dist/components/CreditCalculator/CreditCalculator.d.ts +0 -5
  1023. package/mobile/dist/components/CreditCalculator/CreditCalculator.js +0 -14
  1024. package/mobile/dist/components/CreditCalculator/CreditCalculator.js.map +0 -1
  1025. package/mobile/dist/components/CreditCalculator/CreditCalculatorContent.d.ts +0 -30
  1026. package/mobile/dist/components/CreditCalculator/CreditCalculatorContent.js.map +0 -1
  1027. package/mobile/dist/components/CreditCalculator/CreditCalculatorForm.d.ts +0 -5
  1028. package/mobile/dist/components/CreditCalculator/CreditCalculatorForm.js +0 -53
  1029. package/mobile/dist/components/CreditCalculator/CreditCalculatorForm.js.map +0 -1
  1030. package/mobile/dist/components/CreditCalculator/constants.d.ts +0 -7
  1031. package/mobile/dist/components/CreditCalculator/constants.js +0 -10
  1032. package/mobile/dist/components/CreditCalculator/constants.js.map +0 -1
  1033. package/mobile/dist/components/CreditCalculator/defaultTabs.d.ts +0 -2
  1034. package/mobile/dist/components/CreditCalculator/defaultTabs.js +0 -23
  1035. package/mobile/dist/components/CreditCalculator/defaultTabs.js.map +0 -1
  1036. package/mobile/dist/components/CreditCalculator/getCalculatorParams.d.ts +0 -7
  1037. package/mobile/dist/components/CreditCalculator/getCalculatorParams.js +0 -11
  1038. package/mobile/dist/components/CreditCalculator/getCalculatorParams.js.map +0 -1
  1039. package/mobile/dist/components/CreditCalculator/getCreditRate.d.ts +0 -7
  1040. package/mobile/dist/components/CreditCalculator/getCreditRate.js +0 -13
  1041. package/mobile/dist/components/CreditCalculator/getCreditRate.js.map +0 -1
  1042. package/mobile/dist/components/CreditCalculator/getCreditTermYears.d.ts +0 -1
  1043. package/mobile/dist/components/CreditCalculator/getCreditTermYears.js +0 -15
  1044. package/mobile/dist/components/CreditCalculator/getCreditTermYears.js.map +0 -1
  1045. package/mobile/dist/components/CreditCalculator/getDefaultMonths.d.ts +0 -2
  1046. package/mobile/dist/components/CreditCalculator/getDefaultMonths.js +0 -8
  1047. package/mobile/dist/components/CreditCalculator/getDefaultMonths.js.map +0 -1
  1048. package/mobile/dist/components/CreditCalculator/getDefaultSum.d.ts +0 -2
  1049. package/mobile/dist/components/CreditCalculator/getDefaultSum.js +0 -8
  1050. package/mobile/dist/components/CreditCalculator/getDefaultSum.js.map +0 -1
  1051. package/mobile/dist/components/CreditCalculator/getMonthlyPayment.d.ts +0 -11
  1052. package/mobile/dist/components/CreditCalculator/getMonthlyPayment.js +0 -19
  1053. package/mobile/dist/components/CreditCalculator/getMonthlyPayment.js.map +0 -1
  1054. package/mobile/dist/components/CreditCalculator/renderButton.d.ts +0 -1
  1055. package/mobile/dist/components/CreditCalculator/renderButton.js +0 -15
  1056. package/mobile/dist/components/CreditCalculator/renderButton.js.map +0 -1
  1057. package/mobile/dist/components/CreditCalculator/renderMonthsInput.d.ts +0 -10
  1058. package/mobile/dist/components/CreditCalculator/renderMonthsInput.js +0 -11
  1059. package/mobile/dist/components/CreditCalculator/renderMonthsInput.js.map +0 -1
  1060. package/mobile/dist/components/CreditCalculator/renderProposal.d.ts +0 -1
  1061. package/mobile/dist/components/CreditCalculator/renderProposal.js +0 -9
  1062. package/mobile/dist/components/CreditCalculator/renderProposal.js.map +0 -1
  1063. package/mobile/dist/components/CreditCalculator/renderTermsButton.d.ts +0 -1
  1064. package/mobile/dist/components/CreditCalculator/renderTermsButton.js +0 -9
  1065. package/mobile/dist/components/CreditCalculator/renderTermsButton.js.map +0 -1
  1066. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.d.ts +0 -10
  1067. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.js +0 -18
  1068. package/mobile/dist/components/CreditCalculator/renderWantedSumInput.js.map +0 -1
  1069. package/mobile/dist/components/Header/HeaderSubMenuObserver.d.ts +0 -1
  1070. package/mobile/dist/components/Header/HeaderSubMenuObserver.js +0 -36
  1071. package/mobile/dist/components/Header/HeaderSubMenuObserver.js.map +0 -1
  1072. package/mobile/dist/setup-fixture.js.map +0 -1
  1073. package/mobile/lib/components/CreditCalculator/CreditCalculator.d.ts +0 -5
  1074. package/mobile/lib/components/CreditCalculator/CreditCalculator.js +0 -12
  1075. package/mobile/lib/components/CreditCalculator/CreditCalculator.js.map +0 -1
  1076. package/mobile/lib/components/CreditCalculator/CreditCalculatorContent.d.ts +0 -30
  1077. package/mobile/lib/components/CreditCalculator/CreditCalculatorContent.js +0 -2
  1078. package/mobile/lib/components/CreditCalculator/CreditCalculatorContent.js.map +0 -1
  1079. package/mobile/lib/components/CreditCalculator/CreditCalculatorForm.d.ts +0 -5
  1080. package/mobile/lib/components/CreditCalculator/CreditCalculatorForm.js +0 -51
  1081. package/mobile/lib/components/CreditCalculator/CreditCalculatorForm.js.map +0 -1
  1082. package/mobile/lib/components/CreditCalculator/constants.d.ts +0 -7
  1083. package/mobile/lib/components/CreditCalculator/constants.js +0 -8
  1084. package/mobile/lib/components/CreditCalculator/constants.js.map +0 -1
  1085. package/mobile/lib/components/CreditCalculator/defaultTabs.d.ts +0 -2
  1086. package/mobile/lib/components/CreditCalculator/defaultTabs.js +0 -21
  1087. package/mobile/lib/components/CreditCalculator/defaultTabs.js.map +0 -1
  1088. package/mobile/lib/components/CreditCalculator/getCalculatorParams.d.ts +0 -7
  1089. package/mobile/lib/components/CreditCalculator/getCalculatorParams.js +0 -8
  1090. package/mobile/lib/components/CreditCalculator/getCalculatorParams.js.map +0 -1
  1091. package/mobile/lib/components/CreditCalculator/getCreditRate.d.ts +0 -7
  1092. package/mobile/lib/components/CreditCalculator/getCreditRate.js +0 -10
  1093. package/mobile/lib/components/CreditCalculator/getCreditRate.js.map +0 -1
  1094. package/mobile/lib/components/CreditCalculator/getCreditTermYears.d.ts +0 -1
  1095. package/mobile/lib/components/CreditCalculator/getCreditTermYears.js +0 -12
  1096. package/mobile/lib/components/CreditCalculator/getCreditTermYears.js.map +0 -1
  1097. package/mobile/lib/components/CreditCalculator/getDefaultMonths.d.ts +0 -2
  1098. package/mobile/lib/components/CreditCalculator/getDefaultMonths.js +0 -5
  1099. package/mobile/lib/components/CreditCalculator/getDefaultMonths.js.map +0 -1
  1100. package/mobile/lib/components/CreditCalculator/getDefaultSum.d.ts +0 -2
  1101. package/mobile/lib/components/CreditCalculator/getDefaultSum.js +0 -5
  1102. package/mobile/lib/components/CreditCalculator/getDefaultSum.js.map +0 -1
  1103. package/mobile/lib/components/CreditCalculator/getMonthlyPayment.d.ts +0 -11
  1104. package/mobile/lib/components/CreditCalculator/getMonthlyPayment.js +0 -16
  1105. package/mobile/lib/components/CreditCalculator/getMonthlyPayment.js.map +0 -1
  1106. package/mobile/lib/components/CreditCalculator/renderButton.d.ts +0 -1
  1107. package/mobile/lib/components/CreditCalculator/renderButton.js +0 -12
  1108. package/mobile/lib/components/CreditCalculator/renderButton.js.map +0 -1
  1109. package/mobile/lib/components/CreditCalculator/renderMonthsInput.d.ts +0 -10
  1110. package/mobile/lib/components/CreditCalculator/renderMonthsInput.js +0 -8
  1111. package/mobile/lib/components/CreditCalculator/renderMonthsInput.js.map +0 -1
  1112. package/mobile/lib/components/CreditCalculator/renderProposal.d.ts +0 -1
  1113. package/mobile/lib/components/CreditCalculator/renderProposal.js +0 -6
  1114. package/mobile/lib/components/CreditCalculator/renderProposal.js.map +0 -1
  1115. package/mobile/lib/components/CreditCalculator/renderTermsButton.d.ts +0 -1
  1116. package/mobile/lib/components/CreditCalculator/renderTermsButton.js +0 -6
  1117. package/mobile/lib/components/CreditCalculator/renderTermsButton.js.map +0 -1
  1118. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.d.ts +0 -10
  1119. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.js +0 -15
  1120. package/mobile/lib/components/CreditCalculator/renderWantedSumInput.js.map +0 -1
  1121. package/mobile/lib/components/Header/HeaderSubMenuObserver.d.ts +0 -1
  1122. package/mobile/lib/components/Header/HeaderSubMenuObserver.js +0 -34
  1123. package/mobile/lib/components/Header/HeaderSubMenuObserver.js.map +0 -1
  1124. package/mobile/lib/setup-fixture.js.map +0 -1
  1125. package/mobile/src/components/CreditCalculator/CreditCalculator.example.json +0 -25
  1126. package/mobile/src/components/CreditCalculator/CreditCalculator.tsx +0 -31
  1127. package/mobile/src/components/CreditCalculator/CreditCalculatorContent.ts +0 -34
  1128. package/mobile/src/components/CreditCalculator/CreditCalculatorForm.tsx +0 -92
  1129. package/mobile/src/components/CreditCalculator/constants.ts +0 -8
  1130. package/mobile/src/components/CreditCalculator/defaultTabs.ts +0 -22
  1131. package/mobile/src/components/CreditCalculator/getCalculatorParams.ts +0 -16
  1132. package/mobile/src/components/CreditCalculator/getCreditRate.ts +0 -18
  1133. package/mobile/src/components/CreditCalculator/getCreditTermYears.spec.ts +0 -10
  1134. package/mobile/src/components/CreditCalculator/getCreditTermYears.ts +0 -15
  1135. package/mobile/src/components/CreditCalculator/getDefaultMonths.ts +0 -7
  1136. package/mobile/src/components/CreditCalculator/getDefaultSum.ts +0 -7
  1137. package/mobile/src/components/CreditCalculator/getMonthlyPayment.ts +0 -32
  1138. package/mobile/src/components/CreditCalculator/renderButton.tsx +0 -23
  1139. package/mobile/src/components/CreditCalculator/renderMonthsInput.tsx +0 -29
  1140. package/mobile/src/components/CreditCalculator/renderProposal.tsx +0 -13
  1141. package/mobile/src/components/CreditCalculator/renderTermsButton.tsx +0 -16
  1142. package/mobile/src/components/CreditCalculator/renderWantedSumInput.tsx +0 -36
  1143. package/mobile/src/components/Header/HeaderSubMenuObserver.ts +0 -48
  1144. package/mobile/src/components/Insurance/Insuranse.example.json +0 -36
  1145. package/src/components/CreditCalculator/CreditCalculator.example.json +0 -25
  1146. package/src/components/CreditCalculator/CreditCalculator.fixture.tsx +0 -32
  1147. package/src/components/CreditCalculator/CreditCalculator.tsx +0 -31
  1148. package/src/components/CreditCalculator/CreditCalculatorContent.ts +0 -34
  1149. package/src/components/CreditCalculator/CreditCalculatorForm.tsx +0 -92
  1150. package/src/components/CreditCalculator/constants.ts +0 -8
  1151. package/src/components/CreditCalculator/defaultTabs.ts +0 -22
  1152. package/src/components/CreditCalculator/getCalculatorParams.ts +0 -16
  1153. package/src/components/CreditCalculator/getCreditRate.ts +0 -18
  1154. package/src/components/CreditCalculator/getCreditTermYears.spec.ts +0 -10
  1155. package/src/components/CreditCalculator/getCreditTermYears.ts +0 -15
  1156. package/src/components/CreditCalculator/getDefaultMonths.ts +0 -7
  1157. package/src/components/CreditCalculator/getDefaultSum.ts +0 -7
  1158. package/src/components/CreditCalculator/getMonthlyPayment.ts +0 -32
  1159. package/src/components/CreditCalculator/renderButton.tsx +0 -23
  1160. package/src/components/CreditCalculator/renderMonthsInput.tsx +0 -29
  1161. package/src/components/CreditCalculator/renderProposal.tsx +0 -13
  1162. package/src/components/CreditCalculator/renderTermsButton.tsx +0 -16
  1163. package/src/components/CreditCalculator/renderWantedSumInput.tsx +0 -36
  1164. package/src/components/Header/HeaderSubMenuObserver.ts +0 -48
  1165. package/src/components/Insurance/Insuranse.example.json +0 -36
@@ -237,6 +237,7 @@
237
237
  IconMap["DocsIcon"] = "DocsIcon";
238
238
  IconMap["DocumentTextIcon"] = "DocumentTextIcon";
239
239
  IconMap["DollarIcon"] = "DollarIcon";
240
+ IconMap["DoneIcon"] = "DoneIcon";
240
241
  IconMap["EarthIcon"] = "EarthIcon";
241
242
  IconMap["EmptyWalletChangeIcon"] = "EmptyWalletChangeIcon";
242
243
  IconMap["EmptyWalletIcon"] = "EmptyWalletIcon";
@@ -318,6 +319,7 @@
318
319
  IconTitleMap["DocsIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B";
319
320
  IconTitleMap["DocumentTextIcon"] = "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442 \u0441 \u0442\u0435\u043A\u0441\u0442\u043E\u043C";
320
321
  IconTitleMap["DollarIcon"] = "\u0414\u043E\u043B\u043B\u0430\u0440";
322
+ IconTitleMap["DoneIcon"] = "\u0417\u0435\u043B\u0451\u043D\u0430\u044F '\u0433\u0430\u043B\u043E\u0447\u043A\u0430'";
321
323
  IconTitleMap["EarthIcon"] = "\u0417\u0435\u043C\u043B\u044F";
322
324
  IconTitleMap["EmptyWalletChangeIcon"] = "\u041F\u0443\u0441\u0442\u043E\u0439 \u043A\u043E\u0448\u0435\u043B\u0451\u043A \u0441 \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u043E\u043C";
323
325
  IconTitleMap["EmptyWalletIcon"] = "\u041F\u0443\u0441\u0442\u043E\u0439 \u043A\u043E\u0448\u0435\u043B\u0451\u043A";
@@ -487,8 +489,9 @@
487
489
  return prefix + extension + size;
488
490
  };
489
491
  const getExtFromHref = (href) => {
490
- if (!href)
492
+ if (!href) {
491
493
  return '';
494
+ }
492
495
  const index = href.lastIndexOf('.');
493
496
  return index !== -1 ? href.substring(index + 1) : '';
494
497
  };
@@ -652,8 +655,9 @@
652
655
  return buttons?.length ? (jsx("div", { className: className, children: buttons.map((button, index) => renderButton$2(useLink({ router, handlerDecorator }, button), index)) })) : null;
653
656
  });
654
657
  function renderButton$2({ icon, ...button }, i) {
655
- if (!button?.text)
658
+ if (!button?.text) {
656
659
  return;
660
+ }
657
661
  return icon ? (jsx(Button, { appendLeft: jsx(Img, { image: icon, width: "24", height: "24", asSVG: true }), ...button }, String(i))) : (jsx(Button, { ...button }, String(i)));
658
662
  }
659
663
 
@@ -733,7 +737,7 @@
733
737
 
734
738
  const ProductBlockInner = JSX(({ className = '', context, title, headingType = 'h2', description, benefits, benefitsVersion = 'normal', buttons, image, items, version = 'primary', isDotted = true, textBlockClassName = '', }) => {
735
739
  const textColor = version === 'secondary' ? 'text-white' : 'text-primary-text';
736
- return (jsxs("div", { className: `flex grow justify-between items-stretch ${className}`, children: [jsx("div", { className: `flex flex-col ${textBlockClassName}`, children: jsxs(BaseTile, { context: context, title: getTitle(title, headingType), buttons: getButtons(context, buttons), children: [description ? (jsx(Description, { className: `mt-4 max-w-[600px] text-md font-light ${textColor}`, description: description })) : null, benefits?.filter((items) => items.label)?.length ? (jsx("div", { className: "flex gap-6 mt-6", children: benefits.map((benefit, i) => renderBenefit$1({ benefit, version, benefitsVersion }, i)) })) : null, items?.length ? (jsx(List, { className: "mt-5 text-title-2xs font-light", items: items, itemClassName: "mb-[7px]", version: version, isDotted: isDotted })) : null] }) }), image?.src && jsx(Img, { className: "mt-[-50px]", image: image })] }));
740
+ return (jsxs("div", { className: `flex grow justify-between items-stretch ${className}`, children: [jsx("div", { className: `flex flex-col ${textBlockClassName}`, children: jsxs(BaseTile, { context: context, title: getTitle(title, headingType), buttons: getButtons(context, buttons), children: [description ? (jsx(Description, { className: `mt-4 max-w-[600px] text-md font-light ${textColor}`, description: description })) : null, benefits?.filter((_) => _.label)?.length ? (jsx("div", { className: "flex gap-6 mt-6", children: benefits.map((benefit, i) => renderBenefit$1({ benefit, version, benefitsVersion }, i)) })) : null, items?.length ? (jsx(List, { className: "mt-5 text-title-2xs font-light", items: items, itemClassName: "mb-[7px]", version: version, isDotted: isDotted })) : null] }) }), image?.src && jsx(Img, { className: "mt-[-50px]", image: image })] }));
737
741
  });
738
742
  const getTitle = (title, headingType) => {
739
743
  return title ? (jsx(Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })) : null;
@@ -785,9 +789,9 @@
785
789
  };
786
790
  const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className, anchor = null, }) => {
787
791
  const textBlockStyleMap = textBlockStyleMaps[blockVersion];
788
- return (jsxs("section", { className: `font-sans px-9 py-4 flex ${textBlockStyleMap.background} ${className || ''}`, id: anchor, children: [iconVersion === 'small' ? renderIcon$1(textBlockStyleMap.icon) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "py-0.5", children: [title ? (jsx("div", { className: `font-medium text-base mb-1 ${textBlockStyleMap.title}`, children: title })) : null, description ? (jsx("div", { className: `text-sm ${textBlockStyleMap.description}`, children: description })) : null] })] }));
792
+ return (jsxs("section", { className: `font-sans px-9 py-4 flex ${textBlockStyleMap.background} ${className || ''}`, id: anchor, children: [iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "py-0.5", children: [title ? (jsx("div", { className: `font-medium text-base mb-1 ${textBlockStyleMap.title}`, children: title })) : null, description ? (jsx("div", { className: `text-sm ${textBlockStyleMap.description}`, children: description })) : null] })] }));
789
793
  });
790
- function renderIcon$1(className) {
794
+ function renderIcon(className) {
791
795
  return (jsx("div", { className: "pt-1.5 pl-1 pr-4", children: jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs ${className}`, children: "i" }) }));
792
796
  }
793
797
  function renderImage(image) {
@@ -831,12 +835,12 @@
831
835
  secondary: 'bg-primary-main text-white',
832
836
  };
833
837
  const Tile = JSX((props) => {
834
- const { context, title, headingType = 'h3', description, items, children, buttons, image, className = '', version = 'primary', role, anchor = null, } = props;
838
+ const { context, title, headingType = 'h3', description, items, children, buttons, image, isDotted = true, className = '', version = 'primary', role, anchor = null, } = props;
835
839
  return (jsx("section", { className: `overflow-hidden font-sans p-9 pr-3 box-border ${className} ${tileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, role: role, id: anchor, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}
836
- ${version === 'primary' ? 'text-primary-text' : ''}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons.map((button) => ({ ...button, className: 'w-[158px]' })), className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? (jsx(Description, { className: "max-w-[600px] text-title-new-sm font-light", description: description })) : null, children, renderList$1(items, version)] }) }));
840
+ ${version === 'primary' ? 'text-primary-text' : ''}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons.map((button) => ({ ...button, className: 'w-[158px]' })), className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? (jsx(Description, { className: "max-w-[600px] text-title-new-sm font-light", description: description })) : null, children, renderList$1(items, version, isDotted)] }) }));
837
841
  });
838
- function renderList$1(items, version) {
839
- return items?.length ? (jsx(List, { items: items, itemClassName: "text-title-2xs font-light mt-2", version: version === 'primary' ? 'tile' : 'tile-white' })) : null;
842
+ function renderList$1(items, version, isDotted) {
843
+ return items?.length ? (jsx(List, { items: items, isDotted: isDotted, itemClassName: "text-title-2xs font-light mt-2", version: version === 'primary' ? 'tile' : 'tile-white' })) : null;
840
844
  }
841
845
 
842
846
  const productTileStyleMap = {
@@ -844,11 +848,11 @@
844
848
  secondary: 'bg-primary-main text-white',
845
849
  };
846
850
  const ProductTile = JSX(({ context, className = '', title, headingType = 'h3', description, additionalDescription, benefits, buttons, image, version = 'primary', anchor = null, }) => {
847
- return (jsx("section", { className: `bg-white overflow-hidden text-primary-text font-sans p-9 box-border ${className} ${productTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, id: anchor, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? (jsx(Description, { className: "mt-4 max-w-[600px]", description: description })) : null, renderBenefits(benefits, version), additionalDescription
851
+ return (jsx("section", { className: `bg-white overflow-hidden text-primary-text font-sans p-9 box-border ${className} ${productTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, id: anchor, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? (jsx(Description, { className: "mt-4 max-w-[600px]", description: description })) : null, renderBenefits(benefits || [], version), additionalDescription
848
852
  ? renderAdditionalDescription(additionalDescription, version)
849
853
  : null] }) }));
850
854
  });
851
- function renderBenefits(benefits = [], version) {
855
+ function renderBenefits(benefits, version) {
852
856
  return (jsxs("div", { className: "flex mt-5 mb-1", children: [benefits.length ? jsx("div", { className: "mr-8", children: benefits.map(renderBenefitLabel) }) : null, benefits.length ? (jsx("div", { className: "pt-1", children: benefits.map((_, i) => renderBenefitDescription(_, i, version)) })) : null] }));
853
857
  }
854
858
  function renderBenefitLabel(benefit, i) {
@@ -869,10 +873,6 @@
869
873
  return jsx("div", { className: `text-sm mt-2.5 ${descStyleMap[version]}`, children: additionalDescription });
870
874
  }
871
875
 
872
- const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, 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 ${disabled
873
- ? 'bg-secondary-light text-secondary-text'
874
- : 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(Img, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, width: "16", height: "16", asSVG: true }) })));
875
-
876
876
  const cardVersionMap = {
877
877
  primary: 'bg-white text-secondary-text',
878
878
  secondary: 'bg-primary-main text-white',
@@ -892,7 +892,7 @@
892
892
 
893
893
  const GalleryCardInner = JSX(({ title, description, image, items, button, version, isDotted = true }) => {
894
894
  const titleStyleClasses = getTitleStyle(version);
895
- return (jsxs("div", { className: "h-full flex flex-col justify-between text-center", children: [jsxs("div", { children: [image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: image }) })) : null, title ? renderCardTitle(title, titleStyleClasses) : null, description ? (jsx("div", { className: `font-light text-m-md-new ${title ? 'mt-2' : ''}`, children: description })) : null, items?.length ? renderItems(items, version, isDotted) : null] }), button?.text ? renderButton$1(button) : null] }));
895
+ return (jsxs("div", { className: "h-full flex flex-col justify-between text-center", children: [jsxs("div", { children: [image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: image }) })) : null, title ? renderCardTitle(title, titleStyleClasses) : null, description ? (jsx("div", { className: `font-light text-m-md-new ${title ? 'mt-2' : ''}`, children: description })) : null, items?.length ? renderItems(items, isDotted, version) : null] }), button?.text ? renderButton$1(button) : null] }));
896
896
  });
897
897
  function renderButton$1(button) {
898
898
  return (jsx(Button, { className: "mt-6 w-full", appendLeft: button.icon && jsx(Img, { image: button.icon, width: "24px", height: "24px", asSVG: true }), ...button }));
@@ -900,7 +900,7 @@
900
900
  function renderCardTitle(title, className) {
901
901
  return jsx("div", { className: `text-xl m-0 ${className}`, children: title });
902
902
  }
903
- function renderItems(items, version = 'primary', isDotted) {
903
+ function renderItems(items, isDotted, version = 'primary') {
904
904
  return (jsx(List, { className: `max-w-[308px] mt-2 text-sm ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "mt-1 first:mt-0", items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted, version: version }));
905
905
  }
906
906
  function getTitleStyle(version) {
@@ -917,6 +917,14 @@
917
917
  items-stretch ${cardStyleMap[version]} ${cardVersionMap[card.version ?? 'primary']} w-full col-span-4`, role: "listitem", children: jsx(GalleryCardInner, { ...card }) }, String(i)));
918
918
  }
919
919
 
920
+ const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, 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 ${disabled
921
+ ? 'bg-secondary-light text-secondary-text'
922
+ : 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(Img, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, width: "16", height: "16", asSVG: true }) })));
923
+
924
+ function renderArrows({ handler, isShown, btnClass, className = '', isDisabled = false, }) {
925
+ return (jsxs("div", { children: [isShown[0] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 ${btnClass[0]} ${className}`, onClick: handler[0], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left", disabled: !isShown[0] })) : null, isShown[1] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 rotate-180 ${btnClass[1]} ${className}`, onClick: handler[1], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right", disabled: !isShown[1] })) : null] }));
926
+ }
927
+
920
928
  const GalleryInner = JSX(({ context, cards = [], className = '', version = 'normal', anchor = null, ...rest }) => {
921
929
  const [activeCardIndex, setActiveCardIndex] = context.useState(0);
922
930
  const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
@@ -925,7 +933,12 @@
925
933
  const showNextButton = isGalleryScrollAvailable &&
926
934
  cards?.length - activeCardIndex > galleryLengthForScrollMap[version];
927
935
  const showPrevButton = isGalleryScrollAvailable && activeCardIndex > 0;
928
- return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-[42px] overflow-hidden ${className}`, id: anchor, children: [jsx(GalleryContainer, { context: context, cards: cards, version: version, activeCardIndex: activeCardIndex, ...rest }), showPrevButton ? (jsx(ArrowButton, { className: "absolute top-1/2 left-8 z-10 mt-[25px]", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })) : null, showNextButton ? (jsx(ArrowButton, { className: "absolute top-1/2 right-8 z-10 mt-[25px] rotate-180", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" })) : null, jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white" }), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white" })] }));
936
+ return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-[42px] overflow-hidden ${className}`, id: anchor, children: [jsx(GalleryContainer, { context: context, cards: cards, version: version, activeCardIndex: activeCardIndex, ...rest }), renderArrows({
937
+ handler: [handlePrevClick, handleNextClick],
938
+ isShown: [showPrevButton, showNextButton],
939
+ btnClass: ['left-8', 'right-8'],
940
+ className: 'top-1/2',
941
+ }), jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white" }), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white" })] }));
929
942
  });
930
943
 
931
944
  const Gallery = JSX((props) => jsx(GalleryInner, { ...props, version: "normal" }));
@@ -1051,12 +1064,21 @@
1051
1064
  const cellClasses = `mx-7 h-full ${DIVIDER_CLASSES$1} ${isFillGradient && isFirstRow ? 'border-t' : ''} ${!isLastRow ? 'border-solid' : 'border-b-0'}`;
1052
1065
  return (jsx("div", { className: cellWrapperClasses, role: "cell", children: jsx("div", { className: cellClasses, children: cell.map((item, i) => renderCellInner$1(item, i, isFillGradient)) }) }));
1053
1066
  });
1054
- const renderCellInner$1 = ({ label, description }, i, isFillGradient) => (jsxs("div", { className: "first:pt-7 pt-6 last:pb-7", children: [label ? (jsx("h4", { className: `text-xl font-medium m-0 ${isFillGradient ? 'text-white' : ''}`, children: label })) : null, description ? (jsx("div", { className: `text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`, children: description })) : null] }, String(i)));
1067
+ const labelStyle = (isFillGradient = false) => `text-xl font-medium m-0 ${isFillGradient ? 'text-white' : ''}`;
1068
+ const descriptionStyle = (isFillGradient = false) => `text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`;
1069
+ const renderCellInner$1 = ({ label, description }, i, isFillGradient) => (jsxs("div", { className: "first:pt-7 pt-6 last:pb-7", children: [label ? jsx("h4", { className: labelStyle(isFillGradient), children: label }) : null, description ? jsx("div", { className: descriptionStyle(isFillGradient), children: description }) : null] }, String(i)));
1055
1070
 
1056
- const TableRow = JSX(({ row: { header, data }, activeCardIndex, isColoredFirstColumn, isFirstRow, isLastRow }) => (jsxs(TableRowContainer, { children: [header?.title ? (jsx("div", { className: `text-sm py-7 ${DIVIDER_CLASSES$1} ${FIRST_CELL_CLASSES$1} ${!isLastRow ? 'border-solid' : 'border-b-0'}`, children: header.title })) : null, data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, children: data.map((cell, i) => (jsx(TableCell, { cell: cell, isFirstRow: isFirstRow, isLastRow: isLastRow, isFillGradient: isColoredFirstColumn && i === 0 }, String(i)))) })) : null] })));
1071
+ const titleStyle = (isLastRow = false) => `text-sm py-7 ${DIVIDER_CLASSES$1} ${FIRST_CELL_CLASSES$1} ${isLastRow ? 'border-b-0' : 'border-solid'}`;
1072
+ const TableRow = JSX(({ row: { header, data }, activeCardIndex, isColoredFirstColumn, isFirstRow, isLastRow }) => (jsxs(TableRowContainer, { children: [header?.title ? jsx("div", { className: titleStyle(isLastRow), children: header.title }) : null, data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, children: data.map((cell, i) => (jsx(TableCell, { cell: cell, isFirstRow: isFirstRow, isLastRow: isLastRow, isFillGradient: isColoredFirstColumn && i === 0 }, String(i)))) })) : null] })));
1057
1073
 
1058
- const TableArrowScrollControl = JSX(({ isScrollAvailable, onNextClick, onPrevClick, showNextButton, showPrevButton }) => {
1059
- return isScrollAvailable ? (jsx("div", { children: jsxs("div", { className: "absolute top-7 right-7 z-10", children: [jsx(ArrowButton, { className: "mt-4 rotate-180", onClick: onNextClick, disabled: !showNextButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" }), jsx(ArrowButton, { className: "mt-4", onClick: onPrevClick, disabled: !showPrevButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })] }) })) : null;
1074
+ const TableArrowScrollControl = JSX(({ isScrollAvailable, handleNextClick, handlePrevClick, showNextButton, showPrevButton }) => {
1075
+ return isScrollAvailable ? (jsx("div", { children: renderArrows({
1076
+ handler: [handlePrevClick, handleNextClick],
1077
+ isShown: [showPrevButton, showNextButton],
1078
+ btnClass: ['top-[108px]', 'top-11'],
1079
+ className: 'right-7',
1080
+ isDisabled: true,
1081
+ }) })) : null;
1060
1082
  });
1061
1083
 
1062
1084
  const ComparisonTableRows = JSX(({ rowData, activeCardIndex, isColoredFirstColumn, ...tableArrowScrollProps }) => {
@@ -1064,12 +1086,12 @@
1064
1086
  });
1065
1087
 
1066
1088
  const useTableArrowScrollControl = ({ columnsLength, colsLengthForScroll, activeCardIndex, setActiveCardIndex, }) => {
1067
- const onNextClick = () => setActiveCardIndex(activeCardIndex + 1);
1068
- const onPrevClick = () => setActiveCardIndex(activeCardIndex - 1);
1089
+ const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
1090
+ const handlePrevClick = () => setActiveCardIndex(activeCardIndex - 1);
1069
1091
  const isScrollAvailable = columnsLength > colsLengthForScroll;
1070
1092
  const showNextButton = isScrollAvailable && columnsLength - activeCardIndex > colsLengthForScroll;
1071
1093
  const showPrevButton = Boolean(isScrollAvailable && activeCardIndex > 0);
1072
- return { onNextClick, onPrevClick, isScrollAvailable, showNextButton, showPrevButton };
1094
+ return { handleNextClick, handlePrevClick, isScrollAvailable, showNextButton, showPrevButton };
1073
1095
  };
1074
1096
 
1075
1097
  const ComparisonTableBody = JSX(({ context, columns, rowHeaders, isShowAllRow, visibleRowLength, isColoredFirstColumn }) => {
@@ -1118,7 +1140,7 @@
1118
1140
  }
1119
1141
 
1120
1142
  const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
1121
- return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill, ...options }, i) => (jsx("path", { d: d, fill: fill || 'currentColor', ...commonOptions, ...options }, i))) }));
1143
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => (jsx("path", { d: d, fill: pathFill || 'currentColor', ...commonOptions, ...options }, i))) }));
1122
1144
  });
1123
1145
 
1124
1146
  const CHECK_PATHS = [
@@ -1139,83 +1161,90 @@
1139
1161
  return (jsxs("div", { className: `mb-5 ${className}`, children: [title ? jsx("div", { className: "text-base font-light", children: title }) : null, value ? (jsxs("div", { className: "text-title font-normal", children: [prefix, " ", addSpacesBetweenNumbers(Math.round(value)), " ", postfix] })) : null] }));
1140
1162
  });
1141
1163
 
1142
- const DEFAULT_MIN_SUM$1 = 30000;
1143
- const DEFAULT_MAX_SUM$1 = 3000000;
1144
- const DEFAULT_SUM$1 = (DEFAULT_MAX_SUM$1 - DEFAULT_MIN_SUM$1) / 2;
1145
- const DEFAULT_MIN_MONTHS$1 = 1;
1146
- const DEFAULT_MAX_MONTHS$1 = 84;
1147
- const DEFAULT_MONTHS$1 = Math.round((DEFAULT_MAX_MONTHS$1 - DEFAULT_MIN_MONTHS$1) / 2);
1148
- const MONTHS_IN_YEAR$1 = 12;
1164
+ const DEFAULT_MIN_SUM = 30000;
1165
+ const DEFAULT_MAX_SUM = 3000000;
1166
+ const DEFAULT_SUM = (DEFAULT_MAX_SUM - DEFAULT_MIN_SUM) / 2;
1167
+ const DEFAULT_MIN_MONTHS = 1;
1168
+ const DEFAULT_MAX_MONTHS = 84;
1169
+ const DEFAULT_MONTHS = Math.round((DEFAULT_MAX_MONTHS - DEFAULT_MIN_MONTHS) / 2);
1170
+ const MONTHS_IN_YEAR = 12;
1149
1171
 
1150
1172
  const InputRange = JSX(({ className, title, items = [], min = 1, max = 100, step = 1, value = min, onChange }) => {
1151
- const handleChange = (value) => {
1152
- if (!onChange)
1173
+ const handleChange = (_) => {
1174
+ if (!onChange) {
1153
1175
  return;
1154
- const sanitizedValue = Number(value.replace(/\D/g, ''));
1176
+ }
1177
+ const sanitizedValue = Number(_.replace(/\D/g, ''));
1155
1178
  onChange(sanitizedValue);
1156
1179
  };
1157
1180
  const inputStyle = {
1158
1181
  backgroundSize: `${(((value - min) * 100) / (max - min)).toFixed(2)}% 100%`,
1159
1182
  };
1160
1183
  const handleBlur = () => {
1161
- if (!onChange)
1184
+ if (!onChange) {
1162
1185
  return;
1163
- if (value < min)
1186
+ }
1187
+ if (value < min) {
1164
1188
  onChange(min);
1165
- if (value > max)
1189
+ }
1190
+ if (value > max) {
1166
1191
  onChange(max);
1192
+ }
1167
1193
  };
1168
1194
  return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? jsx("span", { className: "text-base text-secondary-text pl-4", children: title }) : null, jsx("input", { className: `m-0 mt-[5px] font-sans text-title w-full h-14 border border-solid border-main-stroke rounded-md
1169
1195
  outline-none p-0 pl-4 box-border text-primary-text`, value: addSpacesBetweenNumbers(value), onChange: (e) => handleChange(e.target.value), onBlur: handleBlur }), jsx("div", { className: "absolute inset-x-0 bottom-[-4px] px-4 leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider", type: "range", min: min, max: max, step: step, value: value, onChange: (e) => handleChange(e.target.value), style: inputStyle }) })] }), jsx("div", { className: "flex justify-between my-3", children: items.map((item, i) => (jsx("span", { className: "text-sm leading-[14px] text-secondary-text pl-4", children: item }, String(i)))) })] }));
1170
1196
  });
1171
1197
 
1172
- const STEP_MONEY$3 = 1000;
1173
- function renderWantedSumInput$1(props) {
1198
+ const STEP_MONEY$2 = 1000;
1199
+ function renderWantedSumInput(props) {
1174
1200
  const { title, className = '', calculatorParams, moneyValue, defaultSum, setMoneyValue, isShowItems = true, } = props;
1175
- const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM$1;
1176
- const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM$1;
1201
+ const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
1202
+ const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
1177
1203
  const items = [
1178
1204
  `От ${addSpacesBetweenNumbers(minSum)} ₽`,
1179
1205
  `До ${addSpacesBetweenNumbers(maxSum)} ₽`,
1180
1206
  ];
1181
- return (jsx(InputRange, { className: className, title: title, items: isShowItems ? items : [], min: minSum, max: maxSum, step: STEP_MONEY$3, value: moneyValue || defaultSum, onChange: setMoneyValue }));
1207
+ return (jsx(InputRange, { className: className, title: title, items: isShowItems ? items : [], min: minSum, max: maxSum, step: STEP_MONEY$2, value: moneyValue || defaultSum, onChange: setMoneyValue }));
1182
1208
  }
1183
1209
 
1184
- const DEFAULT_RATE$1 = 10.2;
1185
- const getCreditRate$1 = (params) => {
1210
+ const DEFAULT_RATE = 10.2;
1211
+ const getCreditRate = (params) => {
1186
1212
  const { calculatorParams, isInsurance } = params;
1187
- if (!calculatorParams)
1188
- return DEFAULT_RATE$1;
1213
+ if (!calculatorParams) {
1214
+ return DEFAULT_RATE;
1215
+ }
1189
1216
  return isInsurance
1190
- ? calculatorParams?.rateWithInsurance || DEFAULT_RATE$1
1191
- : calculatorParams?.rateWithoutInsurance || DEFAULT_RATE$1;
1217
+ ? calculatorParams?.rateWithInsurance || DEFAULT_RATE
1218
+ : calculatorParams?.rateWithoutInsurance || DEFAULT_RATE;
1192
1219
  };
1193
1220
 
1194
- const getCalculatorParams$1 = (params) => {
1221
+ const getCalculatorParams = (params) => {
1195
1222
  const { tableRows, isAnnuity = false } = params;
1196
- if (!tableRows)
1223
+ if (!tableRows) {
1197
1224
  return {};
1225
+ }
1198
1226
  const calculatorParams = tableRows.find((row) => row.isAnnuity === isAnnuity);
1199
1227
  return calculatorParams || {};
1200
1228
  };
1201
1229
 
1202
- const getDefaultSum$1 = (calculatorParams) => calculatorParams.maxSum && calculatorParams.minSum
1230
+ const getDefaultSum = (calculatorParams) => calculatorParams.maxSum && calculatorParams.minSum
1203
1231
  ? (calculatorParams.maxSum - calculatorParams.minSum) / 2
1204
- : DEFAULT_SUM$1;
1232
+ : DEFAULT_SUM;
1205
1233
 
1206
- const getDefaultMonths$1 = (calculatorParams) => calculatorParams.maxMonths && calculatorParams.minMonths
1234
+ const getDefaultMonths = (calculatorParams) => calculatorParams.maxMonths && calculatorParams.minMonths
1207
1235
  ? Math.round((calculatorParams.maxMonths - calculatorParams.minMonths) / 2)
1208
- : DEFAULT_MONTHS$1;
1236
+ : DEFAULT_MONTHS;
1209
1237
 
1210
1238
  const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
1211
1239
 
1212
- const getMonthlyPayment$1 = (params) => {
1240
+ const getMonthlyPayment = (params) => {
1213
1241
  const { calculatorParams, paymentType, rate, sum, months } = params;
1214
- if (!calculatorParams)
1242
+ if (!calculatorParams) {
1215
1243
  return 0;
1216
- const finalSum = clamp(sum, calculatorParams.minSum || DEFAULT_MIN_SUM$1, calculatorParams.maxSum || DEFAULT_MAX_SUM$1);
1244
+ }
1245
+ const finalSum = clamp(sum, calculatorParams.minSum || DEFAULT_MIN_SUM, calculatorParams.maxSum || DEFAULT_MAX_SUM);
1217
1246
  if (paymentType === 'annuity') {
1218
- const annuityCoef = Number(rate) / (MONTHS_IN_YEAR$1 * 100);
1247
+ const annuityCoef = Number(rate) / (MONTHS_IN_YEAR * 100);
1219
1248
  return finalSum * (annuityCoef + annuityCoef / (Math.pow(1 + annuityCoef, months) - 1));
1220
1249
  }
1221
1250
  else {
@@ -1223,14 +1252,14 @@
1223
1252
  }
1224
1253
  };
1225
1254
 
1226
- const STEP_MONTHS$1 = 1;
1227
- function renderMonthsInput$1(props) {
1255
+ const STEP_MONTHS = 1;
1256
+ function renderMonthsInput(props) {
1228
1257
  const { title, minMonths, maxMonths, monthsValue, defaultMonths, setMonthsValue } = props;
1229
1258
  const monthText = (month) => {
1230
1259
  const text = Number(month) % 10 === 1 ? 'месяца' : 'месяцев';
1231
1260
  return `${month} ${text}`;
1232
1261
  };
1233
- return (jsx(InputRange, { className: "mt-6", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], min: minMonths, max: maxMonths, step: STEP_MONTHS$1, value: monthsValue || defaultMonths, onChange: setMonthsValue }));
1262
+ return (jsx(InputRange, { className: "mt-6", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: monthsValue || defaultMonths, onChange: setMonthsValue }));
1234
1263
  }
1235
1264
 
1236
1265
  function renderButtonSection(context, buttons) {
@@ -1242,29 +1271,29 @@
1242
1271
  return (jsxs("div", { children: [jsx("div", { className: "text-sm font-light ml-3", children: title }), jsxs("div", { className: "flex justify-start", children: [jsx("span", { className: `calc-rate-text font-mohave text-[200px] leading-[250px] pr-4 mt-[-16px] ${className}`, children: rateFormat }), sup ? jsx("span", { className: "calc-rate-text text-[65px] leading-[75px]", children: sup }) : ''] })] }));
1243
1272
  }
1244
1273
 
1245
- const DEFAULT_PAYMENT_TYPE$1 = 'annuity';
1246
- const CreditCalculatorForm$1 = JSX(({ context, className = '', buttons }) => {
1274
+ const DEFAULT_PAYMENT_TYPE = 'annuity';
1275
+ const CreditCalculatorForm = JSX(({ context, className = '', buttons }) => {
1247
1276
  const [moneyValue, setMoneyValue] = context.useState(undefined);
1248
1277
  const [monthsValue, setMonthsValue] = context.useState(undefined);
1249
1278
  const [isAnnuity, toggleIsAnnuity] = context.useState(false);
1250
1279
  const [isBudgetary, toggleIsBudgetary] = context.useState(false);
1251
1280
  const [isInsurance, toggleIsInsurance] = context.useState(false);
1252
1281
  const tableRows = useCreditCalculatorData(context.useAsyncData, 'directoryName').rows;
1253
- const calculatorParams = getCalculatorParams$1({ tableRows, isAnnuity: isAnnuity });
1254
- const defaultSum = getDefaultSum$1(calculatorParams);
1255
- const defaultMonths = getDefaultMonths$1(calculatorParams);
1256
- const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS$1;
1257
- const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS$1;
1258
- const rate = getCreditRate$1({ calculatorParams, isInsurance: isInsurance });
1259
- const monthlyPayment = getMonthlyPayment$1({
1282
+ const calculatorParams = getCalculatorParams({ tableRows, isAnnuity: isAnnuity });
1283
+ const defaultSum = getDefaultSum(calculatorParams);
1284
+ const defaultMonths = getDefaultMonths(calculatorParams);
1285
+ const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS;
1286
+ const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS;
1287
+ const rate = getCreditRate({ calculatorParams, isInsurance: isInsurance });
1288
+ const monthlyPayment = getMonthlyPayment({
1260
1289
  calculatorParams,
1261
- paymentType: DEFAULT_PAYMENT_TYPE$1,
1290
+ paymentType: DEFAULT_PAYMENT_TYPE,
1262
1291
  rate,
1263
1292
  sum: moneyValue || defaultSum,
1264
1293
  months: monthsValue || defaultMonths,
1265
1294
  });
1266
1295
  const title = 'Сумма кредита, ₽';
1267
- return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput$1({ title, calculatorParams, moneyValue, defaultSum, setMoneyValue }), renderMonthsInput$1({
1296
+ return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput({ title, calculatorParams, moneyValue, defaultSum, setMoneyValue }), renderMonthsInput({
1268
1297
  title: 'Сумма кредита, ₽',
1269
1298
  minMonths,
1270
1299
  maxMonths,
@@ -1276,23 +1305,23 @@
1276
1305
  : null }), jsxs("div", { className: "w-[351px]", children: [monthlyPayment ? (jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: monthlyPayment, postfix: "\u20BD" })) : null, renderButtonSection(context, buttons)] })] }));
1277
1306
  });
1278
1307
 
1279
- const STEP_MONEY$2 = 1000;
1308
+ const STEP_MONEY$1 = 1000;
1280
1309
  function renderRealEstateValue(props) {
1281
1310
  const { calculatorParams, moneyValue, defaultSum, setMoneyValue } = props;
1282
- const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM$1;
1283
- const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM$1;
1284
- return (jsx(InputRange, { title: "\u0421\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u0438, \u20BD ", items: [`От ${addSpacesBetweenNumbers(minSum)} ₽`, `До ${addSpacesBetweenNumbers(maxSum)} ₽`], min: minSum, max: maxSum, step: STEP_MONEY$2, value: moneyValue || defaultSum, onChange: setMoneyValue }));
1311
+ const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
1312
+ const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
1313
+ return (jsx(InputRange, { title: "\u0421\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u0438, \u20BD ", items: [`От ${addSpacesBetweenNumbers(minSum)} ₽`, `До ${addSpacesBetweenNumbers(maxSum)} ₽`], min: minSum, max: maxSum, step: STEP_MONEY$1, value: moneyValue || defaultSum, onChange: setMoneyValue }));
1285
1314
  }
1286
1315
 
1287
- const STEP_MONEY$1 = 1000;
1316
+ const STEP_MONEY = 1000;
1288
1317
  function renderInitialFeeInput(props) {
1289
1318
  const { calculatorParams, moneyValue, defaultSum, setMoneyValue } = props;
1290
- const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM$1;
1291
- const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM$1;
1319
+ const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
1320
+ const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
1292
1321
  return (jsx(InputRange, { className: "mt-6", title: "\u041F\u0435\u0440\u0432\u043E\u043D\u0430\u0447\u0430\u043B\u044C\u043D\u044B\u0439 \u0432\u0437\u043D\u043E\u0441, \u20BD ", items: [
1293
1322
  `От ${addSpacesBetweenNumbers(minSum)} рублей`,
1294
1323
  `До ${addSpacesBetweenNumbers(maxSum)} рублей`,
1295
- ], min: minSum, max: maxSum, step: STEP_MONEY$1, value: moneyValue || defaultSum, onChange: setMoneyValue }));
1324
+ ], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }));
1296
1325
  }
1297
1326
 
1298
1327
  function renderProposalMortgage({ credit, period, taxRefund }) {
@@ -1305,12 +1334,12 @@
1305
1334
  const [isInsurance, toggleIsInsurance] = context.useState(false);
1306
1335
  const [isFullInsurance, toggleIsFullInsurance] = context.useState(false);
1307
1336
  const tableRows = useCreditCalculatorData(context.useAsyncData, 'directoryName').rows;
1308
- const calculatorParams = getCalculatorParams$1({ tableRows, isAnnuity: isInsurance });
1309
- const defaultSum = getDefaultSum$1(calculatorParams);
1310
- const defaultMonths = getDefaultMonths$1(calculatorParams);
1311
- const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS$1;
1312
- const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS$1;
1313
- const rate = getCreditRate$1({ calculatorParams, isInsurance: isInsurance });
1337
+ const calculatorParams = getCalculatorParams({ tableRows, isAnnuity: isInsurance });
1338
+ const defaultSum = getDefaultSum(calculatorParams);
1339
+ const defaultMonths = getDefaultMonths(calculatorParams);
1340
+ const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS;
1341
+ const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS;
1342
+ const rate = getCreditRate({ calculatorParams, isInsurance: isInsurance });
1314
1343
  const monthlyPayment = 777777; // TODO: hardcode
1315
1344
  const proposalMortgageValue = { credit: 3892000, period: 15, taxRefund: 650000 }; // TODO: hardcode
1316
1345
  return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderRealEstateValue({ calculatorParams, moneyValue, defaultSum, setMoneyValue }), renderInitialFeeInput({
@@ -1318,7 +1347,7 @@
1318
1347
  moneyValue,
1319
1348
  defaultSum,
1320
1349
  setMoneyValue,
1321
- }), renderMonthsInput$1({
1350
+ }), renderMonthsInput({
1322
1351
  title: 'Срок ипотеки, месяцев',
1323
1352
  minMonths,
1324
1353
  maxMonths,
@@ -1334,21 +1363,21 @@
1334
1363
  const [moneyValue, setMoneyValue] = context.useState(undefined);
1335
1364
  const [monthsValue, setMonthsValue] = context.useState(undefined);
1336
1365
  const tableRows = useCreditCalculatorData(context.useAsyncData, 'directoryName').rows;
1337
- const calculatorParams = getCalculatorParams$1({ tableRows, isAnnuity: false });
1338
- const defaultSum = getDefaultSum$1(calculatorParams);
1339
- const defaultMonths = getDefaultMonths$1(calculatorParams);
1366
+ const calculatorParams = getCalculatorParams({ tableRows, isAnnuity: false });
1367
+ const defaultSum = getDefaultSum(calculatorParams);
1368
+ const defaultMonths = getDefaultMonths(calculatorParams);
1340
1369
  const income = 948841;
1341
1370
  const finallySum = 1218841;
1342
- return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput$1({
1371
+ return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput({
1343
1372
  title: 'Сумма вклада, ₽',
1344
1373
  calculatorParams: { minSum, maxSum },
1345
1374
  moneyValue,
1346
1375
  defaultSum,
1347
1376
  setMoneyValue,
1348
- }), renderMonthsInput$1({
1377
+ }), renderMonthsInput({
1349
1378
  title: 'Срок вклада, месяцев',
1350
- minMonths: minMonths || DEFAULT_MIN_MONTHS$1,
1351
- maxMonths: maxMonths || DEFAULT_MAX_MONTHS$1,
1379
+ minMonths: minMonths || DEFAULT_MIN_MONTHS,
1380
+ maxMonths: maxMonths || DEFAULT_MAX_MONTHS,
1352
1381
  monthsValue,
1353
1382
  defaultMonths,
1354
1383
  setMonthsValue,
@@ -1364,19 +1393,19 @@
1364
1393
  const calculatorOtherParams = { minSum: minSumOther, maxSum: maxSumOther };
1365
1394
  const incomeBonus = 948841;
1366
1395
  const bonusOrDef = bonus || 2528;
1367
- return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput$1({
1396
+ return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput({
1368
1397
  title: 'Сумма покупок в категории путешествия, ₽',
1369
1398
  calculatorParams: calculatorTripParams,
1370
1399
  moneyValue: bonusTripValue,
1371
- defaultSum: getDefaultSum$1(calculatorTripParams),
1400
+ defaultSum: getDefaultSum(calculatorTripParams),
1372
1401
  setMoneyValue: setBonusTripValue,
1373
1402
  isShowItems: false,
1374
- }), renderWantedSumInput$1({
1403
+ }), renderWantedSumInput({
1375
1404
  className: 'mt-6',
1376
1405
  title: 'Сумма покупок в остальных категориях, ₽',
1377
1406
  calculatorParams: calculatorOtherParams,
1378
1407
  moneyValue: bonusOtherValue,
1379
- defaultSum: getDefaultSum$1(calculatorOtherParams),
1408
+ defaultSum: getDefaultSum(calculatorOtherParams),
1380
1409
  setMoneyValue: setBonusOtherValue,
1381
1410
  isShowItems: false,
1382
1411
  })] }), jsx("div", { children: bonusOrDef
@@ -1389,7 +1418,7 @@
1389
1418
  });
1390
1419
 
1391
1420
  const EmbeddableCalcBlocks = {
1392
- CreditCalculatorForm: CreditCalculatorForm$1,
1421
+ CreditCalculatorForm,
1393
1422
  MortgageCalculatorForm,
1394
1423
  DepositCalculatorForm,
1395
1424
  BonusCalculatorForm,
@@ -1404,7 +1433,6 @@
1404
1433
  return (jsx("section", { className: `box-border relative flex shrink-0 basis-full ${className}`, role: "listitem", children: jsx("div", { className: "box-border p-9 w-full", children: jsx(EmbeddedBlock, { context: context, ...blockCalcTabs, className: "flex justify-between" }) }) }, String(i)));
1405
1434
  };
1406
1435
 
1407
- const arrowBtnStyle = 'absolute w-[56px] h-[56px] min-h-[56px] max-h-[56px] top-1 z-10 mt-[25px] bg-white rounded-full';
1408
1436
  const Calculator = JSX(({ className = '', context, calcTabs = [], anchor = null }) => {
1409
1437
  const tabsNav = calcTabs.map((_) => _.nav || {});
1410
1438
  const blockCalcTabs = calcTabs.map(({ calculatorBlock }) => calculatorBlock || {});
@@ -1417,11 +1445,16 @@
1417
1445
  const showPrevButton = tabsShift > 0;
1418
1446
  return (jsxs("section", { id: anchor, className: `box-border overflow-hidden relative font-sans w-100 bg-white text-primary-text ${className}`, children: [jsxs("div", { children: [tabsNav.length > 1
1419
1447
  ? renderTabs({ tabsShift, tabsNav, activeSlideIndex, setActiveSlideIndex })
1420
- : null, showPrevButton ? (jsx(ArrowButton, { className: `${arrowBtnStyle} left-3 top-3`, onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })) : null, showNextButton ? (jsx(ArrowButton, { className: `${arrowBtnStyle} right-3 top-3 rotate-180`, onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" })) : null] }), jsx("div", { className: "flex", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: blockCalcTabs?.length
1448
+ : null, renderArrows({
1449
+ handler: [handlePrevClick, handleNextClick],
1450
+ isShown: [showPrevButton, showNextButton],
1451
+ btnClass: ['left-3', 'right-3'],
1452
+ className: 'top-8',
1453
+ })] }), jsx("div", { className: "flex", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: blockCalcTabs?.length
1421
1454
  ? blockCalcTabs.map(renderCalculatorBlock({ context, className }))
1422
1455
  : null })] }));
1423
1456
  });
1424
- function renderNavButton$1({ tab, i, activeSlideIndex, onClick }) {
1457
+ function renderNavButton$2({ tab, i, activeSlideIndex, onClick }) {
1425
1458
  const isActiveBtn = i === activeSlideIndex;
1426
1459
  const btnClassName = isActiveBtn
1427
1460
  ? 'h-[88px] w-[387px] min-w-[387px] p-5 border-none bg-primary-main text-white'
@@ -1433,7 +1466,7 @@
1433
1466
  ${btnClassName}`, children: [jsx(Img, { className: `h-[24px] w-[24px] min-w-[24px] min-h-[24px] mr-4 ${iconClassName}`, image: { ...tab?.icon, iconVersion: isActiveBtn ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "border-0", children: [jsx("div", { className: `font-medium ${btnTitleClassName}`, children: tab?.title }), jsx("div", { className: `text-secondary-text ${btnDescClassName}`, children: tab.description })] })] }, String(i)));
1434
1467
  }
1435
1468
  function renderTabs({ tabsShift, tabsNav, activeSlideIndex, setActiveSlideIndex }) {
1436
- return (jsxs("div", { children: [jsx("div", { style: { transform: `translateX(-${tabsShift * 388}px)` }, className: "flex flex-col justify-end items-center h-[126px] pt-[38px] box-border duration-1000", children: jsx("div", { className: "w-full flex flex-nowrap items-end gap-2", children: tabsNav.map((tab, i) => renderNavButton$1({
1469
+ return (jsxs("div", { children: [jsx("div", { style: { transform: `translateX(-${tabsShift * 388}px)` }, className: "flex flex-col justify-end items-center h-[126px] pt-[38px] box-border duration-1000", children: jsx("div", { className: "w-full flex flex-nowrap items-end gap-2", children: tabsNav.map((tab, i) => renderNavButton$2({
1437
1470
  tab,
1438
1471
  i,
1439
1472
  activeSlideIndex,
@@ -1441,16 +1474,69 @@
1441
1474
  })) }) }), jsx("div", { className: "w-full h-2 bg-primary-main" })] }));
1442
1475
  }
1443
1476
 
1444
- const TAB_STYLE = 'px-2 h-14 pb-2 pt-3 border border-b-0 border-main-stroke';
1445
- const ACTIVE_TAB_STYLE = 'px-2 h-16 pt-4 pb-2 text-white bg-primary-main';
1446
- const Tabs = JSX(({ tabs, currentTabIndex, onTabClick }) => {
1447
- return (jsx("div", { className: "flex items-end border-b border-main-stroke", role: "tablist", children: tabs?.map(renderTab$2(currentTabIndex, onTabClick)) }));
1448
- });
1449
- const renderTab$2 = (currentTabIndex, onTabClick) => (tab, index) => {
1450
- const isActive = currentTabIndex === index;
1451
- return (jsxs("div", { className: `flex h-full flex-1 cursor-pointer mr-2 last:mr-0 box-content ${isActive ? ACTIVE_TAB_STYLE : TAB_STYLE}`, role: "tab", onClick: () => onTabClick(index), "aria-selected": String(isActive), children: [tab?.icon ? renderIcon(tab, isActive) : null, jsxs("div", { children: [tab?.title ? jsx("h3", { className: "font-medium m-0 text-base", children: tab?.title }) : null, tab?.description ? (jsx("span", { className: `font-light text-xs ${isActive ? '' : 'text-secondary-text'}`, children: tab?.description })) : null] })] }, String(index)));
1477
+ function useExchangeRates(useAsyncData) {
1478
+ const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchExchangeRates);
1479
+ const result = data?.hits?.hits?.map((_) => _._source) || [];
1480
+ return result.length ? getCurrencyListByRate(result) : result;
1481
+ }
1482
+ async function fetchExchangeRates() {
1483
+ try {
1484
+ const response = await fetch(EXCHANGE_RATES_URL, {
1485
+ method: 'POST',
1486
+ headers: {
1487
+ 'Content-Type': 'application/json',
1488
+ },
1489
+ body: JSON.stringify(EXCHANGE_RATES_BODY),
1490
+ });
1491
+ return await response.json();
1492
+ }
1493
+ catch (err) {
1494
+ console.error(err);
1495
+ }
1496
+ }
1497
+ const EXCHANGE_RATES_URL = 'https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000';
1498
+ const EXCHANGE_RATES_BODY = {
1499
+ query: {
1500
+ bool: {
1501
+ must: [
1502
+ {
1503
+ term: {
1504
+ // eslint-disable-next-line camelcase
1505
+ russian_region_code: '77',
1506
+ },
1507
+ },
1508
+ {
1509
+ term: {
1510
+ // eslint-disable-next-line camelcase
1511
+ from_volume: '0',
1512
+ },
1513
+ },
1514
+ {
1515
+ terms: {
1516
+ // eslint-disable-next-line camelcase
1517
+ currency_pair: ['USD/RUB', 'EUR/RUB'],
1518
+ },
1519
+ },
1520
+ ],
1521
+ },
1522
+ },
1452
1523
  };
1453
- const renderIcon = (tab, isActive) => (jsx("div", { className: "h-full mt-1", children: jsx(Img, { className: `w-5 h-5 mr-3 ${isActive ? 'invert' : ''}`, image: tab?.icon || 'CardIcon', asSVG: !isActive }) }));
1524
+ const getCurrencyListByRate = (currencyRates) => currencyRates.reduce((result, _) => {
1525
+ const currencyInfo = _['currency_first'];
1526
+ if (!validateRate(_['rate_buy']) && !validateRate(_['rate_sell'])) {
1527
+ return result;
1528
+ }
1529
+ const currencyCode = currencyInfo.code;
1530
+ if (!result.some((i) => i.code === currencyCode)) {
1531
+ result.push({
1532
+ code: currencyCode,
1533
+ buy: Number(_.rate_buy),
1534
+ sell: Number(_.rate_sell),
1535
+ });
1536
+ }
1537
+ return result;
1538
+ }, []);
1539
+ const validateRate = (value) => Math.round(value) > 0;
1454
1540
 
1455
1541
  function getTileHeadingType(className = '') {
1456
1542
  const colSpan = getColSpan(className);
@@ -1465,181 +1551,17 @@
1465
1551
  }
1466
1552
  }
1467
1553
 
1468
- const DEFAULT_MIN_SUM = 30000;
1469
- const DEFAULT_MAX_SUM = 3000000;
1470
- const DEFAULT_SUM = (DEFAULT_MAX_SUM - DEFAULT_MIN_SUM) / 2;
1471
- const DEFAULT_MIN_MONTHS = 1;
1472
- const DEFAULT_MAX_MONTHS = 84;
1473
- const DEFAULT_MONTHS = Math.round((DEFAULT_MAX_MONTHS - DEFAULT_MIN_MONTHS) / 2);
1474
- const MONTHS_IN_YEAR = 12;
1475
-
1476
- const getCalculatorParams = (params) => {
1477
- const { tableRows, isAnnuity = false } = params;
1478
- if (!tableRows)
1479
- return {};
1480
- const calculatorParams = tableRows.find((row) => row.isAnnuity === isAnnuity);
1481
- return calculatorParams || {};
1482
- };
1483
-
1484
- const DEFAULT_RATE = 5;
1485
- const getCreditRate = (params) => {
1486
- const { calculatorParams, isInsurance } = params;
1487
- if (!calculatorParams)
1488
- return DEFAULT_RATE;
1489
- return isInsurance
1490
- ? calculatorParams?.rateWithInsurance || DEFAULT_RATE
1491
- : calculatorParams?.rateWithoutInsurance || DEFAULT_RATE;
1492
- };
1493
-
1494
- const MAX_YEARS_LENGTH = 5;
1495
- const getCreditTermYears = (minMonths, maxMonths) => {
1496
- const totalYears = Math.ceil((maxMonths - minMonths) / 12);
1497
- const firstYear = Math.floor(minMonths / MONTHS_IN_YEAR) + 1;
1498
- const result = new Array(Math.min(totalYears - 1, MAX_YEARS_LENGTH))
1499
- .fill(0)
1500
- .map((_, i) => firstYear + i);
1501
- const maxYear = totalYears + firstYear - 1;
1502
- return result.concat(maxYear);
1503
- };
1504
-
1505
- const getDefaultMonths = (calculatorParams) => calculatorParams.maxMonths && calculatorParams.minMonths
1506
- ? Math.round((calculatorParams.maxMonths - calculatorParams.minMonths) / 2)
1507
- : DEFAULT_MONTHS;
1508
-
1509
- const getDefaultSum = (calculatorParams) => calculatorParams.maxSum && calculatorParams.minSum
1510
- ? (calculatorParams.maxSum - calculatorParams.minSum) / 2
1511
- : DEFAULT_SUM;
1512
-
1513
- const getMonthlyPayment = (params) => {
1514
- const { calculatorParams, paymentType, rate, sum, months } = params;
1515
- if (!calculatorParams)
1516
- return 0;
1517
- const finalSum = clamp(sum, calculatorParams.minSum || DEFAULT_MIN_SUM, calculatorParams.maxSum || DEFAULT_MAX_SUM);
1518
- if (paymentType === 'annuity') {
1519
- const annuityCoef = Number(rate) / (MONTHS_IN_YEAR * 100);
1520
- return finalSum * (annuityCoef + annuityCoef / (Math.pow(1 + annuityCoef, months) - 1));
1521
- }
1522
- else {
1523
- return finalSum / months + finalSum * (Number(rate) / 12);
1524
- }
1525
- };
1526
-
1527
- const tableFunc = (table) => (input) => {
1528
- const [, output] = table.find(([predicate]) => predicate(input)) || [];
1529
- return output;
1530
- };
1531
-
1532
- const func = tableFunc([
1533
- [(_) => _ === 1, 'год'],
1534
- [(_) => _ <= 4, 'года'],
1535
- [() => true, 'лет'],
1536
- ]);
1537
- function renderButton(number, i, handleClick) {
1538
- const string = func(number);
1539
- return (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: jsxs("span", { className: "font-semibold text-sm", children: [number, " ", string] }) }, String(i)));
1540
- }
1541
-
1542
- const STEP_MONTHS = 1;
1543
- function renderMonthsInput(props) {
1544
- const { minMonths, maxMonths, monthsValue, defaultMonths, setMonthsValue } = props;
1545
- return (jsx(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 }));
1546
- }
1547
-
1548
- function renderProposal(monthlyPayment, rate) {
1549
- return (jsxs("div", { className: "box-border h-fit p-9 bg-primary-main rounded-md text-white", children: [jsx("div", { className: "text-base mb-[18px]", children: "\u041D\u0430\u0448\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }), 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" }), jsxs("div", { className: "text-lg mb-3", children: [addSpacesBetweenNumbers(Math.round(monthlyPayment)), " \u20BD"] }), jsx("div", { className: "text-sm opacity-60", children: "\u0421\u0442\u0430\u0432\u043A\u0430" }), jsxs("div", { className: "text-lg", children: [rate, " %"] })] }));
1550
- }
1551
-
1552
- function renderTermsButton() {
1553
- return (jsxs("div", { className: "flex items-center", children: [jsx(Button, { className: "mr-3", text: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443", version: "primary", href: "#" }), 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" })] }));
1554
- }
1555
-
1556
- const STEP_MONEY = 1000;
1557
- function renderWantedSumInput(props) {
1558
- const { calculatorParams, moneyValue, defaultSum, setMoneyValue } = props;
1559
- const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
1560
- const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
1561
- return (jsx(InputRange, { title: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0441\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u20BD", items: [
1562
- `От ${addSpacesBetweenNumbers(minSum)} рублей`,
1563
- `До ${addSpacesBetweenNumbers(maxSum)} рублей`,
1564
- ], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }));
1565
- }
1554
+ var Currency;
1555
+ (function (Currency) {
1556
+ Currency["RUB"] = "RUB";
1557
+ Currency["EUR"] = "EUR";
1558
+ Currency["USD"] = "USD";
1559
+ })(Currency || (Currency = {}));
1566
1560
 
1567
- const DEFAULT_PAYMENT_TYPE = 'annuity';
1568
- const BORDER_STYLE = 'border-solid border-[3px] border-primary-main rounded-md';
1569
- const CreditCalculatorForm = JSX(({ context, directoryName }) => {
1570
- const [moneyValue, setMoneyValue] = context.useState(undefined);
1571
- const [monthsValue, setMonthsValue] = context.useState(undefined);
1572
- const [isAnnuityChecked, setIsAnnuityChecked] = context.useState(true);
1573
- const [isInsuranceChecked, setIsInsuranceChecked] = context.useState(true);
1574
- const tableRows = useCreditCalculatorData(context.useAsyncData, directoryName).rows;
1575
- const calculatorParams = getCalculatorParams({ tableRows, isAnnuity: isAnnuityChecked });
1576
- const defaultSum = getDefaultSum(calculatorParams);
1577
- const defaultMonths = getDefaultMonths(calculatorParams);
1578
- const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS;
1579
- const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS;
1580
- const rate = getCreditRate({ calculatorParams, isInsurance: isInsuranceChecked });
1581
- const monthlyPayment = getMonthlyPayment({
1582
- calculatorParams,
1583
- paymentType: DEFAULT_PAYMENT_TYPE,
1584
- rate,
1585
- sum: moneyValue || defaultSum,
1586
- months: monthsValue || defaultMonths,
1587
- });
1588
- const creditTermYears = getCreditTermYears(minMonths, maxMonths);
1589
- function handleButtonClick(value) {
1590
- setMonthsValue(clamp(value * MONTHS_IN_YEAR, minMonths, maxMonths));
1591
- }
1592
- return (jsx("section", { className: "mt-7", children: jsxs("div", { className: `box-border p-[49px] pr-[56px] mx-auto w-max ${BORDER_STYLE}`, children: [jsxs("div", { className: "flex justify-between", children: [jsxs("div", { className: "mr-[42px]", children: [renderWantedSumInput({ calculatorParams, moneyValue, defaultSum, setMoneyValue }), renderMonthsInput({
1593
- minMonths,
1594
- maxMonths,
1595
- monthsValue,
1596
- defaultMonths,
1597
- setMonthsValue,
1598
- }), jsx("div", { className: "flex mb-7", children: creditTermYears.map((number, i) => renderButton(number, i, handleButtonClick)) }), jsx(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 }), jsx(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 })] }), renderProposal(monthlyPayment, rate)] }), renderTermsButton()] }) }));
1561
+ const currencyNumberFormat = new Intl.NumberFormat('ru', {
1562
+ style: 'currency',
1563
+ currency: Currency.RUB,
1599
1564
  });
1600
-
1601
- const DEFAULT_TABS = [
1602
- {
1603
- title: 'Кредит',
1604
- description: 'Ставка от 6% до 7 лет',
1605
- directoryName: 'credit-calculator-data',
1606
- icon: { icon: 'CardIcon' },
1607
- },
1608
- {
1609
- title: 'Кредит',
1610
- description: 'Ставка от 4% до 7 лет',
1611
- directoryName: 'credit-calculator-data1',
1612
- icon: { icon: 'ChartSquareIcon' },
1613
- },
1614
- {
1615
- title: 'Кредит',
1616
- description: 'Ставка от 3% до 6 лет',
1617
- directoryName: 'credit-calculator-data2',
1618
- icon: { icon: 'DiscountShapeIcon' },
1619
- },
1620
- ];
1621
-
1622
- const CreditCalculator = JSX(({ className = '', context, tabs = DEFAULT_TABS, anchor = null }) => {
1623
- const [currentTabIndex, setCurrentTabIndex] = context.useState(0);
1624
- return (jsxs("section", { className: `font-sans text-primary-text py-10 bg-white ${className}`, id: anchor, children: [jsx(Heading, { className: "w-full text-center mb-8", headingType: getTileHeadingType(className), title: "\u041A\u0430\u043B\u044C\u043A\u0443\u043B\u044F\u0442\u043E\u0440" }), jsx(Tabs, { tabs: tabs, currentTabIndex: currentTabIndex, onTabClick: setCurrentTabIndex }), jsx(CreditCalculatorForm, { context: context, directoryName: tabs[currentTabIndex]?.directoryName })] }));
1625
- });
1626
-
1627
- function useExchangeRates(useAsyncData) {
1628
- const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchExchangeRates);
1629
- return data || {};
1630
- }
1631
- async function fetchExchangeRates() {
1632
- try {
1633
- const response = await fetch(EXCHANGE_RATES_URL);
1634
- return await response.json();
1635
- }
1636
- catch (err) {
1637
- console.error(err);
1638
- }
1639
- }
1640
- const EXCHANGE_RATES_URL = '/api/v1/exchangerates.json';
1641
-
1642
- const currencyNumberFormat = new Intl.NumberFormat('ru', { style: 'currency', currency: 'RUB' });
1643
1565
  const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
1644
1566
 
1645
1567
  const TABLE_HEAD_STYLE = 'font-light text-left font-normal text-sm text-secondary-text';
@@ -1651,55 +1573,141 @@
1651
1573
  return (jsxs("table", { className: `h-fit w-fit ${className}`, children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: "\u0412\u0430\u043B\u044E\u0442\u0430" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041A\u0443\u043F\u0438\u0442\u044C" }), jsx("th", { className: `${TABLE_HEAD_STYLE} pl-11`, children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map((item) => renderCurrencyRow(item)) })] }));
1652
1574
  });
1653
1575
  const renderCurrencyRow = (exchangeCurrencyItem) => {
1654
- const code = exchangeCurrencyItem?.currency?.currency;
1655
- return (jsxs("tr", { className: "pb-1", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [code ? jsx(Img, { image: { icon: CURRENCY_ICONS_MAP[code] }, width: "24", height: "24" }) : null, jsx("span", { className: "text-m-title-md ml-2", children: code })] }) }), jsx("td", { className: "pt-4 pl-11 m-title-md font-light", children: formatCurrency(exchangeCurrencyItem.buyExchangeRate) }), jsx("td", { className: "pt-4 pl-11 m-title-md font-light", children: formatCurrency(exchangeCurrencyItem.saleExchangeRate) })] }, code));
1576
+ const code = exchangeCurrencyItem?.code;
1577
+ return (jsxs("tr", { className: "pb-1", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [code ? jsx(Img, { image: { icon: CURRENCY_ICONS_MAP[code] }, width: "24", height: "24" }) : null, jsx("span", { className: "text-m-title-md ml-2", children: code })] }) }), jsx("td", { className: "pt-4 pl-11 m-title-md font-light", children: formatCurrency(exchangeCurrencyItem.buy) }), jsx("td", { className: "pt-4 pl-11 m-title-md font-light", children: formatCurrency(exchangeCurrencyItem.sell) })] }, code));
1656
1578
  };
1657
1579
 
1658
1580
  const CurrentLocation = JSX(({ className = '', address, distance }) => (jsxs("div", { className: `flex text-sm ${className}`, children: [jsx(Img, { image: { icon: 'GpsIcon' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "ml-3 font-light", children: [address ? jsx("p", { className: "m-0 mb-[3px]", children: address }) : null, distance ? (jsxs("p", { className: "text-secondary-text m-0", children: ["\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043E \u043E\u0444\u0438\u0441\u0430 - ", distance] })) : null] })] })));
1659
1581
 
1660
- const Input = JSX(({ className = '', id, name, type = 'text', placeholder }) => {
1661
- return (jsx("input", { className: className, id: id, name: name || id, type: type, placeholder: placeholder }));
1582
+ const roundTo = (value, precision = 2) => {
1583
+ const factor = Math.pow(10, precision);
1584
+ return Math.round(parseFloat(String(value)) * factor) / factor;
1585
+ };
1586
+
1587
+ const calculateResult = (value, rate, precision) => {
1588
+ const result = Number(formatValue(value)) * Math.pow(rate, precision ? -1 : 1);
1589
+ return Number.isInteger(result) ? result : roundTo(result);
1590
+ };
1591
+ const formatValue = (value) => value.replace(/[^\d.,]/g, '').replace(',', '.');
1592
+
1593
+ const tableFunc = (table) => (input) => {
1594
+ const [, output] = table.find(([predicate]) => predicate(input)) || [];
1595
+ return output;
1596
+ };
1597
+
1598
+ const callbackCurrencySelect = (props) => tableFunc([
1599
+ [
1600
+ (_) => _.value !== Currency.RUB && _.oppositeValue !== Currency.RUB,
1601
+ () => props.handleConvert(props.value, Currency.RUB),
1602
+ ],
1603
+ [
1604
+ (_) => _.value === Currency.RUB && _.oppositeValue === Currency.RUB,
1605
+ () => props.handleConvert(props.value, Currency.USD),
1606
+ ],
1607
+ [() => true, () => props.handleConvert(props.value)],
1608
+ ])(props)?.();
1609
+
1610
+ function renderButton() {
1611
+ return (jsx(Button, { className: "box-border mt-3.5 py-3 h-12 w-full", version: "primary", href: "https://coins.rshb.ru/exchange", target: "_blank", children: "\u041A\u0443\u043F\u0438\u0442\u044C \u0432\u0430\u043B\u044E\u0442\u0443" }));
1612
+ }
1613
+
1614
+ const Input = JSX(({ className = '', id, name, type = 'text', placeholder, pattern, value, onChange }) => {
1615
+ const handleChange = (e) => {
1616
+ const validInputValue = e.target.validity.valid ? e.target.value : value;
1617
+ onChange(validInputValue);
1618
+ };
1619
+ return (jsx("input", { className: className, id: id, name: name || id, type: type, pattern: pattern, placeholder: placeholder, value: value, onChange: (e) => handleChange(e) }));
1662
1620
  });
1663
1621
 
1664
- const Select = JSX(({ className = '', id, name, children }) => {
1665
- return (jsx("select", { className: className, id: id, name: name || id, children: children }));
1622
+ const Select = JSX(({ className = '', id, name, children, value, onChange }) => {
1623
+ return (jsx("select", { className: className, id: id, name: name || id, value: value, onChange: (e) => onChange(e.target.value), children: children }));
1666
1624
  });
1667
1625
 
1668
1626
  const SelectOption = JSX(({ className = '', value, selected, children }) => {
1669
1627
  return (jsx("option", { className: className, value: `${value}`, selected: selected, children: children }));
1670
1628
  });
1671
1629
 
1672
- const ExchangeCurrencyCalculator = JSX(({ codes, className = '' }) => {
1673
- return (jsxs("div", { className: `grid gap-3.5 ${className}`, children: [renderInput('Хочу продать', codes), renderInput('Получу', codes, 'USD'), jsx(Button, { className: "box-border mt-3.5 py-3 h-12 w-full", version: "primary", href: "#", children: "\u041A\u0443\u043F\u0438\u0442\u044C \u0432\u0430\u043B\u044E\u0442\u0443" })] }));
1674
- });
1675
- function renderInput(placeholder, codes, selected) {
1676
- return (jsxs("div", { className: "relative flex items-center", children: [jsx(Input, { className: "h-10 border pl-4 pt-[7px] pb-[7px] rounded-md text-m-sm w-full appearance-none -mr-12", type: "number", placeholder: `${placeholder}` }), codes.length ? (jsx(Select, { className: "h-9 -translate-x-4", children: codes.map((code, i) => (jsx(SelectOption, { value: code, selected: code === selected, children: code }, String(i)))) })) : null] }));
1630
+ function renderInput(props) {
1631
+ const { placeholder, rates, selected, value, setValue, setSelected } = props;
1632
+ return (jsxs("div", { className: "relative flex items-center", children: [jsx(Input, { className: "h-10 border pl-4 pt-[7px] pb-[7px] rounded-md text-m-sm w-full appearance-none -mr-12", placeholder: placeholder, type: "text", value: value, onChange: setValue }), rates.length ? (jsx(Select, { className: "h-9 -translate-x-4", value: selected, onChange: (_) => setSelected(_), children: rates.map((_, i) => (jsx(SelectOption, { value: _.code, children: _.code }, String(i)))) })) : null] }));
1677
1633
  }
1678
1634
 
1679
- const CURRENCY_CODES = ['USD', 'EUR'];
1680
- const EXCHANGE_CODES = ['RUB', 'USD', 'EUR'];
1681
- const DEFAULT_CURRENCY_ITEMS = [
1682
- {
1683
- buyExchangeRate: 90.6,
1684
- saleExchangeRate: 92.8,
1685
- currency: { id: 2, code: '978', currency: 'EUR', name: 'Евро' },
1686
- },
1687
- {
1688
- buyExchangeRate: 73.75,
1689
- saleExchangeRate: 75.95,
1690
- currency: { id: 1, code: '840', currency: 'USD', name: 'Американский доллар' },
1691
- },
1692
- ];
1635
+ const ExchangeCurrencyCalculator = JSX(({ context, className = '', currencyRatesBuy, currencyRatesSell }) => {
1636
+ const [calcState, setCalcState] = context.useState({
1637
+ inputSell: '',
1638
+ inputBuy: '',
1639
+ selectSell: currencyRatesBuy?.[0]?.code || Currency.RUB,
1640
+ selectBuy: currencyRatesSell?.[0]?.code || Currency.USD,
1641
+ });
1642
+ const handleSetCalcState = (newState) => {
1643
+ setCalcState((oldState) => ({ ...oldState, ...newState }));
1644
+ };
1645
+ return (jsxs("div", { className: `grid gap-3.5 ${className}`, children: [renderInput({
1646
+ placeholder: 'Хочу продать',
1647
+ rates: currencyRatesBuy,
1648
+ selected: calcState.selectSell,
1649
+ setSelected: handleSelectSell(calcState, handleSetCalcState, currencyRatesSell),
1650
+ value: calcState.inputSell,
1651
+ setValue: (value) => handleInputSell(handleSetCalcState, currencyRatesSell)(value, calcState.selectSell, calcState.selectBuy),
1652
+ }), renderInput({
1653
+ placeholder: 'Получу',
1654
+ rates: currencyRatesSell,
1655
+ selected: calcState.selectBuy,
1656
+ setSelected: handleSelectBuy(calcState, handleSetCalcState, currencyRatesBuy),
1657
+ value: calcState.inputBuy,
1658
+ setValue: (value) => handleInputBuy(handleSetCalcState, currencyRatesBuy)(value, calcState.selectBuy, calcState.selectSell),
1659
+ }), renderButton()] }));
1660
+ });
1661
+ const handleSelectSell = (calcState, setCalcState, currencyRatesSell) => (value) => {
1662
+ setCalcState({ selectSell: value });
1663
+ callbackCurrencySelect({
1664
+ value,
1665
+ oppositeValue: calcState.selectBuy,
1666
+ handleConvert: (codeFrom = calcState.selectSell, codeTo = calcState.selectBuy) => {
1667
+ handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell, codeFrom, codeTo);
1668
+ },
1669
+ });
1670
+ };
1671
+ const handleSelectBuy = (calcState, setCalcState, currencyRatesBuy) => (value) => {
1672
+ setCalcState({ selectBuy: value });
1673
+ callbackCurrencySelect({
1674
+ value,
1675
+ oppositeValue: calcState.selectSell,
1676
+ handleConvert: (codeTo = calcState.selectBuy, codeFrom = calcState.selectSell) => handleInputBuy(setCalcState, currencyRatesBuy)(calcState.inputBuy, codeTo, codeFrom),
1677
+ });
1678
+ };
1679
+ const handleInputSell = (setCalcState, currencyRatesSell) => (value, codeFrom, codeTo) => {
1680
+ setCalcState({ inputSell: formatValue(value), selectBuy: codeTo });
1681
+ const rate = currencyRatesSell.find((_) => _.code === codeTo)?.buy ||
1682
+ currencyRatesSell.find((_) => _.code === codeFrom)?.sell;
1683
+ if (rate) {
1684
+ setCalcState({
1685
+ inputBuy: String(calculateResult(value, rate, codeFrom === Currency.RUB) || ''),
1686
+ });
1687
+ }
1688
+ };
1689
+ const handleInputBuy = (setCalcState, currencyRatesBuy) => (value, codeTo, codeFrom) => {
1690
+ setCalcState({ inputBuy: formatValue(value), selectSell: codeFrom });
1691
+ const rate = currencyRatesBuy.find((_) => _.code === codeFrom)?.sell ||
1692
+ currencyRatesBuy.find((_) => _.code === codeTo)?.buy;
1693
+ if (rate) {
1694
+ setCalcState({
1695
+ inputSell: String(calculateResult(value, rate, codeTo === Currency.RUB) || ''),
1696
+ });
1697
+ }
1698
+ };
1699
+
1693
1700
  const DEFAULT_LOCATION = {
1694
1701
  address: 'Москва, ул.Ленина д.28',
1695
1702
  distance: '6км',
1696
1703
  };
1697
1704
  const ExchangeRateTile = JSX(({ className = '', context, title = 'Курсы обмена валют', anchor = null }) => {
1698
- const data = useExchangeRates(context.useAsyncData);
1699
- const exchangeCurrencyItems = data?.exchangeRate?.currencies?.filter((item) => {
1700
- return CURRENCY_CODES.indexOf(item?.currency?.currency || '') !== -1;
1701
- }) || DEFAULT_CURRENCY_ITEMS;
1702
- return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className}`, id: anchor, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-[43px] pt-4", children: [exchangeCurrencyItems ? (jsx(CurrencyTable, { className: "mb-[31px]", exchangeCurrencyItems: exchangeCurrencyItems })) : null, jsx(CurrentLocation, { ...DEFAULT_LOCATION })] }), exchangeCurrencyItems?.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", exchangeCurrencyItems: exchangeCurrencyItems, codes: EXCHANGE_CODES })) : null] }) }) }));
1705
+ const currencyRates = useExchangeRates(context.useAsyncData);
1706
+ const currencyRatesBuy = currencyRates.filter((_) => _.buy);
1707
+ currencyRatesBuy.unshift({ code: Currency.RUB });
1708
+ const currencyRatesSell = currencyRates.filter((_) => _.sell);
1709
+ currencyRatesSell.push({ code: Currency.RUB });
1710
+ return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className}`, id: anchor, children: jsx(BaseTile, { context: context, title: jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-[43px] pt-4", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-[31px]", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { ...DEFAULT_LOCATION })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", context: context, currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell })) : null] }) }) }));
1703
1711
  });
1704
1712
 
1705
1713
  const LOGO_PATHS = [
@@ -1802,47 +1810,38 @@
1802
1810
  origins: ['t.me', 'telegram.org'],
1803
1811
  icon: { icon: 'TelegramIcon' },
1804
1812
  label: 'Телеграм',
1805
- width: '20px',
1806
- height: '16px',
1807
1813
  },
1808
1814
  {
1809
1815
  origins: ['vk.com'],
1810
1816
  icon: { icon: 'VKIcon' },
1811
1817
  label: 'ВКонтакте',
1812
- width: '24px',
1813
- height: '12px',
1814
1818
  },
1815
1819
  {
1816
1820
  origins: ['ok.ru'],
1817
1821
  icon: { icon: 'OkIcon' },
1818
1822
  label: 'Одноклассники',
1819
- width: '12px',
1820
- height: '20px',
1821
1823
  },
1822
1824
  {
1823
1825
  origins: ['apps.apple.com'],
1824
1826
  icon: { icon: 'AppleIcon' },
1825
1827
  label: 'App Store',
1826
- width: '20px',
1827
- height: '22px',
1828
1828
  },
1829
1829
  {
1830
1830
  origins: ['play.google.com'],
1831
1831
  icon: { icon: 'PlayMarketIcon' },
1832
1832
  label: 'Google Play',
1833
- width: '21px',
1834
- height: '21px',
1835
1833
  },
1836
1834
  ];
1837
1835
  const MediaButton = JSX(({ href, version = 'primary' }) => {
1838
- const { icon, width, height, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
1839
- if (!icon)
1836
+ const { icon, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
1837
+ if (!icon) {
1840
1838
  return null;
1839
+ }
1841
1840
  const classes = version === 'secondary'
1842
1841
  ? 'bg-secondary-light hover:bg-secondary-hover'
1843
1842
  : 'border-main-divider border-solid border-[1px] hover:bg-primary-main';
1844
1843
  const isPrimary = version === 'primary';
1845
- return (jsx("a", { className: `flex items-center justify-center rounded-md w-14 h-14 group box-border ${classes} ${isPrimary ? 'hover:text-black' : ''}`, href: href, "aria-label": label, target: "_blank", rel: "noopener noreferrer", children: icon ? (jsx(Img, { image: { ...icon, iconVersion: 'normal' }, imageClassName: isPrimary ? 'group-hover:text-white' : '', width: width, height: height, asSVG: true })) : null }));
1844
+ return (jsx("a", { className: `flex items-center justify-center rounded-md w-14 h-14 group box-border ${classes} ${isPrimary ? 'hover:text-black' : ''}`, href: href, "aria-label": label, target: "_blank", rel: "noopener noreferrer", children: icon ? (jsx(Img, { image: icon, imageClassName: isPrimary ? 'group-hover:text-white' : '', width: "24", height: "24", asSVG: true })) : null }));
1846
1845
  });
1847
1846
 
1848
1847
  const SocialMedia = JSX(({ className = '', media, version, context, children }) => {
@@ -1854,13 +1853,13 @@
1854
1853
  const TextInformation = JSX(({ className, links, context }) => {
1855
1854
  const router = context.useRouter();
1856
1855
  const { handlerDecorator } = context;
1857
- return (jsxs("div", { className: `${className || ''}`, children: [jsx("div", { className: "pt-5 pb-[5px]", children: jsx("span", { className: "font-sans font-light text-xs text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: "flex justify-start items-start gap-5 pt-[5px]", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null] }));
1856
+ return (jsxs("div", { className: `${className || ''}`, children: [jsx("div", { className: "pt-5", children: jsx("span", { className: "font-sans font-light text-xs text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: "flex justify-start items-start gap-5 pt-2.5", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null] }));
1858
1857
  });
1859
1858
  const TextInformationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-light text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${className || ''}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
1860
1859
 
1861
1860
  const LEFT_COL_WIDTH_FULL_HD = 'w-[204px]';
1862
1861
  const Footer = JSX(({ className, documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems, context, anchor = null, }) => {
1863
- return (jsxs("footer", { className: `px-9 pt-9 pb-10 bg-white ${className || ''}`, id: anchor, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD }), jsx(SearchBar, { context: context, className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, context: context, hasButton: true }), jsx(SocialMedia, { media: socialMedia, context: context, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, context: context, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]", context: context, items: topItems })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
1862
+ return (jsxs("footer", { className: `p-9 bg-white ${className || ''}`, id: anchor, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD }), jsx(SearchBar, { context: context, className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, context: context, hasButton: true }), jsx(SocialMedia, { media: socialMedia, context: context, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, context: context, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]", context: context, items: topItems })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
1864
1863
  });
1865
1864
 
1866
1865
  const GracePeriod = JSX(({ className = '', title, description, calendar, anchor = null }) => {
@@ -1882,7 +1881,7 @@
1882
1881
 
1883
1882
  const checkIsHrefSameOrigin = (href, router) => getOrigin(href) === getOrigin(router.href);
1884
1883
 
1885
- const isHrefActive = (href, router, cmp = (href, baseHref) => baseHref.startsWith(href)) => {
1884
+ const isHrefActive = (href, router, cmp = (targetHref, baseHref) => baseHref.startsWith(targetHref)) => {
1886
1885
  return cmp(withoutQuery(href), withoutMobilePath(withoutQuery(isURL(href) ? router.href : router.pathname)));
1887
1886
  };
1888
1887
 
@@ -1895,21 +1894,19 @@
1895
1894
  const TEXT_CLASSES$2 = 'font-sans font-light text-sm';
1896
1895
  const LINK_CLASSES$1 = 'inline-block border border-solid bg-transparent text-center no-underline';
1897
1896
  const TopItem = JSX(({ className = '', text, href, target, active, flat, onClick, children, ariaLabel, bgColor = 'bg-white', }) => (jsx("a", { className: `${getLinkClasses$1(bgColor, active, flat)} ${className}`, href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": ariaLabel, children: jsx("span", { className: getTextClasses$2(bgColor, active, flat), children: text || children }) })));
1898
- const getLinkClasses$1 = (bgColor, active, flat) => {
1897
+ const getLinkClasses$1 = (bgColor, active = false, flat = false) => {
1899
1898
  let classes = 'border-transparent';
1900
1899
  if (active) {
1901
1900
  classes = `rounded-md ${bgColor === 'bg-white' ? 'border-primary-main' : 'border-white'}`;
1902
1901
  }
1903
1902
  return `${classes} ${LINK_CLASSES$1} ${flat ? '' : 'px-4 py-2'}`;
1904
1903
  };
1905
- const getTextClasses$2 = (bgColor, active, flat) => {
1906
- let classes = 'text-white';
1907
- if (bgColor === 'bg-white') {
1908
- classes = active
1909
- ? 'text-primary-main'
1910
- : `${flat ? 'text-primary-text' : 'text-secondary-text'} hover:text-primary-main`;
1904
+ const getTextClasses$2 = (bgColor, active = false, flat = false) => {
1905
+ if (bgColor !== 'bg-white') {
1906
+ return `text-white ${TEXT_CLASSES$2}`;
1911
1907
  }
1912
- return `${classes} ${TEXT_CLASSES$2}`;
1908
+ const nonActiveAtoms = `${flat ? 'text-primary-text' : 'text-secondary-text'} hover:text-primary-main`;
1909
+ return `${active ? 'text-primary-main' : nonActiveAtoms} ${TEXT_CLASSES$2}`;
1913
1910
  };
1914
1911
 
1915
1912
  const HeaderSecondaryMenuButton = JSX(({ className = '', children, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${className}`, disabled: true, "aria-label": ariaLabel, children: children })));
@@ -1958,75 +1955,41 @@
1958
1955
  return `${bgColor === 'bg-white' ? 'bg-primary-main' : bgColor} ${BORDER_CLASSES}`;
1959
1956
  };
1960
1957
 
1961
- const isSSR = () => !(typeof window !== 'undefined' && window.document && window.document.createElement);
1962
-
1963
- const isClient$1 = !isSSR();
1964
- const headerSubMenuObserver = isClient$1
1965
- ? new IntersectionObserver((entries) => {
1966
- const createArrays = (selectors) => selectors.map((_) => Array.from(window.document.querySelectorAll(_)));
1967
- const headerSubMenuButtonElement = window.document.querySelector('[data-header-submenu-visible=toggled]');
1968
- const [headerSubMenuItems, dotsHeaderSubMenuItems] = createArrays([
1969
- '[data-item-name=header-submenu]',
1970
- '[data-item-name=dots-header-submenu]',
1971
- ]);
1972
- const visibilityList = {};
1973
- entries.forEach((_) => {
1974
- visibilityList[_.target.toString()] = _.isIntersecting;
1975
- });
1976
- const isHeaderSubMenuButtonShow = toggleVisibilityInItems(visibilityList, dotsHeaderSubMenuItems, 'hidden');
1977
- toggleVisibilityInItems(visibilityList, headerSubMenuItems, 'invisible');
1978
- if (headerSubMenuButtonElement) {
1979
- isHeaderSubMenuButtonShow
1980
- ? headerSubMenuButtonElement.classList.remove('hidden')
1981
- : headerSubMenuButtonElement.classList.add('hidden');
1982
- }
1983
- }, { root: window.document, threshold: 1.0 })
1984
- : undefined;
1985
- // TODO: add types
1986
- const toggleVisibilityInItems = (visibilityList, items, className) => {
1987
- const isReversed = className !== 'hidden';
1988
- return items.some((_) => {
1989
- const key = _.toString();
1990
- const option = isReversed ? !visibilityList[key] : visibilityList[key];
1991
- key in visibilityList ? _.classList.toggle(className, option) : null;
1992
- return isReversed ? _.classList.contains('hidden') : !_.classList.contains('hidden');
1993
- });
1994
- };
1995
-
1996
1958
  const DOT_BG_COLORS_MAP = {
1997
1959
  'bg-white': 'bg-primary-text',
1998
1960
  transparent: 'bg-white',
1999
1961
  };
2000
- const HeaderSubMenu = JSX(({ context, subItems, bgColor }) => {
2001
- const [subMenuIsShow, setHiddenMenuIsShow] = context.useState(false);
1962
+ const DropdownMenu = JSX((props) => {
1963
+ const { menuVisible, toggleMenu, menuItems, bgColor, context } = props;
1964
+ const { useRouter, handlerDecorator } = context;
1965
+ const router = useRouter();
1966
+ return (jsxs("div", { className: `absolute w-52 -top-4 right-0 pt-4 z-40 ${menuVisible ? 'bg-white rounded-md shadow-blue-gray/24' : ''}`, children: [jsx("button", { className: "flex justify-between items-center cursor-pointer h-6 ml-6", onClick: toggleMenu, "aria-label": `${menuVisible ? 'Скрыть другие разделы' : 'Показать другие разделы'}`, children: Array(3).fill(bgColor).map(renderDot) }), jsx("div", { className: `flex flex-col rounded-md bg-white p-6 pb-2 ${menuVisible ? '' : 'hidden'}`, "aria-hidden": !menuVisible, children: renderDotsSubMenuItems(menuItems, router, handlerDecorator) })] }));
1967
+ });
1968
+ const renderDotsSubMenuItems = (menuItems, router, handlerDecorator) => menuItems?.map((_) => (jsx("a", { ...useLink({ router, handlerDecorator }, _), className: "text-base font-light pb-4 hover:text-primary-main", children: _.text }, _.href)));
1969
+ const renderDot = (bgColor, i) => (jsx("div", { className: `w-[3px] h-[3px] rounded mr-1 ${DOT_BG_COLORS_MAP[bgColor]}` }, String(i)));
1970
+
1971
+ const HeaderSubMenu = JSX(({ context, subItems = [], bgColor }) => {
1972
+ const [menuVisible, setMenuVisible] = context.useState(false);
2002
1973
  const router = context.useRouter();
2003
- const { handlerDecorator } = context;
2004
- setTimeout(() => {
2005
- if (isSSR()) {
1974
+ const { handlerDecorator, IntersectionObserverTag } = context;
1975
+ const [visibleItemsCount, setVisibleItemsCount] = context.useState(subItems.length);
1976
+ const dropDownMenuItems = subItems.slice(visibleItemsCount);
1977
+ const activeSubItem = findActiveSubItem(router)(subItems);
1978
+ const toggleMenu = () => setMenuVisible(!menuVisible);
1979
+ const observerCallback = (itemIndex) => (entries) => {
1980
+ if (!entries.length) {
2006
1981
  return;
2007
1982
  }
2008
- const headerSubMenu = globalThis.document.querySelectorAll('[data-item-name=header-submenu]');
2009
- headerSubMenu.forEach((_) => {
2010
- headerSubMenuObserver?.observe(_);
2011
- });
2012
- }, 200);
2013
- const activeSubItem = findActiveSubItem(router)(subItems);
2014
- const toggleSubMenu = () => setHiddenMenuIsShow(!subMenuIsShow);
2015
- const subMenu = subItems?.map((_) => (jsx(HeaderItem, { className: "mr-8", active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _), dataItemName: "header-submenu", bgColor: bgColor }, _.href)));
2016
- return (jsxs("nav", { className: "relative mt-5", children: [jsx("div", { className: "overflow-hidden whitespace-nowrap mr-52", children: subMenu }), renderDotsSubMenu({
2017
- subMenuIsShow,
2018
- toggleSubMenu,
2019
- subItems,
2020
- bgColor,
2021
- router,
2022
- handlerDecorator,
2023
- })] }));
2024
- });
2025
- // TODO: add types
2026
- const renderDotsSubMenu = ({ subMenuIsShow, toggleSubMenu, subItems, bgColor, router, handlerDecorator, }) => (jsxs("div", { className: `absolute w-52 -top-4 right-0 pt-4 z-40 ${subMenuIsShow ? 'bg-white rounded-md shadow-blue-gray/24' : ''}`, "data-header-submenu-visible": "toggled", children: [jsx("button", { className: "flex justify-between items-center cursor-pointer h-6 ml-6", onClick: toggleSubMenu, "aria-label": `${subMenuIsShow ? 'Скрыть другие разделы' : 'Показать другие разделы'}`, children: Array(3).fill(bgColor).map(renderDot) }), jsx("div", { className: `flex flex-col rounded-md bg-white p-6 pb-2 ${subMenuIsShow ? '' : 'hidden'}`, "aria-hidden": !subMenuIsShow, children: renderDotsSubMenuItems(subItems, router, handlerDecorator) })] }));
2027
- // TODO: add types
2028
- const renderDotsSubMenuItems = (subItems, router, handlerDecorator) => subItems?.map((_) => (jsx("a", { ...useLink({ router, handlerDecorator }, _), "data-item-name": "dots-header-submenu", className: "text-base font-light pb-4 hover:text-primary-main", children: _.text }, _.href)));
2029
- const renderDot = (bgColor, i) => (jsx("div", { className: `w-[3px] h-[3px] rounded mr-1 ${DOT_BG_COLORS_MAP[bgColor]}` }, String(i)));
1983
+ const entry = entries[0];
1984
+ if (entry.intersectionRatio < 1) {
1985
+ setVisibleItemsCount((prev) => Math.min(prev, itemIndex));
1986
+ }
1987
+ else {
1988
+ setVisibleItemsCount((prev) => Math.max(prev, itemIndex + 1));
1989
+ }
1990
+ };
1991
+ return (jsxs("nav", { className: "relative mt-5", children: [jsx("div", { className: "overflow-hidden whitespace-nowrap mr-52", children: subItems.map((_, i) => (jsx(IntersectionObserverTag, { Tag: "span", observerCallback: observerCallback(i), observerOptions: { threshold: 1 }, children: jsx(HeaderItem, { className: `mr-8 ${visibleItemsCount - 1 < i ? 'invisible' : ''}`, active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _), bgColor: bgColor }) }, String(i)))) }), dropDownMenuItems.length ? (jsx(DropdownMenu, { context: context, menuVisible: menuVisible, toggleMenu: toggleMenu, menuItems: dropDownMenuItems, bgColor: bgColor })) : null] }));
1992
+ });
2030
1993
 
2031
1994
  const BORDER_COLORS = {
2032
1995
  'bg-white': 'bg-main-divider',
@@ -2042,21 +2005,94 @@
2042
2005
  return (jsx("header", { className: `pt-6 pb-8 px-20 ${bgColor} ${className}`, id: anchor, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, jsx(HeaderSecondaryMenu, { context: context, className: "ml-auto", defaultLocation: defaultLocation, bgColor: bgColor })] }), jsx("div", { className: `mt-6 h-[1px] ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { context: context, subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
2043
2006
  });
2044
2007
 
2045
- const Insurance = JSX(({ className = '', title, description, image, benefits, insuranceSum, monthLimit }) => {
2046
- return (jsxs("section", { className: `px-[100px] py-[50px] bg-white text-primary-text ${className}`, children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "text-center" }) : null, description ? jsx("div", { className: "text-center text-md mt-3", children: description }) : null, jsx("div", { children: jsxs("div", { className: "mt-5 mx-auto flex justify-center gap-[120px] mt-[30px]", children: [image?.src ? jsx(Img, { image: image }) : null, jsxs("div", { className: "w-[558px] m-auto", children: [benefits ? (jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit) })) : null, jsxs("div", { className: "bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4", children: [insuranceSum
2047
- ? renderValueBlock('Страховая сумма:', insuranceSum, Boolean(monthLimit))
2048
- : null, monthLimit
2049
- ? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(insuranceSum))
2008
+ const Insurance = JSX(({ className = '', title, description, image, benefits, sum, monthLimit }) => {
2009
+ return (jsxs("section", { className: `px-[100px] py-[50px] bg-white text-primary-text ${className}`, children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "text-center" }) : null, description ? jsx("div", { className: "text-center text-md mt-3", children: description }) : null, jsx("div", { children: jsxs("div", { className: "mt-5 mx-auto flex justify-center gap-[120px] mt-[30px]", children: [image?.src ? jsx(Img, { image: image }) : null, jsxs("div", { className: "w-[558px] m-auto", children: [benefits ? (jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit) })) : null, jsxs("div", { className: "bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4", children: [sum ? renderValueBlock$1('Страховая сумма:', sum, Boolean(monthLimit)) : null, monthLimit
2010
+ ? renderValueBlock$1('Ежемесячный лимит:', monthLimit, Boolean(sum))
2050
2011
  : null] })] })] }) })] }));
2051
2012
  });
2052
2013
  function renderBenefit(benefit, i) {
2053
- return (jsxs("div", { className: "flex items-center gap-5", children: [benefit?.icon ? (jsx(Img, { className: "w-[50px] h-[50px] min-w-[50px] p-3 rounded-full bg-secondary-light", image: benefit.icon, width: "24", height: "24", asSVG: true })) : null, jsx("div", { className: "flex", children: jsx("div", { className: "text-title-2xs", children: benefit.label }) })] }, String(i)));
2014
+ return (jsxs("div", { className: "flex items-center gap-5", children: [benefit?.icon ? (jsx(Img, { className: "w-[50px] h-[50px] min-w-[50px] p-3 rounded-full bg-secondary-light", image: benefit.icon, width: "24", height: "24", asSVG: true })) : null, jsxs("div", { children: [benefit?.label ? jsx("div", { className: "text-title-2xs", children: benefit.label }) : null, benefit?.description ? (jsx("div", { className: "mt-2 font-light text-secondary-text", children: benefit.description })) : null] })] }, String(i)));
2054
2015
  }
2055
- function renderValueBlock(title, sum, isAnotherBlock) {
2016
+ function renderValueBlock$1(title, sum, isAnotherBlock) {
2056
2017
  const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
2057
2018
  return (jsxs("div", { className: `flex justify-between items-center gap-2 w-full ${widthStyle}`, children: [jsx("span", { className: "text-secondary-text text-base", children: title }), jsxs("span", { className: "text-primary-main text-title-2xs", children: [addSpacesBetweenNumbers(sum), " \u20BD"] })] }));
2058
2019
  }
2059
2020
 
2021
+ const InsuranceAmountBlockInner = JSX(({ className = '', context, cards = [], anchor = null }) => {
2022
+ const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
2023
+ const [tabsShift, setTabsShift] = context.useState(0);
2024
+ const handleNextClick = () => setTabsShift(tabsShift + 1);
2025
+ const handlePrevClick = () => setTabsShift(tabsShift - 1);
2026
+ const galleryLength = cards?.length;
2027
+ const isGalleryScrollAvailable = cards?.length > 2;
2028
+ const showNextButton = isGalleryScrollAvailable && galleryLength > tabsShift + 2;
2029
+ const isLastShift = galleryLength === tabsShift + 2;
2030
+ const showPrevButton = tabsShift > 0;
2031
+ return (jsx("section", { id: anchor, className: `min-w-full ${className}`, children: jsxs("div", { className: "relative mt-7 overflow-hidden", children: [galleryLength > 1
2032
+ ? renderGallery({
2033
+ tabsShift,
2034
+ cards,
2035
+ activeSlideIndex,
2036
+ isLastShift,
2037
+ setActiveSlideIndex,
2038
+ })
2039
+ : null, renderArrows({
2040
+ handler: [handlePrevClick, handleNextClick],
2041
+ isShown: [showPrevButton, showNextButton],
2042
+ btnClass: ['left-[50px]', 'right-[50px]'],
2043
+ className: 'top-[62px]',
2044
+ }), showPrevButton ? (jsx("div", { className: "absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white" })) : null, showNextButton ? (jsx("div", { className: "absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white" })) : null] }) }));
2045
+ });
2046
+ function renderGallery({ tabsShift, cards, activeSlideIndex, isLastShift, setActiveSlideIndex, }) {
2047
+ const tabsShiftWidth = isLastShift ? tabsShift * 460 - 240 : tabsShift * 460;
2048
+ return (jsx("div", { style: { transform: `translateX(-${tabsShiftWidth}px)` }, className: "duration-1000 px-[50px]", children: jsx("div", { className: "w-full flex flex-nowrap gap-3.5 pb-[38px]", children: cards.map((slide, i) => renderSlide({
2049
+ slide,
2050
+ i,
2051
+ activeSlideIndex,
2052
+ onClick: () => setActiveSlideIndex(i),
2053
+ })) }) }));
2054
+ }
2055
+ function renderSlide({ slide, i, activeSlideIndex, onClick }) {
2056
+ const isActiveBtn = i === activeSlideIndex;
2057
+ const btnClassName = isActiveBtn
2058
+ ? 'shadow-dark-blue/42 border-primary-main'
2059
+ : `ease-in duration-300 border-main-stroke`;
2060
+ return (jsxs("button", { type: "button", onClick: onClick, className: `p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative ${btnClassName}`, children: [slide?.icon ? (jsx(Img, { className: `h-[108px] w-[108px] p-3 rounded-full bg-secondary-light mr-[30px]`, image: slide.icon, width: "24", height: "24" })) : null, jsxs("div", { className: "flex gap-3.5", children: [slide?.sum ? renderValueBlock('страховая сумма', slide.sum) : null, slide?.fee ? renderValueBlock('страховой взнос', slide.fee) : null] }), renderDoneIcon(isActiveBtn)] }, String(i)));
2061
+ }
2062
+ function renderValueBlock(title, sum) {
2063
+ return (jsxs("div", { className: "flex flex-col text-left", children: [jsxs("span", { className: "whitespace-pre text-title-2xs", children: [addSpacesBetweenNumbers(sum), " \u20BD"] }), jsx("span", { className: "whitespace-pre text-secondary-text font-light text-base mt-1", children: title })] }));
2064
+ }
2065
+ function renderDoneIcon(isActive) {
2066
+ return isActive ? (jsx(Img, { className: `h-[24px] w-[24px] min-w-[24px] min-h-[24px] absolute right-4 top-4`, image: "DoneIcon", width: "24", height: "24" })) : null;
2067
+ }
2068
+
2069
+ const InsuranceAmountBlock = JSX(({ className = '', context, title, insuranceTabs = [], button, anchor = null }) => {
2070
+ const insuranceGalleries = insuranceTabs.map((_) => _.cards);
2071
+ const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
2072
+ return (jsxs("section", { id: anchor, className: `box-border py-[50px] overflow-hidden relative font-sans w-100 bg-white ${className}`, children: [title ? jsx(Heading, { className: "text-center", title: title, headingType: "h3" }) : null, jsx("div", { className: "p-1.5 bg-secondary-light w-fit m-auto rounded-md mt-[34px]", children: insuranceTabs.map((item, i) => renderNavButton$1({
2073
+ title: item?.title,
2074
+ i,
2075
+ activeSlideIndex,
2076
+ onClick: () => setActiveSlideIndex(i),
2077
+ })) }), jsx("div", { className: "flex", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: renderInsuranceGalleries({
2078
+ context,
2079
+ className,
2080
+ insuranceGalleries,
2081
+ }) }), button?.text ? (jsx("div", { className: "flex justify-center", children: jsx(Button, { className: "box-border p-4 h-14 w-full max-w-[240px]", version: button?.version || 'primary', href: button.href, children: button.text }) })) : null] }));
2082
+ });
2083
+ const renderInsuranceGalleries = ({ insuranceGalleries, context, className }) => {
2084
+ return insuranceGalleries?.length
2085
+ ? insuranceGalleries.map((cards) => (jsx(InsuranceAmountBlockInner, { context: context, className: className, cards: cards })))
2086
+ : null;
2087
+ };
2088
+ function renderNavButton$1({ title, i, activeSlideIndex, onClick }) {
2089
+ const isActiveBtn = i === activeSlideIndex;
2090
+ const btnClassName = isActiveBtn
2091
+ ? 'bg-primary-main text-white rounded-md'
2092
+ : `text-secondary-text`;
2093
+ return (jsx("button", { type: "button", onClick: onClick, "aria-label": title, className: `box-border px-4 py-3 text-m-md ${btnClassName}`, children: title }, String(i)));
2094
+ }
2095
+
2060
2096
  const MobileAppTile = JSX(({ className = '', context, title = 'Мобильное приложение', qr, buttons = [], anchor = null, }) => {
2061
2097
  return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, id: anchor, children: jsx(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: "h3", title: title, className: `whitespace-pre-wrap max-w-[600px] mb-[30px]` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-[30px] gap-4" })) : null, children: jsxs("div", { className: "flex items-center", children: [qr?.src && qr?.href && (jsx("a", { href: qr.href, target: "_blank", "aria-label": title, children: jsx("img", { src: qr.src, alt: title, title: title, width: "164", height: "164", className: "w-[92px] h-[92px] min-w-[92px] min-h-[92px] bg-secondary-light" }) })), jsx("span", { className: "font-light text-secondary-text ml-4", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }) }) }));
2062
2098
  });
@@ -2154,7 +2190,7 @@
2154
2190
  const renderShimmer = (size = 3) => goldenSequence(100, size)
2155
2191
  .map((_) => Math.floor(_))
2156
2192
  .map(renderShimmerItem);
2157
- const renderShimmerItem = (width = 100, index) => (jsx("div", { style: { width: `${width}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
2193
+ const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
2158
2194
  const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
2159
2195
 
2160
2196
  const productGalleryStyleMap = {
@@ -2250,7 +2286,12 @@
2250
2286
  const isUseSlider = cardsCount > CARD_FULL_VIEW_COUNT;
2251
2287
  const showNextButton = isUseSlider && cardsCount - activeCardIndex > CARD_FULL_VIEW_COUNT;
2252
2288
  const showPrevButton = isUseSlider && activeCardIndex > 0;
2253
- return (jsxs("div", { children: [showPrevButton ? (jsx(ArrowButton, { className: "absolute top-1/2 left-8 z-10 mt-6", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })) : null, showNextButton ? (jsx(ArrowButton, { className: "absolute top-1/2 right-8 z-10 mt-6 rotate-180", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" })) : null] }));
2289
+ return (jsx("div", { children: renderArrows({
2290
+ handler: [handlePrevClick, handleNextClick],
2291
+ isShown: [showPrevButton, showNextButton],
2292
+ btnClass: ['left-8', 'right-8'],
2293
+ className: 'top-1/2 mt-6',
2294
+ }) }));
2254
2295
  };
2255
2296
 
2256
2297
  const StepsBlock = JSX(({ className = '', title, showLines = true, steps = [], button, anchor = null }) => {
@@ -2266,7 +2307,7 @@
2266
2307
  return (jsx("div", { className: "flex flex-col items-center text-center relative", children: jsx("div", { className: "h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10", children: (step.icon?.icon && jsx(Img, { image: step.icon, width: "48", height: "48" })) || (jsx("span", { className: "font-normal text-title-sm text-secondary-text", children: i + 1 })) }) }, String(i)));
2267
2308
  };
2268
2309
  const renderStepTitle = (step, i, isMainButton) => {
2269
- return (jsxs("div", { className: "flex flex-col items-center justify-between text-center relative w-[276px] whitespace-pre-line overflow-hidden", children: [jsxs("div", { children: [step.label && jsx("div", { className: "font-normal text-xl m-0 mt-4", children: step.label }), step.description && (jsx("div", { className: `font-light text-base text-secondary-text ${step.label ? 'mt-2' : 'mt-4'}`, children: step.description }))] }), step?.button?.text && !isMainButton ? (jsx(Button, { className: "box-border mt-8 py-3 h-12 w-full max-w-[240px]", version: "primary", href: "#", children: step.button.text })) : null] }, String(i)));
2310
+ return (jsxs("div", { className: "flex flex-col items-center justify-between text-center relative w-[276px] whitespace-pre-line overflow-hidden", children: [jsxs("div", { children: [step.label && jsx("div", { className: "font-normal text-xl m-0 mt-4", children: step.label }), step.description && (jsx("div", { className: `font-light text-base text-secondary-text ${step.label ? 'mt-2' : 'mt-4'}`, children: step.description }))] }), step?.button?.text && !isMainButton ? (jsx(Button, { className: "box-border mt-8 py-3 h-12 w-full max-w-[240px]", version: "primary", href: step.button?.href, children: step.button.text })) : null] }, String(i)));
2270
2311
  };
2271
2312
 
2272
2313
  const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
@@ -2312,7 +2353,7 @@
2312
2353
  });
2313
2354
 
2314
2355
  const GroupBlockTabs = JSX((props) => {
2315
- const { tabs, currentTag, onTabClick, className = '', isShowCounter = true } = props;
2356
+ const { tabs, currentTag, onTabClick, className = '', isShowCounter } = props;
2316
2357
  return (jsx("div", { className: `mb-2 box-border flex gap-x-1 ${className}`, role: "tablist", children: tabs?.map(renderTab(onTabClick, isShowCounter, currentTag)) }));
2317
2358
  });
2318
2359
  const badgeStyle = 'min-w-[22px] w-[22px] h-[22px] rounded-full text-m-sm';
@@ -2322,7 +2363,7 @@
2322
2363
  const tabText = isActive ? 'text-white' : 'text-secondary-text group-hover:text-primary-main';
2323
2364
  const counterBlockStyle = `${badgeStyle}
2324
2365
  ${isActive ? 'bg-white/30 text-white' : 'bg-secondary-light text-secondary-text'}`;
2325
- return (jsx("div", { className: `flex h-full w-full h-12 flex-1 cursor-pointer mr-2 last:mr-0 box-content ${tabBg}`, role: "tab", onClick: () => onTabClick(tab.tag), "aria-selected": String(isActive), tag: tab?.tag, children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? jsx("h3", { className: `mr-8 ${tabText}`, children: tab?.title }) : null, isShowCounter ? (jsx("div", { className: `flex items-center justify-center ${counterBlockStyle}`, children: jsx("span", { children: tab.count }) })) : null] }) }, String(i)));
2366
+ return (jsx("div", { className: `flex h-full w-full h-12 flex-1 cursor-pointer mr-2 last:mr-0 box-content ${tabBg}`, role: "tab", onClick: () => onTabClick(tab.tag), "aria-selected": String(isActive), tag: tab?.tag, children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? jsx("h3", { className: tabText, children: tab?.title }) : null, isShowCounter ? (jsx("div", { className: `flex items-center justify-center ml-8 ${counterBlockStyle}`, children: jsx("span", { children: tab.count }) })) : null] }) }, String(i)));
2326
2367
  };
2327
2368
 
2328
2369
  function style2className(style) {
@@ -2335,7 +2376,7 @@
2335
2376
  };
2336
2377
 
2337
2378
  const GroupBlocksItem = JSX(({ groupBlocks, context }) => {
2338
- return (jsx("div", { className: 'grid grid-cols-12 gap-2 box-border', children: groupBlocks?.length ? groupBlocks.map(renderBlock$1(context)) : null }));
2379
+ return (jsx("div", { className: "grid grid-cols-12 gap-2 box-border", children: groupBlocks?.length ? groupBlocks.map(renderBlock$1(context)) : null }));
2339
2380
  });
2340
2381
  const renderBlock$1 = (context) => (block, i) => {
2341
2382
  const type = block?.blockType;
@@ -2351,16 +2392,16 @@
2351
2392
  return tag ? blocks.filter((block) => block?.tags?.includes(tag)) : blocks;
2352
2393
  };
2353
2394
 
2354
- const GroupBlock = JSX(({ className = '', tabs, context, anchor = null, groupBlocks = [] }) => {
2395
+ const GroupBlock = JSX(({ className = '', tabs, context, anchor = null, groupBlocks = [], isShowCounter }) => {
2355
2396
  const [currentTag, setCurrentTag] = context.useState(tabs?.[0]?.tag);
2356
2397
  const filteredBlocks = filterBlocksByTag(groupBlocks, currentTag);
2357
2398
  const tabsNewMap = tabs?.map((tab) => {
2358
2399
  const count = tab.tag
2359
- ? groupBlocks.filter((block) => block?.tags?.includes(`${tab.tag}`)).length
2400
+ ? groupBlocks.filter((block) => block?.tags?.includes(tab.tag)).length
2360
2401
  : groupBlocks.length;
2361
2402
  return { ...tab, count };
2362
2403
  });
2363
- return (jsxs("section", { id: anchor, className: `box-border gap-1 h-12 ${className}`, children: [tabsNewMap?.length ? (jsx(GroupBlockTabs, { currentTag: currentTag, onTabClick: setCurrentTag, tabs: tabsNewMap })) : null, groupBlocks.length ? (jsx(GroupBlocksItem, { context: context, groupBlocks: filteredBlocks })) : null] }));
2404
+ return (jsxs("section", { id: anchor, className: `box-border gap-1 ${className}`, children: [tabsNewMap?.length ? (jsx(GroupBlockTabs, { currentTag: currentTag, onTabClick: setCurrentTag, tabs: tabsNewMap, isShowCounter: isShowCounter })) : null, groupBlocks.length ? (jsx(GroupBlocksItem, { context: context, groupBlocks: filteredBlocks })) : null] }));
2364
2405
  });
2365
2406
 
2366
2407
  function getElementsColsValue(className = '') {
@@ -2377,10 +2418,10 @@
2377
2418
  }
2378
2419
 
2379
2420
  const BonusBenefitsBlock = JSX(({ className = '', title, subtitle, bonusBenefits, anchor = null }) => {
2380
- return (jsxs("section", { className: `font-sans text-primary-text bg-white p-50 flex flex-col ${className}`, id: anchor, children: [title ? (jsx(Heading, { headingType: "h3", className: "text-center mb-[10px]", title: title })) : null, subtitle ? jsx("span", { className: "text-md font-normal text-center", children: subtitle }) : null, bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${getElementsColsValue(className)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] }));
2421
+ return (jsxs("section", { className: `font-sans text-primary-text bg-white p-50 flex flex-col text-center ${className}`, id: anchor, children: [title ? jsx(Heading, { headingType: "h3", className: "mb-[10px]", title: title }) : null, subtitle ? jsx("span", { className: "text-md font-normal", children: subtitle }) : null, bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${getElementsColsValue(className)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] }));
2381
2422
  });
2382
2423
  const renderBonusBenefit = (bonusBenefit, i) => {
2383
- return (jsxs("div", { className: "flex flex-col items-center max-w-[292px]", children: [bonusBenefit?.icon ? (jsx(Img, { className: "h-[180px] w-[160px] min-w-[160px] min-h-[160px]", image: bonusBenefit.icon, width: "160", height: "180" })) : null, jsx("div", { children: bonusBenefit?.label ? (jsx("span", { className: "title-2xs text-center m-0", children: bonusBenefit.label })) : null })] }, String(i)));
2424
+ return (jsxs("div", { className: "flex flex-col items-center max-w-[292px]", children: [bonusBenefit?.icon ? (jsx(Img, { className: "h-[180px] w-[160px] min-w-[160px] min-h-[160px]", image: bonusBenefit.icon, width: "160", height: "180" })) : null, jsx("div", { children: bonusBenefit?.label ? jsx("span", { className: "title-2xs m-0", children: bonusBenefit.label }) : null })] }, String(i)));
2384
2425
  };
2385
2426
 
2386
2427
  const Blocks = {
@@ -2389,7 +2430,6 @@
2389
2430
  Bonus,
2390
2431
  ComparisonTable,
2391
2432
  Calculator,
2392
- CreditCalculator,
2393
2433
  ExchangeRateTile,
2394
2434
  Footer,
2395
2435
  Gallery,
@@ -2397,6 +2437,7 @@
2397
2437
  Header,
2398
2438
  Headline,
2399
2439
  Insurance,
2440
+ InsuranceAmountBlock,
2400
2441
  LinkDocs,
2401
2442
  MiniGallery,
2402
2443
  MobileAppTile,
@@ -2422,8 +2463,9 @@
2422
2463
  blocks?.forEach((block) => {
2423
2464
  const currentHash = globalThis.location?.hash; // TODO: remove globalThis, use href from router
2424
2465
  const anchorHash = `#${block?.id}`;
2425
- if (currentHash === anchorHash)
2466
+ if (currentHash === anchorHash) {
2426
2467
  return;
2468
+ }
2427
2469
  const position = block?.getBoundingClientRect();
2428
2470
  if (position && position.top > 0 && position.top < 150) {
2429
2471
  router.replace(`#${block?.id}`);
@@ -2431,6 +2473,8 @@
2431
2473
  });
2432
2474
  };
2433
2475
 
2476
+ const isSSR = () => !(typeof window !== 'undefined' && window.document && window.document.createElement);
2477
+
2434
2478
  const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
2435
2479
  const renderLikeIcon = () => {
2436
2480
  const params = {