@redneckz/wildless-cms-uni-blocks 0.14.577 → 0.14.578

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 (350) hide show
  1. package/bin/migration-scripts/0.14.454.js +18 -17
  2. package/bin/migration-scripts/0.14.455.js +1 -3
  3. package/bin/migration-scripts/0.14.488.js +4 -1
  4. package/bin/migration-scripts/0.14.519.js +1 -1
  5. package/bundle/blocks.schema.json +1 -1
  6. package/bundle/bundle.umd.js +92 -16
  7. package/bundle/bundle.umd.min.js +1 -1
  8. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  9. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  10. package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +8 -0
  11. package/bundle/hooks/useLeadFormData.d.ts +5 -0
  12. package/bundle/ui-kit/Button/Button.d.ts +1 -1
  13. package/bundle/ui-kit/DatePicker/renderCalendarCells.d.ts +2 -2
  14. package/bundle/ui-kit/FormField/Fields/AmountWorkersField.d.ts +2 -0
  15. package/bundle/ui-kit/FormField/Fields/EducationField.d.ts +2 -0
  16. package/bundle/ui-kit/FormField/Fields/EmployerActivitiesField.d.ts +2 -0
  17. package/bundle/ui-kit/FormField/Fields/EmployerOrganizationField.d.ts +2 -0
  18. package/bundle/ui-kit/FormField/Fields/EmploymentField.d.ts +2 -0
  19. package/bundle/ui-kit/FormField/Fields/HousingField.d.ts +2 -0
  20. package/bundle/ui-kit/FormField/Fields/OrganizationField.d.ts +2 -0
  21. package/bundle/ui-kit/FormField/Fields/PositionOrganizationField.d.ts +2 -0
  22. package/bundle/ui-kit/FormField/SelectField.d.ts +15 -0
  23. package/bundle/ui-kit/FormField/dataSources.d.ts +3 -0
  24. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  25. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  26. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +8 -0
  27. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  28. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
  29. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  30. package/dist/components/Footer/SocialMedia.js +4 -1
  31. package/dist/components/Footer/SocialMedia.js.map +1 -1
  32. package/dist/components/InvestmentInfo/InvestmentInfo.js +2 -1
  33. package/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  34. package/dist/components/OfficesAtmsMap/renderButtonsGroup.js +5 -6
  35. package/dist/components/OfficesAtmsMap/renderButtonsGroup.js.map +1 -1
  36. package/dist/components/OfficesAtmsMap/renderFiltrationForm.js +1 -1
  37. package/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
  38. package/dist/hooks/useLeadFormData.d.ts +5 -0
  39. package/dist/hooks/useLeadFormData.js +14 -0
  40. package/dist/hooks/useLeadFormData.js.map +1 -0
  41. package/dist/ui-kit/Button/Button.d.ts +1 -1
  42. package/dist/ui-kit/DatePicker/renderCalendarCells.d.ts +2 -2
  43. package/dist/ui-kit/DatePicker/renderCalendarCells.js +1 -1
  44. package/dist/ui-kit/DatePicker/renderCalendarCells.js.map +1 -1
  45. package/dist/ui-kit/DialogManager/DialogManager.js +2 -2
  46. package/dist/ui-kit/DialogManager/DialogManager.js.map +1 -1
  47. package/dist/ui-kit/FormField/Fields/AmountWorkersField.d.ts +2 -0
  48. package/dist/ui-kit/FormField/Fields/AmountWorkersField.js +11 -0
  49. package/dist/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -0
  50. package/dist/ui-kit/FormField/Fields/EducationField.d.ts +2 -0
  51. package/dist/ui-kit/FormField/Fields/EducationField.js +11 -0
  52. package/dist/ui-kit/FormField/Fields/EducationField.js.map +1 -0
  53. package/dist/ui-kit/FormField/Fields/EmployerActivitiesField.d.ts +2 -0
  54. package/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js +11 -0
  55. package/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -0
  56. package/dist/ui-kit/FormField/Fields/EmployerOrganizationField.d.ts +2 -0
  57. package/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js +11 -0
  58. package/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -0
  59. package/dist/ui-kit/FormField/Fields/EmploymentField.d.ts +2 -0
  60. package/dist/ui-kit/FormField/Fields/EmploymentField.js +11 -0
  61. package/dist/ui-kit/FormField/Fields/EmploymentField.js.map +1 -0
  62. package/dist/ui-kit/FormField/Fields/HousingField.d.ts +2 -0
  63. package/dist/ui-kit/FormField/Fields/HousingField.js +11 -0
  64. package/dist/ui-kit/FormField/Fields/HousingField.js.map +1 -0
  65. package/dist/ui-kit/FormField/Fields/OrganizationField.d.ts +2 -0
  66. package/dist/ui-kit/FormField/Fields/OrganizationField.js +11 -0
  67. package/dist/ui-kit/FormField/Fields/OrganizationField.js.map +1 -0
  68. package/dist/ui-kit/FormField/Fields/PositionOrganizationField.d.ts +2 -0
  69. package/dist/ui-kit/FormField/Fields/PositionOrganizationField.js +11 -0
  70. package/dist/ui-kit/FormField/Fields/PositionOrganizationField.js.map +1 -0
  71. package/dist/ui-kit/FormField/SelectField.d.ts +15 -0
  72. package/dist/ui-kit/FormField/SelectField.js +13 -0
  73. package/dist/ui-kit/FormField/SelectField.js.map +1 -0
  74. package/dist/ui-kit/FormField/dataSources.d.ts +3 -0
  75. package/dist/ui-kit/FormField/dataSources.js +6 -0
  76. package/dist/ui-kit/FormField/dataSources.js.map +1 -0
  77. package/dist/ui-kit/FormField/getField.js +16 -0
  78. package/dist/ui-kit/FormField/getField.js.map +1 -1
  79. package/dist/ui-kit/FormField/getObjectValidator.js +8 -0
  80. package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  81. package/dist/ui-kit/PhoneInput/PhoneInput.js +3 -1
  82. package/dist/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
  83. package/dist/ui-kit/ProgressBar/ProgressBar.js +1 -5
  84. package/dist/ui-kit/ProgressBar/ProgressBar.js.map +1 -1
  85. package/dist/ui-kit/VerifyPhoneDialog/InputCode.js +1 -1
  86. package/dist/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
  87. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  88. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  89. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +8 -0
  90. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  91. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
  92. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  93. package/lib/components/Footer/SocialMedia.js +4 -1
  94. package/lib/components/Footer/SocialMedia.js.map +1 -1
  95. package/lib/components/InvestmentInfo/InvestmentInfo.js +2 -1
  96. package/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  97. package/lib/components/OfficesAtmsMap/renderButtonsGroup.js +5 -6
  98. package/lib/components/OfficesAtmsMap/renderButtonsGroup.js.map +1 -1
  99. package/lib/components/OfficesAtmsMap/renderFiltrationForm.js +1 -1
  100. package/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
  101. package/lib/hooks/useLeadFormData.d.ts +5 -0
  102. package/lib/hooks/useLeadFormData.js +11 -0
  103. package/lib/hooks/useLeadFormData.js.map +1 -0
  104. package/lib/ui-kit/Button/Button.d.ts +1 -1
  105. package/lib/ui-kit/DatePicker/renderCalendarCells.d.ts +2 -2
  106. package/lib/ui-kit/DatePicker/renderCalendarCells.js +1 -1
  107. package/lib/ui-kit/DatePicker/renderCalendarCells.js.map +1 -1
  108. package/lib/ui-kit/DialogManager/DialogManager.js +2 -2
  109. package/lib/ui-kit/DialogManager/DialogManager.js.map +1 -1
  110. package/lib/ui-kit/FormField/Fields/AmountWorkersField.d.ts +2 -0
  111. package/lib/ui-kit/FormField/Fields/AmountWorkersField.js +9 -0
  112. package/lib/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -0
  113. package/lib/ui-kit/FormField/Fields/EducationField.d.ts +2 -0
  114. package/lib/ui-kit/FormField/Fields/EducationField.js +9 -0
  115. package/lib/ui-kit/FormField/Fields/EducationField.js.map +1 -0
  116. package/lib/ui-kit/FormField/Fields/EmployerActivitiesField.d.ts +2 -0
  117. package/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js +9 -0
  118. package/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -0
  119. package/lib/ui-kit/FormField/Fields/EmployerOrganizationField.d.ts +2 -0
  120. package/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js +9 -0
  121. package/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -0
  122. package/lib/ui-kit/FormField/Fields/EmploymentField.d.ts +2 -0
  123. package/lib/ui-kit/FormField/Fields/EmploymentField.js +9 -0
  124. package/lib/ui-kit/FormField/Fields/EmploymentField.js.map +1 -0
  125. package/lib/ui-kit/FormField/Fields/HousingField.d.ts +2 -0
  126. package/lib/ui-kit/FormField/Fields/HousingField.js +9 -0
  127. package/lib/ui-kit/FormField/Fields/HousingField.js.map +1 -0
  128. package/lib/ui-kit/FormField/Fields/OrganizationField.d.ts +2 -0
  129. package/lib/ui-kit/FormField/Fields/OrganizationField.js +9 -0
  130. package/lib/ui-kit/FormField/Fields/OrganizationField.js.map +1 -0
  131. package/lib/ui-kit/FormField/Fields/PositionOrganizationField.d.ts +2 -0
  132. package/lib/ui-kit/FormField/Fields/PositionOrganizationField.js +9 -0
  133. package/lib/ui-kit/FormField/Fields/PositionOrganizationField.js.map +1 -0
  134. package/lib/ui-kit/FormField/SelectField.d.ts +15 -0
  135. package/lib/ui-kit/FormField/SelectField.js +11 -0
  136. package/lib/ui-kit/FormField/SelectField.js.map +1 -0
  137. package/lib/ui-kit/FormField/dataSources.d.ts +3 -0
  138. package/lib/ui-kit/FormField/dataSources.js +4 -0
  139. package/lib/ui-kit/FormField/dataSources.js.map +1 -0
  140. package/lib/ui-kit/FormField/getField.js +16 -0
  141. package/lib/ui-kit/FormField/getField.js.map +1 -1
  142. package/lib/ui-kit/FormField/getObjectValidator.js +8 -0
  143. package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  144. package/lib/ui-kit/PhoneInput/PhoneInput.js +3 -1
  145. package/lib/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
  146. package/lib/ui-kit/ProgressBar/ProgressBar.js +1 -5
  147. package/lib/ui-kit/ProgressBar/ProgressBar.js.map +1 -1
  148. package/lib/ui-kit/VerifyPhoneDialog/InputCode.js +1 -1
  149. package/lib/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
  150. package/mobile/bundle/bundle.umd.js +90 -15
  151. package/mobile/bundle/bundle.umd.min.js +1 -1
  152. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  153. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  154. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +8 -0
  155. package/mobile/bundle/hooks/useLeadFormData.d.ts +5 -0
  156. package/mobile/bundle/ui-kit/Button/Button.d.ts +1 -1
  157. package/mobile/bundle/ui-kit/DatePicker/renderCalendarCells.d.ts +2 -2
  158. package/mobile/bundle/ui-kit/FormField/Fields/AmountWorkersField.d.ts +2 -0
  159. package/mobile/bundle/ui-kit/FormField/Fields/EducationField.d.ts +2 -0
  160. package/mobile/bundle/ui-kit/FormField/Fields/EmployerActivitiesField.d.ts +2 -0
  161. package/mobile/bundle/ui-kit/FormField/Fields/EmployerOrganizationField.d.ts +2 -0
  162. package/mobile/bundle/ui-kit/FormField/Fields/EmploymentField.d.ts +2 -0
  163. package/mobile/bundle/ui-kit/FormField/Fields/HousingField.d.ts +2 -0
  164. package/mobile/bundle/ui-kit/FormField/Fields/OrganizationField.d.ts +2 -0
  165. package/mobile/bundle/ui-kit/FormField/Fields/PositionOrganizationField.d.ts +2 -0
  166. package/mobile/bundle/ui-kit/FormField/SelectField.d.ts +15 -0
  167. package/mobile/bundle/ui-kit/FormField/dataSources.d.ts +3 -0
  168. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  169. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  170. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +8 -0
  171. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  172. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
  173. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  174. package/mobile/dist/components/Footer/SocialMedia.js +4 -1
  175. package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
  176. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js +2 -1
  177. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  178. package/mobile/dist/components/OfficesAtmsMap/renderButtonsGroup.js +5 -6
  179. package/mobile/dist/components/OfficesAtmsMap/renderButtonsGroup.js.map +1 -1
  180. package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js +1 -1
  181. package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
  182. package/mobile/dist/hooks/useLeadFormData.d.ts +5 -0
  183. package/mobile/dist/hooks/useLeadFormData.js +14 -0
  184. package/mobile/dist/hooks/useLeadFormData.js.map +1 -0
  185. package/mobile/dist/ui-kit/Button/Button.d.ts +1 -1
  186. package/mobile/dist/ui-kit/DatePicker/renderCalendarCells.d.ts +2 -2
  187. package/mobile/dist/ui-kit/DatePicker/renderCalendarCells.js +1 -1
  188. package/mobile/dist/ui-kit/DatePicker/renderCalendarCells.js.map +1 -1
  189. package/mobile/dist/ui-kit/DialogManager/DialogManager.js +2 -2
  190. package/mobile/dist/ui-kit/DialogManager/DialogManager.js.map +1 -1
  191. package/mobile/dist/ui-kit/FormField/Fields/AmountWorkersField.d.ts +2 -0
  192. package/mobile/dist/ui-kit/FormField/Fields/AmountWorkersField.js +11 -0
  193. package/mobile/dist/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -0
  194. package/mobile/dist/ui-kit/FormField/Fields/EducationField.d.ts +2 -0
  195. package/mobile/dist/ui-kit/FormField/Fields/EducationField.js +11 -0
  196. package/mobile/dist/ui-kit/FormField/Fields/EducationField.js.map +1 -0
  197. package/mobile/dist/ui-kit/FormField/Fields/EmployerActivitiesField.d.ts +2 -0
  198. package/mobile/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js +11 -0
  199. package/mobile/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -0
  200. package/mobile/dist/ui-kit/FormField/Fields/EmployerOrganizationField.d.ts +2 -0
  201. package/mobile/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js +11 -0
  202. package/mobile/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -0
  203. package/mobile/dist/ui-kit/FormField/Fields/EmploymentField.d.ts +2 -0
  204. package/mobile/dist/ui-kit/FormField/Fields/EmploymentField.js +11 -0
  205. package/mobile/dist/ui-kit/FormField/Fields/EmploymentField.js.map +1 -0
  206. package/mobile/dist/ui-kit/FormField/Fields/HousingField.d.ts +2 -0
  207. package/mobile/dist/ui-kit/FormField/Fields/HousingField.js +11 -0
  208. package/mobile/dist/ui-kit/FormField/Fields/HousingField.js.map +1 -0
  209. package/mobile/dist/ui-kit/FormField/Fields/OrganizationField.d.ts +2 -0
  210. package/mobile/dist/ui-kit/FormField/Fields/OrganizationField.js +11 -0
  211. package/mobile/dist/ui-kit/FormField/Fields/OrganizationField.js.map +1 -0
  212. package/mobile/dist/ui-kit/FormField/Fields/PositionOrganizationField.d.ts +2 -0
  213. package/mobile/dist/ui-kit/FormField/Fields/PositionOrganizationField.js +11 -0
  214. package/mobile/dist/ui-kit/FormField/Fields/PositionOrganizationField.js.map +1 -0
  215. package/mobile/dist/ui-kit/FormField/SelectField.d.ts +15 -0
  216. package/mobile/dist/ui-kit/FormField/SelectField.js +13 -0
  217. package/mobile/dist/ui-kit/FormField/SelectField.js.map +1 -0
  218. package/mobile/dist/ui-kit/FormField/dataSources.d.ts +3 -0
  219. package/mobile/dist/ui-kit/FormField/dataSources.js +6 -0
  220. package/mobile/dist/ui-kit/FormField/dataSources.js.map +1 -0
  221. package/mobile/dist/ui-kit/FormField/getField.js +16 -0
  222. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  223. package/mobile/dist/ui-kit/FormField/getObjectValidator.js +8 -0
  224. package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  225. package/mobile/dist/ui-kit/PhoneInput/PhoneInput.js +3 -1
  226. package/mobile/dist/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
  227. package/mobile/dist/ui-kit/ProgressBar/ProgressBar.js +1 -5
  228. package/mobile/dist/ui-kit/ProgressBar/ProgressBar.js.map +1 -1
  229. package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.js +1 -1
  230. package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
  231. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  232. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  233. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +8 -0
  234. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  235. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
  236. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  237. package/mobile/lib/components/Footer/SocialMedia.js +4 -1
  238. package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
  239. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js +2 -1
  240. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
  241. package/mobile/lib/components/OfficesAtmsMap/renderButtonsGroup.js +5 -6
  242. package/mobile/lib/components/OfficesAtmsMap/renderButtonsGroup.js.map +1 -1
  243. package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js +1 -1
  244. package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
  245. package/mobile/lib/hooks/useLeadFormData.d.ts +5 -0
  246. package/mobile/lib/hooks/useLeadFormData.js +11 -0
  247. package/mobile/lib/hooks/useLeadFormData.js.map +1 -0
  248. package/mobile/lib/ui-kit/Button/Button.d.ts +1 -1
  249. package/mobile/lib/ui-kit/DatePicker/renderCalendarCells.d.ts +2 -2
  250. package/mobile/lib/ui-kit/DatePicker/renderCalendarCells.js +1 -1
  251. package/mobile/lib/ui-kit/DatePicker/renderCalendarCells.js.map +1 -1
  252. package/mobile/lib/ui-kit/DialogManager/DialogManager.js +2 -2
  253. package/mobile/lib/ui-kit/DialogManager/DialogManager.js.map +1 -1
  254. package/mobile/lib/ui-kit/FormField/Fields/AmountWorkersField.d.ts +2 -0
  255. package/mobile/lib/ui-kit/FormField/Fields/AmountWorkersField.js +9 -0
  256. package/mobile/lib/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -0
  257. package/mobile/lib/ui-kit/FormField/Fields/EducationField.d.ts +2 -0
  258. package/mobile/lib/ui-kit/FormField/Fields/EducationField.js +9 -0
  259. package/mobile/lib/ui-kit/FormField/Fields/EducationField.js.map +1 -0
  260. package/mobile/lib/ui-kit/FormField/Fields/EmployerActivitiesField.d.ts +2 -0
  261. package/mobile/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js +9 -0
  262. package/mobile/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -0
  263. package/mobile/lib/ui-kit/FormField/Fields/EmployerOrganizationField.d.ts +2 -0
  264. package/mobile/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js +9 -0
  265. package/mobile/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -0
  266. package/mobile/lib/ui-kit/FormField/Fields/EmploymentField.d.ts +2 -0
  267. package/mobile/lib/ui-kit/FormField/Fields/EmploymentField.js +9 -0
  268. package/mobile/lib/ui-kit/FormField/Fields/EmploymentField.js.map +1 -0
  269. package/mobile/lib/ui-kit/FormField/Fields/HousingField.d.ts +2 -0
  270. package/mobile/lib/ui-kit/FormField/Fields/HousingField.js +9 -0
  271. package/mobile/lib/ui-kit/FormField/Fields/HousingField.js.map +1 -0
  272. package/mobile/lib/ui-kit/FormField/Fields/OrganizationField.d.ts +2 -0
  273. package/mobile/lib/ui-kit/FormField/Fields/OrganizationField.js +9 -0
  274. package/mobile/lib/ui-kit/FormField/Fields/OrganizationField.js.map +1 -0
  275. package/mobile/lib/ui-kit/FormField/Fields/PositionOrganizationField.d.ts +2 -0
  276. package/mobile/lib/ui-kit/FormField/Fields/PositionOrganizationField.js +9 -0
  277. package/mobile/lib/ui-kit/FormField/Fields/PositionOrganizationField.js.map +1 -0
  278. package/mobile/lib/ui-kit/FormField/SelectField.d.ts +15 -0
  279. package/mobile/lib/ui-kit/FormField/SelectField.js +11 -0
  280. package/mobile/lib/ui-kit/FormField/SelectField.js.map +1 -0
  281. package/mobile/lib/ui-kit/FormField/dataSources.d.ts +3 -0
  282. package/mobile/lib/ui-kit/FormField/dataSources.js +4 -0
  283. package/mobile/lib/ui-kit/FormField/dataSources.js.map +1 -0
  284. package/mobile/lib/ui-kit/FormField/getField.js +16 -0
  285. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  286. package/mobile/lib/ui-kit/FormField/getObjectValidator.js +8 -0
  287. package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  288. package/mobile/lib/ui-kit/PhoneInput/PhoneInput.js +3 -1
  289. package/mobile/lib/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
  290. package/mobile/lib/ui-kit/ProgressBar/ProgressBar.js +1 -5
  291. package/mobile/lib/ui-kit/ProgressBar/ProgressBar.js.map +1 -1
  292. package/mobile/lib/ui-kit/VerifyPhoneDialog/InputCode.js +1 -1
  293. package/mobile/lib/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
  294. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +9 -1
  295. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +9 -1
  296. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -0
  297. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +25 -23
  298. package/mobile/src/components/Footer/SocialMedia.tsx +6 -3
  299. package/mobile/src/components/InvestmentInfo/InvestmentInfo.tsx +3 -2
  300. package/mobile/src/components/OfficesAtmsMap/renderButtonsGroup.tsx +11 -9
  301. package/mobile/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +1 -1
  302. package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.tsx +1 -1
  303. package/mobile/src/hooks/useLeadFormData.ts +18 -0
  304. package/mobile/src/ui-kit/Button/Button.tsx +1 -1
  305. package/mobile/src/ui-kit/DatePicker/renderCalendarCells.tsx +3 -3
  306. package/mobile/src/ui-kit/DialogManager/DialogManager.tsx +2 -2
  307. package/mobile/src/ui-kit/FormField/Fields/AmountWorkersField.tsx +18 -0
  308. package/mobile/src/ui-kit/FormField/Fields/EducationField.tsx +18 -0
  309. package/mobile/src/ui-kit/FormField/Fields/EmployerActivitiesField.tsx +18 -0
  310. package/mobile/src/ui-kit/FormField/Fields/EmployerOrganizationField.tsx +18 -0
  311. package/mobile/src/ui-kit/FormField/Fields/EmploymentField.tsx +18 -0
  312. package/mobile/src/ui-kit/FormField/Fields/HousingField.tsx +18 -0
  313. package/mobile/src/ui-kit/FormField/Fields/OrganizationField.tsx +18 -0
  314. package/mobile/src/ui-kit/FormField/Fields/PositionOrganizationField.tsx +18 -0
  315. package/mobile/src/ui-kit/FormField/SelectField.tsx +37 -0
  316. package/mobile/src/ui-kit/FormField/dataSources.ts +3 -0
  317. package/mobile/src/ui-kit/FormField/getField.tsx +16 -0
  318. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +8 -0
  319. package/mobile/src/ui-kit/PhoneInput/PhoneInput.tsx +3 -1
  320. package/mobile/src/ui-kit/ProgressBar/ProgressBar.tsx +10 -15
  321. package/mobile/src/ui-kit/VerifyPhoneDialog/InputCode.tsx +1 -1
  322. package/package.json +2 -2
  323. package/src/components/ApplicationForm/ApplicationFormContent.ts +9 -1
  324. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +9 -1
  325. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -0
  326. package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +25 -23
  327. package/src/components/Footer/SocialMedia.tsx +6 -3
  328. package/src/components/InvestmentInfo/InvestmentInfo.tsx +3 -2
  329. package/src/components/OfficesAtmsMap/renderButtonsGroup.tsx +11 -9
  330. package/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +1 -1
  331. package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.tsx +1 -1
  332. package/src/hooks/useLeadFormData.ts +18 -0
  333. package/src/ui-kit/Button/Button.tsx +1 -1
  334. package/src/ui-kit/DatePicker/renderCalendarCells.tsx +3 -3
  335. package/src/ui-kit/DialogManager/DialogManager.tsx +2 -2
  336. package/src/ui-kit/FormField/Fields/AmountWorkersField.tsx +18 -0
  337. package/src/ui-kit/FormField/Fields/EducationField.tsx +18 -0
  338. package/src/ui-kit/FormField/Fields/EmployerActivitiesField.tsx +18 -0
  339. package/src/ui-kit/FormField/Fields/EmployerOrganizationField.tsx +18 -0
  340. package/src/ui-kit/FormField/Fields/EmploymentField.tsx +18 -0
  341. package/src/ui-kit/FormField/Fields/HousingField.tsx +18 -0
  342. package/src/ui-kit/FormField/Fields/OrganizationField.tsx +18 -0
  343. package/src/ui-kit/FormField/Fields/PositionOrganizationField.tsx +18 -0
  344. package/src/ui-kit/FormField/SelectField.tsx +37 -0
  345. package/src/ui-kit/FormField/dataSources.ts +3 -0
  346. package/src/ui-kit/FormField/getField.tsx +16 -0
  347. package/src/ui-kit/FormField/getObjectValidator.tsx +8 -0
  348. package/src/ui-kit/PhoneInput/PhoneInput.tsx +3 -1
  349. package/src/ui-kit/ProgressBar/ProgressBar.tsx +10 -15
  350. package/src/ui-kit/VerifyPhoneDialog/InputCode.tsx +1 -1
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:h("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),x=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:f(t)}))),f=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>o(n,{role:"heading",className:h("font-sans m-0",v[t],e),children:l||a}))),w=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),k={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=k[n],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(N,{className:h("whitespace-pre-wrap",i),...u?.title,as:r||u?.title.as,title:l}):null,a?o(w,{size:u.descriptionSize,font:u.descriptionWeight,align:i,...p,children:a}):null]})})),S=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),T=[];function I(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=S,blocksRegistry:r={},ancestors:s=T}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:h(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const B=[],P=(e,{key:t,ancestors:n=B,slotName:l=null,extraProps:a,renderProps:i=I,...r})=>{const s=a?(e,t)=>I(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||B,[r.parent,l]]:n},a)))};function M({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?P(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function R(){return R._impl()}R._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),R.setup=e=>{R._impl=e};const V=["CDN","BASE_PATH"],D=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return V.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),z=e=>Boolean(e?.includes(":")),A=(e,t)=>Boolean(e&&!z(e)&&(!t||"_self"===t)),$=e=>Boolean(e?.startsWith("#")),j=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),_=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),L=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var O=Object.freeze({__proto__:null,isURL:z,isLocalURL:A,isHash:$,withoutQuery:j,joinPath:_,hasPrefix:L});const F="/api/",E=`${F}v1/storage`,U=e=>(t,n)=>{if([!t,z(t),$(t),[D.CDN,F].some((e=>L(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${E}/${t}/attachment`;const l=t?.startsWith("/");return _(L(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},q=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const d=R(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,u=U(d)(_(D.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:u,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(X,{className:e,children:c("svg",{className:h(K(r),W[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:u,xlinkHref:u})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},K=e=>e?"":"w-full h-full",X=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Y=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function G(e=""){try{const[,...t]=new URL(e).pathname.split("/");return`/${t.filter(Boolean).join("/")}`}catch(e){return""}}const Q=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":G(Y.SITE_URL);return t&&!z(t)?U(e)(t,n):t},J=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Z=d((({className:e="",image:t,imageClassName:n=""})=>{const l=R();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(J).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:Q(l)(e),type:te(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:Q(l)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:h("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),te=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(q,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(Z,{className:e,imageClassName:n,image:t}):null)),le={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},re="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" ");const ce=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}},de=()=>({open:(e,t={})=>ce.fire("dialog",{type:"open",dialog:e,...t}),close:()=>ce.fire("dialog",{type:"close"}),closeAll:()=>ce.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function he(){const e=G(Y.SITE_URL),t=R(),{closeAll:n}=de();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:me(l({...e,href:n}))}};function l({href:l,target:a,onClick:i}){return r=>{i&&i(r);const s=!L(l,e||"/");l&&!s&&A(l,a)&&(n(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(l,e)))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const ue=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},pe=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=xe(e)&&"hidden lg:block";return c("div",{className:h(ge(e),"flex gap-xs"),children:[l?o("div",{className:h(r,se[i]),children:l}):null,xe(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(r,se[i]),children:a}):null]})})),ge=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",xe(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},xe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),fe=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:l}),s=he()({onClick:r,href:l,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...ue(d),children:m}))),ve=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:fe({className:e,rounded:l,version:n}),children:a})));function Ne({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(be,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const we=()=>{const[e,t]=l(false);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",n)}}),[]),e},ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Ce=(e,{className:t,imageAlign:n})=>e?o("div",{className:h("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Se=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=we(),v=R(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=x&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Ne({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Ce(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[u,f]}),Ie(M({...b,extraProps:{className:"@container-normal"}})),Ce(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[Te(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Te=e=>h(e?"row-span-2":"@xl:row-span-2"),Ie=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Be=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pe=d((e=>{const{__html:t="",richVersion:n="",itemSize:l="list-m",isDotted:a=!0}=e,i=a?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(n,l,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Me=(e,t)=>e?o(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Re=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),Ve=(e,t)=>e?o(Re,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,De=(e,t)=>["label"in e?Ve(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Me(e.description,t)},String(t)):null,"__html"in e?o(Pe,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Be(n.icon,t):null,o("div",{children:De(n)})]}))),Ae=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(ze,{benefitsVersion:t,...e},String(n))))}):null)),$e=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(De)}):null)),je=d((({isTabularBenefits:e,...t})=>o(e?$e:Ae,{...t}))),_e=e=>Boolean(e?.src||e?.icon),Le=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(Oe(n))}):null,Oe=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Fe(a,r),d=Fe(i,r);return l||a?.icon?o(be,{className:h("basis-full @lg:basis-auto",e),appendLeft:Ee({...a,iconVersion:c}),appendRight:Ee({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Fe=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Ee=e=>_e(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ue=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),We=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(qe)}):null)),qe=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Re,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ue(2)(t)," ",n||"₽"]}):null]},String(l)),He=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ke)}):null)),Ke=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Re,{size:"text-m",font:"font-light",children:e})},String(t)),Xe={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Ye=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(ne,{image:y}):null,P=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Se,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Ge(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Le(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?o(je,{benefitsVersion:s,isTabularBenefits:d,benefits:M}):null,u?o(Pe,{richVersion:p,__html:u,isDotted:m,itemSize:Xe[i]}):null,T,x?.length?o(We,{priceList:x}):null,Qe(f)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},Qe=e=>e?.length?o(He,{tags:e}):null,Je=e=>Boolean(e&&Array.isArray(e)),Ze=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),et=(e,t)=>{return n=e,Boolean(Ze(n)&&"string"==typeof n.$ref)?t.ref(e):Ze(e)?t.record(e):Je(e)?t.array(e):t.scalar?t.scalar(e):e;var n},tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(nt,e),nt=(e,t)=>e&&t?Ze(e)?e[t]:Je(e)?e[parseInt(t,10)]:e:e,lt=(e,t)=>et(e,{ref:({$ref:e,...n})=>lt(e?tt(t(e),e):n,t),record:e=>Object.entries(e).map((([e,n])=>({[e]:lt(n,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>lt(e,t)))}),at=(e,t,n=[])=>{et(e,{ref:e=>t(e.$ref,n),record:e=>{for(const l in e)at(e[l],t,[...n,l])},array:e=>{for(let l=0;l<e.length;l++)at(e[l],t,[...n,l])}})};async function it(e,t){try{return e?await rt(e,t):null}catch(e){console.error(e)}return null}const rt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),st=e=>[...new Set(e)],ot={},ct=["/portal-resources"],dt=(e,t)=>lt(e,(e=>t?.[e])),mt=(e,t)=>{const n=(e=>{const t=[];return at(e,(e=>t.push(e))),t})(e),[i,r]=l({});return a((()=>{n.length&&(async e=>Object.fromEntries((await Promise.allSettled(st(e).filter((e=>!ct.some((t=>e.startsWith(t))))).map((async e=>[e,ot[e]||=await rt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(n).then(r)}),[n.join()]),n.length?dt(e,{...t,...i}):e};function ht(e,t={}){const n=d((t=>{const n=mt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const ut=ht((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(Ye,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),pt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>gt(0,t?.length)),[t]),l=t?.[n];return l?o(ut,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(x,{})})})),gt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),xt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},ft=e=>e?.replace(/[^+\d]/g,"");function bt(){return{send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:n,...Nt(l,g),...wt(i,g),...yt(a),...vt(s,"desiredMeetingDate"),...g?vt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...kt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});if(!e?.ok)return null;return await e.json()}catch(e){return null}}}}const yt=e=>e?{phone:ft(e)}:{},vt=(e,t="birthday")=>e?{[t]:xt(e)}:{},Nt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),wt=(e,t=!0)=>({[t?"email":"mail"]:e}),kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:ft(e)}:{},Ct=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e)t[l??""]?.(n,a)},St="rshb-query-params";function Tt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(St)||"";return e&&globalThis.sessionStorage?.setItem(St,e),e}function It(e){if(!e)throw new Error("Value should be fulfilled");return e}const Bt=e=>t=>{const[,n]=It(e.find((([e])=>e(t))));return n(t)},Pt=e=>Bt(e.map((([e,t])=>[e,()=>t])));Pt.if=e=>new Mt(void 0,e);class Mt{parent;predicate;unit;get entry(){return[It(this.predicate),It(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Mt(this,e)}then(e){return new Mt(this.parent,this.predicate,e)}else(e){return Bt([...Rt(this),[()=>!0,e]])}}const Rt=e=>[...e?.parent?Rt(e.parent):[],e.entry],Vt=e=>{const t=e.target?.closest("a");if(z(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=Tt();if(!z(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;if(n){Dt(t?.target)?.(n)}}},Dt=Pt([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function zt(){return zt._impl()}zt._impl=()=>({forwardQuery:Vt}),zt.setup=e=>{zt._impl=e};const At=e=>e,$t=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=l(e),c=i(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return jt(t,n)?t:n}:r(e)):o,[r]);a((()=>{r&&o(r)}),[r]);const[d,m]=l(!1),[h,u]=l({}),p=i(((e,t)=>{const{parse:n=At,format:l=At}=t||{};return{value:l(s[e]),isDirty:d||h[e],onChange:t=>{c((l=>({...l,[e]:n(t)}))),u((t=>({...t,[e]:!0})))}}}),[c,d,h]),g=i((e=>{c(e),u(e)}),[]),x=i((()=>{c(e),m(!1),u({})}),[e]),f=i((e=>{e.preventDefault(),t?x():m(!0),n&&n(s,e)}),[n,s]);return[s,{isDirty:d||Object.values(h).some(Boolean),field:p,update:g,reset:x,onSubmit:f}]},jt=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),_t=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})})),Lt=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Ot=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Ft=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],Et=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Ut="/api/v1/outservice/outserviceregions",Wt=e=>"OUTSERVICE"===e?Ut:void 0,qt=e=>o("div",{className:"h-6",children:e?o(Re,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Ht=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Kt="appearance-none w-5 h-5 border-solid flex-none",Xt=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Yt=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Ht,{paths:Xt,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:h("flex items-center relative group/box",Qt(l)),onClick:s,children:[o("div",{className:h(Kt,"m-0",a?"rounded-full border-2":Zt(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Jt(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,Gt(n)]})})})),Gt=e=>e?o("div",{className:"ml-s",children:o(Re,{size:"text-l",font:"font-light",children:e})}):null,Qt=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Jt=(e=!1)=>e?"radio":"checkbox",Zt=(e=!1)=>h("rounded border",{"bg-primary-main":e}),en=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:h("shrink-0",e),children:[o(Yt,{text:t,value:n,disabled:a,onChange:r},l),qt(i)]})));function tn(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}function nn(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function ln(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return nn(globalThis.document,"click",n),t}const an=()=>{},rn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",sn=e=>e?o(Re,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,on=d((({key:e,className:t="",id:n,name:l,type:r="text",label:d,placeholder:m,value:u="",valid:p=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&w.current?.focus()}),[v,w]);const C="w-full border rounded-md text-primary-text outline-none p-m",S=g?"pr-3xl":"",T=cn(p);return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[sn(d),N?o("textarea",{className:h("block resize-y min-h-24",C,T),id:h("textarea",n),name:l||n,placeholder:m,value:u,onChange:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:h("h-14",C,S,T),ref:w,id:n,name:l||n,placeholder:m,value:u,onChange:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),cn=e=>e?rn:"border-error",dn=e=>(e?.suggestions||[]).map((e=>({...e,processedValue:e?.value}))),mn={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"}},hn=()=>({open:(e,t)=>ce.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>ce.fire("popup",{type:"update",popup:e,...t}),close:()=>ce.fire("popup",{type:"close"})}),un=d((({options:e,onChange:t})=>o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,n)=>o("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem",onMouseDown:()=>t(e.processedValue),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function pn({isOpen:e,value:t,name:n,onChange:c}){const d=s(t),m=s(t),[h,u]=l([]),p=hn(),g=mn[n],x=i((()=>{m.current=t,p.close()}),[t]),f=i((e=>{x(),m.current=e,c&&c(e)}),[x,c]),b=s(null),y=r((()=>async e=>{if(!g)return;const t=await(e=>{const{url:t,query:n,requestData:l={}}=e;return fetch(`/api/v1/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...l,query:n})}).then((e=>e.json())).then(dn)})({url:g.url,requestData:{...g?.requestData},query:e});t?.length&&u(t)}),[]),v=r((()=>((e,t=600)=>{let n;const l=(...a)=>{l.dispose(),n=setTimeout((()=>{e(...a)}),t)};return l.dispose=()=>{n&&clearTimeout(n)},l})(y,300)),[y]);return a((()=>{if(!e||!b.current||m.current===t)return void x();const n=b.current,{top:l,left:a,width:i,height:r}=n.getBoundingClientRect();t&&d.current!==t&&(v(t),d.current=t),p.update(o(un,{options:h,value:t,onChange:f}),{top:l+globalThis.scrollY+r,left:a,width:i})}),[e,h,t,f]),b}const gn=d((({className:e,label:t,value:n="",placeholder:l,error:a,errors:i,onChange:r=an,onBlur:s,isTextarea:d,type:m,name:u="",dadata:p=!1})=>{const[g,{setFalse:x,setTrue:f}]=tn(),b=ln(x),y=pn({isOpen:g&&p,name:u,value:n,onChange:r});return c("div",{className:h("shrink-0 w-full",e),ref:b,onBlur:x,onFocus:f,children:[o("div",{ref:y,children:o(on,{type:m||"text","aria-label":t,label:xn(i,t),valid:Boolean(!a),value:n,onChange:r,onBlur:s,isTextarea:d,placeholder:fn(l,i,t)})}),qt(a)]})})),xn=(e,t)=>t&&e?`${t}*`:t,fn=(e,t,n)=>t&&!n?`${e}*`:e,bn=e=>e?.text||e?.key||"",yn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,vn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:yn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:bn(e)}),o(q,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:h("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const Nn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:u="",isSearch:p=!1,iconVersion:g="black",onChange:x,disabled:f})=>{const[b,{setFalse:y,setTrue:v}]=tn(),[N,w]=l(""),k=f||0===n.length,C=b&&!k,S=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=hn(),h=i((()=>{m.close(),c&&c()}),[c]),u=i((e=>{h(),r&&r(e)}),[h,r]),p=s(null),g=ln(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(vn,{popupRef:g,options:t,value:n,query:l,onChange:u,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,u]),p}({isOpen:b,options:n,value:r,query:N,onChange:x,onClose:S,iconVersion:g});return c("div",{className:h("space-y-xs",e),children:[sn(t),c("div",{className:h("relative",C?"z-20":"z-10"),ref:T,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",kn(m,d,k)),onClick:C?S:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:bn(r)||u}),wn(C,g)]}),p&&C?o("div",{className:h("absolute top-0 w-full z-20"),children:o(on,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),wn=(e,t)=>o(q,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),kn=(e,t,n)=>h(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Cn=d((({className:e="",label:t,error:n,...l})=>c("div",{className:e,children:[o(Nn,{...l,valid:!n,label:l?.errors?`${t}*`:t}),qt(n)]}))),Sn=e=>!e?.length,Tn=e=>t=>n=>e(n)?[]:[t],In="Некорректно заполненное поле",Bn=Tn((e=>null!=e&&""!==e))(In),Pn=Tn((e=>e?.key&&""!==e?.key))(In),Mn=Tn((e=>"string"==typeof e&&e.length>1))(In),Rn=Tn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(In),Vn=(Dn=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Tn((e=>"string"==typeof e&&Dn.test(e))))(In);var Dn;const zn=Tn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),An={typeForm:Bn,surname:Mn,name:Mn,region:Pn,addressBranch:Pn,phone:Vn,secondaryPhone:Vn,birthday:Bn,email:Bn,fullName:Mn,inn:Rn,partnerComments:Bn,collectionCount:Bn,comment:Bn,acquiringType:Pn,feedbackType:Pn,feedbackMethod:Pn,serviceType:Pn,serviceDirection:Pn,meetingDay:Bn,product:Bn,localities:Bn,consentDataProcessing:zn,annualRevenue:Bn,consentToReceiveMaterials:zn,processPersonalDataLeadFlg:zn,consentProviderFlg:zn,consentPhotoFlg:zn,consentPfrFlg:zn,consentAssignmentClaimsFlg:zn,consentCollectionFlg:zn,consentInformFlg:zn},$n=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,An?.[e]])))},jn=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},_n=(e,t,n=!1)=>n?jn(e,t):e,Ln=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],On=d((({field:e,input:t})=>o(Cn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ln,..._n(e("acquiringType"),An.acquiringType,t?.required)}))),Fn=(e="")=>Boolean("trade"===e||"all"===e),En=e=>null!=e,Un=new Map,Wn=e=>Boolean(e?.every((e=>Array.isArray(e)?Wn(e):!e||"string"==typeof e))),qn=e=>Wn(e)?e.toString():"";function Hn(e,t,{fallback:n,cache:i}={}){const s=r((()=>Kn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(En))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=Un)=>n=>{const l=qn(n),a=t.get(l);if(l&&En(a))return a;const i=e(...n);return l&&En(i)&&t.set(l,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Kn(e){return Array.isArray(e)?e:e instanceof Function?Kn(e()):[e]}const Xn=[];const Yn=async e=>await it(e,{method:"GET"})||Xn;function Gn(){const{data:e}=Hn("/api/v1/branchesByRegions",rt);return Array.isArray(e)?e:[]}const Qn=d((({field:e,input:t,isPremium:n=!1})=>{const l=e("region"),i=l?.value?.key,r=l?.value?.text,s=n?Gn()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=Hn(e?`/api/v1/branches?regionCode=${e}`:null,Yn);return t||Xn}(i)?.filter((e=>e?.address));return a((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(Cn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),..._n(e("addressBranch"),An.addressBranch,t?.required),isSearch:!0})})),Jn=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},Zn=(e,t,n)=>Math.max(t,Math.min(e,n));function el(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function tl({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:i,onChange:t=>{const n=el(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const nl=1,ll=100,al=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:nl),max:s=(a.length?a.length-1:ll),step:d=1,value:m=a[0]||r,disabled:u=!1,onChange:p}=e,g=Jn(e,{normalize:(e=0)=>a.length?il(a)(e):Zn(e,r,s),format:Ue()}),x=i((e=>{p&&p(el(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",rn,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:x,...g}),tl({list:a,min:r,max:s,step:d,disabled:u,value:m,onChange:p})]}),rl(l)]})})),il=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),rl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),sl=["От 1 000 ₽","До 1 000 000 000 ₽"],ol=d((({field:e})=>o(al,{title:"Сумма, ₽",items:sl,min:1e3,max:1e9,...e("amount")}))),cl=d((({field:e,input:t})=>o(gn,{label:"Годовая выручка, ₽",..._n(e("annualRevenue"),An.annualRevenue,t?.required)}))),dl=d((({field:e})=>o(gn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),ml=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>n)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=hl(t,e),c=ul(t,i,r);h.push(o("td",{children:o("div",{className:pl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},hl=(e,t)=>t&&e.toDateString()===t.toDateString(),ul=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),pl=(e,t)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),gl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],xl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=an,setValue:d=an})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:h,totalDays:u}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:gl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:ml({firstDayOfWeek:h,today:e,totalDays:u,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:m})})]})})),fl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],bl=fl.map((e=>({key:e}))),yl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),vl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Nl={className:"min-w-32",iconVersion:"black",isBorder:!1},wl=d((({className:e="",label:t="",value:n,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:u}]=tn(!1),[p,g]=l(n?.getMonth()||(new Date).getMonth()),[x,f]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:C,ref:S}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=ln(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>l(fl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:bl,yearsOptions:yl,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:u,selectedYear:x,selectedMonth:p,showCalendar:m});return c("div",{className:h("space-y-xs",e),ref:S,children:[sn(t),c("div",{className:"relative",children:[kl(C,n,a),m?c("div",{className:"absolute bg-white z-20 select-none bottom-full",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(q,{...vl,className:"-rotate-90 cursor-pointer"})}),o(Nn,{onChange:v,value:{key:fl[p]},options:w,...Nl}),o(Nn,{onChange:N,value:{key:String(x)},options:k,...Nl}),o("div",{className:"my-auto",onClick:y,children:o(q,{...vl,className:"rotate-90 cursor-pointer"})})]}),o(xl,{today:n,currentMonth:p,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),kl=(e,t,n)=>c("div",{onClick:e,className:h("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error"),children:[o(w,{children:t&&xt(t)}),o(q,{...vl,name:"CalendarIcon"})]}),Cl=d((({className:e,label:t,error:n,...l})=>c("div",{className:h("shrink-0 w-full",e),children:[o(wl,{label:t&&l?.errors?`${t}*`:t,valid:Boolean(!n),...l}),qt(n)]}))),Sl=d((({field:e,input:t})=>o(Cl,{label:"Дата рождения",..._n(e("birthday"),An.birthday,t?.required)}))),Tl=d((({field:e,input:t})=>o(gn,{label:"Количество объектов инкассации",type:"number",..._n(e("collectionCount"),An.collectionCount,t?.required)}))),Il=d((({field:e,input:t})=>o(gn,{className:"col-span-2",..._n(e("comment"),An.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Bl=d((({field:e,input:t})=>o(en,{text:"Прочие согласия (согласие на уступку прав требований)",..._n(e("consentAssignmentClaimsFlg"),An.consentAssignmentClaimsFlg,t?.required)}))),Pl=d((({field:e,input:t})=>o(en,{text:"Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)",..._n(e("consentCollectionFlg"),An.consentCollectionFlg,t?.required)}))),Ml=d((({field:e,input:t})=>o(en,{text:"Согласие на информирование о продуктах и услугах Банка",..._n(e("consentInformFlg"),An.consentInformFlg,t?.required)}))),Rl=d((({field:e,input:t})=>o(en,{text:"Прочие согласия (согласие на фотографирование)",..._n(e("consentPhotoFlg"),An.consentPhotoFlg,t?.required)}))),Vl=d((({field:e,input:t})=>o(en,{text:"Согласие об использовании простой электронной подписи",..._n(e("consentProviderFlg"),An.consentProviderFlg,t?.required)}))),Dl=d((({field:e,input:t})=>o(en,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",..._n(e("consentToReceiveMaterials"),An.consentToReceiveMaterials,t?.required)}))),zl=d((({field:e,input:t})=>o(Cl,{label:"Дата рождения",..._n(e("birthday"),An.birthday,t?.required)}))),Al=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(gn,{label:"Электронная почта",..._n(e("email"),An.email,n),...l})})),$l=d((({field:e,input:t})=>o(Cn,{label:"Способ получения ответа",options:Et,..._n(e("feedbackMethod"),An.feedbackMethod,t?.required)}))),jl=d((({field:e,input:t})=>{const n=e("feedbackType");return a((()=>{"FEEDBACK"===n?.value?.key&&e("serviceDirection")?.onChange?.(Ot[0])}),[n?.value]),o(Cn,{label:"Тема",placeholder:"Выберите тему",options:Ft,..._n(n,An.feedbackType,t?.required)})})),_l=d((({field:e,input:t})=>o(gn,{label:"ФИО",..._n(e("fullName"),An.fullName,t?.required),...t}))),Ll=d((({field:e,input:t})=>o(gn,{label:"ИНН",type:"number",..._n(e("inn"),An.inn,t?.required)}))),Ol=d((({field:e})=>o(en,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'})));function Fl(e="/api/v1/regions"){const{data:t}=Hn(e,rt);return Array.isArray(t)?t:[]}const El=d((({field:e,input:t})=>{const n=e("region")?.value?.key,l=Fl(Ut)?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(Cn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:l,..._n(e("localities"),An.localities,t?.required),isSearch:!0})})),Ul=d((({field:e,input:t})=>o(gn,{label:"Отчество (Обязательно, при наличии)",...e("middleName"),...t}))),Wl=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(gn,{label:"Имя",..._n(e("name"),An.name,n),...l})})),ql=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:h("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Hl=d((({field:e})=>Fn(e("acquiringType")?.value?.key)?o(ql,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Kl=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(gn,{..._n(e("partnerComments"),An.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...l})})),Xl=e=>"_"===e,Yl=e=>/\d/.test(e),Gl=e=>Xl(e)||Yl(e),Ql=[..."+7 (___) ___-__-__"],Jl=Ql.findIndex(Xl),Zl=Ql.map(((e,t)=>Gl(e)?Ql.slice(0,t).filter(Gl).length:-1));const ea=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=Ql.map(((e,n)=>Yl(e)?e:t.charAt(Zl[n])||e)),l=Zl.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(Jl,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&(t&&t(""))}),[]);return o(on,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),ta=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:h("shrink-0 w-full",e),children:[o(ea,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),qt(l)]}))),na=d((({field:e,input:t})=>o(ta,{label:"Телефон",..._n(e("phone"),An.phone,t?.required)}))),la=d((({field:e})=>Fn(e("acquiringType")?.value?.key)?o(ql,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),aa=d((({field:e,input:t})=>o(en,{text:"Согласие на обработку персональных данных",..._n(e("processPersonalDataLeadFlg"),An.processPersonalDataLeadFlg,t?.required)}))),ia=ht((({field:e,source:t})=>o(Cn,{placeholder:"Выберите продукт",label:"Продукт",options:ra(t?.productList),...jn(e("product"),An.product)}))),ra=e=>(e??[]).map((e=>({key:e,value:e}))),sa=d((({field:e,input:t,url:n})=>{const l=Fl(n);return o(Cn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),..._n(e("region"),An.region,t?.required)})})),oa=d((({field:e,input:t})=>{const n=Gn(),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(Cn,{label:"Регион",placeholder:"Выберите регион",options:l,..._n(e("region"),An.region,t?.required)})})),ca=d((({field:e})=>{const t=e("secondaryPhone");return o(ta,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?jn(t,An.secondaryPhone):t})})),da=d((({field:e,input:t})=>o(Cn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Ot,..._n(e("serviceDirection"),An.serviceDirection,t?.required)}))),ma=d((({field:e,input:t})=>o(gn,{label:"Фамилия",..._n(e("surname"),An.surname,t?.required),...t}))),ha=["От 1 мес","До 15 лет"],ua=d((({field:e})=>o(al,{title:"Срок, месяцев",items:ha,min:1,max:180,...e("term")}))),pa=d((({field:e,input:t})=>o(Cn,{label:"Тип обслуживания",options:Lt,..._n(e("serviceType"),An.serviceType,t?.required)}))),ga=d((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:h(rn.split(" ").filter((e=>"rounded"!==e)),Kt,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Re,{color:"text-primary-text",children:t}):null]})}))),xa=["currencyControl","documentOperations","conversionTransactions","otherIssues"],fa=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(ga,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:n}),o(ga,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:n}),o(ga,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:n}),o(ga,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:n})]})}));const ba={$ref:"/wcms-resources/outservice-productlist.json"},ya=(e,t)=>(n,l)=>{const a="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,i={surname:o(ma,{field:e,input:n}),name:o(Wl,{field:e,input:n}),middleName:o(Ul,{field:e,input:n}),phone:o(na,{field:e,input:n}),email:o(Al,{field:e,input:n}),fullName:o(_l,{field:e,input:n}),inn:o(Ll,{field:e,input:n}),comment:o(Il,{field:e,input:n}),addressBranch:o(Qn,{field:e,input:n,isPremium:a}),birthday:o(Sl,{field:e,input:n}),desiredMeetingDate:o(zl,{field:e,input:n}),product:o(ia,{field:e,source:ba}),localities:o(El,{field:e,input:n}),isClient:o(Ol,{field:e}),partnerComments:o(Kl,{field:e,input:n}),collectionCount:o(Tl,{field:e,input:n}),acquiringType:o(On,{field:e,input:n}),onlineCheckout:o(Hl,{field:e}),posTerminal:o(la,{field:e}),serviceType:o(pa,{field:e,input:n}),term:o(ua,{field:e}),amount:o(ol,{field:e}),annualRevenue:o(cl,{field:e,input:n}),vedTypes:o(fa,{field:e}),feedbackType:o(jl,{field:e,input:n}),feedbackMethod:o($l,{field:e,input:n}),serviceDirection:o(da,{field:e,input:n}),bankEmpolee:o(dl,{field:e}),secondaryPhone:o(ca,{field:e}),consentToReceiveMaterials:o(Dl,{field:e,input:n}),processPersonalDataLeadFlg:o(aa,{field:e,input:n}),consentProviderFlg:o(Vl,{field:e,input:n}),consentPhotoFlg:o(Rl,{field:e,input:n}),consentAssignmentClaimsFlg:o(Bl,{field:e,input:n}),consentCollectionFlg:o(Pl,{field:e,input:n}),consentInformFlg:o(Ml,{field:e,input:n}),applicationDate:o(gn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),consentPfrFlg:o(en,{text:"Согласие на запрос в ПФР",...e("consentPfrFlg")}),region:a?o(oa,{field:e}):o(sa,{field:e,input:n,url:Wt(t)})};return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:n,field:e})?o("div",{children:i[n?.name]},String(l)):null},va=e=>2===e?"@xl:grid-cols-2":"",Na=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Re,{size:"text-h6",children:e})}):null;function wa({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const ka={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active"},Ca={primary:h("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:h("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},Sa=d((({children:e,...t})=>{const n=e=>({...e,onClick:me(wa(e))}),{className:l,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=n(t);return o("button",{className:h("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":h(ka[a],Ca[a]),l),type:s,role:d,onClick:m,children:e})})),Ta=d((({className:e,onClose:t})=>o("button",{className:h("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(q,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),Ia=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:h("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Ta,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),Ba=d((function({responseType:e,typeForm:t}){const n="OK"===e,l=n?"ResponseOKIcon":"ResponseFailIcon",{close:a}=de(),r=i((()=>{a()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Ia,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:l,iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Sa,{type:"button",onClick:r,children:"Хорошо"})]})})})),Pa=e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Ba,{...e}),n),close:n}},Ma=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Ra=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,feedbackType:o,vedTypes:c,region:d,...m}=e,h=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Fn(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...m,...Da(c),...Va(d),...h?{partnerComments:h}:{},...s?{typeForm:s}:{},...o?{typeForm:o}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Va=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Da=e=>e?{vedTypes:Object.fromEntries(xa.map((t=>[t,t===e])))}:{},za={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Ln[0],serviceType:Lt[0],feedbackType:Ft[0],feedbackMethod:Et[0],serviceDirection:Ot[0],vedTypes:xa[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Aa=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Re,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Re,{children:t.text})}):null]}))),$a=(e,t)=>o(Sa,{className:h("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ja=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Yt,{...e}),o(Aa,{link:t})]}),qt(jn(e,zn).error)]}):o(Aa,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),$a(n)]}),_a=bt(),La=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:u,isContacts:p,data:g,...x})=>{const f=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||za[e.name]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=Lt[1]),{...n,typeForm:{key:t,text:""}}})(f,n),[y,v]=l(""),w=i((async(e,t)=>{const l=Oa(f,e),a=Ma($n(l));if(!Sn(a(e)))return"Fail";const i=Ra({...e,...u}),r=await _a.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){Pa({responseType:r,typeForm:n}).open()}if("OK"===r&&g){const e=zt();Ct({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:C,reset:S}]=$t(b,{onSubmit:w}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(f)?.name;return a((()=>{"OK"===y&&(v(""),S())}),[y]),c(_t,{className:h("container space-y-m",e),title:t,...x,children:[c("form",{onSubmit:C,children:[r.map(((e,t)=>c("div",{className:h(va(e.columns),"grid gap-x-m"),children:[Na(e.title),(e?.inputs||[])?.map(ya(k,n))]},`section-${t}`))),ja(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),Oa=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const l=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):n===(l?.key??l)})))),Fa=["processPersonalDataLeadFlg","consentProviderFlg","consentPfrFlg","consentPhotoFlg","consentAssignmentClaimsFlg","consentCollectionFlg","consentInformFlg","consentToReceiveMaterials"],Ea=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Ua={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Ln[0],serviceType:Lt[0],feedbackType:Ft[0],feedbackMethod:Et[0],serviceDirection:Ot[0],vedTypes:xa[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataLeadFlg:!1,consentProviderFlg:!1,consentPhotoFlg:!1,consentAssignmentClaimsFlg:!1,consentCollectionFlg:!1,consentInformFlg:!1},Wa=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Ua[e.name]]))),typeForm:{key:t,text:""}}),qa=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const Ha=d((({className:e="",isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),Ka=d((({inputs:e=[],typeForm:t="",field:n,key:l})=>{const a=e.every((e=>Boolean(n(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(_n(n(e?.name),An[e?.name],e?.required))))),[e]);return o("div",{className:"w-fit",children:o(qa,{isFoldButtonOnTop:!0,renderFoldableSection:({isUnfolded:l})=>o(Ha,{isUnfolded:l,className:"flex flex-col pl-2xl",children:e.map(ya(n,t))}),renderFoldButton:Xa(c("div",{children:[o(Yt,{value:a,onChange:t=>{for(const l of e){const e=n(l.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},l),qt(i?"Отметьте все обязательные соглашения":"")]}))})})})),Xa=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",children:o(q,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),Ya=(e,t)=>o(Sa,{className:h("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Ga=bt(),Qa=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,endpoint:d,...m})=>{const u=r?.flatMap((e=>e?.inputs))||[],p=Wa(u,n),[g,x]=l(""),f=i((async e=>{const t=Ma($n(u));if(!Sn(t(e)))return"Fail";const l=(e=>{const{region:t,...n}=e,l={...n,...Ea(t)};return Object.fromEntries(Object.entries(l)?.map((([e,t])=>[e,t?.key||t])))})(e),a=await Ga.send(l,"lead"===d)?"OK":"Fail";if(x(a),a){Pa({responseType:a,typeForm:n}).open()}return a}),[]),[,{field:b,onSubmit:y,reset:v}]=$t(p,{onSubmit:f});return a((()=>{"OK"===g&&(x(""),v())}),[g]),o(_t,{className:h("container space-y-m",e),title:t,...m,children:c("form",{onSubmit:y,className:"space-y-m",children:[r.map(((e,t)=>c("div",{className:h(va(e.columns),"grid gap-x-m"),children:[Na(e.title),Ja({field:b,typeForm:n,inputs:e?.inputs})]},`section-${t}`))),Ya(s)]})})})),Ja=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:l,restInputs:a}=Za(n||[]);return l.length>2?c("div",{children:[a.map(ya(e,t)),o(Ka,{inputs:l,field:e})]}):(n||[])?.map(ya(e,t))},Za=e=>({consentInputs:e?.filter((e=>Fa.includes(e.name)))||[],restInputs:e?.filter((e=>!Fa.includes(e.name)))||[]}),ei=d((({title:e,description:t})=>{const n=we();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),ti=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",ni=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function li(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:ai(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}function ai(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const ii=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:a,children:r,onIntersection:s})=>{const c=li(i((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),a);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:c,role:"listitem",children:r})})),ri=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],si=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),x&&x(ci(n))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?oi(c,v):{},...N?ni(u):{},gap:`${r}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(C=(e,n)=>o(ii,{className:h(m,a?ri[a-1]:"",{"h-full":N},t),style:w?oi(c/4):{},activeIndex:l,idx:n,observerOptions:f,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(C):C(e,0))(p)});var C})),oi=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),ci=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),di={"horizontal-list":"w-6","vertical-list":"h-6"},mi=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?di[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),hi=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:h("text-secondary-text font-light",s),children:n?.description})]},String(l))},ui=e=>e,pi=(e=ui)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),gi=pi(),xi=(e=ui)=>pi((t=>-e(t))),fi=xi(),bi=e=>t=>e.scrollWidth/t,yi=e=>(t,n)=>{e.scrollBy({left:n*bi(e)(t),behavior:"smooth"})},vi=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[xi()(a),pi()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;n.current&&(m?yi(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(h?yi(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Ni={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},wi=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=we(),[u,p]=vi({itemCount:s.length}),g=ki(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const x=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(si,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(hi({activeIndex:t,onClick:x}))}):n?o("div",{className:h("flex gap-xs",Ni[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(mi({activeIndex:t,onClick:x,listType:l}))}):null})),ki=(e=!1)=>({behavior:e?"auto":"smooth"}),Ci=d((({className:e,disabled:t,...n})=>o(be,{rounded:!0,className:h("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e),disabled:t,...n,children:o(ne,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),Si=d((e=>o(Ci,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Ti=d((e=>o(Ci,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Ii="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Bi=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?Pi(t):null,i?o(Si,{className:h(Mi(a),m?"left-1":"left-0"),onClick:s}):null,r?o(Ti,{className:h(Mi(a),m?"right-1":"right-0"),onClick:d}):null]})})),Pi=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(Ii,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(Ii,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Mi=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),Ri=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:x,navButtons:f})=>{const b=Array.isArray(g)?g.length:0,[y,v]=vi({itemCount:b,onVisibleIndicesChange:x}),[N]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===i?"relative h-full":""),children:[o(si,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(Bi,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(wi,{className:h(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),Vi=({blocksToRender:e,...t})=>o(Ri,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:h("relative min-w-80",ti(!0)),children:I(e,t)},String(n))})}),Di=e=>e%2!=0,zi=d((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,role:r,...s})=>c(n,{tag:n,className:h("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:l,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Ai=d((({className:e="",label:t,icon:n,dataTheme:l="pc",disabled:a=!1,onClick:i})=>o(zi,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",role:"button",className:h("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Re,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),$i=({isUnfolded:e,onToggle:t})=>o(Ai,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),ji=["ArrowDownIcon","ArrowUpIcon"],_i="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Li=({topItemsCount:e=0,label:t="",block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]];return c("div",{className:h("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:h(_i),children:[P(i,{...a.options,parent:n}),Di(i.length)?o(pt,{className:"col-span-6",...a}):null]}),o(qa,{renderFoldableSection:({isUnfolded:e})=>c(Ha,{className:h(_i),isUnfolded:e,children:[P(r,{...a.options,parent:n}),Di(r.length)?o(pt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:l})=>o(Ai,{className:h({hidden:e<1}),disabled:!r?.length,label:t,icon:ji[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:l})})]})},Oi=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[Fi(n,t),Li({...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[Fi(n,t),Vi({...l,blocksToRender:t})]});default:return null}})),Fi=(e,t)=>e&&!t.length?o(ei,{...e}):null,Ei=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),Ui=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(ql,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),Wi=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,Ei(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(qi(l)).filter(Boolean))]}),n?o("div",{children:o(Sa,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),qi=e=>([t,n])=>{const l=n?.type;return"array"===l?Hi(t,e)(n):null},Hi=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(Ui,{items:l,multiple:!n?.single,...t(e)})]},e)};function Ki(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Xi=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Yi=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Xi(t[e])||Xi(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Xi(t[e])||Xi(n[e])||Gi(t[e])<=Gi(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Xi(t[e])||Xi(n[e])||Gi(t[e]?.min)>=Gi(n[e]?.min)&&Gi(t[e]?.min)<=Gi(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Xi(t[e])||Xi(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Xi(t[e])||Xi(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Gi=e=>Number(e||0),Qi=(e,{block:t,page:n,normalize:l=At})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=$t(e),d=r((()=>Ki(a,a.map((e=>dt(e.content,n?.fallback))))),[a,n?.fallback]),m=i===e?a:((e,t)=>(n=At)=>e?.filter((([,e])=>Yi(t,n(e)||{}))).map((([e])=>e)))(d,i)(l);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},Ji={},Zi={},er=ht((({className:e,filtrationSchema:t=Ji,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Qi(Zi,{block:a.block,page:a.options?.page}),d=o(Nn,{className:"w-64",label:n?.title,options:tr(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>tr(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Wi,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Sa,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(Oi,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),tr=e=>Ki(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),nr=(e=!1)=>e?"text-left":"text-center",lr={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},ar=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:h("rounded-icon object-fit flex justify-center items-center",lr[n],e),children:o(q,{...i,width:"54%",height:"54%",name:a})}):null})),ir=d((({className:e="",title:t,benefitList:n,...l})=>{const a=we();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(N,{headingType:"h3",as:"h2",className:nr(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(rr)}):null]})})),rr=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(ar,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ne,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Re,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Pe,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),sr=e=>({icon:t,title:n,description:l},a)=>c("div",{className:h("flex flex-col gap-1","items-center",{"justify-center":!l&&!n}),children:[n?o(Re,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,l?o(Re,{size:"text-h6",font:"font-normal",align:e,children:l}):null]},String(a)),or=(e,t,n)=>o("div",{className:`grid gap-2xs ${cr(t)}`,children:e.map(sr(n))}),cr=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},dr=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:h("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?or(e,l,t):null]}))),mr={start:"justify-start",center:"justify-center",end:"justify-end"},hr=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&h("flex",mr[n]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:Le(e)})})),ur=d((({className:e,title:t,children:n,...l})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),pr="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",gr="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",xr="flex flex-col gap-y-xl min-w-52",fr=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(Re,{size:"text-h3",children:"number"==typeof e?[l,Ue(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),br=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o(Re,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(fr,{value:n,...a}):o(Re,{size:"text-h3",children:"-"})]}))),yr=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,vr=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Re,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ue(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Nr=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(q,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),wr=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(Nr,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(vr,{title:e,rate:t,unit:n,fractionDigits:l,color:i,...s})}),o(br,{className:"@xl:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:i,...s}),r]}),kr=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(al,{items:e?[`От ${Ue(1)(l.min||0)} ${n}`,`До ${Ue(1)(l.max||0)} ${n}`]:[],step:t,...l}),Cr={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Sr={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Tr=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=Cr.prefMonthsNum,prefTravelBonusRate:i=Cr.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||Sr,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},Ir=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=$t({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:x}=Tr(r,n);return o(ur,{className:e,title:t,...i,children:c("section",{className:h(pr,e),children:[c("div",{className:gr,children:[kr({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),kr({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?wr({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:xr,children:[x>=0?o(br,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,Le(l,{isVertical:!0}),yr(a)]})]})})})),Br=Math.round(29.5),Pr=(e,t=0)=>e?.sum?e.sum:t,Mr=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Rr=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Vr={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Dr=d((({items:e,checkedItem:t,className:n,onChange:l,disabled:a=!1,orientation:i="horizontal"})=>o("div",{className:h(`flex ${Vr[i]}`,n),role:"radiogroup","aria-label":"Группа кнопок",children:e?.map((({id:e,text:n})=>o(Yt,{isRadio:!0,text:n,value:t===e,onChange:()=>l&&l(e),disabled:a},String(e))))}))),zr=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Re,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Re,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(Dr,{orientation:l,items:e,checkedItem:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),Ar=e=>zr({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),$r=" (c капитализацией)",jr=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:xr,children:[o(br,{title:`Доход в конце срока${i?$r:""}`,value:e,postfix:n,prefix:"+"}),o(br,{title:`Сумма в конце срока${i?$r:""}`,value:t,postfix:n}),Le(l,{isVertical:!0}),a?.map(yr)]}),_r=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Lr([e,t],l),Lr=([e,t],n=[])=>({[e]:n.length?fi(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?gi(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Or=(e,[t,n],l)=>e>=l[t]&&e<=l[n],Fr={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Er={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Ur=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?Fr[e?.rateType]:"",{data:n}=Hn(t?`/api/v1/depositrates/${t}`:null,rt);return Array.isArray(n)?n:[]}(t);if(n<=30)return{...Er,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&Wr(s,e)&&Or(l,["minSum","maxSum"],e)&&Or(n,["minDays","maxDays"],e)))||Er,{rate:m}=d,h=qr(m,e),u=l+h,p=c||[Er];return{...d,...Lr(["minSum","maxSum"],p),...Lr(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},Wr=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,qr=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},Hr=ht((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:u}]=$t({moneyValue:Pr(r,1e5),daysValue:Mr(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=Ur(m,s),{income:g,finalSum:x,rate:f,isUnavailableByTerm:b,depositeName:y}=p;return o(ur,{className:e,title:t,...d,children:c("section",{className:h(pr,e),children:[c("div",{className:gr,children:[kr({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(al,{items:[`От ${Rr(v.min||0)}`,`До ${Rr(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Kr(p,u),Ar({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),wr({rate:f,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),jr({income:g,finalSum:x,buttons:n,footnotes:[l,a]})]})});var v})),Kr=(e,t)=>c("div",{className:"space-y-s",children:[o(Re,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Yt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Yt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Xr=(e=[],t=!1)=>Yr([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Yr=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Gr=({min:e=0,max:t=0,availableMonths:n,...l})=>o(al,{items:[`От ${Qr(e)}`,`До ${Qr(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),Qr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Jr=e=>zr({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Zr=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(Zn(t?.[a],n.minMonths,n.maxMonths))},es=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},ts={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},ns=e=>ls({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ls({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&ls({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&ls({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ls=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],as=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[ts],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>ns({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=_r(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=_r(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>ns({row:e,userInputParams:t,paramsViewSettings:n})&&Or(l,["minSum","maxSum"],e)&&Or(a,["minMonths","maxMonths"],e)))||ts)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:h}=m,u=es(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:u}},is=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),rs={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},ss=ht((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(u=n?.rateRows,Yr([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],u));var u;const[p,{field:g}]=$t({moneyValue:Pr(s,2e5),monthsValue:Mr(s,Br),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),x=as(p,n,r),f=Jr({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(Zn(p.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(Zn(p.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!is(s)&&m&&Zr({field:g,defParams:m,calcParams:x,map:rs,monthsValue:"minMonths"})}),[n,s]),o(ur,{className:e,title:t,...d,children:c("section",{className:h(pr,e),children:[c("div",{className:gr,children:[kr({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),Gr({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),os({...x,...r},g),o("div",{className:"sm:hidden",children:f})]}),c("div",{className:h(xr,"@4xl:w-1/2"),children:[o(br,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(br,{title:"Ставка",value:x?.rate,fractionDigits:2,postfix:"%"}),o(br,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),Le(l,{isVertical:!0}),yr(i)]})]})})})),os=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Yt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Yt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Yt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Yt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),cs=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},ds={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},ms=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?ps(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[us({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),us({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),us({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),us({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,Or(l,["minSum","maxSum"],t),Or(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||ds,{rate:h}=m,u=hs(h,e),p=l+u,g=t||[ds];return{...m,...Lr(["minSum","maxSum"],g),...Lr(["minMonths","maxMonths"],g),availableMonths:cs(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:u,finalSum:p}},hs=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},us=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],ps=(e,t)=>e+Math.round((t-e)/2),gs=(e="rub")=>"rub"===e,xs=(e,t)=>{const{minMonths:n,maxMonths:l}=Lr(["minMonths","maxMonths"],vs(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:Zn(a,n,l)}},fs=(e,t)=>{const{minSum:n,maxSum:l}=Lr(["minSum","maxSum"],vs(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:Zn(a,n,l)}},bs=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),ys=e=>{const t=gs(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},vs=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},Ns=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?zr({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?zr({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),ws(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Ar({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},zr({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),ws(e.isShowNewClient),e.isShowNewClient?o(Yt,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},ws=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,ks={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Cs={text:"₽",key:"rub"},Ss=ht((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=n??{},p=u?.map((e=>e.currency))??[Cs],g=i((e=>t=>e?{...t,...ys(t),...fs(t,e),...xs(t,e),...bs(t,e)}:t)(u),[u]),[x,{field:f}]=$t({moneyValue:Pr(d,2e4),monthsValue:Mr(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:Cs},{normalize:g}),b=f?.("currency")?.value??Cs,y=f?.("isNewClient")?.value,v=vs(u,b),N=ms(x,v,s),{rate:w,income:k,finalSum:C,type:S=""}=N,T=i((()=>{Zr({field:f,defParams:Xr(v,y),calcParams:N,monthsValue:"minMonths",map:ks})}),[f,u]);a((()=>{!is(d)&&v&&T()}),[d,u]);const I=w===Xr(v,y)?.rate;return o(ur,{className:e,title:t,...m,children:c("section",{className:h(pr,e),children:[c("div",{className:gr,children:[c("div",{className:"flex gap-m",children:[kr({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...f("moneyValue"),value:N.moneyValue,postfix:b?.text,step:Ts(b?.key)}),u&&u?.length>1?o(Cn,{label:"Валюта",options:p,...f("currency")}):null]}),Gr({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...f("monthsValue"),value:N.monthsValue}),Ns({...N,...s},f)]}),wr({rate:w,children:Bs(T,I)}),jr({income:k,finalSum:C,buttons:[...l,Is(n?.buttons,S)],footnotes:[r],postfix:b?.text,isCapitalization:f("isMonthlyInterestPayment").value})]})})})),Ts=(e="")=>gs(e)?1e3:100,Is=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},Bs=(e,t=!1)=>t?null:o(Sa,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Ps=e=>Ms({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Ms({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Ms=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Rs={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Vs=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[Rs],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Ps({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=_r(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=_r(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Ps({row:e,userInputParams:t,paramsViewSettings:n})&&Or(l+r,["minSum","maxSum"],e)&&Or(i,["minSumOld","maxSumOld"],e)&&Or(r,["minSumExtra","maxSumExtra"],e)&&Or(a,["minMonths","maxMonths"],e)))||Rs)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=es(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},Ds=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=$t({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Vs(s,n,i),u=Jr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(ur,{className:e,title:t,...r,children:c("section",{className:h(pr,e),children:[c("div",{className:gr,children:[kr({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),kr({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Gr({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),zs({...m,...i},d),m.isExtraMoney?kr({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:u})]}),c("div",{className:h(xr,"@4xl:w-1/2"),children:[o(br,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(br,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(br,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(br,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:u}),Le(l,{isVertical:!0}),yr(a)]})]})})})),zs=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Yt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Yt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Yt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),As=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Jn(e,{normalize:(e=a)=>n&&l?String(Zn(Number($s(e)),n,l)):$s(e),format:Ue(r)}),d=i((e=>t&&t($s(e))),[t]);return o(on,{onChange:d,...s,...c})})),$s=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),js=d((e=>o(As,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Re,{size:"text-xl",font:"font-light",children:"₽"})})}))),_s={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Ls={amount:1500},Os=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=$t(Ls),[u,p]=l(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:_s[r],children:[o(js,{valid:!u,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(Sa,{className:"w-full mt-lg",type:"submit",disabled:u,children:i.text}):null]})]})})),Fs=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(q,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Es="relative h-full",Us={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Ws=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(Ks),r=n?{defaultPadding:"p-6xl pb-m"}:{};return M({...l,renderProps:(n,l,a)=>c("div",{className:qs(n,{someCardsHighlighted:i}),children:[I(n,l,{className:Hs(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),Ks(n)?Fs({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},qs=(e,{someCardsHighlighted:t})=>h(Es,t&&(Ks(e)?"pt-3xl":"pt-3xl sm:pt-16")),Hs=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>h(Es,"min-w-80",Us[l],t&&(Ks(e)?"pt-3xl sm:pt-16":"pt-3xl"),ti(n),n&&"h-full"),Ks=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Xs=ht((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(Ri,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?Ys(s?.block?.blocks):[],hasBlur:!0,children:Ws({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Ys=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Gs="z-10 border border-solid w-full h-full",Qs=h(Gs,"absolute hidden @xl:block border-transparent"),Js=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:h("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:h(Qs,"top-9 right-12 bg-green-dark")}),o("div",{className:h(Qs,"top-6 right-8 bg-green")}),o("div",{className:h(Qs,"top-3 right-4 bg-green-light")}),c("div",{className:h(Gs,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Le([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Zs={black:"bg-black",white:"bg-white"},eo=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Se,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:Le([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Re,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(to)]}):null,a?c(Re,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),to=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Zs[e]}`},String(t)),no=d((({icon:e,...t})=>{const n=he(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),lo=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?ao(l):null]})}))),ao=e=>o("div",{className:h("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(no,{...e},String(t))))}),io=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),ro=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=he()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:h("block",e),...t?r:{},role:t?"link":"none",...ue(a),children:i})})),so=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],oo=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>so.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=_e(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},co(a));return c("div",{className:h("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:Le(m,{className:mo(s??!1,a??!1,n),buttonClassName:u})}),r?o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),co=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",mo=(e,t,n=!1)=>h(e||t?"basis-full":"",!t||n&&e?"":"flex-nowrap"),ho=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:x,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(ro,{href:a,target:m,className:"h-full",data:io(v),children:c(Se,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:u,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ge(_e(i)?o(ne,{image:i}):null,f),buttons:d.length?o(oo,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(je,{benefits:x}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,uo(l,p)]})})}))),uo=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,po=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Re,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(Re,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:Le(a)}):null]},String(t))},go=d((({className:e="",title:t,align:n="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:u,...p})=>{const x=d.map(po),[f,b]=s>0?[x.slice(0,s),x.slice(s)]:[x,[]],[y,v]=l(!1);return a((()=>ce.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[_e(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(N,{className:h("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(qa,{renderFoldableSection:()=>c("div",{children:[f,o(Ha,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?xo(y,m?.parent,u):null}):o("div",{children:f})]})})),xo=(e,t,n)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&ce.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",...e?ue(n):{},children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(q,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),fo=d((({className:e,contacts:t,info:n,version:l="secondary",...a})=>c(g,{className:h("flex",e),defaultPadding:"p-6xl",version:l,...a,children:[n?.length?bo(n):null,t?.length?bo(t):null]}))),bo=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>yo({column:e,i:t})))}),yo=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:l},a)=>c("div",{children:[o(C,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:h({"mt-xl":Boolean(l?.text)}),children:Le([l])})]},String(a))))},`col-${String(t)}`):null,vo=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,No=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),wo=1e9,ko={sum:{min:1e4,max:wo},period:3},Co=ht((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Qi(ko,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:So(e)})}),u=s.map((([,e])=>e?.paramsSource?.rateRows)),p=To(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Wi,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(js,{label:l?.title,min:500,max:wo,...d("sum",{parse:e=>({min:Number(e),max:wo}),format:({min:e})=>String(e)})}),o(al,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(Oi,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),So=e=>st((e?.paramsSource?.rateRows||[]).filter(vo).flatMap((e=>No(e.minMonths,e.maxMonths)))),To=e=>st(e.flatMap((e=>e||[])).filter(vo).flatMap((e=>No(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Io=[{key:"10"},{key:"50"},{key:"100"}],Bo=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(Nn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:Io,iconVersion:"black"})]})},Po="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",Mo=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:Po,"aria-label":`Страница ${i}`,children:i},String(t)):null},Ro={width:"24",height:"24"},Vo=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(q,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Do(1===e),...Ro})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Po,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(Mo),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Po,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(q,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Do(e===n),...Ro})})]})},Do=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",zo=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Vo,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(Bo,{itemCount:l,onItemCountChange:a}):null]}),Ao=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",rn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),$o=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Ao,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(wl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(wl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(Sa,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),jo=({title:e,timestamp:t,publicId:n})=>{const l=he(),{href:a}=l({href:`/api/v1/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[null,c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Re,{size:"text-m","font-weight":"font-light",children:xt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)},_o="/api/v1/depository",Lo={startDate:void 0,endDate:void 0,query:""},Oo=ht((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:u}]=$t(Lo),{totalPages:p=0,items:x=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?xt(l,!0):"",r=a?xt(a,!0):"",s=new URLSearchParams(_o);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=Hn(_o+o,rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),f=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o($o,{filtrationState:d,field:m,onClearFilter:u}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),x.length?x.map((e=>o(jo,{...e},String(e.publicId)))):o(ei,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(zo,{currentPage:n+1,onPageChange:f,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),Fo=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Eo=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Fo(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),Uo="location";function Wo(e="Москва"){const[t,n]=((e,t,n)=>{const[r,s]=l(n||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((n=>e.fire(t,n)),[e,t])]})(ce,"location",Ho()??{name:e}),r=i((e=>{Ko(e),n(e)}),[]),{data:s}=Hn(qo()?null:"/api/v1/region",rt);return a((()=>{s&&!qo()&&n(s)}),[s]),[t??{name:e},r]}const qo=()=>Boolean(globalThis.localStorage?.getItem(Uo)),Ho=()=>{try{const e=globalThis.localStorage?.getItem(Uo);return e&&JSON.parse(e)}catch(e){return null}},Ko=e=>{try{globalThis.localStorage?.setItem(Uo,JSON.stringify(e))}catch(e){}};var Xo;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Xo||(Xo={}));const Yo=new Intl.NumberFormat("ru",{style:"currency",currency:Xo.RUB}),Go=e=>e?Yo.format(e):"",Qo="text-m font-light text-secondary-text ",Jo=`${Qo} text-left`,Zo=`${Qo} pl-5xl text-center`,ec=`${Qo} pl-5xl text-right`,tc={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},nc=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Jo,children:o(Re,{size:"text-m",children:"Валюта"})}),o("th",{className:Zo,children:o(Re,{size:"text-m",children:"Купить"})}),o("th",{className:ec,children:o(Re,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(lc)})]}))),lc=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:tc[t]},width:"24",height:"24"}):null,o(Re,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Re,{size:"text-h6",children:Go(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Re,{size:"text-h6",children:Go(e?.buyExchangeRate)})})]},t)},ac={icon:"GpsIcon"},ic=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(ar,{...ac,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),rc=(e,t,n)=>{const l=Number(sc(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},sc=e=>e.replace(/[^\d.,]/g,"").replace(",","."),oc=e=>Pt([[e=>e.value!==Xo.RUB&&e.oppositeValue!==Xo.RUB,()=>e.handleConvert(e.value,Xo.RUB)],[e=>e.value===Xo.RUB&&e.oppositeValue===Xo.RUB,()=>e.handleConvert(e.value,Xo.USD)],[e=>e.value===Xo.RUB&&e.oppositeValue===Xo.RUB,()=>e.handleConvert(e.value,Xo.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function cc(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(on,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(Nn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const dc=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Xo.RUB,selectBuy:n?.[0]?.currency?.currency||Xo.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[cc({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:mc(r,d,n),value:r.inputSell,setValue:e=>uc(d,n)(e,r.selectSell,r.selectBuy)}),cc({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:hc(r,d,t),value:r.inputBuy,setValue:e=>pc(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),mc=(e,t,n)=>l=>{t({selectSell:l}),oc({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{uc(t,n)(e.inputSell,l,a)}})},hc=(e,t,n)=>l=>{t({selectBuy:l}),oc({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>pc(t,n)(e.inputBuy,l,a)})},uc=(e,t)=>(n,l,a)=>{e({inputSell:sc(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(rc(n,i,l===Xo.RUB)||"")})},pc=(e,t)=>(n,l,a)=>{e({inputBuy:sc(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(rc(n,i,l===Xo.RUB)||"")})};const gc=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const[a]=Wo(),i=function(e){const t=e?.code||"000",{data:n}=Hn(`/api/v1/exchangerates?regionCode=${t}`,rt);return n||{}}(a),r=xc(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Xo.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:Xo.RUB}}),o(g,{className:h("box-border min-h-80",e),...l,children:o(Se,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(nc,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(ic,{address:i?.address})]}),o(dc,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:n})]})})})})),xc=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],fc=d((({className:e="",items:t})=>{const n=he();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(bc(n))})})),bc=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...ue(t),children:a||null})},String(l)):null},yc=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),vc=["all","footer"],Nc=d((({className:e,navigationItems:t})=>{const n=he();return o("div",{role:"menu",className:h("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(yc(vc)).map(n).map(wc)})})),wc=(e,t)=>{const{text:n,items:l=[],href:a,target:i="_self",onClick:r,dataFooter:s}=e,d=l.filter(yc(vc));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i,onClick:r,...ue(s),children:n}),d?o(fc,{items:d}):null]},String(t))},kc=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(Cc)}):null)),Cc=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Re,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(Sc)})]},String(t)),Sc=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Tc(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Tc=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Ic(t)}`,children:o(Re,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Ic=e=>e.replaceAll(/\D/g,""),Bc=d((({className:e="",index:t,text:n,...l})=>{const a=he(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:h("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),Pc=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Re,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(Bc,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Mc="w-full lg:w-52",Rc={width:"118",height:"24"},Vc={"bg-white":"color",transparent:"white"},Dc={"bg-white":"text-primary-main",transparent:"text-white"},zc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Vc[e]},className:Dc[e],width:n?.width,height:n?.height}),Ac={"bg-white":"text-primary-text",transparent:"text-white"},$c=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...ue(s),children:[zc(i,n?.image,Rc),r?l??o("div",{className:"ml-s",children:o(Re,{font:"font-medium",color:Ac[i],size:"",children:n?.title??"Россельхозбанк"})}):null]})));function jc(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const _c=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const Lc=(e,t)=>(n,l)=>{for(const[a,i]of l)n.set(a,e(n.get(a)||t,i));return n},Oc=(e=[])=>e.reduce(((e,t)=>e+t),0),Fc=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Ec=e=>t=>e.map((([e,n])=>[_c(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>Wc(t,e))).reduce(Lc(Math.max,0),new Map),Uc=e=>t=>{return Ki(t,t.map((({title:e})=>e)).map((e=>t=>{const n=Fc(t||"");return n.length?Oc(e.map((e=>gi(n.map(_c(e)))))):0})(e))).sort((l=([,e])=>e,n=(e,t)=>l(e)-l(t),(e,t)=>-n(e,t))).map((([e])=>e));var n,l},Wc=(e,t)=>new Map(e.map((e=>[e,t]))),qc=({basePathList:e,initialQuery:t=""})=>{const[n,i]=l(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=Hn(e?.length?e:null,Hc),[s,o]=l(null);return jc((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:l}=t||{};if(!(e&&n?.length&&l&&Object.keys(l).length))return[];const a=Fc(e);if(!a.length)return[];const i=Object.entries(l),r=[...a.map(Ec(i)).reduce(Lc(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>n[e]));return Uc(a)(r)})(n)))}),[r,n]),[s,{value:n,onChange:i}]},Hc=async(...e)=>(await Promise.allSettled(e.map((e=>it(_(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Kc=d((({initialQuery:e,navigationItems:t})=>{const n=r((()=>t?.map((e=>e.href||"/"))),[t]),[l,a]=qc({basePathList:n,initialQuery:e}),i=r((()=>Xc(t)(l)),[t,l]);return o(Ia,{head:o(Ao,{autoFocus:!0,...a}),children:o(Nc,{navigationItems:i})})})),Xc=e=>t=>e?.length&&t?.length?Ki(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:_("/",t)})))}))):[],Yc=(e={})=>{const{open:t,close:n}=de();return{open:(n={},l={})=>t(o(Kc,{...e,...n}),l),close:n}},Gc=d((({className:e,search:t,...n})=>{const[a,r]=l(""),s=i((()=>r("")),[]),d=Yc(n),m=i((e=>{r(e),Qc(e)&&d.open({initialQuery:e},{onClose:s})}),[s,d]);return c("div",{className:h("relative",e),role:"search",children:[o(Ao,{value:a,placeholder:t?.placeholder,onChange:m}),o(Ta,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),Qc=e=>e&&e.length>=3,Jc=(e,t)=>{const{logo:n}=e??{},{dataHeader:l,dataFooter:a,...i}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o($c,{className:Mc,logo:i,data:a,showTitle:!1}),o(Gc,{className:"grow",navigationItems:t,...e})]})},Zc=d((({className:e="",index:t,...n})=>{const l=he(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),ed=d((({className:e="",links:t,license:n})=>c("div",{className:h("@container space-y-lg",e),children:[n?o("div",{children:o(Re,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(Zc,{index:t,...e},String(t))))}):null]}))),td=ht((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{},a=n.options?.page?.common??{},{documents:i,relatedEnterprises:r,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:u,license:p,otherLinks:x=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[Jc(a,l),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Nc,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h(Mc,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(kc,{items:s}),u?o(be,{className:"w-full",version:"primary",...u}):null,d.map(((e,t)=>o(oo,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),x.map(((e,t)=>o(be,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Pc,{title:m,links:r}),o(ed,{links:i,license:p})]})})),nd=d((({className:e="",title:t,description:n,calendar:l,...a})=>c(g,{className:h("space-y-m",e),defaultPadding:"p-6xl",...a,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),l?ld(l):null]}))),ld=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>ad(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:id(e)}),c("div",{className:"text-s",children:[o(Re,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Re,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},ad=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),id=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ne,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),rd=ht((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],u=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,x=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Cn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(be,{href:p,target:"_blank",className:h("p-m w-full @xl:w-auto",u),data:io(i,s?.key),children:x})}):null]})})}));function sd(e=[]){const t=R(),n=Array.from(e.entries()).filter((([,e])=>od(t)(e)));return n.find((([,e])=>od(t,!0)(e)))??n[n.length-1]??[]}const od=(e,t=!1)=>({href:n})=>{if(!n)return!1;const l=j(cd(e)(n));return t?l===j(n):l.startsWith(j(n))},cd=e=>t=>{const n=G(Y.SITE_URL);return z(t)?e.href:_(n,e.pathname)},dd=d((({className:e="",items:t,activeItem:n,ariaLabel:l="Меню"})=>{const[r,{setFalse:d,toggle:m}]=tn(!1),u=ln(d),p=s(null),g=i((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),l=t.current.getBoundingClientRect(),a=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${a}px`:l.left>e.left&&(a>l.left?n.current.style.left="":n.current.style.left=`${a}px`)}}),[r]);return nn(globalThis,"resize",(()=>g({isOpened:r,buttonRef:u,menuRef:p}))),a((()=>{g({isOpened:r,buttonRef:u,menuRef:p})}),[r]),c("div",{className:h(r?"rounded-md shadow-blue-gray":"",e),ref:u,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":l,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:h("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!r}),"aria-hidden":!r,children:hd(t,n)})]})})),md=d((({isActive:e,...t})=>{const n=he(),{text:l,href:a,target:i,onClick:r}=n(t);return o("a",{className:h("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:a,target:i,onClick:r,role:"link",...ue(t?.data),children:l})})),hd=(e,t)=>e?.map(((e,n)=>o(md,{isActive:e===t,...e},e?.text??String(n)))),ud={default:"w-6 h-6",large:"w-12 h-12"},pd=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:l=!1,disabled:a,ariaLabel:i="Меню второго уровня",image:r,data:s,onClick:c,version:d})=>o("button",{className:h("group/btn border-0 flex shrink-0 items-center",l?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":l&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${ud[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":i,onClick:c,...ue(s),children:o(ne,{image:r,className:h("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),gd=e=>globalThis[e],xd=(e,t)=>{const n=document.getElementById(t);if(n){const t=gd(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(gd(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(gd(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))};const fd="chatbot",bd="text-page__btn-chat",yd={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},vd=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:l="Чат",version:i})=>{const r=(e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=yd[e??""];return n=>{if(t)if("personal"!==e)xd(fd,t);else{const e=n.target;e?.classList.contains(bd)||e?.classList.add(bd),document.getElementById("webchat-js-container:webchat_rshb")||xd(fd,t)}}})(e);return o(pd,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:l,onClick:r,buttonSize:"large",isGrayBg:!0,version:i})})),Nd=d((({className:e="",active:t,dataItemName:n,children:l,data:a,...i})=>{const r=he(),{href:s,target:d,text:m,onClick:u}=r(i);return c("a",{className:h("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:u,...ue(a),children:[o("span",{className:wd(t),children:m||l}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),wd=(e=!1)=>h("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),kd=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const r=li(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:l,role:"menuitem",children:o(Nd,{...a,children:n})})})),Cd={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},Sd=d((({version:e,text:t,mobileText:n,...l})=>{const a=we()?n:t;return a?o(be,{className:h("py-s px-lg font-light whitespace-nowrap",Cd["transparent"===e?"transparent":"default"]),...l,children:a}):null})),Td=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:a,chatBotAriaLabel:i})=>{const d="transparent"===t?"white":"black",[,m]=sd(e),[h,u]=l(e.length),p=e.slice(h),g=s(null),x={rootRef:g},f=r((()=>e.map(((e,t)=>e=>{u(e?Id(t):Bd(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(kd,{className:h-1<t?"invisible":"",active:e===m,observerOptions:x,onVisibilityChange:f[t],data:e.dataHeader,...e},String(t))))}),p.length?o(dd,{items:p,activeItem:m,ariaLabel:a}):null,D.CHAT_BOT?o(vd,{version:t,iconVersion:d,chat:D.CHAT_BOT,ariaLabel:i}):null,o(Sd,{version:t,...n})]})})),Id=e=>t=>Math.max(t,e+1),Bd=e=>t=>Math.min(t,e),Pd=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(Md,{...e},String(t))))})]}):null,Md=d((({icon:e,...t})=>{const n=he(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Rd=(e,t)=>n=>n.name?o(ro,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:io(e,n.name),children:o(Re,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Vd=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:h(rn,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Dd=d((({foreignOffices:e,branches:t})=>{const[n,a]=Wo(t?.default),r=he(),{href:s}=r({href:`/branches/${n.slug}`}),[d,m]=l(""),h=Ad(Fl()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(h,zd),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(Ia,{className:"pb-20",head:c("div",{children:[o(Re,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(ro,{href:s,className:"inline mx-2xs text-primary-main",children:n.name})]})}):null,o(Vd,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&_c(e.toLowerCase())(d.toLowerCase())>=.8)).map(Rd(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((x=g,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Re,{size:"text-h6",children:e})}),t.map(Rd(f,x))]},e)))}),Pd(e)]});var x,f})),zd=e=>e.name?.charAt(0)||"",Ad=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),$d=d((({className:e="",active:t,flat:n,children:l,data:a,...i})=>{const r=he(),{href:s,target:c,text:d,onClick:m}=r(i);return o("a",{className:h(jd(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...ue(a),children:o("span",{suppressHydrationWarning:!0,className:_d(t,n),children:d||l})})})),jd=(e=!1,t=!1)=>h("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),_d=(e=!1,t=!1)=>h("font-sans text-s font-light",e?"text-primary-main":h(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Ld=d((({className:e,version:t,...n})=>{const l="transparent"===t?"white":"black",[a]=Wo(n?.branches?.default),r=Yc(n),s=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Dd,{...e}),n),close:n}})(n),d=i((()=>r.open()),[r]),m=i((()=>s.open()),[s]);return c("div",{className:h("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o($d,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:a?.name,data:io(n?.branches?.dataClick,a?.name??""),onClick:m}):null,n?.officesAtms?.href?o($d,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(pd,{image:{icon:"LoupeIcon",iconVersion:l},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),Od=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const r=li(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:l,role:"menuitem",children:o($d,{...a,children:n})})})),Fd=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:a,headerData:i,search:d,bgColor:m,logo:h})=>{const[u,p]=l(e.length),g=e.slice(u),x=s(null),f={rootRef:x},b=r((()=>e.map(((e,t)=>e=>{p(e?Ed(t):Ud(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=h??{};return c("div",{className:"flex items-center justify-between",children:[o($c,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:x,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(Od,{className:u-1<n?"invisible":"",active:e===t,observerOptions:f,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(dd,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(Ld,{version:a,className:"ml-auto",search:d,navigationItems:e,...i})]})})),Ed=e=>t=>Math.max(t,e+1),Ud=e=>t=>Math.min(t,e),Wd={"bg-white":"primary",transparent:"transparent"},qd=["all","header"],Hd=ht((({className:e,bgColor:t="bg-white",logo:n={},version:l=Wd[t],portal:a,header:i={},...r})=>{const{common:s,navigation:d}=Xd(r?.options?.page),{navigationItems:m}=d,{logo:u={}}=s,[,p]=sd(m),{internetBankButton:x}=a||{},f=n.image?.icon||n.image?.src||n?.title?n:u;return o(g,{tag:"header",className:h("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:l,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(Fd,{activeTopItem:p,navigationItems:m?.filter(yc(qd)),version:l,headerData:{...i,...d},search:s.search,bgColor:t,logo:f})}),o("div",{className:h("mt-s h-px bg-main-divider",Kd(l))}),p?.items?.length&&o(Td,{subItems:p?.items?.filter(yc(qd)),version:l,internetBankButton:x})]})})})),Kd=e=>"transparent"===e?"opacity-30":"",Xd=e=>({navigation:e?.navigation??{},common:e?.common??{}}),Yd=(e=!1)=>e?{}:{padding:"p-0"},Gd={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Qd=ht((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r,...s})=>o(g,{className:h("relative","grid grid-cols-12",Gd[n],e),padding:t,version:a,isTheme:i,...s,children:M({...s,extraProps:{...Yd(l),className:ti(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),Jd=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?h("flex",mr[n]):"";return o(g,{className:h(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:l})})})),Zd=(e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};function em({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?c("div",{children:[n?o(Ci,{className:h("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?o(Ci,{className:h("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const tm=d((({className:e="",cards:t=[],button:n})=>{const[a,r]=l(0),s=i((e=>r(e)),[]),d=t.length,[m,h]=Zd({itemCount:d,visibleItemCount:2}),{canDec:u,canInc:p}=h,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?nm({activeIndex:m,cards:t,selectedCardIndex:a,onClick:s}):null,em({...h,btnClass:["left-12","right-12"],className:"top-16"}),u?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(be,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function nm({activeIndex:e,cards:t,selectedCardIndex:n,onClick:l}){const a=460*e,i=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:l}){return c("button",{type:"button",onClick:l,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ne,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?lm("страховая сумма",e.sum):null,e?.fee?lm("страховой взнос",e.fee):null]}),am(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>l(t)})))})})}function lm(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Re,{size:"text-h6",children:[Ue(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Re,{size:"text-l",color:"text-secondary-text",children:e})})]})}function am(e){return e?o(ne,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const im=d((({className:e="",title:t,insuranceTabs:n=[],button:a,...r})=>{const[s,d]=l(0),m=i((e=>d(e)),[]);return c(g,{className:h("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:l}){return o("button",{type:"button",onClick:l,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:rm({insuranceTabs:n,button:a})})]})})),rm=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(tm,{button:t,cards:e},String(n)))):null};const sm={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},om={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},cm=d((e=>{const{className:t="",__html:n,isDotted:l,investmentZeroColumn:a,investmentColumns:i,...r}=e,s=i?[...i]:[];return a&&s.unshift(a),o(g,{className:t,defaultPadding:"p-4xl",...r,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[Ei(o("div",{className:"w-px h-4 bg-gray"}))(s.map(dm)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(um)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(Pe,{__html:n,isDotted:l,itemSize:"list-s"})}):null]})})})),dm=(e,t,n)=>{const l=1===t,a=t===n.length-1;return o("div",{className:`${mm(l,a,e.cells)}`,children:e.cells?.length?o("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:e.cells.reverse().map(hm)}):null},`column_${t}`)},mm=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),hm=(e,t)=>{const n=e.cellSize||"XS",l=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${om[n]} ${sm[l]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Re,{align:"text-center",children:e.text})},`cell_${t}`):null},um=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,pm=["байт","Кб","Мб","Гб","Тб","Пб"],gm=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...ue(i),children:[e,t?c(Re,{size:"text-l",font:"font-light",children:[t," ",xm(d,m),o(Re,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),xm=(e,t)=>e||t?o("span",{children:", "}):"",fm=(e,t)=>(n,l)=>{const a=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${pm[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?ym(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(gm,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:bm(t),data:n?.data}),o(Pe,{__html:n?.__html})]},String(l))},bm=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,ym=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},vm=d((({href:e,__html:t,target:n})=>{const{close:l}=de(),a=R(),r=U(a)(e),s=i((()=>{l()}),[]);return c(Ia,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Pe,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(be,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o(Sa,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Nm=d((({text:e,href:t,target:n,__html:l,icon:a})=>{if(!e&&!l)return null;const r=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(vm,{...e}),n),close:n}})({__html:l,href:t,target:n}),s=i((()=>r.open()),[r]);return c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[bm(a),o(Re,{font:"font-light",children:e})]})})),wm={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},km=ht((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=R();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",wm[r]),role:"list",children:a.map(Cm(d,i))}):null]})})),Cm=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?Sm(t)(n,l):fm(e,t)(n,l)},Sm=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(Nm,{...l,icon:e,href:Tm(t)?t?.href:t?.attachment?.src}),o(Pe,{__html:t?.__html})]},String(n)):null},Tm=e=>"href"in e,Im=ht((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...x})=>{const f="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...x,children:c(Se,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:u,className:h("whitespace-pre-wrap",n)}),rightImage:b,buttons:Le(l,{className:"flex-wrap"}),children:[a?o(Re,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Pe,{__html:r,itemSize:"list-m"}):null,o(Re,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),Bm=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Pm=(e=[],t={})=>e.filter((({content:e={}})=>Yi(t,e))).length,Mm=(e,t)=>e===t;const Rm=(Vm=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(Mm,((e=Mm)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,n])=>Vm(n,t[e])))));var Vm;const Dm=[],zm={},Am={primary:"bg-white/30",secondary:"bg-main-divider"},$m={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},jm=d((({count:e,version:t="secondary"})=>{const n=we(),l=n?"bg-main-divider":Am[t],a=$m[t][n?"mobile":"desktop"];return o("div",{className:h("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Re,{size:"text-xs",color:a,children:e})})})),_m=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:h("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},Lm={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Om={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Fm={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Em={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Um=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:u,...p}=t;return o(i,{className:h("h-12","block flex-1","cursor-pointer",Lm[l],n?Em[l]:Fm[l]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Om[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[_m({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(jm,{count:m,version:Bm(n,l)})}):null]})})})),Wm=d((e=>o(e?.item?.href?qm:Hm,{...e}))),qm=d((e=>{const t=he(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(Um,{...e,tag:"a",item:a,onClick:l})})),Hm=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(Um,{item:e,onClick:l,...n})})),Km=(e,t,n)=>(l,a)=>o(Wm,{isActive:l===e,onClick:t,type:n,item:l},String(a)),Xm=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:h("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(Km(l,a,t))}))),Ym={categories:[],extraOptions:[],propertyType:[],stage:[]},Gm=ht((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=Qi(Ym,{block:a.block,page:a.options?.page}),x=i(((e=Ym)=>p(e)),[]),f=(({hotFilters:e=Dm,filtrationState:t=zm,blocks:n=Dm,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Rm(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Pm(n,t.filter),version:Bm(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:x});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Xm,{...f}),o(Wi,{filtrationSchema:n,resetButton:l,field:m,reset:u}),o(Oi,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Qm=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Jm=d((({children:e})=>Qm?e:null)),Zm=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:h("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:h("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),eh="/icons/MapMarkerClusterIcon.svg",th="/icons/MapMarkerClusterYellowIcon.svg";function nh({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=lh("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=lh("workplaces",e,a),r=ah(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=ah(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=ah(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const lh=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?eh:th,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),ah=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?eh:th,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),ih={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},rh={...ih,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},sh=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(rh).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(q,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),oh=()=>function(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return xd(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${D.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),ch={...ih,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},dh=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(ch).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(q,{name:n,width:"20",height:"16"})})})),mh=[55.753995,37.614069],hh=d((({points:e,className:t="",zoom:n=5,isLoad:l})=>{const i=s(null),r=oh();if(a((()=>{i.current?nh({yandexMaps:r,map:i.current,points:e,isLoad:l}):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:uh(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),nh({yandexMaps:r,map:i.current,points:e,isLoad:l})}))}),[r,e,n,l]),!r)return null;const d="z-10";return c("div",{id:"map",className:h("relative","w-full",t),children:[l?o(Zm,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(dh,{yandexMaps:i}),o(dh,{yandexMaps:i,direction:"out"})]}),sh(i,r,h("right-2 top-80",d))]})})),uh=e=>{const t=[gh(ph(e,0)),gh(ph(e,1))];return t.every((e=>e))?t:mh},ph=(e,t)=>e.map((e=>e.coords?.[t])),gh=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,xh={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},fh={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},bh={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},yh=(e,t,n)=>{const l=Bm("all"===t),a=Bm("business"===t),i=(e,t,l)=>(e.currentTarget===e.target&&"business"===t&&l.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),n(t),l);return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(Sa,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(Sa,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},vh=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Pe,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Re,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Nh="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",wh=({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(Yt,{text:a[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(qa,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Nh,children:s}),o(Ha,{className:Nh,isUnfolded:e,children:d})]}),renderFoldButton:kh(n,l)})}):null})},kh=(e,t)=>({isUnfolded:n,onToggle:l})=>c("div",{className:"flex space-x-lg",children:[t?o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(q,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:l}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:Ch()})]}),Ch=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(q,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),Sh=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Re,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Th=()=>{},Ih=e=>"all"===e?"block":"hidden",Bh=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=Th,renderRemoteWorkplaceCard:s=Th,getBalloon:d=Th,getBalloonRemoteWorkplaces:m=Th,descriptionData:u,title:p})=>{const g=p?.includes("Офис"),[x,{field:f,reset:b}]=$t(xh),[y,v,N,w]=r((()=>{const e=Ph(t,x),n=Ph(a,x),l=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:d(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,l,n,e.length+n?.length]}),[t,a,x]),[k,C]=l("all"),S={filters:Mh([...t,...a]),field:{field:f,reset:b},onlyOffice:g,labels:fh};return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Sh(p,w),u?vh(u):null,g&&yh(t,k,C),o("div",{className:h("pb-3xl",Ih(k)),children:wh(S)})]}),o("div",{className:"h-[600px]",children:o(Jm,{children:o(hh,{points:v,isLoad:n,className:"h-full"})})})]}),c(Jm,{children:[y.map(i),N.map(s)]})]})})),Ph=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>bh[t](e)))))},Mh=e=>Object.keys(xh).filter((t=>e.filter((e=>bh[t](e))).length)),Rh={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Vh=d((({className:e,children:t,color:n="gray"})=>c("div",{className:h("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Rh[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Re,{size:"text-m",color:Rh[n].text,children:t})]}))),Dh=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:zh({textItems:i,subText:t,children:n,isPhone:l,...a})})),zh=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Re,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Ah(n,s),a?o(Re,{color:l,size:"text-m",children:a}):null]}),Ah=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Re,{size:"text-l",children:t?o("a",{href:`tel:${$h(e)}`,children:e.trim()}):e.trim()},String(n)))),$h=e=>e.replace(/\D/g,""),jh=d((({className:e,children:t})=>o("div",{className:h("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),_h=["ArrowDownIcon","ArrowUpIcon"],Lh=["Подробнее","Скрыть"],Oh=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:Lh[Number(e)]}),o(q,{className:"text-primary-text",name:_h[Number(e)],width:"16",height:"16"})]}),Fh=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Wh(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:Wh(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Vh,{color:"green",children:Wh(s)})})]}),o("div",{className:"hidden sm:block",children:o(jh,{className:"flex-wrap",children:m?.map(Uh)})}),o(qa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ha,{isUnfolded:e,children:o(jh,{className:"flex-wrap",children:m?.map(Uh)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Oh({isUnfolded:e,onToggle:t})})]},String(d))},Eh=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Wh(t)} №${n}`,body:e.toUpperCase()}),Uh=(e,t)=>o(Dh,{...e},String(t)),Wh=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",qh=[];const Hh=async e=>{const t=await it(e,{method:"GET"});return Array.isArray(t)?t:qh},Kh={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Xh={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},Yh=d((({descriptionData:e,className:t})=>{const[n]=Wo(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=Hn(`/api/v1/atms?regionCode=${e}`,Hh);return{data:t||qh,isLoad:!t&&!n}}(l);return o(Bh,{className:t,filterItems:Gh,data:a,isLoad:i,initFilterState:Kh,renderCard:Fh,getBalloon:Eh,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Gh=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>Xh[t](e))),n=!l.length||l.some((t=>Xh[t](e)));return t&&n}))},Qh=e=>{const t=Zh(e);return o(Dh,{label:"Режим работы",value:t,className:"max-w-none"})},Jh=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Zh=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Jh({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),Jh({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},eu=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],tu=e=>eu.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),nu=e=>{if(!e)return null;const t=lu(e);return c(jh,{className:"border-none",children:[o(Dh,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(au)})}),o(Dh,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]})},lu=e=>{const t=eu.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},au=({short:e,status:t},n)=>o("div",{className:h("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Re,{size:"text-xs",children:e})},String(n)),iu=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Dh,{label:"Валюта",value:e.currency}):null,t?o(Dh,{label:"Купить",value:String(t)}):null,n?o(Dh,{label:"Продать",value:String(n)}):null]},String(l)),ru=(new Date).getDay(),su=e=>{const[t]=e?.slice(ru-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Vh,{color:"green",children:a}):null,n&&i?o(Vh,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Vh,{color:"red",children:"Выходной"})},ou=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",cu=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(Dh,{label:e,value:t&&n?n:"",subText:ou({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),du=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,mu=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,hu=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,uu=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=tu(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),su(u)]}),o("div",{className:"hidden sm:block",children:pu({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(qa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ha,{isUnfolded:e,children:pu({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Oh({isUnfolded:e,onToggle:t})})]},String(h))},pu=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=tu(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(jh,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Dh,{label:"Факс",value:t,isPhone:!0}),o(Dh,{label:"Телефон филиала",value:e,isPhone:!0}),o(Dh,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Dh,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(Dh,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Dh,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(jh,{children:o(Dh,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(cu)})})}):c(jh,{children:[o(Dh,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(au)})}),Qh(d)]}),r?.businessScheduleVisibleTag?nu(r?.businessScheduleDescription):null,s?.currencies?.length?o(jh,{className:"flex-wrap",children:s?.currencies?.map(iu)}):null]})},gu=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=tu(e),n=e?Zh(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?du(n):hu(n,l):mu(n):null})(n)}`;return{header:l,body:i}},xu=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Re,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:fu({workScheduleDescription:t})}),o(qa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ha,{isUnfolded:e,children:fu({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Oh({isUnfolded:e,onToggle:t})})]},String(n)):null,fu=({workScheduleDescription:e})=>c("div",{children:[c(jh,{className:"flex",children:[o(Dh,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Dh,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание банковских карт"})}),o(Dh,{label:"Операции для физических лиц",children:o(Re,{children:"Инвестиционное и накопительное страхование"})}),o(Dh,{label:"Операции для физических лиц",children:o(Re,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Dh,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]}),bu=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),yu={branches:[],remoteWorkplaces:[]};const vu=async e=>await it(e,{method:"GET"})||yu,Nu=d((({className:e})=>{const[t]=Wo(),n=t?.code??"000",{data:l,isLoad:a}=function(e){const{data:t,error:n}=Hn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,vu);return{data:t||yu,isLoad:!t&&!n}}(n);return o(Bh,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:uu,renderRemoteWorkplaceCard:xu,getBalloon:gu,getBalloonRemoteWorkplaces:bu,title:`Офисы филиала ${t?.name}`})})),wu=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:h(t),defaultPadding:"p-0",...n,children:"offices"===l?o(Nu,{}):o(Yh,{descriptionData:e})})})),ku=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:h("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),Cu="hidden sm:flex absolute z-40 top-10",Su=ht((({className:e="",padding:t,slides:n=[],...a})=>{const[i,r]=l(0),[s,d]=vi({itemCount:n?.length||0});return c(g,{className:h("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...a,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(Ye,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(si,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(Tu({activeSlideIndex:i,onClick:r}))}),d.canScrollLeft?o(Si,{className:h("left-6",Cu),onClick:d.scrollLeft}):null,d.canScrollRight?o(Ti,{className:h("right-6",Cu),onClick:d.scrollRight}):null]})]})})),Tu=({activeSlideIndex:e,onClick:t})=>({nav:n},l)=>{const a=l===e,i=a?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(l))},Iu=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[_e(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Bu({__html:i,richVersion:r}):null,Pu({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Pu({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Pu({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?Le([l]):null]})]}))),Bu=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),Pu=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(q,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Re,{size:"text-xl",color:l,children:t})]})]}):null,Mu=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Pe,{__html:t,richVersion:n})})})),Ru=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>o(zi,{tag:"button",className:h("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:l,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?o(Re,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(q,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Vu=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Du=(e=!1)=>e?"MinusIcon":"PlusIcon",zu=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Au=ht((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:l="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=we();return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(qa,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Ha,{className:h("gap-lg",Vu(m)),isUnfolded:e,children:M({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>$u({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),$u=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?zu(e):Du(e))(a,r);return"accordion"===e?o(Ru,{label:s,labelIcon:n,labelIconBgVersion:l,icon:c,onToggle:i}):o(Ai,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},ju=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(ga,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(ga,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),_u=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(Nn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),Lu=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(_u,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(_u,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Ou=["От 1 дня","До 365 дней"],Fu=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Re,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(al,{min:1,max:365,value:e,items:Ou,onChange:t})]}))),Eu=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(_u,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(_u,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Uu=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Lu,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:Wu(m)}),o(Fu,{days:a,setDays:e=>m({days:e})}),o(Eu,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:qu(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(ju,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),Wu=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},qu=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Hu=d((({days:e,tariffs:t=[]})=>{const n=Xu(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Ku("Аренда за",e),Ku("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),Ku=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Xu=(e,t)=>{const n=Yu(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},Yu=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},Gu=(e,t)=>e.find((e=>e.branchCode===t)),Qu=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=Gu(l,n.selectedBranch),d=Ju(s?.safeBoxCaseVolumes),m=Zu(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,h=ep(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Uu,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Hu,{days:n.days,tariffs:h})]})})),Ju=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Zu=(e,t)=>e?.find((e=>e.volume===t)),ep=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,tp=[];const np=async e=>await it(e,{method:"GET"})||tp,lp=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,h]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Fl(),p=ap(m.selectedRegion,u),x=function(e){const{data:t}=Hn(e?`/api/v1/safeboxes?regionCode=${e}`:null,np);return t||tp}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=Gu(x,m.selectedBranch)||x,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Qu,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(hh,{points:b,className:"h-[640px]"}):null]})})),ap=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,ip=e=>e<4?"w-72":"w-52",rp={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},sp=d((({buttons:e,className:t="",description:n,showLines:l=!0,steps:a=[],stepVersion:i="gray",title:r,version:s="primary",...d})=>{const m=a.length>3,u=rp,p=(e=>e?"":"opacity-0")(l),x=we();return c(g,{className:h("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(C,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:nr(x)}),a?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:h("flex items-center",m?"px-16":"px-24"),children:Ei(o("div",{className:h("h-0.5 w-full bg-secondary-light flex-1",p)}))(a.map(op(u,m,i)))}),o("div",{className:h("flex justify-between",m?"gap-x-s":"gap-x-20"),children:a.map((f={styleMap:u,version:s},(e,t,n)=>{const{styleMap:l,version:a}=f,{label:i,description:r,button:s,isDotted:d}=e;return c("div",{className:h("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",ip(n.length)),children:[c("div",{className:"space-y-xs",children:[i?o(Re,{size:"text-h6",align:"text-center",children:i}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:l.description,children:r}):null,o(Pe,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(be,{className:"box-border py-s w-full max-w-60 mt-auto",version:a,...s,children:s?.text}):null]},String(t))}))})]}):null,Le(e)]});var f})),op=(e,t,n)=>({icon:l},a)=>{const i="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${cp(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:_e(l)?o(ne,{image:{...l,iconVersion:l?.iconVersion||i},width:"48",height:"48"}):o("span",{className:h("text-h4","transparent"===n?e.iconText:(r=n,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:a+1})},String(a));var r},cp=e=>e?"h-16 w-16":"h-24 w-24",dp=d((()=>o("div",{className:"hidden",role:"none"}))),mp="hidden sm:flex absolute z-40",hp={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},up=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=vi({itemCount:t?.length||0});return a((()=>pp(r.current,t,n)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(si,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:hp[i].item,gap:hp[i].gap,children:t.map(Km(n,l,i))}),s.canScrollLeft?o(Si,{className:h("left-6",mp,hp[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(Ti,{className:h("right-6",mp,hp[i].buttonTop),onClick:s.scrollRight}):null]})})),pp=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},gp={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},xp=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:h(gp[t].wrapper,e),children:o(up,{className:gp[t].component,tabsType:t,...n})}):null,fp=ht((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=bp(n??{}),p=R(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(Np(f,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(u))),N=f[y],w=f.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[u]?f.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[u])):w;v(-1===e?0:e)}),[b,w,u]);const k=vp(f[y],y),C=i((e=>{const t=f.indexOf(e),n=f[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(u,e?.tabName??String(t)):n.delete(u),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[f]);return c(g,{className:h({"sticky top-1 z-20":d&&x},e),defaultPadding:"p-0",block:n,...m,children:[xp({className:h({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!x}),items:yp(t,f),activeItem:N,tabsType:r,onChange:C}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>P(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(vp)?.filter(Boolean)||[]}),bp=({__id:e,anchor:t})=>t??e??"tabs",yp=(e,t)=>t?.length?t:e,vp=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Np=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),wp={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},kp=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:wp[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Cp=d((({className:e="",isOpen:t,onClick:n})=>o(be,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),Sp={Buttons:({buttons:e})=>Le(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Pe,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Re,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Re,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(Cp,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},Tp=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return Ip({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Ip=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in Sp))return null;return o(Sp[n],{...t,...l})},Bp=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Tp,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Pp=(e,t)=>140*Oc(e.slice(0,t).map((e=>e?.cols?.length??1))),Mp=(e,t)=>e?.length>0?o("div",{className:h("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Re,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Rp=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,l]=Zd({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((a=n,(e,t)=>{if(!e?.length)return null;const[n,...l]=e,i=h("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Re,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${Pp(l,a)}px)`},children:l?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Re,{size:"text-xl",children:e.data}):null,e?.cols?Mp(e.cols,a):null]},`row${t}`)))})})]},String(t))})),em({...l,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),Vp=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Re,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(Rp,{rows:t.rowsData})})})]},l)}))}))),Dp=(e=!1)=>""+(e?"text-white":"text-secondary-text"),zp=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:h("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(Re,{size:"text-xl",font:"font-light",color:Dp(t===n),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(q,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),Ap=ht((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(zp,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Vp,{activeTabIndex:r,items:m}),o(Cp,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Re,{size:"text-h6",children:"Данных нет"}),o(Cp,{onClick:n,isOpen:!0})]})})),$p=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:h("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(Ap,{...t,onClick:n})}):null]}))),jp=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[u,p]=l(void 0),g=i((e=>p(e)),[]);return c($p,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(kp,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Bp,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),_p=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,em({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Lp=d((({className:e="",title:t,description:n,rowHeaders:l,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],d=l?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[u,p]=Zd({itemCount:m,visibleItemCount:2}),x=(d||[]).map(((e,t)=>o(jp,{row:e,activeIndex:u,rowIdx:t,...r},String(t)))),[f,b]=i>0?[x.slice(0,-i),x.slice(-i)]:[x,[]];return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:i>0?o(qa,{renderFoldableSection:({isUnfolded:e})=>c(_p,{controls:p,children:[f,o(Ha,{isUnfolded:e,children:b})]}),renderFoldButton:$i}):o(_p,{controls:p,children:x})})]})})),Op=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:h("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?Fp():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Re,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?Ep(n):null,a?o(Pe,{richVersion:i,__html:a}):null]})]}))),Fp=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),Ep=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Up=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:n})}):null]}))),Wp=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Up,{prefix:t,unit:n,suffix:l})})})),qp=ht((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=R();return o(g,{className:h("relative flex flex-col",Gd[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:M({...c,extraProps:{className:h("w-full",ti(r)),...Yd(l)}})})}),{childrenTypes:[]}),Hp=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",Kp=d((({className:e,title:t,url:n,previewImg:l,...a})=>{const i=R();return c(g,{className:e,defaultPadding:Hp(e),...a,children:[o(C,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:U(i)(l?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:U(i)(n)})}):null]})})),Xp={AdTile:pt,ApplicationForm:La,ApplicationLeadForm:Qa,BankAccountFiltration:er,BenefitsBlock:ir,BonusBenefitsBlock:dr,ButtonsBlock:hr,CalculatorBonus:Ir,CalculatorBusinessDeposit:Hr,CalculatorCredit:ss,CalculatorDeposit:Ss,CalculatorRefinancing:Ds,CardTransfer:Os,Carousel:Xs,CarouselCard:Js,CarouselCatalogCard:eo,CarouselLinks:lo,CarouselRecommendationCard:ho,CarouselTariffsCard:go,ContactsBlock:fo,DepositFiltration:Co,Depository:Oo,ErrorBlock:Eo,ExchangeRateTile:gc,Footer:td,GracePeriod:nd,GrantSupport:rd,Header:Hd,Headline:C,HorizontalLayout:Qd,ImgBlock:Jd,InsuranceAmountBlock:im,InvestmentInfo:cm,LinkDocs:km,MobileAppTile:Im,MortgageFiltration:Gm,OfficesAtmsMap:wu,Placeholder:ku,ProductBlock:ut,ProductGallery:Su,RepresentativeOfficeInfo:Iu,RichTextBlock:Mu,RollupItem:Au,SafeDepositRental:lp,StepsBlock:sp,StickyBottomMenu:dp,TabsLayout:fp,TariffsTable:Lp,TextBlock:Op,UnitBlock:Wp,VerticalLayout:qp,Video:Kp},Yp=me((()=>{a((()=>{Tt()}),[]);const e=zt();nn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");Ct({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),Gp="cookie",Qp=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=tn();jc((()=>{globalThis.localStorage?.getItem(Gp)||n()}),[],3e3);const a=i((()=>{globalThis.localStorage?.setItem(Gp,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Pe,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Ta,{className:"bg-main-gray rounded-md w-11 h-11",onClose:a})})]})}):null}));function Jp(e){throw new Error(e)}const Zp=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(n),o()}),[n,e]),d=i((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return a((()=>ce.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Jp(e)}}))),[c,d]),n},eg=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=Zp({onCloseAll:e,onClose:t}),{close:l}=de(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return nn(globalThis.document,"keydown",r),a((()=>{n.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[n]),n.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},l)=>o("div",{className:h("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==n.length-1}),children:e},String(t||l))))}):null})),tg=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);a((()=>ce.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:Jp(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return nn(globalThis.document,"keydown",r),e?o("div",{className:h("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),ng="header",lg="footer",ag="sticky-footer",ig={},rg=d((({className:e,data:t=ig,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=mt(s,r);Yp();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(a?.header,{...m,slotName:ng})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[M({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(a?.footer,{...m,slotName:lg})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(a?.["sticky-footer"],{...m,slotName:ag})}):null,o(eg,{}),o(tg,{}),o(Qp,{__html:d?.cookieContent?.__html})]})}));Object.assign(rg,{childrenTypes:[],slots:()=>[ng,lg,ag]});e.Blocks=Xp,e.ContentPage=rg,e.handlerDecorator=me,e.joinList=Ei,e.packageVersion="0.14.576",e.projectSettings=D,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=O,e.useRouter=R,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:h("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),x=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:f(t)}))),f=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>o(n,{role:"heading",className:h("font-sans m-0",v[t],e),children:l||a}))),w=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),k={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=k[n],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(N,{className:h("whitespace-pre-wrap",i),...u?.title,as:r||u?.title.as,title:l}):null,a?o(w,{size:u.descriptionSize,font:u.descriptionWeight,align:i,...p,children:a}):null]})})),S=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),T=[];function I(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=S,blocksRegistry:r={},ancestors:s=T}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:h(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const B=[],P=(e,{key:t,ancestors:n=B,slotName:l=null,extraProps:a,renderProps:i=I,...r})=>{const s=a?(e,t)=>I(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||B,[r.parent,l]]:n},a)))};function M({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?P(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function R(){return R._impl()}R._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),R.setup=e=>{R._impl=e};const V=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return V.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),D=e=>Boolean(e?.includes(":")),A=(e,t)=>Boolean(e&&!D(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),_=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),$=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),j=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:D,isLocalURL:A,isHash:O,withoutQuery:_,joinPath:$,hasPrefix:j});const E="/api/",F=`${E}v1/storage`,U=e=>(t,n)=>{if([!t,D(t),O(t),[z.CDN,E].some((e=>j(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${F}/${t}/attachment`;const l=t?.startsWith("/");return $(j(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},q=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const d=R(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,u=U(d)($(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:u,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(Y,{className:e,children:c("svg",{className:h(K(r),W[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:u,xlinkHref:u})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},K=e=>e?"":"w-full h-full",Y=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),X=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function G(e=""){try{const[,...t]=new URL(e).pathname.split("/");return`/${t.filter(Boolean).join("/")}`}catch(e){return""}}const Z=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!D(t)?U(e)(t,n):t},Q=(e,t)=>e?.media&&t?.media?e.media-t.media:0,J=d((({className:e="",image:t,imageClassName:n=""})=>{const l=R();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Q).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:Z(l)(e),type:te(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:Z(l)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:h("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),te=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(q,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(J,{className:e,imageClassName:n,image:t}):null)),le={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},re="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" ");const ce=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}},de=()=>({open:(e,t={})=>ce.fire("dialog",{type:"open",dialog:e,...t}),close:()=>ce.fire("dialog",{type:"close"}),closeAll:()=>ce.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function he(){const e=G(X.SITE_URL),t=R(),{closeAll:n}=de();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:me(l({...e,href:n}))}};function l({href:l,target:a,onClick:i}){return r=>{i&&i(r);const s=!j(l,e||"/");l&&!s&&A(l,a)&&(n(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(l,e)))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const ue=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},pe=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=xe(e)&&"hidden lg:block";return c("div",{className:h(ge(e),"flex gap-xs"),children:[l?o("div",{className:h(r,se[i]),children:l}):null,xe(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(r,se[i]),children:a}):null]})})),ge=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",xe(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},xe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),fe=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:l}),s=he()({onClick:r,href:l,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...ue(d),children:m}))),ve=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:fe({className:e,rounded:l,version:n}),children:a})));function Ne({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(be,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const we=()=>{const[e,t]=l(false);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",n)}}),[]),e},ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Ce=(e,{className:t,imageAlign:n})=>e?o("div",{className:h("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Se=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=we(),v=R(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=x&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Ne({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Ce(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[u,f]}),Ie(M({...b,extraProps:{className:"@container-normal"}})),Ce(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[Te(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Te=e=>h(e?"row-span-2":"@xl:row-span-2"),Ie=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Be=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pe=d((e=>{const{__html:t="",richVersion:n="",itemSize:l="list-m",isDotted:a=!0}=e,i=a?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(n,l,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Me=(e,t)=>e?o(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Re=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),Ve=(e,t)=>e?o(Re,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,ze=(e,t)=>["label"in e?Ve(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Me(e.description,t)},String(t)):null,"__html"in e?o(Pe,{...e},`rte-${t}`):null],De=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Be(n.icon,t):null,o("div",{children:ze(n)})]}))),Ae=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(De,{benefitsVersion:t,...e},String(n))))}):null)),Oe=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(ze)}):null)),_e=d((({isTabularBenefits:e,...t})=>o(e?Oe:Ae,{...t}))),$e=e=>Boolean(e?.src||e?.icon),je=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(Le(n))}):null,Le=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Ee(a,r),d=Ee(i,r);return l||a?.icon?o(be,{className:h("basis-full @lg:basis-auto",e),appendLeft:Fe({...a,iconVersion:c}),appendRight:Fe({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Ee=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Fe=e=>$e(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ue=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),We=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(qe)}):null)),qe=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Re,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ue(2)(t)," ",n||"₽"]}):null]},String(l)),He=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ke)}):null)),Ke=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Re,{size:"text-m",font:"font-light",children:e})},String(t)),Ye={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Xe=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(ne,{image:y}):null,P=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Se,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Ge(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:je(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?o(_e,{benefitsVersion:s,isTabularBenefits:d,benefits:M}):null,u?o(Pe,{richVersion:p,__html:u,isDotted:m,itemSize:Ye[i]}):null,T,x?.length?o(We,{priceList:x}):null,Ze(f)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},Ze=e=>e?.length?o(He,{tags:e}):null,Qe=e=>Boolean(e&&Array.isArray(e)),Je=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),et=(e,t)=>{return n=e,Boolean(Je(n)&&"string"==typeof n.$ref)?t.ref(e):Je(e)?t.record(e):Qe(e)?t.array(e):t.scalar?t.scalar(e):e;var n},tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(nt,e),nt=(e,t)=>e&&t?Je(e)?e[t]:Qe(e)?e[parseInt(t,10)]:e:e,lt=(e,t)=>et(e,{ref:({$ref:e,...n})=>lt(e?tt(t(e),e):n,t),record:e=>Object.entries(e).map((([e,n])=>({[e]:lt(n,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>lt(e,t)))}),at=(e,t,n=[])=>{et(e,{ref:e=>t(e.$ref,n),record:e=>{for(const l in e)at(e[l],t,[...n,l])},array:e=>{for(let l=0;l<e.length;l++)at(e[l],t,[...n,l])}})};async function it(e,t){try{return e?await rt(e,t):null}catch(e){console.error(e)}return null}const rt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),st=e=>[...new Set(e)],ot={},ct=["/portal-resources"],dt=(e,t)=>lt(e,(e=>t?.[e])),mt=(e,t)=>{const n=(e=>{const t=[];return at(e,(e=>t.push(e))),t})(e),[i,r]=l({});return a((()=>{n.length&&(async e=>Object.fromEntries((await Promise.allSettled(st(e).filter((e=>!ct.some((t=>e.startsWith(t))))).map((async e=>[e,ot[e]||=await rt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(n).then(r)}),[n.join()]),n.length?dt(e,{...t,...i}):e};function ht(e,t={}){const n=d((t=>{const n=mt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const ut=ht((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(Xe,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),pt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>gt(0,t?.length)),[t]),l=t?.[n];return l?o(ut,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(x,{})})})),gt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),xt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},ft=e=>e?.replace(/[^+\d]/g,"");function bt(){return{send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:n,...Nt(l,g),...wt(i,g),...yt(a),...vt(s,"desiredMeetingDate"),...g?vt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...kt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});if(!e?.ok)return null;return await e.json()}catch(e){return null}}}}const yt=e=>e?{phone:ft(e)}:{},vt=(e,t="birthday")=>e?{[t]:xt(e)}:{},Nt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),wt=(e,t=!0)=>({[t?"email":"mail"]:e}),kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:ft(e)}:{},Ct=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e)t[l??""]?.(n,a)},St="rshb-query-params";function Tt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(St)||"";return e&&globalThis.sessionStorage?.setItem(St,e),e}function It(e){if(!e)throw new Error("Value should be fulfilled");return e}const Bt=e=>t=>{const[,n]=It(e.find((([e])=>e(t))));return n(t)},Pt=e=>Bt(e.map((([e,t])=>[e,()=>t])));Pt.if=e=>new Mt(void 0,e);class Mt{parent;predicate;unit;get entry(){return[It(this.predicate),It(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Mt(this,e)}then(e){return new Mt(this.parent,this.predicate,e)}else(e){return Bt([...Rt(this),[()=>!0,e]])}}const Rt=e=>[...e?.parent?Rt(e.parent):[],e.entry],Vt=e=>{const t=e.target?.closest("a");if(D(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=Tt();if(!D(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;if(n){zt(t?.target)?.(n)}}},zt=Pt([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function Dt(){return Dt._impl()}Dt._impl=()=>({forwardQuery:Vt}),Dt.setup=e=>{Dt._impl=e};const At=e=>e,Ot=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=l(e),c=i(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return _t(t,n)?t:n}:r(e)):o,[r]);a((()=>{r&&o(r)}),[r]);const[d,m]=l(!1),[h,u]=l({}),p=i(((e,t)=>{const{parse:n=At,format:l=At}=t||{};return{value:l(s[e]),isDirty:d||h[e],onChange:t=>{c((l=>({...l,[e]:n(t)}))),u((t=>({...t,[e]:!0})))}}}),[c,d,h]),g=i((e=>{c(e),u(e)}),[]),x=i((()=>{c(e),m(!1),u({})}),[e]),f=i((e=>{e.preventDefault(),t?x():m(!0),n&&n(s,e)}),[n,s]);return[s,{isDirty:d||Object.values(h).some(Boolean),field:p,update:g,reset:x,onSubmit:f}]},_t=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),$t=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})})),jt=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Lt=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Et=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],Ft=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Ut="/api/v1/outservice/outserviceregions",Wt=e=>"OUTSERVICE"===e?Ut:void 0,qt=e=>o("div",{className:"h-6",children:e?o(Re,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Ht=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Kt="appearance-none w-5 h-5 border-solid flex-none",Yt=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Xt=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Ht,{paths:Yt,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:h("flex items-center relative group/box",Zt(l)),onClick:s,children:[o("div",{className:h(Kt,"m-0",a?"rounded-full border-2":Jt(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Qt(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,Gt(n)]})})})),Gt=e=>e?o("div",{className:"ml-s",children:o(Re,{size:"text-l",font:"font-light",children:e})}):null,Zt=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Qt=(e=!1)=>e?"radio":"checkbox",Jt=(e=!1)=>h("rounded border",{"bg-primary-main":e}),en=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:h("shrink-0",e),children:[o(Xt,{text:t,value:n,disabled:a,onChange:r},l),qt(i)]})));function tn(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}function nn(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function ln(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return nn(globalThis.document,"click",n),t}const an=()=>{},rn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",sn=e=>e?o(Re,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,on=d((({key:e,className:t="",id:n,name:l,type:r="text",label:d,placeholder:m,value:u="",valid:p=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&w.current?.focus()}),[v,w]);const C="w-full border rounded-md text-primary-text outline-none p-m",S=g?"pr-3xl":"",T=cn(p);return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[sn(d),N?o("textarea",{className:h("block resize-y min-h-24",C,T),id:h("textarea",n),name:l||n,placeholder:m,value:u,onChange:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:h("h-14",C,S,T),ref:w,id:n,name:l||n,placeholder:m,value:u,onChange:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),cn=e=>e?rn:"border-error",dn=e=>(e?.suggestions||[]).map((e=>({...e,processedValue:e?.value}))),mn={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"}},hn=()=>({open:(e,t)=>ce.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>ce.fire("popup",{type:"update",popup:e,...t}),close:()=>ce.fire("popup",{type:"close"})}),un=d((({options:e,onChange:t})=>o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,n)=>o("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem",onMouseDown:()=>t(e.processedValue),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function pn({isOpen:e,value:t,name:n,onChange:c}){const d=s(t),m=s(t),[h,u]=l([]),p=hn(),g=mn[n],x=i((()=>{m.current=t,p.close()}),[t]),f=i((e=>{x(),m.current=e,c&&c(e)}),[x,c]),b=s(null),y=r((()=>async e=>{if(!g)return;const t=await(e=>{const{url:t,query:n,requestData:l={}}=e;return fetch(`/api/v1/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...l,query:n})}).then((e=>e.json())).then(dn)})({url:g.url,requestData:{...g?.requestData},query:e});t?.length&&u(t)}),[]),v=r((()=>((e,t=600)=>{let n;const l=(...a)=>{l.dispose(),n=setTimeout((()=>{e(...a)}),t)};return l.dispose=()=>{n&&clearTimeout(n)},l})(y,300)),[y]);return a((()=>{if(!e||!b.current||m.current===t)return void x();const n=b.current,{top:l,left:a,width:i,height:r}=n.getBoundingClientRect();t&&d.current!==t&&(v(t),d.current=t),p.update(o(un,{options:h,value:t,onChange:f}),{top:l+globalThis.scrollY+r,left:a,width:i})}),[e,h,t,f]),b}const gn=d((({className:e,label:t,value:n="",placeholder:l,error:a,errors:i,onChange:r=an,onBlur:s,isTextarea:d,type:m,name:u="",dadata:p=!1})=>{const[g,{setFalse:x,setTrue:f}]=tn(),b=ln(x),y=pn({isOpen:g&&p,name:u,value:n,onChange:r});return c("div",{className:h("shrink-0 w-full",e),ref:b,onBlur:x,onFocus:f,children:[o("div",{ref:y,children:o(on,{type:m||"text","aria-label":t,label:xn(i,t),valid:Boolean(!a),value:n,onChange:r,onBlur:s,isTextarea:d,placeholder:fn(l,i,t)})}),qt(a)]})})),xn=(e,t)=>t&&e?`${t}*`:t,fn=(e,t,n)=>t&&!n?`${e}*`:e,bn=e=>e?.text||e?.key||"",yn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,vn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:yn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:bn(e)}),o(q,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:h("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const Nn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:u="",isSearch:p=!1,iconVersion:g="black",onChange:x,disabled:f})=>{const[b,{setFalse:y,setTrue:v}]=tn(),[N,w]=l(""),k=f||0===n.length,C=b&&!k,S=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=hn(),h=i((()=>{m.close(),c&&c()}),[c]),u=i((e=>{h(),r&&r(e)}),[h,r]),p=s(null),g=ln(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(vn,{popupRef:g,options:t,value:n,query:l,onChange:u,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,u]),p}({isOpen:b,options:n,value:r,query:N,onChange:x,onClose:S,iconVersion:g});return c("div",{className:h("space-y-xs",e),children:[sn(t),c("div",{className:h("relative",C?"z-20":"z-10"),ref:T,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",kn(m,d,k)),onClick:C?S:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:bn(r)||u}),wn(C,g)]}),p&&C?o("div",{className:h("absolute top-0 w-full z-20"),children:o(on,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),wn=(e,t)=>o(q,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),kn=(e,t,n)=>h(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Cn=d((({className:e="",label:t,error:n,...l})=>c("div",{className:e,children:[o(Nn,{...l,valid:!n,label:l?.errors?`${t}*`:t}),qt(n)]}))),Sn=e=>!e?.length,Tn=e=>t=>n=>e(n)?[]:[t],In="Некорректно заполненное поле",Bn=Tn((e=>null!=e&&""!==e))(In),Pn=Tn((e=>e?.key&&""!==e?.key))(In),Mn=Tn((e=>"string"==typeof e&&e.length>1))(In),Rn=Tn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(In),Vn=(zn=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Tn((e=>"string"==typeof e&&zn.test(e))))(In);var zn;const Dn=Tn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),An={typeForm:Bn,surname:Mn,name:Mn,region:Pn,addressBranch:Pn,phone:Vn,secondaryPhone:Vn,birthday:Bn,education:Bn,housing:Bn,employment:Bn,organization:Bn,amountWorkers:Bn,employerActivities:Bn,employerOrganization:Bn,positionOrganization:Bn,email:Bn,fullName:Mn,inn:Rn,partnerComments:Bn,collectionCount:Bn,comment:Bn,acquiringType:Pn,feedbackType:Pn,feedbackMethod:Pn,serviceType:Pn,serviceDirection:Pn,meetingDay:Bn,product:Bn,localities:Bn,consentDataProcessing:Dn,annualRevenue:Bn,consentToReceiveMaterials:Dn,processPersonalDataLeadFlg:Dn,consentProviderFlg:Dn,consentPhotoFlg:Dn,consentPfrFlg:Dn,consentAssignmentClaimsFlg:Dn,consentCollectionFlg:Dn,consentInformFlg:Dn},On=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,An?.[e]])))},_n=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},$n=(e,t,n=!1)=>n?_n(e,t):e,jn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Ln=d((({field:e,input:t})=>o(Cn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:jn,...$n(e("acquiringType"),An.acquiringType,t?.required)}))),En=(e="")=>Boolean("trade"===e||"all"===e),Fn=e=>null!=e,Un=new Map,Wn=e=>Boolean(e?.every((e=>Array.isArray(e)?Wn(e):!e||"string"==typeof e))),qn=e=>Wn(e)?e.toString():"";function Hn(e,t,{fallback:n,cache:i}={}){const s=r((()=>Kn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(Fn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=Un)=>n=>{const l=qn(n),a=t.get(l);if(l&&Fn(a))return a;const i=e(...n);return l&&Fn(i)&&t.set(l,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Kn(e){return Array.isArray(e)?e:e instanceof Function?Kn(e()):[e]}const Yn=[];const Xn=async e=>await it(e,{method:"GET"})||Yn;function Gn(){const{data:e}=Hn("/api/v1/branchesByRegions",rt);return Array.isArray(e)?e:[]}const Zn=d((({field:e,input:t,isPremium:n=!1})=>{const l=e("region"),i=l?.value?.key,r=l?.value?.text,s=n?Gn()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=Hn(e?`/api/v1/branches?regionCode=${e}`:null,Xn);return t||Yn}(i)?.filter((e=>e?.address));return a((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(Cn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...$n(e("addressBranch"),An.addressBranch,t?.required),isSearch:!0})})),Qn=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},Jn=(e,t,n)=>Math.max(t,Math.min(e,n));function el(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function tl({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:i,onChange:t=>{const n=el(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const nl=1,ll=100,al=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:nl),max:s=(a.length?a.length-1:ll),step:d=1,value:m=a[0]||r,disabled:u=!1,onChange:p}=e,g=Qn(e,{normalize:(e=0)=>a.length?il(a)(e):Jn(e,r,s),format:Ue()}),x=i((e=>{p&&p(el(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",rn,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:x,...g}),tl({list:a,min:r,max:s,step:d,disabled:u,value:m,onChange:p})]}),rl(l)]})})),il=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),rl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),sl=["От 1 000 ₽","До 1 000 000 000 ₽"],ol=d((({field:e})=>o(al,{title:"Сумма, ₽",items:sl,min:1e3,max:1e9,...e("amount")}))),cl=e=>{const{data:t,error:n}=Hn(`https://portal-ui-cc.cprb.dev.rshbdev.ru/light-api-cash/v1/dictionary?dictionaryType=${e}`,dl);return{data:t,error:n}},dl=async e=>await it(e,{method:"POST"})||[],ml=ht((({field:e,source:t,label:n,fieldName:l,input:a})=>{const i=t&&t?.map((e=>e.description))||[];return o(Cn,{placeholder:"Выберите из списка",label:n,options:hl(i),...$n(e(l),An[l],a?.required)})})),hl=e=>(e??[]).map((e=>({key:e,value:e}))),ul=d((({field:e,input:t})=>{const{data:n}=cl("EMPLOYEES_NUMBER");return o(ml,{field:e,source:n||[],label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),pl=d((({field:e,input:t})=>o(gn,{label:"Годовая выручка, ₽",...$n(e("annualRevenue"),An.annualRevenue,t?.required)}))),gl=d((({field:e})=>o(gn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),xl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>n)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=fl(t,e),c=bl(t,i,r);h.push(o("td",{children:o("div",{className:yl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},fl=(e,t)=>t&&e.toDateString()===t.toDateString(),bl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),yl=(e=!1,t=!1)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),vl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Nl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=an,setValue:d=an})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:h,totalDays:u}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:vl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:xl({firstDayOfWeek:h,today:e,totalDays:u,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:m})})]})})),wl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],kl=wl.map((e=>({key:e}))),Cl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Sl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Tl={className:"min-w-32",iconVersion:"black",isBorder:!1},Il=d((({className:e="",label:t="",value:n,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:u}]=tn(!1),[p,g]=l(n?.getMonth()||(new Date).getMonth()),[x,f]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:C,ref:S}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=ln(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>l(wl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:kl,yearsOptions:Cl,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:u,selectedYear:x,selectedMonth:p,showCalendar:m});return c("div",{className:h("space-y-xs",e),ref:S,children:[sn(t),c("div",{className:"relative",children:[Bl(C,n,a),m?c("div",{className:"absolute bg-white z-20 select-none bottom-full",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(q,{...Sl,className:"-rotate-90 cursor-pointer"})}),o(Nn,{onChange:v,value:{key:wl[p]},options:w,...Tl}),o(Nn,{onChange:N,value:{key:String(x)},options:k,...Tl}),o("div",{className:"my-auto",onClick:y,children:o(q,{...Sl,className:"rotate-90 cursor-pointer"})})]}),o(Nl,{today:n,currentMonth:p,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),Bl=(e,t,n)=>c("div",{onClick:e,className:h("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error"),children:[o(w,{children:t&&xt(t)}),o(q,{...Sl,name:"CalendarIcon"})]}),Pl=d((({className:e,label:t,error:n,...l})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Il,{label:t&&l?.errors?`${t}*`:t,valid:Boolean(!n),...l}),qt(n)]}))),Ml=d((({field:e,input:t})=>o(Pl,{label:"Дата рождения",...$n(e("birthday"),An.birthday,t?.required)}))),Rl=d((({field:e,input:t})=>o(gn,{label:"Количество объектов инкассации",type:"number",...$n(e("collectionCount"),An.collectionCount,t?.required)}))),Vl=d((({field:e,input:t})=>o(gn,{className:"col-span-2",...$n(e("comment"),An.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),zl=d((({field:e,input:t})=>o(en,{text:"Прочие согласия (согласие на уступку прав требований)",...$n(e("consentAssignmentClaimsFlg"),An.consentAssignmentClaimsFlg,t?.required)}))),Dl=d((({field:e,input:t})=>o(en,{text:"Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)",...$n(e("consentCollectionFlg"),An.consentCollectionFlg,t?.required)}))),Al=d((({field:e,input:t})=>o(en,{text:"Согласие на информирование о продуктах и услугах Банка",...$n(e("consentInformFlg"),An.consentInformFlg,t?.required)}))),Ol=d((({field:e,input:t})=>o(en,{text:"Прочие согласия (согласие на фотографирование)",...$n(e("consentPhotoFlg"),An.consentPhotoFlg,t?.required)}))),_l=d((({field:e,input:t})=>o(en,{text:"Согласие об использовании простой электронной подписи",...$n(e("consentProviderFlg"),An.consentProviderFlg,t?.required)}))),$l=d((({field:e,input:t})=>o(en,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...$n(e("consentToReceiveMaterials"),An.consentToReceiveMaterials,t?.required)}))),jl=d((({field:e,input:t})=>o(Pl,{label:"Дата рождения",...$n(e("birthday"),An.birthday,t?.required)}))),Ll=d((({field:e,input:t})=>{const{data:n}=cl("EDUCATION_LEVEL");return o(ml,{field:e,source:n||[],label:"Образование",fieldName:"education",input:t})})),El=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(gn,{label:"Электронная почта",...$n(e("email"),An.email,n),...l})})),Fl=d((({field:e,input:t})=>{const{data:n}=cl("ORGANIZATION_ACTIVITY_TYPE");return o(ml,{field:e,source:n||[],label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),Ul=d((({field:e,input:t})=>{const{data:n}=cl("ORGANIZATION_KIND");return o(ml,{field:e,source:n||[],label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),Wl=d((({field:e,input:t})=>{const{data:n}=cl("EMPLOYMENT_TYPE");return o(ml,{field:e,source:n||[],label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),ql=d((({field:e,input:t})=>o(Cn,{label:"Способ получения ответа",options:Ft,...$n(e("feedbackMethod"),An.feedbackMethod,t?.required)}))),Hl=d((({field:e,input:t})=>{const n=e("feedbackType");return a((()=>{"FEEDBACK"===n?.value?.key&&e("serviceDirection")?.onChange?.(Lt[0])}),[n?.value]),o(Cn,{label:"Тема",placeholder:"Выберите тему",options:Et,...$n(n,An.feedbackType,t?.required)})})),Kl=d((({field:e,input:t})=>o(gn,{label:"ФИО",...$n(e("fullName"),An.fullName,t?.required),...t}))),Yl=d((({field:e,input:t})=>{const{data:n}=cl("HOUSE_TYPE");return o(ml,{field:e,source:n||[],label:"Тип жилья",fieldName:"housing",input:t})})),Xl=d((({field:e,input:t})=>o(gn,{label:"ИНН",type:"number",...$n(e("inn"),An.inn,t?.required)}))),Gl=d((({field:e})=>o(en,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'})));function Zl(e="/api/v1/regions"){const{data:t}=Hn(e,rt);return Array.isArray(t)?t:[]}const Ql=d((({field:e,input:t})=>{const n=e("region")?.value?.key,l=Zl(Ut)?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(Cn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:l,...$n(e("localities"),An.localities,t?.required),isSearch:!0})})),Jl=d((({field:e,input:t})=>o(gn,{label:"Отчество (Обязательно, при наличии)",...e("middleName"),...t}))),ea=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(gn,{label:"Имя",...$n(e("name"),An.name,n),...l})})),ta=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:h("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),na=d((({field:e})=>En(e("acquiringType")?.value?.key)?o(ta,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),la=d((({field:e,input:t})=>{const{data:n}=cl("ORGANIZATION_TYPE");return o(ml,{field:e,source:n||[],label:"Тип организации",fieldName:"organization",input:t})})),aa=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(gn,{...$n(e("partnerComments"),An.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...l})})),ia=e=>"_"===e,ra=e=>/\d/.test(e),sa=e=>ia(e)||ra(e),oa=[..."+7 (___) ___-__-__"],ca=oa.findIndex(ia),da=oa.map(((e,t)=>sa(e)?oa.slice(0,t).filter(sa).length:-1));const ma=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=oa.map(((e,n)=>ra(e)?e:t.charAt(da[n])||e)),l=da.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(ca,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(on,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),ha=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:h("shrink-0 w-full",e),children:[o(ma,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),qt(l)]}))),ua=d((({field:e,input:t})=>o(ha,{label:"Телефон",...$n(e("phone"),An.phone,t?.required)}))),pa=d((({field:e,input:t})=>{const{data:n}=cl("POSITION");return o(ml,{field:e,source:n||[],label:"Должность в организации",fieldName:"positionOrganization",input:t})})),ga=d((({field:e})=>En(e("acquiringType")?.value?.key)?o(ta,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),xa=d((({field:e,input:t})=>o(en,{text:"Согласие на обработку персональных данных",...$n(e("processPersonalDataLeadFlg"),An.processPersonalDataLeadFlg,t?.required)}))),fa=ht((({field:e,source:t})=>o(Cn,{placeholder:"Выберите продукт",label:"Продукт",options:ba(t?.productList),..._n(e("product"),An.product)}))),ba=e=>(e??[]).map((e=>({key:e,value:e}))),ya=d((({field:e,input:t,url:n})=>{const l=Zl(n);return o(Cn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...$n(e("region"),An.region,t?.required)})})),va=d((({field:e,input:t})=>{const n=Gn(),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(Cn,{label:"Регион",placeholder:"Выберите регион",options:l,...$n(e("region"),An.region,t?.required)})})),Na=d((({field:e})=>{const t=e("secondaryPhone");return o(ha,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?_n(t,An.secondaryPhone):t})})),wa=d((({field:e,input:t})=>o(Cn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Lt,...$n(e("serviceDirection"),An.serviceDirection,t?.required)}))),ka=d((({field:e,input:t})=>o(gn,{label:"Фамилия",...$n(e("surname"),An.surname,t?.required),...t}))),Ca=["От 1 мес","До 15 лет"],Sa=d((({field:e})=>o(al,{title:"Срок, месяцев",items:Ca,min:1,max:180,...e("term")}))),Ta=d((({field:e,input:t})=>o(Cn,{label:"Тип обслуживания",options:jt,...$n(e("serviceType"),An.serviceType,t?.required)}))),Ia=d((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:h(rn.split(" ").filter((e=>"rounded"!==e)),Kt,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Re,{color:"text-primary-text",children:t}):null]})}))),Ba=["currencyControl","documentOperations","conversionTransactions","otherIssues"],Pa=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(Ia,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:n}),o(Ia,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:n}),o(Ia,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:n}),o(Ia,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:n})]})}));const Ma={$ref:"/wcms-resources/outservice-productlist.json"},Ra=(e,t)=>(n,l)=>{const a="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,i={surname:o(ka,{field:e,input:n}),name:o(ea,{field:e,input:n}),middleName:o(Jl,{field:e,input:n}),phone:o(ua,{field:e,input:n}),email:o(El,{field:e,input:n}),fullName:o(Kl,{field:e,input:n}),inn:o(Xl,{field:e,input:n}),comment:o(Vl,{field:e,input:n}),addressBranch:o(Zn,{field:e,input:n,isPremium:a}),birthday:o(Ml,{field:e,input:n}),desiredMeetingDate:o(jl,{field:e,input:n}),product:o(fa,{field:e,source:Ma}),localities:o(Ql,{field:e,input:n}),isClient:o(Gl,{field:e}),partnerComments:o(aa,{field:e,input:n}),collectionCount:o(Rl,{field:e,input:n}),acquiringType:o(Ln,{field:e,input:n}),onlineCheckout:o(na,{field:e}),posTerminal:o(ga,{field:e}),serviceType:o(Ta,{field:e,input:n}),term:o(Sa,{field:e}),amount:o(ol,{field:e}),annualRevenue:o(pl,{field:e,input:n}),vedTypes:o(Pa,{field:e}),feedbackType:o(Hl,{field:e,input:n}),feedbackMethod:o(ql,{field:e,input:n}),serviceDirection:o(wa,{field:e,input:n}),bankEmpolee:o(gl,{field:e}),secondaryPhone:o(Na,{field:e}),consentToReceiveMaterials:o($l,{field:e,input:n}),processPersonalDataLeadFlg:o(xa,{field:e,input:n}),consentProviderFlg:o(_l,{field:e,input:n}),consentPhotoFlg:o(Ol,{field:e,input:n}),consentAssignmentClaimsFlg:o(zl,{field:e,input:n}),consentCollectionFlg:o(Dl,{field:e,input:n}),consentInformFlg:o(Al,{field:e,input:n}),applicationDate:o(gn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),consentPfrFlg:o(en,{text:"Согласие на запрос в ПФР",...e("consentPfrFlg")}),region:a?o(va,{field:e}):o(ya,{field:e,input:n,url:Wt(t)}),education:o(Ll,{field:e,input:n}),housing:o(Yl,{field:e,input:n}),employment:o(Wl,{field:e,input:n}),organization:o(la,{field:e,input:n}),amountWorkers:o(ul,{field:e,input:n}),employerActivities:o(Fl,{field:e,input:n}),employerOrganization:o(Ul,{field:e,input:n}),positionOrganization:o(pa,{field:e,input:n})};return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:n,field:e})?o("div",{children:i[n?.name]},String(l)):null},Va=e=>2===e?"@xl:grid-cols-2":"",za=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Re,{size:"text-h6",children:e})}):null;function Da({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const Aa={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active"},Oa={primary:h("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:h("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},_a=d((({children:e,...t})=>{const n=e=>({...e,onClick:me(Da(e))}),{className:l,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=n(t);return o("button",{className:h("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":h(Aa[a],Oa[a]),l),type:s,role:d,onClick:m,children:e})})),$a=d((({className:e,onClose:t})=>o("button",{className:h("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(q,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),ja=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:h("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o($a,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),La=d((function({responseType:e,typeForm:t}){const n="OK"===e,l=n?"ResponseOKIcon":"ResponseFailIcon",{close:a}=de(),r=i((()=>{a()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(ja,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:l,iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(_a,{type:"button",onClick:r,children:"Хорошо"})]})})})),Ea=e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(La,{...e}),n),close:n}},Fa=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Ua=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,feedbackType:o,vedTypes:c,region:d,...m}=e,h=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${En(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...m,...qa(c),...Wa(d),...h?{partnerComments:h}:{},...s?{typeForm:s}:{},...o?{typeForm:o}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Wa=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},qa=e=>e?{vedTypes:Object.fromEntries(Ba.map((t=>[t,t===e])))}:{},Ha={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:jn[0],serviceType:jt[0],feedbackType:Et[0],feedbackMethod:Ft[0],serviceDirection:Lt[0],vedTypes:Ba[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Ka=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Re,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Re,{children:t.text})}):null]}))),Ya=(e,t)=>o(_a,{className:h("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Xa=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Xt,{...e}),o(Ka,{link:t})]}),qt(_n(e,Dn).error)]}):o(Ka,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),Ya(n)]}),Ga=bt(),Za=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:u,isContacts:p,data:g,...x})=>{const f=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Ha[e.name]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=jt[1]),{...n,typeForm:{key:t,text:""}}})(f,n),[y,v]=l(""),w=i((async(e,t)=>{const l=Qa(f,e),a=Fa(On(l));if(!Sn(a(e)))return"Fail";const i=Ua({...e,...u}),r=await Ga.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){Ea({responseType:r,typeForm:n}).open()}if("OK"===r&&g){const e=Dt();Ct({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:C,reset:S}]=Ot(b,{onSubmit:w}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(f)?.name;return a((()=>{"OK"===y&&(v(""),S())}),[y]),c($t,{className:h("container space-y-m",e),title:t,...x,children:[c("form",{onSubmit:C,children:[r.map(((e,t)=>c("div",{className:h(Va(e.columns),"grid gap-x-m"),children:[za(e.title),(e?.inputs||[])?.map(Ra(k,n))]},`section-${t}`))),Xa(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),Qa=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const l=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):n===(l?.key??l)})))),Ja=["processPersonalDataLeadFlg","consentProviderFlg","consentPfrFlg","consentPhotoFlg","consentAssignmentClaimsFlg","consentCollectionFlg","consentInformFlg","consentToReceiveMaterials"],ei=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},ti={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:jn[0],serviceType:jt[0],feedbackType:Et[0],feedbackMethod:Ft[0],serviceDirection:Lt[0],vedTypes:Ba[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataLeadFlg:!1,consentProviderFlg:!1,consentPhotoFlg:!1,consentAssignmentClaimsFlg:!1,consentCollectionFlg:!1,consentInformFlg:!1},ni=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||ti[e.name]]))),typeForm:{key:t,text:""}}),li=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const ai=d((({className:e="",isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),ii=d((({inputs:e=[],typeForm:t="",field:n,key:l})=>{const a=e.every((e=>Boolean(n(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean($n(n(e?.name),An[e?.name],e?.required))))),[e]);return o("div",{className:"w-fit",children:o(li,{isFoldButtonOnTop:!0,renderFoldableSection:({isUnfolded:l})=>o(ai,{isUnfolded:l,className:"flex flex-col pl-2xl",children:e.map(Ra(n,t))}),renderFoldButton:ri(c("div",{children:[o(Xt,{value:a,onChange:t=>{for(const l of e){const e=n(l.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},l),qt(i?"Отметьте все обязательные соглашения":"")]}))})})})),ri=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",children:o(q,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),si=(e,t)=>o(_a,{className:h("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),oi=bt(),ci=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,endpoint:d,...m})=>{const u=r?.flatMap((e=>e?.inputs))||[],p=ni(u,n),[g,x]=l(""),f=i((async e=>{const t=Fa(On(u));if(!Sn(t(e)))return"Fail";const l=(e=>{const{region:t,...n}=e,l={...n,...ei(t)};return Object.fromEntries(Object.entries(l)?.map((([e,t])=>[e,t?.key||t])))})(e),a=await oi.send(l,"lead"===d)?"OK":"Fail";if(x(a),a){Ea({responseType:a,typeForm:n}).open()}return a}),[]),[,{field:b,onSubmit:y,reset:v}]=Ot(p,{onSubmit:f});return a((()=>{"OK"===g&&(x(""),v())}),[g]),o($t,{className:h("container space-y-m",e),title:t,...m,children:c("form",{onSubmit:y,className:"space-y-m",children:[r.map(((e,t)=>c("div",{className:h(Va(e.columns),"grid gap-x-m"),children:[za(e.title),di({field:b,typeForm:n,inputs:e?.inputs})]},`section-${t}`))),si(s)]})})})),di=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:l,restInputs:a}=mi(n||[]);return l.length>2?c("div",{children:[a.map(Ra(e,t)),o(ii,{inputs:l,field:e})]}):(n||[])?.map(Ra(e,t))},mi=e=>({consentInputs:e?.filter((e=>Ja.includes(e.name)))||[],restInputs:e?.filter((e=>!Ja.includes(e.name)))||[]}),hi=d((({title:e,description:t})=>{const n=we();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),ui=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",pi=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function gi(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:xi(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}function xi(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const fi=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:a,children:r,onIntersection:s})=>{const c=gi(i((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),a);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:c,role:"listitem",children:r})})),bi=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],yi=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),x&&x(Ni(n))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?vi(c,v):{},...N?pi(u):{},gap:`${r}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(C=(e,n)=>o(fi,{className:h(m,a?bi[a-1]:"",{"h-full":N},t),style:w?vi(c/4):{},activeIndex:l,idx:n,observerOptions:f,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(C):C(e,0))(p)});var C})),vi=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Ni=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),wi={"horizontal-list":"w-6","vertical-list":"h-6"},ki=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?wi[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),Ci=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:h("text-secondary-text font-light",s),children:n?.description})]},String(l))},Si=e=>e,Ti=(e=Si)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),Ii=Ti(),Bi=(e=Si)=>Ti((t=>-e(t))),Pi=Bi(),Mi=e=>t=>e.scrollWidth/t,Ri=e=>(t,n)=>{e.scrollBy({left:n*Mi(e)(t),behavior:"smooth"})},Vi=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[Bi()(a),Ti()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;n.current&&(m?Ri(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(h?Ri(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},zi={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Di=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=we(),[u,p]=Vi({itemCount:s.length}),g=Ai(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const x=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(yi,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Ci({activeIndex:t,onClick:x}))}):n?o("div",{className:h("flex gap-xs",zi[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(ki({activeIndex:t,onClick:x,listType:l}))}):null})),Ai=(e=!1)=>({behavior:e?"auto":"smooth"}),Oi=d((({className:e,disabled:t,...n})=>o(be,{rounded:!0,className:h("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e),disabled:t,...n,children:o(ne,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),_i=d((e=>o(Oi,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),$i=d((e=>o(Oi,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),ji="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Li=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?Ei(t):null,i?o(_i,{className:h(Fi(a),m?"left-1":"left-0"),onClick:s}):null,r?o($i,{className:h(Fi(a),m?"right-1":"right-0"),onClick:d}):null]})})),Ei=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(ji,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(ji,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Fi=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),Ui=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:x,navButtons:f})=>{const b=Array.isArray(g)?g.length:0,[y,v]=Vi({itemCount:b,onVisibleIndicesChange:x}),[N]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===i?"relative h-full":""),children:[o(yi,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(Li,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(Di,{className:h(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),Wi=({blocksToRender:e,...t})=>o(Ui,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:h("relative min-w-80",ui(!0)),children:I(e,t)},String(n))})}),qi=e=>e%2!=0,Hi=d((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,role:r,...s})=>c(n,{tag:n,className:h("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:l,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Ki=d((({className:e="",label:t,icon:n,dataTheme:l="pc",disabled:a=!1,onClick:i})=>o(Hi,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",role:"button",className:h("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Re,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Yi=({isUnfolded:e,onToggle:t})=>o(Ki,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Xi=["ArrowDownIcon","ArrowUpIcon"],Gi="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Zi=({topItemsCount:e=0,label:t="",block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]];return c("div",{className:h("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:h(Gi),children:[P(i,{...a.options,parent:n}),qi(i.length)?o(pt,{className:"col-span-6",...a}):null]}),o(li,{renderFoldableSection:({isUnfolded:e})=>c(ai,{className:h(Gi),isUnfolded:e,children:[P(r,{...a.options,parent:n}),qi(r.length)?o(pt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:l})=>o(Ki,{className:h({hidden:e<1}),disabled:!r?.length,label:t,icon:Xi[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:l})})]})},Qi=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[Ji(n,t),Zi({...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[Ji(n,t),Wi({...l,blocksToRender:t})]});default:return null}})),Ji=(e,t)=>e&&!t.length?o(hi,{...e}):null,er=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),tr=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(ta,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),nr=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,er(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(lr(l)).filter(Boolean))]}),n?o("div",{children:o(_a,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),lr=e=>([t,n])=>{const l=n?.type;return"array"===l?ar(t,e)(n):null},ar=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(tr,{items:l,multiple:!n?.single,...t(e)})]},e)};function ir(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const rr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,sr=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>rr(t[e])||rr(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>rr(t[e])||rr(n[e])||or(t[e])<=or(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>rr(t[e])||rr(n[e])||or(t[e]?.min)>=or(n[e]?.min)&&or(t[e]?.min)<=or(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>rr(t[e])||rr(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>rr(t[e])||rr(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),or=e=>Number(e||0),cr=(e,{block:t,page:n,normalize:l=At})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=Ot(e),d=r((()=>ir(a,a.map((e=>dt(e.content,n?.fallback))))),[a,n?.fallback]),m=i===e?a:((e,t)=>(n=At)=>e?.filter((([,e])=>sr(t,n(e)||{}))).map((([e])=>e)))(d,i)(l);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},dr={},mr={},hr=ht((({className:e,filtrationSchema:t=dr,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=cr(mr,{block:a.block,page:a.options?.page}),d=o(Nn,{className:"w-64",label:n?.title,options:ur(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>ur(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(nr,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(_a,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(Qi,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),ur=e=>ir(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),pr=(e=!1)=>e?"text-left":"text-center",gr={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},xr=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:h("rounded-icon object-fit flex justify-center items-center",gr[n],e),children:o(q,{...i,width:"54%",height:"54%",name:a})}):null})),fr=d((({className:e="",title:t,benefitList:n,...l})=>{const a=we();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(N,{headingType:"h3",as:"h2",className:pr(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(br)}):null]})})),br=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(xr,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ne,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Re,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Pe,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),yr=e=>({icon:t,title:n,description:l},a)=>c("div",{className:h("flex flex-col gap-1","items-center",{"justify-center":!l&&!n}),children:[n?o(Re,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,l?o(Re,{size:"text-h6",font:"font-normal",align:e,children:l}):null]},String(a)),vr=(e,t,n)=>o("div",{className:`grid gap-2xs ${Nr(t)}`,children:e.map(yr(n))}),Nr=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},wr=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:h("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?vr(e,l,t):null]}))),kr={start:"justify-start",center:"justify-center",end:"justify-end"},Cr=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&h("flex",kr[n]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:je(e)})})),Sr=d((({className:e,title:t,children:n,...l})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),Tr="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",Ir="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",Br="flex flex-col gap-y-xl min-w-52",Pr=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(Re,{size:"text-h3",children:"number"==typeof e?[l,Ue(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),Mr=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o(Re,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(Pr,{value:n,...a}):o(Re,{size:"text-h3",children:"-"})]}))),Rr=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Vr=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Re,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ue(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),zr=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(q,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Dr=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(zr,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(Vr,{title:e,rate:t,unit:n,fractionDigits:l,color:i,...s})}),o(Mr,{className:"@xl:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:i,...s}),r]}),Ar=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(al,{items:e?[`От ${Ue(1)(l.min||0)} ${n}`,`До ${Ue(1)(l.max||0)} ${n}`]:[],step:t,...l}),Or={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},_r={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},$r=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=Or.prefMonthsNum,prefTravelBonusRate:i=Or.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||_r,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},jr=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=Ot({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:x}=$r(r,n);return o(Sr,{className:e,title:t,...i,children:c("section",{className:h(Tr,e),children:[c("div",{className:Ir,children:[Ar({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Ar({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Dr({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Br,children:[x>=0?o(Mr,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,je(l,{isVertical:!0}),Rr(a)]})]})})})),Lr=Math.round(29.5),Er=(e,t=0)=>e?.sum?e.sum:t,Fr=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Ur=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Wr={horizontal:"gap-5xl",vertical:"flex-col gap-s"},qr=d((({items:e,checkedItem:t,className:n,onChange:l,disabled:a=!1,orientation:i="horizontal"})=>o("div",{className:h(`flex ${Wr[i]}`,n),role:"radiogroup","aria-label":"Группа кнопок",children:e?.map((({id:e,text:n})=>o(Xt,{isRadio:!0,text:n,value:t===e,onChange:()=>l&&l(e),disabled:a},String(e))))}))),Hr=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Re,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Re,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(qr,{orientation:l,items:e,checkedItem:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),Kr=e=>Hr({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Yr=" (c капитализацией)",Xr=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:Br,children:[o(Mr,{title:`Доход в конце срока${i?Yr:""}`,value:e,postfix:n,prefix:"+"}),o(Mr,{title:`Сумма в конце срока${i?Yr:""}`,value:t,postfix:n}),je(l,{isVertical:!0}),a?.map(Rr)]}),Gr=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Zr([e,t],l),Zr=([e,t],n=[])=>({[e]:n.length?Pi(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?Ii(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Qr=(e,[t,n],l)=>e>=l[t]&&e<=l[n],Jr={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const es={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},ts=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?Jr[e?.rateType]:"",{data:n}=Hn(t?`/api/v1/depositrates/${t}`:null,rt);return Array.isArray(n)?n:[]}(t);if(n<=30)return{...es,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&ns(s,e)&&Qr(l,["minSum","maxSum"],e)&&Qr(n,["minDays","maxDays"],e)))||es,{rate:m}=d,h=ls(m,e),u=l+h,p=c||[es];return{...d,...Zr(["minSum","maxSum"],p),...Zr(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},ns=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,ls=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},as=ht((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:u}]=Ot({moneyValue:Er(r,1e5),daysValue:Fr(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=ts(m,s),{income:g,finalSum:x,rate:f,isUnavailableByTerm:b,depositeName:y}=p;return o(Sr,{className:e,title:t,...d,children:c("section",{className:h(Tr,e),children:[c("div",{className:Ir,children:[Ar({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(al,{items:[`От ${Ur(v.min||0)}`,`До ${Ur(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[is(p,u),Kr({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Dr({rate:f,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),Xr({income:g,finalSum:x,buttons:n,footnotes:[l,a]})]})});var v})),is=(e,t)=>c("div",{className:"space-y-s",children:[o(Re,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Xt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Xt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),rs=(e=[],t=!1)=>ss([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),ss=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},os=({min:e=0,max:t=0,availableMonths:n,...l})=>o(al,{items:[`От ${cs(e)}`,`До ${cs(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),cs=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,ds=e=>Hr({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),ms=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(Jn(t?.[a],n.minMonths,n.maxMonths))},hs=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},us={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},ps=e=>gs({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&gs({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&gs({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&gs({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),gs=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],xs=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[us],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>ps({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=Gr(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=Gr(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>ps({row:e,userInputParams:t,paramsViewSettings:n})&&Qr(l,["minSum","maxSum"],e)&&Qr(a,["minMonths","maxMonths"],e)))||us)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:h}=m,u=hs(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:u}},fs=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),bs={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},ys=ht((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(u=n?.rateRows,ss([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],u));var u;const[p,{field:g}]=Ot({moneyValue:Er(s,2e5),monthsValue:Fr(s,Lr),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),x=xs(p,n,r),f=ds({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(Jn(p.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(Jn(p.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!fs(s)&&m&&ms({field:g,defParams:m,calcParams:x,map:bs,monthsValue:"minMonths"})}),[n,s]),o(Sr,{className:e,title:t,...d,children:c("section",{className:h(Tr,e),children:[c("div",{className:Ir,children:[Ar({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),os({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),vs({...x,...r},g),o("div",{className:"sm:hidden",children:f})]}),c("div",{className:h(Br,"@4xl:w-1/2"),children:[o(Mr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Mr,{title:"Ставка",value:x?.rate,fractionDigits:2,postfix:"%"}),o(Mr,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),je(l,{isVertical:!0}),Rr(i)]})]})})})),vs=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Xt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Xt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Xt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Xt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Ns=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},ws={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},ks=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?Ts(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Ss({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Ss({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Ss({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Ss({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,Qr(l,["minSum","maxSum"],t),Qr(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||ws,{rate:h}=m,u=Cs(h,e),p=l+u,g=t||[ws];return{...m,...Zr(["minSum","maxSum"],g),...Zr(["minMonths","maxMonths"],g),availableMonths:Ns(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:u,finalSum:p}},Cs=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},Ss=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Ts=(e,t)=>e+Math.round((t-e)/2),Is=(e="rub")=>"rub"===e,Bs=(e,t)=>{const{minMonths:n,maxMonths:l}=Zr(["minMonths","maxMonths"],Vs(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:Jn(a,n,l)}},Ps=(e,t)=>{const{minSum:n,maxSum:l}=Zr(["minSum","maxSum"],Vs(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:Jn(a,n,l)}},Ms=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),Rs=e=>{const t=Is(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Vs=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},zs=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?Hr({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?Hr({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),Ds(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Kr({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},Hr({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),Ds(e.isShowNewClient),e.isShowNewClient?o(Xt,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},Ds=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,As={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Os={text:"₽",key:"rub"},_s=ht((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=n??{},p=u?.map((e=>e.currency))??[Os],g=i((e=>t=>e?{...t,...Rs(t),...Ps(t,e),...Bs(t,e),...Ms(t,e)}:t)(u),[u]),[x,{field:f}]=Ot({moneyValue:Er(d,2e4),monthsValue:Fr(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:Os},{normalize:g}),b=f?.("currency")?.value??Os,y=f?.("isNewClient")?.value,v=Vs(u,b),N=ks(x,v,s),{rate:w,income:k,finalSum:C,type:S=""}=N,T=i((()=>{ms({field:f,defParams:rs(v,y),calcParams:N,monthsValue:"minMonths",map:As})}),[f,u]);a((()=>{!fs(d)&&v&&T()}),[d,u]);const I=w===rs(v,y)?.rate;return o(Sr,{className:e,title:t,...m,children:c("section",{className:h(Tr,e),children:[c("div",{className:Ir,children:[c("div",{className:"flex gap-m",children:[Ar({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...f("moneyValue"),value:N.moneyValue,postfix:b?.text,step:$s(b?.key)}),u&&u?.length>1?o(Cn,{label:"Валюта",options:p,...f("currency")}):null]}),os({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...f("monthsValue"),value:N.monthsValue}),zs({...N,...s},f)]}),Dr({rate:w,children:Ls(T,I)}),Xr({income:k,finalSum:C,buttons:[...l,js(n?.buttons,S)],footnotes:[r],postfix:b?.text,isCapitalization:f("isMonthlyInterestPayment").value})]})})})),$s=(e="")=>Is(e)?1e3:100,js=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},Ls=(e,t=!1)=>t?null:o(_a,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Es=e=>Fs({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Fs({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Fs=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Us={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ws=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[Us],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Es({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=Gr(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Gr(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Es({row:e,userInputParams:t,paramsViewSettings:n})&&Qr(l+r,["minSum","maxSum"],e)&&Qr(i,["minSumOld","maxSumOld"],e)&&Qr(r,["minSumExtra","maxSumExtra"],e)&&Qr(a,["minMonths","maxMonths"],e)))||Us)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=hs(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},qs=ht((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=Ot({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Ws(s,n,i),u=ds({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Sr,{className:e,title:t,...r,children:c("section",{className:h(Tr,e),children:[c("div",{className:Ir,children:[Ar({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Ar({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),os({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Hs({...m,...i},d),m.isExtraMoney?Ar({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:u})]}),c("div",{className:h(Br,"@4xl:w-1/2"),children:[o(Mr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Mr,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Mr,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Mr,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:u}),je(l,{isVertical:!0}),Rr(a)]})]})})})),Hs=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Xt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Xt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Xt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Ks=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Qn(e,{normalize:(e=a)=>n&&l?String(Jn(Number(Ys(e)),n,l)):Ys(e),format:Ue(r)}),d=i((e=>t&&t(Ys(e))),[t]);return o(on,{onChange:d,...s,...c})})),Ys=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Xs=d((e=>o(Ks,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Re,{size:"text-xl",font:"font-light",children:"₽"})})}))),Gs={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Zs={amount:1500},Qs=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=Ot(Zs),[u,p]=l(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Gs[r],children:[o(Xs,{valid:!u,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(_a,{className:"w-full mt-lg",type:"submit",disabled:u,children:i.text}):null]})]})})),Js=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(q,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),eo="relative h-full",to={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},no=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(io),r=n?{defaultPadding:"p-6xl pb-m"}:{};return M({...l,renderProps:(n,l,a)=>c("div",{className:lo(n,{someCardsHighlighted:i}),children:[I(n,l,{className:ao(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),io(n)?Js({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},lo=(e,{someCardsHighlighted:t})=>h(eo,t&&(io(e)?"pt-3xl":"pt-3xl sm:pt-16")),ao=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>h(eo,"min-w-80",to[l],t&&(io(e)?"pt-3xl sm:pt-16":"pt-3xl"),ui(n),n&&"h-full"),io=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,ro=ht((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(Ui,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?so(s?.block?.blocks):[],hasBlur:!0,children:no({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),so=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],oo="z-10 border border-solid w-full h-full",co=h(oo,"absolute hidden @xl:block border-transparent"),mo=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:h("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:h(co,"top-9 right-12 bg-green-dark")}),o("div",{className:h(co,"top-6 right-8 bg-green")}),o("div",{className:h(co,"top-3 right-4 bg-green-light")}),c("div",{className:h(oo,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),je([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),ho={black:"bg-black",white:"bg-white"},uo=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Se,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:je([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Re,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(po)]}):null,a?c(Re,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),po=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${ho[e]}`},String(t)),go=d((({icon:e,...t})=>{const n=he(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),xo=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?fo(l):null]})}))),fo=e=>o("div",{className:h("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(go,{...e},String(t))))}),bo=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),yo=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=he()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:h("block",e),...t?r:{},role:t?"link":"none",...ue(a),children:i})})),vo=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],No=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>vo.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=$e(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},wo(a));return c("div",{className:h("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:je(m,{className:ko(s??!1,a??!1,n),buttonClassName:u})}),r?o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),wo=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",ko=(e,t,n=!1)=>h(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),Co=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:x,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(yo,{href:a,target:m,className:"h-full",data:bo(v),children:c(Se,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:u,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ge($e(i)?o(ne,{image:i}):null,f),buttons:d.length?o(No,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(_e,{benefits:x}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,So(l,p)]})})}))),So=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,To=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Re,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(Re,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:je(a)}):null]},String(t))},Io=d((({className:e="",title:t,align:n="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:u,...p})=>{const x=d.map(To),[f,b]=s>0?[x.slice(0,s),x.slice(s)]:[x,[]],[y,v]=l(!1);return a((()=>ce.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[$e(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(N,{className:h("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(li,{renderFoldableSection:()=>c("div",{children:[f,o(ai,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?Bo(m?.parent,u,y):null}):o("div",{children:f})]})})),Bo=(e,t,n=!1)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==e&&ce.fire("fold",{type:"fold",isUnfolded:!n,parent:e})},type:"button",...n?ue(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(q,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Po=d((({className:e,contacts:t,info:n,version:l="secondary",...a})=>c(g,{className:h("flex",e),defaultPadding:"p-6xl",version:l,...a,children:[n?.length?Mo(n):null,t?.length?Mo(t):null]}))),Mo=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>Ro({column:e,i:t})))}),Ro=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:l},a)=>c("div",{children:[o(C,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:h({"mt-xl":Boolean(l?.text)}),children:je([l])})]},String(a))))},`col-${String(t)}`):null,Vo=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,zo=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),Do=1e9,Ao={sum:{min:1e4,max:Do},period:3},Oo=ht((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=cr(Ao,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:_o(e)})}),u=s.map((([,e])=>e?.paramsSource?.rateRows)),p=$o(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(nr,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Xs,{label:l?.title,min:500,max:Do,...d("sum",{parse:e=>({min:Number(e),max:Do}),format:({min:e})=>String(e)})}),o(al,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(Qi,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),_o=e=>st((e?.paramsSource?.rateRows||[]).filter(Vo).flatMap((e=>zo(e.minMonths,e.maxMonths)))),$o=e=>st(e.flatMap((e=>e||[])).filter(Vo).flatMap((e=>zo(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],jo=[{key:"10"},{key:"50"},{key:"100"}],Lo=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(Nn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:jo,iconVersion:"black"})]})},Eo="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",Fo=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:Eo,"aria-label":`Страница ${i}`,children:i},String(t)):null},Uo={width:"24",height:"24"},Wo=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(q,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:qo(1===e),...Uo})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Eo,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(Fo),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Eo,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(q,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:qo(e===n),...Uo})})]})},qo=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Ho=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Wo,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(Lo,{itemCount:l,onItemCountChange:a}):null]}),Ko=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",rn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),Yo=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Ko,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Il,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Il,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(_a,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Xo=({title:e,timestamp:t,publicId:n})=>{const l=he(),{href:a}=l({href:`/api/v1/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[null,c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Re,{size:"text-m","font-weight":"font-light",children:xt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)},Go="/api/v1/depository",Zo={startDate:void 0,endDate:void 0,query:""},Qo=ht((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:u}]=Ot(Zo),{totalPages:p=0,items:x=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?xt(l,!0):"",r=a?xt(a,!0):"",s=new URLSearchParams(Go);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=Hn(Go+o,rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),f=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o(Yo,{filtrationState:d,field:m,onClearFilter:u}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),x.length?x.map((e=>o(Xo,{...e},String(e.publicId)))):o(hi,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Ho,{currentPage:n+1,onPageChange:f,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),Jo=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,ec=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Jo(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),tc="location";function nc(e="Москва"){const[t,n]=((e,t,n)=>{const[r,s]=l(n||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((n=>e.fire(t,n)),[e,t])]})(ce,"location",ac()??{name:e}),r=i((e=>{ic(e),n(e)}),[]),{data:s}=Hn(lc()?null:"/api/v1/region",rt);return a((()=>{s&&!lc()&&n(s)}),[s]),[t??{name:e},r]}const lc=()=>Boolean(globalThis.localStorage?.getItem(tc)),ac=()=>{try{const e=globalThis.localStorage?.getItem(tc);return e&&JSON.parse(e)}catch(e){return null}},ic=e=>{try{globalThis.localStorage?.setItem(tc,JSON.stringify(e))}catch(e){}};var rc;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(rc||(rc={}));const sc=new Intl.NumberFormat("ru",{style:"currency",currency:rc.RUB}),oc=e=>e?sc.format(e):"",cc="text-m font-light text-secondary-text ",dc=`${cc} text-left`,mc=`${cc} pl-5xl text-center`,hc=`${cc} pl-5xl text-right`,uc={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},pc=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:dc,children:o(Re,{size:"text-m",children:"Валюта"})}),o("th",{className:mc,children:o(Re,{size:"text-m",children:"Купить"})}),o("th",{className:hc,children:o(Re,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(gc)})]}))),gc=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:uc[t]},width:"24",height:"24"}):null,o(Re,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Re,{size:"text-h6",children:oc(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Re,{size:"text-h6",children:oc(e?.buyExchangeRate)})})]},t)},xc={icon:"GpsIcon"},fc=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(xr,{...xc,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),bc=(e,t,n)=>{const l=Number(yc(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},yc=e=>e.replace(/[^\d.,]/g,"").replace(",","."),vc=e=>Pt([[e=>e.value!==rc.RUB&&e.oppositeValue!==rc.RUB,()=>e.handleConvert(e.value,rc.RUB)],[e=>e.value===rc.RUB&&e.oppositeValue===rc.RUB,()=>e.handleConvert(e.value,rc.USD)],[e=>e.value===rc.RUB&&e.oppositeValue===rc.RUB,()=>e.handleConvert(e.value,rc.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Nc(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(on,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(Nn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const wc=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||rc.RUB,selectBuy:n?.[0]?.currency?.currency||rc.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[Nc({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:kc(r,d,n),value:r.inputSell,setValue:e=>Sc(d,n)(e,r.selectSell,r.selectBuy)}),Nc({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Cc(r,d,t),value:r.inputBuy,setValue:e=>Tc(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),kc=(e,t,n)=>l=>{t({selectSell:l}),vc({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{Sc(t,n)(e.inputSell,l,a)}})},Cc=(e,t,n)=>l=>{t({selectBuy:l}),vc({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>Tc(t,n)(e.inputBuy,l,a)})},Sc=(e,t)=>(n,l,a)=>{e({inputSell:yc(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(bc(n,i,l===rc.RUB)||"")})},Tc=(e,t)=>(n,l,a)=>{e({inputBuy:yc(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(bc(n,i,l===rc.RUB)||"")})};const Ic=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const[a]=nc(),i=function(e){const t=e?.code||"000",{data:n}=Hn(`/api/v1/exchangerates?regionCode=${t}`,rt);return n||{}}(a),r=Bc(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:rc.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:rc.RUB}}),o(g,{className:h("box-border min-h-80",e),...l,children:o(Se,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(pc,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(fc,{address:i?.address})]}),o(wc,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:n})]})})})})),Bc=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Pc=d((({className:e="",items:t})=>{const n=he();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(Mc(n))})})),Mc=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...ue(t),children:a||null})},String(l)):null},Rc=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),Vc=["all","footer"],zc=d((({className:e,navigationItems:t})=>{const n=he();return o("div",{role:"menu",className:h("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(Rc(Vc)).map(n).map(Dc)})})),Dc=(e,t)=>{const{text:n,items:l=[],href:a,target:i="_self",onClick:r,dataFooter:s}=e,d=l.filter(Rc(Vc));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i,onClick:r,...ue(s),children:n}),d?o(Pc,{items:d}):null]},String(t))},Ac=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(Oc)}):null)),Oc=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Re,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(_c)})]},String(t)),_c=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:$c(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),$c=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${jc(t)}`,children:o(Re,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},jc=e=>e.replaceAll(/\D/g,""),Lc=d((({className:e="",index:t,text:n,...l})=>{const a=he(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:h("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),Ec=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Re,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(Lc,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Fc="w-full lg:w-52",Uc={width:"118",height:"24"},Wc={"bg-white":"color",transparent:"white"},qc={"bg-white":"text-primary-main",transparent:"text-white"},Hc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Wc[e]},className:qc[e],width:n?.width,height:n?.height}),Kc={"bg-white":"text-primary-text",transparent:"text-white"},Yc=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...ue(s),children:[Hc(i,n?.image,Uc),r?l??o("div",{className:"ml-s",children:o(Re,{font:"font-medium",color:Kc[i],size:"",children:n?.title??"Россельхозбанк"})}):null]})));function Xc(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const Gc=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const Zc=(e,t)=>(n,l)=>{for(const[a,i]of l)n.set(a,e(n.get(a)||t,i));return n},Qc=(e=[])=>e.reduce(((e,t)=>e+t),0),Jc=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),ed=e=>t=>e.map((([e,n])=>[Gc(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>nd(t,e))).reduce(Zc(Math.max,0),new Map),td=e=>t=>{return ir(t,t.map((({title:e})=>e)).map((e=>t=>{const n=Jc(t||"");return n.length?Qc(e.map((e=>Ii(n.map(Gc(e)))))):0})(e))).sort((l=([,e])=>e,n=(e,t)=>l(e)-l(t),(e,t)=>-n(e,t))).map((([e])=>e));var n,l},nd=(e,t)=>new Map(e.map((e=>[e,t]))),ld=({basePathList:e,initialQuery:t=""})=>{const[n,i]=l(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=Hn(e?.length?e:null,ad),[s,o]=l(null);return Xc((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:l}=t||{};if(!(e&&n?.length&&l&&Object.keys(l).length))return[];const a=Jc(e);if(!a.length)return[];const i=Object.entries(l),r=[...a.map(ed(i)).reduce(Zc(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>n[e]));return td(a)(r)})(n)))}),[r,n]),[s,{value:n,onChange:i}]},ad=async(...e)=>(await Promise.allSettled(e.map((e=>it($(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),id=d((({initialQuery:e,navigationItems:t})=>{const n=r((()=>t?.map((e=>e.href||"/"))),[t]),[l,a]=ld({basePathList:n,initialQuery:e}),i=r((()=>rd(t)(l)),[t,l]);return o(ja,{head:o(Ko,{autoFocus:!0,...a}),children:o(zc,{navigationItems:i})})})),rd=e=>t=>e?.length&&t?.length?ir(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:$("/",t)})))}))):[],sd=(e={})=>{const{open:t,close:n}=de();return{open:(n={},l={})=>t(o(id,{...e,...n}),l),close:n}},od=d((({className:e,search:t,...n})=>{const[a,r]=l(""),s=i((()=>r("")),[]),d=sd(n),m=i((e=>{r(e),cd(e)&&d.open({initialQuery:e},{onClose:s})}),[s,d]);return c("div",{className:h("relative",e),role:"search",children:[o(Ko,{value:a,placeholder:t?.placeholder,onChange:m}),o($a,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),cd=e=>e&&e.length>=3,dd=(e,t)=>{const{logo:n}=e??{},{dataHeader:l,dataFooter:a,...i}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(Yc,{className:Fc,logo:i,data:a,showTitle:!1}),o(od,{className:"grow",navigationItems:t,...e})]})},md=d((({className:e="",index:t,...n})=>{const l=he(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),hd=d((({className:e="",links:t,license:n})=>c("div",{className:h("@container space-y-lg",e),children:[n?o("div",{children:o(Re,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(md,{index:t,...e},String(t))))}):null]}))),ud=ht((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{},a=n.options?.page?.common??{},{documents:i,relatedEnterprises:r,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:u,license:p,otherLinks:x=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[dd(a,l),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(zc,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h(Fc,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Ac,{items:s}),u?o(be,{className:"w-full",version:"primary",...u}):null,d.map(((e,t)=>o(No,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),x.map(((e,t)=>o(be,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Ec,{title:m,links:r}),o(hd,{links:i,license:p})]})})),pd=d((({className:e="",title:t,description:n,calendar:l,...a})=>c(g,{className:h("space-y-m",e),defaultPadding:"p-6xl",...a,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),l?gd(l):null]}))),gd=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>xd(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:fd(e)}),c("div",{className:"text-s",children:[o(Re,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Re,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},xd=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),fd=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ne,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),bd=ht((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],u=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,x=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Cn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(be,{href:p,target:"_blank",className:h("p-m w-full @xl:w-auto",u),data:bo(i,s?.key),children:x})}):null]})})}));function yd(e=[]){const t=R(),n=Array.from(e.entries()).filter((([,e])=>vd(t)(e)));return n.find((([,e])=>vd(t,!0)(e)))??n[n.length-1]??[]}const vd=(e,t=!1)=>({href:n})=>{if(!n)return!1;const l=_(Nd(e)(n));return t?l===_(n):l.startsWith(_(n))},Nd=e=>t=>{const n=G(X.SITE_URL);return D(t)?e.href:$(n,e.pathname)},wd=d((({className:e="",items:t,activeItem:n,ariaLabel:l="Меню"})=>{const[r,{setFalse:d,toggle:m}]=tn(!1),u=ln(d),p=s(null),g=i((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),l=t.current.getBoundingClientRect(),a=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${a}px`:l.left>e.left&&(a>l.left?n.current.style.left="":n.current.style.left=`${a}px`)}}),[r]);return nn(globalThis,"resize",(()=>g({isOpened:r,buttonRef:u,menuRef:p}))),a((()=>{g({isOpened:r,buttonRef:u,menuRef:p})}),[r]),c("div",{className:h(r?"rounded-md shadow-blue-gray":"",e),ref:u,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":l,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:h("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!r}),"aria-hidden":!r,children:Cd(t,n)})]})})),kd=d((({isActive:e,...t})=>{const n=he(),{text:l,href:a,target:i,onClick:r}=n(t);return o("a",{className:h("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:a,target:i,onClick:r,role:"link",...ue(t?.data),children:l})})),Cd=(e,t)=>e?.map(((e,n)=>o(kd,{isActive:e===t,...e},e?.text??String(n)))),Sd={default:"w-6 h-6",large:"w-12 h-12"},Td=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:l=!1,disabled:a,ariaLabel:i="Меню второго уровня",image:r,data:s,onClick:c,version:d})=>o("button",{className:h("group/btn border-0 flex shrink-0 items-center",l?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":l&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Sd[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":i,onClick:c,...ue(s),children:o(ne,{image:r,className:h("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Id=e=>globalThis[e],Bd=(e,t)=>{const n=document.getElementById(t);if(n){const t=Id(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(Id(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(Id(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))};const Pd="chatbot",Md="text-page__btn-chat",Rd={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Vd=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:l="Чат",version:i})=>{const r=(e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=Rd[e??""];return n=>{if(t)if("personal"!==e)Bd(Pd,t);else{const e=n.target;e?.classList.contains(Md)||e?.classList.add(Md),document.getElementById("webchat-js-container:webchat_rshb")||Bd(Pd,t)}}})(e);return o(Td,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:l,onClick:r,buttonSize:"large",isGrayBg:!0,version:i})})),zd=d((({className:e="",active:t,dataItemName:n,children:l,data:a,...i})=>{const r=he(),{href:s,target:d,text:m,onClick:u}=r(i);return c("a",{className:h("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:u,...ue(a),children:[o("span",{className:Dd(t),children:m||l}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),Dd=(e=!1)=>h("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Ad=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const r=gi(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:l,role:"menuitem",children:o(zd,{...a,children:n})})})),Od={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},_d=d((({version:e,text:t,mobileText:n,...l})=>{const a=we()?n:t;return a?o(be,{className:h("py-s px-lg font-light whitespace-nowrap",Od["transparent"===e?"transparent":"default"]),...l,children:a}):null})),$d=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:a,chatBotAriaLabel:i})=>{const d="transparent"===t?"white":"black",[,m]=yd(e),[h,u]=l(e.length),p=e.slice(h),g=s(null),x={rootRef:g},f=r((()=>e.map(((e,t)=>e=>{u(e?jd(t):Ld(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(Ad,{className:h-1<t?"invisible":"",active:e===m,observerOptions:x,onVisibilityChange:f[t],data:e.dataHeader,...e},String(t))))}),p.length?o(wd,{items:p,activeItem:m,ariaLabel:a}):null,z.CHAT_BOT?o(Vd,{version:t,iconVersion:d,chat:z.CHAT_BOT,ariaLabel:i}):null,o(_d,{version:t,...n})]})})),jd=e=>t=>Math.max(t,e+1),Ld=e=>t=>Math.min(t,e),Ed=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(Fd,{...e},String(t))))})]}):null,Fd=d((({icon:e,...t})=>{const n=he(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Ud=(e,t)=>n=>n.name?o(yo,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:bo(e,n.name),children:o(Re,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Wd=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:h(rn,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),qd=d((({foreignOffices:e,branches:t})=>{const[n,a]=nc(t?.default),r=he(),{href:s}=r({href:`/branches/${n.slug}`}),[d,m]=l(""),h=Kd(Zl()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(h,Hd),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(ja,{className:"pb-20",head:c("div",{children:[o(Re,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(yo,{href:s,className:"inline mx-2xs text-primary-main",children:n.name})]})}):null,o(Wd,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&Gc(e.toLowerCase())(d.toLowerCase())>=.8)).map(Ud(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((x=g,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Re,{size:"text-h6",children:e})}),t.map(Ud(f,x))]},e)))}),Ed(e)]});var x,f})),Hd=e=>e.name?.charAt(0)||"",Kd=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Yd=d((({className:e="",active:t,flat:n,children:l,data:a,...i})=>{const r=he(),{href:s,target:c,text:d,onClick:m}=r(i);return o("a",{className:h(Xd(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...ue(a),children:o("span",{suppressHydrationWarning:!0,className:Gd(t,n),children:d||l})})})),Xd=(e=!1,t=!1)=>h("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),Gd=(e=!1,t=!1)=>h("font-sans text-s font-light",e?"text-primary-main":h(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Zd=d((({className:e,version:t,...n})=>{const l="transparent"===t?"white":"black",[a]=nc(n?.branches?.default),r=sd(n),s=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(qd,{...e}),n),close:n}})(n),d=i((()=>r.open()),[r]),m=i((()=>s.open()),[s]);return c("div",{className:h("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(Yd,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:a?.name,data:bo(n?.branches?.dataClick,a?.name??""),onClick:m}):null,n?.officesAtms?.href?o(Yd,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(Td,{image:{icon:"LoupeIcon",iconVersion:l},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),Qd=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const r=gi(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:l,role:"menuitem",children:o(Yd,{...a,children:n})})})),Jd=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:a,headerData:i,search:d,bgColor:m,logo:h})=>{const[u,p]=l(e.length),g=e.slice(u),x=s(null),f={rootRef:x},b=r((()=>e.map(((e,t)=>e=>{p(e?em(t):tm(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=h??{};return c("div",{className:"flex items-center justify-between",children:[o(Yc,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:x,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(Qd,{className:u-1<n?"invisible":"",active:e===t,observerOptions:f,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(wd,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(Zd,{version:a,className:"ml-auto",search:d,navigationItems:e,...i})]})})),em=e=>t=>Math.max(t,e+1),tm=e=>t=>Math.min(t,e),nm={"bg-white":"primary",transparent:"transparent"},lm=["all","header"],am=ht((({className:e,bgColor:t="bg-white",logo:n={},version:l=nm[t],portal:a,header:i={},...r})=>{const{common:s,navigation:d}=rm(r?.options?.page),{navigationItems:m}=d,{logo:u={}}=s,[,p]=yd(m),{internetBankButton:x}=a||{},f=n.image?.icon||n.image?.src||n?.title?n:u;return o(g,{tag:"header",className:h("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:l,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(Jd,{activeTopItem:p,navigationItems:m?.filter(Rc(lm)),version:l,headerData:{...i,...d},search:s.search,bgColor:t,logo:f})}),o("div",{className:h("mt-s h-px bg-main-divider",im(l))}),p?.items?.length&&o($d,{subItems:p?.items?.filter(Rc(lm)),version:l,internetBankButton:x})]})})})),im=e=>"transparent"===e?"opacity-30":"",rm=e=>({navigation:e?.navigation??{},common:e?.common??{}}),sm=(e=!1)=>e?{}:{padding:"p-0"},om={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},cm=ht((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r,...s})=>o(g,{className:h("relative","grid grid-cols-12",om[n],e),padding:t,version:a,isTheme:i,...s,children:M({...s,extraProps:{...sm(l),className:ui(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),dm=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?h("flex",kr[n]):"";return o(g,{className:h(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:l})})})),mm=(e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};function hm({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?c("div",{children:[n?o(Oi,{className:h("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?o(Oi,{className:h("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const um=d((({className:e="",cards:t=[],button:n})=>{const[a,r]=l(0),s=i((e=>r(e)),[]),d=t.length,[m,h]=mm({itemCount:d,visibleItemCount:2}),{canDec:u,canInc:p}=h,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?pm({activeIndex:m,cards:t,selectedCardIndex:a,onClick:s}):null,hm({...h,btnClass:["left-12","right-12"],className:"top-16"}),u?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(be,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function pm({activeIndex:e,cards:t,selectedCardIndex:n,onClick:l}){const a=460*e,i=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:l}){return c("button",{type:"button",onClick:l,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ne,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?gm("страховая сумма",e.sum):null,e?.fee?gm("страховой взнос",e.fee):null]}),xm(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>l(t)})))})})}function gm(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Re,{size:"text-h6",children:[Ue(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Re,{size:"text-l",color:"text-secondary-text",children:e})})]})}function xm(e){return e?o(ne,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const fm=d((({className:e="",title:t,insuranceTabs:n=[],button:a,...r})=>{const[s,d]=l(0),m=i((e=>d(e)),[]);return c(g,{className:h("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:l}){return o("button",{type:"button",onClick:l,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:bm({insuranceTabs:n,button:a})})]})})),bm=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(um,{button:t,cards:e},String(n)))):null};const ym={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},vm={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},Nm=d((e=>{const{className:t="",__html:n,isDotted:l,investmentZeroColumn:a,investmentColumns:i,...r}=e,s=i?[...i]:[];return a&&s.unshift(a),o(g,{className:t,defaultPadding:"p-4xl",...r,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[er(o("div",{className:"w-px h-4 bg-gray"}))(s.map(wm)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Sm)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(Pe,{__html:n,isDotted:l,itemSize:"list-s"})}):null]})})})),wm=(e,t,n)=>{const l=1===t,a=t===n.length-1,i=e.cells?.reverse()||[];return o("div",{className:`${km(l,a,e.cells)}`,children:i.length?o("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:i.map(Cm)}):null},`column_${t}`)},km=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),Cm=(e,t)=>{const n=e.cellSize||"XS",l=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${vm[n]} ${ym[l]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Re,{align:"text-center",children:e.text})},`cell_${t}`):null},Sm=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,Tm=["байт","Кб","Мб","Гб","Тб","Пб"],Im=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...ue(i),children:[e,t?c(Re,{size:"text-l",font:"font-light",children:[t," ",Bm(d,m),o(Re,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Bm=(e,t)=>e||t?o("span",{children:", "}):"",Pm=(e,t)=>(n,l)=>{const a=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Tm[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Rm(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(Im,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:Mm(t),data:n?.data}),o(Pe,{__html:n?.__html})]},String(l))},Mm=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,Rm=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},Vm=d((({href:e,__html:t,target:n})=>{const{close:l}=de(),a=R(),r=U(a)(e),s=i((()=>{l()}),[]);return c(ja,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Pe,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(be,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o(_a,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),zm=d((({text:e,href:t,target:n,__html:l,icon:a})=>{if(!e&&!l)return null;const r=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Vm,{...e}),n),close:n}})({__html:l,href:t,target:n}),s=i((()=>r.open()),[r]);return c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[Mm(a),o(Re,{font:"font-light",children:e})]})})),Dm={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Am=ht((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=R();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Dm[r]),role:"list",children:a.map(Om(d,i))}):null]})})),Om=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?_m(t)(n,l):Pm(e,t)(n,l)},_m=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(zm,{...l,icon:e,href:$m(t)?t?.href:t?.attachment?.src}),o(Pe,{__html:t?.__html})]},String(n)):null},$m=e=>"href"in e,jm=ht((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...x})=>{const f="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...x,children:c(Se,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:u,className:h("whitespace-pre-wrap",n)}),rightImage:b,buttons:je(l,{className:"flex-wrap"}),children:[a?o(Re,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Pe,{__html:r,itemSize:"list-m"}):null,o(Re,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),Lm=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Em=(e=[],t={})=>e.filter((({content:e={}})=>sr(t,e))).length,Fm=(e,t)=>e===t;const Um=(Wm=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(Fm,((e=Fm)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,n])=>Wm(n,t[e])))));var Wm;const qm=[],Hm={},Km={primary:"bg-white/30",secondary:"bg-main-divider"},Ym={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Xm=d((({count:e,version:t="secondary"})=>{const n=we(),l=n?"bg-main-divider":Km[t],a=Ym[t][n?"mobile":"desktop"];return o("div",{className:h("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Re,{size:"text-xs",color:a,children:e})})})),Gm=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:h("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},Zm={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Qm={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Jm={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},eh={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},th=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:u,...p}=t;return o(i,{className:h("h-12","block flex-1","cursor-pointer",Zm[l],n?eh[l]:Jm[l]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Qm[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Gm({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Xm,{count:m,version:Lm(n,l)})}):null]})})})),nh=d((e=>o(e?.item?.href?lh:ah,{...e}))),lh=d((e=>{const t=he(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(th,{...e,tag:"a",item:a,onClick:l})})),ah=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(th,{item:e,onClick:l,...n})})),ih=(e,t,n)=>(l,a)=>o(nh,{isActive:l===e,onClick:t,type:n,item:l},String(a)),rh=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:h("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(ih(l,a,t))}))),sh={categories:[],extraOptions:[],propertyType:[],stage:[]},oh=ht((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=cr(sh,{block:a.block,page:a.options?.page}),x=i(((e=sh)=>p(e)),[]),f=(({hotFilters:e=qm,filtrationState:t=Hm,blocks:n=qm,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Um(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Em(n,t.filter),version:Lm(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:x});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(rh,{...f}),o(nr,{filtrationSchema:n,resetButton:l,field:m,reset:u}),o(Qi,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),ch=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),dh=d((({children:e})=>ch?e:null)),mh=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:h("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:h("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),hh="/icons/MapMarkerClusterIcon.svg",uh="/icons/MapMarkerClusterYellowIcon.svg";function ph({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=gh("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=gh("workplaces",e,a),r=xh(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=xh(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=xh(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const gh=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?hh:uh,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),xh=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?hh:uh,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),fh={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},bh={...fh,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},yh=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(bh).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(q,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),vh=()=>function(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return Bd(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),Nh={...fh,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},wh=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(Nh).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(q,{name:n,width:"20",height:"16"})})})),kh=[55.753995,37.614069],Ch=d((({points:e,className:t="",zoom:n=5,isLoad:l})=>{const i=s(null),r=vh();if(a((()=>{i.current?ph({yandexMaps:r,map:i.current,points:e,isLoad:l}):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:Sh(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),ph({yandexMaps:r,map:i.current,points:e,isLoad:l})}))}),[r,e,n,l]),!r)return null;const d="z-10";return c("div",{id:"map",className:h("relative","w-full",t),children:[l?o(mh,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(wh,{yandexMaps:i}),o(wh,{yandexMaps:i,direction:"out"})]}),yh(i,r,h("right-2 top-80",d))]})})),Sh=e=>{const t=[Ih(Th(e,0)),Ih(Th(e,1))];return t.every((e=>e))?t:kh},Th=(e,t)=>e.map((e=>e.coords?.[t])),Ih=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Bh={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Ph={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Mh={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},Rh=(e,t,n)=>{const l=Lm("all"===t),a=Lm("business"===t),i=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?r(l):l;return n(t),a},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(_a,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(_a,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Vh=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Pe,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Re,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,zh="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Dh=({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(Xt,{text:a[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(li,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:zh,children:s}),o(ai,{className:zh,isUnfolded:e,children:d})]}),renderFoldButton:Ah(n,l)})}):null})},Ah=(e,t=!1)=>({isUnfolded:n,onToggle:l})=>c("div",{className:"flex space-x-lg",children:[t?o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(q,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:l}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:Oh()})]}),Oh=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(q,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),_h=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Re,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),$h=()=>{},jh=e=>"all"===e?"block":"hidden",Lh=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=$h,renderRemoteWorkplaceCard:s=$h,getBalloon:d=$h,getBalloonRemoteWorkplaces:m=$h,descriptionData:u,title:p})=>{const g=p?.includes("Офис"),[x,{field:f,reset:b}]=Ot(Bh),[y,v,N,w]=r((()=>{const e=Eh(t,x),n=Eh(a,x),l=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:d(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,l,n,e.length+n?.length]}),[t,a,x]),[k,C]=l("all"),S={filters:Fh([...t,...a]),field:{field:f,reset:b},onlyOffice:g,labels:Ph};return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[_h(p,w),u?Vh(u):null,g&&Rh(t,k,C),o("div",{className:h("pb-3xl",jh(k)),children:Dh(S)})]}),o("div",{className:"h-[600px]",children:o(dh,{children:o(Ch,{points:v,isLoad:n,className:"h-full"})})})]}),c(dh,{children:[y.map(i),N.map(s)]})]})})),Eh=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Mh[t](e)))))},Fh=e=>Object.keys(Bh).filter((t=>e.filter((e=>Mh[t](e))).length)),Uh={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Wh=d((({className:e,children:t,color:n="gray"})=>c("div",{className:h("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Uh[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Re,{size:"text-m",color:Uh[n].text,children:t})]}))),qh=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:Hh({textItems:i,subText:t,children:n,isPhone:l,...a})})),Hh=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Re,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Kh(n,s),a?o(Re,{color:l,size:"text-m",children:a}):null]}),Kh=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Re,{size:"text-l",children:t?o("a",{href:`tel:${Yh(e)}`,children:e.trim()}):e.trim()},String(n)))),Yh=e=>e.replace(/\D/g,""),Xh=d((({className:e,children:t})=>o("div",{className:h("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Gh=["ArrowDownIcon","ArrowUpIcon"],Zh=["Подробнее","Скрыть"],Qh=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:Zh[Number(e)]}),o(q,{className:"text-primary-text",name:Gh[Number(e)],width:"16",height:"16"})]}),Jh=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:nu(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:nu(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Wh,{color:"green",children:nu(s)})})]}),o("div",{className:"hidden sm:block",children:o(Xh,{className:"flex-wrap",children:m?.map(tu)})}),o(li,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(ai,{isUnfolded:e,children:o(Xh,{className:"flex-wrap",children:m?.map(tu)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Qh({isUnfolded:e,onToggle:t})})]},String(d))},eu=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${nu(t)} №${n}`,body:e.toUpperCase()}),tu=(e,t)=>o(qh,{...e},String(t)),nu=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",lu=[];const au=async e=>{const t=await it(e,{method:"GET"});return Array.isArray(t)?t:lu},iu={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},ru={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},su=d((({descriptionData:e,className:t})=>{const[n]=nc(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=Hn(`/api/v1/atms?regionCode=${e}`,au);return{data:t||lu,isLoad:!t&&!n}}(l);return o(Lh,{className:t,filterItems:ou,data:a,isLoad:i,initFilterState:iu,renderCard:Jh,getBalloon:eu,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),ou=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>ru[t](e))),n=!l.length||l.some((t=>ru[t](e)));return t&&n}))},cu=e=>{const t=mu(e);return o(qh,{label:"Режим работы",value:t,className:"max-w-none"})},du=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",mu=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[du({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),du({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},hu=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],uu=e=>hu.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),pu=e=>{if(!e)return null;const t=gu(e);return c(Xh,{className:"border-none",children:[o(qh,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(xu)})}),o(qh,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]})},gu=e=>{const t=hu.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},xu=({short:e,status:t},n)=>o("div",{className:h("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Re,{size:"text-xs",children:e})},String(n)),fu=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(qh,{label:"Валюта",value:e.currency}):null,t?o(qh,{label:"Купить",value:String(t)}):null,n?o(qh,{label:"Продать",value:String(n)}):null]},String(l)),bu=(new Date).getDay(),yu=e=>{const[t]=e?.slice(bu-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Wh,{color:"green",children:a}):null,n&&i?o(Wh,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Wh,{color:"red",children:"Выходной"})},vu=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",Nu=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(qh,{label:e,value:t&&n?n:"",subText:vu({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),wu=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,ku=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Cu=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,Su=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=uu(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),yu(u)]}),o("div",{className:"hidden sm:block",children:Tu({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(li,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(ai,{isUnfolded:e,children:Tu({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Qh({isUnfolded:e,onToggle:t})})]},String(h))},Tu=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=uu(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Xh,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(qh,{label:"Факс",value:t,isPhone:!0}),o(qh,{label:"Телефон филиала",value:e,isPhone:!0}),o(qh,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(qh,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(qh,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(qh,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(Xh,{children:o(qh,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(Nu)})})}):c(Xh,{children:[o(qh,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(xu)})}),cu(d)]}),r?.businessScheduleVisibleTag?pu(r?.businessScheduleDescription):null,s?.currencies?.length?o(Xh,{className:"flex-wrap",children:s?.currencies?.map(fu)}):null]})},Iu=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=uu(e),n=e?mu(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?wu(n):Cu(n,l):ku(n):null})(n)}`;return{header:l,body:i}},Bu=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Re,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Pu({workScheduleDescription:t})}),o(li,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(ai,{isUnfolded:e,children:Pu({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Qh({isUnfolded:e,onToggle:t})})]},String(n)):null,Pu=({workScheduleDescription:e})=>c("div",{children:[c(Xh,{className:"flex",children:[o(qh,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(qh,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание банковских карт"})}),o(qh,{label:"Операции для физических лиц",children:o(Re,{children:"Инвестиционное и накопительное страхование"})}),o(qh,{label:"Операции для физических лиц",children:o(Re,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(qh,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]}),Mu=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Ru={branches:[],remoteWorkplaces:[]};const Vu=async e=>await it(e,{method:"GET"})||Ru,zu=d((({className:e})=>{const[t]=nc(),n=t?.code??"000",{data:l,isLoad:a}=function(e){const{data:t,error:n}=Hn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,Vu);return{data:t||Ru,isLoad:!t&&!n}}(n);return o(Lh,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:Su,renderRemoteWorkplaceCard:Bu,getBalloon:Iu,getBalloonRemoteWorkplaces:Mu,title:`Офисы филиала ${t?.name}`})})),Du=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:h(t),defaultPadding:"p-0",...n,children:"offices"===l?o(zu,{}):o(su,{descriptionData:e})})})),Au=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:h("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),Ou="hidden sm:flex absolute z-40 top-10",_u=ht((({className:e="",padding:t,slides:n=[],...a})=>{const[i,r]=l(0),[s,d]=Vi({itemCount:n?.length||0});return c(g,{className:h("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...a,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(Xe,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(yi,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map($u({activeSlideIndex:i,onClick:r}))}),d.canScrollLeft?o(_i,{className:h("left-6",Ou),onClick:d.scrollLeft}):null,d.canScrollRight?o($i,{className:h("right-6",Ou),onClick:d.scrollRight}):null]})]})})),$u=({activeSlideIndex:e,onClick:t})=>({nav:n},l)=>{const a=l===e,i=a?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(l))},ju=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[$e(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Lu({__html:i,richVersion:r}):null,Eu({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Eu({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Eu({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?je([l]):null]})]}))),Lu=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),Eu=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(q,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Re,{size:"text-xl",color:l,children:t})]})]}):null,Fu=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Pe,{__html:t,richVersion:n})})})),Uu=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>o(Hi,{tag:"button",className:h("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:l,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?o(Re,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(q,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Wu=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",qu=(e=!1)=>e?"MinusIcon":"PlusIcon",Hu=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Ku=ht((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:l="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=we();return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(li,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(ai,{className:h("gap-lg",Wu(m)),isUnfolded:e,children:M({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Yu({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),Yu=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?Hu(e):qu(e))(a,r);return"accordion"===e?o(Uu,{label:s,labelIcon:n,labelIconBgVersion:l,icon:c,onToggle:i}):o(Ki,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Xu=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(Ia,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Ia,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Gu=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(Nn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),Zu=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Gu,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Gu,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Qu=["От 1 дня","До 365 дней"],Ju=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Re,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(al,{min:1,max:365,value:e,items:Qu,onChange:t})]}))),ep=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Gu,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Gu,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),tp=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Zu,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:np(m)}),o(Ju,{days:a,setDays:e=>m({days:e})}),o(ep,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:lp(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Xu,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),np=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},lp=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},ap=d((({days:e,tariffs:t=[]})=>{const n=rp(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[ip("Аренда за",e),ip("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),ip=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),rp=(e,t)=>{const n=sp(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},sp=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},op=(e,t)=>e.find((e=>e.branchCode===t)),cp=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=op(l,n.selectedBranch),d=dp(s?.safeBoxCaseVolumes),m=mp(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,h=hp(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(tp,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(ap,{days:n.days,tariffs:h})]})})),dp=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],mp=(e,t)=>e?.find((e=>e.volume===t)),hp=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,up=[];const pp=async e=>await it(e,{method:"GET"})||up,gp=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,h]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Zl(),p=xp(m.selectedRegion,u),x=function(e){const{data:t}=Hn(e?`/api/v1/safeboxes?regionCode=${e}`:null,pp);return t||up}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=op(x,m.selectedBranch)||x,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(cp,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Ch,{points:b,className:"h-[640px]"}):null]})})),xp=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,fp=e=>e<4?"w-72":"w-52",bp={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},yp=d((({buttons:e,className:t="",description:n,showLines:l=!0,steps:a=[],stepVersion:i="gray",title:r,version:s="primary",...d})=>{const m=a.length>3,u=bp,p=(e=>e?"":"opacity-0")(l),x=we();return c(g,{className:h("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(C,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:pr(x)}),a?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:h("flex items-center",m?"px-16":"px-24"),children:er(o("div",{className:h("h-0.5 w-full bg-secondary-light flex-1",p)}))(a.map(vp(u,m,i)))}),o("div",{className:h("flex justify-between",m?"gap-x-s":"gap-x-20"),children:a.map((f={styleMap:u,version:s},(e,t,n)=>{const{styleMap:l,version:a}=f,{label:i,description:r,button:s,isDotted:d}=e;return c("div",{className:h("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",fp(n.length)),children:[c("div",{className:"space-y-xs",children:[i?o(Re,{size:"text-h6",align:"text-center",children:i}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:l.description,children:r}):null,o(Pe,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(be,{className:"box-border py-s w-full max-w-60 mt-auto",version:a,...s,children:s?.text}):null]},String(t))}))})]}):null,je(e)]});var f})),vp=(e,t,n)=>({icon:l},a)=>{const i="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${Np(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:$e(l)?o(ne,{image:{...l,iconVersion:l?.iconVersion||i},width:"48",height:"48"}):o("span",{className:h("text-h4","transparent"===n?e.iconText:(r=n,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:a+1})},String(a));var r},Np=e=>e?"h-16 w-16":"h-24 w-24",wp=d((()=>o("div",{className:"hidden",role:"none"}))),kp="hidden sm:flex absolute z-40",Cp={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Sp=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=Vi({itemCount:t?.length||0});return a((()=>Tp(r.current,t,n)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(yi,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Cp[i].item,gap:Cp[i].gap,children:t.map(ih(n,l,i))}),s.canScrollLeft?o(_i,{className:h("left-6",kp,Cp[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o($i,{className:h("right-6",kp,Cp[i].buttonTop),onClick:s.scrollRight}):null]})})),Tp=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},Ip={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Bp=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:h(Ip[t].wrapper,e),children:o(Sp,{className:Ip[t].component,tabsType:t,...n})}):null,Pp=ht((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=Mp(n??{}),p=R(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(zp(f,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(u))),N=f[y],w=f.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[u]?f.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[u])):w;v(-1===e?0:e)}),[b,w,u]);const k=Vp(f[y],y),C=i((e=>{const t=f.indexOf(e),n=f[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(u,e?.tabName??String(t)):n.delete(u),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[f]);return c(g,{className:h({"sticky top-1 z-20":d&&x},e),defaultPadding:"p-0",block:n,...m,children:[Bp({className:h({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!x}),items:Rp(t,f),activeItem:N,tabsType:r,onChange:C}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>P(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Vp)?.filter(Boolean)||[]}),Mp=({__id:e,anchor:t})=>t??e??"tabs",Rp=(e,t)=>t?.length?t:e,Vp=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",zp=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Dp={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Ap=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Dp[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Op=d((({className:e="",isOpen:t,onClick:n})=>o(be,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),_p={Buttons:({buttons:e})=>je(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Pe,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Re,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Re,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(Op,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},$p=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return jp({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),jp=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in _p))return null;return o(_p[n],{...t,...l})},Lp=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o($p,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Ep=(e,t)=>140*Qc(e.slice(0,t).map((e=>e?.cols?.length??1))),Fp=(e,t)=>e?.length>0?o("div",{className:h("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Re,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Up=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,l]=mm({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((a=n,(e,t)=>{if(!e?.length)return null;const[n,...l]=e,i=h("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Re,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${Ep(l,a)}px)`},children:l?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Re,{size:"text-xl",children:e.data}):null,e?.cols?Fp(e.cols,a):null]},`row${t}`)))})})]},String(t))})),hm({...l,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),Wp=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Re,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(Up,{rows:t.rowsData})})})]},l)}))}))),qp=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Hp=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:h("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(Re,{size:"text-xl",font:"font-light",color:qp(t===n),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(q,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),Kp=ht((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(Hp,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Wp,{activeTabIndex:r,items:m}),o(Op,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Re,{size:"text-h6",children:"Данных нет"}),o(Op,{onClick:n,isOpen:!0})]})})),Yp=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:h("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(Kp,{...t,onClick:n})}):null]}))),Xp=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[u,p]=l(void 0),g=i((e=>p(e)),[]);return c(Yp,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Ap,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Lp,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),Gp=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,hm({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Zp=d((({className:e="",title:t,description:n,rowHeaders:l,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],d=l?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[u,p]=mm({itemCount:m,visibleItemCount:2}),x=(d||[]).map(((e,t)=>o(Xp,{row:e,activeIndex:u,rowIdx:t,...r},String(t)))),[f,b]=i>0?[x.slice(0,-i),x.slice(-i)]:[x,[]];return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:i>0?o(li,{renderFoldableSection:({isUnfolded:e})=>c(Gp,{controls:p,children:[f,o(ai,{isUnfolded:e,children:b})]}),renderFoldButton:Yi}):o(Gp,{controls:p,children:x})})]})})),Qp=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:h("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?Jp():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Re,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?eg(n):null,a?o(Pe,{richVersion:i,__html:a}):null]})]}))),Jp=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),eg=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),tg=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:n})}):null]}))),ng=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(tg,{prefix:t,unit:n,suffix:l})})})),lg=ht((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=R();return o(g,{className:h("relative flex flex-col",om[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Z(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:M({...c,extraProps:{className:h("w-full",ui(r)),...sm(l)}})})}),{childrenTypes:[]}),ag=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",ig=d((({className:e,title:t,url:n,previewImg:l,...a})=>{const i=R();return c(g,{className:e,defaultPadding:ag(e),...a,children:[o(C,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:U(i)(l?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:U(i)(n)})}):null]})})),rg={AdTile:pt,ApplicationForm:Za,ApplicationLeadForm:ci,BankAccountFiltration:hr,BenefitsBlock:fr,BonusBenefitsBlock:wr,ButtonsBlock:Cr,CalculatorBonus:jr,CalculatorBusinessDeposit:as,CalculatorCredit:ys,CalculatorDeposit:_s,CalculatorRefinancing:qs,CardTransfer:Qs,Carousel:ro,CarouselCard:mo,CarouselCatalogCard:uo,CarouselLinks:xo,CarouselRecommendationCard:Co,CarouselTariffsCard:Io,ContactsBlock:Po,DepositFiltration:Oo,Depository:Qo,ErrorBlock:ec,ExchangeRateTile:Ic,Footer:ud,GracePeriod:pd,GrantSupport:bd,Header:am,Headline:C,HorizontalLayout:cm,ImgBlock:dm,InsuranceAmountBlock:fm,InvestmentInfo:Nm,LinkDocs:Am,MobileAppTile:jm,MortgageFiltration:oh,OfficesAtmsMap:Du,Placeholder:Au,ProductBlock:ut,ProductGallery:_u,RepresentativeOfficeInfo:ju,RichTextBlock:Fu,RollupItem:Ku,SafeDepositRental:gp,StepsBlock:yp,StickyBottomMenu:wp,TabsLayout:Pp,TariffsTable:Zp,TextBlock:Qp,UnitBlock:ng,VerticalLayout:lg,Video:ig},sg=me((()=>{a((()=>{Tt()}),[]);const e=Dt();nn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");Ct({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),og="cookie",cg=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=tn();Xc((()=>{globalThis.localStorage?.getItem(og)||n()}),[],3e3);const a=i((()=>{globalThis.localStorage?.setItem(og,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Pe,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o($a,{className:"bg-main-gray rounded-md w-11 h-11",onClose:a})})]})}):null}));function dg(e){throw new Error(e)}const mg=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(n),o()}),[n,e]),d=i((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return a((()=>ce.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:dg(e)}}))),[c,d]),n},hg=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=mg({onCloseAll:e,onClose:t}),{close:l}=de(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return nn(globalThis.document,"keydown",r),a((()=>{n.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[n]),n.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},l)=>o("div",{className:h("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==n.length-1}),children:e},String(t||l))))}):null})),ug=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);a((()=>ce.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:dg(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return nn(globalThis.document,"keydown",r),e?o("div",{className:h("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),pg="header",gg="footer",xg="sticky-footer",fg={},bg=d((({className:e,data:t=fg,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=mt(s,r);sg();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(a?.header,{...m,slotName:pg})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[M({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(a?.footer,{...m,slotName:gg})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(a?.["sticky-footer"],{...m,slotName:xg})}):null,o(hg,{}),o(ug,{}),o(cg,{__html:d?.cookieContent?.__html})]})}));Object.assign(bg,{childrenTypes:[],slots:()=>[pg,gg,xg]});e.Blocks=rg,e.ContentPage=bg,e.handlerDecorator=me,e.joinList=er,e.packageVersion="0.14.577",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=R,Object.defineProperty(e,"__esModule",{value:!0})}));