@redneckz/wildless-cms-uni-blocks 0.14.604 → 0.14.606

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 (614) hide show
  1. package/bundle/api/OutServiceAPI/OutServiceAPI.d.ts +8 -0
  2. package/bundle/api/RetailAPI/StatusType.d.ts +1 -0
  3. package/bundle/api/RetailAPI/checkCaptcha.d.ts +4 -0
  4. package/bundle/api/RetailAPI/checkCode.d.ts +12 -0
  5. package/bundle/api/RetailAPI/createCaptcha.d.ts +1 -0
  6. package/bundle/api/RetailAPI/createDraftTask.d.ts +9 -0
  7. package/bundle/api/RetailAPI/createUserProfile.d.ts +9 -0
  8. package/bundle/api/RetailAPI/doRequest.d.ts +1 -0
  9. package/bundle/api/RetailAPI/feedbackById.d.ts +1 -0
  10. package/bundle/api/RetailAPI/sendCode.d.ts +10 -0
  11. package/bundle/api/RetailAPI/updateUserProfile.d.ts +20 -0
  12. package/bundle/api/RetailAPI/updateUserTask.d.ts +36 -0
  13. package/{dist/api/RetailApi → bundle/api/RetailAPI}/utils/getUpdateUserProfile.d.ts +1 -1
  14. package/bundle/api/RetailAPI/utils/getUpdateUserTask.d.ts +9 -0
  15. package/bundle/api/apiBaseUrl.d.ts +1 -0
  16. package/bundle/bundle.umd.js +106 -95
  17. package/bundle/bundle.umd.min.js +1 -1
  18. package/bundle/components/ApplicationForm/getRegionUrl.d.ts +1 -1
  19. package/bundle/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +8 -0
  20. package/bundle/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +1 -0
  21. package/bundle/ui-kit/FormField/constants.d.ts +0 -1
  22. package/dist/api/FileStorage.js +3 -3
  23. package/dist/api/FileStorage.js.map +1 -1
  24. package/dist/api/LeadServiceAPI.js +2 -1
  25. package/dist/api/LeadServiceAPI.js.map +1 -1
  26. package/dist/api/OutServiceAPI/OutServiceAPI.d.ts +8 -0
  27. package/dist/api/OutServiceAPI/OutServiceAPI.js +12 -0
  28. package/dist/api/OutServiceAPI/OutServiceAPI.js.map +1 -0
  29. package/dist/api/RetailAPI/StatusType.d.ts +1 -0
  30. package/dist/api/{RetailApi/RetailApiTypes.js → RetailAPI/StatusType.js} +1 -1
  31. package/dist/api/RetailAPI/StatusType.js.map +1 -0
  32. package/dist/api/RetailAPI/checkCaptcha.d.ts +4 -0
  33. package/dist/api/RetailAPI/checkCaptcha.js +6 -0
  34. package/dist/api/RetailAPI/checkCaptcha.js.map +1 -0
  35. package/dist/api/RetailAPI/checkCode.d.ts +12 -0
  36. package/dist/api/RetailAPI/checkCode.js +10 -0
  37. package/dist/api/RetailAPI/checkCode.js.map +1 -0
  38. package/dist/api/RetailAPI/createCaptcha.d.ts +1 -0
  39. package/dist/api/RetailAPI/createCaptcha.js +6 -0
  40. package/dist/api/RetailAPI/createCaptcha.js.map +1 -0
  41. package/dist/api/RetailAPI/createDraftTask.d.ts +9 -0
  42. package/dist/api/RetailAPI/createDraftTask.js +6 -0
  43. package/dist/api/RetailAPI/createDraftTask.js.map +1 -0
  44. package/dist/api/RetailAPI/createUserProfile.d.ts +9 -0
  45. package/dist/api/RetailAPI/createUserProfile.js +6 -0
  46. package/dist/api/RetailAPI/createUserProfile.js.map +1 -0
  47. package/dist/api/RetailAPI/doRequest.d.ts +1 -0
  48. package/dist/api/RetailAPI/doRequest.js +23 -0
  49. package/dist/api/RetailAPI/doRequest.js.map +1 -0
  50. package/dist/api/RetailAPI/feedbackById.d.ts +1 -0
  51. package/dist/api/RetailAPI/feedbackById.js +9 -0
  52. package/dist/api/RetailAPI/feedbackById.js.map +1 -0
  53. package/dist/api/RetailAPI/sendCode.d.ts +10 -0
  54. package/dist/api/RetailAPI/sendCode.js +6 -0
  55. package/dist/api/RetailAPI/sendCode.js.map +1 -0
  56. package/dist/api/RetailAPI/updateUserProfile.d.ts +20 -0
  57. package/dist/api/RetailAPI/updateUserProfile.js +6 -0
  58. package/dist/api/RetailAPI/updateUserProfile.js.map +1 -0
  59. package/dist/api/RetailAPI/updateUserTask.d.ts +36 -0
  60. package/dist/api/RetailAPI/updateUserTask.js +6 -0
  61. package/dist/api/RetailAPI/updateUserTask.js.map +1 -0
  62. package/{lib/api/RetailApi → dist/api/RetailAPI}/utils/getUpdateUserProfile.d.ts +1 -1
  63. package/dist/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js.map +1 -1
  64. package/dist/api/RetailAPI/utils/getUpdateUserTask.d.ts +9 -0
  65. package/dist/api/{RetailApi → RetailAPI}/utils/getUpdateUserTask.js +7 -8
  66. package/dist/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -0
  67. package/dist/api/apiBaseUrl.d.ts +1 -0
  68. package/dist/api/apiBaseUrl.js +4 -0
  69. package/dist/api/apiBaseUrl.js.map +1 -0
  70. package/dist/api/dadataHints/dadataHints.js +2 -1
  71. package/dist/api/dadataHints/dadataHints.js.map +1 -1
  72. package/dist/components/ApplicationForm/getRegionUrl.d.ts +1 -1
  73. package/dist/components/ApplicationForm/getRegionUrl.js +3 -2
  74. package/dist/components/ApplicationForm/getRegionUrl.js.map +1 -1
  75. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -7
  76. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  77. package/dist/components/CalculatorBusinessDeposit/useBusinessDepositRates.js +2 -1
  78. package/dist/components/CalculatorBusinessDeposit/useBusinessDepositRates.js.map +1 -1
  79. package/dist/components/Depository/DepositoryItem.js +2 -1
  80. package/dist/components/Depository/DepositoryItem.js.map +1 -1
  81. package/dist/components/Depository/useDepository.js +2 -1
  82. package/dist/components/Depository/useDepository.js.map +1 -1
  83. package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +2 -1
  84. package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
  85. package/dist/components/OfficesAtmsMap/useAtms.js +2 -1
  86. package/dist/components/OfficesAtmsMap/useAtms.js.map +1 -1
  87. package/dist/components/OfficesAtmsMap/useOffices.js +3 -2
  88. package/dist/components/OfficesAtmsMap/useOffices.js.map +1 -1
  89. package/dist/components/SafeDepositRental/useGetRegions.js +2 -1
  90. package/dist/components/SafeDepositRental/useGetRegions.js.map +1 -1
  91. package/dist/components/SafeDepositRental/useSafeBoxes.js +2 -1
  92. package/dist/components/SafeDepositRental/useSafeBoxes.js.map +1 -1
  93. package/dist/hooks/useBranches.js +2 -1
  94. package/dist/hooks/useBranches.js.map +1 -1
  95. package/dist/hooks/useBranchesByRegions.js +4 -3
  96. package/dist/hooks/useBranchesByRegions.js.map +1 -1
  97. package/dist/hooks/useLeadFormData.js +1 -1
  98. package/dist/hooks/useLeadFormData.js.map +1 -1
  99. package/dist/hooks/useLocation.js +2 -1
  100. package/dist/hooks/useLocation.js.map +1 -1
  101. package/dist/hooks/useRegions.js +2 -1
  102. package/dist/hooks/useRegions.js.map +1 -1
  103. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
  104. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  105. package/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +8 -0
  106. package/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js +16 -0
  107. package/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +1 -0
  108. package/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +1 -0
  109. package/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js +9 -0
  110. package/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +1 -0
  111. package/dist/ui-kit/Checkbox/getDocument.js +3 -3
  112. package/dist/ui-kit/Checkbox/getDocument.js.map +1 -1
  113. package/dist/ui-kit/FormField/Fields/LocalitiesField.js +4 -3
  114. package/dist/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  115. package/dist/ui-kit/FormField/constants.d.ts +0 -1
  116. package/dist/ui-kit/FormField/constants.js +1 -2
  117. package/dist/ui-kit/FormField/constants.js.map +1 -1
  118. package/dist/ui-kit/InfoCard/InfoCard.js +1 -1
  119. package/dist/ui-kit/InfoCard/InfoCard.js.map +1 -1
  120. package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js +2 -2
  121. package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -1
  122. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -2
  123. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  124. package/lib/api/FileStorage.js +1 -1
  125. package/lib/api/FileStorage.js.map +1 -1
  126. package/lib/api/LeadServiceAPI.js +2 -1
  127. package/lib/api/LeadServiceAPI.js.map +1 -1
  128. package/lib/api/OutServiceAPI/OutServiceAPI.d.ts +8 -0
  129. package/lib/api/OutServiceAPI/OutServiceAPI.js +9 -0
  130. package/lib/api/OutServiceAPI/OutServiceAPI.js.map +1 -0
  131. package/lib/api/RetailAPI/StatusType.d.ts +1 -0
  132. package/lib/api/RetailAPI/StatusType.js +2 -0
  133. package/lib/api/RetailAPI/StatusType.js.map +1 -0
  134. package/lib/api/RetailAPI/checkCaptcha.d.ts +4 -0
  135. package/lib/api/RetailAPI/checkCaptcha.js +3 -0
  136. package/lib/api/RetailAPI/checkCaptcha.js.map +1 -0
  137. package/lib/api/RetailAPI/checkCode.d.ts +12 -0
  138. package/lib/api/RetailAPI/checkCode.js +7 -0
  139. package/lib/api/RetailAPI/checkCode.js.map +1 -0
  140. package/lib/api/RetailAPI/createCaptcha.d.ts +1 -0
  141. package/lib/api/RetailAPI/createCaptcha.js +3 -0
  142. package/lib/api/RetailAPI/createCaptcha.js.map +1 -0
  143. package/lib/api/RetailAPI/createDraftTask.d.ts +9 -0
  144. package/lib/api/RetailAPI/createDraftTask.js +3 -0
  145. package/lib/api/RetailAPI/createDraftTask.js.map +1 -0
  146. package/lib/api/RetailAPI/createUserProfile.d.ts +9 -0
  147. package/lib/api/RetailAPI/createUserProfile.js +3 -0
  148. package/lib/api/RetailAPI/createUserProfile.js.map +1 -0
  149. package/lib/api/RetailAPI/doRequest.d.ts +1 -0
  150. package/lib/api/RetailAPI/doRequest.js +20 -0
  151. package/lib/api/RetailAPI/doRequest.js.map +1 -0
  152. package/lib/api/RetailAPI/feedbackById.d.ts +1 -0
  153. package/lib/api/RetailAPI/feedbackById.js +6 -0
  154. package/lib/api/RetailAPI/feedbackById.js.map +1 -0
  155. package/lib/api/RetailAPI/sendCode.d.ts +10 -0
  156. package/lib/api/RetailAPI/sendCode.js +3 -0
  157. package/lib/api/RetailAPI/sendCode.js.map +1 -0
  158. package/lib/api/RetailAPI/updateUserProfile.d.ts +20 -0
  159. package/lib/api/RetailAPI/updateUserProfile.js +3 -0
  160. package/lib/api/RetailAPI/updateUserProfile.js.map +1 -0
  161. package/lib/api/RetailAPI/updateUserTask.d.ts +36 -0
  162. package/lib/api/RetailAPI/updateUserTask.js +3 -0
  163. package/lib/api/RetailAPI/updateUserTask.js.map +1 -0
  164. package/{bundle/api/RetailApi → lib/api/RetailAPI}/utils/getUpdateUserProfile.d.ts +1 -1
  165. package/lib/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js.map +1 -1
  166. package/lib/api/RetailAPI/utils/getUpdateUserTask.d.ts +9 -0
  167. package/lib/api/{RetailApi → RetailAPI}/utils/getUpdateUserTask.js +7 -8
  168. package/lib/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -0
  169. package/lib/api/apiBaseUrl.d.ts +1 -0
  170. package/lib/api/apiBaseUrl.js +2 -0
  171. package/lib/api/apiBaseUrl.js.map +1 -0
  172. package/lib/api/dadataHints/dadataHints.js +2 -1
  173. package/lib/api/dadataHints/dadataHints.js.map +1 -1
  174. package/lib/common.css +1 -1
  175. package/lib/components/ApplicationForm/getRegionUrl.d.ts +1 -1
  176. package/lib/components/ApplicationForm/getRegionUrl.js +2 -1
  177. package/lib/components/ApplicationForm/getRegionUrl.js.map +1 -1
  178. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -7
  179. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  180. package/lib/components/CalculatorBusinessDeposit/useBusinessDepositRates.js +2 -1
  181. package/lib/components/CalculatorBusinessDeposit/useBusinessDepositRates.js.map +1 -1
  182. package/lib/components/Depository/DepositoryItem.js +2 -1
  183. package/lib/components/Depository/DepositoryItem.js.map +1 -1
  184. package/lib/components/Depository/useDepository.js +2 -1
  185. package/lib/components/Depository/useDepository.js.map +1 -1
  186. package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +2 -1
  187. package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
  188. package/lib/components/OfficesAtmsMap/useAtms.js +2 -1
  189. package/lib/components/OfficesAtmsMap/useAtms.js.map +1 -1
  190. package/lib/components/OfficesAtmsMap/useOffices.js +3 -2
  191. package/lib/components/OfficesAtmsMap/useOffices.js.map +1 -1
  192. package/lib/components/SafeDepositRental/useGetRegions.js +2 -1
  193. package/lib/components/SafeDepositRental/useGetRegions.js.map +1 -1
  194. package/lib/components/SafeDepositRental/useSafeBoxes.js +2 -1
  195. package/lib/components/SafeDepositRental/useSafeBoxes.js.map +1 -1
  196. package/lib/hooks/useBranches.js +2 -1
  197. package/lib/hooks/useBranches.js.map +1 -1
  198. package/lib/hooks/useBranchesByRegions.js +4 -3
  199. package/lib/hooks/useBranchesByRegions.js.map +1 -1
  200. package/lib/hooks/useLeadFormData.js +1 -1
  201. package/lib/hooks/useLeadFormData.js.map +1 -1
  202. package/lib/hooks/useLocation.js +2 -1
  203. package/lib/hooks/useLocation.js.map +1 -1
  204. package/lib/hooks/useRegions.js +2 -1
  205. package/lib/hooks/useRegions.js.map +1 -1
  206. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
  207. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  208. package/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +8 -0
  209. package/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js +13 -0
  210. package/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +1 -0
  211. package/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +1 -0
  212. package/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js +6 -0
  213. package/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +1 -0
  214. package/lib/ui-kit/Checkbox/getDocument.js +3 -3
  215. package/lib/ui-kit/Checkbox/getDocument.js.map +1 -1
  216. package/lib/ui-kit/FormField/Fields/LocalitiesField.js +4 -3
  217. package/lib/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  218. package/lib/ui-kit/FormField/constants.d.ts +0 -1
  219. package/lib/ui-kit/FormField/constants.js +0 -1
  220. package/lib/ui-kit/FormField/constants.js.map +1 -1
  221. package/lib/ui-kit/InfoCard/InfoCard.js +1 -1
  222. package/lib/ui-kit/InfoCard/InfoCard.js.map +1 -1
  223. package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js +2 -2
  224. package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -1
  225. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -2
  226. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  227. package/mobile/bundle/api/OutServiceAPI/OutServiceAPI.d.ts +8 -0
  228. package/mobile/bundle/api/RetailAPI/StatusType.d.ts +1 -0
  229. package/mobile/bundle/api/RetailAPI/checkCaptcha.d.ts +4 -0
  230. package/mobile/bundle/api/RetailAPI/checkCode.d.ts +12 -0
  231. package/mobile/bundle/api/RetailAPI/createCaptcha.d.ts +1 -0
  232. package/mobile/bundle/api/RetailAPI/createDraftTask.d.ts +9 -0
  233. package/mobile/bundle/api/RetailAPI/createUserProfile.d.ts +9 -0
  234. package/mobile/bundle/api/RetailAPI/doRequest.d.ts +1 -0
  235. package/mobile/bundle/api/RetailAPI/feedbackById.d.ts +1 -0
  236. package/mobile/bundle/api/RetailAPI/sendCode.d.ts +10 -0
  237. package/mobile/bundle/api/RetailAPI/updateUserProfile.d.ts +20 -0
  238. package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +36 -0
  239. package/mobile/bundle/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.d.ts +1 -1
  240. package/mobile/bundle/api/RetailAPI/utils/getUpdateUserTask.d.ts +9 -0
  241. package/mobile/bundle/api/apiBaseUrl.d.ts +1 -0
  242. package/mobile/bundle/bundle.umd.js +106 -95
  243. package/mobile/bundle/bundle.umd.min.js +1 -1
  244. package/mobile/bundle/components/ApplicationForm/getRegionUrl.d.ts +1 -1
  245. package/mobile/bundle/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +8 -0
  246. package/mobile/bundle/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +1 -0
  247. package/mobile/bundle/ui-kit/FormField/constants.d.ts +0 -1
  248. package/mobile/dist/api/FileStorage.js +3 -3
  249. package/mobile/dist/api/FileStorage.js.map +1 -1
  250. package/mobile/dist/api/LeadServiceAPI.js +2 -1
  251. package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
  252. package/mobile/dist/api/OutServiceAPI/OutServiceAPI.d.ts +8 -0
  253. package/mobile/dist/api/OutServiceAPI/OutServiceAPI.js +12 -0
  254. package/mobile/dist/api/OutServiceAPI/OutServiceAPI.js.map +1 -0
  255. package/mobile/dist/api/RetailAPI/StatusType.d.ts +1 -0
  256. package/mobile/dist/api/{RetailApi/RetailApiTypes.js → RetailAPI/StatusType.js} +1 -1
  257. package/mobile/dist/api/RetailAPI/StatusType.js.map +1 -0
  258. package/mobile/dist/api/RetailAPI/checkCaptcha.d.ts +4 -0
  259. package/mobile/dist/api/RetailAPI/checkCaptcha.js +6 -0
  260. package/mobile/dist/api/RetailAPI/checkCaptcha.js.map +1 -0
  261. package/mobile/dist/api/RetailAPI/checkCode.d.ts +12 -0
  262. package/mobile/dist/api/RetailAPI/checkCode.js +10 -0
  263. package/mobile/dist/api/RetailAPI/checkCode.js.map +1 -0
  264. package/mobile/dist/api/RetailAPI/createCaptcha.d.ts +1 -0
  265. package/mobile/dist/api/RetailAPI/createCaptcha.js +6 -0
  266. package/mobile/dist/api/RetailAPI/createCaptcha.js.map +1 -0
  267. package/mobile/dist/api/RetailAPI/createDraftTask.d.ts +9 -0
  268. package/mobile/dist/api/RetailAPI/createDraftTask.js +6 -0
  269. package/mobile/dist/api/RetailAPI/createDraftTask.js.map +1 -0
  270. package/mobile/dist/api/RetailAPI/createUserProfile.d.ts +9 -0
  271. package/mobile/dist/api/RetailAPI/createUserProfile.js +6 -0
  272. package/mobile/dist/api/RetailAPI/createUserProfile.js.map +1 -0
  273. package/mobile/dist/api/RetailAPI/doRequest.d.ts +1 -0
  274. package/mobile/dist/api/RetailAPI/doRequest.js +23 -0
  275. package/mobile/dist/api/RetailAPI/doRequest.js.map +1 -0
  276. package/mobile/dist/api/RetailAPI/feedbackById.d.ts +1 -0
  277. package/mobile/dist/api/RetailAPI/feedbackById.js +9 -0
  278. package/mobile/dist/api/RetailAPI/feedbackById.js.map +1 -0
  279. package/mobile/dist/api/RetailAPI/sendCode.d.ts +10 -0
  280. package/mobile/dist/api/RetailAPI/sendCode.js +6 -0
  281. package/mobile/dist/api/RetailAPI/sendCode.js.map +1 -0
  282. package/mobile/dist/api/RetailAPI/updateUserProfile.d.ts +20 -0
  283. package/mobile/dist/api/RetailAPI/updateUserProfile.js +6 -0
  284. package/mobile/dist/api/RetailAPI/updateUserProfile.js.map +1 -0
  285. package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +36 -0
  286. package/mobile/dist/api/RetailAPI/updateUserTask.js +6 -0
  287. package/mobile/dist/api/RetailAPI/updateUserTask.js.map +1 -0
  288. package/mobile/dist/api/RetailAPI/utils/getUpdateUserProfile.d.ts +3 -0
  289. package/mobile/dist/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js.map +1 -1
  290. package/mobile/dist/api/RetailAPI/utils/getUpdateUserTask.d.ts +9 -0
  291. package/mobile/dist/api/{RetailApi → RetailAPI}/utils/getUpdateUserTask.js +7 -8
  292. package/mobile/dist/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -0
  293. package/mobile/dist/api/apiBaseUrl.d.ts +1 -0
  294. package/mobile/dist/api/apiBaseUrl.js +4 -0
  295. package/mobile/dist/api/apiBaseUrl.js.map +1 -0
  296. package/mobile/dist/api/dadataHints/dadataHints.js +2 -1
  297. package/mobile/dist/api/dadataHints/dadataHints.js.map +1 -1
  298. package/mobile/dist/components/ApplicationForm/getRegionUrl.d.ts +1 -1
  299. package/mobile/dist/components/ApplicationForm/getRegionUrl.js +3 -2
  300. package/mobile/dist/components/ApplicationForm/getRegionUrl.js.map +1 -1
  301. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -7
  302. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  303. package/mobile/dist/components/CalculatorBusinessDeposit/useBusinessDepositRates.js +2 -1
  304. package/mobile/dist/components/CalculatorBusinessDeposit/useBusinessDepositRates.js.map +1 -1
  305. package/mobile/dist/components/Depository/DepositoryItem.js +2 -1
  306. package/mobile/dist/components/Depository/DepositoryItem.js.map +1 -1
  307. package/mobile/dist/components/Depository/useDepository.js +2 -1
  308. package/mobile/dist/components/Depository/useDepository.js.map +1 -1
  309. package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +2 -1
  310. package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
  311. package/mobile/dist/components/OfficesAtmsMap/useAtms.js +2 -1
  312. package/mobile/dist/components/OfficesAtmsMap/useAtms.js.map +1 -1
  313. package/mobile/dist/components/OfficesAtmsMap/useOffices.js +3 -2
  314. package/mobile/dist/components/OfficesAtmsMap/useOffices.js.map +1 -1
  315. package/mobile/dist/components/SafeDepositRental/useGetRegions.js +2 -1
  316. package/mobile/dist/components/SafeDepositRental/useGetRegions.js.map +1 -1
  317. package/mobile/dist/components/SafeDepositRental/useSafeBoxes.js +2 -1
  318. package/mobile/dist/components/SafeDepositRental/useSafeBoxes.js.map +1 -1
  319. package/mobile/dist/hooks/useBranches.js +2 -1
  320. package/mobile/dist/hooks/useBranches.js.map +1 -1
  321. package/mobile/dist/hooks/useBranchesByRegions.js +4 -3
  322. package/mobile/dist/hooks/useBranchesByRegions.js.map +1 -1
  323. package/mobile/dist/hooks/useLeadFormData.js +1 -1
  324. package/mobile/dist/hooks/useLeadFormData.js.map +1 -1
  325. package/mobile/dist/hooks/useLocation.js +2 -1
  326. package/mobile/dist/hooks/useLocation.js.map +1 -1
  327. package/mobile/dist/hooks/useRegions.js +2 -1
  328. package/mobile/dist/hooks/useRegions.js.map +1 -1
  329. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
  330. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  331. package/mobile/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +8 -0
  332. package/mobile/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js +16 -0
  333. package/mobile/dist/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +1 -0
  334. package/mobile/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +1 -0
  335. package/mobile/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js +9 -0
  336. package/mobile/dist/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +1 -0
  337. package/mobile/dist/ui-kit/Checkbox/getDocument.js +3 -3
  338. package/mobile/dist/ui-kit/Checkbox/getDocument.js.map +1 -1
  339. package/mobile/dist/ui-kit/FormField/Fields/LocalitiesField.js +4 -3
  340. package/mobile/dist/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  341. package/mobile/dist/ui-kit/FormField/constants.d.ts +0 -1
  342. package/mobile/dist/ui-kit/FormField/constants.js +1 -2
  343. package/mobile/dist/ui-kit/FormField/constants.js.map +1 -1
  344. package/mobile/dist/ui-kit/InfoCard/InfoCard.js +1 -1
  345. package/mobile/dist/ui-kit/InfoCard/InfoCard.js.map +1 -1
  346. package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js +2 -2
  347. package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -1
  348. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -2
  349. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  350. package/mobile/lib/api/FileStorage.js +1 -1
  351. package/mobile/lib/api/FileStorage.js.map +1 -1
  352. package/mobile/lib/api/LeadServiceAPI.js +2 -1
  353. package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
  354. package/mobile/lib/api/OutServiceAPI/OutServiceAPI.d.ts +8 -0
  355. package/mobile/lib/api/OutServiceAPI/OutServiceAPI.js +9 -0
  356. package/mobile/lib/api/OutServiceAPI/OutServiceAPI.js.map +1 -0
  357. package/mobile/lib/api/RetailAPI/StatusType.d.ts +1 -0
  358. package/mobile/lib/api/RetailAPI/StatusType.js +2 -0
  359. package/mobile/lib/api/RetailAPI/StatusType.js.map +1 -0
  360. package/mobile/lib/api/RetailAPI/checkCaptcha.d.ts +4 -0
  361. package/mobile/lib/api/RetailAPI/checkCaptcha.js +3 -0
  362. package/mobile/lib/api/RetailAPI/checkCaptcha.js.map +1 -0
  363. package/mobile/lib/api/RetailAPI/checkCode.d.ts +12 -0
  364. package/mobile/lib/api/RetailAPI/checkCode.js +7 -0
  365. package/mobile/lib/api/RetailAPI/checkCode.js.map +1 -0
  366. package/mobile/lib/api/RetailAPI/createCaptcha.d.ts +1 -0
  367. package/mobile/lib/api/RetailAPI/createCaptcha.js +3 -0
  368. package/mobile/lib/api/RetailAPI/createCaptcha.js.map +1 -0
  369. package/mobile/lib/api/RetailAPI/createDraftTask.d.ts +9 -0
  370. package/mobile/lib/api/RetailAPI/createDraftTask.js +3 -0
  371. package/mobile/lib/api/RetailAPI/createDraftTask.js.map +1 -0
  372. package/mobile/lib/api/RetailAPI/createUserProfile.d.ts +9 -0
  373. package/mobile/lib/api/RetailAPI/createUserProfile.js +3 -0
  374. package/mobile/lib/api/RetailAPI/createUserProfile.js.map +1 -0
  375. package/mobile/lib/api/RetailAPI/doRequest.d.ts +1 -0
  376. package/mobile/lib/api/RetailAPI/doRequest.js +20 -0
  377. package/mobile/lib/api/RetailAPI/doRequest.js.map +1 -0
  378. package/mobile/lib/api/RetailAPI/feedbackById.d.ts +1 -0
  379. package/mobile/lib/api/RetailAPI/feedbackById.js +6 -0
  380. package/mobile/lib/api/RetailAPI/feedbackById.js.map +1 -0
  381. package/mobile/lib/api/RetailAPI/sendCode.d.ts +10 -0
  382. package/mobile/lib/api/RetailAPI/sendCode.js +3 -0
  383. package/mobile/lib/api/RetailAPI/sendCode.js.map +1 -0
  384. package/mobile/lib/api/RetailAPI/updateUserProfile.d.ts +20 -0
  385. package/mobile/lib/api/RetailAPI/updateUserProfile.js +3 -0
  386. package/mobile/lib/api/RetailAPI/updateUserProfile.js.map +1 -0
  387. package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +36 -0
  388. package/mobile/lib/api/RetailAPI/updateUserTask.js +3 -0
  389. package/mobile/lib/api/RetailAPI/updateUserTask.js.map +1 -0
  390. package/mobile/lib/api/RetailAPI/utils/getUpdateUserProfile.d.ts +3 -0
  391. package/mobile/lib/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js.map +1 -1
  392. package/mobile/lib/api/RetailAPI/utils/getUpdateUserTask.d.ts +9 -0
  393. package/mobile/lib/api/{RetailApi → RetailAPI}/utils/getUpdateUserTask.js +7 -8
  394. package/mobile/lib/api/RetailAPI/utils/getUpdateUserTask.js.map +1 -0
  395. package/mobile/lib/api/apiBaseUrl.d.ts +1 -0
  396. package/mobile/lib/api/apiBaseUrl.js +2 -0
  397. package/mobile/lib/api/apiBaseUrl.js.map +1 -0
  398. package/mobile/lib/api/dadataHints/dadataHints.js +2 -1
  399. package/mobile/lib/api/dadataHints/dadataHints.js.map +1 -1
  400. package/mobile/lib/common.css +1 -1
  401. package/mobile/lib/components/ApplicationForm/getRegionUrl.d.ts +1 -1
  402. package/mobile/lib/components/ApplicationForm/getRegionUrl.js +2 -1
  403. package/mobile/lib/components/ApplicationForm/getRegionUrl.js.map +1 -1
  404. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -7
  405. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  406. package/mobile/lib/components/CalculatorBusinessDeposit/useBusinessDepositRates.js +2 -1
  407. package/mobile/lib/components/CalculatorBusinessDeposit/useBusinessDepositRates.js.map +1 -1
  408. package/mobile/lib/components/Depository/DepositoryItem.js +2 -1
  409. package/mobile/lib/components/Depository/DepositoryItem.js.map +1 -1
  410. package/mobile/lib/components/Depository/useDepository.js +2 -1
  411. package/mobile/lib/components/Depository/useDepository.js.map +1 -1
  412. package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +2 -1
  413. package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
  414. package/mobile/lib/components/OfficesAtmsMap/useAtms.js +2 -1
  415. package/mobile/lib/components/OfficesAtmsMap/useAtms.js.map +1 -1
  416. package/mobile/lib/components/OfficesAtmsMap/useOffices.js +3 -2
  417. package/mobile/lib/components/OfficesAtmsMap/useOffices.js.map +1 -1
  418. package/mobile/lib/components/SafeDepositRental/useGetRegions.js +2 -1
  419. package/mobile/lib/components/SafeDepositRental/useGetRegions.js.map +1 -1
  420. package/mobile/lib/components/SafeDepositRental/useSafeBoxes.js +2 -1
  421. package/mobile/lib/components/SafeDepositRental/useSafeBoxes.js.map +1 -1
  422. package/mobile/lib/hooks/useBranches.js +2 -1
  423. package/mobile/lib/hooks/useBranches.js.map +1 -1
  424. package/mobile/lib/hooks/useBranchesByRegions.js +4 -3
  425. package/mobile/lib/hooks/useBranchesByRegions.js.map +1 -1
  426. package/mobile/lib/hooks/useLeadFormData.js +1 -1
  427. package/mobile/lib/hooks/useLeadFormData.js.map +1 -1
  428. package/mobile/lib/hooks/useLocation.js +2 -1
  429. package/mobile/lib/hooks/useLocation.js.map +1 -1
  430. package/mobile/lib/hooks/useRegions.js +2 -1
  431. package/mobile/lib/hooks/useRegions.js.map +1 -1
  432. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +4 -4
  433. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
  434. package/mobile/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.d.ts +8 -0
  435. package/mobile/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js +13 -0
  436. package/mobile/lib/ui-kit/CaptchaDialog/handleCheckCaptcha.js.map +1 -0
  437. package/mobile/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.d.ts +1 -0
  438. package/mobile/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js +6 -0
  439. package/mobile/lib/ui-kit/CaptchaDialog/handleCreateCaptcha.js.map +1 -0
  440. package/mobile/lib/ui-kit/Checkbox/getDocument.js +3 -3
  441. package/mobile/lib/ui-kit/Checkbox/getDocument.js.map +1 -1
  442. package/mobile/lib/ui-kit/FormField/Fields/LocalitiesField.js +4 -3
  443. package/mobile/lib/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  444. package/mobile/lib/ui-kit/FormField/constants.d.ts +0 -1
  445. package/mobile/lib/ui-kit/FormField/constants.js +0 -1
  446. package/mobile/lib/ui-kit/FormField/constants.js.map +1 -1
  447. package/mobile/lib/ui-kit/InfoCard/InfoCard.js +1 -1
  448. package/mobile/lib/ui-kit/InfoCard/InfoCard.js.map +1 -1
  449. package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js +2 -2
  450. package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -1
  451. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +2 -2
  452. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
  453. package/mobile/src/api/FileStorage.ts +2 -1
  454. package/mobile/src/api/LeadServiceAPI.ts +2 -1
  455. package/mobile/src/api/OutServiceAPI/OutServiceAPI.ts +20 -0
  456. package/mobile/src/api/RetailAPI/StatusType.ts +1 -0
  457. package/mobile/src/api/RetailAPI/checkCaptcha.ts +8 -0
  458. package/mobile/src/api/RetailAPI/checkCode.ts +22 -0
  459. package/mobile/src/api/RetailAPI/createCaptcha.ts +4 -0
  460. package/mobile/src/api/RetailAPI/createDraftTask.ts +14 -0
  461. package/mobile/src/api/RetailAPI/createUserProfile.ts +13 -0
  462. package/mobile/src/api/RetailAPI/doRequest.ts +31 -0
  463. package/mobile/src/api/RetailAPI/feedbackById.ts +10 -0
  464. package/mobile/src/api/RetailAPI/sendCode.ts +12 -0
  465. package/mobile/src/api/RetailAPI/updateUserProfile.ts +24 -0
  466. package/mobile/src/api/RetailAPI/updateUserTask.ts +41 -0
  467. package/mobile/src/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.ts +1 -1
  468. package/mobile/src/api/{RetailApi → RetailAPI}/utils/getUpdateUserTask.ts +20 -14
  469. package/mobile/src/api/apiBaseUrl.ts +1 -0
  470. package/mobile/src/api/dadataHints/dadataHints.ts +2 -1
  471. package/mobile/src/components/ApplicationForm/getRegionUrl.tsx +2 -1
  472. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +11 -8
  473. package/mobile/src/components/CalculatorBusinessDeposit/useBusinessDepositRates.ts +2 -1
  474. package/mobile/src/components/Depository/DepositoryItem.tsx +2 -1
  475. package/mobile/src/components/Depository/useDepository.ts +3 -1
  476. package/mobile/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +2 -1
  477. package/mobile/src/components/OfficesAtmsMap/useAtms.ts +2 -1
  478. package/mobile/src/components/OfficesAtmsMap/useOffices.ts +3 -2
  479. package/mobile/src/components/SafeDepositRental/useGetRegions.ts +2 -1
  480. package/mobile/src/components/SafeDepositRental/useSafeBoxes.ts +2 -1
  481. package/mobile/src/hooks/useBranches.ts +2 -1
  482. package/mobile/src/hooks/useBranchesByRegions.ts +4 -3
  483. package/mobile/src/hooks/useLeadFormData.ts +3 -1
  484. package/mobile/src/hooks/useLocation.ts +2 -1
  485. package/mobile/src/hooks/useRegions.ts +2 -1
  486. package/mobile/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +6 -6
  487. package/mobile/src/ui-kit/CaptchaDialog/{checkCaptcha.ts → handleCheckCaptcha.ts} +5 -5
  488. package/mobile/src/ui-kit/CaptchaDialog/handleCreateCaptcha.ts +9 -0
  489. package/mobile/src/ui-kit/Checkbox/getDocument.ts +3 -3
  490. package/mobile/src/ui-kit/FormField/Fields/LocalitiesField.tsx +6 -3
  491. package/mobile/src/ui-kit/FormField/constants.tsx +0 -2
  492. package/mobile/src/ui-kit/InfoCard/InfoCard.tsx +9 -7
  493. package/mobile/src/ui-kit/VerifyPhoneDialog/handleSendCode.ts +2 -2
  494. package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +2 -2
  495. package/package.json +1 -1
  496. package/src/api/FileStorage.ts +2 -1
  497. package/src/api/LeadServiceAPI.ts +2 -1
  498. package/src/api/OutServiceAPI/OutServiceAPI.ts +20 -0
  499. package/src/api/RetailAPI/StatusType.ts +1 -0
  500. package/src/api/RetailAPI/checkCaptcha.ts +8 -0
  501. package/src/api/RetailAPI/checkCode.ts +22 -0
  502. package/src/api/RetailAPI/createCaptcha.ts +4 -0
  503. package/src/api/RetailAPI/createDraftTask.ts +14 -0
  504. package/src/api/RetailAPI/createUserProfile.ts +13 -0
  505. package/src/api/RetailAPI/doRequest.ts +31 -0
  506. package/src/api/RetailAPI/feedbackById.ts +10 -0
  507. package/src/api/RetailAPI/sendCode.ts +12 -0
  508. package/src/api/RetailAPI/updateUserProfile.ts +24 -0
  509. package/src/api/RetailAPI/updateUserTask.ts +41 -0
  510. package/src/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.ts +1 -1
  511. package/src/api/{RetailApi → RetailAPI}/utils/getUpdateUserTask.ts +20 -14
  512. package/src/api/apiBaseUrl.ts +1 -0
  513. package/src/api/dadataHints/dadataHints.ts +2 -1
  514. package/src/components/ApplicationForm/getRegionUrl.tsx +2 -1
  515. package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +11 -8
  516. package/src/components/CalculatorBusinessDeposit/useBusinessDepositRates.ts +2 -1
  517. package/src/components/Depository/DepositoryItem.tsx +2 -1
  518. package/src/components/Depository/useDepository.ts +3 -1
  519. package/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +2 -1
  520. package/src/components/OfficesAtmsMap/useAtms.ts +2 -1
  521. package/src/components/OfficesAtmsMap/useOffices.ts +3 -2
  522. package/src/components/SafeDepositRental/useGetRegions.ts +2 -1
  523. package/src/components/SafeDepositRental/useSafeBoxes.ts +2 -1
  524. package/src/hooks/useBranches.ts +2 -1
  525. package/src/hooks/useBranchesByRegions.ts +4 -3
  526. package/src/hooks/useLeadFormData.ts +3 -1
  527. package/src/hooks/useLocation.ts +2 -1
  528. package/src/hooks/useRegions.ts +2 -1
  529. package/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +6 -6
  530. package/src/ui-kit/CaptchaDialog/{checkCaptcha.ts → handleCheckCaptcha.ts} +5 -5
  531. package/src/ui-kit/CaptchaDialog/handleCreateCaptcha.ts +9 -0
  532. package/src/ui-kit/Checkbox/getDocument.ts +3 -3
  533. package/src/ui-kit/FormField/Fields/LocalitiesField.tsx +6 -3
  534. package/src/ui-kit/FormField/constants.tsx +0 -2
  535. package/src/ui-kit/InfoCard/InfoCard.fixture.tsx +3 -3
  536. package/src/ui-kit/InfoCard/InfoCard.tsx +9 -7
  537. package/src/ui-kit/VerifyPhoneDialog/handleSendCode.ts +2 -2
  538. package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +2 -2
  539. package/bundle/api/RetailApi/RetailApi.d.ts +0 -12
  540. package/bundle/api/RetailApi/RetailApiTypes.d.ts +0 -86
  541. package/bundle/api/RetailApi/utils/getUpdateUserTask.d.ts +0 -2
  542. package/bundle/ui-kit/CaptchaDialog/checkCaptcha.d.ts +0 -8
  543. package/bundle/ui-kit/CaptchaDialog/createCaptcha.d.ts +0 -1
  544. package/dist/api/RetailApi/RetailApi.d.ts +0 -12
  545. package/dist/api/RetailApi/RetailApi.js +0 -44
  546. package/dist/api/RetailApi/RetailApi.js.map +0 -1
  547. package/dist/api/RetailApi/RetailApiTypes.d.ts +0 -86
  548. package/dist/api/RetailApi/RetailApiTypes.js.map +0 -1
  549. package/dist/api/RetailApi/utils/getUpdateUserTask.d.ts +0 -2
  550. package/dist/api/RetailApi/utils/getUpdateUserTask.js.map +0 -1
  551. package/dist/ui-kit/CaptchaDialog/checkCaptcha.d.ts +0 -8
  552. package/dist/ui-kit/CaptchaDialog/checkCaptcha.js +0 -16
  553. package/dist/ui-kit/CaptchaDialog/checkCaptcha.js.map +0 -1
  554. package/dist/ui-kit/CaptchaDialog/createCaptcha.d.ts +0 -1
  555. package/dist/ui-kit/CaptchaDialog/createCaptcha.js +0 -9
  556. package/dist/ui-kit/CaptchaDialog/createCaptcha.js.map +0 -1
  557. package/lib/api/RetailApi/RetailApi.d.ts +0 -12
  558. package/lib/api/RetailApi/RetailApi.js +0 -42
  559. package/lib/api/RetailApi/RetailApi.js.map +0 -1
  560. package/lib/api/RetailApi/RetailApiTypes.d.ts +0 -86
  561. package/lib/api/RetailApi/RetailApiTypes.js +0 -2
  562. package/lib/api/RetailApi/RetailApiTypes.js.map +0 -1
  563. package/lib/api/RetailApi/utils/getUpdateUserTask.d.ts +0 -2
  564. package/lib/api/RetailApi/utils/getUpdateUserTask.js.map +0 -1
  565. package/lib/ui-kit/CaptchaDialog/checkCaptcha.d.ts +0 -8
  566. package/lib/ui-kit/CaptchaDialog/checkCaptcha.js +0 -13
  567. package/lib/ui-kit/CaptchaDialog/checkCaptcha.js.map +0 -1
  568. package/lib/ui-kit/CaptchaDialog/createCaptcha.d.ts +0 -1
  569. package/lib/ui-kit/CaptchaDialog/createCaptcha.js +0 -6
  570. package/lib/ui-kit/CaptchaDialog/createCaptcha.js.map +0 -1
  571. package/mobile/bundle/api/RetailApi/RetailApi.d.ts +0 -12
  572. package/mobile/bundle/api/RetailApi/RetailApiTypes.d.ts +0 -86
  573. package/mobile/bundle/api/RetailApi/utils/getUpdateUserTask.d.ts +0 -2
  574. package/mobile/bundle/ui-kit/CaptchaDialog/checkCaptcha.d.ts +0 -8
  575. package/mobile/bundle/ui-kit/CaptchaDialog/createCaptcha.d.ts +0 -1
  576. package/mobile/dist/api/RetailApi/RetailApi.d.ts +0 -12
  577. package/mobile/dist/api/RetailApi/RetailApi.js +0 -44
  578. package/mobile/dist/api/RetailApi/RetailApi.js.map +0 -1
  579. package/mobile/dist/api/RetailApi/RetailApiTypes.d.ts +0 -86
  580. package/mobile/dist/api/RetailApi/RetailApiTypes.js.map +0 -1
  581. package/mobile/dist/api/RetailApi/utils/getUpdateUserProfile.d.ts +0 -3
  582. package/mobile/dist/api/RetailApi/utils/getUpdateUserTask.d.ts +0 -2
  583. package/mobile/dist/api/RetailApi/utils/getUpdateUserTask.js.map +0 -1
  584. package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.d.ts +0 -8
  585. package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.js +0 -16
  586. package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.js.map +0 -1
  587. package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.d.ts +0 -1
  588. package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.js +0 -9
  589. package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.js.map +0 -1
  590. package/mobile/lib/api/RetailApi/RetailApi.d.ts +0 -12
  591. package/mobile/lib/api/RetailApi/RetailApi.js +0 -42
  592. package/mobile/lib/api/RetailApi/RetailApi.js.map +0 -1
  593. package/mobile/lib/api/RetailApi/RetailApiTypes.d.ts +0 -86
  594. package/mobile/lib/api/RetailApi/RetailApiTypes.js +0 -2
  595. package/mobile/lib/api/RetailApi/RetailApiTypes.js.map +0 -1
  596. package/mobile/lib/api/RetailApi/utils/getUpdateUserProfile.d.ts +0 -3
  597. package/mobile/lib/api/RetailApi/utils/getUpdateUserTask.d.ts +0 -2
  598. package/mobile/lib/api/RetailApi/utils/getUpdateUserTask.js.map +0 -1
  599. package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.d.ts +0 -8
  600. package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.js +0 -13
  601. package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.js.map +0 -1
  602. package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.d.ts +0 -1
  603. package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.js +0 -6
  604. package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.js.map +0 -1
  605. package/mobile/src/api/RetailApi/RetailApi.ts +0 -69
  606. package/mobile/src/api/RetailApi/RetailApiTypes.ts +0 -95
  607. package/mobile/src/ui-kit/CaptchaDialog/createCaptcha.ts +0 -6
  608. package/src/api/RetailApi/RetailApi.ts +0 -69
  609. package/src/api/RetailApi/RetailApiTypes.ts +0 -95
  610. package/src/ui-kit/CaptchaDialog/createCaptcha.ts +0 -6
  611. /package/dist/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js +0 -0
  612. /package/lib/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js +0 -0
  613. /package/mobile/dist/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js +0 -0
  614. /package/mobile/lib/api/{RetailApi → RetailAPI}/utils/getUpdateUserProfile.js +0 -0
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const 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},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=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:u("@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})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(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={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=v[n]||"h3";return o(i,{role:"heading",className:u("font-sans m-0",N[t],e),children:l||a})})),k=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),S={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 h=S[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(w,{className:u("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:l}):null,a?o(k,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...p,children:a}):null]})})),T=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function B(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=T,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:u(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 P=[],R=(e,{key:t,ancestors:n=P,slotName:l=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||P,[r.parent,l]]:n},a)))};function M({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?R(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function D(){return D._impl()}D._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),D.setup=e=>{D._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}}),A=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),F=e=>Boolean(e?.startsWith("#")),O=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),E=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var j=Object.freeze({__proto__:null,isURL:A,isLocalURL:_,isHash:F,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:O,hasPrefix:E});const L="/api/",$=`${L}v1/storage`,U=e=>(t,n)=>{if([!t,A(t),F(t),[z.CDN,L].some((e=>E(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`${$}/${t}/attachment`;const l=t?.startsWith("/");return O(E(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},q={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const d=D(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,h=U(d)(O(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(K,{className:e,children:c("svg",{className:u(Y(r),q[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:h,xlinkHref:h})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},Y=e=>e?"":"w-full h-full",K=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 J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!A(t)?U(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const l=D();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:J(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:J(l)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:u("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(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(Q,{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 ue(){const e=G(X.SITE_URL),t=D(),{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=!E(l,e||"/");l&&!s&&_(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 he=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=fe(e)&&"hidden lg:block";return c("div",{className:u(ge(e),"flex gap-xs"),children:[l?o("div",{className:u(r,se[i]),children:l}):null,fe(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:u(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 u("group/btn items-center justify-center",fe(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},fe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),xe=({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=ue()({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:u})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...he(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:xe({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:u(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:u(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(true);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"},Se=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Ce=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=we(),v=D(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=f&&!y;return c("div",{className:u("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:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Se(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("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:[h,x]}),Ie(M({...b,extraProps:{className:"@container-normal"}})),Se(d,{className:u("@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=>u(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:u("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:u(n,l,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Re=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Me=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),De=(e,t)=>e?o(Me,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ve=(e,t)=>["label"in e?De(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Re(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:u("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Be(n.icon,t):null,o("div",{children:Ve(n)})]}))),Ae=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:u("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:u("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Ve)}):null)),Fe=d((({isTabularBenefits:e,...t})=>o(e?_e:Ae,{...t}))),Oe=e=>Boolean(e?.src||e?.icon),Ee=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("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(je(n))}):null,je=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Le(a,r),d=Le(i,r);return l||a?.icon?o(be,{className:u("basis-full @lg:basis-auto",e),appendLeft:$e({...a,iconVersion:c}),appendRight:$e({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Le=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},$e=e=>Oe(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),qe=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(We)}):null)),We=({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(Me,{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:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ye)}):null)),Ye=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Me,{size:"text-m",font:"font-light",children:e})},String(t)),Ke={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:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],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}),R=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Ce,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Ge(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ee(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?o(Fe,{benefitsVersion:s,isTabularBenefits:d,benefits:R}):null,h?o(Pe,{richVersion:p,__html:h,isDotted:m,itemSize:Ke[i]}):null,T,f?.length?o(qe,{priceList:f}):null,Je(x)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},Je=e=>e?.length?o(He,{tags:e}):null,Ze=e=>Boolean(e&&Array.isArray(e)),Qe=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),et=(e,t)=>{return n=e,Boolean(Qe(n)&&"string"==typeof n.$ref)?t.ref(e):Qe(e)?t.record(e):Ze(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?Qe(e)?e[t]:Ze(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 ut(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 ht=ut((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:u("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(ht,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(f,{})})})),gt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),ft=(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}`}},xt=e=>e?.replace(/[^+\d]/g,"");const bt=e=>e?{phone:xt(e)}:{},yt=(e,t="birthday")=>e?{[t]:ft(e)}:{},vt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Nt=(e,t=!0)=>({[t?"email":"mail"]:e}),wt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:xt(e)}:{},kt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e)t[l??""]?.(n,a)},St="rshb-query-params";function Ct(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(St)||"";return e&&globalThis.sessionStorage?.setItem(St,e),e}function Tt(e){if(!e)throw new Error("Value should be fulfilled");return e}const It=e=>t=>{const[,n]=Tt(e.find((([e])=>e(t))));return n(t)},Bt=e=>It(e.map((([e,t])=>[e,()=>t])));Bt.if=e=>new Pt(void 0,e);class Pt{parent;predicate;unit;get entry(){return[Tt(this.predicate),Tt(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Pt(this,e)}then(e){return new Pt(this.parent,this.predicate,e)}else(e){return It([...Rt(this),[()=>!0,e]])}}const Rt=e=>[...e?.parent?Rt(e.parent):[],e.entry],Mt=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=Ct();if(!A(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=Bt([[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 Vt(){return Vt._impl()}Vt._impl=()=>({forwardQuery:Mt}),Vt.setup=e=>{Vt._impl=e};const zt=e=>e,At=(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),[u,h]=l({}),p=i(((e,t)=>{const{parse:n=zt,format:l=zt}=t||{};return{value:l(s[e]),isDirty:d||u[e],onChange:t=>{c((l=>({...l,[e]:n(t)}))),h((t=>({...t,[e]:!0})))}}}),[c,d,u]),g=i((e=>{c(e),h(e)}),[]),f=i((()=>{c(e),m(!1),h({})}),[e]),x=i((e=>{e.preventDefault(),t?f():m(!0),n&&n(s,e)}),[n,s]);return[s,{isDirty:d||Object.values(u).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},_t=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),Ft=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(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})})),Ot=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Et=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],jt=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Lt="/api/v1/outservice/outserviceregions",$t=e=>"OUTSERVICE"===e?Lt:void 0;function Ut(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 qt(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function Wt(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return qt(globalThis.document,"click",n),t}const Ht=({label:e,errors:t})=>e&&t?`${e}*`:e,Yt=()=>{},Kt="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",Xt=e=>e?o(Me,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Gt=d((({key:e,className:t="",id:n,name:l,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1,disabled:w=!1})=>{const k=s(null),S=i((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);a((()=>{v&&k.current?.focus()}),[v,k]);const C=g?"pr-3xl":"",T=Jt(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[Xt(d),N?o("textarea",{className:u("block resize-y min-h-24",Zt,T),id:u("textarea",n),name:l||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,disabled:w},e):o("input",{type:r,className:u("h-14",Zt,C,T),ref:k,id:n,name:l||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,pattern:y,disabled:w},e)]}),g]})})),Jt=e=>e?Kt:"border-error",Zt="w-full border rounded-md text-primary-text outline-none p-m",Qt=e=>o("div",{className:"h-6",children:e?o(Me,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),en=e=>e?.value||"",tn={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"},dulSubdivisionCode:{url:"suggest/fms_unit",responseItemHandler:e=>e?.data?.code?.replace("-","")||""},dulIssuedBy:{url:"suggest/fms_unit"},organizationName:{url:"suggest/party"},inn:{url:"suggest/party",responseItemHandler:e=>e?.data?.inn||""},participantAddress:{url:"suggest/address"}},nn=()=>({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"})}),ln=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),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function an({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=l([]),f=nn(),x=tn[n],b=i((()=>{h.current=t,f.close()}),[t]),y=i((e=>{b(),h.current=e.processedValue,c&&c(e.processedValue),d&&d(e)}),[b,c]),v=s(null),N=r((()=>async e=>{if(!x)return;const t=await(e=>{const{url:t,query:n,queryPrefix:l,requestData:a={},responseItemHandler:i=en}=e,r=(s=i,e=>(e?.suggestions||[]).map((e=>{const t=s(e);return{...e,processedValue:t}})));var s;const o=`${l?`${l}, `:""}${n}`;return fetch(`/api/v1/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...a,query:o})}).then((e=>e.json())).then(r)})({url:x.url,responseItemHandler:x.responseItemHandler,requestData:{...x?.requestData},query:e,queryPrefix:m});t?.length&&g(t)}),[m]),w=r((()=>((e,t=600)=>{let n;const l=(...a)=>{l.dispose(),n=setTimeout((()=>{e(...a)}),t)};return l.dispose=()=>{n&&clearTimeout(n)},l})(N,300)),[N]);return a((()=>{if(!e||!v.current||h.current===t)return void b();const n=v.current,{top:l,left:a,width:i,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.update(o(ln,{options:p,value:t,onChange:y}),{top:l+globalThis.scrollY+r,left:a,width:i})}),[e,p,t,y]),v}const rn=d((({className:e,label:t,value:n="",placeholder:l,error:a,errors:i,onChange:r=Yt,onDaDataChange:s,onBlur:d,isTextarea:m,type:h,name:p="",daDataQueryPrefix:g,dadata:f=!1})=>{const[x,{setFalse:b,setTrue:y}]=Ut(),v=Wt(b),N=an({isOpen:x&&f,name:p,value:n,daDataQueryPrefix:g,onChange:r,onDaDataChange:s});return c("div",{className:u("shrink-0 w-full",e),ref:v,onBlur:b,onFocus:y,children:[o("div",{ref:N,children:o(Gt,{type:h||"text","aria-label":t,label:Ht({label:t,errors:i}),valid:Boolean(!a),value:n,onChange:r,onBlur:d,isTextarea:m,placeholder:sn(l,i,t)})}),Qt(a)]})})),sn=(e,t,n)=>t&&!n?`${e}*`:e,on=e=>e?.text||e?.key||"",cn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,dn=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:cn(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:on(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const mn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:h="",isSearch:p=!1,iconVersion:g="black",onChange:f,disabled:x=!1})=>{const[b,{setFalse:y,setTrue:v}]=Ut(),[N,w]=l(""),k=pn(x,n.length),S=b&&!k,C=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=nn(),u=i((()=>{m.close(),c&&c()}),[c]),h=i((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=Wt(u);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(dn,{popupRef:g,options:t,value:n,query:l,onChange:h,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:C,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[Xt(t),c("div",{className:u("relative",S?"z-20":"z-10"),ref:T,children:[c("div",{className:u("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",hn(m,d,k)),onClick:S?C:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:on(r)||h}),un(S,g)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(Gt,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),un=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),hn=(e,t,n)=>u(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),pn=(e,t)=>e||0===t,gn=d((({className:e="",label:t,error:n,errors:l,...a})=>c("div",{className:e,children:[o(mn,{...a,valid:!n,label:Ht({label:t,errors:l})}),Qt(n)]}))),fn=e=>!e?.length,xn=e=>t=>n=>e(n)?[]:[t],bn=xn((e=>null!=e&&""!==e)),yn="Некорректно заполненное поле",vn=e=>bn(e||yn),Nn=xn((e=>e?.key&&""!==e?.key))(yn),wn=e=>xn((e=>"string"==typeof e&&e.length>1))(e||yn),kn=(e,t)=>xn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t||yn),Sn=e=>xn((e=>"string"==typeof e&&6===e.length))(e),Cn=e=>{return(t=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,xn((e=>"string"==typeof e&&t.test(e))))(e);var t},Tn=xn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),In=e=>{const t=String(e).replace(/[^0-9]+/g,"");if(11===t.length){let e=0;for(let n=0;n<9;n++)e+=parseInt(t.charAt(n))*(9-n);return e>101&&(e%=101),100!==e&&101!==e||(e=0),e===parseInt(t.substr(9))}return!1},Bn={typeForm:vn(),surname:wn("Укажите свою фамилию"),name:wn("Укажите своё имя"),middleName:wn("Укажите своё отчество"),region:Nn,addressBranch:Nn,phone:Cn("Укажите номер телефона"),secondaryPhone:Cn("Укажите номер телефона"),birthday:vn("Укажите дату рождения"),birthPlace:vn("Укажите место рождения"),education:vn("Выберите ваше образование"),housing:vn("Выберите тип жилья"),employment:vn("Выберите информацию о трудоустройстве"),organization:vn("Выберите тип организации"),amountWorkers:vn("Выберите информацию о количестве сотрудников"),employerActivities:vn("Выберите вид деятельности организации"),employerOrganization:vn("Выберите вид организации"),positionOrganization:vn("Выберите вашу должность"),dulSerie:(Pn="Укажите серию паспорта",xn((e=>"string"==typeof e&&4===e.length))(Pn)),dulNumber:Sn("Укажите номер паспорта"),dulIssueDateField:vn("Укажите дату выдачи паспорта"),dulSubdivisionCode:Sn("Укажите код подразделения"),dulIssuedBy:vn("Укажите организацию, выдавшую паспорт"),email:(e=>xn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),fullName:wn(),inn:(e=>xn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),legalForm:vn("Укажите ОПФ"),organizationName:vn("Укажите наименование организации"),generalSeniority:vn(),lastJobExperience:vn("Укажите стаж на последнем месте работы"),experience5Years:vn("Укажите общий стаж за последние 5 лет"),jobsNumber:vn("Укажите количество лет стажа"),beginDate:vn("Укажите дату заключения трудового договора"),fullAddress:vn(),partnerComments:vn(),collectionCount:vn(),comment:vn(),acquiringType:Nn,feedbackMethod:Nn,serviceType:Nn,serviceDirection:Nn,meetingDay:vn(),product:vn(),localities:vn(),consentDataProcessing:Tn,annualRevenue:vn(),consentToReceiveMaterials:Tn,processPersonalDataLeadFlg:Tn,consentProviderFlg:Tn,consentPhotoFlg:Tn,consentPfrFlg:Tn,consentAssignmentClaimsFlg:Tn,consentCollectionFlg:Tn,consentInformFlg:Tn,familyStatus:vn("Выберите семейное положение"),children:kn(2,"Укажите количество детей"),familyMembers:kn(2,"Укажите количество членов семьи"),dependents:kn(2,"Укажите количество иждивенцев"),totalIncome:kn(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:kn(10,"Укажите сумму обязательных выплат"),snils:(e=>xn(In)(e))("Некорректный номер СНИЛС"),conscription:vn(),armyIdFlg:Tn,sex:vn("Укажите свой пол"),participantAddress:vn("Необходимо выбрать адрес"),participantDateRegistration:vn("Укажите дату регистрации"),retirementIncome:vn(),otherIncome:vn(),mandatoryIncome:vn(),otherPayments:vn(),disablePeopleFlg:vn(),bankruptcyFlg:vn(),shareholderFlg:vn(),legalEntityName:vn(),bankEmployeeCode:vn()};var Pn;const Rn=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,Bn?.[e]])))},Mn=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},Dn=(e,t,n=!1)=>n?Mn(e,t):e,Vn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],zn=d((({field:e,input:t})=>o(gn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Vn,...Dn(e("acquiringType"),Bn.acquiringType,t?.required)}))),An=(e="")=>Boolean("trade"===e||"all"===e),_n=e=>null!=e,Fn=new Map,On=e=>Boolean(e?.every((e=>Array.isArray(e)?On(e):!e||"string"==typeof e))),En=e=>On(e)?e.toString():"";function jn(e,t,{fallback:n,cache:i}={}){const s=r((()=>Ln(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(_n))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=Fn)=>n=>{const l=En(n),a=t.get(l);if(l&&_n(a))return a;const i=e(...n);return l&&_n(i)&&t.set(l,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Ln(e){return Array.isArray(e)?e:e instanceof Function?Ln(e()):[e]}const $n=[];const Un=async e=>await it(e,{method:"GET"})||$n;function qn(e=!1){const{data:t}=jn(e?"/api/v1/premiumBranchesByRegions":"/api/v1/branchesByRegions",rt);return Array.isArray(t)?t:[]}const Wn=d((({field:e,input:t,isPremium:n=!1})=>{const l=e("region"),i=l?.value?.key,r=l?.value?.text,s=n?qn(n)?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=jn(e?`/api/v1/branches?regionCode=${e}`:null,Un);return t||$n}(i)?.filter((e=>e?.address));return a((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(gn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...Dn(e("addressBranch"),Bn.addressBranch,t?.required),isSearch:!0})})),Hn=(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)}),[]),u=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:u}},Yn=(e,t,n)=>Math.max(t,Math.min(e,n));function Kn(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function Xn({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:u("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=Kn(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const Gn=1,Jn=100,Zn=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:Gn),max:s=(a.length?a.length-1:Jn),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:p}=e,g=Hn(e,{normalize:(e=0)=>a.length?Qn(a)(e):Yn(e,r,s),format:Ue()}),f=i((e=>{p&&p(Kn(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Me,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:u("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",Kt,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),Xn({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),el(l)]})})),Qn=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),el=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),tl=["От 1 000 ₽","До 1 000 000 000 ₽"],nl=d((({field:e})=>o(Zn,{title:"Сумма, ₽",items:tl,min:1e3,max:1e9,...e("amount")}))),ll=e=>{const{data:t,error:n}=jn(`https://portal-ui-cc.cprb.dev.rshbdev.ru/light-api-cash/v1/dictionary?dictionaryType=${e}`,al);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},al=async e=>await it(e,{method:"POST"})||[],il=ut((({field:e,source:t,label:n,fieldName:l,input:a})=>{const i=t&&t?.map((e=>e.description))||[];return o(gn,{placeholder:"Выберите из списка",label:n,options:rl(i),...Dn(e(l),Bn[l],a?.required)})})),rl=e=>(e??[]).map((e=>({key:e,value:e}))),sl=d((({field:e,input:t})=>{const{data:n}=ll("EMPLOYEES_NUMBER");return o(il,{field:e,source:n,label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),ol=d((({field:e,input:t})=>o(rn,{label:"Годовая выручка, ₽",...Dn(e("annualRevenue"),Bn.annualRevenue,t?.required)}))),cl=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)}))}))),dl="appearance-none w-5 h-5 border-solid flex-none",ml=[{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"}],ul=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(cl,{paths:ml,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:u("flex items-center relative group/box",pl(l)),onClick:s,children:[o("div",{className:u(dl,"m-0",a?"rounded-full border-2":fl(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:gl(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,hl(n)]})})})),hl=e=>e?o("div",{className:"ml-s",children:o(Me,{size:"text-l",font:"font-light",children:e})}):null,pl=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",gl=(e=!1)=>e?"radio":"checkbox",fl=(e=!1)=>u("rounded border",{"bg-primary-main":e}),xl=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(ul,{text:t,value:n,disabled:a,onChange:r},l),Qt(i)]}))),bl=d((({field:e})=>o(xl,{text:"Наличие военного билета",...Dn(e("armyIdFlg"),Bn.armyIdFlg)}))),yl=d((({field:e,input:t})=>o(rn,{label:"Код представителя Банка",placeholder:"Введите код",type:"number",...Dn(e("bankEmployeeCode"),Bn.bankEmployeeCode,t?.required),...t}))),vl=d((({field:e})=>o(rn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),Nl=d((({field:e})=>o(xl,{text:"В отношении меня ведётся производство по делу о банкротстве",...Dn(e("bankruptcyFlg"),Bn.bankruptcyFlg)}))),wl=({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 u=[];for(let c=0;c<7;c++)if(0===m&&c<t)u.push(o("td",{},`empty-${c}`));else if(d>n)u.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=kl(t,e),c=Sl(t,i,r);u.push(o("td",{children:o("div",{className:Cl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},kl=(e,t)=>t&&e.toDateString()===t.toDateString(),Sl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),Cl=(e=!1,t=!1)=>u("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),Tl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Il=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=Yt,setValue:d=Yt})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:u,totalDays:h}=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:Tl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:wl({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:m})})]})})),Bl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Pl=Bl.map((e=>({key:e}))),Rl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Ml={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Dl={className:"min-w-32",iconVersion:"black",isBorder:!1},Vl=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,onChange:m})=>{const[h,{setValue:p}]=Ut(!1),[g,f]=l(n?.getMonth()||(new Date).getMonth()),[x,b]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:y,handleNextMonth:v,handleSelectMonth:N,handleSelectYear:w,monthsOptions:k,yearsOptions:S,handleChangeVisibleCalendar:C,ref:T}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=Wt(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(Bl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Pl,yearsOptions:Rl,ref:s}})({onYearSelect:b,onMonthSelect:f,onShowCalendar:p,selectedYear:x,selectedMonth:g,showCalendar:h}),I=((e,t)=>{const[n,i]=l(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();i(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(T,370);return c("div",{className:u("space-y-xs",e),ref:T,children:[Xt(t),c("div",{className:"relative",children:[zl(C,n,r),h?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":I}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:y,children:o(W,{...Ml,className:"-rotate-90 cursor-pointer"})}),o(mn,{onChange:N,value:{key:Bl[g]},options:k,...Dl}),o(mn,{onChange:w,value:{key:String(x)},options:S,...Dl}),o("div",{className:"my-auto",onClick:v,children:o(W,{...Ml,className:"rotate-90 cursor-pointer"})})]}),o(Il,{today:n,currentMonth:g,currentYear:x,onDateSelect:m,min:s,max:d,setValue:p})]}):null]})]})})),zl=(e,t,n)=>c("div",{onClick:e,className:u("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(k,{children:t&&ft(t)}),o(W,{...Ml,name:"CalendarIcon"})]}),Al=d((({className:e,label:t,error:n,errors:l,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Vl,{label:Ht({label:t,errors:l}),valid:Boolean(!n),...a}),Qt(n)]}))),_l=d((({field:e,input:t})=>o(Al,{label:"Дата начала работы на текущем месте",...Dn(e("beginDate"),Bn.beginDate,t?.required),...t}))),Fl=d((({field:e,input:t})=>o(Al,{label:"Дата рождения",...Dn(e("birthday"),Bn.birthday,t?.required)}))),Ol=d((({field:e,input:t})=>o(rn,{label:"Место рождения",...Dn(e("birthPlace"),Bn.birthPlace,t?.required),...t}))),El=d((({field:e,input:t})=>o(rn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",type:"number",...Dn(e("children"),Bn.children,t?.required),...t}))),jl=d((({field:e,input:t})=>o(rn,{label:"Количество объектов инкассации",type:"number",...Dn(e("collectionCount"),Bn.collectionCount,t?.required)}))),Ll=d((({field:e,input:t})=>o(rn,{className:"col-span-2",...Dn(e("comment"),Bn.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),$l=d((({field:e,input:t})=>{const{data:n}=ll("MILITARY_STATUS");return o(il,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),Ul={processPersonalDataLeadFlg:{text:"Согласие на обработку персональных данных",docId:4},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3},consentPhotoFlg:{text:"Прочие согласия (согласие на фотографирование)",docId:1},consentAssignmentClaimsFlg:{text:"Прочие согласия (согласие на уступку прав требований)",docId:1},consentCollectionFlg:{text:"Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)",docId:1},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentToReceiveMaterials:{text:"Согласен на получение информационных и аналитических материалов по электронной почте"}},ql=d((({className:e,onClose:t})=>o("button",{className:u("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(W,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),Wl=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:u("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(ql,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),Hl=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},Yl=e=>"application/json"===e.headers.get("Content-Type"),Kl=async(e,t,n)=>await fetch("https://retail-light-api.cprb.dev.rshbdev.ru/api/v1"+e,{method:t,headers:{"Content-Type":"application/json",...Hl()},credentials:"include",body:n?JSON.stringify(n):null}).then((e=>{if(e.ok)return(e=>Yl(e)?e.json():e)(e);throw e})).catch((e=>{throw e})),Xl=e=>{sessionStorage.setItem("accessToken",e.access_token),sessionStorage.setItem("refreshToken",e.refresh_token)},Gl=async e=>await Kl("/public-data/createUserProfile","POST",e),Jl=async e=>await Kl("/user-data/updateUserProfile","PUT",e),Zl=async e=>await Kl("/user-data/createDraftTask","POST",e),Ql=async e=>await Kl("/user-data/updateUserTask","PUT",e),ea=async e=>await Kl("/sms/sendCode","POST",e),ta=async e=>await Kl("/sms/checkCode","POST",e).then(Xl),na=async e=>await Kl(`/sms/createCaptcha?phoneNumber=${e}`,"GET"),la=async e=>await Kl("/sms/checkCaptcha","POST",e),aa=async e=>await Kl(`/feedback/file?id=${e}`,"GET"),ia=d((({className:e,error:t,docId:n,...l})=>{const{open:a}=de();return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(ul,{...l}),n?o(be,{className:"text-primary-main",onClick:()=>ra(n,a),children:o(Me,{children:"Ознакомиться"})}):null]}),Qt(t)]})})),ra=async(e,t)=>{const n=await(async e=>{const t=await aa(e);return URL.createObjectURL(await t.blob())})(e);t(o(Wl,{className:"my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0",children:o("iframe",{src:`${n}#toolbar=0`,className:"w-full h-[80vh]",id:"iframe-dialog"})}))},sa=d((({field:e,input:t})=>t&&t.name?o(ia,{text:Ul[t.name]?.text,docId:Ul[t.name]?.docId,...Dn(e(t.name),Bn[t.name],t?.required)}):null)),oa=d((({field:e,input:t})=>{const{data:n}=ll("creditInRshbCd");return o(il,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала руководителем, которого Вы являетесь, кредит в АО «Россельзбанк»",fieldName:"creditInRshbCd",input:t})})),ca=d((({field:e,input:t})=>o(rn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",type:"number",...Dn(e("dependents"),Bn.dependents,t?.required),...t}))),da=d((({field:e,input:t})=>o(Al,{label:"Желаемая дата встречи",...Dn(e("desiredMeetingDate"),Bn.meetingDay,t?.required)}))),ma=d((({field:e})=>o(xl,{text:"Являюсь инвалидом",...Dn(e("disablePeopleFlg"),Bn.disablePeopleFlg)}))),ua=d((({field:e,input:t})=>o(Al,{label:"Дата выдачи",...Dn(e("dulIssueDateField"),Bn.dulIssueDateField,t?.required)}))),ha=d((({field:e,input:t})=>{const{value:n,onChange:l}=e("dulSubdivisionCode"),a=i((e=>{l?.(e?.data?.code?.replace("-",""))}),[]);return o(rn,{label:"Кем выдан",...t,...Dn(e("dulIssuedBy"),Bn.dulIssuedBy,t?.required),onDaDataChange:a,daDataQueryPrefix:n})})),pa=d((({field:e,input:t})=>o(rn,{label:"Номер документа",type:"number",...Dn(e("dulNumber"),Bn.dulNumber,t?.required)}))),ga=d((({field:e,input:t})=>o(rn,{label:"Серия документа",type:"number",...Dn(e("dulSerie"),Bn.dulSerie,t?.required)}))),fa=d((({field:e,input:t})=>{const n=i((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(rn,{label:"Код подразделения",type:"number",...t,...Dn(e("dulSubdivisionCode"),Bn.dulSubdivisionCode,t?.required),onDaDataChange:n})})),xa=d((({field:e,input:t})=>{const{data:n}=ll("EDUCATION_LEVEL");return o(il,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),ba=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(rn,{label:"Электронная почта",...Dn(e("email"),Bn.email,n),...l})})),ya=d((({field:e,input:t})=>{const{data:n}=ll("ORGANIZATION_ACTIVITY_TYPE");return o(il,{field:e,source:n,label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),va=d((({field:e,input:t})=>{const{data:n}=ll("ORGANIZATION_KIND");return o(il,{field:e,source:n,label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),Na=d((({field:e,input:t})=>{const{data:n}=ll("EMPLOYMENT_TYPE");return o(il,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),wa=d((({field:e,input:t})=>o(rn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",type:"number",...Dn(e("expenses"),Bn.expenses,t?.required),...t}))),ka=d((({field:e,input:t})=>o(rn,{label:"Стаж",placeholder:"За последние 5 лет",...Dn(e("experience5Years"),Bn.experience5Years,t?.required),...t}))),Sa=d((({field:e,input:t})=>o(rn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",...Dn(e("familyMembers"),Bn.familyMembers,t?.required),...t}))),Ca=d((({field:e,input:t})=>{const{data:n}=ll("MARITAL_STATUS");return o(il,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),Ta=d((({field:e,input:t})=>o(gn,{label:"Способ получения ответа",options:jt,...Dn(e("feedbackMethod"),Bn.feedbackMethod,t?.required)}))),Ia=d((({field:e,input:t})=>o(rn,{label:"Адрес",...Dn(e("fullAddress"),Bn.fullAddress,t?.required),...t}))),Ba=d((({field:e,input:t})=>o(rn,{label:"ФИО",...Dn(e("fullName"),Bn.fullName,t?.required),...t}))),Pa=d((({field:e,input:t})=>o(rn,{label:"Общий стаж",placeholder:"Количество лет",...Dn(e("generalSeniority"),Bn.generalSeniority,t?.required),...t}))),Ra=d((({field:e,input:t})=>{const{data:n}=ll("HOUSE_TYPE");return o(il,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Ma=d((({field:e,input:t})=>{const n=i((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(rn,{label:"ИНН",type:"number",...t,...Dn(e("inn"),Bn.inn,t?.required),onDaDataChange:n})})),Da=d((({field:e})=>o(xl,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Va=d((({field:e,input:t})=>o(rn,{label:"Общий стаж",placeholder:"Количество лет",type:"number",...Dn(e("jobsNumber"),Bn.jobsNumber,t?.required),...t}))),za=d((({field:e,input:t})=>o(rn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",...Dn(e("lastJobExperience"),Bn.lastJobExperience,t?.required),...t}))),Aa=d((({field:e,input:t})=>o(rn,{label:"Наименование юридического лица",...t,...Dn(e("legalEntityName"),Bn.legalEntityName,t?.required)}))),_a=d((({field:e,input:t})=>o(rn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...Dn(e("legalForm"),Bn.legalForm,t?.required),...t})));function Fa(e="/api/v1/regions"){const{data:t}=jn(e,rt);return Array.isArray(t)?t:[]}const Oa=d((({field:e,input:t})=>{const n=e("region")?.value?.key,l=Fa(Lt)?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(gn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:l,...Dn(e("localities"),Bn.localities,t?.required),isSearch:!0})})),Ea=d((({field:e,input:t})=>o(rn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",...Dn(e("mandatoryIncome"),Bn.mandatoryIncome,t?.required),...t}))),ja=d((({field:e,input:t})=>o(rn,{label:"Отчество (Обязательно, при наличии)",...Dn(e("middleName"),Bn.middleName),...t}))),La=d((({field:e,input:t})=>o(rn,{label:"Имя",...Dn(e("name"),Bn.name,t?.required),...t}))),$a=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:u("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:u("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Me,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Ua=d((({field:e})=>An(e("acquiringType")?.value?.key)?o($a,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),qa=d((({field:e,input:t})=>{const{data:n}=ll("ORGANIZATION_TYPE");return o(il,{field:e,source:n,label:"Тип организации",fieldName:"organization",input:t})})),Wa=d((({field:e,input:t})=>{const n=i((t=>{e?.("inn")?.onChange?.(t.data?.inn),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(rn,{label:"Наименование организации",...t,...Dn(e("organizationName"),Bn.organizationName,t?.required),onDaDataChange:n})})),Ha=d((({field:e,input:t})=>o(rn,{label:"Иные доходы",placeholder:"Введите значение",type:"number",...Dn(e("otherIncome"),Bn.otherIncome,t?.required),...t}))),Ya=d((({field:e,input:t})=>o(rn,{label:"Обязательные выплаты",placeholder:"Введите значение",type:"number",...Dn(e("otherPayments"),Bn.otherPayments,t?.required),...t}))),Ka=d((({field:e,input:t})=>o(rn,{label:"Адрес",...Dn(e("participantAddress"),Bn.participantAddress,t?.required),...t}))),Xa=d((({field:e,input:t})=>o(Al,{label:"Дата регистрации по месту жительства",...Dn(e("participantDateRegistration"),Bn.participantDateRegistration,t?.required)}))),Ga=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(rn,{...Dn(e("partnerComments"),Bn.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...l})})),Ja=e=>"_"===e,Za=e=>/\d/.test(e),Qa=e=>Ja(e)||Za(e),ei=[..."+7 (___) ___-__-__"],ti=ei.findIndex(Ja),ni=ei.map(((e,t)=>Qa(e)?ei.slice(0,t).filter(Qa).length:-1));const li=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=ei.map(((e,n)=>Za(e)?e:t.charAt(ni[n])||e)),l=ni.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(ti,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(Gt,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),ai=d((({className:e,label:t,error:n,...l})=>c("div",{className:u("shrink-0 w-full",e),children:[o(li,{"aria-label":t,label:Ht({label:t,errors:l?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...l}),Qt(n)]}))),ii=d((({field:e,input:t})=>o(ai,{label:"Телефон",...Dn(e("phone"),Bn.phone,t?.required),...t}))),ri=d((({field:e,input:t})=>{const{data:n}=ll("POSITION");return o(il,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),si=d((({field:e})=>An(e("acquiringType")?.value?.key)?o($a,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),oi=ut((({field:e,source:t})=>o(gn,{placeholder:"Выберите продукт",label:"Продукт",options:ci(t?.productList),...Mn(e("product"),Bn.product)}))),ci=e=>(e??[]).map((e=>({key:e,value:e}))),di=d((({field:e,input:t,url:n})=>{const l=Fa(n);return o(gn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...Dn(e("region"),Bn.region,t?.required)})})),mi=d((({field:e,input:t})=>{const n=qn(!0),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(gn,{label:"Регион",placeholder:"Выберите регион",options:l,...Dn(e("region"),Bn.region,t?.required)})})),ui=d((({field:e,input:t})=>o(rn,{label:"Пенсионные доходы",placeholder:"Введите значение",type:"number",...Dn(e("retirementIncome"),Bn.retirementIncome,t?.required),...t}))),hi=d((({field:e})=>{const t=e("secondaryPhone");return o(ai,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Mn(t,Bn.secondaryPhone):t})})),pi=d((({field:e,input:t})=>o(gn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Et,...Dn(e("serviceDirection"),Bn.serviceDirection,t?.required)}))),gi={horizontal:"@lg:flex-row",vertical:""},fi=d((({label:e,items:t,value:n,className:l,onChange:a,disabled:i=!1,orientation:r="horizontal"})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Me,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",gi[r],l),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(ul,{isRadio:!0,text:t,value:n===e,onChange:()=>a&&a(e),disabled:i},String(e))))})]}))),xi=d((({className:e,label:t,onChange:n,error:l,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(fi,{label:Ht({label:t,errors:a?.errors}),onChange:e=>n&&n(e),...a}),Qt(l)]}))),bi=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],yi=d((({field:e,input:t})=>o(xi,{label:"Пол",orientation:"horizontal",items:bi,...Dn(e("sex"),Bn.sex,t?.required)}))),vi=d((({field:e})=>o(xl,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...Dn(e("shareholderFlg"),Bn.shareholderFlg)}))),Ni=e=>"_"===e,wi=e=>/\d/.test(e),ki=e=>Ni(e)||wi(e),Si=[..."___-___-___ __"],Ci=Si.findIndex(Ni),Ti=Si.map(((e,t)=>ki(e)?Si.slice(0,t).filter(ki).length:-1));const Ii=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=Si.map(((e,n)=>wi(e)?e:t.charAt(Ti[n])||e)),l=Ti.indexOf(t.length-1)+1;return 0===t.length?"":(l?n.slice(0,Math.max(Ci,l)):n).join("")}(e))),[t]),a=i((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(Gt,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),Bi=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ii,{"aria-label":t,label:Ht({label:t,errors:r?.errors}),valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"___-___-___ __"}),Qt(l)]}))),Pi=d((({field:e,input:t})=>o(Bi,{label:"СНИЛС",...Dn(e("snils"),Bn.snils,t?.required),...t}))),Ri=d((({field:e,input:t})=>o(rn,{label:"Фамилия",...Dn(e("surname"),Bn.surname,t?.required),...t}))),Mi=["От 1 мес","До 15 лет"],Di=d((({field:e})=>o(Zn,{title:"Срок, месяцев",items:Mi,min:1,max:180,...e("term")}))),Vi=d((({field:e,input:t})=>o(rn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",...Dn(e("totalIncome"),Bn.totalIncome,t?.required),...t}))),zi=d((({field:e,input:t})=>o(gn,{label:"Тип обслуживания",options:Ot,...Dn(e("serviceType"),Bn.serviceType,t?.required)}))),Ai=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],_i=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(fi,{className:"whitespace-normal",orientation:"horizontal",items:Ai,value:t,onChange:e=>n&&n(e)})})}));const Fi={$ref:"/wcms-resources/outservice-productlist.json"},Oi=(e,t)=>(n,l)=>{const a="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,i={surname:o(Ri,{field:e,input:n}),name:o(La,{field:e,input:n}),middleName:o(ja,{field:e,input:n}),phone:o(ii,{field:e,input:n}),email:o(ba,{field:e,input:n}),fullName:o(Ba,{field:e,input:n}),inn:o(Ma,{field:e,input:n}),legalForm:o(_a,{field:e,input:n}),organizationName:o(Wa,{field:e,input:n}),generalSeniority:o(Pa,{field:e,input:n}),lastJobExperience:o(za,{field:e,input:n}),experience5Years:o(ka,{field:e,input:n}),jobsNumber:o(Va,{field:e,input:n}),beginDate:o(_l,{field:e,input:n}),fullAddress:o(Ia,{field:e,input:n}),comment:o(Ll,{field:e,input:n}),addressBranch:o(Wn,{field:e,input:n,isPremium:a}),sex:o(yi,{field:e,input:n}),birthday:o(Fl,{field:e,input:n}),birthPlace:o(Ol,{field:e,input:n}),desiredMeetingDate:o(da,{field:e,input:n}),product:o(oi,{field:e,source:Fi}),localities:o(Oa,{field:e,input:n}),isClient:o(Da,{field:e}),partnerComments:o(Ga,{field:e,input:n}),collectionCount:o(jl,{field:e,input:n}),acquiringType:o(zn,{field:e,input:n}),onlineCheckout:o(Ua,{field:e}),posTerminal:o(si,{field:e}),serviceType:o(zi,{field:e,input:n}),term:o(Di,{field:e}),amount:o(nl,{field:e}),annualRevenue:o(ol,{field:e,input:n}),vedTypes:o(_i,{field:e}),feedbackMethod:o(Ta,{field:e,input:n}),serviceDirection:o(pi,{field:e,input:n}),bankEmpolee:o(vl,{field:e}),secondaryPhone:o(hi,{field:e}),consentToReceiveMaterials:o(sa,{field:e,input:n}),processPersonalDataLeadFlg:o(sa,{field:e,input:n}),consentProviderFlg:o(sa,{field:e,input:n}),consentPhotoFlg:o(sa,{field:e,input:n}),consentAssignmentClaimsFlg:o(sa,{field:e,input:n}),consentCollectionFlg:o(sa,{field:e,input:n}),consentInformFlg:o(sa,{field:e,input:n}),consentPfrFlg:o(sa,{field:e,input:n}),applicationDate:o(rn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),region:a?o(mi,{field:e}):o(di,{field:e,input:n,url:$t(t)}),education:o(xa,{field:e,input:n}),housing:o(Ra,{field:e,input:n}),employment:o(Na,{field:e,input:n}),organization:o(qa,{field:e,input:n}),amountWorkers:o(sl,{field:e,input:n}),employerActivities:o(ya,{field:e,input:n}),employerOrganization:o(va,{field:e,input:n}),positionOrganization:o(ri,{field:e,input:n}),familyStatus:o(Ca,{field:e,input:n}),children:o(El,{field:e,input:n}),familyMembers:o(Sa,{field:e,input:n}),dependents:o(ca,{field:e,input:n}),totalIncome:o(Vi,{field:e,input:n}),expenses:o(wa,{field:e,input:n}),snils:o(Pi,{field:e,input:n}),conscription:o($l,{field:e,input:n}),armyIdFlg:o(bl,{field:e,input:n}),dulSerie:o(ga,{field:e,input:n}),dulNumber:o(pa,{field:e,input:n}),dulIssueDateField:o(ua,{field:e,input:n}),dulSubdivisionCode:o(fa,{field:e,input:n}),dulIssuedBy:o(ha,{field:e,input:n}),participantAddress:o(Ka,{field:e,input:n}),participantDateRegistration:o(Xa,{field:e,input:n}),retirementIncome:o(ui,{field:e,input:n}),otherIncome:o(Ha,{field:e,input:n}),mandatoryIncome:o(Ea,{field:e,input:n}),otherPayments:o(Ya,{field:e,input:n}),disablePeopleFlg:o(ma,{field:e,input:n}),bankruptcyFlg:o(Nl,{field:e,input:n}),shareholderFlg:o(vi,{field:e,input:n}),legalEntityName:o(Aa,{field:e,input:n}),creditInRshbCd:o(oa,{field:e,input:n}),bankEmployeeCode:o(yl,{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},Ei=e=>2===e?"@xl:grid-cols-2":"",ji=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Me,{size:"text-h6",children:e})}):null;function Li({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const $i={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"},Ui={primary:u("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:u("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")},qi=d((({children:e,...t})=>{const n=e=>({...e,onClick:me(Li(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:u("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?"":u($i[a],Ui[a]),l),type:s,role:d,onClick:m,children:e})})),Wi=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(Wl,{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(qi,{type:"button",onClick:r,children:"Хорошо"})]})})})),Hi=e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Wi,{...e}),n),close:n}},Yi=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Ki=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${An(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...d,...Gi(o),...Xi(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Xi=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Gi=e=>e?{vedTypes:Object.fromEntries(Ai.map((({id:t})=>[t,t===e])))}:{},Ji={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Vn[0],serviceType:Ot[0],feedbackMethod:jt[0],serviceDirection:Et[0],vedTypes:Ai[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Zi=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Me,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Me,{children:t.text})}):null]}))),Qi=(e,t)=>o(qi,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),er=(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(ul,{...e}),o(Zi,{link:t})]}),Qt(Mn(e,Tn).error)]}):o(Zi,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),Qi(n)]}),tr={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:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f=g?"/api/v1/lead":"/api/v1/sendcorporatelead",x={typeForm:n,...vt(l,g),...Nt(i,g),...bt(a),...yt(s,"desiredMeetingDate"),...g?yt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...wt(d)},...p};try{const e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},nr=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:p,data:g,...f})=>{const x=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Ji[e.name]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=Ot[1]),{...n,typeForm:{key:t,text:""}}})(x,n),[y,v]=l(""),N=i((async(e,t)=>{const l=lr(x,e),a=Yi(Rn(l));if(!fn(a(e)))return"Fail";const i=Ki({...e,...h}),r=await tr.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){Hi({responseType:r,typeForm:n}).open()}if("OK"===r&&g){const e=Vt();kt({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:S,reset:C}]=At(b,{onSubmit:N}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return a((()=>{"OK"===y&&(v(""),C())}),[y]),c(Ft,{className:u("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:u(Ei(e.columns),"grid gap-x-m"),children:[ji(e.title),(e?.inputs||[])?.map(Oi(k,n))]},`section-${t}`))),er(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(w,{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]})})),lr=(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)}))));function ar(e){const[t,n]=l(JSON.parse(globalThis.localStorage?.getItem(e)||"null"));return[t,i((t=>{globalThis.localStorage?.setItem(e,JSON.stringify(t)),n(t)}),[e,globalThis.localStorage])]}const ir=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}),u=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[u,m]}:{className:e,role:"group",children:[m,u]})}));const rr=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})})})),sr=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(Mn(n(e?.name),Bn[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(ir,{isFoldButtonOnTop:!0,unfoldedByDefault:!0,renderFoldableSection:({isUnfolded:l})=>o(rr,{isUnfolded:l,className:"flex flex-col pl-2xl",children:e.map(Oi(n,t))}),renderFoldButton:or(c("div",{children:[o(ul,{value:a,onChange:t=>{for(const l of e){const e=n(l.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},l),Qt(i?"Отметьте все обязательные соглашения":"")]}))})})})),or=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),cr=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:l,restInputs:a}=dr(n||[]);return l.length>2?c("div",{children:[a.map(Oi(e,t)),o(sr,{inputs:l,field:e})]}):(n||[])?.map(Oi(e,t))},dr=e=>({consentInputs:e?.filter((e=>Object.keys(Ul).includes(e.name)))||[],restInputs:e?.filter((e=>!Object.keys(Ul).includes(e.name)))||[]}),mr={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Vn[0],serviceType:Ot[0],feedbackMethod:jt[0],serviceDirection:Et[0],vedTypes:Ai[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,participantAddress:"",participantDateRegistration:void 0},ur=(e,t,n="")=>{if(t){const e=JSON.parse(t);return e.birthday=new Date(e?.birthday||0),e}return{...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||mr[e.name]]))),typeForm:{key:n,text:""}}},hr=(e,t)=>o(qi,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),pr={width:"103",height:"21"},gr={"bg-white":"color",transparent:"white"},fr={"bg-white":"text-primary-main",transparent:"text-white"},xr=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:gr[e]},className:fr[e],width:n?.width,height:n?.height}),br={"bg-white":"text-primary-text",transparent:"text-white"},yr=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:u("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...he(s),children:[xr(i,n?.image,pr),r?l??o("div",{className:"ml-s",children:o(Me,{font:"font-medium",color:br[i],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),vr=async(e,t)=>{const n=await na(t);e(URL.createObjectURL(await n.blob()))},Nr=d((({phoneNumber:e,close:t,sendCode:n,onClose:i})=>{const[r,s]=l(""),[d,m]=l(""),[u,h]=l(!1);return a((()=>{vr(s,e)}),[]),o(Wl,{head:o(yr,{}),onClose:i,className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex h-[140px] w-[300px]",children:[o("img",{className:"grow",src:r}),o("div",{onClick:()=>vr(s,e),className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(Gt,{className:"w-[300px]",onChange:m,value:d,placeholder:"Введите код с картинки"}),u?o("div",{className:"text-error",children:"Неверный код"}):null,c("div",{className:"flex w-[310px] justify-between",children:[o(qi,{onClick:t,version:"secondary",children:"Вернуться"}),o(qi,{type:"submit",disabled:!d,onClick:()=>(async({code:e,setHasError:t,close:n,sendCode:l=Yt})=>{const a=await la({captchaText:e});"ERROR"===await a.text()?t(!0):(l(),n?.())})({code:d,setHasError:h,close:t,sendCode:n}),version:"secondary",children:"Отправить"})]})]})})})),wr=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:u("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:u("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),kr=d((({time:e,setTime:t,className:n})=>(a((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:Sr(e)})))),Sr=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,Cr=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=l(0),u=s([]);a((()=>{u.current?.[d]?.focus()}),[d]);const h=i((n=>l=>{const{value:a}=l.currentTarget,i=a.slice(0,1);t(e.map(((e,t)=>t===n?i:e))),m(n+1)}),[e]),p=i((n=>l=>{const{key:a}=l;if("Backspace"===a&&!e[n]){const l=n>0?n-1:e.length-1,a=e.map(((e,t)=>t===l?"":e));t(a),m(l)}}),[e]),g=i((n=>{n.preventDefault();const l=n.clipboardData.getData("text"),a=e.map(((e,t)=>t<l.length?l[t]:e));t(a),m(a.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,l)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(l),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[l]=e},onFocus:e=>e.target.select(),onKeyDown:p(l),className:Tr(l,e,n)},l)))}),n?o("div",{className:"text-error",children:r}):null]})})),Tr=(e,t,n=!1)=>{const l=!t[e];return`w-16 h-20 text-3xl text-center p-2 m-2 border ${n&&l?"border-error":"border-gray"} rounded-md caret-transparent outline-none`},Ir=d((({isDisabled:e,onClick:t,text:n})=>o(qi,{type:"button",onClick:t,disabled:e,children:o(Me,{font:"font-medium",children:n})}))),Br=d((({close:e=Yt,onClose:t=Yt,title:n,description:s,__html:d,code:m=!0,codeLength:u=4,textButton:h="",phoneNumber:p="+79999999999"})=>{const[g,f]=l(Array(u).fill("")),{handleSubmit:x,hasError:b,errorText:y,isLoading:v,timeNextReq:N,isSubmitButtonDisabled:w,setTimeNextReq:k,setIsTimerStarted:S,setAttemps:T}=(({close:e,values:t})=>{const[n,s]=l(!1),[o,c]=l(""),[d,m]=l(!1),[u,h]=l(0),[p,g]=l(!1),[f,x]=l(0),b=i((()=>{s(!1),c("")}),[]),y=r((()=>0===u&&p),[u,p]),v=r((()=>f>2||!t.every(Boolean)||y),[t]),N=i((async()=>{try{g(!1),h(0),x(f+1),m(!0),await ta({smsText:t.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),b(),e&&e()}catch{m(!1),c(f>1?"Исчерпан лимит ввода смс-кода":"Неверный код"),s(!0)}}),[t,f]);return a((()=>{y?(s(!0),c("Код просрочен")):s(!1)}),[y]),{handleSubmit:N,hasError:n,errorText:o,isLoading:d,timeNextReq:u,isSubmitButtonDisabled:v,setTimeNextReq:h,setIsTimerStarted:g,setAttemps:x}})({values:g,close:e}),I=i((()=>{(async({phoneNumber:e,captchaDialog:t,setTimeNextReq:n,setIsTimerStarted:l,setAttemps:a})=>{try{await ea({phoneNumber:e,smsCodesSetName:{key:"AUTHENTICATION"}}),a(0),n(180),l(!0)}catch(e){429===e?.status&&t.open()}})({phoneNumber:p,captchaDialog:B,setTimeNextReq:k,setIsTimerStarted:S,setAttemps:T})}),[]),B=((e,t)=>{const{open:n,close:l,closeAll:a}=de();return{open:()=>n(o(Nr,{close:l,onClose:t,...e})),close:l,closeAll:a}})({phoneNumber:p,sendCode:I},t);return a((()=>{I()}),[]),o(Wl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[o(C,{className:"w-full",title:n,description:s,headlineVersion:"S",isEmbedded:!0}),m?o(Cr,{values:g,setValues:f,errorText:y,hasError:b}):null,Rr(N,k,I),o(Pe,{itemSize:"list-s",__html:d}),Pr(h,w,x),v?o(wr,{blur:!1}):null]})})})),Pr=(e,t,n)=>e?o(Ir,{isDisabled:t,onClick:n,text:e}):null,Rr=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-primary-main",children:["Получить новый код можно через",o(kr,{className:"text-primary-main ml-1",time:e,setTime:t})]}):o(be,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),Mr=({inputs:e,programId:t,saveForm:n})=>{const[a,r]=l(""),[,s]=ar("taskId"),[,c]=ar("profileId"),[,d]=ar("participantId"),m=i(((e,t,n)=>{d(e),s(t),c(n)}),[]);return{handleSubmit:i((async l=>{const a=Yi(Rn(e));if(!fn(a(l)))return"Fail";try{const{profile:e}=await Gl({profile:{phone:xt(l.phone)}}),a=e?.id;if(a&&l?.phone){const e=async()=>{try{await Jl(((e,t)=>{const{name:n="",surname:l="",middleName:a="",birthday:i="",phone:r="",email:s="",processPersonalDataLeadFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:l,midname:a,birthDate:i&&ft(i,!0),email:s,phone:xt(r),processPersonalDataLeadFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(a,l));const{taskId:e,participantId:i}=await Zl({profileId:a,programId:t});await Ql(((e,t,n,l)=>({sendToBank:!0,taskKind:"SHORT",task:{taskSource:globalThis.location.origin,id:t,participants:[{birthDate:l?.birthDate,id:e,midname:l?.midname,name:l?.name,surname:l?.surname,profile:{id:n},participantContacts:[{contactTypeCd:{key:"EMAIL"},value:l?.email},{contactTypeCd:{key:"MAIN_PHONE"},value:l?.phone}],roleCd:{key:"BORROWER",value:"Заемщик"}}]}}))(i,e,a,l)),m(i,e,a),n(JSON.stringify(l)),globalThis.location.href="/credit-lead"}catch{r("Fail")}},i=Object.keys(Ul).filter((e=>l[e])).map((e=>Ul[e]?.text));(e=>{const{open:t,close:n}=de();return{open:(l={})=>t(o(Br,{onClose:n,...e}),l),close:n}})({close:e,...Dr(l?.phone,i)}).open()}}catch{r("Fail")}}),[]),responseStatus:a}},Dr=(e,t)=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:xt(e),textButton:"Оформить",__html:`<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${Vr(t)}`}),Vr=e=>`<ul>${e?.map((e=>"<li>"+e+"</li>")).join("")}</ul>`,zr=d((({className:e,title:t,programId:n="",typeForm:i="",sections:r=[],button:s,...d})=>{const m=r?.flatMap((e=>e?.inputs))||[],[h,p]=l("");a((()=>{sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken")}),[]);const[g,f]=ar("leadForm"),x=ur(m,g,i),{handleSubmit:b,responseStatus:y}=Mr({inputs:m,programId:n,saveForm:f});if(y){Hi({responseType:y,typeForm:i}).open()}const[,{field:v,onSubmit:N,reset:w}]=At(x,{onSubmit:b});return a((()=>{"OK"===h&&(p(""),w())}),[h]),o(Ft,{className:u("container space-y-m",e),title:t,...d,children:c("form",{onSubmit:N,className:"space-y-m",children:[r.map(((e,t)=>c("div",{className:u(Ei(e.columns),"grid gap-x-m"),children:[ji(e.title),cr({field:v,typeForm:i,inputs:e?.inputs})]},`section-${t}`))),hr(s)]})})})),Ar=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"})]})})),_r=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Fr=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Or(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 Er=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:Or(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}(i((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:h,role:"listitem",children:d})})),jr=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Lr=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:h,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(Ur(n))}),[g,f]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?$r(c,v):{},...N?Fr(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(Er,{className:u(m,a?jr[a-1]:"",{"h-full":N},t),style:w?$r(c/4):{},activeIndex:l,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),$r=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Ur=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),qr={"horizontal-list":"w-6","vertical-list":"h-6"},Wr=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?qr[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),Hr=({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:u("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:u("text-secondary-text font-light",s),children:n?.description})]},String(l))},Yr=e=>e,Kr=(e=Yr)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),Xr=Kr(),Gr=(e=Yr)=>Kr((t=>-e(t))),Jr=Gr(),Zr=e=>t=>e.scrollWidth/t,Qr=e=>(t,n)=>{e.scrollBy({left:n*Zr(e)(t),behavior:"smooth"})},es=({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?[Gr()(a),Kr()(a)]:[-1,-1],m=c>0,u=d<e-1,h=i((()=>{var t;n.current&&(m?Qr(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(u?Qr(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:h,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:u,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},ts={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},ns=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=we(),[h,p]=es({itemCount:s.length}),g=ls(Boolean(s?.length));a((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Lr,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Hr({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",ts[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Wr({activeIndex:t,onClick:f,listType:l}))}):null})),ls=(e=!1)=>({behavior:e?"auto":"smooth"}),as=d((({className:e,disabled:t,...n})=>o(be,{rounded:!0,className:u("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"})}))),is=d((e=>o(as,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),rs=d((e=>o(as,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),ss="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",os=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?cs(t):null,i?o(is,{className:u(ds(a),m?"left-1":"left-0"),onClick:s}):null,r?o(rs,{className:u(ds(a),m?"right-1":"right-0"),onClick:d}):null]})})),cs=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(ss,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(ss,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),ds=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),ms=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:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=es({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===i?"relative h-full":""),children:[o(Lr,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(os,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(ns,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),us=({blocksToRender:e,...t})=>o(ms,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:R(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",_r(!0)),children:B(e,t)},String(n))})}),hs=e=>e%2!=0,ps=d((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,role:r,...s})=>c(n,{tag:n,className:u("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]}))),gs=d((({className:e="",label:t,icon:n,dataTheme:l="pc",disabled:a=!1,onClick:i})=>o(ps,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",role:"button",className:u("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(Me,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),fs=({isUnfolded:e,onToggle:t})=>o(gs,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),xs=["ArrowDownIcon","ArrowUpIcon"],bs="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",ys=({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:u("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:u(bs),children:[R(i,{...a.options,parent:n}),hs(i.length)?o(pt,{className:"col-span-6",...a}):null]}),o(ir,{renderFoldableSection:({isUnfolded:e})=>c(rr,{className:u(bs),isUnfolded:e,children:[R(r,{...a.options,parent:n}),hs(r.length)?o(pt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:l})=>o(gs,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:xs[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:l})})]})},vs=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[Ns(n,t),ys({...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[Ns(n,t),us({...l,blocksToRender:t})]});default:return null}})),Ns=(e,t)=>e&&!t.length?o(Ar,{...e}):null,ws=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),ks=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o($a,{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))))),Ss=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,ws(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Cs(l)).filter(Boolean))]}),n?o("div",{children:o(qi,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),Cs=e=>([t,n])=>{const l=n?.type;return"array"===l?Ts(t,e)(n):null},Ts=(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(Me,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(ks,{items:l,multiple:!n?.single,...t(e)})]},e)};function Is(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Bs=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Ps=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Bs(t[e])||Bs(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Bs(t[e])||Bs(n[e])||Rs(t[e])<=Rs(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Bs(t[e])||Bs(n[e])||Rs(t[e]?.min)>=Rs(n[e]?.min)&&Rs(t[e]?.min)<=Rs(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Bs(t[e])||Bs(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Bs(t[e])||Bs(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Rs=e=>Number(e||0),Ms=(e,{block:t,page:n,normalize:l=zt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=At(e),d=r((()=>Is(a,a.map((e=>dt(e.content,n?.fallback))))),[a,n?.fallback]),m=i===e?a:((e,t)=>(n=zt)=>e?.filter((([,e])=>Ps(t,n(e)||{}))).map((([e])=>e)))(d,i)(l);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},Ds={},Vs={},zs=ut((({className:e,filtrationSchema:t=Ds,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Ms(Vs,{block:a.block,page:a.options?.page}),d=o(mn,{className:"w-64",label:n?.title,options:As(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>As(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Ss,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(qi,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(vs,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),As=e=>Is(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),_s=(e=!1)=>e?"text-left":"text-center",Fs={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Os=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:u("rounded-icon object-fit flex justify-center items-center",Fs[n],e),children:o(W,{...i,width:"54%",height:"54%",name:a})}):null})),Es=d((({className:e="",title:t,benefitList:n,...l})=>{const a=we();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(w,{headingType:"h3",as:"h2",className:_s(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(js)}):null]})})),js=({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(Os,{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(w,{headingType:"h6",children:e}),o(Me,{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)),Ls=(e,t,n)=>{return o(ms,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>c("div",{className:u("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(Me,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(Me,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},$s=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Ls(e,0,t):null]}))),Us={start:"justify-start",center:"justify-center",end:"justify-end"},qs=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&u("flex",Us[n]);return o(g,{className:u("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:Ee(e)})})),Ws=d((({className:e,title:t,children:n,...l})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(w,{className:"text-center",title:t}):null,n]}))),Hs="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",Ys="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",Ks="flex flex-col gap-y-xl min-w-52",Xs=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(Me,{size:"text-h3",children:"number"==typeof e?[l,Ue(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),Gs=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Me,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(Xs,{value:n,...a}):o(Me,{size:"text-h3",children:"-"})]}))),Js=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Zs=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Me,{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]})]}))),Qs=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),eo=({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(Qs,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(Zs,{title:e,rate:t,unit:n,fractionDigits:l,color:i,...s})}),o(Gs,{className:"@xl:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:i,...s}),r]}),to=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(Zn,{items:e?[`От ${Ue(1)(l.min||0)} ${n}`,`До ${Ue(1)(l.max||0)} ${n}`]:[],step:t,...l}),no={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},lo={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ao=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=no.prefMonthsNum,prefTravelBonusRate:i=no.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||lo,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},io=ut((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=At({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=ao(r,n);return o(Ws,{className:e,title:t,...i,children:c("section",{className:u(Hs,e),children:[c("div",{className:Ys,children:[to({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),to({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?eo({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Ks,children:[f>=0?o(Gs,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,Ee(l,{isVertical:!0}),Js(a)]})]})})})),ro=Math.round(29.5),so=(e,t=0)=>e?.sum?e.sum:t,oo=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,co=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,mo=({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(Me,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Me,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(fi,{orientation:l,items:e,value:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),uo=e=>mo({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),ho=" (c капитализацией)",po=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:Ks,children:[o(Gs,{title:`Доход в конце срока${i?ho:""}`,value:e,postfix:n,prefix:"+"}),o(Gs,{title:`Сумма в конце срока${i?ho:""}`,value:t,postfix:n}),Ee(l,{isVertical:!0}),a?.map(Js)]}),go=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:fo([e,t],l),fo=([e,t],n=[])=>({[e]:n.length?Jr(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?Xr(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),xo=(e,[t,n],l)=>e>=l[t]&&e<=l[n],bo={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const yo={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},vo=(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?bo[e?.rateType]:"",{data:n}=jn(t?`/api/v1/depositrates/${t}`:null,rt);return Array.isArray(n)?n:[]}(t);if(n<=30)return{...yo,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&No(s,e)&&xo(l,["minSum","maxSum"],e)&&xo(n,["minDays","maxDays"],e)))||yo,{rate:m}=d,u=wo(m,e),h=l+u,p=c||[yo];return{...d,...fo(["minSum","maxSum"],p),...fo(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},No=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,wo=(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)},ko=ut((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=At({moneyValue:so(r,1e5),daysValue:oo(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=vo(m,s),{income:g,finalSum:f,rate:x,isUnavailableByTerm:b,depositeName:y}=p;return o(Ws,{className:e,title:t,...d,children:c("section",{className:u(Hs,e),children:[c("div",{className:Ys,children:[to({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(Zn,{items:[`От ${co(v.min||0)}`,`До ${co(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[So(p,h),uo({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),eo({rate:x,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),po({income:g,finalSum:f,buttons:n,footnotes:[l,a]})]})});var v})),So=(e,t)=>c("div",{className:"space-y-s",children:[o(Me,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(ul,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(ul,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Co=(e=[],t=!1)=>To([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),To=(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]},Io=({min:e=0,max:t=0,availableMonths:n,...l})=>o(Zn,{items:[`От ${Bo(e)}`,`До ${Bo(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),Bo=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Po=e=>mo({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Ro=({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?.(Yn(t?.[a],n.minMonths,n.maxMonths))},Mo=(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)},Do={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Vo=e=>zo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&zo({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&zo({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&zo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),zo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Ao=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[Do],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Vo({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=go(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=go(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>Vo({row:e,userInputParams:t,paramsViewSettings:n})&&xo(l,["minSum","maxSum"],e)&&xo(a,["minMonths","maxMonths"],e)))||Do)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:u}=m,h=Mo(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:h}},_o=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Fo={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Oo=ut((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(h=n?.rateRows,To([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],h));var h;const[p,{field:g}]=At({moneyValue:so(s,2e5),monthsValue:oo(s,ro),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),f=Ao(p,n,r),x=Po({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(Yn(p.moneyValue,f.minSum,f.maxSum))}),[f.minSum,f.maxSum]),a((()=>{y&&y(Yn(p.monthsValue,f.minMonths,f.maxMonths))}),[f.minMonths,f.maxMonths]),a((()=>{!_o(s)&&m&&Ro({field:g,defParams:m,calcParams:f,map:Fo,monthsValue:"minMonths"})}),[n,s]),o(Ws,{className:e,title:t,...d,children:c("section",{className:u(Hs,e),children:[c("div",{className:Ys,children:[to({title:"Сумма кредита, ₽",step:500,min:f.minSum,max:f.maxSum,...g("moneyValue"),value:f.moneyValue}),Io({title:"Срок кредита, месяцев",min:f.minMonths,max:f.maxMonths,...g("monthsValue"),value:f.monthsValue}),Eo({...f,...r},g),o("div",{className:"sm:hidden",children:x})]}),c("div",{className:u(Ks,"@4xl:w-1/2"),children:[o(Gs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Gs,{title:"Ставка",value:f?.rate,fractionDigits:2,postfix:"%"}),o(Gs,{title:"Ежемесячный платёж",value:f.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:x}),Ee(l,{isVertical:!0}),Js(i)]})]})})})),Eo=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(ul,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(ul,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(ul,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(ul,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),jo=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},Lo={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},$o=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?Wo(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=>[qo({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),qo({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),qo({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),qo({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,xo(l,["minSum","maxSum"],t),xo(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||Lo,{rate:u}=m,h=Uo(u,e),p=l+h,g=t||[Lo];return{...m,...fo(["minSum","maxSum"],g),...fo(["minMonths","maxMonths"],g),availableMonths:jo(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:h,finalSum:p}},Uo=(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)},qo=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Wo=(e,t)=>e+Math.round((t-e)/2),Ho=(e="rub")=>"rub"===e,Yo=(e,t)=>{const{minMonths:n,maxMonths:l}=fo(["minMonths","maxMonths"],Jo(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:Yn(a,n,l)}},Ko=(e,t)=>{const{minSum:n,maxSum:l}=fo(["minSum","maxSum"],Jo(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:Yn(a,n,l)}},Xo=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),Go=e=>{const t=Ho(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Jo=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},Zo=(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?mo({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?mo({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),Qo(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?uo({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},mo({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),Qo(e.isShowNewClient),e.isShowNewClient?o(ul,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},Qo=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,ec={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},tc={text:"₽",key:"rub"},nc=ut((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[tc],g=i((e=>t=>e?{...t,...Go(t),...Ko(t,e),...Yo(t,e),...Xo(t,e)}:t)(h),[h]),[f,{field:x}]=At({moneyValue:so(d,2e4),monthsValue:oo(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:tc},{normalize:g}),b=x?.("currency")?.value??tc,y=x?.("isNewClient")?.value,v=Jo(h,b),N=$o(f,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,T=i((()=>{Ro({field:x,defParams:Co(v,y),calcParams:N,monthsValue:"minMonths",map:ec})}),[x,h]);a((()=>{!_o(d)&&v&&T()}),[d,h]);const I=w===Co(v,y)?.rate;return o(Ws,{className:e,title:t,...m,children:c("section",{className:u(Hs,e),children:[c("div",{className:Ys,children:[c("div",{className:"flex gap-m",children:[to({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:lc(b?.key)}),h&&h?.length>1?o(gn,{label:"Валюта",options:p,...x("currency")}):null]}),Io({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),Zo({...N,...s},x)]}),eo({rate:w,children:ic(T,I)}),po({income:k,finalSum:S,buttons:[...l,ac(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),lc=(e="")=>Ho(e)?1e3:100,ac=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},ic=(e,t=!1)=>t?null:o(qi,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),rc=e=>sc({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&sc({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),sc=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],oc={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},cc=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[oc],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>rc({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=go(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=go(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>rc({row:e,userInputParams:t,paramsViewSettings:n})&&xo(l+r,["minSum","maxSum"],e)&&xo(i,["minSumOld","maxSumOld"],e)&&xo(r,["minSumExtra","maxSumExtra"],e)&&xo(a,["minMonths","maxMonths"],e)))||oc)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=h,g=Mo(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:f}},dc=ut((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=At({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=cc(s,n,i),h=Po({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Ws,{className:e,title:t,...r,children:c("section",{className:u(Hs,e),children:[c("div",{className:Ys,children:[to({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),to({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Io({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),mc({...m,...i},d),m.isExtraMoney?to({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:h})]}),c("div",{className:u(Ks,"@4xl:w-1/2"),children:[o(Gs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Gs,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Gs,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Gs,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),Ee(l,{isVertical:!0}),Js(a)]})]})})})),mc=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(ul,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(ul,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(ul,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),uc=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Hn(e,{normalize:(e=a)=>n&&l?String(Yn(Number(hc(e)),n,l)):hc(e),format:Ue(r)}),d=i((e=>t&&t(hc(e))),[t]);return o(Gt,{onChange:d,...s,...c})})),hc=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),pc=d((e=>o(uc,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Me,{size:"text-xl",font:"font-light",children:"₽"})})}))),gc={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},fc={amount:1500},xc=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=At(fc),[h,p]=l(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(w,{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:gc[r],children:[o(pc,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(qi,{className:"w-full mt-lg",type:"submit",disabled:h,children:i.text}):null]})]})})),bc=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),yc="relative h-full",vc={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Nc=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(Sc),r=n?{defaultPadding:"p-6xl pb-m"}:{};return M({...l,renderProps:(n,l,a)=>c("div",{className:wc(n,{someCardsHighlighted:i}),children:[B(n,l,{className:kc(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),Sc(n)?bc({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},wc=(e,{someCardsHighlighted:t})=>u(yc,t&&(Sc(e)?"pt-3xl":"pt-3xl sm:pt-16")),kc=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>u(yc,"min-w-80",vc[l],t&&(Sc(e)?"pt-3xl sm:pt-16":"pt-3xl"),_r(n),n&&"h-full"),Sc=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Cc=ut((({className:e,visibleItemCount:t=0,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(ms,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?Tc(s?.block?.blocks):[],hasBlur:!0,children:Nc({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Tc=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Ic="z-10 border border-solid w-full h-full",Bc=u(Ic,"absolute hidden @xl:block border-transparent"),Pc=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:u(Bc,"top-9 right-12 bg-green-dark")}),o("div",{className:u(Bc,"top-6 right-8 bg-green")}),o("div",{className:u(Bc,"top-3 right-4 bg-green-light")}),c("div",{className:u(Ic,"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}),Ee([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Rc={black:"bg-black",white:"bg-white"},Mc=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:u("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ce,{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:Ee([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(Me,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Dc)]}):null,a?c(Me,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Dc=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Rc[e]}`},String(t)),Vc=d((({icon:e,...t})=>{const n=ue(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:u("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})),zc=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:u("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?Ac(l):null]})}))),Ac=e=>o("div",{className:u("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(Vc,{...e},String(t))))}),_c=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Fc=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=ue()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...he(a),children:i})})),Oc=[{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"}}],Ec=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=>Oc.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Oe(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}})),h=u("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},jc(a));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:Ee(m,{className:Lc(s??!1,a??!1,n),buttonClassName:h})}),r?o(Me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),jc=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",Lc=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),$c=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:u("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(Fc,{href:a,target:m,className:"h-full",data:_c(v),children:c(Ce,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ge(Oe(i)?o(ne,{image:i}):null,x),buttons:d.length?o(Ec,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Fe,{benefits:f}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,Uc(l,p)]})})}))),Uc=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,qc=(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(Me,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(Me,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:Ee(a)}):null]},String(t))},Wc=d((({className:e="",title:t,align:n="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:h,...p})=>{const f=d.map(qc),[x,b]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[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:u("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[Oe(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(w,{className:u("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(ir,{renderFoldableSection:()=>c("div",{children:[x,o(rr,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?Hc(m?.parent,h,y):null}):o("div",{children:x})]})})),Hc=(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?he(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Yc=d((({__html:e,icon:t,iconVersion:n="black"})=>c("div",{className:"flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m",children:[o("div",{className:"rounded-full bg-white p-xs",children:o(W,{name:t,width:"24",height:"24",iconVersion:n})}),o(Pe,{__html:e})]}))),Kc=d((({step:e=10,description:t,showPercentage:n=!0})=>c("div",{children:[o("div",{className:"h-4 w-full bg-gray relative",children:o("div",{className:"h-4 bg-green",style:{width:`${e}%`}})}),c("div",{className:"relative",children:[n?c("div",{className:"absolute left-2/4 text-green",children:[e,"%"]}):null,t?o("div",{className:"text-right mr-4 text-gray",children:t}):null]})]}))),Xc=d((({step:e=1,totalSteps:t=5,stepsTitles:n=[]})=>{const l=r((()=>e/t*100),[e,t]);return o("div",{className:"py-lg px-5xl bg-white col-span-12",children:c("div",{children:[c("span",{className:"font-bold",children:["Шаг ",e," из ",t,"."]})," ",n[e-1]||null,o(Kc,{step:l,showPercentage:!1})]})})})),Gc={1:[{title:"Персональные данные",columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0},{fieldType:"common",name:"name",required:!0,dadata:!0},{fieldType:"common",name:"middleName",dadata:!0},{fieldType:"common",name:"sex",required:!0},{fieldType:"common",name:"birthday",required:!0},{fieldType:"common",name:"birthPlace",required:!0},{fieldType:"common",name:"phone",required:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{fieldType:"common",name:"dulSerie",required:!0},{fieldType:"common",name:"dulNumber",required:!0},{fieldType:"common",name:"dulIssueDateField",required:!0},{fieldType:"common",name:"dulSubdivisionCode",required:!0,dadata:!0}]},{inputs:[{fieldType:"common",name:"dulIssuedBy",required:!0,dadata:!0},{fieldType:"common",name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:2,inputs:[{fieldType:"common",name:"participantAddress",required:!0},{fieldType:"common",name:"participantAddress",required:!0,dadata:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",columns:2,inputs:[{fieldType:"common",name:"fullAddress",required:!0,dadata:!0},{fieldType:"common",name:"housing",required:!0}]}],2:[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{fieldType:"info",text:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{fieldType:"common",name:"employment",required:!0},{fieldType:"common",name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{fieldType:"common",name:"inn",required:!0,dadata:!0},{fieldType:"common",name:"legalForm",required:!0}]},{inputs:[{fieldType:"common",name:"organization",required:!0},{fieldType:"common",name:"amountWorkers",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"employerActivities",required:!0},{fieldType:"common",name:"employerOrganization",required:!0},{fieldType:"common",name:"generalSeniority",required:!0},{fieldType:"common",name:"lastJobExperience",required:!0},{fieldType:"common",name:"experience5Years",required:!0},{fieldType:"common",name:"jobsNumber",required:!0}]},{inputs:[{fieldType:"common",name:"phone",label:"Телефон работодателя",required:!0},{fieldType:"common",name:"beginDate",required:!0},{fieldType:"common",name:"positionOrganization",required:!0}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{fieldType:"common",name:"fullAddress",required:!0}]}],3:[{title:"Семейное положение"},{columns:1,inputs:[{fieldType:"common",name:"familyStatus"}]},{columns:1,inputs:[{fieldType:"common",name:"dependents"}]},{columns:2,inputs:[{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"retirementIncome"},{fieldType:"common",name:"otherIncome"}]},{title:"Совокупный доход"},{inputs:[{fieldType:"info",text:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{fieldType:"common",name:"mandatoryIncome"}]},{columns:1,inputs:[{fieldType:"common",name:"otherPayments"}]},{columns:1,inputs:[{fieldType:"common",name:"snils"}]},{columns:2,inputs:[{fieldType:"common",name:"armyIdFlg"}]}],4:[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"disablePeopleFlg"}]},{inputs:[{fieldType:"common",name:"bankruptcyFlg"}]},{inputs:[{fieldType:"common",name:"shareholderFlg"}]},{inputs:[{fieldType:"common",name:"legalEntityName"}]},{inputs:[{fieldType:"common",name:"creditInRshbCd"}]}],5:[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"region"}]},{inputs:[{fieldType:"common",name:"addressBranch"}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{fieldType:"common",name:"bankEmployeeCode"}]}]},Jc=d((({step:e,setStep:t,totalSteps:n})=>c("div",{className:"flex justify-between",children:[o(qi,{onClick:()=>{e>1&&t(e-1)},className:u("w-full @xl:w-auto"),type:"button",version:"secondary",disabled:1===e,children:"Назад"}),o(qi,{onClick:()=>{e<n&&t(e+1)},className:u("w-full @xl:w-auto"),type:"button",disabled:e===n,children:"Далее"})]}))),Zc=["Персональные данные","Данные о трудоустройстве","Данные о доходах и расходах","Дополнительные сведения","Отделение Банка"],Qc=d((({className:e,typeForm:t="",sections:n=[],...a})=>{const[i,r]=l(1),s=n?.flatMap((e=>e?.inputs))||[],d=ur(s,t),[,{field:m,onSubmit:h}]=At(d,{onSubmit:()=>!1});return o(g,{className:u("bg-transparent",e),defaultPadding:"p-6xl",...a,children:c("div",{className:"container grid grid-cols-12",children:[o(Xc,{stepsTitles:Zc,step:i,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:c("form",{onSubmit:h,className:"space-y-m",children:[ed({sections:Gc[i],typeForm:t,field:m}),o(Jc,{step:i,setStep:r,totalSteps:5})]})})]})})})),ed=({sections:e,field:t,typeForm:n})=>e.map(((e,l)=>c("div",{className:u(Ei(e.columns),"grid gap-x-m"),children:[td(e?.inputs),ji(e?.title),cr({field:t,typeForm:n,inputs:e?.inputs})]},`section-${l}`))),td=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e})=>o(Yc,{__html:e}))):null},nd=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,ld=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),ad=1e9,id={sum:{min:1e4,max:ad},period:3},rd=ut((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Ms(id,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:sd(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=od(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Ss,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(pc,{label:l?.title,min:500,max:ad,...d("sum",{parse:e=>({min:Number(e),max:ad}),format:({min:e})=>String(e)})}),o(Zn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(vs,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),sd=e=>st((e?.paramsSource?.rateRows||[]).filter(nd).flatMap((e=>ld(e.minMonths,e.maxMonths)))),od=e=>st(e.flatMap((e=>e||[])).filter(nd).flatMap((e=>ld(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],cd=[{key:"10"},{key:"50"},{key:"100"}],dd=({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(mn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:cd,iconVersion:"black"})]})},md="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",ud=(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:md,"aria-label":`Страница ${i}`,children:i},String(t)):null},hd={width:"24",height:"24"},pd=({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(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:gd(1===e),...hd})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:md,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(ud),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:md,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:gd(e===n),...hd})})]})},gd=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",fd=({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(pd,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(dd,{itemCount:l,onItemCountChange:a}):null]}),xd=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:u("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:u("h-14 w-full px-10 text-l text-black box-border rounded-md",Kt),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),bd=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(xd,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Vl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Vl,{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(qi,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),yd=(e,t)=>o(Os,{...e,iconBgVersion:t,className:"shrink-0"}),vd=({title:e,timestamp:t,publicId:n})=>{const l=ue(),{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:[yd({icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Me,{size:"text-m","font-weight":"font-light",children:ft(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)},Nd="/api/v1/depository",wd={startDate:void 0,endDate:void 0,query:""},kd=ut((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:h}]=At(wd),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?ft(l,!0):"",r=a?ft(a,!0):"",s=new URLSearchParams(Nd);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}=jn(Nd+o,rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(bd,{filtrationState:d,field:m,onClearFilter:h}),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(Me,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Me,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(vd,{...e},String(e.publicId)))):o(Ar,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(fd,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),Sd=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,Cd=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Sd(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]}))),Td="location";function Id(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",Pd()??{name:e}),r=i((e=>{Rd(e),n(e)}),[]),{data:s}=jn(Bd()?null:"/api/v1/region",rt);return a((()=>{s&&!Bd()&&n(s)}),[s]),[t??{name:e},r]}const Bd=()=>Boolean(globalThis.localStorage?.getItem(Td)),Pd=()=>{try{const e=globalThis.localStorage?.getItem(Td);return e&&JSON.parse(e)}catch(e){return null}},Rd=e=>{try{globalThis.localStorage?.setItem(Td,JSON.stringify(e))}catch(e){}};var Md;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Md||(Md={}));const Dd=new Intl.NumberFormat("ru",{style:"currency",currency:Md.RUB}),Vd=e=>e?Dd.format(e):"",zd="text-m font-light text-secondary-text ",Ad=`${zd} text-left`,_d=`${zd} pl-5xl text-center`,Fd=`${zd} pl-5xl text-right`,Od={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Ed=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Ad,children:o(Me,{size:"text-m",children:"Валюта"})}),o("th",{className:_d,children:o(Me,{size:"text-m",children:"Купить"})}),o("th",{className:Fd,children:o(Me,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(jd)})]}))),jd=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:Od[t]},width:"24",height:"24"}):null,o(Me,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Me,{size:"text-h6",children:Vd(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Me,{size:"text-h6",children:Vd(e?.buyExchangeRate)})})]},t)},Ld={icon:"GpsIcon"},$d=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Os,{...Ld,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Ud=(e,t,n)=>{const l=Number(qd(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)},qd=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Wd=e=>Bt([[e=>e.value!==Md.RUB&&e.oppositeValue!==Md.RUB,()=>e.handleConvert(e.value,Md.RUB)],[e=>e.value===Md.RUB&&e.oppositeValue===Md.RUB,()=>e.handleConvert(e.value,Md.USD)],[e=>e.value===Md.RUB&&e.oppositeValue===Md.RUB,()=>e.handleConvert(e.value,Md.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Hd(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(Gt,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(mn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Yd=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Md.RUB,selectBuy:n?.[0]?.currency?.currency||Md.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:[Hd({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Kd(r,d,n),value:r.inputSell,setValue:e=>Gd(d,n)(e,r.selectSell,r.selectBuy)}),Hd({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Xd(r,d,t),value:r.inputBuy,setValue:e=>Jd(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),Kd=(e,t,n)=>l=>{t({selectSell:l}),Wd({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{Gd(t,n)(e.inputSell,l,a)}})},Xd=(e,t,n)=>l=>{t({selectBuy:l}),Wd({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>Jd(t,n)(e.inputBuy,l,a)})},Gd=(e,t)=>(n,l,a)=>{e({inputSell:qd(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(Ud(n,i,l===Md.RUB)||"")})},Jd=(e,t)=>(n,l,a)=>{e({inputBuy:qd(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(Ud(n,i,l===Md.RUB)||"")})};const Zd=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const[a]=Id(),i=function(e){const t=e?.code||"000",{data:n}=jn(`/api/v1/exchangerates?regionCode=${t}`,rt);return n||{}}(a),r=Qd(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Md.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:Md.RUB}}),o(g,{className:u("box-border min-h-80",e),...l,children:o(Ce,{className:"h-full",title:o(w,{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(Ed,{className:"mb-xl",exchangeCurrencyItems:r}):null,o($d,{address:i?.address})]}),o(Yd,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:n})]})})})})),Qd=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],em=d((({className:e="",items:t})=>{const n=ue();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(tm(n))})})),tm=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,...he(t),children:a||null})},String(l)):null},nm=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>o(ps,{tag:"button",className:u("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:[yd(a,t),e?o(Me,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),lm=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",am=(e=!1)=>e?"MinusIcon":"PlusIcon",im=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",rm=ut((({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:u("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(ir,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(rr,{className:u("gap-lg",lm(m)),isUnfolded:e,children:M({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>sm({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),sm=({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?im(e):am(e))(a,r);return"accordion"===e?o(nm,{label:s,labelIcon:n,labelIconBgVersion:l,icon:c,onToggle:i}):o(gs,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},om=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:cm(e)}))),cm=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(rm,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(em,{items:e.items}):null},String(t)))),dm=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(mm)}):null)),mm=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Me,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(um)})]},String(t)),um=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:hm(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),hm=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${pm(t)}`,children:o(Me,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},pm=e=>e.replaceAll(/\D/g,""),gm=d((({className:e="",index:t,text:n,...l})=>{const a=ue(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:u("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),fm=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(Me,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(gm,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),xm=d((({className:e="",index:t,...n})=>{const l=ue(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:u("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}`})})),bm=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Me,{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(xm,{index:t,...e},String(t))))}):null]}))),ym=ut((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{};n.options?.page?.common;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:h,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(om,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(dm,{items:r}),m?o(be,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(Ec,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(be,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(fm,{title:d,links:i}),o(bm,{links:a,license:h})]})})),vm=ut((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],h=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=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(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(gn,{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:u("p-m w-full @xl:w-auto",h),data:_c(i,s?.key),children:f})}):null]})})})),Nm={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"},wm=d((({version:e,text:t,mobileText:n,...l})=>{const a=we()?n:t;return a?o(be,{className:u("py-s px-lg font-light whitespace-nowrap",Nm["transparent"===e?"transparent":"default"]),...l,children:a}):null})),km=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:l,version:a,backwardButton:r})=>{const s=D(),d="/"===s.pathname,{dataFooter:m,dataHeader:u,...h}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(yr,{className:"my-2xs",bgColor:e,logo:h,data:u,showTitle:!1})}):Sm(p,r),o(wm,{version:a,...l})]})})),Sm=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(W,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,Cm={"bg-white":"primary",transparent:"transparent"},Tm=ut((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=Cm[e],portal:l,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=l||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:n,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(km,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...i})})})})),Im=(e=!1)=>e?{}:{padding:"p-0"},Bm={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Pm=ut((({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=D();return o(g,{className:u("relative flex flex-col",Bm[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:M({...c,extraProps:{className:u("w-full",_r(r)),...Im(l)}})})}),{childrenTypes:[]}),Rm=ut((e=>o(Pm,{...e})),{childrenTypes:[]}),Mm=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?u("flex",Us[n]):"";return o(g,{className:u(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:l})})})),Dm=["байт","Кб","Мб","Гб","Тб","Пб"],Vm=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,...he(i),children:[e,t?c(Me,{size:"text-l",font:"font-light",children:[t," ",zm(d,m),o(Me,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),zm=(e,t)=>e||t?o("span",{children:", "}):"",Am=(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))} ${Dm[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Fm(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(Vm,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:_m(t),data:n?.data}),o(Pe,{__html:n?.__html})]},String(l))},_m=e=>e?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,Fm=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},Om=d((({href:e,__html:t,target:n})=>{const{close:l}=de(),a=D(),r=U(a)(e),s=i((()=>{l()}),[]);return c(Wl,{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(qi,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Em=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(Om,{...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:[_m(a),o(Me,{font:"font-light",children:e})]})})),jm={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Lm=ut((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=D();return c(g,{className:u("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:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",jm[r]),role:"list",children:a.map($m(d,i))}):null]})})),$m=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?Um(t)(n,l):Am(e,t)(n,l)},Um=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(Em,{...l,icon:e,href:qm(t)?t?.href:t?.attachment?.src}),o(Pe,{__html:t?.__html})]},String(n)):null},qm=e=>"href"in e,Wm=ut((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:p="primary",...f})=>{const x="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:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Ce,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:Ee(l,{className:"flex-wrap"}),children:[a?o(Me,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:u("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(Me,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:u("flex justify-center bg-white rounded-md @xl:-order-1",x),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),Hm=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Ym=(e=[],t={})=>e.filter((({content:e={}})=>Ps(t,e))).length,Km=(e,t)=>e===t;const Xm=(Gm=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(Km,((e=Km)=>(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])=>Gm(n,t[e])))));var Gm;const Jm=[],Zm={},Qm={primary:"bg-white/30",secondary:"bg-main-divider"},eu={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},tu=d((({count:e,version:t="secondary"})=>{const n=we(),l=n?"bg-main-divider":Qm[t],a=eu[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Me,{size:"text-xs",color:a,children:e})})})),nu=({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:u("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:u("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})]})]})},lu={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},au={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},iu={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},ru={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},su=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:h,...p}=t;return o(i,{className:u("h-12","block flex-1","cursor-pointer",lu[l],n?ru[l]:iu[l]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?au[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[nu({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(tu,{count:m,version:Hm(n,l)})}):null]})})})),ou=d((e=>o(e?.item?.href?cu:du,{...e}))),cu=d((e=>{const t=ue(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(su,{...e,tag:"a",item:a,onClick:l})})),du=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(su,{item:e,onClick:l,...n})})),mu=(e,t,n)=>(l,a)=>o(ou,{isActive:l===e,onClick:t,type:n,item:l},String(a)),uu=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(mu(l,a,t))}))),hu={categories:[],extraOptions:[],propertyType:[],stage:[]},pu=ut((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Ms(hu,{block:a.block,page:a.options?.page}),f=i(((e=hu)=>p(e)),[]),x=(({hotFilters:e=Jm,filtrationState:t=Zm,blocks:n=Jm,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Xm(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Ym(n,t.filter),version:Hm(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:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(uu,{...x}),o(Ss,{filtrationSchema:n,resetButton:l,field:m,reset:h}),o(vs,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),gu=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),fu=d((({children:e})=>gu?e:null)),xu="/icons/MapMarkerClusterIcon.svg",bu="/icons/MapMarkerClusterYellowIcon.svg";function yu({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=vu("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=vu("workplaces",e,a),r=Nu(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=Nu(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=Nu(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 vu=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?xu:bu,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),Nu=(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?xu:bu,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),wu={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},ku={...wu,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},Su=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(ku).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(W,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Cu=e=>globalThis[e];function Tu(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=Cu(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(Cu(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(Cu(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))})(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}const Iu={...wu,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Bu=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(Iu).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),Pu=[55.753995,37.614069],Ru=d((({points:e,className:t="",zoom:n=5,isLoad:l})=>{const i=s(null),r=Tu("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{i.current?yu({yandexMaps:r,map:i.current,points:e,isLoad:l}):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:Mu(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),yu({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:u("relative","w-full",t),children:[l?o(wr,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(Bu,{yandexMaps:i}),o(Bu,{yandexMaps:i,direction:"out"})]}),Su(i,r,u("right-2 top-80",d))]})})),Mu=e=>{const t=[Vu(Du(e,0)),Vu(Du(e,1))];return t.every((e=>e))?t:Pu},Du=(e,t)=>e.map((e=>e.coords?.[t])),Vu=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,zu={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Au={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},_u={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)},Fu=(e,t,n)=>{const l=Hm("all"===t),a=Hm("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(qi,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(qi,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Ou=({__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(Me,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Eu="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",ju=({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(ul,{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(ir,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Eu,children:s}),o(rr,{className:Eu,isUnfolded:e,children:d})]}),renderFoldButton:Lu(n,l)})}):null})},Lu=(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(W,{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:$u()})]}),$u=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),Uu=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Me,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),qu=()=>{},Wu=e=>"all"===e?"block":"hidden",Hu=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=qu,renderRemoteWorkplaceCard:s=qu,getBalloon:d=qu,getBalloonRemoteWorkplaces:m=qu,descriptionData:h,title:p})=>{const g=p?.includes("Офис"),[f,{field:x,reset:b}]=At(zu),[y,v,N,w]=r((()=>{const e=Yu(t,f),n=Yu(a,f),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,f]),[k,S]=l("all"),C={filters:Ku([...t,...a]),field:{field:x,reset:b},onlyOffice:g,labels:Au};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Uu(p,w),h?Ou(h):null,g&&Fu(t,k,S),o("div",{className:u("pb-3xl",Wu(k)),children:ju(C)})]}),o("div",{className:"h-[600px]",children:o(fu,{children:o(Ru,{points:v,isLoad:n,className:"h-full"})})})]}),c(fu,{children:[y.map(i),N.map(s)]})]})})),Yu=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>_u[t](e)))))},Ku=e=>Object.keys(zu).filter((t=>e.filter((e=>_u[t](e))).length)),Xu={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"}},Gu=d((({className:e,children:t,color:n="gray"})=>c("div",{className:u("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Xu[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(Me,{size:"text-m",color:Xu[n].text,children:t})]}))),Ju=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:Zu({textItems:i,subText:t,children:n,isPhone:l,...a})})),Zu=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Me,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Qu(n,s),a?o(Me,{color:l,size:"text-m",children:a}):null]}),Qu=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Me,{size:"text-l",children:t?o("a",{href:`tel:${eh(e)}`,children:e.trim()}):e.trim()},String(n)))),eh=e=>e.replace(/\D/g,""),th=d((({className:e,children:t})=>o("div",{className:u("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}))),nh=["ArrowDownIcon","ArrowUpIcon"],lh=["Подробнее","Скрыть"],ah=({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(W,{className:"text-primary-text",name:nh[Number(e)],width:"16",height:"16"})]}),ih=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:oh(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(Me,{size:"text-h4",children:oh(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Gu,{color:"green",children:oh(s)})})]}),o("div",{className:"hidden sm:block",children:o(th,{className:"flex-wrap",children:m?.map(sh)})}),o(ir,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(rr,{isUnfolded:e,children:o(th,{className:"flex-wrap",children:m?.map(sh)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ah({isUnfolded:e,onToggle:t})})]},String(d))},rh=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${oh(t)} №${n}`,body:e.toUpperCase()}),sh=(e,t)=>o(Ju,{...e},String(t)),oh=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",ch=[];const dh=async e=>{const t=await it(e,{method:"GET"});return Array.isArray(t)?t:ch},mh={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},uh={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)},hh=d((({descriptionData:e,className:t})=>{const[n]=Id(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=jn(`/api/v1/atms?regionCode=${e}`,dh);return{data:t||ch,isLoad:!t&&!n}}(l);return o(Hu,{className:t,filterItems:ph,data:a,isLoad:i,initFilterState:mh,renderCard:ih,getBalloon:rh,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),ph=(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=>uh[t](e))),n=!l.length||l.some((t=>uh[t](e)));return t&&n}))},gh=e=>{const t=xh(e);return o(Ju,{label:"Режим работы",value:t,className:"max-w-none"})},fh=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",xh=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[fh({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),fh({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},bh=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],yh=e=>bh.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??"")}}))),vh=e=>{if(!e)return null;const t=Nh(e);return c(th,{className:"border-none",children:[o(Ju,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(wh)})}),o(Ju,{label:"Режим работы",className:"max-w-none",children:o(Me,{children:e})})]})},Nh=e=>{const t=bh.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},wh=({short:e,status:t},n)=>o("div",{className:u("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(Me,{size:"text-xs",children:e})},String(n)),kh=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Ju,{label:"Валюта",value:e.currency}):null,t?o(Ju,{label:"Купить",value:String(t)}):null,n?o(Ju,{label:"Продать",value:String(n)}):null]},String(l)),Sh=(new Date).getDay(),Ch=e=>{const[t]=e?.slice(Sh-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(Gu,{color:"green",children:a}):null,n&&i?o(Gu,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Gu,{color:"red",children:"Выходной"})},Th=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",Ih=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(Ju,{label:e,value:t&&n?n:"",subText:Th({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Bh=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,Ph=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Rh=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,Mh=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=yh(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(Me,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:t})]}):null]}),Ch(h)]}),o("div",{className:"hidden sm:block",children:Dh({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(ir,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(rr,{isUnfolded:e,children:Dh({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ah({isUnfolded:e,onToggle:t})})]},String(u))},Dh=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=yh(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(th,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Ju,{label:"Факс",value:t,isPhone:!0}),o(Ju,{label:"Телефон филиала",value:e,isPhone:!0}),o(Ju,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Ju,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(Ju,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Ju,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(th,{children:o(Ju,{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(Ih)})})}):c(th,{children:[o(Ju,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(wh)})}),gh(d)]}),r?.businessScheduleVisibleTag?vh(r?.businessScheduleDescription):null,s?.currencies?.length?o(th,{className:"flex-wrap",children:s?.currencies?.map(kh)}):null]})},Vh=({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=yh(e),n=e?xh(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?Bh(n):Rh(n,l):Ph(n):null})(n)}`;return{header:l,body:i}},zh=({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(Me,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Ah({workScheduleDescription:t})}),o(ir,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(rr,{isUnfolded:e,children:Ah({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ah({isUnfolded:e,onToggle:t})})]},String(n)):null,Ah=({workScheduleDescription:e})=>c("div",{children:[c(th,{className:"flex",children:[o(Ju,{label:"Операции для физических лиц",children:o(Me,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Ju,{label:"Операции для физических лиц",children:o(Me,{children:"Оформление и обслуживание банковских карт"})}),o(Ju,{label:"Операции для физических лиц",children:o(Me,{children:"Инвестиционное и накопительное страхование"})}),o(Ju,{label:"Операции для физических лиц",children:o(Me,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Ju,{label:"Режим работы",className:"max-w-none",children:o(Me,{children:e})})]}),_h=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Fh={branches:[],remoteWorkplaces:[]};const Oh=async e=>await it(e,{method:"GET"})||Fh,Eh=d((({className:e})=>{const[t]=Id(),n=t?.code??"000",{data:l,isLoad:a}=function(e){const{data:t,error:n}=jn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,Oh);return{data:t||Fh,isLoad:!t&&!n}}(n);return o(Hu,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:Mh,renderRemoteWorkplaceCard:zh,getBalloon:Vh,getBalloonRemoteWorkplaces:_h,title:`Офисы филиала ${t?.name}`})})),jh=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===l?o(Eh,{}):o(hh,{descriptionData:e})})})),Lh=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:u("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),$h=d((({className:e,padding:t,slides:n=[],...l})=>o(g,{className:u("overflow-hidden relative",e),padding:t,...l,children:o(ms,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Xe,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),Uh=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",a),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Oe(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?qh({__html:i,richVersion:r}):null,Wh({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Wh({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Wh({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?Ee([l]):null]})]}))),qh=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),Wh=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(W,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Me,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Me,{size:"text-xl",color:l,children:t})]})]}):null,Hh=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Pe,{__html:t,richVersion:n})})})),Yh=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:u(Kt.split(" ").filter((e=>"rounded"!==e)),dl,"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(Me,{color:"text-primary-text",children:t}):null]})}))),Kh=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(Yh,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Yh,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Xh=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(mn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),Gh=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(Xh,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Xh,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Jh=["От 1 дня","До 365 дней"],Zh=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Me,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Zn,{min:1,max:365,value:e,items:Jh,onChange:t})]}))),Qh=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(Xh,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Xh,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),ep=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Gh,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:tp(m)}),o(Zh,{days:a,setDays:e=>m({days:e})}),o(Qh,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:np(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Me,{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(Kh,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),tp=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},np=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},lp=d((({days:e,tariffs:t=[]})=>{const n=ip(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:[ap("Аренда за",e),ap("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{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(k,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),ap=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Me,{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})]}),ip=(e,t)=>{const n=rp(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},rp=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},sp=(e,t)=>e.find((e=>e.branchCode===t)),op=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=sp(l,n.selectedBranch),d=cp(s?.safeBoxCaseVolumes),m=dp(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=mp(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(ep,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(lp,{days:n.days,tariffs:u})]})})),cp=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],dp=(e,t)=>e?.find((e=>e.volume===t)),mp=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,up=[];const hp=async e=>await it(e,{method:"GET"})||up,pp=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,u]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=Fa(),p=gp(m.selectedRegion,h),f=function(e){const{data:t}=jn(e?`/api/v1/safeboxes?regionCode=${e}`:null,hp);return t||up}(p),x=i((e=>u((t=>({...t,...e})))),[u]),b=(y=sp(f,m.selectedBranch)||f,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(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(op,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Ru,{points:b,className:"h-[640px]"}):null]})})),gp=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,fp={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"},xp=(e,t,n)=>(l,a)=>{const{button:i}=l;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:bp(e,n)(l,a)}),c("div",{className:u("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[yp(l),i?.text?o(be,{className:"box-border py-s w-full max-w-60 mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},bp=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=vp(e,i),s=i?"transparent"===t:t;return o(g,{className:u("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:Np({step:n,iconVersion:a,i:l,stepVersion:t})})})},yp=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:u("text-s font-light text-left",fp.description),children:e.description}):null,o(Pe,{__html:e.__html})]}),vp=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",Np=({step:e,iconVersion:t,i:n,stepVersion:l})=>{return Oe(e?.icon)?o(ne,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:u("text-h4","transparent"===l?fp.iconText:(a=l,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var a},wp=d((({className:e="",title:t,description:n,steps:l=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=l.length>3;return c(g,{className:u("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:l.map(xp(d,r,i))}):null,Ee(a,{isVertical:!0})]})})),kp=d((({isActive:e,item:t,onClick:n})=>c("div",{className:u(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(W,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),Sp=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:u("relative min-h-full bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(ql,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),Cp=({menuRef:e,dialogRef:t,closeDialog:n,openDialog:l,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();l(o(Sp,{onClick:e=>e.stopPropagation(),onClose:n,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:c[r].description||c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];function Tp(e){throw new Error(e)}const Ip=({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:Tp(e)}}))),[c,d]),n},Bp=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 Pp=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(Me,{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(Rp,{...e},String(t))))})]}):null,Rp=d((({icon:e,...t})=>{const n=ue(),{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(Me,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Mp=(e,t)=>n=>n.name?o(Fc,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:_c(e,n.name),children:o(Me,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Dp=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:u(Kt,"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"})]}))),Vp=d((({foreignOffices:e,branches:t})=>{const[n,a]=Id(t?.default),r=ue(),{href:s}=r({href:`/branches/${n.slug}`}),[d,m]=l(""),u=Ap(Fa()).sort(((e,t)=>e.name.localeCompare(t.name))),h=((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})(u,zp),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(Wl,{className:"pb-20",head:c("div",{children:[o(Me,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Fc,{href:s,className:"inline mx-2xs text-primary-main",children:n.name})]})}):null,o(Dp,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:u.filter((({name:e})=>e&&Bp(e.toLowerCase())(d.toLowerCase())>=.8)).map(Mp(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(h.entries()).map((f=g,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Me,{size:"text-h6",children:e})}),t.map(Mp(x,f))]},e)))}),Pp(e)]});var f,x})),zp=e=>e.name?.charAt(0)||"",Ap=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),_p=d((({menuRef:e,menuItem:t,locationDialogProps:n,closeAll:l})=>{const i=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Vp,{...e}),n),close:n}})(n||{}),[{name:r}]=Id(),s=e?.current?.getBoundingClientRect(),c=G(X.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open(),"reload"===e.data.type&&l(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(Sp,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),Fp="burgerMenuDialog",Op=({menuRef:e,centralMenuItem:t,closeAll:n,openDialog:l,locationDialogProps:a})=>{const i=Ip(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Fp,i);return[r,{toggle:()=>{r?n():l(o(_p,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:n}),{id:Fp})}}]},Ep=[],jp=ut((({sticky:e,...t})=>{const{menuItems:n=Ep}=e??{},a=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),u=r.slice(d),[h,p]=l(-1),[f,x]=l(""),{open:b,closeAll:y}=de(),v=i((()=>{p(-1),x(""),y()}),[y]),N=Wt(v),w=s(null),[k,{toggle:S}]=Op({menuRef:w,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.header}),[{openBottomMenuItemDialog:C}]=Cp({menuRef:w,dialogRef:N,closeDialog:v,openDialog:b,leftItems:m,rightItems:u}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{x(t),p(e),y(),C(e,t)}),[y,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:w,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(Lp(I,"left",{activeIndex:h,currentItemPosition:f})),o(kp,{item:a,isActive:k,onClick:e=>T(e)}),u.map(Lp(I,"right",{activeIndex:h,currentItemPosition:f}))]})})})),Lp=(e,t,n)=>(l,a,i)=>o(kp,{item:l,isActive:i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t,onClick:r=>{i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t||r.stopPropagation(),e(a,t)}},l.title||String(a)),$p="hidden sm:flex absolute z-40",Up={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},qp=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=es({itemCount:t?.length||0});return a((()=>Wp(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(Lr,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Up[i].item,gap:Up[i].gap,children:t.map(mu(n,l,i))}),s.canScrollLeft?o(is,{className:u("left-6",$p,Up[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(rs,{className:u("right-6",$p,Up[i].buttonTop),onClick:s.scrollRight}):null]})})),Wp=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},Hp={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Yp=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(Hp[t].wrapper,e),children:o(qp,{className:Hp[t].component,tabsType:t,...n})}):null,Kp=ut((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=Xp(n??{}),p=D(),f=t.every((e=>"link"===e?.type)),x=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(Zp(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[h]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[h])):w;v(-1===e?0:e)}),[b,w,h]);const k=Jp(x[y],y),S=i((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(h,e?.tabName??String(t)):n.delete(h),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:u({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[Yp({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Gp(t,x),activeItem:N,tabsType:r,onChange:S}),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])=>R(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Jp)?.filter(Boolean)||[]}),Xp=({__id:e,anchor:t})=>t??e??"tabs",Gp=(e,t)=>t?.length?t:e,Jp=(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),Qp={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},eg=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Qp[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),tg=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}))),ng={Buttons:({buttons:e})=>Ee(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(Me,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Me,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(tg,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},lg=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 ag({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),ag=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in ng))return null;return o(ng[n],{...t,...l})},ig=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(lg,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),rg=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),sg=(e,t)=>e?.length>0?o("div",{className:u("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Me,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,og=d((({rows:e})=>{return o(Lr,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=u("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.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(Me,{size:"text-xl",font:"font-light",children:l.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${rg(a,t)}px)`},children:a?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Me,{size:"text-xl",children:e.data}):null,e?.cols?sg(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),cg=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(Me,{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(og,{rows:t.rowsData})})})]},l)}))}))),dg=(e=!1)=>""+(e?"text-white":"text-secondary-text"),mg=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:u("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(Me,{size:"text-xl",font:"font-light",color:dg(t===n),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),ug=ut((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],u=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(mg,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(cg,{activeTabIndex:r,items:m}),o(tg,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Me,{size:"text-h6",children:"Данных нет"}),o(tg,{onClick:n,isOpen:!0})]})})),hg=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:u("@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(ug,{...t,onClick:n})}):null]}))),pg=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[h,p]=l(void 0),g=i((e=>p(e)),[]);return c(hg,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:u("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(Me,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(eg,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(ig,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function gg({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?c("div",{children:[n?o(as,{className:u("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?o(as,{className:u("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const fg=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,gg({...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]})})),xg=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],h=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[f,x]=((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}]})({itemCount:p,visibleItemCount:2}),b=(h||[]).map(((e,t)=>o(pg,{row:e,activeIndex:f,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?o(ir,{renderFoldableSection:({isUnfolded:e})=>c(fg,{controls:x,children:[y,o(rr,{isUnfolded:e,children:v})]}),renderFoldButton:fs}):o(fg,{controls:x,children:b})})]})})),bg=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:u("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?yg():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Me,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?vg(n):null,a?o(Pe,{richVersion:i,__html:a}):null]})]}))),yg=()=>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"}),vg=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Ng=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(Me,{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(Me,{size:"text-h2",children:n})}):null]}))),wg=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Ng,{prefix:t,unit:n,suffix:l})})})),kg={AdTile:pt,ApplicationForm:nr,ApplicationLeadForm:zr,BankAccountFiltration:zs,BenefitsBlock:Es,BonusBenefitsBlock:$s,ButtonsBlock:qs,CalculatorBonus:io,CalculatorBusinessDeposit:ko,CalculatorCredit:Oo,CalculatorDeposit:nc,CalculatorRefinancing:dc,CardTransfer:xc,Carousel:Cc,CarouselCard:Pc,CarouselCatalogCard:Mc,CarouselLinks:zc,CarouselRecommendationCard:$c,CarouselTariffsCard:Wc,CreditForm:Qc,DepositFiltration:rd,Depository:kd,ErrorBlock:Cd,ExchangeRateTile:Zd,Footer:ym,GrantSupport:vm,Header:Tm,Headline:C,HorizontalLayout:Rm,ImgBlock:Mm,LinkDocs:Lm,MobileAppTile:Wm,MortgageFiltration:pu,OfficesAtmsMap:jh,Placeholder:Lh,ProductBlock:ht,ProductGallery:$h,RepresentativeOfficeInfo:Uh,RichTextBlock:Hh,RollupItem:rm,SafeDepositRental:pp,StepsBlock:wp,StickyBottomMenu:jp,TabsLayout:Kp,TariffsTable:xg,TextBlock:bg,UnitBlock:wg,VerticalLayout:Pm},Sg=me((()=>{a((()=>{Ct()}),[]);const e=Vt();qt(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");kt({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const Cg="cookie",Tg=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=Ut();!function(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(Cg)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Cg,"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(ql,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null})),Ig=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=Ip({onCloseAll:e,onClose:t}),{close:l}=de(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return qt(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:u("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})),Bg=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:Tp(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return qt(globalThis.document,"keydown",r),e?o("div",{className:u("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",Rg="footer",Mg="sticky-footer",Dg={},Vg=d((({className:e,data:t=Dg,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:u("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:R(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"}}),R(a?.footer,{...m,slotName:Rg})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:R(a?.["sticky-footer"],{...m,slotName:Mg})}):null,o(Ig,{}),o(Bg,{}),o(Tg,{__html:d?.cookieContent?.__html})]})}));Object.assign(Vg,{childrenTypes:[],slots:()=>[Pg,Rg,Mg]});e.Blocks=kg,e.ContentPage=Vg,e.handlerDecorator=me,e.joinList=ws,e.packageVersion="0.14.603",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=j,e.useRouter=D,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const 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},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=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:u("@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})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(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={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=v[n]||"h3";return o(i,{role:"heading",className:u("font-sans m-0",N[t],e),children:l||a})})),k=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),S={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 h=S[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(w,{className:u("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:l}):null,a?o(k,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...p,children:a}):null]})})),T=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function B(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=T,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:u(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 P=[],R=(e,{key:t,ancestors:n=P,slotName:l=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||P,[r.parent,l]]:n},a)))};function M({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?R(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function D(){return D._impl()}D._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),D.setup=e=>{D._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}}),A=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),F=e=>Boolean(e?.startsWith("#")),O=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),E=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var j=Object.freeze({__proto__:null,isURL:A,isLocalURL:_,isHash:F,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:O,hasPrefix:E});const L="/api/",$=`${L}v1/storage`,U=e=>(t,n)=>{if([!t,A(t),F(t),[z.CDN,L].some((e=>E(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`${$}/${t}/attachment`;const l=t?.startsWith("/");return O(E(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},q={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const d=D(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,h=U(d)(O(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(K,{className:e,children:c("svg",{className:u(Y(r),q[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:h,xlinkHref:h})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},Y=e=>e?"":"w-full h-full",K=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 J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!A(t)?U(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const l=D();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:J(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:J(l)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:u("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(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(Q,{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 ue(){const e=G(X.SITE_URL),t=D(),{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=!E(l,e||"/");l&&!s&&_(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 he=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=fe(e)&&"hidden lg:block";return c("div",{className:u(ge(e),"flex gap-xs"),children:[l?o("div",{className:u(r,se[i]),children:l}):null,fe(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:u(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 u("group/btn items-center justify-center",fe(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},fe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),xe=({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=ue()({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:u})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...he(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:xe({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:u(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:u(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(true);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"},Se=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Ce=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=we(),v=D(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=f&&!y;return c("div",{className:u("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:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Se(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("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:[h,x]}),Ie(M({...b,extraProps:{className:"@container-normal"}})),Se(d,{className:u("@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=>u(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:u("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:u(n,l,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Re=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Me=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),De=(e,t)=>e?o(Me,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ve=(e,t)=>["label"in e?De(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Re(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:u("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Be(n.icon,t):null,o("div",{children:Ve(n)})]}))),Ae=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:u("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:u("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Ve)}):null)),Fe=d((({isTabularBenefits:e,...t})=>o(e?_e:Ae,{...t}))),Oe=e=>Boolean(e?.src||e?.icon),Ee=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("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(je(n))}):null,je=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Le(a,r),d=Le(i,r);return l||a?.icon?o(be,{className:u("basis-full @lg:basis-auto",e),appendLeft:$e({...a,iconVersion:c}),appendRight:$e({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Le=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},$e=e=>Oe(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),qe=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(We)}):null)),We=({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(Me,{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:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ye)}):null)),Ye=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Me,{size:"text-m",font:"font-light",children:e})},String(t)),Ke={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:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],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}),R=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Ce,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Ge(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ee(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?o(Fe,{benefitsVersion:s,isTabularBenefits:d,benefits:R}):null,h?o(Pe,{richVersion:p,__html:h,isDotted:m,itemSize:Ke[i]}):null,T,f?.length?o(qe,{priceList:f}):null,Je(x)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},Je=e=>e?.length?o(He,{tags:e}):null,Ze=e=>Boolean(e&&Array.isArray(e)),Qe=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),et=(e,t)=>{return n=e,Boolean(Qe(n)&&"string"==typeof n.$ref)?t.ref(e):Qe(e)?t.record(e):Ze(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?Qe(e)?e[t]:Ze(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 ut(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 ht=ut((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:u("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(ht,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(f,{})})})),gt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),ft=(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}`}},xt=e=>e?.replace(/[^+\d]/g,"");const bt=e=>e?{phone:xt(e)}:{},yt=(e,t="birthday")=>e?{[t]:ft(e)}:{},vt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Nt=(e,t=!0)=>({[t?"email":"mail"]:e}),wt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:xt(e)}:{},kt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e)t[l??""]?.(n,a)},St="rshb-query-params";function Ct(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(St)||"";return e&&globalThis.sessionStorage?.setItem(St,e),e}function Tt(e){if(!e)throw new Error("Value should be fulfilled");return e}const It=e=>t=>{const[,n]=Tt(e.find((([e])=>e(t))));return n(t)},Bt=e=>It(e.map((([e,t])=>[e,()=>t])));Bt.if=e=>new Pt(void 0,e);class Pt{parent;predicate;unit;get entry(){return[Tt(this.predicate),Tt(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Pt(this,e)}then(e){return new Pt(this.parent,this.predicate,e)}else(e){return It([...Rt(this),[()=>!0,e]])}}const Rt=e=>[...e?.parent?Rt(e.parent):[],e.entry],Mt=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=Ct();if(!A(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=Bt([[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 Vt(){return Vt._impl()}Vt._impl=()=>({forwardQuery:Mt}),Vt.setup=e=>{Vt._impl=e};const zt=e=>e,At=(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),[u,h]=l({}),p=i(((e,t)=>{const{parse:n=zt,format:l=zt}=t||{};return{value:l(s[e]),isDirty:d||u[e],onChange:t=>{c((l=>({...l,[e]:n(t)}))),h((t=>({...t,[e]:!0})))}}}),[c,d,u]),g=i((e=>{c(e),h(e)}),[]),f=i((()=>{c(e),m(!1),h({})}),[e]),x=i((e=>{e.preventDefault(),t?f():m(!0),n&&n(s,e)}),[n,s]);return[s,{isDirty:d||Object.values(u).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},_t=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),Ft=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(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})})),Ot=e=>"OUTSERVICE"===e?"/api/v1/outservice/outserviceregions":void 0;function Et(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 jt(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function Lt(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return jt(globalThis.document,"click",n),t}const $t=({label:e,errors:t})=>e&&t?`${e}*`:e,Ut=()=>{},qt="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",Wt=e=>e?o(Me,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Ht=d((({key:e,className:t="",id:n,name:l,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1,disabled:w=!1})=>{const k=s(null),S=i((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);a((()=>{v&&k.current?.focus()}),[v,k]);const C=g?"pr-3xl":"",T=Yt(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[Wt(d),N?o("textarea",{className:u("block resize-y min-h-24",Kt,T),id:u("textarea",n),name:l||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,disabled:w},e):o("input",{type:r,className:u("h-14",Kt,C,T),ref:k,id:n,name:l||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,pattern:y,disabled:w},e)]}),g]})})),Yt=e=>e?qt:"border-error",Kt="w-full border rounded-md text-primary-text outline-none p-m",Xt=e=>o("div",{className:"h-6",children:e?o(Me,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Gt=e=>e?.value||"",Jt={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"},dulSubdivisionCode:{url:"suggest/fms_unit",responseItemHandler:e=>e?.data?.code?.replace("-","")||""},dulIssuedBy:{url:"suggest/fms_unit"},organizationName:{url:"suggest/party"},inn:{url:"suggest/party",responseItemHandler:e=>e?.data?.inn||""},participantAddress:{url:"suggest/address"}},Zt=()=>({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"})}),Qt=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),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function en({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=l([]),f=Zt(),x=Jt[n],b=i((()=>{h.current=t,f.close()}),[t]),y=i((e=>{b(),h.current=e.processedValue,c&&c(e.processedValue),d&&d(e)}),[b,c]),v=s(null),N=r((()=>async e=>{if(!x)return;const t=await(e=>{const{url:t,query:n,queryPrefix:l,requestData:a={},responseItemHandler:i=Gt}=e,r=(s=i,e=>(e?.suggestions||[]).map((e=>{const t=s(e);return{...e,processedValue:t}})));var s;const o=`${l?`${l}, `:""}${n}`;return fetch(`/api/v1/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...a,query:o})}).then((e=>e.json())).then(r)})({url:x.url,responseItemHandler:x.responseItemHandler,requestData:{...x?.requestData},query:e,queryPrefix:m});t?.length&&g(t)}),[m]),w=r((()=>((e,t=600)=>{let n;const l=(...a)=>{l.dispose(),n=setTimeout((()=>{e(...a)}),t)};return l.dispose=()=>{n&&clearTimeout(n)},l})(N,300)),[N]);return a((()=>{if(!e||!v.current||h.current===t)return void b();const n=v.current,{top:l,left:a,width:i,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.update(o(Qt,{options:p,value:t,onChange:y}),{top:l+globalThis.scrollY+r,left:a,width:i})}),[e,p,t,y]),v}const tn=d((({className:e,label:t,value:n="",placeholder:l,error:a,errors:i,onChange:r=Ut,onDaDataChange:s,onBlur:d,isTextarea:m,type:h,name:p="",daDataQueryPrefix:g,dadata:f=!1})=>{const[x,{setFalse:b,setTrue:y}]=Et(),v=Lt(b),N=en({isOpen:x&&f,name:p,value:n,daDataQueryPrefix:g,onChange:r,onDaDataChange:s});return c("div",{className:u("shrink-0 w-full",e),ref:v,onBlur:b,onFocus:y,children:[o("div",{ref:N,children:o(Ht,{type:h||"text","aria-label":t,label:$t({label:t,errors:i}),valid:Boolean(!a),value:n,onChange:r,onBlur:d,isTextarea:m,placeholder:nn(l,i,t)})}),Xt(a)]})})),nn=(e,t,n)=>t&&!n?`${e}*`:e,ln=e=>e?.text||e?.key||"",an=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,rn=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:an(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:ln(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const sn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:h="",isSearch:p=!1,iconVersion:g="black",onChange:f,disabled:x=!1})=>{const[b,{setFalse:y,setTrue:v}]=Et(),[N,w]=l(""),k=dn(x,n.length),S=b&&!k,C=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=Zt(),u=i((()=>{m.close(),c&&c()}),[c]),h=i((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=Lt(u);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(rn,{popupRef:g,options:t,value:n,query:l,onChange:h,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:C,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[Wt(t),c("div",{className:u("relative",S?"z-20":"z-10"),ref:T,children:[c("div",{className:u("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",cn(m,d,k)),onClick:S?C:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:ln(r)||h}),on(S,g)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(Ht,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),on=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),cn=(e,t,n)=>u(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),dn=(e,t)=>e||0===t,mn=d((({className:e="",label:t,error:n,errors:l,...a})=>c("div",{className:e,children:[o(sn,{...a,valid:!n,label:$t({label:t,errors:l})}),Xt(n)]}))),un=e=>!e?.length,hn=e=>t=>n=>e(n)?[]:[t],pn=hn((e=>null!=e&&""!==e)),gn="Некорректно заполненное поле",fn=e=>pn(e||gn),xn=hn((e=>e?.key&&""!==e?.key))(gn),bn=e=>hn((e=>"string"==typeof e&&e.length>1))(e||gn),yn=(e,t)=>hn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t||gn),vn=e=>hn((e=>"string"==typeof e&&6===e.length))(e),Nn=e=>{return(t=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,hn((e=>"string"==typeof e&&t.test(e))))(e);var t},wn=hn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),kn=e=>{const t=String(e).replace(/[^0-9]+/g,"");if(11===t.length){let e=0;for(let n=0;n<9;n++)e+=parseInt(t.charAt(n))*(9-n);return e>101&&(e%=101),100!==e&&101!==e||(e=0),e===parseInt(t.substr(9))}return!1},Sn={typeForm:fn(),surname:bn("Укажите свою фамилию"),name:bn("Укажите своё имя"),middleName:bn("Укажите своё отчество"),region:xn,addressBranch:xn,phone:Nn("Укажите номер телефона"),secondaryPhone:Nn("Укажите номер телефона"),birthday:fn("Укажите дату рождения"),birthPlace:fn("Укажите место рождения"),education:fn("Выберите ваше образование"),housing:fn("Выберите тип жилья"),employment:fn("Выберите информацию о трудоустройстве"),organization:fn("Выберите тип организации"),amountWorkers:fn("Выберите информацию о количестве сотрудников"),employerActivities:fn("Выберите вид деятельности организации"),employerOrganization:fn("Выберите вид организации"),positionOrganization:fn("Выберите вашу должность"),dulSerie:(Cn="Укажите серию паспорта",hn((e=>"string"==typeof e&&4===e.length))(Cn)),dulNumber:vn("Укажите номер паспорта"),dulIssueDateField:fn("Укажите дату выдачи паспорта"),dulSubdivisionCode:vn("Укажите код подразделения"),dulIssuedBy:fn("Укажите организацию, выдавшую паспорт"),email:(e=>hn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),fullName:bn(),inn:(e=>hn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),legalForm:fn("Укажите ОПФ"),organizationName:fn("Укажите наименование организации"),generalSeniority:fn(),lastJobExperience:fn("Укажите стаж на последнем месте работы"),experience5Years:fn("Укажите общий стаж за последние 5 лет"),jobsNumber:fn("Укажите количество лет стажа"),beginDate:fn("Укажите дату заключения трудового договора"),fullAddress:fn(),partnerComments:fn(),collectionCount:fn(),comment:fn(),acquiringType:xn,feedbackMethod:xn,serviceType:xn,serviceDirection:xn,meetingDay:fn(),product:fn(),localities:fn(),consentDataProcessing:wn,annualRevenue:fn(),consentToReceiveMaterials:wn,processPersonalDataLeadFlg:wn,consentProviderFlg:wn,consentPhotoFlg:wn,consentPfrFlg:wn,consentAssignmentClaimsFlg:wn,consentCollectionFlg:wn,consentInformFlg:wn,familyStatus:fn("Выберите семейное положение"),children:yn(2,"Укажите количество детей"),familyMembers:yn(2,"Укажите количество членов семьи"),dependents:yn(2,"Укажите количество иждивенцев"),totalIncome:yn(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:yn(10,"Укажите сумму обязательных выплат"),snils:(e=>hn(kn)(e))("Некорректный номер СНИЛС"),conscription:fn(),armyIdFlg:wn,sex:fn("Укажите свой пол"),participantAddress:fn("Необходимо выбрать адрес"),participantDateRegistration:fn("Укажите дату регистрации"),retirementIncome:fn(),otherIncome:fn(),mandatoryIncome:fn(),otherPayments:fn(),disablePeopleFlg:fn(),bankruptcyFlg:fn(),shareholderFlg:fn(),legalEntityName:fn(),bankEmployeeCode:fn()};var Cn;const Tn=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,Sn?.[e]])))},In=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},Bn=(e,t,n=!1)=>n?In(e,t):e,Pn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Rn=d((({field:e,input:t})=>o(mn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Pn,...Bn(e("acquiringType"),Sn.acquiringType,t?.required)}))),Mn=(e="")=>Boolean("trade"===e||"all"===e),Dn=e=>null!=e,Vn=new Map,zn=e=>Boolean(e?.every((e=>Array.isArray(e)?zn(e):!e||"string"==typeof e))),An=e=>zn(e)?e.toString():"";function _n(e,t,{fallback:n,cache:i}={}){const s=r((()=>Fn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(Dn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=Vn)=>n=>{const l=An(n),a=t.get(l);if(l&&Dn(a))return a;const i=e(...n);return l&&Dn(i)&&t.set(l,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Fn(e){return Array.isArray(e)?e:e instanceof Function?Fn(e()):[e]}const On=[];const En=async e=>await it(e,{method:"GET"})||On;function jn(e=!1){const{data:t}=_n("/api/v1"+(e?"/premiumBranchesByRegions":"/branchesByRegions"),rt);return Array.isArray(t)?t:[]}const Ln=d((({field:e,input:t,isPremium:n=!1})=>{const l=e("region"),i=l?.value?.key,r=l?.value?.text,s=n?jn(n)?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=_n(e?`/api/v1/branches?regionCode=${e}`:null,En);return t||On}(i)?.filter((e=>e?.address));return a((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(mn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...Bn(e("addressBranch"),Sn.addressBranch,t?.required),isSearch:!0})})),$n=(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)}),[]),u=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:u}},Un=(e,t,n)=>Math.max(t,Math.min(e,n));function qn(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function Wn({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:u("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=qn(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const Hn=1,Yn=100,Kn=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:Hn),max:s=(a.length?a.length-1:Yn),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:p}=e,g=$n(e,{normalize:(e=0)=>a.length?Xn(a)(e):Un(e,r,s),format:Ue()}),f=i((e=>{p&&p(qn(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Me,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:u("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",qt,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),Wn({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),Gn(l)]})})),Xn=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),Gn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Jn=["От 1 000 ₽","До 1 000 000 000 ₽"],Zn=d((({field:e})=>o(Kn,{title:"Сумма, ₽",items:Jn,min:1e3,max:1e9,...e("amount")}))),Qn=e=>{const{data:t,error:n}=_n(`https://portal-ui-cc.cprb.dev.rshbdev.ru/light-api-cash/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,el);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},el=async e=>await it(e,{method:"POST"})||[],tl=ut((({field:e,source:t,label:n,fieldName:l,input:a})=>{const i=t&&t?.map((e=>e.description))||[];return o(mn,{placeholder:"Выберите из списка",label:n,options:nl(i),...Bn(e(l),Sn[l],a?.required)})})),nl=e=>(e??[]).map((e=>({key:e,value:e}))),ll=d((({field:e,input:t})=>{const{data:n}=Qn("EMPLOYEES_NUMBER");return o(tl,{field:e,source:n,label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),al=d((({field:e,input:t})=>o(tn,{label:"Годовая выручка, ₽",...Bn(e("annualRevenue"),Sn.annualRevenue,t?.required)}))),il=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)}))}))),rl="appearance-none w-5 h-5 border-solid flex-none",sl=[{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"}],ol=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(il,{paths:sl,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:u("flex items-center relative group/box",dl(l)),onClick:s,children:[o("div",{className:u(rl,"m-0",a?"rounded-full border-2":ul(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:ml(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,cl(n)]})})})),cl=e=>e?o("div",{className:"ml-s",children:o(Me,{size:"text-l",font:"font-light",children:e})}):null,dl=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",ml=(e=!1)=>e?"radio":"checkbox",ul=(e=!1)=>u("rounded border",{"bg-primary-main":e}),hl=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(ol,{text:t,value:n,disabled:a,onChange:r},l),Xt(i)]}))),pl=d((({field:e})=>o(hl,{text:"Наличие военного билета",...Bn(e("armyIdFlg"),Sn.armyIdFlg)}))),gl=d((({field:e,input:t})=>o(tn,{label:"Код представителя Банка",placeholder:"Введите код",type:"number",...Bn(e("bankEmployeeCode"),Sn.bankEmployeeCode,t?.required),...t}))),fl=d((({field:e})=>o(tn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),xl=d((({field:e})=>o(hl,{text:"В отношении меня ведётся производство по делу о банкротстве",...Bn(e("bankruptcyFlg"),Sn.bankruptcyFlg)}))),bl=({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 u=[];for(let c=0;c<7;c++)if(0===m&&c<t)u.push(o("td",{},`empty-${c}`));else if(d>n)u.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=yl(t,e),c=vl(t,i,r);u.push(o("td",{children:o("div",{className:Nl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},yl=(e,t)=>t&&e.toDateString()===t.toDateString(),vl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),Nl=(e=!1,t=!1)=>u("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),wl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],kl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=Ut,setValue:d=Ut})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:u,totalDays:h}=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:wl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:bl({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:m})})]})})),Sl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Cl=Sl.map((e=>({key:e}))),Tl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Il={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Bl={className:"min-w-32",iconVersion:"black",isBorder:!1},Pl=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,onChange:m})=>{const[h,{setValue:p}]=Et(!1),[g,f]=l(n?.getMonth()||(new Date).getMonth()),[x,b]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:y,handleNextMonth:v,handleSelectMonth:N,handleSelectYear:w,monthsOptions:k,yearsOptions:S,handleChangeVisibleCalendar:C,ref:T}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=Lt(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(Sl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Cl,yearsOptions:Tl,ref:s}})({onYearSelect:b,onMonthSelect:f,onShowCalendar:p,selectedYear:x,selectedMonth:g,showCalendar:h}),I=((e,t)=>{const[n,i]=l(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();i(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(T,370);return c("div",{className:u("space-y-xs",e),ref:T,children:[Wt(t),c("div",{className:"relative",children:[Rl(C,n,r),h?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":I}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:y,children:o(W,{...Il,className:"-rotate-90 cursor-pointer"})}),o(sn,{onChange:N,value:{key:Sl[g]},options:k,...Bl}),o(sn,{onChange:w,value:{key:String(x)},options:S,...Bl}),o("div",{className:"my-auto",onClick:v,children:o(W,{...Il,className:"rotate-90 cursor-pointer"})})]}),o(kl,{today:n,currentMonth:g,currentYear:x,onDateSelect:m,min:s,max:d,setValue:p})]}):null]})]})})),Rl=(e,t,n)=>c("div",{onClick:e,className:u("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(k,{children:t&&ft(t)}),o(W,{...Il,name:"CalendarIcon"})]}),Ml=d((({className:e,label:t,error:n,errors:l,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Pl,{label:$t({label:t,errors:l}),valid:Boolean(!n),...a}),Xt(n)]}))),Dl=d((({field:e,input:t})=>o(Ml,{label:"Дата начала работы на текущем месте",...Bn(e("beginDate"),Sn.beginDate,t?.required),...t}))),Vl=d((({field:e,input:t})=>o(Ml,{label:"Дата рождения",...Bn(e("birthday"),Sn.birthday,t?.required)}))),zl=d((({field:e,input:t})=>o(tn,{label:"Место рождения",...Bn(e("birthPlace"),Sn.birthPlace,t?.required),...t}))),Al=d((({field:e,input:t})=>o(tn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",type:"number",...Bn(e("children"),Sn.children,t?.required),...t}))),_l=d((({field:e,input:t})=>o(tn,{label:"Количество объектов инкассации",type:"number",...Bn(e("collectionCount"),Sn.collectionCount,t?.required)}))),Fl=d((({field:e,input:t})=>o(tn,{className:"col-span-2",...Bn(e("comment"),Sn.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Ol=d((({field:e,input:t})=>{const{data:n}=Qn("MILITARY_STATUS");return o(tl,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),El={processPersonalDataLeadFlg:{text:"Согласие на обработку персональных данных",docId:4},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3},consentPhotoFlg:{text:"Прочие согласия (согласие на фотографирование)",docId:1},consentAssignmentClaimsFlg:{text:"Прочие согласия (согласие на уступку прав требований)",docId:1},consentCollectionFlg:{text:"Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)",docId:1},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentToReceiveMaterials:{text:"Согласен на получение информационных и аналитических материалов по электронной почте"}},jl=d((({className:e,onClose:t})=>o("button",{className:u("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(W,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),Ll=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:u("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(jl,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})}));async function $l(e,t,n){const l=await fetch(`https://retail-light-api.cprb.dev.rshbdev.ru//api/v1${e}`,{method:t,headers:{"Content-Type":"application/json",...ql()},credentials:"include",body:n?JSON.stringify(n):null});return Ul(l)?l.json():l.text()}const Ul=e=>"application/json"===e.headers.get("Content-Type"),ql=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},Wl=async e=>{const t=await(async e=>await $l(`/feedback/file?id=${encodeURIComponent(e)}`,"GET"))(e);return URL.createObjectURL(t)},Hl=d((({className:e,error:t,docId:n,...l})=>{const{open:a}=de();return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(ol,{...l}),n?o(be,{className:"text-primary-main",onClick:()=>Yl(n,a),children:o(Me,{children:"Ознакомиться"})}):null]}),Xt(t)]})})),Yl=async(e,t)=>{const n=await Wl(e);t(o(Ll,{className:"my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0",children:o("iframe",{src:`${n}#toolbar=0`,className:"w-full h-[80vh]",id:"iframe-dialog"})}))},Kl=d((({field:e,input:t})=>t&&t.name?o(Hl,{text:El[t.name]?.text,docId:El[t.name]?.docId,...Bn(e(t.name),Sn[t.name],t?.required)}):null)),Xl=d((({field:e,input:t})=>{const{data:n}=Qn("creditInRshbCd");return o(tl,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала руководителем, которого Вы являетесь, кредит в АО «Россельзбанк»",fieldName:"creditInRshbCd",input:t})})),Gl=d((({field:e,input:t})=>o(tn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",type:"number",...Bn(e("dependents"),Sn.dependents,t?.required),...t}))),Jl=d((({field:e,input:t})=>o(Ml,{label:"Желаемая дата встречи",...Bn(e("desiredMeetingDate"),Sn.meetingDay,t?.required)}))),Zl=d((({field:e})=>o(hl,{text:"Являюсь инвалидом",...Bn(e("disablePeopleFlg"),Sn.disablePeopleFlg)}))),Ql=d((({field:e,input:t})=>o(Ml,{label:"Дата выдачи",...Bn(e("dulIssueDateField"),Sn.dulIssueDateField,t?.required)}))),ea=d((({field:e,input:t})=>{const{value:n,onChange:l}=e("dulSubdivisionCode"),a=i((e=>{l?.(e?.data?.code?.replace("-",""))}),[]);return o(tn,{label:"Кем выдан",...t,...Bn(e("dulIssuedBy"),Sn.dulIssuedBy,t?.required),onDaDataChange:a,daDataQueryPrefix:n})})),ta=d((({field:e,input:t})=>o(tn,{label:"Номер документа",type:"number",...Bn(e("dulNumber"),Sn.dulNumber,t?.required)}))),na=d((({field:e,input:t})=>o(tn,{label:"Серия документа",type:"number",...Bn(e("dulSerie"),Sn.dulSerie,t?.required)}))),la=d((({field:e,input:t})=>{const n=i((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(tn,{label:"Код подразделения",type:"number",...t,...Bn(e("dulSubdivisionCode"),Sn.dulSubdivisionCode,t?.required),onDaDataChange:n})})),aa=d((({field:e,input:t})=>{const{data:n}=Qn("EDUCATION_LEVEL");return o(tl,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),ia=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(tn,{label:"Электронная почта",...Bn(e("email"),Sn.email,n),...l})})),ra=d((({field:e,input:t})=>{const{data:n}=Qn("ORGANIZATION_ACTIVITY_TYPE");return o(tl,{field:e,source:n,label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),sa=d((({field:e,input:t})=>{const{data:n}=Qn("ORGANIZATION_KIND");return o(tl,{field:e,source:n,label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),oa=d((({field:e,input:t})=>{const{data:n}=Qn("EMPLOYMENT_TYPE");return o(tl,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),ca=d((({field:e,input:t})=>o(tn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",type:"number",...Bn(e("expenses"),Sn.expenses,t?.required),...t}))),da=d((({field:e,input:t})=>o(tn,{label:"Стаж",placeholder:"За последние 5 лет",...Bn(e("experience5Years"),Sn.experience5Years,t?.required),...t}))),ma=d((({field:e,input:t})=>o(tn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",...Bn(e("familyMembers"),Sn.familyMembers,t?.required),...t}))),ua=d((({field:e,input:t})=>{const{data:n}=Qn("MARITAL_STATUS");return o(tl,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),ha=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],pa=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],ga=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],fa=d((({field:e,input:t})=>o(mn,{label:"Способ получения ответа",options:ga,...Bn(e("feedbackMethod"),Sn.feedbackMethod,t?.required)}))),xa=d((({field:e,input:t})=>o(tn,{label:"Адрес",...Bn(e("fullAddress"),Sn.fullAddress,t?.required),...t}))),ba=d((({field:e,input:t})=>o(tn,{label:"ФИО",...Bn(e("fullName"),Sn.fullName,t?.required),...t}))),ya=d((({field:e,input:t})=>o(tn,{label:"Общий стаж",placeholder:"Количество лет",...Bn(e("generalSeniority"),Sn.generalSeniority,t?.required),...t}))),va=d((({field:e,input:t})=>{const{data:n}=Qn("HOUSE_TYPE");return o(tl,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Na=d((({field:e,input:t})=>{const n=i((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(tn,{label:"ИНН",type:"number",...t,...Bn(e("inn"),Sn.inn,t?.required),onDaDataChange:n})})),wa=d((({field:e})=>o(hl,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),ka=d((({field:e,input:t})=>o(tn,{label:"Общий стаж",placeholder:"Количество лет",type:"number",...Bn(e("jobsNumber"),Sn.jobsNumber,t?.required),...t}))),Sa=d((({field:e,input:t})=>o(tn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",...Bn(e("lastJobExperience"),Sn.lastJobExperience,t?.required),...t}))),Ca=d((({field:e,input:t})=>o(tn,{label:"Наименование юридического лица",...t,...Bn(e("legalEntityName"),Sn.legalEntityName,t?.required)}))),Ta=d((({field:e,input:t})=>o(tn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...Bn(e("legalForm"),Sn.legalForm,t?.required),...t}))),Ia=[];async function Ba(){const e=await it("/api/v1/outservice/outserviceregions");return e&&Array.isArray(e)?e:Ia}const Pa=d((({field:e,input:t})=>{const n=e("region")?.value?.key,{data:l}=_n("outServiceRegions",Ba),i=l?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(mn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:i,...Bn(e("localities"),Sn.localities,t?.required),isSearch:!0})})),Ra=d((({field:e,input:t})=>o(tn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",...Bn(e("mandatoryIncome"),Sn.mandatoryIncome,t?.required),...t}))),Ma=d((({field:e,input:t})=>o(tn,{label:"Отчество (Обязательно, при наличии)",...Bn(e("middleName"),Sn.middleName),...t}))),Da=d((({field:e,input:t})=>o(tn,{label:"Имя",...Bn(e("name"),Sn.name,t?.required),...t}))),Va=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:u("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:u("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Me,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),za=d((({field:e})=>Mn(e("acquiringType")?.value?.key)?o(Va,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Aa=d((({field:e,input:t})=>{const{data:n}=Qn("ORGANIZATION_TYPE");return o(tl,{field:e,source:n,label:"Тип организации",fieldName:"organization",input:t})})),_a=d((({field:e,input:t})=>{const n=i((t=>{e?.("inn")?.onChange?.(t.data?.inn),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(tn,{label:"Наименование организации",...t,...Bn(e("organizationName"),Sn.organizationName,t?.required),onDaDataChange:n})})),Fa=d((({field:e,input:t})=>o(tn,{label:"Иные доходы",placeholder:"Введите значение",type:"number",...Bn(e("otherIncome"),Sn.otherIncome,t?.required),...t}))),Oa=d((({field:e,input:t})=>o(tn,{label:"Обязательные выплаты",placeholder:"Введите значение",type:"number",...Bn(e("otherPayments"),Sn.otherPayments,t?.required),...t}))),Ea=d((({field:e,input:t})=>o(tn,{label:"Адрес",...Bn(e("participantAddress"),Sn.participantAddress,t?.required),...t}))),ja=d((({field:e,input:t})=>o(Ml,{label:"Дата регистрации по месту жительства",...Bn(e("participantDateRegistration"),Sn.participantDateRegistration,t?.required)}))),La=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(tn,{...Bn(e("partnerComments"),Sn.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...l})})),$a=e=>"_"===e,Ua=e=>/\d/.test(e),qa=e=>$a(e)||Ua(e),Wa=[..."+7 (___) ___-__-__"],Ha=Wa.findIndex($a),Ya=Wa.map(((e,t)=>qa(e)?Wa.slice(0,t).filter(qa).length:-1));const Ka=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=Wa.map(((e,n)=>Ua(e)?e:t.charAt(Ya[n])||e)),l=Ya.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(Ha,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(Ht,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),Xa=d((({className:e,label:t,error:n,...l})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ka,{"aria-label":t,label:$t({label:t,errors:l?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...l}),Xt(n)]}))),Ga=d((({field:e,input:t})=>o(Xa,{label:"Телефон",...Bn(e("phone"),Sn.phone,t?.required),...t}))),Ja=d((({field:e,input:t})=>{const{data:n}=Qn("POSITION");return o(tl,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),Za=d((({field:e})=>Mn(e("acquiringType")?.value?.key)?o(Va,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Qa=ut((({field:e,source:t})=>o(mn,{placeholder:"Выберите продукт",label:"Продукт",options:ei(t?.productList),...In(e("product"),Sn.product)}))),ei=e=>(e??[]).map((e=>({key:e,value:e})));function ti(e="/api/v1/regions"){const{data:t}=_n(e,rt);return Array.isArray(t)?t:[]}const ni=d((({field:e,input:t,url:n})=>{const l=ti(n);return o(mn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...Bn(e("region"),Sn.region,t?.required)})})),li=d((({field:e,input:t})=>{const n=jn(!0),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(mn,{label:"Регион",placeholder:"Выберите регион",options:l,...Bn(e("region"),Sn.region,t?.required)})})),ai=d((({field:e,input:t})=>o(tn,{label:"Пенсионные доходы",placeholder:"Введите значение",type:"number",...Bn(e("retirementIncome"),Sn.retirementIncome,t?.required),...t}))),ii=d((({field:e})=>{const t=e("secondaryPhone");return o(Xa,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?In(t,Sn.secondaryPhone):t})})),ri=d((({field:e,input:t})=>o(mn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:pa,...Bn(e("serviceDirection"),Sn.serviceDirection,t?.required)}))),si={horizontal:"@lg:flex-row",vertical:""},oi=d((({label:e,items:t,value:n,className:l,onChange:a,disabled:i=!1,orientation:r="horizontal"})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Me,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",si[r],l),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(ol,{isRadio:!0,text:t,value:n===e,onChange:()=>a&&a(e),disabled:i},String(e))))})]}))),ci=d((({className:e,label:t,onChange:n,error:l,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(oi,{label:$t({label:t,errors:a?.errors}),onChange:e=>n&&n(e),...a}),Xt(l)]}))),di=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],mi=d((({field:e,input:t})=>o(ci,{label:"Пол",orientation:"horizontal",items:di,...Bn(e("sex"),Sn.sex,t?.required)}))),ui=d((({field:e})=>o(hl,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...Bn(e("shareholderFlg"),Sn.shareholderFlg)}))),hi=e=>"_"===e,pi=e=>/\d/.test(e),gi=e=>hi(e)||pi(e),fi=[..."___-___-___ __"],xi=fi.findIndex(hi),bi=fi.map(((e,t)=>gi(e)?fi.slice(0,t).filter(gi).length:-1));const yi=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=fi.map(((e,n)=>pi(e)?e:t.charAt(bi[n])||e)),l=bi.indexOf(t.length-1)+1;return 0===t.length?"":(l?n.slice(0,Math.max(xi,l)):n).join("")}(e))),[t]),a=i((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(Ht,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),vi=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(yi,{"aria-label":t,label:$t({label:t,errors:r?.errors}),valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"___-___-___ __"}),Xt(l)]}))),Ni=d((({field:e,input:t})=>o(vi,{label:"СНИЛС",...Bn(e("snils"),Sn.snils,t?.required),...t}))),wi=d((({field:e,input:t})=>o(tn,{label:"Фамилия",...Bn(e("surname"),Sn.surname,t?.required),...t}))),ki=["От 1 мес","До 15 лет"],Si=d((({field:e})=>o(Kn,{title:"Срок, месяцев",items:ki,min:1,max:180,...e("term")}))),Ci=d((({field:e,input:t})=>o(tn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",...Bn(e("totalIncome"),Sn.totalIncome,t?.required),...t}))),Ti=d((({field:e,input:t})=>o(mn,{label:"Тип обслуживания",options:ha,...Bn(e("serviceType"),Sn.serviceType,t?.required)}))),Ii=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],Bi=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(oi,{className:"whitespace-normal",orientation:"horizontal",items:Ii,value:t,onChange:e=>n&&n(e)})})}));const Pi={$ref:"/wcms-resources/outservice-productlist.json"},Ri=(e,t)=>(n,l)=>{const a="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,i={surname:o(wi,{field:e,input:n}),name:o(Da,{field:e,input:n}),middleName:o(Ma,{field:e,input:n}),phone:o(Ga,{field:e,input:n}),email:o(ia,{field:e,input:n}),fullName:o(ba,{field:e,input:n}),inn:o(Na,{field:e,input:n}),legalForm:o(Ta,{field:e,input:n}),organizationName:o(_a,{field:e,input:n}),generalSeniority:o(ya,{field:e,input:n}),lastJobExperience:o(Sa,{field:e,input:n}),experience5Years:o(da,{field:e,input:n}),jobsNumber:o(ka,{field:e,input:n}),beginDate:o(Dl,{field:e,input:n}),fullAddress:o(xa,{field:e,input:n}),comment:o(Fl,{field:e,input:n}),addressBranch:o(Ln,{field:e,input:n,isPremium:a}),sex:o(mi,{field:e,input:n}),birthday:o(Vl,{field:e,input:n}),birthPlace:o(zl,{field:e,input:n}),desiredMeetingDate:o(Jl,{field:e,input:n}),product:o(Qa,{field:e,source:Pi}),localities:o(Pa,{field:e,input:n}),isClient:o(wa,{field:e}),partnerComments:o(La,{field:e,input:n}),collectionCount:o(_l,{field:e,input:n}),acquiringType:o(Rn,{field:e,input:n}),onlineCheckout:o(za,{field:e}),posTerminal:o(Za,{field:e}),serviceType:o(Ti,{field:e,input:n}),term:o(Si,{field:e}),amount:o(Zn,{field:e}),annualRevenue:o(al,{field:e,input:n}),vedTypes:o(Bi,{field:e}),feedbackMethod:o(fa,{field:e,input:n}),serviceDirection:o(ri,{field:e,input:n}),bankEmpolee:o(fl,{field:e}),secondaryPhone:o(ii,{field:e}),consentToReceiveMaterials:o(Kl,{field:e,input:n}),processPersonalDataLeadFlg:o(Kl,{field:e,input:n}),consentProviderFlg:o(Kl,{field:e,input:n}),consentPhotoFlg:o(Kl,{field:e,input:n}),consentAssignmentClaimsFlg:o(Kl,{field:e,input:n}),consentCollectionFlg:o(Kl,{field:e,input:n}),consentInformFlg:o(Kl,{field:e,input:n}),consentPfrFlg:o(Kl,{field:e,input:n}),applicationDate:o(tn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),region:a?o(li,{field:e}):o(ni,{field:e,input:n,url:Ot(t)}),education:o(aa,{field:e,input:n}),housing:o(va,{field:e,input:n}),employment:o(oa,{field:e,input:n}),organization:o(Aa,{field:e,input:n}),amountWorkers:o(ll,{field:e,input:n}),employerActivities:o(ra,{field:e,input:n}),employerOrganization:o(sa,{field:e,input:n}),positionOrganization:o(Ja,{field:e,input:n}),familyStatus:o(ua,{field:e,input:n}),children:o(Al,{field:e,input:n}),familyMembers:o(ma,{field:e,input:n}),dependents:o(Gl,{field:e,input:n}),totalIncome:o(Ci,{field:e,input:n}),expenses:o(ca,{field:e,input:n}),snils:o(Ni,{field:e,input:n}),conscription:o(Ol,{field:e,input:n}),armyIdFlg:o(pl,{field:e,input:n}),dulSerie:o(na,{field:e,input:n}),dulNumber:o(ta,{field:e,input:n}),dulIssueDateField:o(Ql,{field:e,input:n}),dulSubdivisionCode:o(la,{field:e,input:n}),dulIssuedBy:o(ea,{field:e,input:n}),participantAddress:o(Ea,{field:e,input:n}),participantDateRegistration:o(ja,{field:e,input:n}),retirementIncome:o(ai,{field:e,input:n}),otherIncome:o(Fa,{field:e,input:n}),mandatoryIncome:o(Ra,{field:e,input:n}),otherPayments:o(Oa,{field:e,input:n}),disablePeopleFlg:o(Zl,{field:e,input:n}),bankruptcyFlg:o(xl,{field:e,input:n}),shareholderFlg:o(ui,{field:e,input:n}),legalEntityName:o(Ca,{field:e,input:n}),creditInRshbCd:o(Xl,{field:e,input:n}),bankEmployeeCode:o(gl,{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},Mi=e=>2===e?"@xl:grid-cols-2":"",Di=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Me,{size:"text-h6",children:e})}):null;function Vi({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const zi={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"},Ai={primary:u("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:u("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")},_i=d((({children:e,...t})=>{const n=e=>({...e,onClick:me(Vi(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:u("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?"":u(zi[a],Ai[a]),l),type:s,role:d,onClick:m,children:e})})),Fi=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(Ll,{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(_i,{type:"button",onClick:r,children:"Хорошо"})]})})})),Oi=e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Fi,{...e}),n),close:n}},Ei=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],ji=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Mn(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...d,...$i(o),...Li(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Li=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},$i=e=>e?{vedTypes:Object.fromEntries(Ii.map((({id:t})=>[t,t===e])))}:{},Ui={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Pn[0],serviceType:ha[0],feedbackMethod:ga[0],serviceDirection:pa[0],vedTypes:Ii[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},qi=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Me,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Me,{children:t.text})}):null]}))),Wi=(e,t)=>o(_i,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Hi=(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(ol,{...e}),o(qi,{link:t})]}),Xt(In(e,wn).error)]}):o(qi,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),Wi(n)]}),Yi={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:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f="/api/v1"+(g?"/lead":"/sendcorporatelead"),x={typeForm:n,...vt(l,g),...Nt(i,g),...bt(a),...yt(s,"desiredMeetingDate"),...g?yt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...wt(d)},...p};try{const e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},Ki=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:p,data:g,...f})=>{const x=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Ui[e.name]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=ha[1]),{...n,typeForm:{key:t,text:""}}})(x,n),[y,v]=l(""),N=i((async(e,t)=>{const l=Xi(x,e),a=Ei(Tn(l));if(!un(a(e)))return"Fail";const i=ji({...e,...h}),r=await Yi.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){Oi({responseType:r,typeForm:n}).open()}if("OK"===r&&g){const e=Vt();kt({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:S,reset:C}]=At(b,{onSubmit:N}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return a((()=>{"OK"===y&&(v(""),C())}),[y]),c(Ft,{className:u("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:u(Mi(e.columns),"grid gap-x-m"),children:[Di(e.title),(e?.inputs||[])?.map(Ri(k,n))]},`section-${t}`))),Hi(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(w,{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]})})),Xi=(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)}))));function Gi(e){const[t,n]=l(JSON.parse(globalThis.localStorage?.getItem(e)||"null"));return[t,i((t=>{globalThis.localStorage?.setItem(e,JSON.stringify(t)),n(t)}),[e,globalThis.localStorage])]}const Ji=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}),u=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[u,m]}:{className:e,role:"group",children:[m,u]})}));const Zi=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})})})),Qi=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(In(n(e?.name),Sn[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(Ji,{isFoldButtonOnTop:!0,unfoldedByDefault:!0,renderFoldableSection:({isUnfolded:l})=>o(Zi,{isUnfolded:l,className:"flex flex-col pl-2xl",children:e.map(Ri(n,t))}),renderFoldButton:er(c("div",{children:[o(ol,{value:a,onChange:t=>{for(const l of e){const e=n(l.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},l),Xt(i?"Отметьте все обязательные соглашения":"")]}))})})})),er=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),tr=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:l,restInputs:a}=nr(n||[]);return l.length>2?c("div",{children:[a.map(Ri(e,t)),o(Qi,{inputs:l,field:e})]}):(n||[])?.map(Ri(e,t))},nr=e=>({consentInputs:e?.filter((e=>Object.keys(El).includes(e.name)))||[],restInputs:e?.filter((e=>!Object.keys(El).includes(e.name)))||[]}),lr={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Pn[0],serviceType:ha[0],feedbackMethod:ga[0],serviceDirection:pa[0],vedTypes:Ii[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,participantAddress:"",participantDateRegistration:void 0},ar=(e,t,n="")=>{if(t){const e=JSON.parse(t);return e.birthday=new Date(e?.birthday||0),e}return{...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||lr[e.name]]))),typeForm:{key:n,text:""}}},ir=(e,t)=>o(_i,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),rr={width:"103",height:"21"},sr={"bg-white":"color",transparent:"white"},or={"bg-white":"text-primary-main",transparent:"text-white"},cr=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:sr[e]},className:or[e],width:n?.width,height:n?.height}),dr={"bg-white":"text-primary-text",transparent:"text-white"},mr=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:u("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...he(s),children:[cr(i,n?.image,rr),r?l??o("div",{className:"ml-s",children:o(Me,{font:"font-medium",color:dr[i],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),ur=async({code:e,setHasError:t,close:n,sendCode:l=Ut})=>{const a=await(i={captchaText:e},$l("/sms/checkCaptcha","POST",i));var i;"ERROR"===await a.text()?t(!0):(l(),n?.())},hr=async(e,t)=>{const n=await(e=>$l(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET"))(t);e(URL.createObjectURL(await n.blob()))},pr=d((({phoneNumber:e,close:t,sendCode:n,onClose:i})=>{const[r,s]=l(""),[d,m]=l(""),[u,h]=l(!1);return a((()=>{hr(s,e)}),[]),o(Ll,{head:o(mr,{}),onClose:i,className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex h-36 w-72",children:[o("img",{className:"grow",src:r}),o("div",{onClick:()=>hr(s,e),className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(Ht,{className:"w-[300px]",onChange:m,value:d,placeholder:"Введите код с картинки"}),u?o("div",{className:"text-error",children:"Неверный код"}):null,c("div",{className:"flex w-[310px] justify-between",children:[o(_i,{onClick:t,version:"secondary",children:"Вернуться"}),o(_i,{type:"submit",disabled:!d,onClick:()=>ur({code:d,setHasError:h,close:t,sendCode:n}),version:"secondary",children:"Отправить"})]})]})})})),gr=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:u("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:u("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),fr=d((({time:e,setTime:t,className:n})=>(a((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:xr(e)})))),xr=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,br=async({phoneNumber:e,captchaDialog:t,setTimeNextReq:n,setIsTimerStarted:l,setAttemps:a})=>{try{await(i={phoneNumber:e,smsCodesSetName:{key:"AUTHENTICATION"}},$l("/sms/sendCode","POST",i)),a(0),n(180),l(!0)}catch(e){429===e?.status&&t.open()}var i},yr=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=l(0),u=s([]);a((()=>{u.current?.[d]?.focus()}),[d]);const h=i((n=>l=>{const{value:a}=l.currentTarget,i=a.slice(0,1);t(e.map(((e,t)=>t===n?i:e))),m(n+1)}),[e]),p=i((n=>l=>{const{key:a}=l;if("Backspace"===a&&!e[n]){const l=n>0?n-1:e.length-1,a=e.map(((e,t)=>t===l?"":e));t(a),m(l)}}),[e]),g=i((n=>{n.preventDefault();const l=n.clipboardData.getData("text"),a=e.map(((e,t)=>t<l.length?l[t]:e));t(a),m(a.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,l)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(l),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[l]=e},onFocus:e=>e.target.select(),onKeyDown:p(l),className:vr(l,e,n)},l)))}),n?o("div",{className:"text-error",children:r}):null]})})),vr=(e,t,n=!1)=>{const l=!t[e];return`w-16 h-20 text-3xl text-center p-2 m-2 border ${n&&l?"border-error":"border-gray"} rounded-md caret-transparent outline-none`},Nr=d((({isDisabled:e,onClick:t,text:n})=>o(_i,{type:"button",onClick:t,disabled:e,children:o(Me,{font:"font-medium",children:n})}))),wr=e=>{globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token)},kr=({close:e,values:t})=>{const[n,s]=l(!1),[o,c]=l(""),[d,m]=l(!1),[u,h]=l(0),[p,g]=l(!1),[f,x]=l(0),b=i((()=>{s(!1),c("")}),[]),y=r((()=>0===u&&p),[u,p]),v=r((()=>f>2||!t.every(Boolean)||y),[t]),N=i((async()=>{try{g(!1),h(0),x(f+1),m(!0),await(async e=>$l("/sms/checkCode","POST",e).then(wr))({smsText:t.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),b(),e&&e()}catch{m(!1),c(f>1?"Исчерпан лимит ввода смс-кода":"Неверный код"),s(!0)}}),[t,f]);return a((()=>{y?(s(!0),c("Код просрочен")):s(!1)}),[y]),{handleSubmit:N,hasError:n,errorText:o,isLoading:d,timeNextReq:u,isSubmitButtonDisabled:v,setTimeNextReq:h,setIsTimerStarted:g,setAttemps:x}},Sr=d((({close:e=Ut,onClose:t=Ut,title:n,description:r,__html:s,code:d=!0,codeLength:m=4,textButton:u="",phoneNumber:h="+79999999999"})=>{const[p,g]=l(Array(m).fill("")),{handleSubmit:f,hasError:x,errorText:b,isLoading:y,timeNextReq:v,isSubmitButtonDisabled:N,setTimeNextReq:w,setIsTimerStarted:k,setAttemps:S}=kr({values:p,close:e}),T=i((()=>{br({phoneNumber:h,captchaDialog:I,setTimeNextReq:w,setIsTimerStarted:k,setAttemps:S})}),[]),I=((e,t)=>{const{open:n,close:l,closeAll:a}=de();return{open:()=>n(o(pr,{close:l,onClose:t,...e})),close:l,closeAll:a}})({phoneNumber:h,sendCode:T},t);return a((()=>{T()}),[]),o(Ll,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[o(C,{className:"w-full",title:n,description:r,headlineVersion:"S",isEmbedded:!0}),d?o(yr,{values:p,setValues:g,errorText:b,hasError:x}):null,Tr(v,w,T),o(Pe,{itemSize:"list-s",__html:s}),Cr(u,N,f),y?o(gr,{blur:!1}):null]})})})),Cr=(e,t,n)=>e?o(Nr,{isDisabled:t,onClick:n,text:e}):null,Tr=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-primary-main",children:["Получить новый код можно через",o(fr,{className:"text-primary-main ml-1",time:e,setTime:t})]}):o(be,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),Ir=({inputs:e,programId:t,saveForm:n})=>{const[a,r]=l(""),[,s]=Gi("taskId"),[,c]=Gi("profileId"),[,d]=Gi("participantId"),m=i(((e,t,n)=>{d(e),s(t),c(n)}),[]);return{handleSubmit:i((async l=>{const a=Ei(Tn(e));if(!un(a(l)))return"Fail";try{const{profile:e}=await(i={profile:{phone:xt(l.phone)}},$l("/public-data/createUserProfile","POST",i)),a=e?.id;if(a&&l?.phone){const e=async()=>{try{await(e=>$l("/user-data/updateUserProfile","POST",e))(((e,t)=>{const{name:n="",surname:l="",middleName:a="",birthday:i="",phone:r="",email:s="",processPersonalDataLeadFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:l,midname:a,birthDate:i&&ft(i,!0),email:s,phone:xt(r),processPersonalDataLeadFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(a,l));const{taskId:e,participantId:i}=await(e=>$l("/user-data/createDraftTask","POST",e))({profileId:a,programId:t});await(e=>$l("/user-data/updateUserTask","PUT",e))((({participantId:e,taskId:t,profileId:n,formData:l})=>({sendToBank:!0,taskKind:"SHORT",task:{taskSource:globalThis.location.origin,id:t,participants:[{birthDate:l?.birthDate,id:e,midname:l?.midname,name:l?.name,surname:l?.surname,profile:{id:n},participantContacts:[{contactTypeCd:{key:"EMAIL"},value:l?.email},{contactTypeCd:{key:"MAIN_PHONE"},value:l?.phone}],roleCd:{key:"BORROWER",value:"Заемщик"}}]}}))({participantId:i,taskId:e,profileId:a,formData:l})),m(i,e,a),n(JSON.stringify(l)),globalThis.location.href="/credit-lead"}catch{r("Fail")}},i=Object.keys(El).filter((e=>l[e])).map((e=>El[e]?.text));(e=>{const{open:t,close:n}=de();return{open:(l={})=>t(o(Sr,{onClose:n,...e}),l),close:n}})({close:e,...Br(l?.phone,i)}).open()}}catch{r("Fail")}var i}),[]),responseStatus:a}},Br=(e,t)=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:xt(e),textButton:"Оформить",__html:`<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${Pr(t)}`}),Pr=e=>`<ul>${e?.map((e=>"<li>"+e+"</li>")).join("")}</ul>`,Rr=d((({className:e,title:t,programId:n="",typeForm:i="",sections:r=[],button:s,...d})=>{const m=r?.flatMap((e=>e?.inputs))||[],[h,p]=l("");a((()=>{sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken")}),[]);const[g,f]=Gi("leadForm"),x=ar(m,g,i),{handleSubmit:b,responseStatus:y}=Ir({inputs:m,programId:n,saveForm:f});if(y){Oi({responseType:y,typeForm:i}).open()}const[,{field:v,onSubmit:N,reset:w}]=At(x,{onSubmit:b});return a((()=>{"OK"===h&&(p(""),w())}),[h]),o(Ft,{className:u("container space-y-m",e),title:t,...d,children:c("form",{onSubmit:N,className:"space-y-m",children:[r.map(((e,t)=>c("div",{className:u(Mi(e.columns),"grid gap-x-m"),children:[Di(e.title),tr({field:v,typeForm:i,inputs:e?.inputs})]},`section-${t}`))),ir(s)]})})})),Mr=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"})]})})),Dr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Vr=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function zr(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 Ar=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:zr(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}(i((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:h,role:"listitem",children:d})})),_r=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Fr=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:h,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(Er(n))}),[g,f]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Or(c,v):{},...N?Vr(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(Ar,{className:u(m,a?_r[a-1]:"",{"h-full":N},t),style:w?Or(c/4):{},activeIndex:l,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Or=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Er=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),jr={"horizontal-list":"w-6","vertical-list":"h-6"},Lr=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?jr[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),$r=({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:u("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:u("text-secondary-text font-light",s),children:n?.description})]},String(l))},Ur=e=>e,qr=(e=Ur)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),Wr=qr(),Hr=(e=Ur)=>qr((t=>-e(t))),Yr=Hr(),Kr=e=>t=>e.scrollWidth/t,Xr=e=>(t,n)=>{e.scrollBy({left:n*Kr(e)(t),behavior:"smooth"})},Gr=({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?[Hr()(a),qr()(a)]:[-1,-1],m=c>0,u=d<e-1,h=i((()=>{var t;n.current&&(m?Xr(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(u?Xr(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:h,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:u,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Jr={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Zr=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=we(),[h,p]=Gr({itemCount:s.length}),g=Qr(Boolean(s?.length));a((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Fr,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map($r({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",Jr[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Lr({activeIndex:t,onClick:f,listType:l}))}):null})),Qr=(e=!1)=>({behavior:e?"auto":"smooth"}),es=d((({className:e,disabled:t,...n})=>o(be,{rounded:!0,className:u("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"})}))),ts=d((e=>o(es,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),ns=d((e=>o(es,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),ls="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",as=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?is(t):null,i?o(ts,{className:u(rs(a),m?"left-1":"left-0"),onClick:s}):null,r?o(ns,{className:u(rs(a),m?"right-1":"right-0"),onClick:d}):null]})})),is=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(ls,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(ls,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),rs=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),ss=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:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=Gr({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===i?"relative h-full":""),children:[o(Fr,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(as,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(Zr,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),os=({blocksToRender:e,...t})=>o(ss,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:R(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Dr(!0)),children:B(e,t)},String(n))})}),cs=e=>e%2!=0,ds=d((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,role:r,...s})=>c(n,{tag:n,className:u("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]}))),ms=d((({className:e="",label:t,icon:n,dataTheme:l="pc",disabled:a=!1,onClick:i})=>o(ds,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",role:"button",className:u("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(Me,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),us=({isUnfolded:e,onToggle:t})=>o(ms,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),hs=["ArrowDownIcon","ArrowUpIcon"],ps="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",gs=({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:u("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:u(ps),children:[R(i,{...a.options,parent:n}),cs(i.length)?o(pt,{className:"col-span-6",...a}):null]}),o(Ji,{renderFoldableSection:({isUnfolded:e})=>c(Zi,{className:u(ps),isUnfolded:e,children:[R(r,{...a.options,parent:n}),cs(r.length)?o(pt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:l})=>o(ms,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:hs[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:l})})]})},fs=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[xs(n,t),gs({...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[xs(n,t),os({...l,blocksToRender:t})]});default:return null}})),xs=(e,t)=>e&&!t.length?o(Mr,{...e}):null,bs=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),ys=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(Va,{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))))),vs=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,bs(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Ns(l)).filter(Boolean))]}),n?o("div",{children:o(_i,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),Ns=e=>([t,n])=>{const l=n?.type;return"array"===l?ws(t,e)(n):null},ws=(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(Me,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(ys,{items:l,multiple:!n?.single,...t(e)})]},e)};function ks(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Ss=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Cs=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Ss(t[e])||Ss(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Ss(t[e])||Ss(n[e])||Ts(t[e])<=Ts(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Ss(t[e])||Ss(n[e])||Ts(t[e]?.min)>=Ts(n[e]?.min)&&Ts(t[e]?.min)<=Ts(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Ss(t[e])||Ss(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Ss(t[e])||Ss(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Ts=e=>Number(e||0),Is=(e,{block:t,page:n,normalize:l=zt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=At(e),d=r((()=>ks(a,a.map((e=>dt(e.content,n?.fallback))))),[a,n?.fallback]),m=i===e?a:((e,t)=>(n=zt)=>e?.filter((([,e])=>Cs(t,n(e)||{}))).map((([e])=>e)))(d,i)(l);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},Bs={},Ps={},Rs=ut((({className:e,filtrationSchema:t=Bs,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Is(Ps,{block:a.block,page:a.options?.page}),d=o(sn,{className:"w-64",label:n?.title,options:Ms(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Ms(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(vs,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(_i,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(fs,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Ms=e=>ks(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Ds=(e=!1)=>e?"text-left":"text-center",Vs={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},zs=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:u("rounded-icon object-fit flex justify-center items-center",Vs[n],e),children:o(W,{...i,width:"54%",height:"54%",name:a})}):null})),As=d((({className:e="",title:t,benefitList:n,...l})=>{const a=we();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(w,{headingType:"h3",as:"h2",className:Ds(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(_s)}):null]})})),_s=({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(zs,{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(w,{headingType:"h6",children:e}),o(Me,{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)),Fs=(e,t,n)=>{return o(ss,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>c("div",{className:u("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(Me,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(Me,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},Os=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Fs(e,0,t):null]}))),Es={start:"justify-start",center:"justify-center",end:"justify-end"},js=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&u("flex",Es[n]);return o(g,{className:u("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:Ee(e)})})),Ls=d((({className:e,title:t,children:n,...l})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(w,{className:"text-center",title:t}):null,n]}))),$s="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",Us="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",qs="flex flex-col gap-y-xl min-w-52",Ws=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(Me,{size:"text-h3",children:"number"==typeof e?[l,Ue(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),Hs=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Me,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(Ws,{value:n,...a}):o(Me,{size:"text-h3",children:"-"})]}))),Ys=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Ks=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Me,{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]})]}))),Xs=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Gs=({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(Xs,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(Ks,{title:e,rate:t,unit:n,fractionDigits:l,color:i,...s})}),o(Hs,{className:"@xl:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:i,...s}),r]}),Js=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(Kn,{items:e?[`От ${Ue(1)(l.min||0)} ${n}`,`До ${Ue(1)(l.max||0)} ${n}`]:[],step:t,...l}),Zs={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Qs={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},eo=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=Zs.prefMonthsNum,prefTravelBonusRate:i=Zs.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||Qs,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},to=ut((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=At({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=eo(r,n);return o(Ls,{className:e,title:t,...i,children:c("section",{className:u($s,e),children:[c("div",{className:Us,children:[Js({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Js({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Gs({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:qs,children:[f>=0?o(Hs,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,Ee(l,{isVertical:!0}),Ys(a)]})]})})})),no=Math.round(29.5),lo=(e,t=0)=>e?.sum?e.sum:t,ao=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,io=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,ro=({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(Me,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Me,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(oi,{orientation:l,items:e,value:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),so=e=>ro({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),oo=" (c капитализацией)",co=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:qs,children:[o(Hs,{title:`Доход в конце срока${i?oo:""}`,value:e,postfix:n,prefix:"+"}),o(Hs,{title:`Сумма в конце срока${i?oo:""}`,value:t,postfix:n}),Ee(l,{isVertical:!0}),a?.map(Ys)]}),mo=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:uo([e,t],l),uo=([e,t],n=[])=>({[e]:n.length?Yr(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?Wr(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ho=(e,[t,n],l)=>e>=l[t]&&e<=l[n],po={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const go={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},fo=(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?po[e?.rateType]:"",{data:n}=_n(t?`/api/v1/depositrates/${t}`:null,rt);return Array.isArray(n)?n:[]}(t);if(n<=30)return{...go,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&xo(s,e)&&ho(l,["minSum","maxSum"],e)&&ho(n,["minDays","maxDays"],e)))||go,{rate:m}=d,u=bo(m,e),h=l+u,p=c||[go];return{...d,...uo(["minSum","maxSum"],p),...uo(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},xo=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,bo=(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)},yo=ut((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=At({moneyValue:lo(r,1e5),daysValue:ao(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=fo(m,s),{income:g,finalSum:f,rate:x,isUnavailableByTerm:b,depositeName:y}=p;return o(Ls,{className:e,title:t,...d,children:c("section",{className:u($s,e),children:[c("div",{className:Us,children:[Js({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(Kn,{items:[`От ${io(v.min||0)}`,`До ${io(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[vo(p,h),so({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Gs({rate:x,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),co({income:g,finalSum:f,buttons:n,footnotes:[l,a]})]})});var v})),vo=(e,t)=>c("div",{className:"space-y-s",children:[o(Me,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(ol,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(ol,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),No=(e=[],t=!1)=>wo([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),wo=(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]},ko=({min:e=0,max:t=0,availableMonths:n,...l})=>o(Kn,{items:[`От ${So(e)}`,`До ${So(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),So=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Co=e=>ro({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),To=({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?.(Un(t?.[a],n.minMonths,n.maxMonths))},Io=(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)},Bo={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Po=e=>Ro({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Ro({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Ro({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Ro({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Ro=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Mo=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[Bo],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Po({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=mo(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=mo(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>Po({row:e,userInputParams:t,paramsViewSettings:n})&&ho(l,["minSum","maxSum"],e)&&ho(a,["minMonths","maxMonths"],e)))||Bo)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:u}=m,h=Io(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:h}},Do=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Vo={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},zo=ut((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(h=n?.rateRows,wo([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],h));var h;const[p,{field:g}]=At({moneyValue:lo(s,2e5),monthsValue:ao(s,no),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),f=Mo(p,n,r),x=Co({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(Un(p.moneyValue,f.minSum,f.maxSum))}),[f.minSum,f.maxSum]),a((()=>{y&&y(Un(p.monthsValue,f.minMonths,f.maxMonths))}),[f.minMonths,f.maxMonths]),a((()=>{!Do(s)&&m&&To({field:g,defParams:m,calcParams:f,map:Vo,monthsValue:"minMonths"})}),[n,s]),o(Ls,{className:e,title:t,...d,children:c("section",{className:u($s,e),children:[c("div",{className:Us,children:[Js({title:"Сумма кредита, ₽",step:500,min:f.minSum,max:f.maxSum,...g("moneyValue"),value:f.moneyValue}),ko({title:"Срок кредита, месяцев",min:f.minMonths,max:f.maxMonths,...g("monthsValue"),value:f.monthsValue}),Ao({...f,...r},g),o("div",{className:"sm:hidden",children:x})]}),c("div",{className:u(qs,"@4xl:w-1/2"),children:[o(Hs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Hs,{title:"Ставка",value:f?.rate,fractionDigits:2,postfix:"%"}),o(Hs,{title:"Ежемесячный платёж",value:f.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:x}),Ee(l,{isVertical:!0}),Ys(i)]})]})})})),Ao=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(ol,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(ol,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(ol,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(ol,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),_o=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},Fo={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Oo=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?Lo(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=>[jo({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),jo({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),jo({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),jo({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,ho(l,["minSum","maxSum"],t),ho(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||Fo,{rate:u}=m,h=Eo(u,e),p=l+h,g=t||[Fo];return{...m,...uo(["minSum","maxSum"],g),...uo(["minMonths","maxMonths"],g),availableMonths:_o(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:h,finalSum:p}},Eo=(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)},jo=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Lo=(e,t)=>e+Math.round((t-e)/2),$o=(e="rub")=>"rub"===e,Uo=(e,t)=>{const{minMonths:n,maxMonths:l}=uo(["minMonths","maxMonths"],Yo(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:Un(a,n,l)}},qo=(e,t)=>{const{minSum:n,maxSum:l}=uo(["minSum","maxSum"],Yo(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:Un(a,n,l)}},Wo=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),Ho=e=>{const t=$o(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Yo=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},Ko=(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?ro({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?ro({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),Xo(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?so({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},ro({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),Xo(e.isShowNewClient),e.isShowNewClient?o(ol,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},Xo=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,Go={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Jo={text:"₽",key:"rub"},Zo=ut((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[Jo],g=i((e=>t=>e?{...t,...Ho(t),...qo(t,e),...Uo(t,e),...Wo(t,e)}:t)(h),[h]),[f,{field:x}]=At({moneyValue:lo(d,2e4),monthsValue:ao(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:Jo},{normalize:g}),b=x?.("currency")?.value??Jo,y=x?.("isNewClient")?.value,v=Yo(h,b),N=Oo(f,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,T=i((()=>{To({field:x,defParams:No(v,y),calcParams:N,monthsValue:"minMonths",map:Go})}),[x,h]);a((()=>{!Do(d)&&v&&T()}),[d,h]);const I=w===No(v,y)?.rate;return o(Ls,{className:e,title:t,...m,children:c("section",{className:u($s,e),children:[c("div",{className:Us,children:[c("div",{className:"flex gap-m",children:[Js({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:Qo(b?.key)}),h&&h?.length>1?o(mn,{label:"Валюта",options:p,...x("currency")}):null]}),ko({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),Ko({...N,...s},x)]}),Gs({rate:w,children:tc(T,I)}),co({income:k,finalSum:S,buttons:[...l,ec(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),Qo=(e="")=>$o(e)?1e3:100,ec=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},tc=(e,t=!1)=>t?null:o(_i,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),nc=e=>lc({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&lc({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),lc=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],ac={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},ic=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[ac],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>nc({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=mo(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=mo(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>nc({row:e,userInputParams:t,paramsViewSettings:n})&&ho(l+r,["minSum","maxSum"],e)&&ho(i,["minSumOld","maxSumOld"],e)&&ho(r,["minSumExtra","maxSumExtra"],e)&&ho(a,["minMonths","maxMonths"],e)))||ac)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=h,g=Io(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:f}},rc=ut((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=At({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=ic(s,n,i),h=Co({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Ls,{className:e,title:t,...r,children:c("section",{className:u($s,e),children:[c("div",{className:Us,children:[Js({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Js({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),ko({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),sc({...m,...i},d),m.isExtraMoney?Js({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:h})]}),c("div",{className:u(qs,"@4xl:w-1/2"),children:[o(Hs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Hs,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Hs,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Hs,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),Ee(l,{isVertical:!0}),Ys(a)]})]})})})),sc=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(ol,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(ol,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(ol,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),oc=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=$n(e,{normalize:(e=a)=>n&&l?String(Un(Number(cc(e)),n,l)):cc(e),format:Ue(r)}),d=i((e=>t&&t(cc(e))),[t]);return o(Ht,{onChange:d,...s,...c})})),cc=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),dc=d((e=>o(oc,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Me,{size:"text-xl",font:"font-light",children:"₽"})})}))),mc={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},uc={amount:1500},hc=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=At(uc),[h,p]=l(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(w,{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:mc[r],children:[o(dc,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(_i,{className:"w-full mt-lg",type:"submit",disabled:h,children:i.text}):null]})]})})),pc=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),gc="relative h-full",fc={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},xc=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(vc),r=n?{defaultPadding:"p-6xl pb-m"}:{};return M({...l,renderProps:(n,l,a)=>c("div",{className:bc(n,{someCardsHighlighted:i}),children:[B(n,l,{className:yc(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),vc(n)?pc({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},bc=(e,{someCardsHighlighted:t})=>u(gc,t&&(vc(e)?"pt-3xl":"pt-3xl sm:pt-16")),yc=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>u(gc,"min-w-80",fc[l],t&&(vc(e)?"pt-3xl sm:pt-16":"pt-3xl"),Dr(n),n&&"h-full"),vc=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Nc=ut((({className:e,visibleItemCount:t=0,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(ss,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?wc(s?.block?.blocks):[],hasBlur:!0,children:xc({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),wc=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],kc="z-10 border border-solid w-full h-full",Sc=u(kc,"absolute hidden @xl:block border-transparent"),Cc=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:u(Sc,"top-9 right-12 bg-green-dark")}),o("div",{className:u(Sc,"top-6 right-8 bg-green")}),o("div",{className:u(Sc,"top-3 right-4 bg-green-light")}),c("div",{className:u(kc,"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}),Ee([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Tc={black:"bg-black",white:"bg-white"},Ic=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:u("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ce,{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:Ee([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(Me,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Bc)]}):null,a?c(Me,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Bc=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Tc[e]}`},String(t)),Pc=d((({icon:e,...t})=>{const n=ue(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:u("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})),Rc=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:u("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?Mc(l):null]})}))),Mc=e=>o("div",{className:u("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(Pc,{...e},String(t))))}),Dc=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Vc=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=ue()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...he(a),children:i})})),zc=[{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"}}],Ac=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=>zc.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Oe(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}})),h=u("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},_c(a));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:Ee(m,{className:Fc(s??!1,a??!1,n),buttonClassName:h})}),r?o(Me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),_c=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",Fc=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),Oc=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:u("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(Vc,{href:a,target:m,className:"h-full",data:Dc(v),children:c(Ce,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ge(Oe(i)?o(ne,{image:i}):null,x),buttons:d.length?o(Ac,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Fe,{benefits:f}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,Ec(l,p)]})})}))),Ec=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,jc=(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(Me,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(Me,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:Ee(a)}):null]},String(t))},Lc=d((({className:e="",title:t,align:n="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:h,...p})=>{const f=d.map(jc),[x,b]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[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:u("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[Oe(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(w,{className:u("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(Ji,{renderFoldableSection:()=>c("div",{children:[x,o(Zi,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?$c(m?.parent,h,y):null}):o("div",{children:x})]})})),$c=(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?he(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Uc=d((({__html:e,icon:t="InfoCircleIcon",iconVersion:n="black"})=>c("div",{className:"flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m",children:[o("div",{className:"rounded-full bg-white p-xs",children:o(W,{name:t,width:"24",height:"24",iconVersion:n})}),o(Pe,{__html:e})]}))),qc=d((({step:e=10,description:t,showPercentage:n=!0})=>c("div",{children:[o("div",{className:"h-4 w-full bg-gray relative",children:o("div",{className:"h-4 bg-green",style:{width:`${e}%`}})}),c("div",{className:"relative",children:[n?c("div",{className:"absolute left-2/4 text-green",children:[e,"%"]}):null,t?o("div",{className:"text-right mr-4 text-gray",children:t}):null]})]}))),Wc=d((({step:e=1,totalSteps:t=5,stepsTitles:n=[]})=>{const l=r((()=>e/t*100),[e,t]);return o("div",{className:"py-lg px-5xl bg-white col-span-12",children:c("div",{children:[c("span",{className:"font-bold",children:["Шаг ",e," из ",t,"."]})," ",n[e-1]||null,o(qc,{step:l,showPercentage:!1})]})})})),Hc={1:[{title:"Персональные данные",columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0},{fieldType:"common",name:"name",required:!0,dadata:!0},{fieldType:"common",name:"middleName",dadata:!0},{fieldType:"common",name:"sex",required:!0},{fieldType:"common",name:"birthday",required:!0},{fieldType:"common",name:"birthPlace",required:!0},{fieldType:"common",name:"phone",required:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{fieldType:"common",name:"dulSerie",required:!0},{fieldType:"common",name:"dulNumber",required:!0},{fieldType:"common",name:"dulIssueDateField",required:!0},{fieldType:"common",name:"dulSubdivisionCode",required:!0,dadata:!0}]},{inputs:[{fieldType:"common",name:"dulIssuedBy",required:!0,dadata:!0},{fieldType:"common",name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:2,inputs:[{fieldType:"common",name:"participantAddress",required:!0},{fieldType:"common",name:"participantAddress",required:!0,dadata:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",columns:2,inputs:[{fieldType:"common",name:"fullAddress",required:!0,dadata:!0},{fieldType:"common",name:"housing",required:!0}]}],2:[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{fieldType:"info",text:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{fieldType:"common",name:"employment",required:!0},{fieldType:"common",name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{fieldType:"common",name:"inn",required:!0,dadata:!0},{fieldType:"common",name:"legalForm",required:!0}]},{inputs:[{fieldType:"common",name:"organization",required:!0},{fieldType:"common",name:"amountWorkers",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"employerActivities",required:!0},{fieldType:"common",name:"employerOrganization",required:!0},{fieldType:"common",name:"generalSeniority",required:!0},{fieldType:"common",name:"lastJobExperience",required:!0},{fieldType:"common",name:"experience5Years",required:!0},{fieldType:"common",name:"jobsNumber",required:!0}]},{inputs:[{fieldType:"common",name:"phone",label:"Телефон работодателя",required:!0},{fieldType:"common",name:"beginDate",required:!0},{fieldType:"common",name:"positionOrganization",required:!0}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{fieldType:"common",name:"fullAddress",required:!0}]}],3:[{title:"Семейное положение"},{columns:1,inputs:[{fieldType:"common",name:"familyStatus"}]},{columns:1,inputs:[{fieldType:"common",name:"dependents"}]},{columns:2,inputs:[{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"retirementIncome"},{fieldType:"common",name:"otherIncome"}]},{title:"Совокупный доход"},{inputs:[{fieldType:"info",text:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{fieldType:"common",name:"mandatoryIncome"}]},{columns:1,inputs:[{fieldType:"common",name:"otherPayments"}]},{columns:1,inputs:[{fieldType:"common",name:"snils"}]},{columns:2,inputs:[{fieldType:"common",name:"armyIdFlg"}]}],4:[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"disablePeopleFlg"}]},{inputs:[{fieldType:"common",name:"bankruptcyFlg"}]},{inputs:[{fieldType:"common",name:"shareholderFlg"}]},{inputs:[{fieldType:"common",name:"legalEntityName"}]},{inputs:[{fieldType:"common",name:"creditInRshbCd"}]}],5:[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"region"}]},{inputs:[{fieldType:"common",name:"addressBranch"}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{fieldType:"common",name:"bankEmployeeCode"}]}]},Yc=d((({step:e,setStep:t,totalSteps:n})=>c("div",{className:"flex justify-between",children:[o(_i,{onClick:()=>{e>1&&t(e-1)},className:u("w-full @xl:w-auto"),type:"button",version:"secondary",disabled:1===e,children:"Назад"}),o(_i,{onClick:()=>{e<n&&t(e+1)},className:u("w-full @xl:w-auto"),type:"button",disabled:e===n,children:"Далее"})]}))),Kc=["Персональные данные","Данные о трудоустройстве","Данные о доходах и расходах","Дополнительные сведения","Отделение Банка"],Xc=d((({className:e,typeForm:t="",sections:n=[],...a})=>{const[i,r]=l(1),s=n?.flatMap((e=>e?.inputs))||[],d=ar(s,t),[,{field:m,onSubmit:h}]=At(d,{onSubmit:()=>!1});return o(g,{className:u("bg-transparent",e),defaultPadding:"p-6xl",...a,children:c("div",{className:"container grid grid-cols-12",children:[o(Wc,{stepsTitles:Kc,step:i,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:c("form",{onSubmit:h,className:"space-y-m",children:[Gc({sections:Hc[i],typeForm:t,field:m}),o(Yc,{step:i,setStep:r,totalSteps:5})]})})]})})})),Gc=({sections:e,field:t,typeForm:n})=>e.map(((e,l)=>c("div",{className:u(Mi(e.columns),"grid gap-x-m"),children:[Jc(e?.inputs),Di(e?.title),tr({field:t,typeForm:n,inputs:e?.inputs})]},`section-${l}`))),Jc=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e})=>o(Uc,{__html:e}))):null},Zc=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Qc=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),ed=1e9,td={sum:{min:1e4,max:ed},period:3},nd=ut((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Is(td,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:ld(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=ad(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(vs,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(dc,{label:l?.title,min:500,max:ed,...d("sum",{parse:e=>({min:Number(e),max:ed}),format:({min:e})=>String(e)})}),o(Kn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(fs,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),ld=e=>st((e?.paramsSource?.rateRows||[]).filter(Zc).flatMap((e=>Qc(e.minMonths,e.maxMonths)))),ad=e=>st(e.flatMap((e=>e||[])).filter(Zc).flatMap((e=>Qc(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],id=[{key:"10"},{key:"50"},{key:"100"}],rd=({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(sn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:id,iconVersion:"black"})]})},sd="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",od=(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:sd,"aria-label":`Страница ${i}`,children:i},String(t)):null},cd={width:"24",height:"24"},dd=({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(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:md(1===e),...cd})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:sd,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(od),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:sd,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:md(e===n),...cd})})]})},md=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",ud=({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(dd,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(rd,{itemCount:l,onItemCountChange:a}):null]}),hd=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:u("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:u("h-14 w-full px-10 text-l text-black box-border rounded-md",qt),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),pd=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(hd,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Pl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Pl,{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(_i,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),gd=(e,t)=>o(zs,{...e,iconBgVersion:t,className:"shrink-0"}),fd=({title:e,timestamp:t,publicId:n})=>{const l=ue(),{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:[gd({icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Me,{size:"text-m","font-weight":"font-light",children:ft(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)},xd="/api/v1/depository",bd={startDate:void 0,endDate:void 0,query:""},yd=ut((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:h}]=At(bd),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?ft(l,!0):"",r=a?ft(a,!0):"",s=new URLSearchParams(xd);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}=_n(xd+o,rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(pd,{filtrationState:d,field:m,onClearFilter:h}),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(Me,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Me,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(fd,{...e},String(e.publicId)))):o(Mr,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(ud,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),vd=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,Nd=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:vd(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]}))),wd="location";function kd(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",Cd()??{name:e}),r=i((e=>{Td(e),n(e)}),[]),{data:s}=_n(Sd()?null:"/api/v1/region",rt);return a((()=>{s&&!Sd()&&n(s)}),[s]),[t??{name:e},r]}const Sd=()=>Boolean(globalThis.localStorage?.getItem(wd)),Cd=()=>{try{const e=globalThis.localStorage?.getItem(wd);return e&&JSON.parse(e)}catch(e){return null}},Td=e=>{try{globalThis.localStorage?.setItem(wd,JSON.stringify(e))}catch(e){}};var Id;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Id||(Id={}));const Bd=new Intl.NumberFormat("ru",{style:"currency",currency:Id.RUB}),Pd=e=>e?Bd.format(e):"",Rd="text-m font-light text-secondary-text ",Md=`${Rd} text-left`,Dd=`${Rd} pl-5xl text-center`,Vd=`${Rd} pl-5xl text-right`,zd={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Ad=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Md,children:o(Me,{size:"text-m",children:"Валюта"})}),o("th",{className:Dd,children:o(Me,{size:"text-m",children:"Купить"})}),o("th",{className:Vd,children:o(Me,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(_d)})]}))),_d=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:zd[t]},width:"24",height:"24"}):null,o(Me,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Me,{size:"text-h6",children:Pd(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Me,{size:"text-h6",children:Pd(e?.buyExchangeRate)})})]},t)},Fd={icon:"GpsIcon"},Od=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(zs,{...Fd,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Ed=(e,t,n)=>{const l=Number(jd(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)},jd=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Ld=e=>Bt([[e=>e.value!==Id.RUB&&e.oppositeValue!==Id.RUB,()=>e.handleConvert(e.value,Id.RUB)],[e=>e.value===Id.RUB&&e.oppositeValue===Id.RUB,()=>e.handleConvert(e.value,Id.USD)],[e=>e.value===Id.RUB&&e.oppositeValue===Id.RUB,()=>e.handleConvert(e.value,Id.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function $d(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(Ht,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(sn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Ud=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Id.RUB,selectBuy:n?.[0]?.currency?.currency||Id.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:[$d({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:qd(r,d,n),value:r.inputSell,setValue:e=>Hd(d,n)(e,r.selectSell,r.selectBuy)}),$d({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Wd(r,d,t),value:r.inputBuy,setValue:e=>Yd(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),qd=(e,t,n)=>l=>{t({selectSell:l}),Ld({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{Hd(t,n)(e.inputSell,l,a)}})},Wd=(e,t,n)=>l=>{t({selectBuy:l}),Ld({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>Yd(t,n)(e.inputBuy,l,a)})},Hd=(e,t)=>(n,l,a)=>{e({inputSell:jd(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(Ed(n,i,l===Id.RUB)||"")})},Yd=(e,t)=>(n,l,a)=>{e({inputBuy:jd(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(Ed(n,i,l===Id.RUB)||"")})};const Kd=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const[a]=kd(),i=function(e){const t=e?.code||"000",{data:n}=_n(`/api/v1/exchangerates?regionCode=${t}`,rt);return n||{}}(a),r=Xd(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Id.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:Id.RUB}}),o(g,{className:u("box-border min-h-80",e),...l,children:o(Ce,{className:"h-full",title:o(w,{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(Ad,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Od,{address:i?.address})]}),o(Ud,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:n})]})})})})),Xd=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Gd=d((({className:e="",items:t})=>{const n=ue();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(Jd(n))})})),Jd=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,...he(t),children:a||null})},String(l)):null},Zd=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>o(ds,{tag:"button",className:u("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:[gd(a,t),e?o(Me,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Qd=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",em=(e=!1)=>e?"MinusIcon":"PlusIcon",tm=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",nm=ut((({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:u("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(Ji,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Zi,{className:u("gap-lg",Qd(m)),isUnfolded:e,children:M({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>lm({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),lm=({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?tm(e):em(e))(a,r);return"accordion"===e?o(Zd,{label:s,labelIcon:n,labelIconBgVersion:l,icon:c,onToggle:i}):o(ms,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},am=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:im(e)}))),im=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(nm,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(Gd,{items:e.items}):null},String(t)))),rm=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(sm)}):null)),sm=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Me,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(om)})]},String(t)),om=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:cm(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),cm=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${dm(t)}`,children:o(Me,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},dm=e=>e.replaceAll(/\D/g,""),mm=d((({className:e="",index:t,text:n,...l})=>{const a=ue(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:u("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),um=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(Me,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(mm,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),hm=d((({className:e="",index:t,...n})=>{const l=ue(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:u("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}`})})),pm=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Me,{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(hm,{index:t,...e},String(t))))}):null]}))),gm=ut((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{};n.options?.page?.common;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:h,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(am,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(rm,{items:r}),m?o(be,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(Ac,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(be,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(um,{title:d,links:i}),o(pm,{links:a,license:h})]})})),fm=ut((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],h=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=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(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(mn,{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:u("p-m w-full @xl:w-auto",h),data:Dc(i,s?.key),children:f})}):null]})})})),xm={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"},bm=d((({version:e,text:t,mobileText:n,...l})=>{const a=we()?n:t;return a?o(be,{className:u("py-s px-lg font-light whitespace-nowrap",xm["transparent"===e?"transparent":"default"]),...l,children:a}):null})),ym=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:l,version:a,backwardButton:r})=>{const s=D(),d="/"===s.pathname,{dataFooter:m,dataHeader:u,...h}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(mr,{className:"my-2xs",bgColor:e,logo:h,data:u,showTitle:!1})}):vm(p,r),o(bm,{version:a,...l})]})})),vm=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(W,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,Nm={"bg-white":"primary",transparent:"transparent"},wm=ut((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=Nm[e],portal:l,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=l||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:n,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(ym,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...i})})})})),km=(e=!1)=>e?{}:{padding:"p-0"},Sm={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Cm=ut((({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=D();return o(g,{className:u("relative flex flex-col",Sm[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:M({...c,extraProps:{className:u("w-full",Dr(r)),...km(l)}})})}),{childrenTypes:[]}),Tm=ut((e=>o(Cm,{...e})),{childrenTypes:[]}),Im=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?u("flex",Es[n]):"";return o(g,{className:u(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:l})})})),Bm=["байт","Кб","Мб","Гб","Тб","Пб"],Pm=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,...he(i),children:[e,t?c(Me,{size:"text-l",font:"font-light",children:[t," ",Rm(d,m),o(Me,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Rm=(e,t)=>e||t?o("span",{children:", "}):"",Mm=(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))} ${Bm[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Vm(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(Pm,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:Dm(t),data:n?.data}),o(Pe,{__html:n?.__html})]},String(l))},Dm=e=>e?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,Vm=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},zm=d((({href:e,__html:t,target:n})=>{const{close:l}=de(),a=D(),r=U(a)(e),s=i((()=>{l()}),[]);return c(Ll,{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(_i,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Am=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(zm,{...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:[Dm(a),o(Me,{font:"font-light",children:e})]})})),_m={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Fm=ut((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=D();return c(g,{className:u("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:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",_m[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?Em(t)(n,l):Mm(e,t)(n,l)},Em=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(Am,{...l,icon:e,href:jm(t)?t?.href:t?.attachment?.src}),o(Pe,{__html:t?.__html})]},String(n)):null},jm=e=>"href"in e,Lm=ut((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:p="primary",...f})=>{const x="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:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Ce,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:Ee(l,{className:"flex-wrap"}),children:[a?o(Me,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:u("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(Me,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:u("flex justify-center bg-white rounded-md @xl:-order-1",x),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),$m=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Um=(e=[],t={})=>e.filter((({content:e={}})=>Cs(t,e))).length,qm=(e,t)=>e===t;const Wm=(Hm=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(qm,((e=qm)=>(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])=>Hm(n,t[e])))));var Hm;const Ym=[],Km={},Xm={primary:"bg-white/30",secondary:"bg-main-divider"},Gm={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":Xm[t],a=Gm[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Me,{size:"text-xs",color:a,children:e})})})),Zm=({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:u("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:u("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})]})]})},Qm={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},eu={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},tu={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},nu={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},lu=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:h,...p}=t;return o(i,{className:u("h-12","block flex-1","cursor-pointer",Qm[l],n?nu[l]:tu[l]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?eu[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Zm({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:$m(n,l)})}):null]})})})),au=d((e=>o(e?.item?.href?iu:ru,{...e}))),iu=d((e=>{const t=ue(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(lu,{...e,tag:"a",item:a,onClick:l})})),ru=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(lu,{item:e,onClick:l,...n})})),su=(e,t,n)=>(l,a)=>o(au,{isActive:l===e,onClick:t,type:n,item:l},String(a)),ou=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(su(l,a,t))}))),cu={categories:[],extraOptions:[],propertyType:[],stage:[]},du=ut((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Is(cu,{block:a.block,page:a.options?.page}),f=i(((e=cu)=>p(e)),[]),x=(({hotFilters:e=Ym,filtrationState:t=Km,blocks:n=Ym,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Wm(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Um(n,t.filter),version:$m(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:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(ou,{...x}),o(vs,{filtrationSchema:n,resetButton:l,field:m,reset:h}),o(fs,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),mu=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),uu=d((({children:e})=>mu?e:null)),hu="/icons/MapMarkerClusterIcon.svg",pu="/icons/MapMarkerClusterYellowIcon.svg";function gu({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=fu("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=fu("workplaces",e,a),r=xu(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=xu(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=xu(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 fu=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?hu:pu,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),xu=(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?hu:pu,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),bu={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},yu={...bu,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},vu=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(yu).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(W,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Nu=e=>globalThis[e];function wu(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=Nu(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(Nu(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(Nu(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))})(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}const ku={...bu,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Su=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(ku).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),Cu=[55.753995,37.614069],Tu=d((({points:e,className:t="",zoom:n=5,isLoad:l})=>{const i=s(null),r=wu("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{i.current?gu({yandexMaps:r,map:i.current,points:e,isLoad:l}):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:Iu(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),gu({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:u("relative","w-full",t),children:[l?o(gr,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(Su,{yandexMaps:i}),o(Su,{yandexMaps:i,direction:"out"})]}),vu(i,r,u("right-2 top-80",d))]})})),Iu=e=>{const t=[Pu(Bu(e,0)),Pu(Bu(e,1))];return t.every((e=>e))?t:Cu},Bu=(e,t)=>e.map((e=>e.coords?.[t])),Pu=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Ru={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Mu={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Du={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)},Vu=(e,t,n)=>{const l=$m("all"===t),a=$m("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(_i,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(_i,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},zu=({__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(Me,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Au="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",_u=({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(ol,{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(Ji,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Au,children:s}),o(Zi,{className:Au,isUnfolded:e,children:d})]}),renderFoldButton:Fu(n,l)})}):null})},Fu=(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(W,{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:Ou()})]}),Ou=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),Eu=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Me,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),ju=()=>{},Lu=e=>"all"===e?"block":"hidden",$u=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=ju,renderRemoteWorkplaceCard:s=ju,getBalloon:d=ju,getBalloonRemoteWorkplaces:m=ju,descriptionData:h,title:p})=>{const g=p?.includes("Офис"),[f,{field:x,reset:b}]=At(Ru),[y,v,N,w]=r((()=>{const e=Uu(t,f),n=Uu(a,f),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,f]),[k,S]=l("all"),C={filters:qu([...t,...a]),field:{field:x,reset:b},onlyOffice:g,labels:Mu};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Eu(p,w),h?zu(h):null,g&&Vu(t,k,S),o("div",{className:u("pb-3xl",Lu(k)),children:_u(C)})]}),o("div",{className:"h-[600px]",children:o(uu,{children:o(Tu,{points:v,isLoad:n,className:"h-full"})})})]}),c(uu,{children:[y.map(i),N.map(s)]})]})})),Uu=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Du[t](e)))))},qu=e=>Object.keys(Ru).filter((t=>e.filter((e=>Du[t](e))).length)),Wu={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"}},Hu=d((({className:e,children:t,color:n="gray"})=>c("div",{className:u("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Wu[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(Me,{size:"text-m",color:Wu[n].text,children:t})]}))),Yu=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:Ku({textItems:i,subText:t,children:n,isPhone:l,...a})})),Ku=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Me,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Xu(n,s),a?o(Me,{color:l,size:"text-m",children:a}):null]}),Xu=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Me,{size:"text-l",children:t?o("a",{href:`tel:${Gu(e)}`,children:e.trim()}):e.trim()},String(n)))),Gu=e=>e.replace(/\D/g,""),Ju=d((({className:e,children:t})=>o("div",{className:u("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}))),Zu=["ArrowDownIcon","ArrowUpIcon"],Qu=["Подробнее","Скрыть"],eh=({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:Qu[Number(e)]}),o(W,{className:"text-primary-text",name:Zu[Number(e)],width:"16",height:"16"})]}),th=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:ah(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(Me,{size:"text-h4",children:ah(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Hu,{color:"green",children:ah(s)})})]}),o("div",{className:"hidden sm:block",children:o(Ju,{className:"flex-wrap",children:m?.map(lh)})}),o(Ji,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Zi,{isUnfolded:e,children:o(Ju,{className:"flex-wrap",children:m?.map(lh)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>eh({isUnfolded:e,onToggle:t})})]},String(d))},nh=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${ah(t)} №${n}`,body:e.toUpperCase()}),lh=(e,t)=>o(Yu,{...e},String(t)),ah=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",ih=[];const rh=async e=>{const t=await it(e,{method:"GET"});return Array.isArray(t)?t:ih},sh={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},oh={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)},ch=d((({descriptionData:e,className:t})=>{const[n]=kd(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=_n(`/api/v1/atms?regionCode=${e}`,rh);return{data:t||ih,isLoad:!t&&!n}}(l);return o($u,{className:t,filterItems:dh,data:a,isLoad:i,initFilterState:sh,renderCard:th,getBalloon:nh,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),dh=(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=>oh[t](e))),n=!l.length||l.some((t=>oh[t](e)));return t&&n}))},mh=e=>{const t=hh(e);return o(Yu,{label:"Режим работы",value:t,className:"max-w-none"})},uh=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",hh=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[uh({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),uh({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},ph=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],gh=e=>ph.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??"")}}))),fh=e=>{if(!e)return null;const t=xh(e);return c(Ju,{className:"border-none",children:[o(Yu,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(bh)})}),o(Yu,{label:"Режим работы",className:"max-w-none",children:o(Me,{children:e})})]})},xh=e=>{const t=ph.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},bh=({short:e,status:t},n)=>o("div",{className:u("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(Me,{size:"text-xs",children:e})},String(n)),yh=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Yu,{label:"Валюта",value:e.currency}):null,t?o(Yu,{label:"Купить",value:String(t)}):null,n?o(Yu,{label:"Продать",value:String(n)}):null]},String(l)),vh=(new Date).getDay(),Nh=e=>{const[t]=e?.slice(vh-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(Hu,{color:"green",children:a}):null,n&&i?o(Hu,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Hu,{color:"red",children:"Выходной"})},wh=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",kh=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(Yu,{label:e,value:t&&n?n:"",subText:wh({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Sh=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,Ch=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Th=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,Ih=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=gh(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(Me,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:t})]}):null]}),Nh(h)]}),o("div",{className:"hidden sm:block",children:Bh({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Ji,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Zi,{isUnfolded:e,children:Bh({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>eh({isUnfolded:e,onToggle:t})})]},String(u))},Bh=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=gh(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Ju,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Yu,{label:"Факс",value:t,isPhone:!0}),o(Yu,{label:"Телефон филиала",value:e,isPhone:!0}),o(Yu,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Yu,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(Yu,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Yu,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(Ju,{children:o(Yu,{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(kh)})})}):c(Ju,{children:[o(Yu,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(bh)})}),mh(d)]}),r?.businessScheduleVisibleTag?fh(r?.businessScheduleDescription):null,s?.currencies?.length?o(Ju,{className:"flex-wrap",children:s?.currencies?.map(yh)}):null]})},Ph=({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=gh(e),n=e?hh(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?Sh(n):Th(n,l):Ch(n):null})(n)}`;return{header:l,body:i}},Rh=({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(Me,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Mh({workScheduleDescription:t})}),o(Ji,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Zi,{isUnfolded:e,children:Mh({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>eh({isUnfolded:e,onToggle:t})})]},String(n)):null,Mh=({workScheduleDescription:e})=>c("div",{children:[c(Ju,{className:"flex",children:[o(Yu,{label:"Операции для физических лиц",children:o(Me,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Yu,{label:"Операции для физических лиц",children:o(Me,{children:"Оформление и обслуживание банковских карт"})}),o(Yu,{label:"Операции для физических лиц",children:o(Me,{children:"Инвестиционное и накопительное страхование"})}),o(Yu,{label:"Операции для физических лиц",children:o(Me,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Yu,{label:"Режим работы",className:"max-w-none",children:o(Me,{children:e})})]}),Dh=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Vh={branches:[],remoteWorkplaces:[]};const zh=async e=>await it(e,{method:"GET"})||Vh,Ah=d((({className:e})=>{const[t]=kd(),n=t?.code??"000",{data:l,isLoad:a}=function(e="000"){const{data:t,error:n}=_n(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,zh);return{data:t||Vh,isLoad:!t&&!n}}(n);return o($u,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:Ih,renderRemoteWorkplaceCard:Rh,getBalloon:Ph,getBalloonRemoteWorkplaces:Dh,title:`Офисы филиала ${t?.name}`})})),_h=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===l?o(Ah,{}):o(ch,{descriptionData:e})})})),Fh=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:u("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),Oh=d((({className:e,padding:t,slides:n=[],...l})=>o(g,{className:u("overflow-hidden relative",e),padding:t,...l,children:o(ss,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Xe,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),Eh=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",a),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Oe(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?jh({__html:i,richVersion:r}):null,Lh({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Lh({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Lh({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?Ee([l]):null]})]}))),jh=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),Lh=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(W,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Me,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Me,{size:"text-xl",color:l,children:t})]})]}):null,$h=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Pe,{__html:t,richVersion:n})})})),Uh=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:u(qt.split(" ").filter((e=>"rounded"!==e)),rl,"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(Me,{color:"text-primary-text",children:t}):null]})}))),qh=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(Uh,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Uh,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Wh=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(sn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),Hh=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(Wh,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Wh,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Yh=["От 1 дня","До 365 дней"],Kh=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Me,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Kn,{min:1,max:365,value:e,items:Yh,onChange:t})]}))),Xh=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(Wh,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Wh,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Gh=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Hh,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:Jh(m)}),o(Kh,{days:a,setDays:e=>m({days:e})}),o(Xh,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Zh(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Me,{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(qh,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),Jh=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Zh=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Qh=d((({days:e,tariffs:t=[]})=>{const n=tp(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:[ep("Аренда за",e),ep("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{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(k,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),ep=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Me,{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})]}),tp=(e,t)=>{const n=np(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},np=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},lp=(e,t)=>e.find((e=>e.branchCode===t)),ap=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=lp(l,n.selectedBranch),d=ip(s?.safeBoxCaseVolumes),m=rp(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=sp(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Gh,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Qh,{days:n.days,tariffs:u})]})})),ip=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],rp=(e,t)=>e?.find((e=>e.volume===t)),sp=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,op=[];const cp=async e=>await it(e,{method:"GET"})||op,dp=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,u]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=ti(),p=mp(m.selectedRegion,h),f=function(e){const{data:t}=_n(e?`/api/v1/safeboxes?regionCode=${e}`:null,cp);return t||op}(p),x=i((e=>u((t=>({...t,...e})))),[u]),b=(y=lp(f,m.selectedBranch)||f,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(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(ap,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Tu,{points:b,className:"h-[640px]"}):null]})})),mp=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,up={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"},hp=(e,t,n)=>(l,a)=>{const{button:i}=l;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:pp(e,n)(l,a)}),c("div",{className:u("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[gp(l),i?.text?o(be,{className:"box-border py-s w-full max-w-60 mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},pp=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=fp(e,i),s=i?"transparent"===t:t;return o(g,{className:u("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:xp({step:n,iconVersion:a,i:l,stepVersion:t})})})},gp=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:u("text-s font-light text-left",up.description),children:e.description}):null,o(Pe,{__html:e.__html})]}),fp=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",xp=({step:e,iconVersion:t,i:n,stepVersion:l})=>{return Oe(e?.icon)?o(ne,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:u("text-h4","transparent"===l?up.iconText:(a=l,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var a},bp=d((({className:e="",title:t,description:n,steps:l=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=l.length>3;return c(g,{className:u("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:l.map(hp(d,r,i))}):null,Ee(a,{isVertical:!0})]})})),yp=d((({isActive:e,item:t,onClick:n})=>c("div",{className:u(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(W,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),vp=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:u("relative min-h-full bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(jl,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),Np=({menuRef:e,dialogRef:t,closeDialog:n,openDialog:l,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();l(o(vp,{onClick:e=>e.stopPropagation(),onClose:n,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:c[r].description||c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];function wp(e){throw new Error(e)}const kp=({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:wp(e)}}))),[c,d]),n},Sp=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 Cp=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(Me,{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(Tp,{...e},String(t))))})]}):null,Tp=d((({icon:e,...t})=>{const n=ue(),{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(Me,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Ip=(e,t)=>n=>n.name?o(Vc,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Dc(e,n.name),children:o(Me,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Bp=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:u(qt,"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"})]}))),Pp=d((({foreignOffices:e,branches:t})=>{const[n,a]=kd(t?.default),r=ue(),{href:s}=r({href:`/branches/${n.slug}`}),[d,m]=l(""),u=Mp(ti()).sort(((e,t)=>e.name.localeCompare(t.name))),h=((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})(u,Rp),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(Ll,{className:"pb-20",head:c("div",{children:[o(Me,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Vc,{href:s,className:"inline mx-2xs text-primary-main",children:n.name})]})}):null,o(Bp,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:u.filter((({name:e})=>e&&Sp(e.toLowerCase())(d.toLowerCase())>=.8)).map(Ip(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(h.entries()).map((f=g,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Me,{size:"text-h6",children:e})}),t.map(Ip(x,f))]},e)))}),Cp(e)]});var f,x})),Rp=e=>e.name?.charAt(0)||"",Mp=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Dp=d((({menuRef:e,menuItem:t,locationDialogProps:n,closeAll:l})=>{const i=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Pp,{...e}),n),close:n}})(n||{}),[{name:r}]=kd(),s=e?.current?.getBoundingClientRect(),c=G(X.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open(),"reload"===e.data.type&&l(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(vp,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),Vp="burgerMenuDialog",zp=({menuRef:e,centralMenuItem:t,closeAll:n,openDialog:l,locationDialogProps:a})=>{const i=kp(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Vp,i);return[r,{toggle:()=>{r?n():l(o(Dp,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:n}),{id:Vp})}}]},Ap=[],_p=ut((({sticky:e,...t})=>{const{menuItems:n=Ap}=e??{},a=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),u=r.slice(d),[h,p]=l(-1),[f,x]=l(""),{open:b,closeAll:y}=de(),v=i((()=>{p(-1),x(""),y()}),[y]),N=Lt(v),w=s(null),[k,{toggle:S}]=zp({menuRef:w,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.header}),[{openBottomMenuItemDialog:C}]=Np({menuRef:w,dialogRef:N,closeDialog:v,openDialog:b,leftItems:m,rightItems:u}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{x(t),p(e),y(),C(e,t)}),[y,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:w,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(Fp(I,"left",{activeIndex:h,currentItemPosition:f})),o(yp,{item:a,isActive:k,onClick:e=>T(e)}),u.map(Fp(I,"right",{activeIndex:h,currentItemPosition:f}))]})})})),Fp=(e,t,n)=>(l,a,i)=>o(yp,{item:l,isActive:i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t,onClick:r=>{i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t||r.stopPropagation(),e(a,t)}},l.title||String(a)),Op="hidden sm:flex absolute z-40",Ep={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},jp=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=Gr({itemCount:t?.length||0});return a((()=>Lp(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(Fr,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Ep[i].item,gap:Ep[i].gap,children:t.map(su(n,l,i))}),s.canScrollLeft?o(ts,{className:u("left-6",Op,Ep[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(ns,{className:u("right-6",Op,Ep[i].buttonTop),onClick:s.scrollRight}):null]})})),Lp=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},$p={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Up=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u($p[t].wrapper,e),children:o(jp,{className:$p[t].component,tabsType:t,...n})}):null,qp=ut((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=Wp(n??{}),p=D(),f=t.every((e=>"link"===e?.type)),x=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(Kp(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[h]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[h])):w;v(-1===e?0:e)}),[b,w,h]);const k=Yp(x[y],y),S=i((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(h,e?.tabName??String(t)):n.delete(h),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:u({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[Up({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Hp(t,x),activeItem:N,tabsType:r,onChange:S}),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])=>R(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Yp)?.filter(Boolean)||[]}),Wp=({__id:e,anchor:t})=>t??e??"tabs",Hp=(e,t)=>t?.length?t:e,Yp=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Kp=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Xp={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Gp=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Xp[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Jp=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}))),Zp={Buttons:({buttons:e})=>Ee(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(Me,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Me,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(Jp,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},Qp=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 eg({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),eg=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in Zp))return null;return o(Zp[n],{...t,...l})},tg=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(Qp,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),ng=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),lg=(e,t)=>e?.length>0?o("div",{className:u("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Me,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,ag=d((({rows:e})=>{return o(Fr,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=u("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.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(Me,{size:"text-xl",font:"font-light",children:l.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${ng(a,t)}px)`},children:a?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Me,{size:"text-xl",children:e.data}):null,e?.cols?lg(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),ig=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(Me,{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(ag,{rows:t.rowsData})})})]},l)}))}))),rg=(e=!1)=>""+(e?"text-white":"text-secondary-text"),sg=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:u("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(Me,{size:"text-xl",font:"font-light",color:rg(t===n),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),og=ut((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],u=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(sg,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(ig,{activeTabIndex:r,items:m}),o(Jp,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Me,{size:"text-h6",children:"Данных нет"}),o(Jp,{onClick:n,isOpen:!0})]})})),cg=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:u("@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(og,{...t,onClick:n})}):null]}))),dg=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[h,p]=l(void 0),g=i((e=>p(e)),[]);return c(cg,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:u("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(Me,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Gp,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(tg,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function mg({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?c("div",{children:[n?o(es,{className:u("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?o(es,{className:u("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const ug=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,mg({...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]})})),hg=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],h=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[f,x]=((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}]})({itemCount:p,visibleItemCount:2}),b=(h||[]).map(((e,t)=>o(dg,{row:e,activeIndex:f,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?o(Ji,{renderFoldableSection:({isUnfolded:e})=>c(ug,{controls:x,children:[y,o(Zi,{isUnfolded:e,children:v})]}),renderFoldButton:us}):o(ug,{controls:x,children:b})})]})})),pg=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:u("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?gg():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Me,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?fg(n):null,a?o(Pe,{richVersion:i,__html:a}):null]})]}))),gg=()=>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"}),fg=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),xg=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(Me,{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(Me,{size:"text-h2",children:n})}):null]}))),bg=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(xg,{prefix:t,unit:n,suffix:l})})})),yg={AdTile:pt,ApplicationForm:Ki,ApplicationLeadForm:Rr,BankAccountFiltration:Rs,BenefitsBlock:As,BonusBenefitsBlock:Os,ButtonsBlock:js,CalculatorBonus:to,CalculatorBusinessDeposit:yo,CalculatorCredit:zo,CalculatorDeposit:Zo,CalculatorRefinancing:rc,CardTransfer:hc,Carousel:Nc,CarouselCard:Cc,CarouselCatalogCard:Ic,CarouselLinks:Rc,CarouselRecommendationCard:Oc,CarouselTariffsCard:Lc,CreditForm:Xc,DepositFiltration:nd,Depository:yd,ErrorBlock:Nd,ExchangeRateTile:Kd,Footer:gm,GrantSupport:fm,Header:wm,Headline:C,HorizontalLayout:Tm,ImgBlock:Im,LinkDocs:Fm,MobileAppTile:Lm,MortgageFiltration:du,OfficesAtmsMap:_h,Placeholder:Fh,ProductBlock:ht,ProductGallery:Oh,RepresentativeOfficeInfo:Eh,RichTextBlock:$h,RollupItem:nm,SafeDepositRental:dp,StepsBlock:bp,StickyBottomMenu:_p,TabsLayout:qp,TariffsTable:hg,TextBlock:pg,UnitBlock:bg,VerticalLayout:Cm},vg=me((()=>{a((()=>{Ct()}),[]);const e=Vt();jt(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");kt({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const Ng="cookie",wg=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=Et();!function(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(Ng)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Ng,"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(jl,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null})),kg=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=kp({onCloseAll:e,onClose:t}),{close:l}=de(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return jt(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:u("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})),Sg=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:wp(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return jt(globalThis.document,"keydown",r),e?o("div",{className:u("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})),Cg="header",Tg="footer",Ig="sticky-footer",Bg={},Pg=d((({className:e,data:t=Bg,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=mt(s,r);vg();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:u("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:R(a?.header,{...m,slotName:Cg})}):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"}}),R(a?.footer,{...m,slotName:Tg})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:R(a?.["sticky-footer"],{...m,slotName:Ig})}):null,o(kg,{}),o(Sg,{}),o(wg,{__html:d?.cookieContent?.__html})]})}));Object.assign(Pg,{childrenTypes:[],slots:()=>[Cg,Tg,Ig]});e.Blocks=yg,e.ContentPage=Pg,e.handlerDecorator=me,e.joinList=bs,e.packageVersion="0.14.605",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=j,e.useRouter=D,Object.defineProperty(e,"__esModule",{value:!0})}));