@redneckz/wildless-cms-uni-blocks 0.14.737 → 0.14.738

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 (1429) hide show
  1. package/bundle/EventBus/defaultEventBus.d.ts +1 -3
  2. package/bundle/bundle.umd.js +591 -589
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationForm/renderAgreementSubmit.d.ts +1 -1
  5. package/bundle/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +1 -1
  6. package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -5
  7. package/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +1 -1
  8. package/bundle/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +10 -0
  9. package/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  10. package/bundle/components/CreditCardForm/renderInputs.d.ts +1 -1
  11. package/bundle/components/CreditCardForm/renderStep.d.ts +1 -1
  12. package/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -3
  13. package/bundle/components/CreditForm/renderInputs.d.ts +1 -1
  14. package/bundle/components/CreditForm/renderStep.d.ts +1 -1
  15. package/bundle/components/CreditForm/useCreditFormAPI.d.ts +1 -3
  16. package/bundle/components/Depository/DepositoryFilter.d.ts +1 -1
  17. package/bundle/components/OfficesAtmsMap/renderFiltrationForm.d.ts +1 -1
  18. package/bundle/hooks/useAspects/handleAspects.d.ts +1 -1
  19. package/bundle/hooks/useForm/FieldOptions.d.ts +7 -0
  20. package/bundle/hooks/useForm/FormOptions.d.ts +13 -0
  21. package/bundle/hooks/useForm/shallowCompare.d.ts +1 -0
  22. package/bundle/hooks/useForm/useForm.d.ts +19 -0
  23. package/bundle/hooks/useForm/useFormValidator.d.ts +6 -0
  24. package/bundle/hooks/useForm/useNormalizedFormState.d.ts +1 -0
  25. package/bundle/services/retail/external/types.d.ts +1 -1
  26. package/bundle/services/retail/inputs.d.ts +67 -68
  27. package/bundle/ui-kit/BaseFiltration/FiltrationForm.d.ts +1 -1
  28. package/bundle/ui-kit/BaseFiltration/useFiltrationForm.d.ts +2 -2
  29. package/bundle/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  30. package/bundle/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  31. package/bundle/ui-kit/FormField/getField.d.ts +1 -1
  32. package/bundle/ui-kit/FormField/getObjectValidator.d.ts +2 -1
  33. package/bundle/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -1
  34. package/bundle/ui-kit/FormField/isRenderField.d.ts +1 -1
  35. package/bundle/ui-kit/FormField/updateOrganizationFields.d.ts +1 -1
  36. package/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  37. package/bundle/validation/objectValidator.d.ts +1 -1
  38. package/dist/EventBus/defaultEventBus.d.ts +1 -3
  39. package/dist/EventBus/defaultEventBus.js +1 -1
  40. package/dist/EventBus/defaultEventBus.js.map +1 -1
  41. package/dist/components/ApplicationForm/ApplicationForm.js +14 -34
  42. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  43. package/dist/components/ApplicationForm/renderAgreementSubmit.d.ts +1 -1
  44. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -7
  45. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  46. package/dist/components/ApplicationLeadForm/GroupedConsents.js +4 -2
  47. package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  48. package/dist/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +1 -1
  49. package/dist/components/ApplicationLeadForm/renderInputs.js +1 -0
  50. package/dist/components/ApplicationLeadForm/renderInputs.js.map +1 -1
  51. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -5
  52. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +5 -16
  53. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  54. package/dist/components/CalculatorBonus/CalculatorBonus.js +1 -1
  55. package/dist/components/CalculatorBonus/CalculatorBonus.js.map +1 -1
  56. package/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +1 -1
  57. package/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
  58. package/dist/components/CalculatorCredit/CalculatorCredit.js +3 -6
  59. package/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  60. package/dist/components/CalculatorDeposit/CalculatorDeposit.js +2 -2
  61. package/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  62. package/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +1 -1
  63. package/dist/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -1
  64. package/dist/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  65. package/dist/components/CardTransfer/CardTransfer.js +1 -1
  66. package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
  67. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +12 -11
  68. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  69. package/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +10 -0
  70. package/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +5 -0
  71. package/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +1 -0
  72. package/dist/components/CreditCardForm/CreditCardForm.js +1 -1
  73. package/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
  74. package/dist/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  75. package/dist/components/CreditCardForm/CreditCardFormStep.js +10 -3
  76. package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  77. package/dist/components/CreditCardForm/renderInputs.d.ts +1 -1
  78. package/dist/components/CreditCardForm/renderInputs.js +2 -1
  79. package/dist/components/CreditCardForm/renderInputs.js.map +1 -1
  80. package/dist/components/CreditCardForm/renderStep.d.ts +1 -1
  81. package/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -3
  82. package/dist/components/CreditCardForm/useCreditCardFormAPI.js +1 -10
  83. package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  84. package/dist/components/CreditForm/CreditForm.js +1 -1
  85. package/dist/components/CreditForm/CreditForm.js.map +1 -1
  86. package/dist/components/CreditForm/CreditFormStep.js +10 -3
  87. package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  88. package/dist/components/CreditForm/renderInputs.d.ts +1 -1
  89. package/dist/components/CreditForm/renderStep.d.ts +1 -1
  90. package/dist/components/CreditForm/useCreditFormAPI.d.ts +1 -3
  91. package/dist/components/CreditForm/useCreditFormAPI.js +1 -10
  92. package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
  93. package/dist/components/Depository/Depository.js +1 -1
  94. package/dist/components/Depository/Depository.js.map +1 -1
  95. package/dist/components/Depository/DepositoryFilter.d.ts +1 -1
  96. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  97. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  98. package/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +1 -1
  99. package/dist/hooks/useAspects/handleAspects.d.ts +1 -1
  100. package/dist/hooks/useAspects/handleAspects.js +1 -1
  101. package/dist/hooks/useAspects/handleAspects.js.map +1 -1
  102. package/dist/hooks/useForm/FieldOptions.d.ts +7 -0
  103. package/dist/{components/CarouselTariffsCard/CarouselTariffsCardAction.js → hooks/useForm/FieldOptions.js} +1 -1
  104. package/dist/hooks/useForm/FieldOptions.js.map +1 -0
  105. package/dist/hooks/useForm/FormOptions.d.ts +13 -0
  106. package/{mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js → dist/hooks/useForm/FormOptions.js} +1 -1
  107. package/dist/hooks/useForm/FormOptions.js.map +1 -0
  108. package/dist/hooks/useForm/shallowCompare.d.ts +1 -0
  109. package/dist/hooks/useForm/shallowCompare.js +5 -0
  110. package/dist/hooks/useForm/shallowCompare.js.map +1 -0
  111. package/dist/hooks/useForm/useForm.d.ts +19 -0
  112. package/dist/hooks/useForm/useForm.js +54 -0
  113. package/dist/hooks/useForm/useForm.js.map +1 -0
  114. package/dist/hooks/useForm/useFormValidator.d.ts +6 -0
  115. package/dist/hooks/useForm/useFormValidator.js +15 -0
  116. package/dist/hooks/useForm/useFormValidator.js.map +1 -0
  117. package/dist/hooks/useForm/useNormalizedFormState.d.ts +1 -0
  118. package/dist/hooks/useForm/useNormalizedFormState.js +26 -0
  119. package/dist/hooks/useForm/useNormalizedFormState.js.map +1 -0
  120. package/dist/services/retail/external/types.d.ts +1 -1
  121. package/dist/services/retail/inputs.d.ts +67 -68
  122. package/dist/services/retail/inputs.js +67 -68
  123. package/dist/services/retail/inputs.js.map +1 -1
  124. package/dist/ui-kit/BaseFiltration/FiltrationForm.d.ts +1 -1
  125. package/dist/ui-kit/BaseFiltration/useFiltrationForm.d.ts +2 -2
  126. package/dist/ui-kit/BaseFiltration/useFiltrationForm.js +3 -3
  127. package/dist/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  128. package/dist/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  129. package/dist/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  130. package/dist/ui-kit/FormField/Fields/AcquiringField.js +1 -3
  131. package/dist/ui-kit/FormField/Fields/AcquiringField.js.map +1 -1
  132. package/dist/ui-kit/FormField/Fields/AddressBranchField.js +1 -3
  133. package/dist/ui-kit/FormField/Fields/AddressBranchField.js.map +1 -1
  134. package/dist/ui-kit/FormField/Fields/AddressFactField.js +1 -3
  135. package/dist/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
  136. package/dist/ui-kit/FormField/Fields/AddressField.js +1 -3
  137. package/dist/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  138. package/dist/ui-kit/FormField/Fields/AddressMatchField.js +1 -3
  139. package/dist/ui-kit/FormField/Fields/AddressMatchField.js.map +1 -1
  140. package/dist/ui-kit/FormField/Fields/AddressRetailField.js +3 -6
  141. package/dist/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  142. package/dist/ui-kit/FormField/Fields/AmountField.js +1 -1
  143. package/dist/ui-kit/FormField/Fields/AmountField.js.map +1 -1
  144. package/dist/ui-kit/FormField/Fields/AnnualRevenueField.js +1 -3
  145. package/dist/ui-kit/FormField/Fields/AnnualRevenueField.js.map +1 -1
  146. package/dist/ui-kit/FormField/Fields/ArmyIdFlgField.js +1 -3
  147. package/dist/ui-kit/FormField/Fields/ArmyIdFlgField.js.map +1 -1
  148. package/dist/ui-kit/FormField/Fields/BankEmployeeCodeField.js +1 -3
  149. package/dist/ui-kit/FormField/Fields/BankEmployeeCodeField.js.map +1 -1
  150. package/dist/ui-kit/FormField/Fields/BankEmpoleeField.js +1 -1
  151. package/dist/ui-kit/FormField/Fields/BankEmpoleeField.js.map +1 -1
  152. package/dist/ui-kit/FormField/Fields/BankruptcyFlgField.js +1 -3
  153. package/dist/ui-kit/FormField/Fields/BankruptcyFlgField.js.map +1 -1
  154. package/dist/ui-kit/FormField/Fields/BeginDateField.js +1 -3
  155. package/dist/ui-kit/FormField/Fields/BeginDateField.js.map +1 -1
  156. package/dist/ui-kit/FormField/Fields/BirthPlaceField.js +1 -3
  157. package/dist/ui-kit/FormField/Fields/BirthPlaceField.js.map +1 -1
  158. package/dist/ui-kit/FormField/Fields/BirthdayField.js +1 -3
  159. package/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  160. package/dist/ui-kit/FormField/Fields/ChildrenField.js +1 -3
  161. package/dist/ui-kit/FormField/Fields/ChildrenField.js.map +1 -1
  162. package/dist/ui-kit/FormField/Fields/CodeWordField.js +1 -3
  163. package/dist/ui-kit/FormField/Fields/CodeWordField.js.map +1 -1
  164. package/dist/ui-kit/FormField/Fields/CollectionCountField.js +1 -3
  165. package/dist/ui-kit/FormField/Fields/CollectionCountField.js.map +1 -1
  166. package/dist/ui-kit/FormField/Fields/CommentField.js +1 -3
  167. package/dist/ui-kit/FormField/Fields/CommentField.js.map +1 -1
  168. package/dist/ui-kit/FormField/Fields/ConsentField.js +1 -3
  169. package/dist/ui-kit/FormField/Fields/ConsentField.js.map +1 -1
  170. package/dist/ui-kit/FormField/Fields/CurrencyField.js +2 -7
  171. package/dist/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  172. package/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js +1 -3
  173. package/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -1
  174. package/dist/ui-kit/FormField/Fields/DependentsField.js +1 -3
  175. package/dist/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
  176. package/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -3
  177. package/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
  178. package/dist/ui-kit/FormField/Fields/DisablePeopleFlgField.js +1 -3
  179. package/dist/ui-kit/FormField/Fields/DisablePeopleFlgField.js.map +1 -1
  180. package/dist/ui-kit/FormField/Fields/DulIssueDateField.js +1 -4
  181. package/dist/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -1
  182. package/dist/ui-kit/FormField/Fields/DulIssuedByField.js +1 -4
  183. package/dist/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -1
  184. package/dist/ui-kit/FormField/Fields/DulNumberField.js +1 -4
  185. package/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  186. package/dist/ui-kit/FormField/Fields/DulSerieField.js +1 -4
  187. package/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  188. package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +1 -4
  189. package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  190. package/dist/ui-kit/FormField/Fields/EmailField.js +1 -4
  191. package/dist/ui-kit/FormField/Fields/EmailField.js.map +1 -1
  192. package/dist/ui-kit/FormField/Fields/ExpensesField.js +1 -3
  193. package/dist/ui-kit/FormField/Fields/ExpensesField.js.map +1 -1
  194. package/dist/ui-kit/FormField/Fields/Experience5YearsField.js +2 -5
  195. package/dist/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
  196. package/dist/ui-kit/FormField/Fields/FamilyMembersField.js +4 -4
  197. package/dist/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  198. package/dist/ui-kit/FormField/Fields/FeedbackMethodField.js +1 -3
  199. package/dist/ui-kit/FormField/Fields/FeedbackMethodField.js.map +1 -1
  200. package/dist/ui-kit/FormField/Fields/FullNameField.js +1 -3
  201. package/dist/ui-kit/FormField/Fields/FullNameField.js.map +1 -1
  202. package/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js +1 -3
  203. package/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
  204. package/dist/ui-kit/FormField/Fields/InnField.js +1 -3
  205. package/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
  206. package/dist/ui-kit/FormField/Fields/IsClientField.js +1 -1
  207. package/dist/ui-kit/FormField/Fields/IsClientField.js.map +1 -1
  208. package/dist/ui-kit/FormField/Fields/JobsNumberField.js +1 -3
  209. package/dist/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
  210. package/dist/ui-kit/FormField/Fields/LastJobExperienceField.js +1 -3
  211. package/dist/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
  212. package/dist/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -3
  213. package/dist/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
  214. package/dist/ui-kit/FormField/Fields/LegalFormField.js +1 -3
  215. package/dist/ui-kit/FormField/Fields/LegalFormField.js.map +1 -1
  216. package/dist/ui-kit/FormField/Fields/LimitedBirthdayField.js +1 -4
  217. package/dist/ui-kit/FormField/Fields/LimitedBirthdayField.js.map +1 -1
  218. package/dist/ui-kit/FormField/Fields/LocalitiesField.js +4 -8
  219. package/dist/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  220. package/dist/ui-kit/FormField/Fields/MandatoryPaymentsField.js +1 -3
  221. package/dist/ui-kit/FormField/Fields/MandatoryPaymentsField.js.map +1 -1
  222. package/dist/ui-kit/FormField/Fields/MethodObtainField.js +1 -3
  223. package/dist/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -1
  224. package/dist/ui-kit/FormField/Fields/MiddleNameField.js +1 -4
  225. package/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  226. package/dist/ui-kit/FormField/Fields/NameField.js +1 -3
  227. package/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  228. package/dist/ui-kit/FormField/Fields/OnlineCheckoutField.js +1 -1
  229. package/dist/ui-kit/FormField/Fields/OnlineCheckoutField.js.map +1 -1
  230. package/dist/ui-kit/FormField/Fields/OrganizationNameField.js +1 -3
  231. package/dist/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  232. package/dist/ui-kit/FormField/Fields/OtherIncomeField.js +1 -3
  233. package/dist/ui-kit/FormField/Fields/OtherIncomeField.js.map +1 -1
  234. package/dist/ui-kit/FormField/Fields/PartInBusinessField.js +2 -5
  235. package/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
  236. package/dist/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js +1 -3
  237. package/dist/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js.map +1 -1
  238. package/dist/ui-kit/FormField/Fields/PartnerCommentsField.js +1 -6
  239. package/dist/ui-kit/FormField/Fields/PartnerCommentsField.js.map +1 -1
  240. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js +13 -13
  241. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  242. package/dist/ui-kit/FormField/Fields/PhoneField.js +1 -3
  243. package/dist/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  244. package/dist/ui-kit/FormField/Fields/ProductField.js +1 -3
  245. package/dist/ui-kit/FormField/Fields/ProductField.js.map +1 -1
  246. package/dist/ui-kit/FormField/Fields/RegionField.js +1 -3
  247. package/dist/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  248. package/dist/ui-kit/FormField/Fields/RegionPremiumField.js +1 -3
  249. package/dist/ui-kit/FormField/Fields/RegionPremiumField.js.map +1 -1
  250. package/dist/ui-kit/FormField/Fields/RegionRetailField.js +1 -3
  251. package/dist/ui-kit/FormField/Fields/RegionRetailField.js.map +1 -1
  252. package/dist/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -3
  253. package/dist/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
  254. package/dist/ui-kit/FormField/Fields/ServiceDirectionField.js +1 -3
  255. package/dist/ui-kit/FormField/Fields/ServiceDirectionField.js.map +1 -1
  256. package/dist/ui-kit/FormField/Fields/SexField.js +1 -3
  257. package/dist/ui-kit/FormField/Fields/SexField.js.map +1 -1
  258. package/dist/ui-kit/FormField/Fields/ShareholderFlgField.js +1 -3
  259. package/dist/ui-kit/FormField/Fields/ShareholderFlgField.js.map +1 -1
  260. package/dist/ui-kit/FormField/Fields/SnilsField.js +1 -3
  261. package/dist/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
  262. package/dist/ui-kit/FormField/Fields/SurnameField.js +1 -3
  263. package/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  264. package/dist/ui-kit/FormField/Fields/TotalIncomeField.js +1 -3
  265. package/dist/ui-kit/FormField/Fields/TotalIncomeField.js.map +1 -1
  266. package/dist/ui-kit/FormField/Fields/UltraPremiumField.js +1 -3
  267. package/dist/ui-kit/FormField/Fields/UltraPremiumField.js.map +1 -1
  268. package/dist/ui-kit/FormField/Fields/VedField.js +7 -8
  269. package/dist/ui-kit/FormField/Fields/VedField.js.map +1 -1
  270. package/dist/ui-kit/FormField/Fields/WagesField.js +1 -3
  271. package/dist/ui-kit/FormField/Fields/WagesField.js.map +1 -1
  272. package/dist/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js +1 -4
  273. package/dist/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js.map +1 -1
  274. package/dist/ui-kit/FormField/SelectField.js +2 -4
  275. package/dist/ui-kit/FormField/SelectField.js.map +1 -1
  276. package/dist/ui-kit/FormField/getField.d.ts +1 -1
  277. package/dist/ui-kit/FormField/getField.js +28 -28
  278. package/dist/ui-kit/FormField/getField.js.map +1 -1
  279. package/dist/ui-kit/FormField/getObjectValidator.d.ts +2 -1
  280. package/dist/ui-kit/FormField/getObjectValidator.js +18 -6
  281. package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  282. package/dist/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -1
  283. package/dist/ui-kit/FormField/isRenderField.d.ts +1 -1
  284. package/dist/ui-kit/FormField/updateOrganizationFields.d.ts +1 -1
  285. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
  286. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  287. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js +1 -1
  288. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js.map +1 -1
  289. package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  290. package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +3 -4
  291. package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  292. package/dist/utils/getRequiredLabel.js +1 -0
  293. package/dist/utils/getRequiredLabel.js.map +1 -1
  294. package/dist/validation/objectValidator.d.ts +1 -1
  295. package/dist/validation/objectValidator.js +1 -1
  296. package/dist/validation/objectValidator.js.map +1 -1
  297. package/lib/EventBus/defaultEventBus.d.ts +1 -3
  298. package/lib/EventBus/defaultEventBus.js +1 -1
  299. package/lib/EventBus/defaultEventBus.js.map +1 -1
  300. package/lib/components/ApplicationForm/ApplicationForm.js +16 -36
  301. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  302. package/lib/components/ApplicationForm/renderAgreementSubmit.d.ts +1 -1
  303. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -7
  304. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  305. package/lib/components/ApplicationLeadForm/GroupedConsents.js +4 -2
  306. package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  307. package/lib/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +1 -1
  308. package/lib/components/ApplicationLeadForm/renderInputs.js +1 -0
  309. package/lib/components/ApplicationLeadForm/renderInputs.js.map +1 -1
  310. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -5
  311. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +5 -16
  312. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  313. package/lib/components/CalculatorBonus/CalculatorBonus.js +1 -1
  314. package/lib/components/CalculatorBonus/CalculatorBonus.js.map +1 -1
  315. package/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +1 -1
  316. package/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
  317. package/lib/components/CalculatorCredit/CalculatorCredit.js +3 -6
  318. package/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  319. package/lib/components/CalculatorDeposit/CalculatorDeposit.js +2 -2
  320. package/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  321. package/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +1 -1
  322. package/lib/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -1
  323. package/lib/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  324. package/lib/components/CardTransfer/CardTransfer.js +1 -1
  325. package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
  326. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +13 -12
  327. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  328. package/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +10 -0
  329. package/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +3 -0
  330. package/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +1 -0
  331. package/lib/components/CreditCardForm/CreditCardForm.js +2 -2
  332. package/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
  333. package/lib/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  334. package/lib/components/CreditCardForm/CreditCardFormStep.js +11 -4
  335. package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  336. package/lib/components/CreditCardForm/renderInputs.d.ts +1 -1
  337. package/lib/components/CreditCardForm/renderInputs.js +2 -1
  338. package/lib/components/CreditCardForm/renderInputs.js.map +1 -1
  339. package/lib/components/CreditCardForm/renderStep.d.ts +1 -1
  340. package/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -3
  341. package/lib/components/CreditCardForm/useCreditCardFormAPI.js +1 -10
  342. package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  343. package/lib/components/CreditForm/CreditForm.js +2 -2
  344. package/lib/components/CreditForm/CreditForm.js.map +1 -1
  345. package/lib/components/CreditForm/CreditFormStep.js +11 -4
  346. package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  347. package/lib/components/CreditForm/renderInputs.d.ts +1 -1
  348. package/lib/components/CreditForm/renderStep.d.ts +1 -1
  349. package/lib/components/CreditForm/useCreditFormAPI.d.ts +1 -3
  350. package/lib/components/CreditForm/useCreditFormAPI.js +1 -10
  351. package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
  352. package/lib/components/Depository/Depository.js +1 -1
  353. package/lib/components/Depository/Depository.js.map +1 -1
  354. package/lib/components/Depository/DepositoryFilter.d.ts +1 -1
  355. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  356. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  357. package/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +1 -1
  358. package/lib/hooks/useAspects/handleAspects.d.ts +1 -1
  359. package/lib/hooks/useAspects/handleAspects.js +1 -1
  360. package/lib/hooks/useAspects/handleAspects.js.map +1 -1
  361. package/lib/hooks/useForm/FieldOptions.d.ts +7 -0
  362. package/lib/hooks/useForm/FieldOptions.js +2 -0
  363. package/lib/hooks/useForm/FieldOptions.js.map +1 -0
  364. package/lib/hooks/useForm/FormOptions.d.ts +13 -0
  365. package/lib/hooks/useForm/FormOptions.js +2 -0
  366. package/lib/hooks/useForm/FormOptions.js.map +1 -0
  367. package/lib/hooks/useForm/shallowCompare.d.ts +1 -0
  368. package/lib/hooks/useForm/shallowCompare.js +2 -0
  369. package/lib/hooks/useForm/shallowCompare.js.map +1 -0
  370. package/lib/hooks/useForm/useForm.d.ts +19 -0
  371. package/lib/hooks/useForm/useForm.js +51 -0
  372. package/lib/hooks/useForm/useForm.js.map +1 -0
  373. package/lib/hooks/useForm/useFormValidator.d.ts +6 -0
  374. package/lib/hooks/useForm/useFormValidator.js +12 -0
  375. package/lib/hooks/useForm/useFormValidator.js.map +1 -0
  376. package/lib/hooks/useForm/useNormalizedFormState.d.ts +1 -0
  377. package/lib/hooks/useForm/useNormalizedFormState.js +23 -0
  378. package/lib/hooks/useForm/useNormalizedFormState.js.map +1 -0
  379. package/lib/services/retail/external/types.d.ts +1 -1
  380. package/lib/services/retail/inputs.d.ts +67 -68
  381. package/lib/services/retail/inputs.js +67 -68
  382. package/lib/services/retail/inputs.js.map +1 -1
  383. package/lib/ui-kit/BaseFiltration/FiltrationForm.d.ts +1 -1
  384. package/lib/ui-kit/BaseFiltration/useFiltrationForm.d.ts +2 -2
  385. package/lib/ui-kit/BaseFiltration/useFiltrationForm.js +3 -3
  386. package/lib/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  387. package/lib/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  388. package/lib/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  389. package/lib/ui-kit/FormField/Fields/AcquiringField.js +1 -3
  390. package/lib/ui-kit/FormField/Fields/AcquiringField.js.map +1 -1
  391. package/lib/ui-kit/FormField/Fields/AddressBranchField.js +1 -3
  392. package/lib/ui-kit/FormField/Fields/AddressBranchField.js.map +1 -1
  393. package/lib/ui-kit/FormField/Fields/AddressFactField.js +1 -3
  394. package/lib/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
  395. package/lib/ui-kit/FormField/Fields/AddressField.js +1 -3
  396. package/lib/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  397. package/lib/ui-kit/FormField/Fields/AddressMatchField.js +1 -3
  398. package/lib/ui-kit/FormField/Fields/AddressMatchField.js.map +1 -1
  399. package/lib/ui-kit/FormField/Fields/AddressRetailField.js +3 -6
  400. package/lib/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  401. package/lib/ui-kit/FormField/Fields/AmountField.js +1 -1
  402. package/lib/ui-kit/FormField/Fields/AmountField.js.map +1 -1
  403. package/lib/ui-kit/FormField/Fields/AnnualRevenueField.js +1 -3
  404. package/lib/ui-kit/FormField/Fields/AnnualRevenueField.js.map +1 -1
  405. package/lib/ui-kit/FormField/Fields/ArmyIdFlgField.js +1 -3
  406. package/lib/ui-kit/FormField/Fields/ArmyIdFlgField.js.map +1 -1
  407. package/lib/ui-kit/FormField/Fields/BankEmployeeCodeField.js +1 -3
  408. package/lib/ui-kit/FormField/Fields/BankEmployeeCodeField.js.map +1 -1
  409. package/lib/ui-kit/FormField/Fields/BankEmpoleeField.js +1 -1
  410. package/lib/ui-kit/FormField/Fields/BankEmpoleeField.js.map +1 -1
  411. package/lib/ui-kit/FormField/Fields/BankruptcyFlgField.js +1 -3
  412. package/lib/ui-kit/FormField/Fields/BankruptcyFlgField.js.map +1 -1
  413. package/lib/ui-kit/FormField/Fields/BeginDateField.js +1 -3
  414. package/lib/ui-kit/FormField/Fields/BeginDateField.js.map +1 -1
  415. package/lib/ui-kit/FormField/Fields/BirthPlaceField.js +1 -3
  416. package/lib/ui-kit/FormField/Fields/BirthPlaceField.js.map +1 -1
  417. package/lib/ui-kit/FormField/Fields/BirthdayField.js +1 -3
  418. package/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  419. package/lib/ui-kit/FormField/Fields/ChildrenField.js +1 -3
  420. package/lib/ui-kit/FormField/Fields/ChildrenField.js.map +1 -1
  421. package/lib/ui-kit/FormField/Fields/CodeWordField.js +1 -3
  422. package/lib/ui-kit/FormField/Fields/CodeWordField.js.map +1 -1
  423. package/lib/ui-kit/FormField/Fields/CollectionCountField.js +1 -3
  424. package/lib/ui-kit/FormField/Fields/CollectionCountField.js.map +1 -1
  425. package/lib/ui-kit/FormField/Fields/CommentField.js +1 -3
  426. package/lib/ui-kit/FormField/Fields/CommentField.js.map +1 -1
  427. package/lib/ui-kit/FormField/Fields/ConsentField.js +1 -3
  428. package/lib/ui-kit/FormField/Fields/ConsentField.js.map +1 -1
  429. package/lib/ui-kit/FormField/Fields/CurrencyField.js +2 -7
  430. package/lib/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  431. package/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js +1 -3
  432. package/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -1
  433. package/lib/ui-kit/FormField/Fields/DependentsField.js +1 -3
  434. package/lib/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
  435. package/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -3
  436. package/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
  437. package/lib/ui-kit/FormField/Fields/DisablePeopleFlgField.js +1 -3
  438. package/lib/ui-kit/FormField/Fields/DisablePeopleFlgField.js.map +1 -1
  439. package/lib/ui-kit/FormField/Fields/DulIssueDateField.js +1 -4
  440. package/lib/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -1
  441. package/lib/ui-kit/FormField/Fields/DulIssuedByField.js +1 -4
  442. package/lib/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -1
  443. package/lib/ui-kit/FormField/Fields/DulNumberField.js +1 -4
  444. package/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  445. package/lib/ui-kit/FormField/Fields/DulSerieField.js +1 -4
  446. package/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  447. package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +1 -4
  448. package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  449. package/lib/ui-kit/FormField/Fields/EmailField.js +1 -4
  450. package/lib/ui-kit/FormField/Fields/EmailField.js.map +1 -1
  451. package/lib/ui-kit/FormField/Fields/ExpensesField.js +1 -3
  452. package/lib/ui-kit/FormField/Fields/ExpensesField.js.map +1 -1
  453. package/lib/ui-kit/FormField/Fields/Experience5YearsField.js +2 -5
  454. package/lib/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
  455. package/lib/ui-kit/FormField/Fields/FamilyMembersField.js +4 -4
  456. package/lib/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  457. package/lib/ui-kit/FormField/Fields/FeedbackMethodField.js +1 -3
  458. package/lib/ui-kit/FormField/Fields/FeedbackMethodField.js.map +1 -1
  459. package/lib/ui-kit/FormField/Fields/FullNameField.js +1 -3
  460. package/lib/ui-kit/FormField/Fields/FullNameField.js.map +1 -1
  461. package/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js +1 -3
  462. package/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
  463. package/lib/ui-kit/FormField/Fields/InnField.js +1 -3
  464. package/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
  465. package/lib/ui-kit/FormField/Fields/IsClientField.js +1 -1
  466. package/lib/ui-kit/FormField/Fields/IsClientField.js.map +1 -1
  467. package/lib/ui-kit/FormField/Fields/JobsNumberField.js +1 -3
  468. package/lib/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
  469. package/lib/ui-kit/FormField/Fields/LastJobExperienceField.js +1 -3
  470. package/lib/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
  471. package/lib/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -3
  472. package/lib/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
  473. package/lib/ui-kit/FormField/Fields/LegalFormField.js +1 -3
  474. package/lib/ui-kit/FormField/Fields/LegalFormField.js.map +1 -1
  475. package/lib/ui-kit/FormField/Fields/LimitedBirthdayField.js +1 -4
  476. package/lib/ui-kit/FormField/Fields/LimitedBirthdayField.js.map +1 -1
  477. package/lib/ui-kit/FormField/Fields/LocalitiesField.js +5 -9
  478. package/lib/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  479. package/lib/ui-kit/FormField/Fields/MandatoryPaymentsField.js +1 -3
  480. package/lib/ui-kit/FormField/Fields/MandatoryPaymentsField.js.map +1 -1
  481. package/lib/ui-kit/FormField/Fields/MethodObtainField.js +1 -3
  482. package/lib/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -1
  483. package/lib/ui-kit/FormField/Fields/MiddleNameField.js +1 -4
  484. package/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  485. package/lib/ui-kit/FormField/Fields/NameField.js +1 -3
  486. package/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  487. package/lib/ui-kit/FormField/Fields/OnlineCheckoutField.js +1 -1
  488. package/lib/ui-kit/FormField/Fields/OnlineCheckoutField.js.map +1 -1
  489. package/lib/ui-kit/FormField/Fields/OrganizationNameField.js +1 -3
  490. package/lib/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  491. package/lib/ui-kit/FormField/Fields/OtherIncomeField.js +1 -3
  492. package/lib/ui-kit/FormField/Fields/OtherIncomeField.js.map +1 -1
  493. package/lib/ui-kit/FormField/Fields/PartInBusinessField.js +2 -5
  494. package/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
  495. package/lib/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js +1 -3
  496. package/lib/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js.map +1 -1
  497. package/lib/ui-kit/FormField/Fields/PartnerCommentsField.js +1 -6
  498. package/lib/ui-kit/FormField/Fields/PartnerCommentsField.js.map +1 -1
  499. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js +14 -14
  500. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  501. package/lib/ui-kit/FormField/Fields/PhoneField.js +1 -3
  502. package/lib/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  503. package/lib/ui-kit/FormField/Fields/ProductField.js +1 -3
  504. package/lib/ui-kit/FormField/Fields/ProductField.js.map +1 -1
  505. package/lib/ui-kit/FormField/Fields/RegionField.js +1 -3
  506. package/lib/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  507. package/lib/ui-kit/FormField/Fields/RegionPremiumField.js +1 -3
  508. package/lib/ui-kit/FormField/Fields/RegionPremiumField.js.map +1 -1
  509. package/lib/ui-kit/FormField/Fields/RegionRetailField.js +1 -3
  510. package/lib/ui-kit/FormField/Fields/RegionRetailField.js.map +1 -1
  511. package/lib/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -3
  512. package/lib/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
  513. package/lib/ui-kit/FormField/Fields/ServiceDirectionField.js +1 -3
  514. package/lib/ui-kit/FormField/Fields/ServiceDirectionField.js.map +1 -1
  515. package/lib/ui-kit/FormField/Fields/SexField.js +1 -3
  516. package/lib/ui-kit/FormField/Fields/SexField.js.map +1 -1
  517. package/lib/ui-kit/FormField/Fields/ShareholderFlgField.js +1 -3
  518. package/lib/ui-kit/FormField/Fields/ShareholderFlgField.js.map +1 -1
  519. package/lib/ui-kit/FormField/Fields/SnilsField.js +1 -3
  520. package/lib/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
  521. package/lib/ui-kit/FormField/Fields/SurnameField.js +1 -3
  522. package/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  523. package/lib/ui-kit/FormField/Fields/TotalIncomeField.js +1 -3
  524. package/lib/ui-kit/FormField/Fields/TotalIncomeField.js.map +1 -1
  525. package/lib/ui-kit/FormField/Fields/UltraPremiumField.js +1 -3
  526. package/lib/ui-kit/FormField/Fields/UltraPremiumField.js.map +1 -1
  527. package/lib/ui-kit/FormField/Fields/VedField.js +8 -9
  528. package/lib/ui-kit/FormField/Fields/VedField.js.map +1 -1
  529. package/lib/ui-kit/FormField/Fields/WagesField.js +1 -3
  530. package/lib/ui-kit/FormField/Fields/WagesField.js.map +1 -1
  531. package/lib/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js +1 -4
  532. package/lib/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js.map +1 -1
  533. package/lib/ui-kit/FormField/SelectField.js +2 -4
  534. package/lib/ui-kit/FormField/SelectField.js.map +1 -1
  535. package/lib/ui-kit/FormField/getField.d.ts +1 -1
  536. package/lib/ui-kit/FormField/getField.js +28 -28
  537. package/lib/ui-kit/FormField/getField.js.map +1 -1
  538. package/lib/ui-kit/FormField/getObjectValidator.d.ts +2 -1
  539. package/lib/ui-kit/FormField/getObjectValidator.js +16 -4
  540. package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  541. package/lib/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -1
  542. package/lib/ui-kit/FormField/isRenderField.d.ts +1 -1
  543. package/lib/ui-kit/FormField/updateOrganizationFields.d.ts +1 -1
  544. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
  545. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  546. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js +1 -1
  547. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js.map +1 -1
  548. package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  549. package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +3 -4
  550. package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  551. package/lib/utils/getRequiredLabel.js +1 -0
  552. package/lib/utils/getRequiredLabel.js.map +1 -1
  553. package/lib/validation/objectValidator.d.ts +1 -1
  554. package/lib/validation/objectValidator.js +1 -1
  555. package/lib/validation/objectValidator.js.map +1 -1
  556. package/mobile/bundle/EventBus/defaultEventBus.d.ts +1 -3
  557. package/mobile/bundle/bundle.umd.js +591 -589
  558. package/mobile/bundle/bundle.umd.min.js +1 -1
  559. package/mobile/bundle/components/ApplicationForm/renderAgreementSubmit.d.ts +1 -1
  560. package/mobile/bundle/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +1 -1
  561. package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -5
  562. package/mobile/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +1 -1
  563. package/mobile/bundle/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +10 -0
  564. package/mobile/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  565. package/mobile/bundle/components/CreditCardForm/renderInputs.d.ts +1 -1
  566. package/mobile/bundle/components/CreditCardForm/renderStep.d.ts +1 -1
  567. package/mobile/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -3
  568. package/mobile/bundle/components/CreditForm/renderInputs.d.ts +1 -1
  569. package/mobile/bundle/components/CreditForm/renderStep.d.ts +1 -1
  570. package/mobile/bundle/components/CreditForm/useCreditFormAPI.d.ts +1 -3
  571. package/mobile/bundle/components/Depository/DepositoryFilter.d.ts +1 -1
  572. package/mobile/bundle/components/OfficesAtmsMap/renderFiltrationForm.d.ts +1 -1
  573. package/mobile/bundle/hooks/useAspects/handleAspects.d.ts +1 -1
  574. package/mobile/bundle/hooks/useForm/FieldOptions.d.ts +7 -0
  575. package/mobile/bundle/hooks/useForm/FormOptions.d.ts +13 -0
  576. package/mobile/bundle/hooks/useForm/shallowCompare.d.ts +1 -0
  577. package/mobile/bundle/hooks/useForm/useForm.d.ts +19 -0
  578. package/mobile/bundle/hooks/useForm/useFormValidator.d.ts +6 -0
  579. package/mobile/bundle/hooks/useForm/useNormalizedFormState.d.ts +1 -0
  580. package/mobile/bundle/services/retail/external/types.d.ts +1 -1
  581. package/mobile/bundle/services/retail/inputs.d.ts +67 -68
  582. package/mobile/bundle/ui-kit/BaseFiltration/FiltrationForm.d.ts +1 -1
  583. package/mobile/bundle/ui-kit/BaseFiltration/useFiltrationForm.d.ts +2 -2
  584. package/mobile/bundle/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  585. package/mobile/bundle/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  586. package/mobile/bundle/ui-kit/FormField/getField.d.ts +1 -1
  587. package/mobile/bundle/ui-kit/FormField/getObjectValidator.d.ts +2 -1
  588. package/mobile/bundle/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -1
  589. package/mobile/bundle/ui-kit/FormField/isRenderField.d.ts +1 -1
  590. package/mobile/bundle/ui-kit/FormField/updateOrganizationFields.d.ts +1 -1
  591. package/mobile/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  592. package/mobile/bundle/validation/objectValidator.d.ts +1 -1
  593. package/mobile/dist/EventBus/defaultEventBus.d.ts +1 -3
  594. package/mobile/dist/EventBus/defaultEventBus.js +1 -1
  595. package/mobile/dist/EventBus/defaultEventBus.js.map +1 -1
  596. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +14 -34
  597. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  598. package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.d.ts +1 -1
  599. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -7
  600. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  601. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +4 -2
  602. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  603. package/mobile/dist/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +1 -1
  604. package/mobile/dist/components/ApplicationLeadForm/renderInputs.js +1 -0
  605. package/mobile/dist/components/ApplicationLeadForm/renderInputs.js.map +1 -1
  606. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -5
  607. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +5 -16
  608. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  609. package/mobile/dist/components/CalculatorBonus/CalculatorBonus.js +1 -1
  610. package/mobile/dist/components/CalculatorBonus/CalculatorBonus.js.map +1 -1
  611. package/mobile/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +1 -1
  612. package/mobile/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
  613. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js +3 -6
  614. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  615. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js +2 -2
  616. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  617. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +1 -1
  618. package/mobile/dist/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -1
  619. package/mobile/dist/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  620. package/mobile/dist/components/CardTransfer/CardTransfer.js +1 -1
  621. package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
  622. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +12 -11
  623. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  624. package/mobile/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +10 -0
  625. package/mobile/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +5 -0
  626. package/mobile/dist/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +1 -0
  627. package/mobile/dist/components/CreditCardForm/CreditCardForm.js +1 -1
  628. package/mobile/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
  629. package/mobile/dist/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  630. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +10 -3
  631. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  632. package/mobile/dist/components/CreditCardForm/renderInputs.d.ts +1 -1
  633. package/mobile/dist/components/CreditCardForm/renderInputs.js +2 -1
  634. package/mobile/dist/components/CreditCardForm/renderInputs.js.map +1 -1
  635. package/mobile/dist/components/CreditCardForm/renderStep.d.ts +1 -1
  636. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -3
  637. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +1 -10
  638. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  639. package/mobile/dist/components/CreditForm/CreditForm.js +1 -1
  640. package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
  641. package/mobile/dist/components/CreditForm/CreditFormStep.js +10 -3
  642. package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  643. package/mobile/dist/components/CreditForm/renderInputs.d.ts +1 -1
  644. package/mobile/dist/components/CreditForm/renderStep.d.ts +1 -1
  645. package/mobile/dist/components/CreditForm/useCreditFormAPI.d.ts +1 -3
  646. package/mobile/dist/components/CreditForm/useCreditFormAPI.js +1 -10
  647. package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
  648. package/mobile/dist/components/Depository/Depository.js +1 -1
  649. package/mobile/dist/components/Depository/Depository.js.map +1 -1
  650. package/mobile/dist/components/Depository/DepositoryFilter.d.ts +1 -1
  651. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  652. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  653. package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +1 -1
  654. package/mobile/dist/hooks/useAspects/handleAspects.d.ts +1 -1
  655. package/mobile/dist/hooks/useAspects/handleAspects.js +1 -1
  656. package/mobile/dist/hooks/useAspects/handleAspects.js.map +1 -1
  657. package/mobile/dist/hooks/useForm/FieldOptions.d.ts +7 -0
  658. package/mobile/dist/hooks/useForm/FieldOptions.js +2 -0
  659. package/mobile/dist/hooks/useForm/FieldOptions.js.map +1 -0
  660. package/mobile/dist/hooks/useForm/FormOptions.d.ts +13 -0
  661. package/mobile/dist/hooks/useForm/FormOptions.js +2 -0
  662. package/mobile/dist/hooks/useForm/FormOptions.js.map +1 -0
  663. package/mobile/dist/hooks/useForm/shallowCompare.d.ts +1 -0
  664. package/mobile/dist/hooks/useForm/shallowCompare.js +5 -0
  665. package/mobile/dist/hooks/useForm/shallowCompare.js.map +1 -0
  666. package/mobile/dist/hooks/useForm/useForm.d.ts +19 -0
  667. package/mobile/dist/hooks/useForm/useForm.js +54 -0
  668. package/mobile/dist/hooks/useForm/useForm.js.map +1 -0
  669. package/mobile/dist/hooks/useForm/useFormValidator.d.ts +6 -0
  670. package/mobile/dist/hooks/useForm/useFormValidator.js +15 -0
  671. package/mobile/dist/hooks/useForm/useFormValidator.js.map +1 -0
  672. package/mobile/dist/hooks/useForm/useNormalizedFormState.d.ts +1 -0
  673. package/mobile/dist/hooks/useForm/useNormalizedFormState.js +26 -0
  674. package/mobile/dist/hooks/useForm/useNormalizedFormState.js.map +1 -0
  675. package/mobile/dist/services/retail/external/types.d.ts +1 -1
  676. package/mobile/dist/services/retail/inputs.d.ts +67 -68
  677. package/mobile/dist/services/retail/inputs.js +67 -68
  678. package/mobile/dist/services/retail/inputs.js.map +1 -1
  679. package/mobile/dist/ui-kit/BaseFiltration/FiltrationForm.d.ts +1 -1
  680. package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.d.ts +2 -2
  681. package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.js +3 -3
  682. package/mobile/dist/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  683. package/mobile/dist/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  684. package/mobile/dist/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  685. package/mobile/dist/ui-kit/FormField/Fields/AcquiringField.js +1 -3
  686. package/mobile/dist/ui-kit/FormField/Fields/AcquiringField.js.map +1 -1
  687. package/mobile/dist/ui-kit/FormField/Fields/AddressBranchField.js +1 -3
  688. package/mobile/dist/ui-kit/FormField/Fields/AddressBranchField.js.map +1 -1
  689. package/mobile/dist/ui-kit/FormField/Fields/AddressFactField.js +1 -3
  690. package/mobile/dist/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
  691. package/mobile/dist/ui-kit/FormField/Fields/AddressField.js +1 -3
  692. package/mobile/dist/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  693. package/mobile/dist/ui-kit/FormField/Fields/AddressMatchField.js +1 -3
  694. package/mobile/dist/ui-kit/FormField/Fields/AddressMatchField.js.map +1 -1
  695. package/mobile/dist/ui-kit/FormField/Fields/AddressRetailField.js +3 -6
  696. package/mobile/dist/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  697. package/mobile/dist/ui-kit/FormField/Fields/AmountField.js +1 -1
  698. package/mobile/dist/ui-kit/FormField/Fields/AmountField.js.map +1 -1
  699. package/mobile/dist/ui-kit/FormField/Fields/AnnualRevenueField.js +1 -3
  700. package/mobile/dist/ui-kit/FormField/Fields/AnnualRevenueField.js.map +1 -1
  701. package/mobile/dist/ui-kit/FormField/Fields/ArmyIdFlgField.js +1 -3
  702. package/mobile/dist/ui-kit/FormField/Fields/ArmyIdFlgField.js.map +1 -1
  703. package/mobile/dist/ui-kit/FormField/Fields/BankEmployeeCodeField.js +1 -3
  704. package/mobile/dist/ui-kit/FormField/Fields/BankEmployeeCodeField.js.map +1 -1
  705. package/mobile/dist/ui-kit/FormField/Fields/BankEmpoleeField.js +1 -1
  706. package/mobile/dist/ui-kit/FormField/Fields/BankEmpoleeField.js.map +1 -1
  707. package/mobile/dist/ui-kit/FormField/Fields/BankruptcyFlgField.js +1 -3
  708. package/mobile/dist/ui-kit/FormField/Fields/BankruptcyFlgField.js.map +1 -1
  709. package/mobile/dist/ui-kit/FormField/Fields/BeginDateField.js +1 -3
  710. package/mobile/dist/ui-kit/FormField/Fields/BeginDateField.js.map +1 -1
  711. package/mobile/dist/ui-kit/FormField/Fields/BirthPlaceField.js +1 -3
  712. package/mobile/dist/ui-kit/FormField/Fields/BirthPlaceField.js.map +1 -1
  713. package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js +1 -3
  714. package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  715. package/mobile/dist/ui-kit/FormField/Fields/ChildrenField.js +1 -3
  716. package/mobile/dist/ui-kit/FormField/Fields/ChildrenField.js.map +1 -1
  717. package/mobile/dist/ui-kit/FormField/Fields/CodeWordField.js +1 -3
  718. package/mobile/dist/ui-kit/FormField/Fields/CodeWordField.js.map +1 -1
  719. package/mobile/dist/ui-kit/FormField/Fields/CollectionCountField.js +1 -3
  720. package/mobile/dist/ui-kit/FormField/Fields/CollectionCountField.js.map +1 -1
  721. package/mobile/dist/ui-kit/FormField/Fields/CommentField.js +1 -3
  722. package/mobile/dist/ui-kit/FormField/Fields/CommentField.js.map +1 -1
  723. package/mobile/dist/ui-kit/FormField/Fields/ConsentField.js +1 -3
  724. package/mobile/dist/ui-kit/FormField/Fields/ConsentField.js.map +1 -1
  725. package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.js +2 -7
  726. package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  727. package/mobile/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js +1 -3
  728. package/mobile/dist/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -1
  729. package/mobile/dist/ui-kit/FormField/Fields/DependentsField.js +1 -3
  730. package/mobile/dist/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
  731. package/mobile/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -3
  732. package/mobile/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
  733. package/mobile/dist/ui-kit/FormField/Fields/DisablePeopleFlgField.js +1 -3
  734. package/mobile/dist/ui-kit/FormField/Fields/DisablePeopleFlgField.js.map +1 -1
  735. package/mobile/dist/ui-kit/FormField/Fields/DulIssueDateField.js +1 -4
  736. package/mobile/dist/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -1
  737. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedByField.js +1 -4
  738. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -1
  739. package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js +1 -4
  740. package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  741. package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js +1 -4
  742. package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  743. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +1 -4
  744. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  745. package/mobile/dist/ui-kit/FormField/Fields/EmailField.js +1 -4
  746. package/mobile/dist/ui-kit/FormField/Fields/EmailField.js.map +1 -1
  747. package/mobile/dist/ui-kit/FormField/Fields/ExpensesField.js +1 -3
  748. package/mobile/dist/ui-kit/FormField/Fields/ExpensesField.js.map +1 -1
  749. package/mobile/dist/ui-kit/FormField/Fields/Experience5YearsField.js +2 -5
  750. package/mobile/dist/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
  751. package/mobile/dist/ui-kit/FormField/Fields/FamilyMembersField.js +4 -4
  752. package/mobile/dist/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  753. package/mobile/dist/ui-kit/FormField/Fields/FeedbackMethodField.js +1 -3
  754. package/mobile/dist/ui-kit/FormField/Fields/FeedbackMethodField.js.map +1 -1
  755. package/mobile/dist/ui-kit/FormField/Fields/FullNameField.js +1 -3
  756. package/mobile/dist/ui-kit/FormField/Fields/FullNameField.js.map +1 -1
  757. package/mobile/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js +1 -3
  758. package/mobile/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
  759. package/mobile/dist/ui-kit/FormField/Fields/InnField.js +1 -3
  760. package/mobile/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
  761. package/mobile/dist/ui-kit/FormField/Fields/IsClientField.js +1 -1
  762. package/mobile/dist/ui-kit/FormField/Fields/IsClientField.js.map +1 -1
  763. package/mobile/dist/ui-kit/FormField/Fields/JobsNumberField.js +1 -3
  764. package/mobile/dist/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
  765. package/mobile/dist/ui-kit/FormField/Fields/LastJobExperienceField.js +1 -3
  766. package/mobile/dist/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
  767. package/mobile/dist/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -3
  768. package/mobile/dist/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
  769. package/mobile/dist/ui-kit/FormField/Fields/LegalFormField.js +1 -3
  770. package/mobile/dist/ui-kit/FormField/Fields/LegalFormField.js.map +1 -1
  771. package/mobile/dist/ui-kit/FormField/Fields/LimitedBirthdayField.js +1 -4
  772. package/mobile/dist/ui-kit/FormField/Fields/LimitedBirthdayField.js.map +1 -1
  773. package/mobile/dist/ui-kit/FormField/Fields/LocalitiesField.js +4 -8
  774. package/mobile/dist/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  775. package/mobile/dist/ui-kit/FormField/Fields/MandatoryPaymentsField.js +1 -3
  776. package/mobile/dist/ui-kit/FormField/Fields/MandatoryPaymentsField.js.map +1 -1
  777. package/mobile/dist/ui-kit/FormField/Fields/MethodObtainField.js +1 -3
  778. package/mobile/dist/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -1
  779. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js +1 -4
  780. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  781. package/mobile/dist/ui-kit/FormField/Fields/NameField.js +1 -3
  782. package/mobile/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  783. package/mobile/dist/ui-kit/FormField/Fields/OnlineCheckoutField.js +1 -1
  784. package/mobile/dist/ui-kit/FormField/Fields/OnlineCheckoutField.js.map +1 -1
  785. package/mobile/dist/ui-kit/FormField/Fields/OrganizationNameField.js +1 -3
  786. package/mobile/dist/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  787. package/mobile/dist/ui-kit/FormField/Fields/OtherIncomeField.js +1 -3
  788. package/mobile/dist/ui-kit/FormField/Fields/OtherIncomeField.js.map +1 -1
  789. package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js +2 -5
  790. package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
  791. package/mobile/dist/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js +1 -3
  792. package/mobile/dist/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js.map +1 -1
  793. package/mobile/dist/ui-kit/FormField/Fields/PartnerCommentsField.js +1 -6
  794. package/mobile/dist/ui-kit/FormField/Fields/PartnerCommentsField.js.map +1 -1
  795. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js +13 -13
  796. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  797. package/mobile/dist/ui-kit/FormField/Fields/PhoneField.js +1 -3
  798. package/mobile/dist/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  799. package/mobile/dist/ui-kit/FormField/Fields/ProductField.js +1 -3
  800. package/mobile/dist/ui-kit/FormField/Fields/ProductField.js.map +1 -1
  801. package/mobile/dist/ui-kit/FormField/Fields/RegionField.js +1 -3
  802. package/mobile/dist/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  803. package/mobile/dist/ui-kit/FormField/Fields/RegionPremiumField.js +1 -3
  804. package/mobile/dist/ui-kit/FormField/Fields/RegionPremiumField.js.map +1 -1
  805. package/mobile/dist/ui-kit/FormField/Fields/RegionRetailField.js +1 -3
  806. package/mobile/dist/ui-kit/FormField/Fields/RegionRetailField.js.map +1 -1
  807. package/mobile/dist/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -3
  808. package/mobile/dist/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
  809. package/mobile/dist/ui-kit/FormField/Fields/ServiceDirectionField.js +1 -3
  810. package/mobile/dist/ui-kit/FormField/Fields/ServiceDirectionField.js.map +1 -1
  811. package/mobile/dist/ui-kit/FormField/Fields/SexField.js +1 -3
  812. package/mobile/dist/ui-kit/FormField/Fields/SexField.js.map +1 -1
  813. package/mobile/dist/ui-kit/FormField/Fields/ShareholderFlgField.js +1 -3
  814. package/mobile/dist/ui-kit/FormField/Fields/ShareholderFlgField.js.map +1 -1
  815. package/mobile/dist/ui-kit/FormField/Fields/SnilsField.js +1 -3
  816. package/mobile/dist/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
  817. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js +1 -3
  818. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  819. package/mobile/dist/ui-kit/FormField/Fields/TotalIncomeField.js +1 -3
  820. package/mobile/dist/ui-kit/FormField/Fields/TotalIncomeField.js.map +1 -1
  821. package/mobile/dist/ui-kit/FormField/Fields/UltraPremiumField.js +1 -3
  822. package/mobile/dist/ui-kit/FormField/Fields/UltraPremiumField.js.map +1 -1
  823. package/mobile/dist/ui-kit/FormField/Fields/VedField.js +7 -8
  824. package/mobile/dist/ui-kit/FormField/Fields/VedField.js.map +1 -1
  825. package/mobile/dist/ui-kit/FormField/Fields/WagesField.js +1 -3
  826. package/mobile/dist/ui-kit/FormField/Fields/WagesField.js.map +1 -1
  827. package/mobile/dist/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js +1 -4
  828. package/mobile/dist/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js.map +1 -1
  829. package/mobile/dist/ui-kit/FormField/SelectField.js +2 -4
  830. package/mobile/dist/ui-kit/FormField/SelectField.js.map +1 -1
  831. package/mobile/dist/ui-kit/FormField/getField.d.ts +1 -1
  832. package/mobile/dist/ui-kit/FormField/getField.js +28 -28
  833. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  834. package/mobile/dist/ui-kit/FormField/getObjectValidator.d.ts +2 -1
  835. package/mobile/dist/ui-kit/FormField/getObjectValidator.js +18 -6
  836. package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  837. package/mobile/dist/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -1
  838. package/mobile/dist/ui-kit/FormField/isRenderField.d.ts +1 -1
  839. package/mobile/dist/ui-kit/FormField/updateOrganizationFields.d.ts +1 -1
  840. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
  841. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  842. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js +1 -1
  843. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js.map +1 -1
  844. package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  845. package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +3 -4
  846. package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  847. package/mobile/dist/utils/getRequiredLabel.js +1 -0
  848. package/mobile/dist/utils/getRequiredLabel.js.map +1 -1
  849. package/mobile/dist/validation/objectValidator.d.ts +1 -1
  850. package/mobile/dist/validation/objectValidator.js +1 -1
  851. package/mobile/dist/validation/objectValidator.js.map +1 -1
  852. package/mobile/lib/EventBus/defaultEventBus.d.ts +1 -3
  853. package/mobile/lib/EventBus/defaultEventBus.js +1 -1
  854. package/mobile/lib/EventBus/defaultEventBus.js.map +1 -1
  855. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +16 -36
  856. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  857. package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.d.ts +1 -1
  858. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -7
  859. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  860. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +4 -2
  861. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  862. package/mobile/lib/components/ApplicationLeadForm/renderAgreementSubmit.d.ts +1 -1
  863. package/mobile/lib/components/ApplicationLeadForm/renderInputs.js +1 -0
  864. package/mobile/lib/components/ApplicationLeadForm/renderInputs.js.map +1 -1
  865. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -5
  866. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +5 -16
  867. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  868. package/mobile/lib/components/CalculatorBonus/CalculatorBonus.js +1 -1
  869. package/mobile/lib/components/CalculatorBonus/CalculatorBonus.js.map +1 -1
  870. package/mobile/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +1 -1
  871. package/mobile/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
  872. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js +3 -6
  873. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  874. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js +2 -2
  875. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  876. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +1 -1
  877. package/mobile/lib/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -1
  878. package/mobile/lib/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
  879. package/mobile/lib/components/CardTransfer/CardTransfer.js +1 -1
  880. package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
  881. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +13 -12
  882. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  883. package/mobile/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.d.ts +10 -0
  884. package/mobile/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js +3 -0
  885. package/mobile/lib/components/CarouselTariffsCard/carouselTariffsCardEventBus.js.map +1 -0
  886. package/mobile/lib/components/CreditCardForm/CreditCardForm.js +2 -2
  887. package/mobile/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
  888. package/mobile/lib/components/CreditCardForm/CreditCardFormContent.d.ts +1 -1
  889. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +11 -4
  890. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  891. package/mobile/lib/components/CreditCardForm/renderInputs.d.ts +1 -1
  892. package/mobile/lib/components/CreditCardForm/renderInputs.js +2 -1
  893. package/mobile/lib/components/CreditCardForm/renderInputs.js.map +1 -1
  894. package/mobile/lib/components/CreditCardForm/renderStep.d.ts +1 -1
  895. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -3
  896. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +1 -10
  897. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  898. package/mobile/lib/components/CreditForm/CreditForm.js +2 -2
  899. package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
  900. package/mobile/lib/components/CreditForm/CreditFormStep.js +11 -4
  901. package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  902. package/mobile/lib/components/CreditForm/renderInputs.d.ts +1 -1
  903. package/mobile/lib/components/CreditForm/renderStep.d.ts +1 -1
  904. package/mobile/lib/components/CreditForm/useCreditFormAPI.d.ts +1 -3
  905. package/mobile/lib/components/CreditForm/useCreditFormAPI.js +1 -10
  906. package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
  907. package/mobile/lib/components/Depository/Depository.js +1 -1
  908. package/mobile/lib/components/Depository/Depository.js.map +1 -1
  909. package/mobile/lib/components/Depository/DepositoryFilter.d.ts +1 -1
  910. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  911. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  912. package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +1 -1
  913. package/mobile/lib/hooks/useAspects/handleAspects.d.ts +1 -1
  914. package/mobile/lib/hooks/useAspects/handleAspects.js +1 -1
  915. package/mobile/lib/hooks/useAspects/handleAspects.js.map +1 -1
  916. package/mobile/lib/hooks/useForm/FieldOptions.d.ts +7 -0
  917. package/mobile/lib/hooks/useForm/FieldOptions.js +2 -0
  918. package/mobile/lib/hooks/useForm/FieldOptions.js.map +1 -0
  919. package/mobile/lib/hooks/useForm/FormOptions.d.ts +13 -0
  920. package/mobile/lib/hooks/useForm/FormOptions.js +2 -0
  921. package/mobile/lib/hooks/useForm/FormOptions.js.map +1 -0
  922. package/mobile/lib/hooks/useForm/shallowCompare.d.ts +1 -0
  923. package/mobile/lib/hooks/useForm/shallowCompare.js +2 -0
  924. package/mobile/lib/hooks/useForm/shallowCompare.js.map +1 -0
  925. package/mobile/lib/hooks/useForm/useForm.d.ts +19 -0
  926. package/mobile/lib/hooks/useForm/useForm.js +51 -0
  927. package/mobile/lib/hooks/useForm/useForm.js.map +1 -0
  928. package/mobile/lib/hooks/useForm/useFormValidator.d.ts +6 -0
  929. package/mobile/lib/hooks/useForm/useFormValidator.js +12 -0
  930. package/mobile/lib/hooks/useForm/useFormValidator.js.map +1 -0
  931. package/mobile/lib/hooks/useForm/useNormalizedFormState.d.ts +1 -0
  932. package/mobile/lib/hooks/useForm/useNormalizedFormState.js +23 -0
  933. package/mobile/lib/hooks/useForm/useNormalizedFormState.js.map +1 -0
  934. package/mobile/lib/services/retail/external/types.d.ts +1 -1
  935. package/mobile/lib/services/retail/inputs.d.ts +67 -68
  936. package/mobile/lib/services/retail/inputs.js +67 -68
  937. package/mobile/lib/services/retail/inputs.js.map +1 -1
  938. package/mobile/lib/ui-kit/BaseFiltration/FiltrationForm.d.ts +1 -1
  939. package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.d.ts +2 -2
  940. package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.js +3 -3
  941. package/mobile/lib/ui-kit/BaseFiltration/useFiltrationForm.js.map +1 -1
  942. package/mobile/lib/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
  943. package/mobile/lib/ui-kit/FormField/CustomFieldProps.d.ts +1 -1
  944. package/mobile/lib/ui-kit/FormField/Fields/AcquiringField.js +1 -3
  945. package/mobile/lib/ui-kit/FormField/Fields/AcquiringField.js.map +1 -1
  946. package/mobile/lib/ui-kit/FormField/Fields/AddressBranchField.js +1 -3
  947. package/mobile/lib/ui-kit/FormField/Fields/AddressBranchField.js.map +1 -1
  948. package/mobile/lib/ui-kit/FormField/Fields/AddressFactField.js +1 -3
  949. package/mobile/lib/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
  950. package/mobile/lib/ui-kit/FormField/Fields/AddressField.js +1 -3
  951. package/mobile/lib/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  952. package/mobile/lib/ui-kit/FormField/Fields/AddressMatchField.js +1 -3
  953. package/mobile/lib/ui-kit/FormField/Fields/AddressMatchField.js.map +1 -1
  954. package/mobile/lib/ui-kit/FormField/Fields/AddressRetailField.js +3 -6
  955. package/mobile/lib/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
  956. package/mobile/lib/ui-kit/FormField/Fields/AmountField.js +1 -1
  957. package/mobile/lib/ui-kit/FormField/Fields/AmountField.js.map +1 -1
  958. package/mobile/lib/ui-kit/FormField/Fields/AnnualRevenueField.js +1 -3
  959. package/mobile/lib/ui-kit/FormField/Fields/AnnualRevenueField.js.map +1 -1
  960. package/mobile/lib/ui-kit/FormField/Fields/ArmyIdFlgField.js +1 -3
  961. package/mobile/lib/ui-kit/FormField/Fields/ArmyIdFlgField.js.map +1 -1
  962. package/mobile/lib/ui-kit/FormField/Fields/BankEmployeeCodeField.js +1 -3
  963. package/mobile/lib/ui-kit/FormField/Fields/BankEmployeeCodeField.js.map +1 -1
  964. package/mobile/lib/ui-kit/FormField/Fields/BankEmpoleeField.js +1 -1
  965. package/mobile/lib/ui-kit/FormField/Fields/BankEmpoleeField.js.map +1 -1
  966. package/mobile/lib/ui-kit/FormField/Fields/BankruptcyFlgField.js +1 -3
  967. package/mobile/lib/ui-kit/FormField/Fields/BankruptcyFlgField.js.map +1 -1
  968. package/mobile/lib/ui-kit/FormField/Fields/BeginDateField.js +1 -3
  969. package/mobile/lib/ui-kit/FormField/Fields/BeginDateField.js.map +1 -1
  970. package/mobile/lib/ui-kit/FormField/Fields/BirthPlaceField.js +1 -3
  971. package/mobile/lib/ui-kit/FormField/Fields/BirthPlaceField.js.map +1 -1
  972. package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js +1 -3
  973. package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  974. package/mobile/lib/ui-kit/FormField/Fields/ChildrenField.js +1 -3
  975. package/mobile/lib/ui-kit/FormField/Fields/ChildrenField.js.map +1 -1
  976. package/mobile/lib/ui-kit/FormField/Fields/CodeWordField.js +1 -3
  977. package/mobile/lib/ui-kit/FormField/Fields/CodeWordField.js.map +1 -1
  978. package/mobile/lib/ui-kit/FormField/Fields/CollectionCountField.js +1 -3
  979. package/mobile/lib/ui-kit/FormField/Fields/CollectionCountField.js.map +1 -1
  980. package/mobile/lib/ui-kit/FormField/Fields/CommentField.js +1 -3
  981. package/mobile/lib/ui-kit/FormField/Fields/CommentField.js.map +1 -1
  982. package/mobile/lib/ui-kit/FormField/Fields/ConsentField.js +1 -3
  983. package/mobile/lib/ui-kit/FormField/Fields/ConsentField.js.map +1 -1
  984. package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.js +2 -7
  985. package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.js.map +1 -1
  986. package/mobile/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js +1 -3
  987. package/mobile/lib/ui-kit/FormField/Fields/DeliveryDateFiels.js.map +1 -1
  988. package/mobile/lib/ui-kit/FormField/Fields/DependentsField.js +1 -3
  989. package/mobile/lib/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
  990. package/mobile/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -3
  991. package/mobile/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
  992. package/mobile/lib/ui-kit/FormField/Fields/DisablePeopleFlgField.js +1 -3
  993. package/mobile/lib/ui-kit/FormField/Fields/DisablePeopleFlgField.js.map +1 -1
  994. package/mobile/lib/ui-kit/FormField/Fields/DulIssueDateField.js +1 -4
  995. package/mobile/lib/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -1
  996. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedByField.js +1 -4
  997. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -1
  998. package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js +1 -4
  999. package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  1000. package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js +1 -4
  1001. package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  1002. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +1 -4
  1003. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  1004. package/mobile/lib/ui-kit/FormField/Fields/EmailField.js +1 -4
  1005. package/mobile/lib/ui-kit/FormField/Fields/EmailField.js.map +1 -1
  1006. package/mobile/lib/ui-kit/FormField/Fields/ExpensesField.js +1 -3
  1007. package/mobile/lib/ui-kit/FormField/Fields/ExpensesField.js.map +1 -1
  1008. package/mobile/lib/ui-kit/FormField/Fields/Experience5YearsField.js +2 -5
  1009. package/mobile/lib/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
  1010. package/mobile/lib/ui-kit/FormField/Fields/FamilyMembersField.js +4 -4
  1011. package/mobile/lib/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  1012. package/mobile/lib/ui-kit/FormField/Fields/FeedbackMethodField.js +1 -3
  1013. package/mobile/lib/ui-kit/FormField/Fields/FeedbackMethodField.js.map +1 -1
  1014. package/mobile/lib/ui-kit/FormField/Fields/FullNameField.js +1 -3
  1015. package/mobile/lib/ui-kit/FormField/Fields/FullNameField.js.map +1 -1
  1016. package/mobile/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js +1 -3
  1017. package/mobile/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
  1018. package/mobile/lib/ui-kit/FormField/Fields/InnField.js +1 -3
  1019. package/mobile/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
  1020. package/mobile/lib/ui-kit/FormField/Fields/IsClientField.js +1 -1
  1021. package/mobile/lib/ui-kit/FormField/Fields/IsClientField.js.map +1 -1
  1022. package/mobile/lib/ui-kit/FormField/Fields/JobsNumberField.js +1 -3
  1023. package/mobile/lib/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
  1024. package/mobile/lib/ui-kit/FormField/Fields/LastJobExperienceField.js +1 -3
  1025. package/mobile/lib/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
  1026. package/mobile/lib/ui-kit/FormField/Fields/LegalEntityNameField.js +1 -3
  1027. package/mobile/lib/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -1
  1028. package/mobile/lib/ui-kit/FormField/Fields/LegalFormField.js +1 -3
  1029. package/mobile/lib/ui-kit/FormField/Fields/LegalFormField.js.map +1 -1
  1030. package/mobile/lib/ui-kit/FormField/Fields/LimitedBirthdayField.js +1 -4
  1031. package/mobile/lib/ui-kit/FormField/Fields/LimitedBirthdayField.js.map +1 -1
  1032. package/mobile/lib/ui-kit/FormField/Fields/LocalitiesField.js +5 -9
  1033. package/mobile/lib/ui-kit/FormField/Fields/LocalitiesField.js.map +1 -1
  1034. package/mobile/lib/ui-kit/FormField/Fields/MandatoryPaymentsField.js +1 -3
  1035. package/mobile/lib/ui-kit/FormField/Fields/MandatoryPaymentsField.js.map +1 -1
  1036. package/mobile/lib/ui-kit/FormField/Fields/MethodObtainField.js +1 -3
  1037. package/mobile/lib/ui-kit/FormField/Fields/MethodObtainField.js.map +1 -1
  1038. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js +1 -4
  1039. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  1040. package/mobile/lib/ui-kit/FormField/Fields/NameField.js +1 -3
  1041. package/mobile/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  1042. package/mobile/lib/ui-kit/FormField/Fields/OnlineCheckoutField.js +1 -1
  1043. package/mobile/lib/ui-kit/FormField/Fields/OnlineCheckoutField.js.map +1 -1
  1044. package/mobile/lib/ui-kit/FormField/Fields/OrganizationNameField.js +1 -3
  1045. package/mobile/lib/ui-kit/FormField/Fields/OrganizationNameField.js.map +1 -1
  1046. package/mobile/lib/ui-kit/FormField/Fields/OtherIncomeField.js +1 -3
  1047. package/mobile/lib/ui-kit/FormField/Fields/OtherIncomeField.js.map +1 -1
  1048. package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js +2 -5
  1049. package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
  1050. package/mobile/lib/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js +1 -3
  1051. package/mobile/lib/ui-kit/FormField/Fields/ParticipantDateRegistrationField.js.map +1 -1
  1052. package/mobile/lib/ui-kit/FormField/Fields/PartnerCommentsField.js +1 -6
  1053. package/mobile/lib/ui-kit/FormField/Fields/PartnerCommentsField.js.map +1 -1
  1054. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js +14 -14
  1055. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  1056. package/mobile/lib/ui-kit/FormField/Fields/PhoneField.js +1 -3
  1057. package/mobile/lib/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  1058. package/mobile/lib/ui-kit/FormField/Fields/ProductField.js +1 -3
  1059. package/mobile/lib/ui-kit/FormField/Fields/ProductField.js.map +1 -1
  1060. package/mobile/lib/ui-kit/FormField/Fields/RegionField.js +1 -3
  1061. package/mobile/lib/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  1062. package/mobile/lib/ui-kit/FormField/Fields/RegionPremiumField.js +1 -3
  1063. package/mobile/lib/ui-kit/FormField/Fields/RegionPremiumField.js.map +1 -1
  1064. package/mobile/lib/ui-kit/FormField/Fields/RegionRetailField.js +1 -3
  1065. package/mobile/lib/ui-kit/FormField/Fields/RegionRetailField.js.map +1 -1
  1066. package/mobile/lib/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -3
  1067. package/mobile/lib/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
  1068. package/mobile/lib/ui-kit/FormField/Fields/ServiceDirectionField.js +1 -3
  1069. package/mobile/lib/ui-kit/FormField/Fields/ServiceDirectionField.js.map +1 -1
  1070. package/mobile/lib/ui-kit/FormField/Fields/SexField.js +1 -3
  1071. package/mobile/lib/ui-kit/FormField/Fields/SexField.js.map +1 -1
  1072. package/mobile/lib/ui-kit/FormField/Fields/ShareholderFlgField.js +1 -3
  1073. package/mobile/lib/ui-kit/FormField/Fields/ShareholderFlgField.js.map +1 -1
  1074. package/mobile/lib/ui-kit/FormField/Fields/SnilsField.js +1 -3
  1075. package/mobile/lib/ui-kit/FormField/Fields/SnilsField.js.map +1 -1
  1076. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js +1 -3
  1077. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  1078. package/mobile/lib/ui-kit/FormField/Fields/TotalIncomeField.js +1 -3
  1079. package/mobile/lib/ui-kit/FormField/Fields/TotalIncomeField.js.map +1 -1
  1080. package/mobile/lib/ui-kit/FormField/Fields/UltraPremiumField.js +1 -3
  1081. package/mobile/lib/ui-kit/FormField/Fields/UltraPremiumField.js.map +1 -1
  1082. package/mobile/lib/ui-kit/FormField/Fields/VedField.js +8 -9
  1083. package/mobile/lib/ui-kit/FormField/Fields/VedField.js.map +1 -1
  1084. package/mobile/lib/ui-kit/FormField/Fields/WagesField.js +1 -3
  1085. package/mobile/lib/ui-kit/FormField/Fields/WagesField.js.map +1 -1
  1086. package/mobile/lib/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js +1 -4
  1087. package/mobile/lib/ui-kit/FormField/Fields/consentToReceiveMaterialsField.js.map +1 -1
  1088. package/mobile/lib/ui-kit/FormField/SelectField.js +2 -4
  1089. package/mobile/lib/ui-kit/FormField/SelectField.js.map +1 -1
  1090. package/mobile/lib/ui-kit/FormField/getField.d.ts +1 -1
  1091. package/mobile/lib/ui-kit/FormField/getField.js +28 -28
  1092. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  1093. package/mobile/lib/ui-kit/FormField/getObjectValidator.d.ts +2 -1
  1094. package/mobile/lib/ui-kit/FormField/getObjectValidator.js +16 -4
  1095. package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  1096. package/mobile/lib/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -1
  1097. package/mobile/lib/ui-kit/FormField/isRenderField.d.ts +1 -1
  1098. package/mobile/lib/ui-kit/FormField/updateOrganizationFields.d.ts +1 -1
  1099. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +1 -1
  1100. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  1101. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js +1 -1
  1102. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroupControl.js.map +1 -1
  1103. package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  1104. package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +3 -4
  1105. package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
  1106. package/mobile/lib/utils/getRequiredLabel.js +1 -0
  1107. package/mobile/lib/utils/getRequiredLabel.js.map +1 -1
  1108. package/mobile/lib/validation/objectValidator.d.ts +1 -1
  1109. package/mobile/lib/validation/objectValidator.js +1 -1
  1110. package/mobile/lib/validation/objectValidator.js.map +1 -1
  1111. package/mobile/src/EventBus/defaultEventBus.ts +1 -3
  1112. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +22 -42
  1113. package/mobile/src/components/ApplicationForm/renderAgreementSubmit.tsx +1 -1
  1114. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +12 -7
  1115. package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +5 -2
  1116. package/mobile/src/components/ApplicationLeadForm/renderAgreementSubmit.tsx +1 -1
  1117. package/mobile/src/components/ApplicationLeadForm/renderInputs.tsx +1 -0
  1118. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +5 -23
  1119. package/mobile/src/components/CalculatorBonus/CalculatorBonus.tsx +1 -1
  1120. package/mobile/src/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.tsx +1 -1
  1121. package/mobile/src/components/CalculatorCredit/CalculatorCredit.tsx +13 -14
  1122. package/mobile/src/components/CalculatorDeposit/CalculatorDeposit.tsx +2 -2
  1123. package/mobile/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +1 -1
  1124. package/mobile/src/components/CalculatorRefinancing/CalculatorRefinancing.tsx +1 -1
  1125. package/mobile/src/components/CardTransfer/CardTransfer.tsx +1 -1
  1126. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +37 -34
  1127. package/mobile/src/components/CarouselTariffsCard/carouselTariffsCardEventBus.ts +12 -0
  1128. package/mobile/src/components/CreditCardForm/CreditCardForm.tsx +2 -2
  1129. package/mobile/src/components/CreditCardForm/CreditCardFormContent.ts +1 -1
  1130. package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +16 -4
  1131. package/mobile/src/components/CreditCardForm/renderInputs.tsx +4 -2
  1132. package/mobile/src/components/CreditCardForm/renderStep.tsx +1 -1
  1133. package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +0 -20
  1134. package/mobile/src/components/CreditForm/CreditForm.tsx +3 -3
  1135. package/mobile/src/components/CreditForm/CreditFormStep.tsx +16 -4
  1136. package/mobile/src/components/CreditForm/renderInputs.tsx +1 -1
  1137. package/mobile/src/components/CreditForm/renderStep.tsx +1 -1
  1138. package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +0 -20
  1139. package/mobile/src/components/Depository/Depository.tsx +1 -1
  1140. package/mobile/src/components/Depository/DepositoryFilter.tsx +1 -1
  1141. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +1 -1
  1142. package/mobile/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +1 -1
  1143. package/mobile/src/hooks/useAspects/handleAspects.ts +2 -2
  1144. package/mobile/src/hooks/useForm/FieldOptions.ts +8 -0
  1145. package/mobile/src/hooks/useForm/FormOptions.ts +18 -0
  1146. package/mobile/src/hooks/useForm/shallowCompare.ts +2 -0
  1147. package/mobile/src/hooks/useForm/useForm.ts +98 -0
  1148. package/mobile/src/hooks/useForm/useFormValidator.ts +24 -0
  1149. package/mobile/src/hooks/useForm/useNormalizedFormState.ts +37 -0
  1150. package/mobile/src/services/retail/external/types.ts +1 -1
  1151. package/mobile/src/services/retail/inputs.tsx +67 -70
  1152. package/mobile/src/ui-kit/BaseFiltration/FiltrationForm.tsx +1 -1
  1153. package/mobile/src/ui-kit/BaseFiltration/useFiltrationForm.ts +4 -4
  1154. package/mobile/src/ui-kit/Calculator/setDefaultParamsCalc.tsx +1 -1
  1155. package/mobile/src/ui-kit/FormField/CustomFieldProps.ts +1 -1
  1156. package/mobile/src/ui-kit/FormField/Fields/AcquiringField.tsx +1 -3
  1157. package/mobile/src/ui-kit/FormField/Fields/AddressBranchField.tsx +1 -3
  1158. package/mobile/src/ui-kit/FormField/Fields/AddressFactField.tsx +1 -3
  1159. package/mobile/src/ui-kit/FormField/Fields/AddressField.tsx +1 -3
  1160. package/mobile/src/ui-kit/FormField/Fields/AddressMatchField.tsx +1 -3
  1161. package/mobile/src/ui-kit/FormField/Fields/AddressRetailField.tsx +4 -12
  1162. package/mobile/src/ui-kit/FormField/Fields/AmountField.tsx +2 -2
  1163. package/mobile/src/ui-kit/FormField/Fields/AnnualRevenueField.tsx +1 -6
  1164. package/mobile/src/ui-kit/FormField/Fields/ArmyIdFlgField.tsx +1 -6
  1165. package/mobile/src/ui-kit/FormField/Fields/BankEmployeeCodeField.tsx +1 -3
  1166. package/mobile/src/ui-kit/FormField/Fields/BankEmpoleeField.tsx +2 -2
  1167. package/mobile/src/ui-kit/FormField/Fields/BankruptcyFlgField.tsx +1 -3
  1168. package/mobile/src/ui-kit/FormField/Fields/BeginDateField.tsx +1 -3
  1169. package/mobile/src/ui-kit/FormField/Fields/BirthPlaceField.tsx +1 -3
  1170. package/mobile/src/ui-kit/FormField/Fields/BirthdayField.tsx +1 -6
  1171. package/mobile/src/ui-kit/FormField/Fields/ChildrenField.tsx +1 -3
  1172. package/mobile/src/ui-kit/FormField/Fields/CodeWordField.tsx +1 -7
  1173. package/mobile/src/ui-kit/FormField/Fields/CollectionCountField.tsx +1 -3
  1174. package/mobile/src/ui-kit/FormField/Fields/CommentField.tsx +1 -3
  1175. package/mobile/src/ui-kit/FormField/Fields/ConsentField.tsx +1 -3
  1176. package/mobile/src/ui-kit/FormField/Fields/CurrencyField.tsx +9 -17
  1177. package/mobile/src/ui-kit/FormField/Fields/DeliveryDateFiels.tsx +1 -6
  1178. package/mobile/src/ui-kit/FormField/Fields/DependentsField.tsx +1 -3
  1179. package/mobile/src/ui-kit/FormField/Fields/DesiredMeetingDateField.tsx +1 -10
  1180. package/mobile/src/ui-kit/FormField/Fields/DisablePeopleFlgField.tsx +1 -6
  1181. package/mobile/src/ui-kit/FormField/Fields/DulIssueDateField.tsx +2 -6
  1182. package/mobile/src/ui-kit/FormField/Fields/DulIssuedByField.tsx +2 -6
  1183. package/mobile/src/ui-kit/FormField/Fields/DulNumberField.tsx +2 -6
  1184. package/mobile/src/ui-kit/FormField/Fields/DulSerieField.tsx +2 -6
  1185. package/mobile/src/ui-kit/FormField/Fields/DulSubdivisionCodeField.tsx +2 -6
  1186. package/mobile/src/ui-kit/FormField/Fields/EmailField.tsx +1 -12
  1187. package/mobile/src/ui-kit/FormField/Fields/ExpensesField.tsx +1 -3
  1188. package/mobile/src/ui-kit/FormField/Fields/Experience5YearsField.tsx +2 -5
  1189. package/mobile/src/ui-kit/FormField/Fields/FamilyMembersField.tsx +4 -4
  1190. package/mobile/src/ui-kit/FormField/Fields/FeedbackMethodField.tsx +1 -3
  1191. package/mobile/src/ui-kit/FormField/Fields/FullNameField.tsx +1 -7
  1192. package/mobile/src/ui-kit/FormField/Fields/GeneralSeniorityField.tsx +1 -3
  1193. package/mobile/src/ui-kit/FormField/Fields/InnField.tsx +1 -3
  1194. package/mobile/src/ui-kit/FormField/Fields/IsClientField.tsx +5 -2
  1195. package/mobile/src/ui-kit/FormField/Fields/JobsNumberField.tsx +1 -3
  1196. package/mobile/src/ui-kit/FormField/Fields/LastJobExperienceField.tsx +1 -3
  1197. package/mobile/src/ui-kit/FormField/Fields/LegalEntityNameField.tsx +1 -3
  1198. package/mobile/src/ui-kit/FormField/Fields/LegalFormField.tsx +1 -3
  1199. package/mobile/src/ui-kit/FormField/Fields/LimitedBirthdayField.tsx +2 -6
  1200. package/mobile/src/ui-kit/FormField/Fields/LocalitiesField.tsx +8 -9
  1201. package/mobile/src/ui-kit/FormField/Fields/MandatoryPaymentsField.tsx +1 -3
  1202. package/mobile/src/ui-kit/FormField/Fields/MethodObtainField.tsx +1 -3
  1203. package/mobile/src/ui-kit/FormField/Fields/MiddleNameField.tsx +2 -6
  1204. package/mobile/src/ui-kit/FormField/Fields/NameField.tsx +1 -3
  1205. package/mobile/src/ui-kit/FormField/Fields/OnlineCheckoutField.tsx +2 -2
  1206. package/mobile/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +1 -3
  1207. package/mobile/src/ui-kit/FormField/Fields/OtherIncomeField.tsx +1 -3
  1208. package/mobile/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +2 -5
  1209. package/mobile/src/ui-kit/FormField/Fields/ParticipantDateRegistrationField.tsx +1 -10
  1210. package/mobile/src/ui-kit/FormField/Fields/PartnerCommentsField.tsx +8 -15
  1211. package/mobile/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +18 -22
  1212. package/mobile/src/ui-kit/FormField/Fields/PhoneField.tsx +1 -3
  1213. package/mobile/src/ui-kit/FormField/Fields/ProductField.tsx +2 -4
  1214. package/mobile/src/ui-kit/FormField/Fields/RegionField.tsx +1 -4
  1215. package/mobile/src/ui-kit/FormField/Fields/RegionPremiumField.tsx +1 -3
  1216. package/mobile/src/ui-kit/FormField/Fields/RegionRetailField.tsx +1 -3
  1217. package/mobile/src/ui-kit/FormField/Fields/RetirementIncomeField.tsx +1 -3
  1218. package/mobile/src/ui-kit/FormField/Fields/ServiceDirectionField.tsx +1 -3
  1219. package/mobile/src/ui-kit/FormField/Fields/SexField.tsx +1 -3
  1220. package/mobile/src/ui-kit/FormField/Fields/ShareholderFlgField.tsx +1 -3
  1221. package/mobile/src/ui-kit/FormField/Fields/SnilsField.tsx +1 -8
  1222. package/mobile/src/ui-kit/FormField/Fields/SurnameField.tsx +1 -3
  1223. package/mobile/src/ui-kit/FormField/Fields/TotalIncomeField.tsx +1 -3
  1224. package/mobile/src/ui-kit/FormField/Fields/UltraPremiumField.tsx +1 -7
  1225. package/mobile/src/ui-kit/FormField/Fields/VedField.tsx +8 -10
  1226. package/mobile/src/ui-kit/FormField/Fields/WagesField.tsx +1 -3
  1227. package/mobile/src/ui-kit/FormField/Fields/consentToReceiveMaterialsField.tsx +1 -5
  1228. package/mobile/src/ui-kit/FormField/SelectField.tsx +1 -4
  1229. package/mobile/src/ui-kit/FormField/getField.tsx +29 -31
  1230. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +30 -5
  1231. package/mobile/src/ui-kit/FormField/isEsiaAuthorize.ts +1 -1
  1232. package/mobile/src/ui-kit/FormField/isRenderField.tsx +1 -1
  1233. package/mobile/src/ui-kit/FormField/updateOrganizationFields.ts +1 -1
  1234. package/mobile/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +2 -2
  1235. package/mobile/src/ui-kit/RadioButtonGroup/RadioButtonGroupControl.tsx +2 -6
  1236. package/mobile/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +25 -28
  1237. package/mobile/src/utils/getRequiredLabel.ts +1 -0
  1238. package/mobile/src/validation/objectValidator.ts +6 -4
  1239. package/package.json +1 -1
  1240. package/src/EventBus/defaultEventBus.ts +1 -3
  1241. package/src/components/ApplicationForm/ApplicationForm.tsx +22 -42
  1242. package/src/components/ApplicationForm/renderAgreementSubmit.tsx +1 -1
  1243. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +12 -7
  1244. package/src/components/ApplicationLeadForm/GroupedConsents.tsx +5 -2
  1245. package/src/components/ApplicationLeadForm/renderAgreementSubmit.tsx +1 -1
  1246. package/src/components/ApplicationLeadForm/renderInputs.tsx +1 -0
  1247. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +5 -23
  1248. package/src/components/CalculatorBonus/CalculatorBonus.tsx +1 -1
  1249. package/src/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.tsx +1 -1
  1250. package/src/components/CalculatorCredit/CalculatorCredit.tsx +13 -14
  1251. package/src/components/CalculatorDeposit/CalculatorDeposit.tsx +2 -2
  1252. package/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +1 -1
  1253. package/src/components/CalculatorRefinancing/CalculatorRefinancing.tsx +1 -1
  1254. package/src/components/CardTransfer/CardTransfer.tsx +1 -1
  1255. package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +37 -34
  1256. package/src/components/CarouselTariffsCard/carouselTariffsCardEventBus.ts +12 -0
  1257. package/src/components/CreditCardForm/CreditCardForm.tsx +2 -2
  1258. package/src/components/CreditCardForm/CreditCardFormContent.ts +1 -1
  1259. package/src/components/CreditCardForm/CreditCardFormStep.tsx +16 -4
  1260. package/src/components/CreditCardForm/renderInputs.tsx +4 -2
  1261. package/src/components/CreditCardForm/renderStep.tsx +1 -1
  1262. package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +0 -20
  1263. package/src/components/CreditForm/CreditForm.tsx +3 -3
  1264. package/src/components/CreditForm/CreditFormStep.tsx +16 -4
  1265. package/src/components/CreditForm/renderInputs.tsx +1 -1
  1266. package/src/components/CreditForm/renderStep.tsx +1 -1
  1267. package/src/components/CreditForm/useCreditFormAPI.tsx +0 -20
  1268. package/src/components/Depository/Depository.tsx +1 -1
  1269. package/src/components/Depository/DepositoryFilter.tsx +1 -1
  1270. package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +1 -1
  1271. package/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +1 -1
  1272. package/src/hooks/useAspects/handleAspects.ts +2 -2
  1273. package/src/hooks/useForm/FieldOptions.ts +8 -0
  1274. package/src/hooks/useForm/FormOptions.ts +18 -0
  1275. package/src/hooks/useForm/shallowCompare.ts +2 -0
  1276. package/src/hooks/useForm/useForm.ts +98 -0
  1277. package/src/hooks/useForm/useFormValidator.ts +24 -0
  1278. package/src/hooks/useForm/useNormalizedFormState.ts +37 -0
  1279. package/src/services/retail/external/types.ts +1 -1
  1280. package/src/services/retail/inputs.tsx +67 -70
  1281. package/src/ui-kit/BaseFiltration/FiltrationForm.tsx +1 -1
  1282. package/src/ui-kit/BaseFiltration/useFiltrationForm.ts +4 -4
  1283. package/src/ui-kit/Calculator/setDefaultParamsCalc.tsx +1 -1
  1284. package/src/ui-kit/FormField/CustomFieldProps.ts +1 -1
  1285. package/src/ui-kit/FormField/Fields/AcquiringField.tsx +1 -3
  1286. package/src/ui-kit/FormField/Fields/AddressBranchField.tsx +1 -3
  1287. package/src/ui-kit/FormField/Fields/AddressFactField.tsx +1 -3
  1288. package/src/ui-kit/FormField/Fields/AddressField.tsx +1 -3
  1289. package/src/ui-kit/FormField/Fields/AddressMatchField.tsx +1 -3
  1290. package/src/ui-kit/FormField/Fields/AddressRetailField.tsx +4 -12
  1291. package/src/ui-kit/FormField/Fields/AmountField.tsx +2 -2
  1292. package/src/ui-kit/FormField/Fields/AnnualRevenueField.tsx +1 -6
  1293. package/src/ui-kit/FormField/Fields/ArmyIdFlgField.tsx +1 -6
  1294. package/src/ui-kit/FormField/Fields/BankEmployeeCodeField.tsx +1 -3
  1295. package/src/ui-kit/FormField/Fields/BankEmpoleeField.tsx +2 -2
  1296. package/src/ui-kit/FormField/Fields/BankruptcyFlgField.tsx +1 -3
  1297. package/src/ui-kit/FormField/Fields/BeginDateField.tsx +1 -3
  1298. package/src/ui-kit/FormField/Fields/BirthPlaceField.tsx +1 -3
  1299. package/src/ui-kit/FormField/Fields/BirthdayField.tsx +1 -6
  1300. package/src/ui-kit/FormField/Fields/ChildrenField.tsx +1 -3
  1301. package/src/ui-kit/FormField/Fields/CodeWordField.tsx +1 -7
  1302. package/src/ui-kit/FormField/Fields/CollectionCountField.tsx +1 -3
  1303. package/src/ui-kit/FormField/Fields/CommentField.tsx +1 -3
  1304. package/src/ui-kit/FormField/Fields/ConsentField.tsx +1 -3
  1305. package/src/ui-kit/FormField/Fields/CurrencyField.tsx +9 -17
  1306. package/src/ui-kit/FormField/Fields/DeliveryDateFiels.tsx +1 -6
  1307. package/src/ui-kit/FormField/Fields/DependentsField.tsx +1 -3
  1308. package/src/ui-kit/FormField/Fields/DesiredMeetingDateField.tsx +1 -10
  1309. package/src/ui-kit/FormField/Fields/DisablePeopleFlgField.tsx +1 -6
  1310. package/src/ui-kit/FormField/Fields/DulIssueDateField.tsx +2 -6
  1311. package/src/ui-kit/FormField/Fields/DulIssuedByField.tsx +2 -6
  1312. package/src/ui-kit/FormField/Fields/DulNumberField.tsx +2 -6
  1313. package/src/ui-kit/FormField/Fields/DulSerieField.tsx +2 -6
  1314. package/src/ui-kit/FormField/Fields/DulSubdivisionCodeField.tsx +2 -6
  1315. package/src/ui-kit/FormField/Fields/EmailField.tsx +1 -12
  1316. package/src/ui-kit/FormField/Fields/ExpensesField.tsx +1 -3
  1317. package/src/ui-kit/FormField/Fields/Experience5YearsField.tsx +2 -5
  1318. package/src/ui-kit/FormField/Fields/FamilyMembersField.tsx +4 -4
  1319. package/src/ui-kit/FormField/Fields/FeedbackMethodField.tsx +1 -3
  1320. package/src/ui-kit/FormField/Fields/FullNameField.tsx +1 -7
  1321. package/src/ui-kit/FormField/Fields/GeneralSeniorityField.tsx +1 -3
  1322. package/src/ui-kit/FormField/Fields/InnField.tsx +1 -3
  1323. package/src/ui-kit/FormField/Fields/IsClientField.tsx +5 -2
  1324. package/src/ui-kit/FormField/Fields/JobsNumberField.tsx +1 -3
  1325. package/src/ui-kit/FormField/Fields/LastJobExperienceField.tsx +1 -3
  1326. package/src/ui-kit/FormField/Fields/LegalEntityNameField.tsx +1 -3
  1327. package/src/ui-kit/FormField/Fields/LegalFormField.tsx +1 -3
  1328. package/src/ui-kit/FormField/Fields/LimitedBirthdayField.tsx +2 -6
  1329. package/src/ui-kit/FormField/Fields/LocalitiesField.tsx +8 -9
  1330. package/src/ui-kit/FormField/Fields/MandatoryPaymentsField.tsx +1 -3
  1331. package/src/ui-kit/FormField/Fields/MethodObtainField.tsx +1 -3
  1332. package/src/ui-kit/FormField/Fields/MiddleNameField.tsx +2 -6
  1333. package/src/ui-kit/FormField/Fields/NameField.tsx +1 -3
  1334. package/src/ui-kit/FormField/Fields/OnlineCheckoutField.tsx +2 -2
  1335. package/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +1 -3
  1336. package/src/ui-kit/FormField/Fields/OtherIncomeField.tsx +1 -3
  1337. package/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +2 -5
  1338. package/src/ui-kit/FormField/Fields/ParticipantDateRegistrationField.tsx +1 -10
  1339. package/src/ui-kit/FormField/Fields/PartnerCommentsField.tsx +8 -15
  1340. package/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +18 -22
  1341. package/src/ui-kit/FormField/Fields/PhoneField.tsx +1 -3
  1342. package/src/ui-kit/FormField/Fields/ProductField.tsx +2 -4
  1343. package/src/ui-kit/FormField/Fields/RegionField.tsx +1 -4
  1344. package/src/ui-kit/FormField/Fields/RegionPremiumField.tsx +1 -3
  1345. package/src/ui-kit/FormField/Fields/RegionRetailField.tsx +1 -3
  1346. package/src/ui-kit/FormField/Fields/RetirementIncomeField.tsx +1 -3
  1347. package/src/ui-kit/FormField/Fields/ServiceDirectionField.tsx +1 -3
  1348. package/src/ui-kit/FormField/Fields/SexField.tsx +1 -3
  1349. package/src/ui-kit/FormField/Fields/ShareholderFlgField.tsx +1 -3
  1350. package/src/ui-kit/FormField/Fields/SnilsField.tsx +1 -8
  1351. package/src/ui-kit/FormField/Fields/SurnameField.tsx +1 -3
  1352. package/src/ui-kit/FormField/Fields/TotalIncomeField.tsx +1 -3
  1353. package/src/ui-kit/FormField/Fields/UltraPremiumField.tsx +1 -7
  1354. package/src/ui-kit/FormField/Fields/VedField.tsx +8 -10
  1355. package/src/ui-kit/FormField/Fields/WagesField.tsx +1 -3
  1356. package/src/ui-kit/FormField/Fields/consentToReceiveMaterialsField.tsx +1 -5
  1357. package/src/ui-kit/FormField/SelectField.tsx +1 -4
  1358. package/src/ui-kit/FormField/getField.tsx +29 -31
  1359. package/src/ui-kit/FormField/getObjectValidator.tsx +30 -5
  1360. package/src/ui-kit/FormField/isEsiaAuthorize.ts +1 -1
  1361. package/src/ui-kit/FormField/isRenderField.tsx +1 -1
  1362. package/src/ui-kit/FormField/updateOrganizationFields.ts +1 -1
  1363. package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +2 -2
  1364. package/src/ui-kit/RadioButtonGroup/RadioButtonGroupControl.tsx +2 -6
  1365. package/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +25 -28
  1366. package/src/utils/getRequiredLabel.ts +1 -0
  1367. package/src/validation/objectValidator.ts +6 -4
  1368. package/bundle/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +0 -6
  1369. package/bundle/hooks/useForm.d.ts +0 -23
  1370. package/bundle/ui-kit/FormField/getNamesFromInput.d.ts +0 -2
  1371. package/bundle/ui-kit/FormField/getValidation.d.ts +0 -3
  1372. package/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +0 -6
  1373. package/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +0 -1
  1374. package/dist/hooks/useForm.d.ts +0 -23
  1375. package/dist/hooks/useForm.js +0 -62
  1376. package/dist/hooks/useForm.js.map +0 -1
  1377. package/dist/ui-kit/FormField/getNamesFromInput.d.ts +0 -2
  1378. package/dist/ui-kit/FormField/getNamesFromInput.js +0 -5
  1379. package/dist/ui-kit/FormField/getNamesFromInput.js.map +0 -1
  1380. package/dist/ui-kit/FormField/getValidation.d.ts +0 -3
  1381. package/dist/ui-kit/FormField/getValidation.js +0 -6
  1382. package/dist/ui-kit/FormField/getValidation.js.map +0 -1
  1383. package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +0 -6
  1384. package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js +0 -2
  1385. package/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +0 -1
  1386. package/lib/hooks/useForm.d.ts +0 -23
  1387. package/lib/hooks/useForm.js +0 -59
  1388. package/lib/hooks/useForm.js.map +0 -1
  1389. package/lib/ui-kit/FormField/getNamesFromInput.d.ts +0 -2
  1390. package/lib/ui-kit/FormField/getNamesFromInput.js +0 -2
  1391. package/lib/ui-kit/FormField/getNamesFromInput.js.map +0 -1
  1392. package/lib/ui-kit/FormField/getValidation.d.ts +0 -3
  1393. package/lib/ui-kit/FormField/getValidation.js +0 -3
  1394. package/lib/ui-kit/FormField/getValidation.js.map +0 -1
  1395. package/mobile/bundle/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +0 -6
  1396. package/mobile/bundle/hooks/useForm.d.ts +0 -23
  1397. package/mobile/bundle/ui-kit/FormField/getNamesFromInput.d.ts +0 -2
  1398. package/mobile/bundle/ui-kit/FormField/getValidation.d.ts +0 -3
  1399. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +0 -6
  1400. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +0 -1
  1401. package/mobile/dist/hooks/useForm.d.ts +0 -23
  1402. package/mobile/dist/hooks/useForm.js +0 -62
  1403. package/mobile/dist/hooks/useForm.js.map +0 -1
  1404. package/mobile/dist/ui-kit/FormField/getNamesFromInput.d.ts +0 -2
  1405. package/mobile/dist/ui-kit/FormField/getNamesFromInput.js +0 -5
  1406. package/mobile/dist/ui-kit/FormField/getNamesFromInput.js.map +0 -1
  1407. package/mobile/dist/ui-kit/FormField/getValidation.d.ts +0 -3
  1408. package/mobile/dist/ui-kit/FormField/getValidation.js +0 -6
  1409. package/mobile/dist/ui-kit/FormField/getValidation.js.map +0 -1
  1410. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.d.ts +0 -6
  1411. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js +0 -2
  1412. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardAction.js.map +0 -1
  1413. package/mobile/lib/hooks/useForm.d.ts +0 -23
  1414. package/mobile/lib/hooks/useForm.js +0 -59
  1415. package/mobile/lib/hooks/useForm.js.map +0 -1
  1416. package/mobile/lib/ui-kit/FormField/getNamesFromInput.d.ts +0 -2
  1417. package/mobile/lib/ui-kit/FormField/getNamesFromInput.js +0 -2
  1418. package/mobile/lib/ui-kit/FormField/getNamesFromInput.js.map +0 -1
  1419. package/mobile/lib/ui-kit/FormField/getValidation.d.ts +0 -3
  1420. package/mobile/lib/ui-kit/FormField/getValidation.js +0 -3
  1421. package/mobile/lib/ui-kit/FormField/getValidation.js.map +0 -1
  1422. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCardAction.ts +0 -6
  1423. package/mobile/src/hooks/useForm.ts +0 -120
  1424. package/mobile/src/ui-kit/FormField/getNamesFromInput.tsx +0 -4
  1425. package/mobile/src/ui-kit/FormField/getValidation.tsx +0 -6
  1426. package/src/components/CarouselTariffsCard/CarouselTariffsCardAction.ts +0 -6
  1427. package/src/hooks/useForm.ts +0 -120
  1428. package/src/ui-kit/FormField/getNamesFromInput.tsx +0 -4
  1429. package/src/ui-kit/FormField/getValidation.tsx +0 -6
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),a=n("useState"),i=n("useEffect"),l=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:a,...i}=t||{},l=n?.slots?.default,r=a||l&&l();return e(Object.assign(i,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:a="p-xl",padding:i,block:l,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],i||a,e),...m?{"data-ver":t}:{},...l?.anchor?{id:l.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={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:a,children:i})=>o(n,{role:"heading",className:u("font-sans m-0",v[t],e),children:a||i}))),w=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),C={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"}},S=d((({className:e,version:t="",headlineVersion:n="XL",title:a,description:i,align:l="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=C[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[a?o(N,{className:u("whitespace-pre-wrap",l),...h?.title,as:r||h?.title.as,title:a}):null,i?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:l,...p,children:i}):null]})})),k=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function T(e,t,{className:n,...a}={}){const{key:i,blockDecorator:l=k,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 l({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:l})=>{const{content:r}=n;return d?o(d,{className:l,block:e,options:t,...r,...a},i):null}},i)}const R=[],B=(e,{key:t,ancestors:n=R,slotName:a=null,extraProps:i,renderProps:l=T,...r})=>{const s=i?(e,t)=>T(e,t,i):l;return(e||[]).map(((e,i)=>s(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...n||R,[r.parent,a]]:n},i)))};function P({block:e,options:t,children:n,extraProps:a,renderProps:i}){return n||(e&&t?B(e.blocks,{...t,parent:e,extraProps:a,renderProps:i}):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 _=["CDN","BASE_PATH"],A=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return _.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),E=e=>Boolean(e?.includes(":")),M=(e,t)=>Boolean(e&&!E(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),z=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),F=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),V=(e,t)=>!(!e||!t)&&(!!e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:E,isLocalURL:M,isHash:O,withoutQuery:z,joinPath:F,hasPrefix:V});const $="/api/",j=`${$}v1/storage`,q=e=>(t,n)=>{if([!t,E(t),O(t),[A.CDN,$].some((e=>V(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`${j}/${t}/attachment`;const a=t?.startsWith("/");return F(V(t,n)?"":n,a?"/":(i=e.pathname,i?.split("/").slice(0,-1).join("/")),t);var i},U={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:a=`Иконка ${n}`,title:i=a,iconVersion:l="color",width:r,height:s})=>{const d=D(),m="normal"===l?`${n}.svg`:`sprites.svg#${n}`,h=q(d)(F(A.CDN,"/icons/",m));return"normal"===l?o("img",{className:e,src:h,alt:a,title:i,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(G,{className:e,children:c("svg",{className:u(Y(r),U[l],{invert:"white"===l},t),width:r,height:s,"aria-hidden":"true",children:[i?o("title",{children:i}):null,a?o("desc",{children:a}):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",G=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),K=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function X(e=""){try{return new URL(e).pathname}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":X(K.SITE_URL);return t&&!E(t)?q(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 a=D();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:i},l)=>o("source",{srcSet:J(a)(e),type:te(n),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${l}_${e}`))):null,t?.src?ee({...t,src:J(a)(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="",...a})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...a}):o(Q,{className:e,imageClassName:n,image:t}):null)),ae={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","":""},ie="bg-main-divider text-main-disabled",le={primary:ie,secondary:ie,white:ie,link:"",transparent:"",gray:ie,"":""},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?ae[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ce=e=>ce._impl(e);function de(e,t){const n=s({});return r((()=>new Proxy({},{get:(a,i)=>(n.current||={},n.current[i]||=n=>e.fire(t,{...n??{},type:i}),n.current[i])})),[e,t])}ce._impl=e=>e,ce.setup=e=>{ce._impl=e};class me{watchers=new Set;subscribersMap={};subjectsStateMap={};emitter=this;observable=this;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}subscribe(e,t){this.subscribersMap[e]||=new Set,this.subscribersMap[e]?.add(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.subscribersMap[e]?.delete(t)}}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(e,t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t??void 0,this.fireSubscribers(e,t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){for(const n of this.subscribersMap[e]??[])n(t??null);for(const n of this.watchers)n({type:e,event:t??null})}}const ue=new me,he=()=>de(ue.emitter,"dialog");function pe(){const e=X(K.SITE_URL),t=D(),{closeAll:n}=he();return e=>{const n=q(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:ce(a({...e,href:n}))}};function a({href:a,target:i,onClick:l}){return r=>{l?.(r),ge(a,i,e)||(n(),r?.preventDefault(),t.push(((e,t="")=>e?.replace(t,"")||"/")(a,e)))}}}const ge=(e,t,n)=>{if(!M(e,t))return!0;const a=K.SUB_PORTALS?.split(",");return!!a?.some((t=>V(e,t)))||!V(e,n||"/")},fe=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},xe=d((e=>{const{text:t,aboveText:n,appendLeft:a,appendRight:i,version:l="primary"}=e,r=ye(e)&&"hidden lg:block";return c("div",{className:u(be(e),"flex gap-xs"),children:[a?o("div",{className:u(r,se[l]),children:a}):null,ye(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,i?o("div",{className:u(r,se[l]),children:i}):null]})})),be=e=>{const{version:t,aboveText:n,rounded:a}=e;if("link"===t)return"";const i=""+(n?"py-2.5 px-9":"py-4 px-9");return u("group/btn items-center justify-center",ye(e)?i:"h-12 w-12 m-auto",{"rounded-full":a})},ye=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),ve=({className:e,rounded:t,version:n})=>["inline-block",re,n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Ne=d((({disabled:e,children:t,method:n="LINK",href:a,...i})=>{const r=(({method:e,href:t})=>l((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:a,pathname:i,searchParams:l}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[a,i].join(""));for(const[e,t]of l.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:a}),s=pe()({onClick:r,href:a,...i}),c=t??o(xe,{...s});return o(e?Ce:we,{...s,children:c})})),we=d((({className:e="",href:t,rel:n,target:a,ariaLabel:i,version:l,rounded:r,onClick:s,type:c,data:d,children:m,text:u})=>o("a",{className:oe({className:e,version:l,rounded:r}),href:t,rel:n,target:a,"aria-label":i||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...fe(d),children:m}))),Ce=d((({className:e,ariaLabel:t,version:n,rounded:a,children:i})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ve({className:e,rounded:a,version:n}),children:i})));function Se({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:a=!1}){if(!n)return null;const i="primary"===e?"white":"black",l="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(a?"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}),l),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:i}})}),o(Ne,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const ke=()=>{const[e,t]=a(false);return i((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Ie={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Te=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&Ie[n],t),children:e}):null,Re=d((({className:e,version:t="primary",defaultPadding:n,padding:a="",title:i,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=ke(),v=D(),N=l((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,C=f&&!y;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",a||n,e),children:[C&&Se({version:t,handleClick:N,text:w}),i?o("div",{className:"relative h-full",children:i}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Te(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]}),Pe(P({...b,extraProps:{className:"@container-normal"}})),Te(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Be(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Be=e=>u(e?"row-span-2":"@xl:row-span-2"),Pe=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,De=(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,_e=d((({__html:e="",richVersion:t="",itemSize:n="list-m",isDotted:a=!0,children:i})=>e||i?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(t,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",a?"":"without-dots"),dangerouslySetInnerHTML:e?{__html:e}:void 0,children:i})}):null)),Ae=(e,t)=>e?o(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ee=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),Me=(e,t)=>e?o(Ee,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Oe=(e,t)=>["label"in e?Me(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Ae(e.description,t)},String(t)):null,"__html"in e?o(_e,{...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?De(n.icon,t):null,o("div",{children:Oe(n)})]}))),Fe=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)),Ve=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(Oe)}):null)),Le=d((({isTabularBenefits:e,...t})=>o(e?Ve:Fe,{...t}))),$e=e=>Boolean(e?.src||e?.icon),je=(e,{className:t,buttonClassName:n,isVertical:a}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",a?"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(qe(n))}):null,qe=(e="")=>(t,n)=>{const{text:a,icon:i,iconRight:l,version:r,...s}=t||{},c=Ue(i,r),d=Ue(l,r);return a||i?.icon?o(Ne,{className:u("basis-full @lg:basis-auto",e),appendLeft:We({...i,iconVersion:c}),appendRight:We({...l,iconVersion:d}),version:r,text:a,...s},n?String(n):""):null},Ue=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},We=e=>$e(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),He=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),Ye=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(Ge)}):null)),Ge=({label:e,amount:t,unit:n},a)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Ee,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[He(2)(t)," ",n||"₽"]}):null]},String(a)),Ke=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Xe)}):null)),Xe=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ee,{size:"text-m",font:"font-light",children:e})},String(t)),Je={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Ze=d((({className:e,padding:t,defaultPadding:n,title:a,description:i,headlineVersion:l="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:C=!1}={},backwardButton:k,children:I,...T})=>{const R=y?.src?o(ne,{image:y}):null,B=o(S,{title:a,description:i,headlineVersion:l,align:r,isEmbedded:!0}),P=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Re,{className:e,padding:t,defaultPadding:n,...g?{title:B}:{insetTitle:B},...Qe(R,N),isImageSecondary:C,imageAlign:v,isImageAlwaysOnRight:w,buttons:je(b),backwardButton:k,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(Le,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,h?o(_e,{richVersion:p,__html:h,isDotted:m,itemSize:Je[l]}):null,I,f?.length?o(Ye,{priceList:f}):null,et(x)]})})})),Qe=(e,t)=>t?{rightImage:e}:{leftImage:e},et=e=>e?.length?o(Ke,{tags:e}):null;class tt{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof tt?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const nt=()=>!0,at=(e,t)=>(...n)=>e(...n)&&t(...n),it=(...e)=>(...t)=>{const[,n]=function(e){if(!e)throw new Error("Value should be fulfilled");return e}(e.find((([e])=>e(...t))));return n(...t)};const lt=e=>Boolean(e&&Array.isArray(e)),rt=e=>Boolean(e&&"object"==typeof e&&!lt(e)),st=e=>e;function ot(e){return e instanceof tt?e._:e}class ct extends tt{from(e){return this.of(e.map(((e=st)=>([,t])=>e(t))(ot)))}entries(){return(this._??[]).map(((e,t)=>[t,this.of(e)]))}size(){return this._?.length??0}get(e){return this.of("number"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of(lt(this._)?Array.from({length:Math.max(this._.length,Number(e)+1)},((n,a)=>a===e?t:this._[a])):Array.from({length:Number(e)+1},((n,a)=>a===e?t:void 0)))}}class dt extends tt{from(){return this}entries(){return[]}size(){return 0}get(e){return this.of(void 0!==e?void 0:this._)}set(e,t){return this.of(t)}}class mt extends tt{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,ot(t)]))))}entries(){return Object.entries(this._??{}).map((([e,t])=>[e,this.of(t)]))}size(){return Object.keys(this._??{}).length}get(e){return this.of("string"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of({...this._,[e]:t})}}class ut extends tt{proto=it([e=>lt(this._)||"number"==typeof e,()=>ct.prototype],[e=>rt(this._)||"string"==typeof e,()=>mt.prototype],[nt,()=>dt.prototype]);from(e){return this.proto(void 0).from.call(this,e)}entries(){return this.proto(void 0).entries.call(this)}size(){return this.proto(void 0).size.call(this)}get(e){return this.proto(e).get.call(this,e)}set(e,t){return this.proto(e).set.call(this,e,t)}}const ht=e=>e instanceof tt?e:new ut(e),pt=e=>{const t=(t,...n)=>ot(e(ht(t),...n));return t.fn=e,t},gt=[],ft=e=>e instanceof Function?e:t=>e===t,xt=e=>(t,n,a=gt)=>ht(t).entries().reduce(((t,[n,i])=>xt(e)(i,t,a.concat(n))),e(n,[a,ht(t)])),bt=pt(((e,[t,n])=>{const[a,...i]=t;return e.set(a,i.length?bt(e.get(a),[i,n]):n)})),yt=pt(((e,t)=>t.reduce(bt.fn,e))),vt=e=>xt(((e,[t,n])=>Nt(n)?[...e,[t,ot(n)]]:e))(e,[]),Nt=e=>0===e.size();pt(((e,t=gt)=>t.reduce(((e,t)=>e.get(t)),e)));const wt=pt(((e,[t,...n])=>n.length?e.set(t,wt(e.get(t),n)):e.filter((([e])=>e!==t)))),Ct=(St=["$ref"]).map(((e,t)=>n=>ft(e)(n[t+n.length-St.length]))).reduceRight(at,nt);var St;const kt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(It,e),It=it([lt,(e,t)=>e[parseInt(t,10)]],[rt,(e,t)=>e[t]],[nt,st]),Tt=(e,t)=>((e,t={})=>n=>yt(t,vt(n).map((t=>e(t)))))((([e,n])=>{return Ct(e)?[(a=e,a.slice(0,-1)),kt(t(n),n)]:[e,n];var a}))(e),Rt=e=>vt(e).filter(((e=st)=>([t])=>e(t))(Ct)),Bt=e=>{return t=Rt(e).map((([,e])=>e)),[...new Set(t)];var t};async function Pt(e,t){try{return e?await Dt(e,t):null}catch(e){console.error(e)}return null}const Dt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),_t=e=>[...new Set(e)],At={},Et=["/portal-resources"],Mt=(e,t)=>Tt(e,(e=>t?.[e])),Ot=(e,t)=>{const n=Bt(e),[l,r]=a({});return i((()=>{zt(n).then(r)}),[n.join()]),n.length?Mt(e,{...t,...l}):e},zt=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(_t(e).filter((e=>!Et.some((t=>e.startsWith(t))))).map((async e=>[e,At[e]||=await Dt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),a={...t,...n},i=Object.entries(n).flatMap((([,e])=>Bt(e)));return i.length?zt(i,a):a}return t};function Ft(e,t={}){const n=d((t=>{const n=Ot((({block:e,options:t,className:n,defaultPadding:a,padding:i,isTheme:l,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const Vt=Ft((({className:e,padding:t,defaultPadding:n,...a})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...a,children:o(Ze,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...a})})),{childrenTypes:["UnitBlock"]}),Lt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>$t(0,t?.length)),[t]),a=t?.[n];return a?o(Vt,{suppressHydrationWarning:!0,...a,...e}):o(g,{...e,children:o(f,{})})})),$t=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),jt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getFullYear());return t?`${i}-${a}-${n}`:`${n}.${a}.${i}`}},qt=e=>e?.replace(/[^+\d]/g,""),Ut="/api/v1";const Wt=e=>e?{phone:qt(e)}:{},Ht=(e,t="birthday")=>e?{[t]:jt(e)}:{},Yt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:qt(e)}:{},Xt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:a,params:i}of e)t[a??""]?.(n,i)};function Jt(){return Jt._impl()}Jt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Jt.setup=e=>{Jt._impl=e};const Zt="rshb-query-params";function Qt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Zt)||"";return e&&globalThis.sessionStorage?.setItem(Zt,e),e}const en=e=>{const t=e.target?.closest("a"),n=Jt();if(E(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const a=(e=>{const t=Qt();if(!E(e)||!t)return e;const n=new URL(e);for(const[e,a]of new URLSearchParams(t))n.searchParams.set(e,a);return n.toString()})(t?.href)||t?.href;a&&n.assign(a,t?.target)}};function tn(){return tn._impl()}tn._impl=()=>({forwardQuery:en}),tn.setup=e=>{tn._impl=e};const nn=e=>e,an=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=a(e),c=l(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return ln(t,n)?t:n}:r(e)):o,[r]);i((()=>{r&&o(r)}),[r]);const[d,m]=a(!1),[u,h]=a({}),p=l(((e,t)=>{const{parse:n=nn,format:a=nn}=t||{};return{value:a(s[e]),isDirty:d||u[e],onChange:t=>{c((a=>({...a,[e]:n(t)}))),h((t=>({...t,[e]:!0})))}}}),[c,d,u]),g=l((e=>{c(e),h(e)}),[]),f=l((()=>{c(e),m(!1),h({})}),[e]),x=l((e=>(e.preventDefault(),t?f():m(!0),n&&n(s,e),s)),[n,s]);return[s,{isDirty:d||Object.values(u).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},ln=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),rn=d((e=>{const{className:t,title:n,children:a,...i}=e;return o(g,{className:t,defaultPadding:"p-6xl",...i,children:c("div",{className:"container space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,a]})})}));function sn(e,t={}){const{open:n,close:a,...i}=he();return{open:l(((i,l={})=>n({dialog:o(e,{...t,...i,onClose:()=>{a(),i.onClose?.()}}),...l})),[e,n,a]),close:a,...i}}function on(e=!1){const[t,n]=a(e),i=l((()=>n(!0)),[]),r=l((()=>n(!1)),[]),s=l((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:i,setFalse:r,toggle:s}]}function cn(e,t,n,a){i((()=>{if(e&&n)return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}),[e,t,n])}function dn(e){const t=s(null),n=l((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return cn(globalThis.document,"click",n),t}const mn=({label:e,errors:t})=>e&&t?`${e}*`:e,un=()=>{},hn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",pn=e=>e?hn:"border-error",gn=e=>e?o(Ee,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,fn=d((({key:e,className:t="",id:n,name:a,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 C=s(null),S=l((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);i((()=>{v&&C.current?.focus()}),[v,C]);const k=g?"pr-3xl":"",I=pn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[gn(d),N?o("textarea",{className:u("block resize-y min-h-24",xn,I),id:u("textarea",n),name:a||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,disabled:w},e):o("input",{type:r,className:u("h-14",xn,k,I),ref:C,id:n,name:a||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,pattern:y,disabled:w},e)]}),g]})})),xn="w-full border rounded-md text-primary-text outline-none p-m",bn=e=>o("div",{className:"h-6",children:e?o(Ee,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),yn=e=>e?.value||"",vn={url:"suggest/address"},Nn={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||""},addressRegistration:vn,addressFact:vn,organizationAddress:vn,addressCourier:vn},wn=()=>de(ue.emitter,"popup"),Cn=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 Sn({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=a([]),f=wn(),x=Nn[n],b=l((()=>{h.current=t,f.close()}),[t]),y=l((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:a,requestData:i={},responseItemHandler:l=yn}=e,r=(s=l,e=>(e?.suggestions||[]).map((e=>{const t=s(e);return{...e,processedValue:t}})));var s;const o=`${a?`${a}, `:""}${n}`;return fetch(`${Ut}/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...i,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 a=(...i)=>{a.dispose(),n=setTimeout((()=>{e(...i)}),t)};return a.dispose=()=>{n&&clearTimeout(n)},a})(N,300)),[N]);return i((()=>{if(!e||!v.current||h.current===t)return void b();const n=v.current,{top:a,left:i,width:l,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.open({popup:o(Cn,{options:p,value:t,onChange:y}),top:a+globalThis.scrollY+r,left:i,width:l})}),[e,p,t,y]),v}const kn=d((({className:e,label:t,value:n="",placeholder:a,error:r,errors:s,onChange:d=un,onDaDataChange:m,onBlur:h,isTextarea:p,type:g,name:f="",daDataQueryPrefix:x,isInteger:b=!1,maxLength:y,dadata:v=!1,disabled:N=!1})=>{const[w,{setFalse:C,setTrue:S}]=on(),k=dn(C),I=l((e=>{v&&!w&&S(),y?e.length<=y&&d(e):d(e)}),[v,w,d]);i((()=>{b&&n&&d(In(n))}),[n]);const T=Sn({isOpen:w&&v,name:f,value:n,daDataQueryPrefix:x,onChange:d,onDaDataChange:m});return c("div",{className:u("shrink-0 w-full",e),ref:k,onBlur:C,onFocus:S,children:[o("div",{ref:T,children:o(fn,{disabled:N,type:g||"text","aria-label":t,label:mn({label:t,errors:s}),valid:Boolean(!r),value:n,onChange:I,onBlur:h,isTextarea:p,placeholder:Tn(a,s,t)})}),bn(r)]})})),In=(e="")=>e.replace(/[^\d]+/g,""),Tn=(e,t,n)=>t&&!n?`${e}*`:e,Rn=e=>e?.text||e?.key||"",Bn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Pn=d((({popupRef:e,options:t,value:n,query:a,onChange:i,iconVersion:l})=>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:Bn(t,a).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(),i&&i(e)},children:[o("span",{className:"min-h-6",children:Rn(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:l,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const Dn=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}]=on(),[N,w]=a(""),C=En(x,n.length),S=b&&!C,k=l((()=>{C||v()}),[C]),I=l((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:a,onChange:r,onClose:c,iconVersion:d}){const m=wn(),u=l((()=>{m.close(),c&&c()}),[c]),h=l((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=dn(u);return i((()=>{if(!e||!p.current)return;const i=p.current,{top:l,left:r,width:s,height:c}=i.getBoundingClientRect();m.open({popup:o(Pn,{popupRef:g,options:t,value:n,query:a,onChange:h,iconVersion:d}),top:l+window.scrollY+c,left:r,width:s})}),[e,t,n,a,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:I,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[gn(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",An(m,d,C)),onClick:S?I:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Rn(r)||h}),_n(S,g)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(fn,{type:"text",autoFocus:!0,value:N,onChange:w,disabled:C})}):null]})]})})),_n=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),An=(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"),En=(e,t)=>e||0===t,Mn=d((({className:e="",label:t,error:n,errors:a,...i})=>c("div",{className:e,children:[o(Dn,{...i,valid:!n,label:mn({label:t,errors:a})}),bn(n)]}))),On=e=>!e?.length,zn=e=>t=>n=>e(n)?[]:[t],Fn=zn((e=>null!=e&&""!==e)),Vn="Некорректно заполненное поле",Ln="Укажите регион, город/населенный пункт, улицу, дом",$n=e=>Fn(e??Vn),jn=e=>zn((e=>e?.key&&""!==e?.key))(e??Vn),qn=e=>zn((e=>"string"==typeof e&&e.length>0&&e.length<=2))(e??Vn),Un=e=>zn((e=>"string"==typeof e&&e.length>1&&ea(e)))(e??Vn),Wn=(e,t)=>zn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??Vn),Hn=e=>zn((e=>"string"==typeof e&&6===e.length))(e),Yn=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),Gn=e=>zn(Yn)(e),Kn=zn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Xn=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},Jn=e=>Boolean(e.region&&e.city&&e.house),Zn=()=>zn(Jn)(Ln),Qn=/^[\u0400-\u04FF\d\s]+$/u,ea=(e="")=>Qn.test(e),ta=e=>{const t=new Date,n=new Date(t.getFullYear()-23,t.getMonth(),t.getDate()),a=new Date(t.getFullYear()-75,t.getMonth(),t.getDate());return!(!e||e>n||e<a)},na={processPersonalDataFlg:Kn,consentProviderFlg:Kn,consentInformFlg:Kn,consentPfrFlg:Kn,consentOthersFlg:Kn},aa={addressCourier:Zn(),paymentSystem:$n("Укажите тип платежной системы"),currency:$n("Укажите валюту"),cardCategory:$n("Укажите категорию карты"),codeWord:(ia="Необходимо ввести кодовое слово",zn((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&ea(e)))(ia??Vn)),confirmationIncome:jn(),methodObtain:$n(),deliveryDate:$n("Укажите дату доставки")};var ia;const la={organization:jn("Выберите тип организации"),organizationAddress:zn((e=>Boolean(e.fiasCode&&e.city&&e.house)))(Ln),organizationPhone:Gn("Укажите номер телефона"),organizationName:$n("Укажите наименование организации"),legalForm:$n("Укажите ОПФ"),generalSeniority:qn("Укажите количество лет стажа"),lastJobExperience:qn("Укажите стаж на последнем месте работы"),experience5Years:qn("Укажите общий стаж за последние 5 лет"),jobsNumber:qn("Укажите количество мест работы за последние 5 лет"),beginDate:$n("Укажите дату заключения трудового договора"),addressFact:Zn(),addressRegistration:Zn(),addressRetail:jn("Выберите адрес банка"),addressMatch:$n(),sex:$n("Укажите свой пол"),limitedBirthday:zn(ta)("Допустимый возраст заёмщика - от 23 до 75 лет"),birthPlace:$n("Укажите место рождения"),education:jn("Выберите ваше образование"),housing:jn("Выберите тип жилья"),amountWorkers:jn("Выберите информацию о количестве сотрудников"),employment:jn("Выберите информацию о трудоустройстве"),employerActivities:jn("Выберите вид деятельности организации"),employerOrganization:jn("Выберите вид организации"),positionOrganization:jn("Выберите вашу должность"),familyStatus:jn("Выберите семейное положение"),familyMembers:Wn(2,"Укажите количество членов семьи"),children:Wn(2,"Укажите количество детей"),dependents:Wn(2,"Укажите количество иждивенцев"),totalIncome:Wn(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:Wn(10,"Укажите сумму обязательных выплат"),snils:(e=>zn(Xn)(e))("Некорректный номер СНИЛС"),conscription:$n(),armyIdFlg:Kn,dulSerie:(e=>zn((e=>"string"==typeof e&&4===e.length))(e))("Укажите серию паспорта"),dulNumber:Hn("Укажите номер паспорта"),dulIssueDateField:$n("Укажите дату выдачи паспорта"),dulSubdivisionCode:Hn("Укажите код подразделения"),dulIssuedBy:$n("Укажите организацию, выдавшую паспорт"),participantDateRegistration:$n("Укажите дату регистрации"),retirementIncome:$n(),otherIncome:$n(),wages:$n(),mandatoryPayments:$n(),disablePeopleFlg:$n(),bankruptcyFlg:$n(),shareholderFlg:$n(),legalEntityName:$n(),bankEmployeeCode:$n(),partInBusiness:$n(),regionRetail:jn("Выберите регион")},ra={fullName:$n(),addressBranch:jn(),desiredMeetingDate:$n(),product:$n(),localities:$n(),partnerComments:$n(),collectionCount:$n(),acquiringType:jn(),serviceType:jn(),annualRevenue:$n(),feedbackMethod:jn(),serviceDirection:jn(),secondaryPhone:Gn("Укажите номер телефона"),region:jn(),surname:Un("Укажите свою фамилию"),name:Un("Укажите своё имя"),middleName:Un("Укажите своё отчество"),birthday:$n("Укажите дату рождения"),phone:Gn("Укажите номер телефона"),email:(e=>zn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),inn:(e=>zn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:$n(),typeForm:$n(),consentToReceiveMaterials:Kn,consentDataProcessing:Kn,...na,...la,...aa},sa=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>Boolean(e?.required))));return Object.fromEntries(t.map((e=>[e,ra?.[e||""]])).filter((([,e])=>e)))},oa=(e,t)=>{const{value:n,isDirty:a}=e,i=a?t(n):[];return{...e,errors:i,error:i[0]}},ca=(e,t,n=!1)=>n&&t?oa(e,t):e,da=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],ma=d((({field:e,input:t})=>o(Mn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:da,...ca(e("acquiringType"),ra.acquiringType,t?.required)}))),ua=(e="")=>Boolean("trade"===e||"all"===e),ha=e=>null!=e,pa=new Map,ga=(e,t=pa)=>n=>{const a=xa(n),i=t.get(a);if(a&&ha(i))return i;const l=e(...n);return a&&ha(l)&&t.set(a,Promise.resolve(l)),l},fa=e=>Boolean(e?.every((e=>Array.isArray(e)?fa(e):!e||"string"==typeof e))),xa=e=>fa(e)?e.toString():"",ba=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function ya(e,t,{fallback:n,cache:l}={}){const s=r((()=>va(e)),[e]),[o,c]=a(void 0),[d,m]=a(void 0);i((()=>{if(!s.some(ha))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await ga(t,l)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,l,s]);const u=n&&ba(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function va(e){return Array.isArray(e)?e:e instanceof Function?va(e()):[e]}const Na=`${Ut}/branches`,wa=[];const Ca=async e=>await Pt(e,{method:"GET"})||wa;function Sa(e=!1){const{data:t}=ya(`${Ut}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,Dt);return Array.isArray(t)?t:[]}const ka=(e="")=>"ULTRASERVICE"===e,Ia=d((({field:e,input:t,params:n})=>{const a=ka(n?.typeForm),l=e("region"),r=l?.value?.key,s=l?.value?.text,c=a?Sa(a)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=ya(e?`${Na}?regionCode=${e}`:null,Ca);return t||wa}(r)?.filter((e=>e?.address));return i((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(Mn,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...ca(e("addressBranch"),ra.addressBranch,t?.required),isSearch:!0})})),Ta=(e,{normalize:t,format:n})=>{const{value:i,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=a(!1),m=l((e=>{d(!0),r&&r(e)}),[]),u=l((()=>{d(!1),o&&o(t(i)),s&&s()}),[o,i]);return{value:c||!n?i:n(i),onFocus:m,onBlur:u}},Ra=(e,t,n)=>Math.max(t,Math.min(e,n));function Ba(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function Pa({list:e=[],min:t,max:n,step:a,value:i=e[0]||t,disabled:l,onChange:r}){const s=e.length?e.indexOf(i):i,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||l?"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:a,value:s,disabled:l,onChange:t=>{const n=Ba(t.target?.value),a=e.length?e[n]:n;r&&r(a||0)}})})]})}const Da=1,_a=100,Aa=d((e=>{const{className:t,title:n,items:a=[],list:i=[],min:r=(i.length?0:Da),max:s=(i.length?i.length-1:_a),step:d=1,value:m=i[0]||r,disabled:h=!1,onChange:p}=e,g=Ta(e,{normalize:(e=0)=>i.length?Ea(i)(e):Ra(e,r,s),format:He()}),f=l((e=>{p&&p(Ba(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Ee,{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",hn,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),Pa({list:i,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),Ma(a)]})})),Ea=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),Ma=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Oa=["От 1 000 ₽","До 1 000 000 000 ₽"],za=d((({field:e})=>o(Aa,{title:"Сумма, ₽",items:Oa,min:1e3,max:1e9,...e("amount")}))),Fa=d((({field:e,input:t})=>o(kn,{label:"Годовая выручка, ₽",...ca(e("annualRevenue"),ra.annualRevenue,t?.required)}))),Va=d((({field:e})=>o(kn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),La=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:a,currentYear:i,min:l,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(i,a,d),n=$a(t,e),c=ja(t,l,r);u.push(o("td",{children:o("div",{className:qa(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},$a=(e,t)=>t&&e.toDateString()===t.toDateString(),ja=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),qa=(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"),Ua=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Wa=d((({today:e,currentMonth:t,currentYear:n,min:a,max:i,onDateSelect:s=un,setValue:d=un})=>{const m=l((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:Ua.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:La({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:a,max:i,onDateClick:m})})]})})),Ha=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function Ya(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const a=[...t],i=a.findIndex(Ga),l=a.map(((e,t)=>Xa(e)?a.slice(0,t).filter(Xa).length:-1)),r=a.map(((e,t)=>Ka(e)?e:n.charAt(l[t])||e)),s=l.indexOf(n.length-1)+1;return r.slice(0,Math.max(i,s)).join("")}const Ga=e=>"_"===e,Ka=e=>/\d/.test(e),Xa=e=>Ga(e)||Ka(e),Ja=1940,Za={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Qa=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:l,disabled:r,onChange:d,onClick:m})=>{const h=s(null),[p,g]=a(l||"");return i((()=>{g(l||"")}),[l]),i((()=>{ti({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d})}),[p]),c("div",{onClick:()=>{null!==h.current&&h.current.focus(),m?.()},className:u("relative",n),children:[o("input",{ref:h,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(Ya(t,"__.__.____"))},onBlur:()=>{ei(p)?ti({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(l||"")},disabled:r}),r?null:o(W,{className:"mr-s",...Za})]})})),ei=e=>{const[t,n,a]=e.split(".");if((e=>Number(e)>=Ja&&Number(e)<=(new Date).getFullYear())(a)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(a),Number(n)-1,1);let i=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),i++;return Number(t)>0&&Number(t)<=i}return!1},ti=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:a})=>{if(ei(e)){const{day:i,month:l,year:r}=(e=>{const[t,n,a]=e.split(".");return{day:Number(t),month:Number(n)-1,year:Number(a)}})(e);t(l),n(r),a?.(new Date(r,l,i))}},ni=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:a,setSelectedMonth:i,setSelectedYear:l,disabled:r=!1})=>o(Qa,{onChange:a,disabled:r,onClick:e,value:t&&jt(t),setSelectedMonth:i,setSelectedYear:l,className:u("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),ai=Ha.map((e=>({key:e}))),ii=Array.from({length:(new Date).getFullYear()-Ja+1},((e,t)=>Ja+t)).reverse().map((e=>({key:String(e)}))),li=(e,t)=>{const n=new Date(e,t,1);let a=0;for(;n.getMonth()===t;)a++,n.setDate(n.getDate()+1);return a},ri=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:a,onChange:i})=>{a&&i?.(new Date(t,n,Math.min(e,a.getDate())))},si={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},oi={className:"min-w-32",iconVersion:"black",isBorder:!1},ci=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:h})=>{const[p,{setValue:g}]=on(!1),[f,x]=a(n?.getMonth()||(new Date).getMonth()),[b,y]=a(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:v,handleNextMonth:N,handleSelectMonth:w,handleSelectYear:C,monthsOptions:S,yearsOptions:k,handleChangeVisibleCalendar:I,ref:T}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:a,onYearSelect:i,selectedYear:r,onChange:s,value:o})=>{const c=dn(l((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:l((()=>e(!t)),[t]),handleNextMonth:l((()=>{n+1<=11?a(n+1):(a(0),i(r+1))}),[n]),handlePrevMonth:l((()=>{n-1>=0?a(n-1):(a(11),i(r-1))}),[n]),handleSelectMonth:l((({key:e})=>{a(Ha.indexOf(e));const t=li(r,Ha.indexOf(e));ri({maxDateOfMonth:t,selectedYear:r,selectedMonth:Ha.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:l((({key:e})=>{i(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:ai,yearsOptions:ii,ref:c}})({onYearSelect:y,onMonthSelect:x,onShowCalendar:g,selectedYear:b,selectedMonth:f,showCalendar:p,onChange:h,value:n}),R=((e,t)=>{const[n,l]=a(!1);return i((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();l(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:[gn(t),c("div",{className:"relative",children:[ni({handleChangeVisibleCalendar:I,value:n,valid:r,onChange:h,disabled:m,setSelectedMonth:x,setSelectedYear:y}),p&&!m?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":R}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:v,children:o(W,{...si,className:"-rotate-90 cursor-pointer"})}),o(Dn,{onChange:w,value:{key:Ha[f]},options:S,...oi}),o(Dn,{onChange:C,value:{key:String(b)},options:k,...oi}),o("div",{className:"my-auto",onClick:N,children:o(W,{...si,className:"rotate-90 cursor-pointer"})})]}),o(Wa,{today:n,currentMonth:f,currentYear:b,onDateSelect:h,min:s,max:d,setValue:g})]}):null]})]})})),di=d((({className:e,label:t,error:n,errors:a,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(ci,{label:mn({label:t,errors:a}),valid:Boolean(!n),...i}),bn(n)]}))),mi=d((({field:e,input:t})=>o(di,{label:"Дата рождения",...ca(e("birthday"),ra.birthday,t?.required)}))),ui=d((({field:e,input:t})=>o(kn,{label:"Количество объектов инкассации",isInteger:!0,...ca(e("collectionCount"),ra.collectionCount,t?.required)}))),hi=d((({field:e,input:t})=>o(kn,{className:"col-span-2",...ca(e("comment"),ra.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),pi=d((({className:e,viewBox:t,fill:n="none",width:a,height:i,paths:l,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:a,height:i,children:l.map((({d:e,fill:t,...n},a)=>{const i={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:i.stroke,strokeLinecap:i.strokeLinecap,strokeLinejoin:i.strokeLinejoin,strokeWidth:i.strokeWidth,strokeMiterlimit:i.strokeMiterlimit},a)}))}))),gi="appearance-none w-5 h-5 border-solid flex-none",fi=[{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"}],xi=d((({className:e,value:t,text:n,disabled:a,isRadio:i,onChange:r})=>{const s=l((e=>{a||(e.preventDefault(),r&&r(!t))}),[r,a,t]),d=i?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(pi,{paths:fi,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",yi(a)),onClick:s,children:[o("div",{className:u(gi,"m-0",i?"rounded-full border-2":Ni(t),!a&&t?"border-primary-main":"border-gray",a?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:vi(i),"aria-checked":Boolean(t),"aria-disabled":Boolean(a),"aria-label":n}),t?d:null,bi(n)]})})})),bi=e=>e?o("div",{className:"ml-s",children:o(Ee,{size:"text-l",font:"font-light",children:e})}):null,yi=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",vi=(e=!1)=>e?"radio":"checkbox",Ni=(e=!1)=>u("rounded border",{"bg-primary-main":e}),wi="consentToReceiveMaterials",Ci=d((({field:e,input:t})=>o(xi,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...ca(e(wi),ra[wi],t?.required)}))),Si=d((({field:e,input:t})=>o(di,{label:"Желаемая дата встречи",...ca(e("desiredMeetingDate"),ra.desiredMeetingDate,t?.required)}))),ki=d((({field:e,input:t})=>{const{required:n,...a}=t;return o(kn,{label:"Электронная почта",...ca(e("email"),ra.email,n),...a})})),Ii=[{key:"ULTRASERVICE",text:"Ультра"}],Ti=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Ri=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Bi=d((({field:e,input:t})=>o(Mn,{label:"Способ получения ответа",options:Ri,...ca(e("feedbackMethod"),ra.feedbackMethod,t?.required)}))),Pi=d((({field:e,input:t})=>o(kn,{label:"ФИО",...ca(e("fullName"),ra.fullName,t?.required),...t})));function Di(e,t){for(const[n,a]of e.entries())null!=a?t.setItem(n,a):t.removeItem(n)}const _i={};function Ai(e,t=_i){const n=s(null),o=function(){const[,e]=a(0);return l((()=>e((e=>(e+1)%65536))),[])}();return i((()=>e.bus.watch((e=>{n.current?.has(String(e.type))&&o()}))),[e,o]),r((()=>new Proxy(t,{get:(t,a)=>(n.current||=new Set,n.current.add(a),e.getItem(a)),has:(t,a)=>(n.current||=new Set,n.current.add(a),e.hasItem(a)),set:(t,n,a)=>(e.setItem(n,a),!0),deleteProperty:(t,n)=>(e.removeItem(n),!0)})),[e])}const Ei=new class{bus;store=new Map;get size(){return this.store.size}constructor(e=new me){this.bus=e}hasItem(e){return this.store.has(e)}getItem(e){return this.store.get(e)}entries(){return this.store.entries()}setItem(e,t){this.store.set(e,t),this.bus.subject(e,t)}removeItem(e){this.store.delete(e),this.bus.subject(e,null)}};var Mi,Oi;function zi(e){return Ai(Ei,e)}Mi=Ei,Oi=new class{storage;bus;get size(){return this.storage?.length??0}constructor(e,t=new me){this.storage=e,this.bus=t}hasItem(e){return Boolean(this.storage?.getItem(String(e)))}getItem(e){const t=this.storage?.getItem(String(e))??null;try{return JSON.parse(String(t))}catch(e){return null}}entries(){return Array.from({length:this.size},((e,t)=>{const n=String(this.storage?.key(t));return[n,this.getItem(n)]}))}setItem(e,t){null!==t?this.storage?.setItem(String(e),JSON.stringify(t)):this.storage?.removeItem(String(e)),this.bus?.subject(e,t)}removeItem(e){this.storage?.removeItem(String(e)),this.bus?.subject(e,null)}}(globalThis?.localStorage),Di(Mi,Oi),Di(Oi,Mi),Mi.bus.watch((({type:e,event:t})=>{null!=t?Oi.setItem(e,t):Oi.removeItem(e)}));const Fi=()=>zi(),Vi=(e,t)=>{if(!t)return null;const n=qi(e),a=+t?.split(".")[0],i=+t?.split(".")[1];switch(a){case 1:return n("AGRICULTURE");case 35:return n("FUEL_AND_ENERGY");case 41:case 42:case 43:return n("CONSTRUCTION");case 46:case 47:return n("TRADE");case 55:case 79:return n("TOURISM");case 62:return n("TECHNOLOGY");case 63:return n("CONSULTING_SERVICE");case 64:return n("BANK");case 65:return n("INSURER");case 66:return n("FINANCIAL_INSTITUTIONS");case 72:case 74:return n("SCIENCE");case 80:return n("SECURITY");case 84:return n(i<22?"GOVERNANCE":22===i?"ARMY":"OTHER_SECTORS");case 85:return n("EDUCATION");case 86:return n("HEALTHCARE");case 87:return n("SOCIAL_SPHERE");default:return n(a>=10&&a<=33?"INDUSTRY":a>=5&&a<=9?"FUEL_AND_ENERGY":a>=49&&a<=53?"TRANSPORT":"OTHER_SECTORS")}},Li=(e,t)=>{if(!t)return null;const[n]=[e?.find((e=>t<=Number(e.description)))].map((e=>({key:e?.key??"",text:e?.value??""})));return n},$i=(e,t)=>{const n=qi(e);return[40001,40002,71610].includes(t)?n("FOREIGN"):n("RUSSIAN")},ji=(e,t,n)=>{const a=qi(e);return a("7725114488"===n?"RSHB":50102===t?"SOLE_TRADER":t>=75e3&&t<=75505&&75500!==t?"BUDGETARY":"COMMERCIAL")},qi=e=>t=>e.map((e=>({key:e.key,text:e.value}))).find((e=>e.key===t))??null,Ui=(e,t)=>Boolean(e("esiaAccountTypeCd")?.value?.key)&&e(t).value,Wi=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",a=e(n).value,i=l((t=>{e?.(n)?.onChange?.(Hi(t))}),[]),r=l((t=>{e?.(n)?.onChange?.({apartment:"",city:"",district:"",fullAddress:t,fiasCode:"",house:"",locality:"",okatoRegionCode:"",postcode:"",region:"",regionCode:"",street:"",qc:"",qcComplete:"",qcHouse:""})}),[]);return o(kn,{disabled:t?.filledByEsia&&Ui(e,n),label:"Адрес",...ca(e(n),ra[n],t?.required),value:a?.fullAddress,onChange:r,...t,onDaDataChange:i})})),Hi=e=>({apartment:e?.data?.flat,city:e?.data?.city,district:e?.data?.area_with_type,fullAddress:e?.unrestricted_value,fiasCode:e?.data?.fias_id,house:e?.data?.house,locality:e?.data?.settlement_with_type,okatoRegionCode:e?.data?.okato,postcode:e?.data?.postal_code,region:e?.data?.region,regionCode:e?.data?.region_kladr_id?e?.data?.region_kladr_id.substring(0,2):"",street:e?.data?.street,qc:e?.data?.qc,qcComplete:e?.data?.qc_complete,qcHouse:e?.data?.qc_house}),Yi=(e,t,n)=>{const{okved:a,okopf:i,inn:l}=Gi(n);t?.("legalForm")?.onChange?.(n.data?.opf?.short),t?.("organizationAddress")?.onChange?.(Hi(n.data?.address));const r={amountWorkers:Li(e?.amountWorkers,n.data?.employee_count),employerActivities:Vi(e?.employerActivities??[],a),organization:ji(e?.organization??[],i,l),employerOrganization:$i(e?.employerOrganization??[],i)};for(const e in r)r[e]&&t?.(e)?.onChange?.(r[e])},Gi=e=>({inn:e.data?.inn??"",okopf:Number(e.data?.opf?.code),okved:e.data?.okved??""}),Ki=d((({field:e,input:t})=>{const n=Fi(),a=l((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),Yi(n,e,t)}),[]);return o(kn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...ca(e("inn"),ra.inn,t?.required),onDaDataChange:a})})),Xi=d((({className:e,text:t,value:n,key:a,disabled:i,error:l,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(xi,{text:t,value:n,disabled:i,onChange:r},a),bn(l)]}))),Ji=d((({field:e})=>o(Xi,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Zi=`${Ut}/outservice`,Qi=[];async function el(){const e=await Pt(`${Zi}/outserviceregions`);return e&&Array.isArray(e)?e:Qi}const tl=d((({field:e,input:t})=>{const n=e("region"),a=n?.value?.key,{data:l}=ya("outServiceRegions",el),r=l?.find((e=>e.code===a))?.localities?.map((e=>({key:e,text:e})));return i((()=>{""!==a&&e?.("localities")?.onChange?.("")}),[a]),o(Mn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:r,...ca(e("localities"),ra.localities,t?.required),isSearch:!0})})),nl="middleName",al=d((({field:e,input:t})=>o(kn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,disabled:t?.filledByEsia&&Ui(e,nl),...ca(e(nl),ra.middleName,t?.required),...t}))),il=d((({field:e,input:t})=>o(kn,{label:"Имя",maxLength:60,disabled:t?.filledByEsia&&Ui(e,t.name??""),...ca(e("name"),ra.name,t?.required),...t}))),ll=d((({value:e=!1,text:t,type:n="checkbox",onChange:a})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>a&&a(!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(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),rl=d((({field:e})=>ua(e("acquiringType")?.value?.key)?o(ll,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),sl=d((({field:e,input:t})=>{const{required:n,...a}=t;return o(kn,{...ca(e("partnerComments"),ra.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...a})})),ol=e=>"_"===e,cl=e=>/\d/.test(e),dl=e=>ol(e)||cl(e),ml=[..."+7 (___) ___-__-__"],ul=ml.findIndex(ol),hl=ml.map(((e,t)=>dl(e)?ml.slice(0,t).filter(dl).length:-1));function pl(e){const t=e.replace(/\D/g,""),n=ml.map(((e,n)=>cl(e)?e:t.charAt(hl[n])||e)),a=hl.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max(ul,a)):n).join("")}const gl=d((({children:e,onChange:t,...n})=>{const a=l((e=>t&&t(pl(e))),[t]),i=l((e=>{"+7 ("===e&&t&&t("")}),[]);return o(fn,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>i(e?.target?.value||""),children:e})})),fl=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(gl,{"aria-label":t,label:mn({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),bn(n)]}))),xl=d((({field:e,input:t})=>{const n=t?.name||"phone";return o(fl,{label:"Телефон",...ca(e(n),ra.phone,t?.required),disabled:t?.filledByEsia&&Ui(e,n),...t})})),bl=d((({field:e})=>ua(e("acquiringType")?.value?.key)?o(ll,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),yl=d((({field:e,source:t})=>o(Mn,{placeholder:"Выберите продукт",label:"Продукт",options:vl(t?.productList),...oa(e("product"),ra.product)}))),vl=e=>(e??[]).map((e=>({key:e,value:e}))),Nl=`${Ut}/regions`,wl=[];function Cl(e=Nl){const{data:t}=ya(e,Dt);return Array.isArray(t)?t:wl}const Sl=`${Ut}/outservice/outserviceregions`,kl=d((({field:e,input:t,params:n})=>{var a;const i=Cl((a=n?.typeForm,"OUTSERVICE"===a?Sl:void 0));return o(Mn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>i?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[i]),...ca(e("region"),ra.region,t?.required)})})),Il=d((({field:e,input:t})=>{const n=Sa(!0),a=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(Mn,{label:"Регион",placeholder:"Выберите регион",options:a,...ca(e("region"),ra.region,t?.required)})})),Tl=d((({field:e})=>{const t=e("secondaryPhone");return o(fl,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?oa(t,ra.secondaryPhone):t})})),Rl=d((({field:e,input:t})=>o(Mn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Ti,...ca(e("serviceDirection"),ra.serviceDirection,t?.required)}))),Bl=d((({field:e,input:t})=>o(kn,{label:"Фамилия",maxLength:60,disabled:t?.filledByEsia&&Ui(e,"surname"),...ca(e("surname"),ra.surname,t?.required),...t}))),Pl=["От 1 мес","До 15 лет"],Dl=d((({field:e})=>o(Aa,{title:"Срок, месяцев",items:Pl,min:1,max:180,...e("term")}))),_l=d((({field:e,input:t})=>o(Mn,{label:"Тип обслуживания",options:Ii,...ca(e("serviceType"),ra.serviceType,t?.required)}))),Al={horizontal:"@lg:flex-row",vertical:""},El=d((({label:e,items:t,value:n,className:a,onChange:i,disabled:l=!1,orientation:r="horizontal"})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Ee,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",Al[r],a),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(xi,{isRadio:!0,text:t,value:n===e,onChange:()=>i&&i(e),disabled:l},String(e))))})]}))),Ml=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],Ol=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return i((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(El,{className:"whitespace-normal",orientation:"horizontal",items:Ml,value:t,onChange:e=>n&&n(e)})})}));const zl={$ref:"/wcms-resources/outservice-productlist.json"},Fl={fullName:e=>o(Pi,{...e}),addressBranch:e=>o(Ia,{...e}),desiredMeetingDate:e=>o(Si,{...e}),product:e=>o(yl,{...e,source:zl}),localities:e=>o(tl,{...e}),isClient:e=>o(Ji,{...e}),partnerComments:e=>o(sl,{...e}),collectionCount:e=>o(ui,{...e}),acquiringType:e=>o(ma,{...e}),onlineCheckout:e=>o(rl,{...e}),posTerminal:e=>o(bl,{...e}),serviceType:e=>o(_l,{...e}),term:e=>o(Dl,{...e}),amount:e=>o(za,{...e}),annualRevenue:e=>o(Fa,{...e}),vedTypes:e=>o(Ol,{...e}),feedbackMethod:e=>o(Bi,{...e}),serviceDirection:e=>o(Rl,{...e}),bankEmpolee:e=>o(Va,{...e}),secondaryPhone:e=>o(Tl,{...e}),applicationDate:e=>o(kn,{label:"Дата и время обращения в Банк",...e}),region:e=>ka(e?.params?.typeForm)?o(Il,{...e}):o(kl,{...e}),consentToReceiveMaterials:e=>o(Ci,{...e}),surname:e=>o(Bl,{...e}),name:e=>o(il,{...e}),middleName:e=>o(al,{...e}),birthday:e=>o(mi,{...e}),phone:e=>o(xl,{...e}),email:e=>o(ki,{...e}),inn:e=>o(Ki,{...e}),comment:e=>o(hi,{...e})},Vl=(e,t,n={})=>(a,i)=>{const l={...Fl,...n};return function({input:e,field:t}){const{condition:n}=e,{value:a}=t(n?.name||"");return!n||n?.values?.find((e=>e===(a?.key??a)))}({input:a,field:e})?o("div",{children:l[a?.name||""]?.({field:e,input:a,params:t})},String(i)):null},Ll=e=>2===e?"@xl:grid-cols-2":"",$l=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ee,{size:"text-h6",children:e})}):null,jl=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0,size:a="big"})=>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 ","animate-spin rounded-full","border-solid border-current","border-r-transparent","small"===a?"border-4 h-8 w-8":"border-8 h-28 w-28",e),role:"status"})})));function ql({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const Ul={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"},Wl={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")},Hl=d((({children:e,...t})=>{const n=e=>({...e,onClick:ce(ql(e))}),{className:a,version:i="primary",active:l,disabled:r,isLoading:s,type:d="button",rounded:m=!0,role:h,onClick:p}=n(t);return c("button",{className:u("font-sans px-9 py-4","flex justify-center items-center gap-xs relative",{"text-white bg-primary-active":l,"bg-main-gray text-main-disabled cursor-not-allowed":r||s,"rounded-md":m},l||r||s?"":u(Ul[i],Wl[i]),a),type:d,role:h,onClick:p,children:[s?o(jl,{blur:!0,size:"small"}):null,e]})})),Yl=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"})}))),Gl=d((({className:e,head:t,children:n,onClose:a,onClick:i})=>c("div",{className:u("relative bg-white pt-0 p-lg",e),role:"dialog",onClick:i,children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Yl,{className:"absolute top-0 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),Kl=d((({responseType:e,typeForm:t,onClose:n})=>{const a="OK"===e,i="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Gl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:a?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:a?"Ваша заявка отправлена":"Не удалось отправить заявку",description:a?i:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Hl,{type:"button",onClick:n,children:"Хорошо"})]})})})),Xl=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Jl=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:a,amount:i,term:l,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:a=!1,term:i,amount:l,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${ua(t?.key)?`/Онлайн касса=${n}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${l}/Срок=${i}/Выручка=${r}`})(e):null,u={...d,...Ql(o),...Zl(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Zl=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Ql=e=>e?{vedTypes:Object.fromEntries(Ml.map((({id:t})=>[t,t===e])))}:{},er={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:da[0],serviceType:Ii[0],feedbackMethod:Ri[0],serviceDirection:Ti[0],vedTypes:Ml[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},tr=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Ee,{children:e}):null,t?o(Ne,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Ee,{children:t.text})}):null]}))),nr=(e,t)=>o(Hl,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ar=(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(xi,{...e}),o(tr,{link:t})]}),bn(oa(e,Kn).error)]}):o(tr,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),nr(n)]}),ir={send:async function(e,t=!1){const{typeForm:n,region:a,phone:i="",email:l,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f=`${Ut}${g?"/lead":"/sendcorporatelead"}`,x={typeForm:n,...Yt(a,g),...Gt(l,g),...Wt(i),...Ht(s,"desiredMeetingDate"),...g?Ht(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...Kt(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}}},lr=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="")=>({...Object.fromEntries(e.map((e=>[e.name,"vedTypes"===e?.name&&e?.defaultValue||er[e.name||""]]))),typeForm:{key:t,text:""}}))(x,n),[y,v]=a(""),w=sn(Kl),C=l((async(e,t)=>{const a=rr(x,e),i=Xl(sa(a));if(!On(i(e)))return console.warn("validation fail");const l=Jl({...e,...h}),r=await ir.send(l,"lead"===m)?"OK":"Fail";if(v(r),r&&w.open({typeForm:n,responseType:r}),"OK"===r&&g){const e=tn();Xt({aspectsAttributes:g,aspects:e,ev:t})}return r}),[n]),[,{field:S,onSubmit:k,reset:I}]=an(b,{onSubmit:C}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return i((()=>{"OK"===y&&(v(""),I())}),[y]),c(rn,{className:u("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:k,children:[r.map(((e,t)=>c("div",{className:u(Ll(e.columns),"grid gap-x-m"),children:[$l(e.title),(e?.inputs||[])?.map(Vl(S,{typeForm:n}))]},`section-${t}`))),ar(T?S("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),rr=(e,t)=>e.filter((e=>!e?.condition||e?.condition.values.find((n=>{const a=t?.[e?.condition?.name??""];return n===(a?.key??a)})))),sr=[{columns:2,inputs:[{name:"surname",required:!0,dadata:!0},{name:"name",required:!0,dadata:!0},{name:"middleName",dadata:!0},{name:"limitedBirthday",required:!0},{name:"phone",required:!0},{name:"email",required:!0,dadata:!0}]},{inputs:[{name:"processPersonalDataFlg",required:!0},{name:"consentProviderFlg",required:!0},{name:"consentOthersFlg",required:!0},{name:"consentInformFlg"},{name:"consentPfrFlg"}]}],or=d((({field:e,input:t})=>{const n="addressFact",a=e(n).value,{value:r}=e("addressMatch");i((()=>{r&&e("addressFact")?.onChange?.(e("addressRegistration").value)}),[r,e("addressRegistration").value]);const s=l((t=>{e?.(n)?.onChange?.({apartment:t?.data?.flat,city:t?.data?.city,district:t?.data?.area_with_type,fullAddress:t?.value,fiasCode:t?.data?.fias_id,house:t?.data?.house,locality:t?.data?.settlement_with_type,okatoRegionCode:t?.data?.okato,postcode:t?.data?.postal_code,region:t?.data?.region,regionCode:t?.data?.region_kladr_id?t?.data?.region_kladr_id.substring(0,2):"",street:t?.data?.house,qc:t?.data?.qc,qcComplete:t?.data?.qc_complete,qcHouse:t?.data?.qc_house})}),[]),c=l((t=>{e?.(n)?.onChange?.({apartment:"",city:"",district:"",fullAddress:t,fiasCode:"",house:"",locality:"",okatoRegionCode:"",postcode:"",region:"",regionCode:"",street:"",qc:"",qcComplete:"",qcHouse:""})}),[]);return o(kn,{label:"Адрес",disabled:r,...ca(e(n),ra[n],t?.required),value:a?.fullAddress,onChange:c,...t,onDaDataChange:s})})),cr=d((({field:e,input:t})=>o(Xi,{text:"Адрес фактического места жительства совпадает с адресом регистрации",...ca(e("addressMatch"),ra.addressMatch,t?.required)}))),dr="/icons/MapMarkerClusterIcon.svg",mr="/icons/MapMarkerClusterYellowIcon.svg";function ur({yandexMaps:e,map:t,points:n,isLoad:a}){if(a||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const i=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),l=hr("offices",e,i);if(n.length&&n.every((e=>"type"in e))){const a=hr("workplaces",e,i),r=pr(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=pr(n.filter((e=>"offices"===e.type)),"offices",e);l.add(s),a.add(r),t.geoObjects.add(a),t.geoObjects.add(l)}else{const a=pr(n,"offices",e);l.add(a),t.geoObjects.add(l)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const hr=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?dr:mr,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),pr=(e,t,n)=>e.map((({coords:e,content:a})=>new n.Placemark(e,{balloonContentHeader:a?.header,balloonContentBody:a?.body,balloonContentFooter:a?.footer,hintContent:a?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?dr:mr,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),gr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},fr={...gr,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},xr=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(fr).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"})}),br=e=>globalThis[e],yr=(e,t)=>{const n=document.getElementById(t);if(n){const t=br(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(br(e))}))}))}return new Promise(((n,a)=>{const i=document.createElement("script");i.src=t,i.async=!0,i.id=t,i.addEventListener("load",(()=>{n(br(e))})),i.addEventListener("error",(e=>{a(e)})),document.head.appendChild(i)}))};const vr=()=>function(e,t,n=!0){const[l,r]=a(void 0);return i((()=>{let a=!0;return yr(e,t).then((e=>{a&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(a=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${A.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),Nr={...gr,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},wr=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),a="in"===t?n+1:n-1;e.current.setZoom(a,{checkZoomRange:!0})},className:`${Object.values(Nr).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),Cr=[55.753995,37.614069],Sr=d((({points:e,className:t="",zoom:n=5,isLoad:a,selectedAddress:l})=>{const r=s(null),d=s(null),m=vr();if(i((()=>{r.current?ur({yandexMaps:m,map:r.current,points:e,isLoad:a}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:kr(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),ur({yandexMaps:m,map:r.current,points:e,isLoad:a})})),r.current&&l&&m?.geocode(l).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();r.current.setCenter(t),r.current.setZoom(18)}))}),[m,e,n,a,l]),!m)return null;const h="z-10";return c("div",{ref:d,className:u("relative","w-full",t),children:[a?o(jl,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(wr,{yandexMaps:r}),o(wr,{yandexMaps:r,direction:"out"})]}),xr(r,m,u("right-2 top-80",h))]})})),kr=e=>{const t=[Tr(Ir(e,0)),Tr(Ir(e,1))];return t.every((e=>e))?t:Cr},Ir=(e,t)=>e.map((e=>e.coords?.[t])),Tr=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Rr=async(e,t,n)=>{try{return(await Br(e,t,n)).json()}catch(e){return console.error(e),null}};async function Br(e,t,n){return globalThis?.fetch?.(`${Ut}${e}`,{method:t,headers:{"Content-Type":"application/json",...Pr()},credentials:"include",body:n?JSON.stringify(n):null})}const Pr=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},Dr=e=>Number(e.toString().replace(",",".")),_r=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:i,renderFoldButton:r})=>{const[s,o]=a(n),d=l((()=>{o((e=>!e))}),[]),m=i({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 Ar=d((({className:e="",isUnfolded:t,children:n})=>{const a=s(null),l=function(e,t){const n=s(null);return i((()=>{const t=n?.current;if(!t)return;const a=new ResizeObserver((n=>{e(t,n[0])}));return a.observe(t),()=>{a.disconnect()}}),[e,...t]),n}((e=>{a.current&&(a.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:a,className:`transition-max-h duration-300 overflow-hidden ${a.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:l,children:n})})})),Er=d((({value:e,subText:t,children:n,isPhone:a,...i})=>{const l=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[l.length,n,t].every((e=>!e))?null:Mr({textItems:l,subText:t,children:n,isPhone:a,...i})})),Mr=({label:e,labelSize:t="text-m",textItems:n,subColor:a,subText:i,className:l,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",l),children:[e?o(Ee,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Or(n,s),i?o(Ee,{color:a,size:"text-m",children:i}):null]}),Or=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Ee,{size:"text-l",children:t?o("a",{href:`tel:${zr(e)}`,children:e.trim()}):e.trim()},String(n)))),zr=e=>e.replace(/\D/g,""),Fr=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}))),Vr=e=>{const t=$r(e);return o(Er,{label:"Режим работы",value:t,className:"max-w-none"})},Lr=({workTime:e="",lunchHour:t="",daysOff:n=""},a=!1)=>e?[`${a?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",$r=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))),a=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Lr({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":a}),Lr({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:a},!0)].filter(Boolean)},jr=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],qr=e=>jr.map((([t,n,a])=>({key:t,title:a,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??"")}}))),Ur=e=>{if(!e)return null;const t=Wr(e);return c(Fr,{className:"border-none",children:[o(Er,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Hr)})}),o(Er,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]})},Wr=e=>{const t=jr.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],a=n[n.length-1]?.toLowerCase();return a?.includes("выходной")?t.map((e=>({...e,status:!a?.includes(e.short.toLowerCase())}))):t},Hr=({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(Ee,{size:"text-xs",children:e})},String(n)),Yr=({currency:e,buyExchangeRate:t,saleExchangeRate:n},a)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Er,{label:"Валюта",value:e.currency}):null,t?o(Er,{label:"Купить",value:String(t)}):null,n?o(Er,{label:"Продать",value:String(n)}):null]},String(a)),Gr={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"}},Kr=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",Gr[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(Ee,{size:"text-m",color:Gr[n].text,children:t})]}))),Xr=(new Date).getDay(),Jr=e=>{const[t]=e?.slice(Xr-1)??[];if(!t)return null;const{lunchHour:n,status:a,workTime:i,hasLunch:l}=t;return a?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[i?o(Kr,{color:"green",children:i}):null,n&&l?o(Kr,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Kr,{color:"red",children:"Выходной"})},Zr=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",Qr=({title:e,status:t,workTime:n,lunchHour:a,hasLunch:i},l)=>o(Er,{label:e,value:t&&n?n:"",subText:Zr({lunchHour:a,hasLunch:i,status:t}),subColor:!t||i?"text-error":"text-green-dark"},String(l)),es=["ArrowDownIcon","ArrowUpIcon"],ts=["Подробнее","Скрыть"],ns=({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:ts[Number(e)]}),o(W,{className:"text-primary-text",name:es[Number(e)],width:"16",height:"16"})]}),as=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,is=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,ls=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,rs=({name:e,address:t,phone:n,fax:a,phoneBusiness:i,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=qr(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ee,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),Jr(h)]}),o("div",{className:"hidden sm:block",children:ss({phone:n,fax:a,phoneBusiness:i,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(_r,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ar,{isUnfolded:e,children:ss({phone:n,fax:a,phoneBusiness:i,phoneNatural:l,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ns({isUnfolded:e,onToggle:t})})]},String(u))},ss=({phone:e,fax:t,phoneBusiness:n,phoneNatural:a,phoneCallCentre:i,phoneCurrencyControl:l,workSchedule:r,exchangeRate:s})=>{const d=qr(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Fr,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Er,{label:"Факс",value:t,isPhone:!0}),o(Er,{label:"Телефон филиала",value:e,isPhone:!0}),o(Er,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Er,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(Er,{label:"Для консультаций по валютному контролю",value:l,isPhone:!0}),o(Er,{label:"Контакт-центр",value:i,isPhone:!0})]}),r?.isMatchesPattern?o(Fr,{children:o(Er,{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(Qr)})})}):c(Fr,{children:[o(Er,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Hr)})}),Vr(d)]}),r?.businessScheduleVisibleTag?Ur(r?.businessScheduleDescription):null,s?.currencies?.length?o(Fr,{className:"flex-wrap",children:s?.currencies?.map(Yr)}):null]})},os=({name:e="",address:t="",workSchedule:n})=>{const a=(i=e)?`${i?.charAt(0)?.toUpperCase()}${i?.slice(1)}`:"";var i;const l=`${t} ${(e=>{const t=qr(e),n=e?$r(t):"",a=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?as(n):ls(n,a):is(n):""})(n)}`;return{header:a,body:l}},cs={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},ds={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},ms={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)},us=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>ms[t](e)))))},hs=()=>{},ps=({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:a=hs,getBalloonRemoteWorkplaces:i=hs})=>{const[l,s,o,c]=r((()=>{const l=us(e,n),r=us(t,n),s=[...l.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a(e)}))),...r.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:i({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[l,s,r,l.length+r?.length]}),[e,t,n,a,i]);return{filteredItems:l,points:s,filteredRemoteWorkplaces:o,lengthItems:c}},gs=e=>{const{data:t,error:n}=ya(`/api/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,fs);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},fs=async e=>await Pt(e,{method:"POST"})||[],xs=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),bs=d((({children:e})=>xs?e:null)),ys=d((({field:e,input:t})=>{const[n,l]=a([]),{data:r}=gs("REGION_RF"),s=e("regionRetail")?.value||{},d=e("addressRetail");i((()=>{(async()=>{const e=await(async e=>{const t=await Rr("/public-data/regionOffices","POST",{regionRfCd:{key:e},cashCardFlg:!0});return t?.offices?.map((e=>({...e,gpsLatitude:Dr(e.latitude??Cr[0]),gpsLongitude:Dr(e.longitude??Cr[1])})))||[]})(s?.key??"");l(e)})(),s?.key&&e?.("addressRetail")?.onChange?.("")}),[s.key]);const{points:m}=ps({data:n,filtrationState:{},getBalloon:os}),u=Boolean(s?.key);return c("div",{children:[o(Mn,{label:"Адрес отделения",placeholder:"Выберите отделение",options:n.map((({id:e,address:t=""})=>({key:e?.toString()||"",text:t}))),...ca(e("addressRetail"),ra.addressRetail,t?.required&&u),isSearch:!0}),o("div",{className:"h-[600px]",children:o(bs,{children:o(Sr,{points:m,isLoad:!r,className:"h-full",selectedAddress:d?.value?.text})})})]})})),vs=Ft((({field:e,source:t,fieldName:n,input:a,placeholder:i="Выберите из списка",options:l,...r})=>{const s=t?.map((e=>({key:e.key||"",text:e.value})))||[];return o(Mn,{placeholder:i,options:s,...ca(e(n),ra[n],a?.required),...r})})),Ns=d((({field:e,input:t})=>{const{data:n}=gs("EMPLOYEES_NUMBER"),a=Fi();return i((()=>{n&&(a.amountWorkers=n)}),[n]),o(vs,{field:e,source:a.amountWorkers??[],label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),ws=d((({field:e,input:t})=>o(Xi,{text:"Наличие военного билета",...ca(e("armyIdFlg"),ra.armyIdFlg,t?.required)}))),Cs=d((({field:e,input:t})=>o(kn,{label:"Код представителя Банка",placeholder:"Введите код",isInteger:!0,...ca(e("bankEmployeeCode"),ra.bankEmployeeCode,t?.required),...t}))),Ss=d((({field:e,input:t})=>o(Xi,{text:"В отношении меня ведётся производство по делу о банкротстве",...ca(e("bankruptcyFlg"),ra.bankruptcyFlg,t?.required)}))),ks=d((({field:e,input:t})=>o(di,{label:"Дата начала работы на текущем месте",...ca(e("beginDate"),ra.beginDate,t?.required),...t}))),Is=d((({field:e,input:t})=>o(kn,{label:"Место рождения",...ca(e("birthPlace"),ra.birthPlace,t?.required),...t,disabled:t?.filledByEsia&&Ui(e,"birthPlace")}))),Ts=e=>{try{return JSON.parse(String(e))}catch(e){return null}};function Rs(e){const t=globalThis.localStorage?.getItem(e),[n,i]=a(t?Ts(t):null);return[n,l((t=>{i((n=>{const a=t instanceof Function?t(n):t;return globalThis.localStorage?.setItem(e,JSON.stringify(a)),a}))}),[e])]}const Bs=d((({field:e,input:t})=>{const[n,l]=a([]),[r]=Rs("programId"),{value:s,onChange:c}=e("cardCategory"),d=e("paymentSystem")?.value?.key;return i((()=>{d&&r&&(async()=>{const e=await(async(e,t)=>{const n=await Rr("/dictionaryFiltered","POST",{type:"CARD_TYPE",presets:{paymentSystemTypeCd:e,creditProgramId:t}});return Array.isArray(n)?n:[]})(d,r);l(e),Ps(e,s)||c&&c(null)})()}),[d]),o(vs,{field:e,source:n,label:"Категория карты",fieldName:"cardCategory",input:t})})),Ps=(e,t)=>e.some((e=>e.key===t?.key)),Ds=d((({field:e,input:t})=>o(kn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",isInteger:!0,...ca(e("children"),ra.children,t?.required),...t}))),_s=d((({field:e,input:t})=>o(kn,{label:"Кодовое слово",...ca(e("codeWord"),ra.codeWord,t?.required),...t}))),As=d((({field:e,input:t})=>{const{data:n}=gs("INCOME_CERT_UNITED");return o(vs,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),Es=d((({field:e,input:t})=>{const{data:n}=gs("MILITARY_STATUS");return o(vs,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),Ms={processPersonalDataFlg:{text:"Согласие на обработку персональных данных",docId:4},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentOthersFlg:{text:"Прочие согласия",docId:1},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3}},Os=d((({src:e,convertToPng:t,onClose:n,onDocumentRead:a})=>c(Gl,{className:"my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0",onClose:n,children:[t?o("img",{src:e}):o("iframe",{src:`${e}#toolbar=0`,className:"w-full h-[80vh]",id:"iframe-dialog"}),o(Hl,{className:"mx-auto mt-m",type:"button",onClick:()=>{a?.(),n?.()},children:"Ознакомиться"})]}))),zs=(e,t)=>{const{open:n}=sn(Os),a=ke();return l((async()=>{if(e){const i=URL.createObjectURL(await(async(e,t=!1)=>{const n=await Br(`/feedback/file?id=${encodeURIComponent(e)}&convertToPngFlg=${t}`,"GET");return n?await n.blob():new Blob})(e,a));n({src:i,onDocumentRead:t})}}),[n,e,a])},Fs=d((({className:e,error:t,docId:n,...a})=>{const i=zs(n,(()=>a.onChange?.(!0)));return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(xi,{...a}),n?o(Ne,{className:"text-primary-main",onClick:i,children:o(Ee,{children:"Ознакомиться"})}):null]}),bn(t)]})})),Vs=d((({field:e,input:t})=>t&&t.name?o(Fs,{text:Ms[t.name]?.text,docId:Ms[t.name]?.docId,...ca(e(t.name),ra[t.name],t?.required)}):null)),Ls=Math.round(29.5),$s=d((({className:e,title:t,children:n,...a})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...a,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),js="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",qs="flex flex-col lg:w-1/2 gap-2xl",Us="flex flex-col gap-y-xl min-w-52",Ws=d((({value:e,fractionDigits:t,fixed:n,prefix:a,postfix:i})=>o(Ee,{size:"text-h3",children:"number"==typeof e?[a,He(t,{fixed:n})(e),i].filter(Boolean).join(" "):e}))),Hs=d((({className:e,title:t,value:n,color:a="text-secondary-text",...i})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Ee,{size:"text-l",font:"font-light",color:a,children:t}):null,n?o(Ws,{value:n,...i}):o(Ee,{size:"text-h3",children:"-"})]}))),Ys=(e=[],t=!1)=>Gs([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Gs=(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]},Ks=(e,t=0)=>e?.sum?e.sum:t,Xs=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Js=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Zs=({min:e=0,max:t=0,availableMonths:n,...a})=>o(Aa,{items:[`От ${Qs(e)}`,`До ${Qs(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...a}),Qs=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,eo=({items:e,title:t,mobileTitle:n=t,orientation:a="horizontal",value:i,onChange:l,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Ee,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Ee,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(El,{orientation:a,items:e,value:e[i?0:1].id,onChange:t=>l&&l(t===e[0].id),...r})]}),to=e=>eo({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),no=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...a})=>o(Aa,{items:e?[`От ${He(1)(a.min||0)} ${n}`,`До ${He(1)(a.max||0)} ${n}`]:[],step:t,...a}),ao=({field:e,defParams:t,calcParams:n,map:a,monthsValue:i="maxMonths"})=>{Object.entries(a).forEach((([n,a])=>{e?.(n)?.onChange?.(t?.[a])})),e?.("monthsValue")?.onChange?.(Ra(t?.[i],n.minMonths,n.maxMonths))},io=(e,t)=>{const{isAnnuity:n,moneyValue:a,monthsValue:i,moneyExtra:l}=t;if(0===e)return 0;if(n){const t=e/1200;return l?(a+l)*(t+t/(Math.pow(1+t,i)-1)):a*(t+t/(Math.pow(1+t,i)-1))}return Math.round(a/i)+a*(e/1200)},lo=e=>e,ro=(e=lo)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),so=ro(),oo=(e=lo)=>ro((t=>-e(t))),co=oo(),mo=([e,t],n,a=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:uo([e,t],a),uo=([e,t],n=[])=>({[e]:n.length?co(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?so(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ho=(e,[t,n],a)=>e>=a[t]&&e<=a[n],po={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},go=e=>fo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&fo({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&fo({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&fo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),fo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],xo=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.rateRows||[po],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>go({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=mo(["minSum","maxSum"],r,l),{minMonths:c,maxMonths:d}=mo(["minMonths","maxMonths"],r,l),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i})=>e?.find((e=>go({row:e,userInputParams:t,paramsViewSettings:n})&&ho(a,["minSum","maxSum"],e)&&ho(i,["minMonths","maxMonths"],e)))||po)({rateRows:l,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i}),{rate:u}=m,h=io(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:a,monthsValue:i,monthlyPayment:h}},bo=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),yo={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},vo=Ft((({className:e,title:t,calcSource:n,buttons:a,footnote:l,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const h=(p=n?.rateRows,Gs([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:f,isDirty:x}]=an({moneyValue:Ks(s,2e5),monthsValue:Xs(s,Ls),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)});i((()=>{x&&d?.(g)}),[g,x]);const b=xo(g,n,r),y=to({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:v}=f("moneyValue"),{onChange:N}=f("monthsValue");return i((()=>{v&&v(Ra(g.moneyValue,b.minSum,b.maxSum))}),[b.minSum,b.maxSum]),i((()=>{N&&N(Ra(g.monthsValue,b.minMonths,b.maxMonths))}),[b.minMonths,b.maxMonths]),i((()=>{!bo(s)&&h&&ao({field:f,defParams:h,calcParams:b,map:yo,monthsValue:"minMonths"})}),[n,s]),o($s,{className:e,title:t,...m,children:c("section",{className:u(js,e),children:[c("div",{className:qs,children:[no({title:"Сумма кредита, ₽",step:500,min:b.minSum,max:b.maxSum,...f("moneyValue"),value:b.moneyValue}),Zs({title:"Срок кредита, месяцев",min:b.minMonths,max:b.maxMonths,...f("monthsValue"),value:b.monthsValue}),No({...b,...r},f),o("div",{className:"sm:hidden",children:y})]}),c("div",{className:u(Us,"@4xl:w-1/2"),children:[o(Hs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Hs,{title:"Ставка",value:b?.rate,fractionDigits:2,postfix:"%"}),o(Hs,{title:"Ежемесячный платёж",value:b.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:y}),je(a,{isVertical:!0}),Js(l)]})]})})})),No=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(xi,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(xi,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(xi,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(xi,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),wo="calculator",Co=d((({field:e,params:t})=>{const n=l((t=>{e(wo).onChange?.(t)}),[]);return o(vo,{...t?.calcData,padding:"p-0",defaultParams:ko(e(wo).value),onChange:n})})),So={moneyValue:"sum",monthsValue:"period",isInsurance:"isEnableInsurance",isPensionClient:"isEnablePensionClient",isStateEmployee:"isEnableStateEmployee",isSalaryClient:"isEnableSalaryClient",isAnnuity:"isAnnuity"},ko=(e,t=!1)=>{const n=t?Io(So):So;return Object.fromEntries(Object.entries(e??{}).map((([e,t])=>[n[e],t])))},Io=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e]))),To=d((({field:e,input:t})=>{const{data:n}=gs("CREDIT_IN_RSHB");return o(vs,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком /\n вкладчиком с долей участия более 20% уставного капитала руководителем,\n которого Вы являетесь, кредит в АО «Россельхозбанк»",fieldName:"creditInRshbCd",input:t,disabled:!e?.("shareholderFlg")?.value})})),Ro=d((({className:e,label:t,onChange:n,error:a,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(El,{label:mn({label:t,errors:i?.errors}),onChange:e=>n&&n(e),...i}),bn(a)]}))),Bo=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("currency");return o(Ro,{label:"Валюта",orientation:"horizontal",items:[{id:"810",text:"Рубли"}],value:n,onChange:e=>a?.(e),...ca(e("currency"),ra.currency,t?.required)})})),Po=d((({field:e,input:t})=>o(di,{label:"Дата доставки",...ca(e("deliveryDate"),ra.deliveryDate,t?.required)}))),Do=d((({field:e,input:t})=>o(kn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",isInteger:!0,maxLength:2,...ca(e("dependents"),ra.dependents,t?.required),...t}))),_o=d((({field:e,input:t})=>o(Xi,{text:"Являюсь инвалидом",...ca(e("disablePeopleFlg"),ra.disablePeopleFlg,t?.required)}))),Ao="dulIssueDateField",Eo=d((({field:e,input:t})=>o(di,{label:"Дата выдачи",...ca(e(Ao),ra.dulIssueDateField,t?.required),disabled:t?.filledByEsia&&Ui(e,Ao)}))),Mo="dulIssuedBy",Oo=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("dulSubdivisionCode"),i=l((e=>{a?.(e?.data?.code?.replace("-",""))}),[]);return o(kn,{disabled:t?.filledByEsia&&Ui(e,Mo),label:"Кем выдан",...t,...ca(e(Mo),ra.dulIssuedBy,t?.required),onDaDataChange:i,daDataQueryPrefix:n})})),zo=d((({field:e,input:t})=>o(kn,{disabled:t?.filledByEsia&&Ui(e,"dulNumber"),label:"Номер документа",isInteger:!0,maxLength:6,...ca(e("dulNumber"),ra.dulNumber,t?.required)}))),Fo=d((({field:e,input:t})=>o(kn,{disabled:t?.filledByEsia&&Ui(e,"dulSerie"),label:"Серия документа",isInteger:!0,maxLength:4,...ca(e("dulSerie"),ra.dulSerie,t?.required)}))),Vo="dulSubdivisionCode",Lo=d((({field:e,input:t})=>{const n=l((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(kn,{disabled:t?.filledByEsia&&Ui(e,Vo),label:"Код подразделения",isInteger:!0,maxLength:6,...t,...ca(e(Vo),ra.dulSubdivisionCode,t?.required),onDaDataChange:n})})),$o=d((({field:e,input:t})=>{const{data:n}=gs("EDUCATION_LEVEL");return o(vs,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),jo=d((({field:e,input:t})=>{const{data:n}=gs("ORGANIZATION_ACTIVITY_TYPE"),a=Fi();return i((()=>{n&&(a.employerActivities=n)}),[n]),o(vs,{field:e,source:a.employerActivities??[],label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),qo=d((({field:e,input:t})=>{const{data:n}=gs("ORGANIZATION_KIND"),a=Fi();return i((()=>{n&&(a.employerOrganization=n)}),[n]),o(vs,{field:e,source:a.employerOrganization??[],label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),Uo=d((({field:e,input:t})=>{const{data:n}=gs("EMPLOYMENT_INFO_UNITED");return o(vs,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),Wo=d((({field:e,input:t})=>o(kn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",isInteger:!0,...ca(e("expenses"),ra.expenses,t?.required),...t}))),Ho="experience5Years",Yo=d((({field:e,input:t})=>{const n=l((t=>e(Ho)?.onChange?.(String(Ra(Number(t),0,5)))),[]);return o(kn,{label:"Стаж",placeholder:"За последние 5 лет",type:"number",...ca(e(Ho),ra[Ho],t?.required),...t,onChange:n})})),Go=d((({field:e})=>{const{value:t,onChange:n}=e("familyMembers"),a=e("familyStatus")?.value?.key,l="MARRIED"===a?2:1,r=Number(e("children")?.value),s=Number(e("dependents")?.value),c=l+r+s;return i((()=>{e?.("familyMembers")?.onChange?.(c)}),[a,r,s]),o(kn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",disabled:!0,value:t,onChange:e=>n?.(e)})})),Ko=d((({field:e,input:t})=>{const{data:n}=gs("MARITAL_STATUS");return o(vs,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),Xo=d((({field:e,input:t})=>o(kn,{label:"Общий стаж",type:"number",maxLength:2,placeholder:"Количество лет",...ca(e("generalSeniority"),ra.generalSeniority,t?.required),...t}))),Jo=d((({field:e,input:t})=>{const{data:n}=gs("HOUSE_TYPE");return o(vs,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Zo=d((({__html:e,icon:t="InfoCircleIcon",iconVersion:n="black",link:a})=>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})}),c("div",{className:"",children:[o(_e,{__html:e}),a?.text?o(Ne,{className:"text-primary-main",children:a.text}):null]})]}))),Qo=d((({input:e})=>o(Zo,{__html:e?.label}))),ec=d((({field:e,input:t})=>o(kn,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",isInteger:!0,maxLength:2,...ca(e("jobsNumber"),ra.jobsNumber,t?.required),...t}))),tc=d((({field:e,input:t})=>o(kn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",maxLength:2,...ca(e("lastJobExperience"),ra.lastJobExperience,t?.required),...t}))),nc=d((({field:e,input:t})=>o(kn,{label:"Наименование юридического лица",...t,...ca(e("legalEntityName"),ra.legalEntityName,t?.required),disabled:!e?.("shareholderFlg")?.value}))),ac=d((({field:e,input:t})=>o(kn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...ca(e("legalForm"),ra.legalForm,t?.required),...t}))),ic="limitedBirthday",lc=d((({field:e,input:t})=>o(di,{label:"Дата рождения",...ca(e(ic),ra.limitedBirthday,t?.required),disabled:t?.filledByEsia&&Ui(e,ic)}))),rc=d((({field:e,input:t})=>o(kn,{label:"Обязательные выплаты",placeholder:"Введите значение",isInteger:!0,...ca(e("mandatoryPayments"),ra.mandatoryPayments,t?.required),...t}))),sc=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],oc=d((({field:e,input:t})=>o(Ro,{orientation:"horizontal",items:sc,...ca(e("methodObtain"),ra.methodObtain,t?.required)}))),cc=d((({field:e,input:t})=>{const{data:n}=gs("ORGANIZATION_TYPE"),a=Fi();return i((()=>{n&&(a.organization=n)}),[n]),o(vs,{field:e,source:a.organization??[],label:"Тип организации",fieldName:"organization",input:t})})),dc=d((({field:e,input:t})=>{const n=Fi(),a=l((t=>{e?.("inn")?.onChange?.(t.data?.inn),Yi(n,e,t)}),[]);return o(kn,{label:"Наименование организации",...t,...ca(e("organizationName"),ra.organizationName,t?.required),onDaDataChange:a})})),mc=d((({field:e,input:t})=>o(kn,{label:"Иные доходы",placeholder:"Введите значение",isInteger:!0,...ca(e("otherIncome"),ra.otherIncome,t?.required),...t}))),uc=d((({field:e,input:t})=>o(di,{label:"Дата регистрации по месту жительства",...ca(e("participantDateRegistration"),ra.participantDateRegistration,t?.required)}))),hc="partInBusiness",pc=d((({field:e,input:t})=>{const n=l((t=>e(hc)?.onChange?.(String(Ra(Number(t),0,100)))),[]);return o(kn,{label:"Доля участия в бизнесе",placeholder:"в %",isInteger:!0,maxLength:3,...ca(e(hc),ra.partInBusiness,t?.required),...t,onChange:n})})),gc=e=>e.map((e=>({key:e.type,text:e.name}))),fc=d((({field:e,input:t})=>{const{value:n,onChange:r}=e("paymentSystem"),[s]=Rs("programId"),[c,d]=a([]);i((()=>{s&&(async()=>{const e=await(async e=>{const t=await Rr("/public-data/creditProgramConditions","POST",{creditProgramId:e});return gc(t?.paymentSystems||[])})(s);d(e||[])})()}),[]);const m=l((e=>r?.(c?.find((t=>t.key===e)))),[c,r]);return o(Ro,{label:"Платежная система",orientation:"horizontal",items:xc(c),...ca(e("paymentSystem"),ra.paymentSystem,t?.required),value:n?.key,onChange:m})})),xc=e=>e?.map((e=>({id:e.key,text:e.text})))??[],bc=d((({field:e,input:t})=>{const{data:n}=gs("POSITION");return o(vs,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),yc=d((({field:e,input:t})=>{const{data:n}=gs("REGION_RF"),a=n?.map((({key:e,value:t})=>({key:e,text:t})));return o(Mn,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:a,...ca(e("regionRetail"),ra.regionRetail,t?.required)})})),vc=d((({field:e,input:t})=>o(kn,{label:"Пенсионные доходы",placeholder:"Введите значение",isInteger:!0,...ca(e("retirementIncome"),ra.retirementIncome,t?.required),...t}))),Nc=["male","female"],wc=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],Cc=d((({field:e,input:t})=>{const n=e("name")?.value,{value:a,onChange:l}=e("sex");return i((()=>{n&&!a&&(async()=>{const e=await(async e=>{const t=await Rr("/suggestions/suggest/fio","POST",{query:e,count:1,parts:["NAME"]}),n=t?.suggestions[0]?.data?.gender?.toLowerCase()||"";return Nc.includes(n)?n:""})(n);e&&l?.(e)})()}),[]),o(Ro,{label:"Пол",orientation:"horizontal",items:wc,...ca(e("sex"),ra.sex,t?.required)})})),Sc=d((({field:e,input:t})=>o(Xi,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...ca(e("shareholderFlg"),ra.shareholderFlg,t?.required)}))),kc=d((({children:e,onChange:t,maxLength:n,...a})=>{const i=l((e=>n?e.length<=n&&t?.(Ya(e,"___-___-___ __")):t?.(Ya(e,"___-___-___ __"))),[t]),r=l((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(fn,{...a,onChange:i,onFocus:e=>i(e?.target?.value||""),onBlur:e=>r(e?.target?.value||""),children:e})})),Ic=d((({className:e,label:t,value:n,error:a,onChange:i,onBlur:l,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(kc,{"aria-label":t,label:mn({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:i,onBlur:l,placeholder:"___-___-___ __",...r}),bn(a)]}))),Tc=d((({field:e,input:t})=>o(Ic,{label:"СНИЛС",maxLength:14,...ca(e("snils"),ra.snils,t?.required),...t}))),Rc=d((({field:e,input:t})=>o(kn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...ca(e("totalIncome"),ra.totalIncome,t?.required),...t}))),Bc=d((({field:e,input:t})=>o(kn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...ca(e("wages"),ra.wages,t?.required),...t}))),Pc={limitedBirthday:e=>o(lc,{...e})},Dc={processPersonalDataFlg:e=>o(Vs,{...e}),consentProviderFlg:e=>o(Vs,{...e}),consentOthersFlg:e=>o(Vs,{...e}),consentInformFlg:e=>o(Vs,{...e}),consentPfrFlg:e=>o(Vs,{...e})},_c={organization:e=>o(cc,{...e}),organizationAddress:e=>o(Wi,{...e}),organizationPhone:e=>o(xl,{...e}),organizationName:e=>o(dc,{...e}),legalForm:e=>o(ac,{...e}),generalSeniority:e=>o(Xo,{...e}),lastJobExperience:e=>o(tc,{...e}),experience5Years:e=>o(Yo,{...e}),jobsNumber:e=>o(ec,{...e}),beginDate:e=>o(ks,{...e}),addressFact:e=>o(or,{...e}),addressRegistration:e=>o(Wi,{...e}),addressRetail:e=>o(ys,{...e}),addressMatch:e=>o(cr,{...e}),sex:e=>o(Cc,{...e}),limitedBirthday:e=>o(lc,{...e}),birthPlace:e=>o(Is,{...e}),education:e=>o($o,{...e}),housing:e=>o(Jo,{...e}),amountWorkers:e=>o(Ns,{...e}),employment:e=>o(Uo,{...e}),employerActivities:e=>o(jo,{...e}),employerOrganization:e=>o(qo,{...e}),positionOrganization:e=>o(bc,{...e}),familyStatus:e=>o(Ko,{...e}),familyMembers:e=>o(Go,{...e}),children:e=>o(Ds,{...e}),dependents:e=>o(Do,{...e}),totalIncome:e=>o(Rc,{...e}),expenses:e=>o(Wo,{...e}),snils:e=>o(Tc,{...e}),conscription:e=>o(Es,{...e}),armyIdFlg:e=>o(ws,{...e}),dulSerie:e=>o(Fo,{...e}),dulNumber:e=>o(zo,{...e}),dulIssueDateField:e=>o(Eo,{...e}),dulSubdivisionCode:e=>o(Lo,{...e}),dulIssuedBy:e=>o(Oo,{...e}),participantDateRegistration:e=>o(uc,{...e}),retirementIncome:e=>o(vc,{...e}),otherIncome:e=>o(mc,{...e}),wages:e=>o(Bc,{...e}),mandatoryPayments:e=>o(rc,{...e}),disablePeopleFlg:e=>o(_o,{...e}),bankruptcyFlg:e=>o(Ss,{...e}),shareholderFlg:e=>o(Sc,{...e}),legalEntityName:e=>o(nc,{...e}),creditInRshbCd:e=>o(To,{...e}),bankEmployeeCode:e=>o(Cs,{...e}),partInBusiness:e=>o(pc,{...e}),regionRetail:e=>o(yc,{...e}),infoCard:e=>o(Qo,{...e}),calculator:e=>o(Co,{...e}),confirmationIncome:e=>o(As,{...e})},Ac={addressCourier:e=>o(Wi,{...e}),paymentSystem:e=>o(fc,{...e}),currency:e=>o(Bo,{...e}),cardCategory:e=>o(Bs,{...e}),codeWord:e=>o(_s,{...e}),methodObtain:e=>o(oc,{...e}),deliveryDate:e=>o(Po,{...e})},Ec=d((({inputs:e=[],field:t,key:n})=>{const a=e.every((e=>Boolean(t(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(oa(t(e?.name),ra[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(_r,{isFoldButtonOnTop:!0,unfoldedByDefault:!0,renderFoldableSection:({isUnfolded:n})=>o(Ar,{isUnfolded:n,className:"flex flex-col pl-2xl",children:e.map(Vl(t,{},Dc))}),renderFoldButton:Mc(c("div",{children:[o(xi,{value:a,onChange:n=>{for(const a of e){const e=t(a.name);e?.onChange&&e.onChange(n)}},text:"Согласие на все документы"},n),bn(i?"Отметьте все обязательные соглашения":"")]}))})})})),Mc=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",type:"button",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),Oc=({field:e,inputs:t})=>{const{consentInputs:n,restInputs:a}=zc(t||[]);return n.length>2?c("div",{children:[a.map(Vl(e,{},{...Pc})),o(Ec,{inputs:n,field:e})]}):(t||[])?.map(Vl(e,{},{...Pc}))},zc=e=>({consentInputs:e?.filter((e=>Object.keys(Ms).includes(e.name||"")))||[],restInputs:e?.filter((e=>!Object.keys(Ms).includes(e.name||"")))||[]}),Fc=(e,t)=>o(Hl,{className:u("w-full @xl:w-auto"),type:"submit",isLoading:t,children:e?.text?e.text:"Отправить заявку"}),Vc=e=>Br("/user-data/updateUserProfile","PUT",e),Lc=e=>Br("/user-data/updateUserTask","PUT",e),$c={width:"118",height:"24"},jc={"bg-white":"color",transparent:"white"},qc={"bg-white":"text-primary-main",transparent:"text-white"},Uc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:jc[e]},className:qc[e],width:n?.width,height:n?.height}),Wc={"bg-white":"text-primary-text",transparent:"text-white"},Hc=d((({className:e,href:t="/",logo:n,children:a,targetBlank:i,bgColor:l="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:i?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...fe(s),children:[Uc(l,n?.image,$c),r?a??o("div",{className:"ml-s",children:o(Ee,{font:"font-medium",color:Wc[l],size:"",children:n?.title??"Россельхозбанк"})}):null]}))),Yc=d((({phoneNumber:e,sendCode:t,onClose:n})=>{const[r,s]=a(""),[d,m]=a(""),[u,h]=a(!1),[p,{setTrue:g,setFalse:f}]=on(!1),x=l((async()=>{g();var e;await(e={captchaText:d},Br("/sms/checkCaptcha","POST",e).then((e=>e.text())).then((e=>"ERROR"!==e)))?(n?.(),t?.()):h(!0),f()}),[d,t]),b=l((()=>{(async()=>{s(URL.createObjectURL(await(e=>Br(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET").then((async e=>e?await e.blob():new Blob)))(e)))})()}),[]);return i(b,[]),o(Gl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",head:o(Hc,{}),onClose:n,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:b,className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(fn,{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(Hl,{onClick:close,version:"secondary",children:"Вернуться"}),o(Hl,{type:"submit",disabled:!d,onClick:x,version:"secondary",children:"Отправить"})]}),p?o(jl,{blur:!1}):null]})})})),Gc=d((({time:e,setTime:t,className:n})=>(i((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:Kc(e)})))),Kc=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,Xc=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=a(0),u=s([]);i((()=>{u.current?.[d]?.focus()}),[d]);const h=l((n=>a=>{const{value:i}=a.currentTarget,l=i.slice(0,1);t(e.map(((e,t)=>t===n?l:e))),m(n+1)}),[e]),p=l((n=>a=>{const{key:i}=a;if("Backspace"===i&&!e[n]){const a=n>0?n-1:e.length-1,i=e.map(((e,t)=>t===a?"":e));t(i),m(a)}}),[e]),g=l((n=>{n.preventDefault();const a=n.clipboardData.getData("text"),i=e.map(((e,t)=>t<a.length?a[t]:e));t(i),m(i.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,a)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(a),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[a]=e},onFocus:e=>e.target.select(),onKeyDown:p(a),className:Jc(a,e,n)},a)))}),n?o("div",{className:"text-error",children:r}):null]})})),Jc=(e,t,n=!1)=>{const a=!t[e];return`w-16 sm:w-20 h-24 text-5xl text-center p-md m-2 border ${pn(!n||!a)} rounded-md caret-transparent outline-none`},Zc=d((({isDisabled:e,onClick:t,text:n})=>o(Hl,{type:"button",onClick:t,disabled:e,children:o(Ee,{font:"font-normal",children:n})}))),Qc=e=>{e&&(globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token))},ed=({values:e,onSuccess:t})=>{const[n,r]=a(""),[s,{setTrue:o,setFalse:c}]=on(!1),[d,m]=a(0),[u,h]=a(!1),[p,g]=a(0),f=l((()=>r("")),[]),x=Boolean(0===d&&u),b=p>2||x||!e.every(Boolean),y=l((async()=>{try{h(!1),m(0),g((e=>e+1)),o(),await(async e=>Rr("/sms/checkCode","POST",e).then(Qc))({smsText:e.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),f(),await(t?.(e.join("")))}catch{r(p>1?"Исчерпан лимит ввода смс-кода":"Неверный код")}finally{c()}}),[e,p]);return i((()=>{r(x?"Код просрочен":"")}),[x]),{handleSubmit:y,hasError:Boolean(n),errorText:n,isLoading:s,timeNextReq:d,isSubmitButtonDisabled:b,setTimeNextReq:m,setIsTimerStarted:h,setAttempts:g}},td=d((({phone:e,code:t=!0,codeLength:n=4,consents:r,onSuccess:s=un,onClose:d=un})=>{const[m,u]=a(Array(n).fill("")),{handleSubmit:h,hasError:p,errorText:g,isLoading:f,timeNextReq:x,isSubmitButtonDisabled:b,setTimeNextReq:y,setIsTimerStarted:v,setAttempts:N}=ed({values:m,onSuccess:s}),w=sn(Yc),C=qt(e),k=l((async()=>{var e;await(e={phoneNumber:C,smsCodesSetName:{key:"AUTHENTICATION"}},Br("/sms/sendCode","POST",e).then((e=>e.text())).then((e=>"OK"===e)))?(N(0),y(180),v(!0)):w.open({phoneNumber:C,sendCode:k})}),[C,d]);return i((()=>{k()}),[]),o(Gl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl p-m",onClose:d,children:c("div",{className:"flex flex-col gap-xl items-center rounded-md",children:[o(S,{className:"w-full",title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,headlineVersion:"XS",isEmbedded:!0,as:"h6"}),t?o(Xc,{values:m,setValues:u,errorText:g,hasError:p}):null,ad(x,y,k),c(_e,{itemSize:"list-s",children:[o("span",{children:"Вводя код, я подтверждаю, что ознакомлен и подписываю: "}),o("ul",{children:r?.map(((e,t)=>o("li",{children:e},`${e}-${t}`)))})]}),nd(b,h),f?o(jl,{blur:!1}):null]})})})),nd=(e,t)=>o(Zc,{text:"Далее",isDisabled:e,onClick:t}),ad=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-base",children:["Получить новый код можно через",o(Gc,{className:"text-base ml-1",time:e,setTime:t})]}):o(Ne,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),id={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},ld={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},rd=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],sd=d((({onSubmit:e=un,onClose:t=un})=>{const[n,i]=a(""),[r,s]=a(!1),d=zs(2),m=l((()=>{e(n)}),[e,n]),u=l((e=>{i(e),"REFUSE"===e&&s(!0)}),[]),h=r?ld:id;return o(Gl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg px-5xl",onClose:t,children:c("div",{className:"flex flex-col gap-xl items-center",children:[o("div",{role:"button",onClick:d,children:o(N,{className:"text-center text-balance",headingType:"h2",title:h.title})}),o(w,{align:"text-center",children:h.description}),o(El,{className:"whitespace-normal",orientation:"horizontal",items:rd,value:n,onChange:u}),o(Hl,{disabled:!n,type:"button",onClick:m,children:"Далее"})]})})})),od=d((({title:e,icon:t,description:n,onClick:a=un})=>c("button",{className:"flex gap-lg items-center border border-gray rounded-md cursor-pointer p-4 hover:border-green",type:"button",onClick:a,children:[o(ne,{image:{icon:t,iconVersion:"black"},width:"78",height:"78"}),c("div",{className:"w-full md:w-auto",children:[o(N,{className:"text-center md:text-left",title:e,headingType:"h5"}),n?o(w,{color:"text-secondary-text",size:"text-m",children:n}):null]})]}))),cd={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},dd={addressRegistration:"REGISTRATION",addressFact:"RESIDENTAL",organizationAddress:"WORK",addressCourier:"DELIVERY"},md={incomeAverage:"INCOME_AVERAGE",mandatoryPayments:"MANDATORY_PAYMENTS",additionalIncome:"ADDITIONAL_INCOME",otherIncome:"OTHER_INCOME",otherPayments:"OTHER_PAYMENTS",rentalIncome:"RENTAL_INCOME",wages:"WAGES",retirementIncome:"RETIREMENT_INCOME"},ud=e=>Object.entries(e).reduce(((e,[t,n])=>t in cd?[...e,{contactTypeCd:{key:cd[t]},value:n}]:e),[]),hd=e=>Object.entries(e).reduce(((e,[t,n])=>{if(t in dd){const a=Object.fromEntries(Object.entries(n??{}).filter((([e])=>!e.startsWith("qc"))).map((([e,t])=>[e,t??""])));return[...e,{addressType:{key:dd[t]},...a}]}return e}),[]),pd=e=>{const{familyStatus:t,familyMembers:n,dependents:a,children:i,confirmationIncome:l,wages:r,mandatoryPayments:s,additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u,snils:h,armyIdFlg:p,conscription:g}=e;return{maritalStatusCd:t,totalDependents:n,incomeCertificateCd:l,otherDependents:a,childrenDependents:i,militaryStatusCd:g,participantIncomes:(f={wages:r,mandatoryPayments:s,incomeAverage:gd(r,u),additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u},Object.entries(f).reduce(((e,[t,n])=>t in md?[...e,{incomeTypeCd:{key:md[t]},value:Number(n||0)}]:e),[])),snils:h?.replace(/[-\s]/g,""),armyIdFlg:p};var f},gd=(e,t)=>Number(e)+Number(t),fd={credit_cash:"10",credit_cash_single_doc:"28",credit_mcx:"39",family_offer_credit:"41",gas_engine_fuel:"33",pension_credit:"12",ref_credit:"11",ref_credit_single_doc:"29",self_employed:"34",summer_cash:"35",summer_cash_pens:"36"},xd={...fd,amur_card:"14",owner_card:"13",travel_card:"15"},bd=e=>{const t=e?.find((e=>"WAGES"===e.incomeTypeCd.key))?.value,n=e?.find((e=>"MANDATORY_PAYMENTS"===e.incomeTypeCd.key))?.value,a=e?.find((e=>"ADDITIONAL_INCOME"===e.incomeTypeCd.key))?.value,i=e?.find((e=>"OTHER_INCOME"===e.incomeTypeCd.key))?.value,l=e?.find((e=>"OTHER_PAYMENTS"===e.incomeTypeCd.key))?.value,r=e?.find((e=>"RENTAL_INCOME"===e.incomeTypeCd.key))?.value,s=e?.find((e=>"RETIREMENT_INCOME"===e.incomeTypeCd.key))?.value;return{wages:t,mandatoryPayments:n,incomeAverage:gd(t,s),additionalIncome:a,otherIncome:i,otherPayments:l,rentalIncome:r,retirementIncome:s}},yd=e=>{const t=e?.find((e=>"REGISTRATION"===e.addressType.key)),n=e?.find((e=>"RESIDENTAL"===e.addressType.key)),a=e?.find((e=>"WORK"===e.addressType.key));return{addressRegistration:t,addressFact:n,organizationAddress:a}},vd=e=>{const t=e?.find((e=>"EMAIL"===e.contactTypeCd.key))?.value,n=e?.find((e=>"MAIN_PHONE"===e.contactTypeCd.key))?.value,a=e?.find((e=>"ORGANIZATION_PHONE"===e.contactTypeCd.key))?.value;return{email:t,phone:n,organizationPhone:a}},Nd=e=>e?.key?{key:e.key,text:e.value}:void 0,wd=d((function({task:e,isFromLead:t=!1,onClose:n=un}){const a=Fi(),i=Jt(),{participants:r,creditProgram:s,id:d}=e,m=xd[s.code],u=Boolean(fd[s.code]),h=u?"/credit-lead":"/credit-card-lead",{name:p,midname:g,id:f,profile:x}=r[0],b=l((()=>{const t=(e=>{const t=e.participants[0],{classCard:n,codeWord:a,paymentSystemTypeCd:i,currencyCode:l}=e,{loanAmount:r,creditPeriod:s,paymentTypeCd:o}=e,{birthDate:c,midname:d,name:m,surname:u,birthPlace:h,dulIssueDate:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:b,educationLevelCd:y,registrationDate:v,houseTypeCd:N,genderCd:w,participantContacts:C=[],participantAddresses:S=[],employmentContractDate:k,employmentTypeCd:I,organizationName:T,organizationInn:R,organizationActivityTypeCd:B,organizationTypeCd:P,organizationKindCd:D,employeesNumberCd:_,opf:A,seniority:E,generalSeniority:M,jobsNumber:O,lastWorkDuration:z,positionCd:F,maritalStatusCd:V,childrenDependents:L,totalDependents:$,otherDependents:j,militaryStatusCd:q,participantIncomes:U,snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,nameLegalEntity:K,creditInRshbCd:X,payrollCardRshbFlg:J,consentInsuranceFlg:Z,incomeCertificateCd:Q}=t;return{currency:l?.key,paymentSystem:Nd(i),cardCategory:Nd(n),codeWord:a,limitedBirthday:c,middleName:d,name:m,surname:u,birthPlace:h,dulIssueDateField:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:b,education:Nd(y),participantDateRegistration:v,housing:Nd(N),beginDate:k,employment:Nd(I),organizationName:T,inn:R,employerActivities:Nd(B),organization:Nd(P),employerOrganization:Nd(D),amountWorkers:Nd(_),legalForm:A,generalSeniority:E?.toString(),experience5Years:M?.toString(),jobsNumber:O?.toString(),lastJobExperience:z?.toString(),positionOrganization:Nd(F),familyStatus:Nd(V),children:L?.toString(),familyMembers:$?.toString(),dependents:j?.toString(),conscription:Nd(q),confirmationIncome:Nd(Q),snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,legalEntityName:K,creditInRshbCd:Nd(X),calculator:{isInsurance:J,isSalaryClient:Z,moneyValue:r,monthsValue:s,isAnnuity:"ANNUITY"===o?.key},...bd(U),...yd(S),...vd(C),...(ee=w,ee?.key?{sex:"MAN"===ee.key?"male":"female"}:null)};var ee})(e);a.participantId=f,a.taskId=d,a.profileId=x?.id,a.programId=m,a.leadForm=t,i.assign(h)}),[]),y=l((()=>{i.assign(u?"/natural/loans/all-goals":"/natural/creditcards/svoya")}),[]),v=l((()=>{i.assign("/")}),[]);return o(Gl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:n,children:c("div",{className:"flex flex-col gap-lg mt-xs md:mt-0",children:[o(N,{className:"whitespace-pre-wrap text-center",title:`${p&&g?`${p} ${g}, `:""}мы нашли черновик вашей заявки.\nПродолжите заполнение?`,headingType:"h5"}),o(od,{title:"Перейти к черновику",icon:"BankIcon",description:"Продолжайте заполнять заявку из черновика",onClick:b}),o(od,{title:t?"Продолжить заполнение текущей заявки":"Заполнить новую заявку",icon:"DocIcon",onClick:t?n:y}),o(Hl,{type:"button",version:"secondary",className:"w-full text-h5",onClick:v,children:"Вернуться на главную"})]})})})),Cd=d((function({onClose:e=un}){const t=Jt(),n=l((()=>{t.assign("/natural/loans/all-goals")}),[]),a=l((()=>{t.assign("/")}),[]);return o(Gl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:e,children:c("div",{className:"flex flex-col gap-lg",children:[o(N,{className:"text-center",title:"Заявки не найдены",headingType:"h3"}),o(w,{size:"text-l",align:"text-center",children:"По данному номеру не найдено незавершенных заявок. Вы можете заполнить новую заявку или вернуться на главную страницу"}),o(Hl,{type:"button",className:"w-full",onClick:n,children:"Заполнить новую заявку"}),o(Hl,{type:"button",version:"secondary",className:"w-full",onClick:a,children:"Вернуться на главную"})]})})})),Sd=d((({onClose:e})=>{const t=Jt(),n=Fi(),a=l((async()=>{const e=await(n={redirectUri:t.href},Rr("/esia/getLink","POST",n));var n;e?.link&&t.assign(e.link)}),[]),i=l((()=>{if(n.leadForm){const e={...n.leadForm};delete e.esiaAccountTypeCd,n.leadForm=e}e?.()}),[]);return o(Gl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",onClose:i,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex items-center justify-around w-full px-m",children:[c("ul",{className:"list-disc",children:[o("li",{children:"Вероятность одобрения выше"}),o("li",{children:"Без справок о доходах и трудоустройстве"}),o("li",{children:"С защитой Ваших данных"})]}),o(ne,{image:{icon:"GosUslugiIcon",iconVersion:"normal"},height:"70"})]}),c("div",{className:"flex flex-wrap gap-lg w-full",children:[o(Hl,{type:"button",onClick:a,children:"Заполнить через Госуслуги"}),o(Hl,{type:"button",version:"secondary",onClick:i,children:"Пропустить"})]})]})})})),kd=()=>{const e=new URLSearchParams(decodeURIComponent(globalThis.location?.search));return{utm_campaign:e.get("utm_campaign"),utm_medium:e.get("utm_medium"),utm_source:e.get("utm_source"),utm_content:e.get("utm_content"),utm_term:e.get("utm_term")}},Id=()=>zi(),Td=({inputs:e,programId:t,nextStepLink:n})=>{const[i,r]=a(""),[s,{setTrue:o,setFalse:c}]=on(!1),d=(()=>{const e=Id();return l((({participantId:t,taskId:n,profileId:a,programId:i,formData:l})=>{e.participantId=t,e.taskId=n,e.profileId=a,e.programId=i,e.leadForm=l}),[])})(),m=(e=>{const{open:t}=sn(Sd),n=Jt();return l((()=>{t({onClose:()=>n.assign(e)})}),[t,e])})(n),u=(e=>{const{open:t}=sn(sd),n=sn(td),a=t=>async n=>{try{t&&await Vc({profile:{id:t,consentBkiFlg:!0,smsConsentBki:n}}),e()}catch(e){console.log(e)}},i=(t,i)=>async l=>{"SIGNED"===l&&t?n.open({phone:t,consents:["согласие на запрос информации в БКИ"],onSuccess:a(i)}):e()};return{open:(n,a)=>t({onSubmit:i(n,a),onClose:e})}})(m),h=sn(td),p=(()=>{const{open:e}=sn(wd),{open:t}=sn(Cd);return{open:({task:n,isFromLead:a,onClose:i})=>{n?e({task:n,isFromLead:a,onClose:i}):t({})}}})();return{handleSubmit:l((async n=>{const a=Xl(sa(e));var i;if(On(a(n)))try{o();const e=await(i={profile:{phone:qt(n.phone)}},Rr("/public-data/createUserProfile","POST",i).then((e=>e?.profile?.id||null)));if(e&&n?.phone){const a=async()=>{await Bd({programId:t,profileId:e,formData:n,saveUserData:d}),h.close(),u.open(n.phone,e)},i=async()=>{try{const n=await(async e=>{const t=await Rr("/user-data/getLastStatus","POST",e);return"DRAFT"===t?.statusCd?t?.taskId:null})({profileId:e,programId:t});if(n){const e=await(async e=>await Rr("/user-data/getTaskById","POST",e)||void 0)({taskId:n});h.close(),p.open({task:e,isFromLead:!0,onClose:a})}else await a()}catch{r("Fail")}},l=Rd(n);h.open({phone:n?.phone,consents:l,onSuccess:i}),c()}}catch{r("Fail")}}),[]),responseStatus:i,isSending:s}},Rd=e=>Object.keys(Ms).filter((t=>e[t])).map((e=>Ms[e]?.text)),Bd=async({programId:e,profileId:t,formData:n,saveUserData:a})=>{const i=Pd(n);await Vc(((e,t)=>{const{name:n="",surname:a="",middleName:i="",limitedBirthday:l="",phone:r="",email:s="",processPersonalDataFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:a,midname:i,birthDate:l&&jt(l,!0),email:s,phone:qt(r),processPersonalDataFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(t,i));const{taskId:l,participantId:r}=await(async e=>await Rr("/user-data/createDraftTask","POST",e)||{})({profileId:t,programId:e});try{await Lc((({participantId:e,taskId:t,profileId:n,formData:a})=>{const{name:i,surname:l,middleName:r,limitedBirthday:s,phone:o,email:c}=a;return{sendToBank:!0,taskKind:"SHORT",task:{taskSource:Jt().origin,id:t,participants:[{birthDate:s&&jt(s,!0),id:e,midname:r,name:i,surname:l,profile:{id:n},participantContacts:ud({phone:o&&qt(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}],marketingInfo:kd()}}})({participantId:r,taskId:l,profileId:t,formData:i}))}catch(e){console.log(e)}a({participantId:r,taskId:l,profileId:t,programId:e,formData:n})},Pd=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},Dd={surname:"",name:"",middleName:"",limitedBirthday:void 0,phone:"",email:"",processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,consentPfrFlg:!1},_d=(e,t)=>{if(t)return{...t,limitedBirthday:new Date(t?.limitedBirthday||0)};return{...Object.fromEntries(e.map((e=>[e.name,Dd[e.name||""]])))}},Ad=e=>{const{profile:t,addInfo:n,document:a,addressRegistration:i,addressFact:l}=e;return{name:t?.name,surname:t?.surname,middleName:t?.midname,limitedBirthday:t?.birthDate,phone:pl(t?.phone),email:t?.email,dulIssueDateField:a?.dulIssueDate,dulIssuedBy:a?.dulIssuedBy,dulNumber:a?.dulNumber,dulSerie:a?.dulSerie,dulSubdivisionCode:a?.dulSubdivisionCode,snils:n?.snils,birthPlace:n?.birthPlace,addressRegistration:Ed(i),addressFact:Ed(l),esiaAccountTypeCd:t?.esiaAccountType}},Ed=e=>{const{postcode:t,region:n,regionCode:a,locality:i,city:l,street:r,house:s,building:o,block:c,apartment:d}=e,m=[t,n,i||l,r?`ул ${r}`:void 0,s?`д ${s}`:void 0,c?`к ${c}`:void 0,o?`стр ${o}`:void 0,d?`кв ${d}`:void 0].reduce(((e,t)=>t?e?`${e}, ${t}`:t:e),"");return{...e,regionCode:a?.key,fullAddress:m}},Md=(e,t)=>{const n=Jt(),[a,{setTrue:s,setFalse:o}]=on(!1),c=Id(),d=l((e=>{const t=e instanceof Function?e(m[u]):e;null!=t?m[u]=t:delete m[u]}),[m=c,u="leadForm"]);var m,u;const h=r((()=>_d(e,c.leadForm)),[e,c.leadForm]),p=l((async(e,a,i)=>{s();try{const r=await(l={profileId:e,code:a,state:i,redirectUri:globalThis.location?.href},Rr("/esia/updateProfileEsia","POST",l));r&&d((e=>({...e,...Ad(r)}))),n.assign(t)}finally{o()}var l}),[t]);return i((()=>{const e=Ts(globalThis.localStorage?.getItem("profileId")??""),t=new URLSearchParams(decodeURIComponent(globalThis.location?.search)),n=t.get("code"),a=t.get("state");e&&n&&a?p(e,n,a):(sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken"))}),[]),[h,{isLoading:a}]},Od=d((({className:e,title:t,programId:n="",nextStepLink:a="/credit-lead",button:l,...s})=>{const d=r((()=>sr?.flatMap((e=>e?.inputs))||[]),[sr]),[m,{isLoading:h}]=Md(d,a),{handleSubmit:p,responseStatus:g,isSending:f}=Td({inputs:d,programId:n,nextStepLink:a}),[,{field:x,onSubmit:b}]=an(m,{onSubmit:p}),y=sn(Kl);return i((()=>{g&&y.open({responseType:g})}),[g]),o(rn,{className:u("container space-y-m",e),title:t,...s,children:c("form",{onSubmit:b,className:"space-y-m relative",children:[h?o(jl,{blur:!1}):null,sr.map(((e,t)=>c("div",{className:u(Ll(e.columns),"grid gap-x-m"),children:[$l(e.title),Oc({field:x,inputs:e?.inputs})]},`section-${t}`))),Fc(l,f)]})})})),zd=d((({title:e,description:t})=>{const n=ke();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(S,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Fd=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Vd=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Ld=10;function $d(e,{sensitivity:t,rootRef:n}={}){const a=s(null),l=r((()=>({threshold:jd(t),root:n?.current})),[t,n?.current]);return i((()=>{if(!a.current)return;const t=new IntersectionObserver(e,l);return t.observe(a.current),()=>{t.disconnect()}}),[e,l]),a}function jd(e=0){const t=Math.round(e*Ld);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const qd=d((({className:e,style:t,idx:n,activeIndex:a,observerOptions:i,children:r,onIntersection:s})=>{const c=$d(l((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),i);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===a),ref:c,role:"listitem",children:r})})),Ud=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Wd=d((({className:e,itemClassName:t,containerRef:n,activeIndex:a,visibleItemCount:i=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=l(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(Yd(n))}),[g,f]),v=i>0?r*Number(i)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?Hd(c,v):{},...N?Vd(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:C,ref:n,role:"list",children:(S=(e,n)=>o(qd,{className:u(m,i?Ud[i-1]:"",{"h-full":N},t),style:w?Hd(c/4):{},activeIndex:a,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})),Hd=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Yd=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Gd={"horizontal-list":"w-6","vertical-list":"h-6"},Kd=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(a,i)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",i===e?Gd[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(i)},String(i)),Xd=({activeIndex:e,onClick:t})=>(n,a)=>{const i=a===e,l=i?"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=i?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=i?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"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",l),children:[o("div",{className:r,children:n?.title}),o("div",{className:u("text-secondary-text font-light",s),children:n?.description})]},String(a))},Jd=e=>t=>e.scrollWidth/t,Zd=e=>(t,n)=>{e.scrollBy({left:n*Jd(e)(t),behavior:"smooth"})},Qd=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[i,r]=a([]),o=l((e=>{r((t=>{return(n=t)===(a=e)||Boolean(n&&a&&n?.length===a?.length&&n.every(((e,t)=>e===a[t])))?t:e;var n,a})),t&&t(e)}),[t]),[c,d]=i.length?[oo()(i),ro()(i)]:[-1,-1],m=c>0,u=d<e-1,h=l((()=>{var t;n.current&&(m?Zd(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=l((()=>{n.current&&(u?Zd(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=l(((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}]},em={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},tm=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:a="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=ke(),[h,p]=Qd({itemCount:s.length}),g=nm(Boolean(s?.length));i((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=l((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Wd,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Xd({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",em[a],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Kd({activeIndex:t,onClick:f,listType:a}))}):null})),nm=(e=!1)=>({behavior:e?"auto":"smooth"}),am=d((({className:e,disabled:t,...n})=>o(Ne,{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"})}))),im=d((e=>o(am,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),lm=d((e=>o(am,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),rm="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",sm=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:a,isBottom:i})=>{const{canScrollLeft:l,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=a&&!i;return c("div",{className:e,children:[n?om(t):null,l?o(im,{className:u(cm(i),m?"left-1":"left-0"),onClick:s}):null,r?o(lm,{className:u(cm(i),m?"right-1":"right-0"),onClick:d}):null]})})),om=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(rm,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(rm,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),cm=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),dm=d((({className:e,version:t,gap:n=14,padding:a=16,visibleItemCount:i=1,listType:l="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]=Qd({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===l?"relative h-full":""),children:[o(Wd,{containerRef:y,activeIndex:N,visibleItemCount:i,gap:n,padding:a,listType:l,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(sm,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(tm,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:l,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),mm=({blocksToRender:e,...t})=>o(dm,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:B(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Fd(!0)),children:T(e,t)},String(n))})}),um=e=>e%2!=0,hm=d((({textNode:e,iconNode:t,tag:n,onClick:a,justifyContent:i="between",className:l,role:r,...s})=>c(n,{tag:n,className:u("flex items-center w-full gap-1","between"===i?"justify-between":"justify-center",l),onClick:a,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),pm=d((({className:e="",label:t,icon:n,dataTheme:a="pc",disabled:i=!1,onClick:l})=>o(hm,{tag:"button",onClick:l,disabled:i,"data-theme":a,justifyContent:"center",role:"button",className:u("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",i?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Ee,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),gm=({isUnfolded:e,onToggle:t})=>o(pm,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),fm=["ArrowDownIcon","ArrowUpIcon"],xm="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",bm=({topItemsCount:e=0,label:t="",block:n,blocksToRender:a=[],...i})=>{const[l,r]=e>0?[a.slice(0,e),a.slice(e)]:[a,[]];return c("div",{className:u("space-y-2xs",{hidden:!a.length}),children:[c("div",{className:u(xm),children:[B(l,{...i.options,parent:n}),um(l.length)?o(Lt,{className:"col-span-6",...i}):null]}),o(_r,{renderFoldableSection:({isUnfolded:e})=>c(Ar,{className:u(xm),isUnfolded:e,children:[B(r,{...i.options,parent:n}),um(r.length)?o(Lt,{className:"col-span-6",...i}):null]}),renderFoldButton:({isUnfolded:n,onToggle:a})=>o(pm,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:fm[Number(n)],dataTheme:i.options?.page?.colorPalette,onClick:a})})]})},ym=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...a})=>{switch(e?.view){case"grid":return c("div",{children:[vm(n,t),bm({...e,...a,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[vm(n,t),mm({...a,blocksToRender:t})]});default:return null}})),vm=(e,t)=>e&&!t.length?o(zd,{...e}):null,Nm=e=>t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:`sep-${a}`},n):[n]),[]),wm=d((({value:e,onChange:t,items:n=[],multiple:a})=>n.map((n=>o(ll,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const i=e?.includes(n);t(a?i?(e||[]).filter((e=>e!==n)):[...e||[],n]:i?[]:[n])})(n.value),type:a?"checkbox":"radio"},n.value))))),Cm=d((({children:e,filtrationSchema:t,resetButton:n,field:a,reset:i})=>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,Nm(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Sm(a)).filter(Boolean))]}),n?o("div",{children:o(Hl,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:i,children:n?.text})}):null]}))),Sm=e=>([t,n])=>{const a=n?.type;return"array"===a?km(t,e)(n):null},km=(e,t)=>n=>{const a=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(Ee,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(wm,{items:a,multiple:!n?.single,...t(e)})]},e)};function Im(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Tm=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Rm=(e,t)=>Object.entries(e).map((([n,a])=>"number"==typeof a?Array.isArray(t[n])?((e,t)=>n=>Tm(t[e])||Tm(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Tm(t[e])||Tm(n[e])||Bm(t[e])<=Bm(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>Tm(t[e])||Tm(n[e])||Bm(t[e]?.min)>=Bm(n[e]?.min)&&Bm(t[e]?.min)<=Bm(n[e]?.max))(n,e):Array.isArray(a)?((e,t)=>n=>Tm(t[e])||Tm(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Tm(t[e])||Tm(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Bm=e=>Number(e||0),Pm=(e,{block:t,page:n,normalize:a=nn})=>{const i=t?.blocks||[],[l,{field:s,reset:o,update:c}]=an(e),d=r((()=>Im(i,i.map((e=>Mt(e.content,n?.fallback))))),[i,n?.fallback]),m=l===e?i:((e,t)=>(n=nn)=>e?.filter((([,e])=>Rm(t,n(e)||{}))).map((([e])=>e)))(d,l)(a);return[l,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},Dm={},_m={},Am=Ft((({className:e,filtrationSchema:t=Dm,consumerField:n={},resetButton:a,...i})=>{const[,{blocksToRender:l},{field:r,reset:s}]=Pm(_m,{block:i.block,page:i.options?.page}),d=o(Dn,{className:"w-64",label:n?.title,options:Em(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Em(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Cm,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Hl,{type:"reset",className:"mt-lg w-64",onClick:s,version:a?.version,children:a?.text})})]})}),o(ym,{blocksToRender:l,...i})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Em=e=>Im(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Mm=(e=!1)=>e?"text-left":"text-center",Om={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},zm=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:a,icon:i,...l})=>{const r=String(a?.width||t);return i?o("div",{style:{width:`${r}px`,height:`${r}px`},className:u("rounded-icon object-fit flex justify-center items-center",Om[n],e),children:o(W,{...l,width:"54%",height:"54%",name:i})}):null})),Fm=d((({className:e="",title:t,benefitList:n,...a})=>{const i=ke();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(N,{headingType:"h3",as:"h2",className:Mm(i),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(Vm)}):null]})})),Vm=({label:e,description:t,__html:n,icon:a,isDotted:i=!1,iconBgVersion:l},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[a?.icon?o(zm,{className:"shrink-0",iconBgVersion:l,...a}):null,a?.src?o(ne,{className:"shrink-0",image:a}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Ee,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(_e,{__html:n,isDotted:i,itemSize:"list-s"}):null]}):null]},String(r)),Lm=e=>({icon:t,title:n,description:a},i)=>c("div",{className:u("flex flex-col gap-1","items-center",{"justify-center":!a&&!n}),children:[n?o(Ee,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,a?o(Ee,{size:"text-h6",font:"font-normal",align:e,children:a}):null]},String(i)),$m=(e,t,n)=>o("div",{className:`grid gap-2xs ${jm(t)}`,children:e.map(Lm(n))}),jm=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},qm=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:a="4",subtitle:i,title:l,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(S,{defaultPadding:"",title:l,description:i,headlineVersion:"M"}),e?.length?$m(e,a,t):null]}))),Um={start:"justify-start",center:"justify-center",end:"justify-end"},Wm=d((({buttons:e,className:t="",align:n,...a})=>{const i=n&&u("flex",Um[n]);return o(g,{className:u("!bg-transparent",i,t),defaultPadding:"p-0",...a,children:je(e)})})),Hm=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:a=2,depositeName:i,isShowDepositeName:l,color:r="text-secondary-text"})=>c("div",{children:[o(Ee,{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:He(a,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),i&&l?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:i}):null]})]}))),Ym=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),Gm=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:a=2,color:i="text-secondary-text",children:l,...r})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o(Hm,{title:e,rate:t,unit:n,fractionDigits:a,color:i,...r})}),o(Hs,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:a,fixed:!0,color:i,...r}),l]}):o(Ym,{title:e,...r}),Km={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Xm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Jm=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,[i,l]=((e,t,n)=>{const{maxBonus:a=5e3,prefMonthsNum:i=Km.prefMonthsNum,prefTravelBonusRate:l=Km.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(l*t)+Math.round(r*n),a);return[c,c*i+Math.min(Math.round(s*t)+Math.round(o*n),a)*(12-i)]})(t||Xm,n,a);return{...t,...e,monthBonus:i,yearBonus:l}},Zm=Ft((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,...l})=>{const[r,{field:s}]=an({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=Jm(r,n);return o($s,{className:e,title:t,...l,children:c("section",{className:u(js,e),children:[c("div",{className:qs,children:[no({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),no({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Gm({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:Us,children:[f>=0?o(Hs,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,je(a,{isVertical:!0}),Js(i)]})]})})})),Qm=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,eu=e=>eo({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),tu=" (c капитализацией)",nu=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:i=[],isCapitalization:l=!1})=>c("div",{className:Us,children:[o(Hs,{title:`Доход в конце срока${l?tu:""}`,value:e,postfix:n,prefix:"+"}),o(Hs,{title:`Сумма в конце срока${l?tu:""}`,value:t,postfix:n}),je(a,{isVertical:!0}),i?.map(Js)]}),au={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const iu={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},lu=(e,t)=>{const{daysValue:n,moneyValue:a,isPartialWithdrawal:i,isReplenished:l,isMonthlyInterestPayment:r}=e,s=l||i,o=n<90||n>730,c=function(e){const t=e?.rateType?au[e?.rateType]:"",{data:n}=ya(t?`${Ut}/depositrates/${t}`:null,Dt);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&ru(s,e)&&ho(a,["minSum","maxSum"],e)&&ho(n,["minDays","maxDays"],e)))||iu,{rate:m}=d,u=su(m,e),h=a+u,p=c||[iu];return{...d,...uo(["minSum","maxSum"],p),...uo(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},ru=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,su=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,daysValue:i}=t;return n?Math.round(a*Math.pow((1200+e)/1200,i/30)-a):Math.round(a*e*i/365/100)},ou=Ft((({className:e="",title:t,buttons:n,footnote:a,bottomFootnote:i,isShowDepositeName:l,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=an({moneyValue:Ks(r,1e5),daysValue:Xs(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=lu(m,s),{income:g,finalSum:f,rate:x,depositeName:b}=p;return o($s,{className:e,title:t,...d,children:c("section",{className:u(js,e),children:[c("div",{className:qs,children:[no({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(Aa,{items:[`От ${Qm(y.min||0)}`,`До ${Qm(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[cu(p,h),eu({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Gm({rate:x,depositeName:b,isShowDepositeName:l}),nu({income:g,finalSum:f,buttons:n,footnotes:[a,i]})]})});var y})),cu=(e,t)=>c("div",{className:"space-y-s",children:[o(Ee,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(xi,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(xi,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),du=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,a]=t[n-1],[i,l]=t[n];a>=i?t.splice(n-1,2,[e,Math.max(a,l)]):n++}return t},mu={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},uu=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.[0]?gu(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=>[pu({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),pu({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),pu({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),pu({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,ho(a,["minSum","maxSum"],t),ho(i||l,["minMonths","maxMonths"],t)].every(Boolean)))||mu,{rate:u}=m,h=hu(u,e),p=a+h,g=t||[mu];return{...m,...uo(["minSum","maxSum"],g),...uo(["minMonths","maxMonths"],g),availableMonths:du(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((a,i)=>t>=e?e+i*n:e-i*n)))(e,t))),...e,defaultMonth:l,income:h,finalSum:p}},hu=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,monthsValue:i}=t;return n?Math.round(a*Math.pow((1200+e)/1200,i)-a):Math.round(a*e*30*i/365/100)},pu=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],gu=(e,t)=>e+Math.round((t-e)/2),fu=(e="rub")=>"rub"===e,xu=(e,t)=>{const{minMonths:n,maxMonths:a}=uo(["minMonths","maxMonths"],Nu(t,e?.currency)),i=e.monthsValue||Math.round((n+a)/2);return{monthsValue:Ra(i,n,a)}},bu=(e,t)=>{const{minSum:n,maxSum:a}=uo(["minSum","maxSum"],Nu(t,e?.currency)),i=e.moneyValue||n;return{moneyValue:Ra(i,n,a)}},yu=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),vu=e=>{const t=fu(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Nu=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},wu=(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?eo({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?eo({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),Cu(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?eu({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(a={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},eo({...a,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),Cu(e.isShowNewClient),e.isShowNewClient?o(xi,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},Cu=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,Su={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},ku={text:"₽",key:"rub"},Iu=Ft((({className:e,title:t,calcSource:n,buttons:a=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[ku],g=l((e=>t=>e?{...t,...vu(t),...bu(t,e),...xu(t,e),...yu(t,e)}:t)(h),[h]),[f,{field:x}]=an({moneyValue:Ks(d,2e4),monthsValue:Xs(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:ku},{normalize:g}),b=x?.("currency")?.value??ku,y=x?.("isNewClient")?.value,v=Nu(h,b),N=uu(f,v,s),{rate:w,income:C,finalSum:S,type:k=""}=N,I=l((()=>{ao({field:x,defParams:Ys(v,y),calcParams:N,monthsValue:"minMonths",map:Su})}),[x,h]);i((()=>{!bo(d)&&v&&I()}),[d,h]);const T=w===Ys(v,y)?.rate;return o($s,{className:e,title:t,...m,children:c("section",{className:u(js,e),children:[c("div",{className:qs,children:[c("div",{className:"flex gap-m",children:[no({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:Tu(b?.key)}),h&&h?.length>1?o(Mn,{label:"Валюта",options:p,...x("currency")}):null]}),Zs({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),wu({...N,...s},x)]}),Gm({rate:w,children:Bu(I,T)}),nu({income:C,finalSum:S,buttons:[...a,Ru(n?.buttons,k)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),Tu=(e="")=>fu(e)?1e3:100,Ru=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},Bu=(e,t=!1)=>t?null:o(Hl,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Pu=e=>Du({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Du({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Du=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],_u={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Au=(e,t,n)=>{const{moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}=e,s=t?.rateRows||[_u],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Pu({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:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r})=>e?.find((e=>Pu({row:e,userInputParams:t,paramsViewSettings:n})&&ho(a+r,["minSum","maxSum"],e)&&ho(l,["minSumOld","maxSumOld"],e)&&ho(r,["minSumExtra","maxSumExtra"],e)&&ho(i,["minMonths","maxMonths"],e)))||_u)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,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:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r,monthlyPayment:g,benefit:f}},Eu=Ft((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,paramsViewSettings:l,...r})=>{const[s,{field:d}]=an({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Au(s,n,l),h=to({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o($s,{className:e,title:t,...r,children:c("section",{className:u(js,e),children:[c("div",{className:qs,children:[no({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),no({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Zs({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Mu({...m,...l},d),m.isExtraMoney?no({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(Us,"@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}),je(a,{isVertical:!0}),Js(i)]})]})})})),Mu=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(xi,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(xi,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(xi,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Ou=d((e=>{const{onChange:t,min:n,max:a,defaultValue:i="0",fractionDigits:r=0,...s}=e,c=Ta(e,{normalize:(e=i)=>n&&a?String(Ra(Number(zu(e)),n,a)):zu(e),format:He(r)}),d=l((e=>t&&t(zu(e))),[t]);return o(fn,{onChange:d,...s,...c})})),zu=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Fu=d((e=>o(Ou,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ee,{size:"text-xl",font:"font-light",children:"₽"})})}))),Vu={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Lu={amount:1500},$u=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:r="private",...s})=>{const[{amount:d},{field:m}]=an(Lu),[h,p]=a(!1);return i((()=>{p(d<=0)}),[d]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Vu[r],children:[o(Fu,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),l?.text?o(Hl,{className:"w-full mt-lg",type:"submit",disabled:h,children:l.text}):null]})]})})),ju=({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(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),qu="relative h-full",Uu={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Wu=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...a})=>{const{blocks:i}=a.block||{},l=i?.some(Gu),r=n?{defaultPadding:"p-6xl pb-m"}:{};return P({...a,renderProps:(n,a,i)=>c("div",{className:Hu(n,{someCardsHighlighted:l}),children:[T(n,a,{className:Yu(n,{someCardsHighlighted:l,showBorder:!e,cardSize:t}),...r,blockIndex:i}),Gu(n)?ju({className:"absolute top-0 -right-4 z-40"}):null]},String(i))})},Hu=(e,{someCardsHighlighted:t})=>u(qu,t&&(Gu(e)?"pt-3xl":"pt-3xl sm:pt-16")),Yu=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u(qu,"min-w-80",Uu[a],t&&(Gu(e)?"pt-3xl sm:pt-16":"pt-3xl"),Fd(n),n&&"h-full"),Gu=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Ku=Ft((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:a=!0,isGap:i=!0,cardSize:l="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(dm,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:i?16:0,padding:0,arrowsPadded:a,navButtons:r?Xu(s?.block?.blocks):[],hasBlur:!0,children:Wu({noCardBorder:n,cardSize:l,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Xu=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Ju="z-10 border border-solid w-full h-full",Zu=u(Ju,"absolute hidden @xl:block border-transparent"),Qu=d((({className:e,title:t,description:n,button:a,...i})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...i,children:c("div",{className:"relative h-full",children:[o("div",{className:u(Zu,"top-9 right-12 bg-green-dark")}),o("div",{className:u(Zu,"top-6 right-8 bg-green")}),o("div",{className:u(Zu,"top-3 right-4 bg-green-light")}),c("div",{className:u(Ju,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(S,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),je([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),eh={black:"bg-black",white:"bg-white"},th=d((({className:e="",title:t,description:n,image:a,price:i,button:l,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(Re,{className:"h-full",padding:d,title:o(S,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:a?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:a}):null,buttons:je([l],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Ee,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(nh)]}):null,i?c(Ee,{size:"text-h3",align:"text-left",children:[i," ₽"]}):null]})}))),nh=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${eh[e]}`},String(t)),ah=d((({icon:e,...t})=>{const n=pe(),{text:a,href:i,target:l,onClick:r}=n(t);return a?o("div",{className:u("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:i,target:l,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:a}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:a})]})})}):null})),ih=d((({className:e,additionalDescription:t,description:n,links:a,title:i,...l})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...l,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(S,{isEmbedded:!0,title:i,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(S,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),a?.length?lh(a):null]})}))),lh=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(ah,{...e},String(t))))}),rh=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),sh=d((({className:e="",href:t,target:n,onClick:a,data:i,children:l})=>{const r=pe()({href:t,target:n,onClick:a});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...fe(i),children:l})})),oh=[{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"}}],ch=d((({className:e="",media:t,showButtonText:n,stretched:i,version:l="white",children:r})=>{if(!t?.length)return null;const[s,d]=a(),m=t?.map((e=>{const{href:t,icon:a,text:i}=e,{iconMapped:r}=(e=>oh.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=$e(a)?a:r,c=n?{text:i}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&i&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??l}})),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},dh(i));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:je(m,{className:mh(s??!1,i??!1,n),buttonClassName:h})}),r?o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),dh=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",mh=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),uh=d((({className:e,padding:t,description:n,additionalDescription:a,href:i,icon:l,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=true,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(sh,{href:i,target:m,className:"h-full",data:rh(v),children:c(Re,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(S,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Qe($e(l)?o(ne,{image:l}):null,x),buttons:d.length?o(ch,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Le,{benefits:f}),s?o(_e,{__html:s,isDotted:r,itemSize:"list-s"}):null,hh(a,p)]})})}))),hh=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,ph=(e,t)=>{const{title:n,description:a,buttons:i}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Ee,{size:"text-m",color:"text-secondary-text",children:n})}):null,a?o("div",{className:"mt-2xs",children:o(Ee,{size:"text-xl",color:"text-primary-text",children:a})}):null,i?.length?o("div",{className:"text-primary-main",children:je(i)}):null]},String(t))},gh=d((({className:e="",title:t,align:n="text-center",icon:l,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:h,...p})=>{const f=d.map(ph),[x,b]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[y,v]=a(!1);return i((()=>ue.subscribe("fold",(e=>{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:[$e(l)?o("div",{className:"self-center",children:o(ne,{image:l})}):null,t?o(N,{className:u("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(Ne,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(_r,{renderFoldableSection:()=>c("div",{children:[x,o(Ar,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?fh(m?.parent,h,y):null}):o("div",{children:x})]})})),fh=(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&&ue.fire("fold",{type:"fold",isUnfolded:!n,parent:e})},type:"button",...n?fe(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),xh=d((({className:e,contacts:t,info:n,version:a="secondary",...i})=>c(g,{className:u("flex",e),defaultPadding:"p-6xl",version:a,...i,children:[n?.length?bh(n):null,t?.length?bh(t):null]}))),bh=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>yh({column:e,i:t})))}),yh=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:a},i)=>c("div",{children:[o(S,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:u({"mt-xl":Boolean(a?.text)}),children:je([a])})]},String(i))))},`col-${String(t)}`):null,vh=()=>{const e=globalThis.sessionStorage?.getItem("refreshToken"),t=globalThis.sessionStorage?.getItem("accessToken"),n=globalThis.localStorage.getItem("taskId"),a=Jt();if(!t||!e||!n)return a.assign("/"),()=>{};const i=async()=>{const n=await Br("/auth/refresh","POST",{refresh_token:e,access_token:t});if(401==n?.status&&a.assign("/"),n?.ok){const e=await n.json();globalThis.sessionStorage.setItem("refreshToken",e.refresh_token),globalThis.sessionStorage.setItem("accessToken",e.access_token)}};i();const l=setInterval(i,24e4);return()=>clearInterval(l)},Nh=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]})]}))),wh=d((({step:e=1,totalSteps:t=6,stepsTitles:n=[]})=>{const a=r((()=>(e+1)/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 mr-s",children:["Шаг ",e+1," из ",t,"."]}),n[e]||null,o(Nh,{step:a,showPercentage:!1})]})})}));var Ch;!function(e){e.process="IN_PROCESS",e.ok="APPROVED",e.fail="CANCELLED",e.pre_decision="PRE_DECISION",e.approved="APPROVED",e.cancelled="CANCELLED",e.failed="FAILED",e.draft="DRAFT",e.rework="REVISION"}(Ch||(Ch={}));const Sh=e=>Rr("/user-data/getTaskStatus","POST",e),kh=e=>Br("/user-data/sendSignalToProcess","POST",e),Ih=(e,t)=>{const n=s(null),a=l((()=>n.current&&clearInterval(n.current)),[]);return i((()=>(n.current=setInterval((()=>e(a)),t),a)),[e,t]),a},Th=d((({interval:e=0,intervalExpireAction:t=(()=>null),title:n,__html:i})=>{const[l,r]=a(e),s=100-(e-l)/e*100;return c("div",{children:[n?o(S,{title:n,headlineVersion:"S"}):null,c("div",{className:"flex justify-center items-center flex-col",children:[c("div",{className:u("relative flex items-center justify-center w-24 h-24 rounded-full bg-gray text-transparent mb-5"),children:[o("div",{className:"absolute inset-0 rounded-full",style:{background:`conic-gradient(rgb(66, 171, 68) ${s}%, rgb(125, 126, 127) 0deg)`}}),o("div",{className:"z-10 flex items-center justify-center px-4 py-2 rounded-full w-20 h-20 bg-white text-primary-text text-m",children:o(Gc,{interval:e,time:l,setTime:e=>{0===e&&t(),r(e)}})})]}),i?o(_e,{__html:i}):null]})]})})),Rh=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:i,sectionAdditionalTitle:l,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Th,{interval:d,intervalExpireAction:m}):null]}),o(Bh,{title:a,items:i}),o(Bh,{title:l,items:r,countColumns:!0}),n?.__html?o(Zo,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(Ne,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),Bh=({title:e,items:t,countColumns:n=!1})=>{const a=ke();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Ee,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Ll(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:Ph(e)},t)))}):null]})]}):null},Ph=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ee,{color:"text-secondary-text",size:"text-l",children:e}),o(Ee,{color:"text-primary-text",size:"text-xl",children:t})]}),Dh=d((()=>o(Rh,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),_h=d((({handleExpireTimer:e})=>{const{statusInfo:t}=Fi();return o(Rh,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:t?.cardCategory}]})})),Ah=d((()=>{const{statusInfo:e}=Fi();return o(Rh,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Eh=d((()=>{const{statusInfo:e}=Fi();return o(Rh,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:Mh(e),buttonText:"Вернуться на главную"})})),Mh=e=>{const t=[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:e?.cardCategory}];return e?.deliveryAddress&&e?.deliveryDate?t.concat([{label:"Адрес доставки",description:e?.deliveryAddress},{label:"Дата доставки",description:jt(e?.deliveryDate)}]):t},Oh=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],zh=d((()=>{const[e,t]=a(Ch.process),{taskId:n}=Fi();i((()=>{(async()=>{for(const e of Oh)await kh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await Sh({taskId:n});a&&a?.statusCd!==Ch.process&&(e(),t(a.statusCd))}),[n]);Ih(r,3e4);return Fh(e,(()=>t(Ch.rework)))})),Fh=(e,t)=>({IN_PROCESS:o(_h,{handleExpireTimer:t}),CANCELLED:o(Dh,{}),FAILED:o(Dh,{}),DRAFT:o(Dh,{}),APPROVED:o(Eh,{}),PRE_DECISION:o(Eh,{}),REVISION:o(Ah,{})}[e]||o(Ah,{})),Vh=e=>(t,n)=>t.filter((e=>e)).map((t=>[Lh(n,e),$h(t,e),Wh(t,e),jh(t,e),qh(t,e),Uh(t,e)].some(Boolean)?{...t,required:!1}:t)),Lh=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,$h=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,jh=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,qh=({name:e},t)=>"addressFact"===e&&t("addressMatch"),Uh=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),Wh=({name:e},t)=>"snils"===e&&Hh(t),Hh=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key,Yh=({field:e,inputs:t,params:n})=>t.map(Vl(e,n,{..._c,...Ac})),Gh=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Vh(Kh(t))(e,n);return c("div",{className:u(Ll(i),"grid gap-x-m"),children:[$l(l),Yh({field:t,inputs:s,params:a})]},`section-${r}`)})),Kh=e=>t=>e(t)?.value,Xh=d((({step:e,isSending:t,onPrevStep:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Hl,{onClick:n,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Hl,{isLoading:t,type:"submit",children:a?"Отправить заявку":"Далее"})]})})),Jh=e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:i}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:i}},Zh=e=>{const{currency:t,paymentSystem:n,cardCategory:a,codeWord:i}=e;return{currencyCode:t?{key:t}:void 0,paymentSystemTypeCd:n,classCard:a,codeWord:i}},Qh=e=>{const{beginDate:t,employment:n,organizationName:a,inn:i,legalForm:l,organization:r,amountWorkers:s,employerActivities:o,employerOrganization:c,generalSeniority:d,lastJobExperience:m,experience5Years:u,jobsNumber:h,organizationPhone:p,organizationAddress:g,positionOrganization:f,partInBusiness:x}=e;return{employmentContractDate:jt(t||"",!0),employmentTypeCd:n,organizationName:a,organizationInn:i,organizationActivityTypeCd:o,organizationTypeCd:r,organizationKindCd:c,employeesNumberCd:s,opf:l,seniority:d,generalSeniority:u,jobsNumber:h,lastWorkDuration:m,positionCd:f,participantContacts:ud({organizationPhone:p&&qt(p)}),participantAddresses:hd({organizationAddress:g}),ownershipShare:"BUSINESS_OWNER"===f?.key?x:""}},ep=e=>{const{name:t,surname:n,middleName:a,limitedBirthday:i="",phone:l="",email:r,sex:s,birthPlace:o,dulIssueDateField:c="",dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,education:p,participantDateRegistration:g="",housing:f,addressRegistration:x,addressFact:b}=e;return{birthDate:jt(i,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:jt(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:jt(g,!0),houseTypeCd:f,participantContacts:ud({phone:qt(l),email:r}),participantAddresses:hd({addressRegistration:x,addressFact:b}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}},tp=e=>{const{methodObtain:t,deliveryDate:n=""}=e,a="courier"===t;return a?{courierDeliveryFlg:a,deliveryDate:n.toString().replace(/(GMT)[+-]\d{4}/,"GMT+0000"),deliveryTimeCd:{value:"TIME_2"},office:{id:"3"}}:{}},np=e=>{const{addressRetail:t,methodObtain:n}=e;return t?.key&&"office"===n?{office:{id:t.key}}:{}},ap=(e,t)=>{switch(e){case 0:default:return{};case 1:return ep(t);case 2:return Qh(t);case 3:return pd(t);case 4:return Jh(t);case 5:return(e=>{const{addressCourier:t,methodObtain:n}=e;return"courier"===n?{participantAddresses:hd({addressCourier:t})}:{}})(t)}},ip=[{paymentSystem:{key:"",text:""},currency:"810",codeWord:""},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:void 0,methodObtain:"office",addressCourier:{fullAddress:"",fiasCode:""}},{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:void 0,inn:void 0,jobsNumber:void 0,lastJobExperience:void 0,legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},{familyStatus:{key:"",text:""},familyMembers:void 0,dependents:void 0,confirmationIncome:{key:"",text:""},wages:void 0,mandatoryPayments:void 0,snils:"",armyIdFlg:!1},{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},{regionRetail:{key:"",text:""},addressRetail:{key:"",text:""},bankEmployeeCode:void 0,addressCourier:{fullAddress:"",fiasCode:""},methodObtain:"office",deliveryDate:void 0}],lp=e=>{try{return e?new Date(e):void 0}catch(e){return}},rp=({step:e,inputs:t,onNextStep:n,onFinish:a})=>{const[i,{setTrue:s,setFalse:o}]=on(!1),c=5===e,d=Fi(),m=r((()=>((e,t)=>({...ip[e],...t,limitedBirthday:lp(t?.limitedBirthday),dulIssueDateField:lp(t?.dulIssueDateField),participantDateRegistration:lp(t?.participantDateRegistration),beginDate:lp(t?.beginDate),deliveryDate:lp(t?.deliveryDate)}))(e,d.leadForm)),[e,d.leadForm]),u=l((e=>{const{leadForm:t}=d;c&&e.ok&&t&&(d.statusInfo={regionRetail:t?.regionRetail?.text,addressRetail:t?.addressRetail?.text,deliveryAddress:t?.addressCourier?.fullAddress,cardCategory:t?.cardCategory?.text,deliveryDate:t?.deliveryDate},d.leadForm=m)}),[c,m]),h=l((async i=>{const l=Xl(sa(Vh(sp(i))(t,e)));if(On(l(i))){s(),d.leadForm=i;try{const{taskId:t,profileId:l,participantId:r}=d;if(t&&l&&r){const n=await Lc((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,...np(a),authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...ap(i,a)}],...Zh(a),...tp(a)}}))({participantId:r,taskId:t,profileId:l,step:e,formData:i}));u(n)}n(),c&&a?.()}catch(e){}finally{o()}}}),[c,u]);return[m,h,i]},sp=e=>t=>e[t],op=d((({step:e,sections:t,isFormFinished:n,onPrevStep:a,onNextStep:i,onFinish:l})=>{const s=r((()=>t?.flatMap((e=>e?.inputs))||[]),[t]),[d,m,u]=rp({step:e,inputs:s,onNextStep:i,onFinish:l}),[,{field:h,onSubmit:p}]=an(d,{onSubmit:m});return n?o(zh,{}):c("form",{onSubmit:p,className:"space-y-m",children:[Gh({sections:t,field:h,step:e}),o(Xh,{isSending:u,step:e,onPrevStep:a})]})})),cp=[[{title:"Персональные данные",columns:2,inputs:[{name:"surname",required:!0,dadata:!0,filledByEsia:!0},{name:"name",required:!0,dadata:!0,filledByEsia:!0},{name:"middleName",dadata:!0,filledByEsia:!0},{name:"sex",required:!0},{name:"limitedBirthday",required:!0,filledByEsia:!0},{name:"birthPlace",required:!0,filledByEsia:!0},{name:"phone",required:!0,filledByEsia:!0},{name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{name:"dulSerie",required:!0,filledByEsia:!0},{name:"dulNumber",required:!0,filledByEsia:!0},{name:"dulIssueDateField",required:!0,filledByEsia:!0},{name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{name:"addressMatch"}]},{columns:2,inputs:[{name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{name:"housing",required:!0}]},{inputs:[{name:"addressFact",required:!0,dadata:!0}]}],[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{name:"infoCard",label:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{name:"employment",required:!0},{name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{name:"inn",required:!0,dadata:!0},{name:"legalForm",required:!0}]},{inputs:[{name:"organization",required:!0},{name:"amountWorkers",required:!0}]},{columns:2,inputs:[{name:"employerActivities",required:!0},{name:"employerOrganization",required:!0},{name:"generalSeniority",required:!0},{name:"lastJobExperience",required:!0},{name:"experience5Years",required:!0},{name:"jobsNumber",required:!0}]},{inputs:[{name:"organizationPhone",label:"Телефон работодателя",required:!0},{name:"beginDate",required:!0}]},{columns:2,inputs:[{name:"positionOrganization",required:!0},{name:"partInBusiness",required:!0,condition:{name:"positionOrganization",values:["BUSINESS_OWNER"]}}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{name:"familyStatus",required:!0}]},{columns:1,inputs:[{name:"dependents",required:!0}]},{columns:2,inputs:[{name:"familyMembers"},{name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{name:"infoCard",label:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{name:"confirmationIncome",required:!0}]},{columns:1,inputs:[{name:"wages",required:!0}]},{columns:1,inputs:[{name:"mandatoryPayments",required:!0}]},{columns:1,inputs:[{name:"snils",required:!0}]},{columns:1,inputs:[{name:"conscription",required:!0}]},{columns:2,inputs:[{name:"armyIdFlg"}]}],[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{name:"disablePeopleFlg"}]},{inputs:[{name:"bankruptcyFlg"}]},{inputs:[{name:"shareholderFlg"}]},{inputs:[{name:"legalEntityName"}]},{inputs:[{name:"creditInRshbCd"}]}]],dp=[[{title:"Параметры карты",inputs:[]},{inputs:[{name:"currency",required:!0},{name:"paymentSystem",required:!0},{name:"cardCategory",required:!0},{name:"codeWord",required:!0}]}],...cp,[{title:"Способ получения",columns:1,inputs:[]},{inputs:[{name:"methodObtain"}]},{title:"Адрес",columns:1,inputs:[]},{inputs:[{name:"addressCourier",dadata:!0,condition:{name:"methodObtain",values:["courier"]},required:!0},{name:"deliveryDate",condition:{name:"methodObtain",values:["courier"]},required:!0},{name:"comment",condition:{name:"methodObtain",values:["courier"]}}]},{inputs:[{name:"regionRetail",required:!0,condition:{name:"methodObtain",values:["office"]}},{name:"addressRetail",required:!0,condition:{name:"methodObtain",values:["office"]}}]},{inputs:[{name:"infoCard",label:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код",condition:{name:"methodObtain",values:["office"]}},{name:"bankEmployeeCode",condition:{name:"methodObtain",values:["office"]}}]}]],mp=["Параметры карты","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Выбор способа получения"],up=d((({className:e,...t})=>{const[n,d]=a(0),m=s(null),u=l((()=>m?.current?.scrollIntoView({behavior:"smooth"})),[m]);i(vh,[]);const h=l((()=>{d((e=>Math.min(e+1,6))),u()}),[]),p=l((()=>{d((e=>Math.max(e-1,0))),u()}),[]),f=r((()=>dp[n]),[n]),[x,{setTrue:b}]=on(!1);return o(g,{className:e,...t,children:c("div",{ref:m,className:"container grid grid-cols-12",children:[x?null:o(wh,{stepsTitles:mp,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(op,{step:n,sections:f,isFormFinished:x,onNextStep:h,onPrevStep:p,onFinish:b},String(n))})]})})})),hp=d((({step:e=1,totalSteps:t=5,stepsTitles:n=[]})=>{const a=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 mr-s",children:["Шаг ",e," из ",t,"."]}),n[e]||null,o(Nh,{step:a,showPercentage:!1})]})})})),pp=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:i,sectionAdditionalTitle:l,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Th,{interval:d,intervalExpireAction:m}):null]}),o(gp,{title:a,items:i}),o(gp,{title:l,items:r,countColumns:!0}),n?.__html?o(Zo,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(Ne,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),gp=({title:e,items:t,countColumns:n=!1})=>{const a=ke();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Ee,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Ll(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:fp(e)},t)))}):null]})]}):null},fp=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ee,{color:"text-secondary-text",size:"text-l",children:e}),o(Ee,{color:"text-primary-text",size:"text-xl",children:t})]}),xp=d((()=>o(pp,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),bp=d((({handleExpireTimer:e})=>{const{statusInfo:t}=Fi();return o(pp,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Цель кредита",description:"На любые цели"},{label:"Сумма",description:`${t?.calculator?.moneyValue?.toLocaleString()??"0"} ₽`},{label:"Срок кредита",description:`${t?.calculator?.monthsValue??"0"} мес`},{label:"Тип платежа",description:t?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}]})})),yp=d((()=>{const{statusInfo:e}=Fi();return o(pp,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),vp=d((()=>{const{statusInfo:e}=Fi();return o(pp,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.calculator?.monthsValue+" мес"},{label:"Тип платежа",description:e?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),Np=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],wp=d((()=>{const[e,t]=a(Ch.process),{taskId:n}=Fi();i((()=>{(async()=>{for(const e of Np)await kh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await Sh({taskId:n});a&&a?.statusCd!==Ch.process&&(e(),t(a.statusCd))}),[n]);Ih(r,3e4);return Cp(e,(()=>t(Ch.rework)))})),Cp=(e,t)=>({IN_PROCESS:o(bp,{handleExpireTimer:t}),CANCELLED:o(xp,{}),FAILED:o(xp,{}),DRAFT:o(xp,{}),APPROVED:o(vp,{}),PRE_DECISION:o(vp,{}),REVISION:o(yp,{})}[e]||o(yp,{})),Sp=({field:e,inputs:t,params:n})=>t.map(Vl(e,n,{..._c})),kp=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Vh(Ip(t))(e,n);return c("div",{className:u(Ll(i),"grid gap-x-m"),children:[$l(l),Sp({field:t,inputs:s,params:a})]},`section-${r}`)})),Ip=e=>t=>e(t)?.value,Tp=d((({step:e,onPrevStep:t,isSending:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Hl,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Hl,{type:"submit",isLoading:n,children:a?"Отправить заявку":"Далее"})]})})),Rp={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},Bp=e=>{const{moneyValue:t,monthsValue:n,isAnnuity:a}=e?.calculator??{};return{loanAmount:t,creditPeriod:n,paymentTypeCd:Rp[a?"annuity":"differential"]}},Pp=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},Dp=(e,t)=>{switch(e){case 0:return(e=>{const{isInsurance:t,isSalaryClient:n}=e?.calculator??{};return{payrollCardRshbFlg:t,consentInsuranceFlg:n}})(t);case 1:return ep(t);case 2:return Qh(t);case 3:return pd(t);case 4:return Jh(t);default:return{}}},_p=[{calculator:{moneyValue:0,monthsValue:0,isAnnuity:!1,isInsurance:!1,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1}},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:void 0},{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:void 0,inn:void 0,jobsNumber:void 0,lastJobExperience:void 0,legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},{familyStatus:{key:"",text:""},dependents:void 0,familyMembers:void 0,confirmationIncome:{key:"",text:""},wages:void 0,mandatoryPayments:void 0,snils:"",armyIdFlg:!1},{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},{regionRetail:{key:"",text:""},addressRetail:void 0,bankEmployeeCode:void 0}],Ap=e=>{try{return e?new Date(e):void 0}catch(e){return}},Ep=({step:e,inputs:t,onNextStep:n,onFinish:a})=>{const[i,{setTrue:s,setFalse:o}]=on(!1),c=5===e,d=Fi(),m=r((()=>((e,t)=>({..._p[e],...t,limitedBirthday:Ap(t?.limitedBirthday),dulIssueDateField:Ap(t?.dulIssueDateField),participantDateRegistration:Ap(t?.participantDateRegistration),beginDate:Ap(t?.beginDate),deliveryDate:Ap(t?.deliveryDate)}))(e,d.leadForm)),[e,d.leadForm]),u=l((e=>{const{leadForm:t}=d;c&&e.ok&&t&&(d.statusInfo={regionRetail:t?.regionRetail?.text,addressRetail:t?.addressRetail?.text,calculator:{monthsValue:t?.calculator?.monthsValue,moneyValue:t?.calculator?.moneyValue,isAnnuity:t?.calculator?.isAnnuity}},d.leadForm=m)}),[c,m]),h=l((async i=>{const l=Xl(sa(Vh(Mp(i))(t,e)));if(On(l(i))){s(),d.leadForm=i;try{const{taskId:t,profileId:l,participantId:r}=d;if(t&&l&&r){const n=await Lc((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Dp(i,a)}],...Bp(a),...Pp(a),esiaAccountTypeCd:{key:a?.esiaAccountTypeCd?.key}}}))({participantId:r,taskId:t,profileId:l,step:e,formData:i}));u(n)}n(),c&&a?.()}catch(e){}finally{o()}}}),[c,u]);return[m,h,i]},Mp=e=>t=>e[t],Op=d((({step:e,sections:t,isFormFinished:n,programsSource:a,onPrevStep:i,onNextStep:l,onFinish:s})=>{const{programId:d}=Fi(),m=a?.[d??""],u=r((()=>t?.flatMap((e=>e?.inputs))||[]),[t]),[h,p,g]=Ep({step:e,inputs:u,onNextStep:l,onFinish:s}),[,{field:f,onSubmit:x}]=an(h,{onSubmit:p});return n?o(wp,{}):c("form",{onSubmit:x,className:"space-y-m",children:[kp({sections:t,field:f,step:e,params:{calcData:m}}),o(Tp,{step:e,isSending:g,onPrevStep:i})]})})),zp=[[{columns:1,inputs:[{name:"calculator"}]}],...cp,[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{name:"regionRetail",required:!0}]},{inputs:[{name:"addressRetail",required:!0}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{name:"infoCard",label:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{name:"bankEmployeeCode"}]}]],Fp=["","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Отделение Банка"],Vp=Ft((({className:e,programsSource:t,...n})=>{const[d,m]=a(0),u=s(null),h=l((()=>u?.current?.scrollIntoView({behavior:"smooth"})),[u]);i(vh,[]);const p=l((()=>{m((e=>Math.min(e+1,5))),h()}),[]),f=l((()=>{m((e=>Math.max(e-1,0))),h()}),[]),x=r((()=>zp[d]),[d]),b=0===d,[y,{setTrue:v}]=on(!1);return o(g,{className:e,...n,children:c("div",{ref:u,className:"container grid grid-cols-12",children:[b||y?null:o(hp,{stepsTitles:Fp,step:d,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(Op,{step:d,sections:x,isFormFinished:y,programsSource:t,onNextStep:p,onPrevStep:f,onFinish:v},String(d))})]})})})),Lp=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,$p=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),jp=1e9,qp={sum:{min:1e4,max:jp},period:3},Up=Ft((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:i,...l})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Pm(qp,{block:l.block,page:l.options?.page,normalize:e=>({...e,period:Wp(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=Hp(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...l,children:[o(Cm,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Fu,{label:a?.title,min:500,max:jp,...d("sum",{parse:e=>({min:Number(e),max:jp}),format:({min:e})=>String(e)})}),o(Aa,{title:i?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(ym,{blocksToRender:r,...l})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Wp=e=>_t((e?.paramsSource?.rateRows||[]).filter(Lp).flatMap((e=>$p(e.minMonths,e.maxMonths)))),Hp=e=>_t(e.flatMap((e=>e||[])).filter(Lp).flatMap((e=>$p(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Yp=[{key:"10"},{key:"50"},{key:"100"}],Gp=({itemCount:e,onItemCountChange:t})=>{const n=l((({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(Dn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:Yp,iconVersion:"black"})]})},Kp="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",Xp=(e,t)=>{const{currentPage:n,onPageChange:a,totalPages:i}=e,l=t+1;return l===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:l},String(t)):1!==l&&l!==i&&((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))(l,n,i)?o("div",{onClick:()=>a(l),className:Kp,"aria-label":`Страница ${l}`,children:l},String(t)):null},Jp={width:"24",height:"24"},Zp=({currentPage:e,onPageChange:t,totalPages:n})=>{const a=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),i=l((()=>{e>1&&t(e-1)}),[e]),s=l((()=>{e<n&&t(e+1)}),[e,n]),d=l((()=>t(1)),[]),m=l((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:i,children:o(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Qp(1===e),...Jp})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Kp,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,a.map(Xp),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Kp,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Qp(e===n),...Jp})})]})},Qp=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",eg=({currentPage:e,onPageChange:t,totalPages:n,itemCount:a,onItemCountChange:i})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Zp,{currentPage:e,onPageChange:t,totalPages:n}),a&&i?o(Gp,{itemCount:a,onItemCountChange:i}):null]}),tg=d((({className:e,value:t,autoFocus:n,onChange:a,onFocus:i,placeholder:r="Поиск по сайту"})=>{const s=l((e=>{a&&a(e.target?.value||"")}),[a]);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",hn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:i})]})})),ng=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(tg,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(ci,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(ci,{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(Hl,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),ag=d((({title:e,timestamp:t,publicId:n})=>{const a=pe(),{href:i}=a({href:`${Ut}/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[null,c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Ee,{size:"text-m","font-weight":"font-light",children:jt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:i,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),ig=`${Ut}/depository`,lg={startDate:void 0,endDate:void 0,query:""},rg=Ft((({className:e,...t})=>{const[n,i]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=an(lg),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:a,endDate:i})=>{const l=a?jt(a,!0):"",r=i?jt(i,!0):"",s=new URLSearchParams(ig);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",l),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=ya(ig+o,Dt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=l((e=>i(e-1)),[]),b=l((e=>{r!==e?(s(e),i(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(ng,{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(Ee,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Ee,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(ag,{...e},String(e.publicId)))):o(zd,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(eg,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),sg=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,og=d((({className:e="",title:t,description:n,error:a,button:i,...l})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...l,children:[o("div",{className:"flex justify-center",children:sg(a)}),o(S,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),i?.text?o(Ne,{version:i?.version,text:i?.text,...i}):null]}))),cg=`${Ut}/region`;function dg(e="Москва"){return zi().location??{name:e}}function mg(e="Москва"){const t=zi(),n=l((async()=>{if(!t.location){const n=await Pt(cg);t.location=n??{name:e}}}),[t,e]);return ya(cg,n),t}var ug;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(ug||(ug={}));const hg=new Intl.NumberFormat("ru",{style:"currency",currency:ug.RUB}),pg=e=>e?hg.format(e):"",gg="text-m font-light text-secondary-text ",fg=`${gg} text-left`,xg=`${gg} pl-5xl text-center`,bg=`${gg} pl-5xl text-right`,yg={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},vg=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:fg,children:o(Ee,{size:"text-m",children:"Валюта"})}),o("th",{className:xg,children:o(Ee,{size:"text-m",children:"Купить"})}),o("th",{className:bg,children:o(Ee,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Ng)})]}))),Ng=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:yg[t]},width:"24",height:"24"}):null,o(Ee,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Ee,{size:"text-h6",children:pg(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ee,{size:"text-h6",children:pg(e?.buyExchangeRate)})})]},t)},wg={icon:"GpsIcon"},Cg=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(zm,{...wg,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Sg=(e,t,n)=>{const a=Number(kg(e))*Math.pow(t,n?-1:1);return Number.isInteger(a)?a:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(a)},kg=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function Ig(e){if(!e)throw new Error("Value should be fulfilled");return e}const Tg=e=>t=>{const[,n]=Ig(e.find((([e])=>e(t))));return n(t)},Rg=e=>Tg(e.map((([e,t])=>[e,()=>t])));Rg.if=e=>new Bg(void 0,e);class Bg{parent;predicate;unit;get entry(){return[Ig(this.predicate),Ig(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Bg(this,e)}then(e){return new Bg(this.parent,this.predicate,e)}else(e){return Tg([...Pg(this),[()=>!0,e]])}}const Pg=e=>[...e?.parent?Pg(e.parent):[],e.entry],Dg=e=>Rg([[e=>e.value!==ug.RUB&&e.oppositeValue!==ug.RUB,()=>e.handleConvert(e.value,ug.RUB)],[e=>e.value===ug.RUB&&e.oppositeValue===ug.RUB,()=>e.handleConvert(e.value,ug.USD)],[e=>e.value===ug.RUB&&e.oppositeValue===ug.RUB,()=>e.handleConvert(e.value,ug.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function _g(e){const{placeholder:t,rates:n,selected:a,value:i,setValue:l,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:a,text:a};return c("div",{className:"relative flex",children:[o(fn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:i,onChange:l}),s.length?o(Dn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Ag=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:i})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||ug.RUB,selectBuy:n?.[0]?.currency?.currency||ug.USD}),d=l((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:[_g({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Eg(r,d,n),value:r.inputSell,setValue:e=>Og(d,n)(e,r.selectSell,r.selectBuy)}),_g({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Mg(r,d,t),value:r.inputBuy,setValue:e=>zg(d,t)(e,r.selectBuy,r.selectSell)})]}):null,i?.text?o(Ne,{text:i.text,version:i?.version,...i}):null]})})),Eg=(e,t,n)=>a=>{t({selectSell:a}),Dg({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,i=e.selectBuy)=>{Og(t,n)(e.inputSell,a,i)}})},Mg=(e,t,n)=>a=>{t({selectBuy:a}),Dg({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,i=e.selectSell)=>zg(t,n)(e.inputBuy,a,i)})},Og=(e,t)=>(n,a,i)=>{e({inputSell:kg(n),selectBuy:i});const l=t.find((e=>e.currency?.currency===i))?.buyExchangeRate||t.find((e=>e.currency?.currency===a))?.buyExchangeRate;l&&e({inputBuy:String(Sg(n,l,a===ug.RUB)||"")})},zg=(e,t)=>(n,a,i)=>{e({inputBuy:kg(n),selectSell:i});const l=t.find((e=>e.currency?.currency===i))?.saleExchangeRate||t.find((e=>e.currency?.currency===a))?.saleExchangeRate;l&&e({inputSell:String(Sg(n,l,a===ug.RUB)||"")})},Fg=`${Ut}/exchangerates`;const Vg=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const i=function(e){const t=e?.code||"000",{data:n}=ya(Fg+`?regionCode=${t}`,Dt);return n||{}}(dg()),l=Lg(i?.exchangeRate?.currencies),r=l.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:ug.RUB}});const s=l.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:ug.RUB}}),o(g,{className:u("box-border min-h-80",e),...a,children:o(Re,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[l?o(vg,{className:"mb-xl",exchangeCurrencyItems:l}):null,o(Cg,{address:i?.address})]}),o(Ag,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),Lg=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],$g=d((({className:e="",items:t})=>{const n=pe();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(jg(n))})})),jg=e=>({dataFooter:t,...n},a)=>{const{text:i,href:l,target:r,onClick:s}=e(n);return i?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:l,target:r||"_self",onClick:s,...fe(t),children:i||null})},String(a)):null},qg=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),Ug=["all","footer"],Wg=d((({className:e,navigationItems:t})=>{const n=pe();return o("div",{role:"menu",className:u("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(qg(Ug)).map(n).map(Hg)})})),Hg=(e,t)=>{const{text:n,items:a=[],href:i,target:l="_self",onClick:r,dataFooter:s}=e,d=a.filter(qg(Ug));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:i,target:l,onClick:r,...fe(s),children:n}),d?o($g,{items:d}):null]},String(t))},Yg=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(Gg)}):null)),Gg=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Ee,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(Kg)})]},String(t)),Kg=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Xg(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Xg=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Jg(t)}`,children:o(Ee,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Jg=e=>e.replaceAll(/\D/g,""),Zg=d((({className:e="",index:t,text:n,...a})=>{const i=pe(),{href:l,target:r,onClick:s}=i(a);return o("a",{className:u("text-secondary-text",e),href:l,target:r,onClick:s,children:n||`Документ ${t}`})})),Qg=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(Ee,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(Zg,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),ef="w-full lg:w-52";function tf(e,t,n=300){i((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const nf=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:a,s2Matches:i}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),a=Array.from({length:e.length}),i=Array.from({length:t.length});let l=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++)a[r]||i[n]||e[r]!==t[n]||(l++,a[r]=!0,i[n]=!0)}return{m:l,s1Matches:a,s2Matches:i}}(e,t);if(0===n)return 0;const l=function(e,t,{s1Matches:n,s2Matches:a}){let i=0;for(let l=0,r=0;l<e.length;l++){if(!n[l])continue;let s=r;for(;s<t.length;s++)if(a[s]){r=s+1;break}e[l]!==t[s]&&i++}return i}(e,t,{s1Matches:a,s2Matches:i}),r=(n/e.length+n/t.length+(n-l/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 af=(e,t)=>(n,a)=>{for(const[i,l]of a)n.set(i,e(n.get(i)||t,l));return n},lf=(e=[])=>e.reduce(((e,t)=>e+t),0),rf=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),sf=e=>t=>e.map((([e,n])=>[nf(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>cf(t,e))).reduce(af(Math.max,0),new Map),of=e=>t=>{return Im(t,t.map((({title:e})=>e)).map((e=>t=>{const n=rf(t||"");return n.length?lf(e.map((e=>so(n.map(nf(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},cf=(e,t)=>new Map(e.map((e=>[e,t]))),df=({basePathList:e,initialQuery:t=""})=>{const[n,l]=a(t||"");i((()=>{null!=t&&l(t)}),[t]);const{data:r}=ya(e?.length?e:null,mf),[s,o]=a(null);return tf((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:a}=t||{};if(!(e&&n?.length&&a&&Object.keys(a).length))return[];const i=rf(e);if(!i.length)return[];const l=Object.entries(a),r=[...i.map(sf(l)).reduce(af(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*i.length)).map((([e])=>n[e]));return of(i)(r)})(n)))}),[r,n]),[s,{value:n,onChange:l}]},mf=async(...e)=>(await Promise.allSettled(e.map((e=>Pt(F(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),uf=d((({initialQuery:e,navigationItems:t,onClose:n})=>{const a=r((()=>t?.map((e=>e.href||"/"))),[t]),[i,l]=df({basePathList:a,initialQuery:e}),s=r((()=>hf(t)(i)),[t,i]);return o(Gl,{head:o(tg,{autoFocus:!0,...l}),onClose:n,children:o(Wg,{navigationItems:s})})})),hf=e=>t=>e?.length&&t?.length?Im(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:F("/",t)})))}))):[],pf=d((({className:e,search:t,...n})=>{const[i,r]=a(""),s=l((()=>r("")),[]),d=sn(uf,n),m=l((e=>{r(e),gf(e)&&d.open({initialQuery:e,onClose:s})}),[s,d]);return c("div",{className:u("relative",e),role:"search",children:[o(tg,{value:i,placeholder:t?.placeholder,onChange:m}),o(Yl,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),gf=e=>e&&e.length>=3,ff=(e,t)=>{const{logo:n}=e??{},{dataHeader:a,dataFooter:i,...l}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(Hc,{className:ef,logo:l,data:i,showTitle:!1}),o(pf,{className:"grow",navigationItems:t,...e})]})},xf=d((({className:e="",index:t,...n})=>{const a=pe(),{href:i,target:l,text:r,onClick:s}=a(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:i,target:l,onClick:s,children:r||`Документ ${t}`})})),bf=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Ee,{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(xf,{index:t,...e},String(t))))}):null]}))),yf=Ft((({className:e,footer:t,...n})=>{const{navigationItems:a}=n.options?.page?.navigation??{},i=n.options?.page?.common??{},{documents:l,relatedEnterprises:r,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:h,license:p,otherLinks:f=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[ff(i,a),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Wg,{navigationItems:a}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u(ef,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Yg,{items:s}),h?o(Ne,{className:"w-full",version:"primary",...h}):null,d.map(((e,t)=>o(ch,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),f.map(((e,t)=>o(Ne,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Qg,{title:m,links:r}),o(bf,{links:l,license:p})]})})),vf=d((({className:e="",title:t,description:n,calendar:a,...i})=>c(g,{className:u("space-y-m",e),defaultPadding:"p-6xl",...i,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),a?Nf(a):null]}))),Nf=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>wf(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:Cf(e)}),c("div",{className:"text-s",children:[o(Ee,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Ee,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},wf=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),Cf=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ne,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Sf=Ft((({className:e,title:t,button:n,regionSource:i,data:l,...r})=>{const[s,d]=a({key:""}),m=i?.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 space-y-m",children:[t?o(N,{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(Ne,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:rh(l,s?.key),children:f})}):null]})})}));function kf(e=[]){const t=D(),n=Array.from(e.entries()).filter((([,e])=>If(t)(e)));return n.find((([,e])=>If(t,!0)(e)))??n[n.length-1]??[]}const If=(e,t=!1)=>({href:n})=>{if(!n)return!1;const a=z(Tf(e)(n));return t?a===z(n):a.startsWith(z(n))},Tf=e=>t=>{const n=X(K.SITE_URL);return E(t)?e.href:F(n,e.pathname)},Rf=d((({className:e="",items:t,activeItem:n,ariaLabel:a="Меню"})=>{const[r,{setFalse:d,toggle:m}]=on(!1),h=dn(d),p=s(null),g=l((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),a=t.current.getBoundingClientRect(),i=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${i}px`:a.left>e.left&&(i>a.left?n.current.style.left="":n.current.style.left=`${i}px`)}}),[r]);return cn(globalThis,"resize",(()=>g({isOpened:r,buttonRef:h,menuRef:p}))),i((()=>{g({isOpened:r,buttonRef:h,menuRef:p})}),[r]),c("div",{className:u(r?"rounded-md shadow-blue-gray":"",e),ref:h,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":a,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:u("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!r}),"aria-hidden":!r,children:Pf(t,n)})]})})),Bf=d((({isActive:e,...t})=>{const n=pe(),{text:a,href:i,target:l,onClick:r}=n(t);return o("a",{className:u("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:i,target:l,onClick:r,role:"link",...fe(t?.data),children:a})})),Pf=(e,t)=>e?.map(((e,n)=>o(Bf,{isActive:e===t,...e},e?.text??String(n)))),Df={default:"w-6 h-6",large:"w-12 h-12"},_f=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:a=!1,disabled:i,ariaLabel:l="Меню второго уровня",image:r,data:s,onClick:c,version:d})=>o("button",{className:u("group/btn border-0 flex shrink-0 items-center",a?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":a&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Df[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:i,"aria-label":l,onClick:c,...fe(s),children:o(ne,{image:r,className:u("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Af="chatbot",Ef="text-page__btn-chat",Mf={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Of=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:a="Чат",version:l})=>{const r=(e=>{i((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=Mf[e??""];return n=>{if(t)if("personal"!==e)yr(Af,t);else{const e=n.target;e?.classList.contains(Ef)||e?.classList.add(Ef),document.getElementById("webchat-js-container:webchat_rshb")||yr(Af,t)}}})(e);return o(_f,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:a,onClick:r,buttonSize:"large",isGrayBg:!0,version:l})})),zf=d((({className:e="",active:t,dataItemName:n,children:a,data:i,...l})=>{const r=pe(),{href:s,target:d,text:m,onClick:h}=r(l);return c("a",{className:u("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:h,...fe(i),children:[o("span",{className:Ff(t),children:m||a}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),Ff=(e=!1)=>u("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Vf=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...i})=>{const r=$d(l((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(zf,{...i,children:n})})})),Lf={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"},$f=d((({version:e,text:t,mobileText:n,...a})=>{const i=ke()?n:t;return i?o(Ne,{className:u("py-s px-lg font-light whitespace-nowrap",Lf["transparent"===e?"transparent":"default"]),...a,children:i}):null})),jf=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:i,chatBotAriaLabel:l})=>{const d="transparent"===t?"white":"black",[,m]=kf(e),[u,h]=a(e.length),p=e.slice(u),g=s(null),f={rootRef:g},x=r((()=>e.map(((e,t)=>e=>{h(e?qf(t):Uf(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(Vf,{className:u-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:x[t],data:e.dataHeader,...e},String(t))))}),p.length?o(Rf,{items:p,activeItem:m,ariaLabel:i}):null,A.CHAT_BOT?o(Of,{version:t,iconVersion:d,chat:A.CHAT_BOT,ariaLabel:l}):null,o($f,{version:t,...n})]})})),qf=e=>t=>Math.max(t,e+1),Uf=e=>t=>Math.min(t,e),Wf=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Ee,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(Hf,{...e},String(t))))})]}):null,Hf=d((({icon:e,...t})=>{const n=pe(),{text:a,target:i,href:l,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,a?o("a",{className:"hover:text-primary-hover",href:l,target:i,onClick:r,children:o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})}):null]})})),Yf=(e,t)=>n=>n.name?o(sh,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:rh(e,n.name),children:o(Ee,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Gf=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(hn,"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"})]}))),Kf=d((({defaultLocation:e})=>{const t=dg(e),n=pe(),{href:a}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(sh,{href:a,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),Xf=d((({foreignOffices:e,branches:t,onClose:n})=>{const i=mg(t?.default),[s,d]=a(""),m=Cl(),u=r((()=>Zf(m).sort(((e,t)=>e.name.localeCompare(t.name)))),[m]),h=r((()=>((e,t)=>{const n=new Map;for(const a of e){const e=t(a),i=n.get(e)||[];n.set(e,[...i,a])}return n})(u,Jf)),[u]),p=l((e=>{i.location=e,n?.()}),[i,n]);return c(Gl,{className:"pb-20",head:c("div",{children:[o(Ee,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Kf,{defaultLocation:t?.default}),o(Gf,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:u.filter((({name:e})=>e&&nf(e.toLowerCase())(s.toLowerCase())>=.8)).map(Yf(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(h.entries()).map((g=p,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ee,{size:"text-h6",children:e})}),t.map(Yf(f,g))]},e)))}),Wf(e)]});var g,f})),Jf=e=>e.name?.charAt(0)??"",Zf=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),Qf=d((({className:e="",active:t,flat:n,children:a,data:i,...l})=>{const r=pe(),{href:s,target:c,text:d,onClick:m}=r(l);return o("a",{className:u(ex(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...fe(i),children:o("span",{suppressHydrationWarning:!0,className:tx(t,n),children:d||a})})})),ex=(e=!1,t=!1)=>u("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),tx=(e=!1,t=!1)=>u("font-sans text-s font-light",e?"text-primary-main":u(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),nx=d((({className:e,version:t,...n})=>{const a="transparent"===t?"white":"black",i=dg(n?.branches?.default),r=sn(uf,n),s=sn(Xf,n),d=l((()=>r.open({})),[r]),m=l((()=>s.open({})),[s]);return c("div",{className:u("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(Qf,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:i?.name,data:rh(n?.branches?.dataClick,i?.name??""),onClick:m}):null,n?.officesAtms?.href?o(Qf,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(_f,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),ax=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...i})=>{const r=$d(l((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(Qf,{...i,children:n})})})),ix=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:i,headerData:l,search:d,bgColor:m,logo:u})=>{const[h,p]=a(e.length),g=e.slice(h),f=s(null),x={rootRef:f},b=r((()=>e.map(((e,t)=>e=>{p(e?lx(t):rx(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=u??{};return c("div",{className:"flex items-center justify-between",children:[o(Hc,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:f,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(ax,{className:h-1<n?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(Rf,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(nx,{version:i,className:"ml-auto",search:d,navigationItems:e,...l})]})})),lx=e=>t=>Math.max(t,e+1),rx=e=>t=>Math.min(t,e),sx={"bg-white":"primary",transparent:"transparent"},ox=["all","header"],cx=Ft((({className:e,bgColor:t="bg-white",logo:n={},version:a=sx[t],portal:i,header:l={},...r})=>{const{common:s,navigation:d}=mx(r?.options?.page),{navigationItems:m}=d,{logo:h={}}=s,[,p]=kf(m),{internetBankButton:f}=i||{},x=n.image?.icon||n.image?.src||n?.title?n:h;return o(g,{tag:"header",className:u("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:a,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(ix,{activeTopItem:p,navigationItems:m?.filter(qg(ox)),version:a,headerData:{...l,...d},search:s.search,bgColor:t,logo:x})}),o("div",{className:u("mt-s h-px bg-main-divider",dx(a))}),p?.items?.length&&o(jf,{subItems:p?.items?.filter(qg(ox)),version:a,internetBankButton:f})]})})})),dx=e=>"transparent"===e?"opacity-30":"",mx=e=>({navigation:e?.navigation??{},common:e?.common??{}}),ux=(e=!1)=>e?{}:{padding:"p-0"},hx={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},px=Ft((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:a=!0,version:i="transparent",isTheme:l=!1,isCardBorder:r,...s})=>o(g,{className:u("relative","grid grid-cols-12",hx[n],e),padding:t,version:i,isTheme:l,...s,children:P({...s,extraProps:{...ux(a),className:Fd(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),gx=d((e=>{const{className:t,align:n,image:a,...i}=e,l=n?u("flex",Um[n]):"";return o(g,{className:u(l,t),defaultPadding:"p-0",...i,children:o(ne,{image:a})})})),fx=(e,t=0)=>{const{itemCount:n,visibleItemCount:i}=e,[r,s]=a(t),o=l((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=l((()=>s((e=>Math.max(e-1,0)))),[n]),d=i?n>i&&r<n-i:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};function xx({dec:e,inc:t,canDec:n,canInc:a,btnClass:i,className:l=""}){return n||a?c("div",{children:[n?o(am,{className:u("absolute z-40",i[0],l),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,a?o(am,{className:u("absolute z-40 rotate-180",i[1],l),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const bx=d((({className:e="",cards:t=[],button:n})=>{const[i,r]=a(0),s=l((e=>r(e)),[]),d=t.length,[m,u]=fx({itemCount:d,visibleItemCount:2}),{canDec:h,canInc:p}=u,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?yx({activeIndex:m,cards:t,selectedCardIndex:i,onClick:s}):null,xx({...u,btnClass:["left-12","right-12"],className:"top-16"}),h?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(Ne,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function yx({activeIndex:e,cards:t,selectedCardIndex:n,onClick:a}){const i=460*e,l=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${i}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${l}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:a}){return c("button",{type:"button",onClick:a,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ne,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?vx("страховая сумма",e.sum):null,e?.fee?vx("страховой взнос",e.fee):null]}),Nx(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})})}function vx(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Ee,{size:"text-h6",children:[He(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Ee,{size:"text-l",color:"text-secondary-text",children:e})})]})}function Nx(e){return e?o(ne,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const wx=d((({className:e="",title:t,insuranceTabs:n=[],button:i,...r})=>{const[s,d]=a(0),m=l((e=>d(e)),[]);return c(g,{className:u("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:a}){return o("button",{type:"button",onClick:a,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Cx({insuranceTabs:n,button:i})})]})})),Cx=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(bx,{button:t,cards:e},String(n)))):null};const Sx={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},kx={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},Ix=d((e=>{const{className:t="",__html:n,isDotted:a,investmentZeroColumn:i,investmentColumns:l,...r}=e,s=l?[...l]:[];return i&&s.unshift(i),o(g,{className:t,defaultPadding:"p-4xl",...r,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[Nm(o("div",{className:"w-px h-4 bg-gray"}))(s.map(Tx)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Px)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(_e,{__html:n,isDotted:a,itemSize:"list-s"})}):null]})})})),Tx=(e,t,n)=>{const a=1===t,i=t===n.length-1,l=e.cells?.reverse()||[];return o("div",{className:`${Rx(a,i,e.cells)}`,children:l.length?o("div",{className:"w-full "+(i?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:l.map(Bx)}):null},`column_${t}`)},Rx=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),Bx=(e,t)=>{const n=e.cellSize||"XS",a=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${kx[n]} ${Sx[a]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Ee,{align:"text-center",children:e.text})},`cell_${t}`):null},Px=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,Dx=["байт","Кб","Мб","Гб","Тб","Пб"],_x=d((({icon:e,text:t,href:n,target:a,fileFormat:i,data:l,fileSize:r})=>{const s=r&&i?",":"",d=r??"",m=i?String(i):"";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:a,...fe(l),children:[e,t?c(Ee,{size:"text-l",font:"font-light",children:[t," ",Ax(d,m),o(Ee,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Ax=(e,t)=>e||t?o("span",{children:", "}):"",Ex=(e,t)=>(n,a)=>{const i=q(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),l="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))} ${Dx[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Ox(i):n?.fileFormat;return c("div",{role:"listitem",children:[o(_x,{text:n?.text,target:n?.target,href:i,fileFormat:r,fileSize:l,icon:Mx(t),data:n?.data}),o(_e,{__html:n?.__html})]},String(a))},Mx=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,Ox=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),a=-1!==t?e.substring(t+1):"";return a.includes("/")?a.replace(n,""):a},zx=d((({href:e,__html:t,target:n,onClose:a})=>{const i=D(),l=q(i)(e);return c(Gl,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:a,children:[t?o(_e,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(Ne,{text:"Я согласен",version:"primary",target:n,href:l,onClick:a}),o(Hl,{type:"button",version:"secondary",onClick:a,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Fx=d((({text:e,href:t,target:n,__html:a,icon:i})=>{const{open:r}=sn(zx),s=l((()=>r({__html:a,href:t,target:n})),[a,t,n]);return e?c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[Mx(i),o(Ee,{font:"font-light",children:e})]}):null})),Vx={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Lx=Ft((({className:e="",title:t,description:n,align:a="text-center",documents:i,icon:l={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=D();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(S,{title:t,description:n,align:a,headlineVersion:"M",as:"h2",isEmbedded:!0}),i?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Vx[r]),role:"list",children:i.map($x(d,l))}):null]})})),$x=(e,t)=>(n,a)=>{const i=n?.docType;return""===i?null:"reportSource"in n&&n?.reportSource?.__html?jx(t)(n,a):Ex(e,t)(n,a)},jx=e=>(t,n)=>{const a={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(Fx,{...a,icon:e,href:qx(t)?t?.href:t?.attachment?.src}),o(_e,{__html:t?.__html})]},String(n)):null},qx=e=>"href"in e,Ux=Ft((({className:e,padding:t,align:n="text-left",buttons:a=[],description:i,image:l,__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=l?.src?o(ne,{className:"hidden lg:block",image:l}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Re,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:je(a,{className:"flex-wrap"}),children:[i?o(Ee,{size:"text-xl","font-weight":"font-light",children:i}):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(_e,{__html:r,itemSize:"list-m"}):null,o(Ee,{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,l?.src?o(ne,{className:"lg:hidden",image:l}):null]})]})})})),Wx=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Hx=(e=[],t={})=>e.filter((({content:e={}})=>Rm(t,e))).length,Yx=(e,t)=>e===t;const Gx=(e=>(t,n)=>t===n||Boolean(t&&n&&Object.keys(t).length===Object.keys(n).length&&Object.entries(t).every((([t,a])=>e(a,n[t])))))(function(...e){return(t,n)=>e.some((e=>e(t,n)))}(Yx,((e=Yx)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))())),Kx=[],Xx={},Jx={primary:"bg-white/30",secondary:"bg-main-divider"},Zx={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Qx=d((({count:e,version:t="secondary"})=>{const n=ke(),a=n?"bg-main-divider":Jx[t],i=Zx[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",a),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Ee,{size:"text-xs",color:i,children:e})})})),eb=({text:e,description:t,icon:n,isActive:a,type:i})=>{const l=(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"}))(a);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",l.icon),image:{...n,iconVersion:n?.iconVersion??l.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===i?l.text:l.oldText,children:e}),o("div",{className:"animated"===i?l.desc:l.oldDesc,children:t})]})]})},tb={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},nb={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},ab={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},ib={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},lb=d((({tag:e="div",item:t={},isActive:n=!1,type:a="default",onClick:i})=>{const l=e,{text:r,description:s,icon:d,count:m,tabName:h,...p}=t;return o(l,{className:u("h-12","block flex-1","cursor-pointer",tb[a],n?ib[a]:ab[a]),role:"tablist","aria-label":"Список табов",onClick:i,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?nb[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[eb({text:r,description:s,icon:d,isActive:n,type:a}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Qx,{count:m,version:Wx(n,a)})}):null]})})})),rb=d((e=>o(e?.item?.href?sb:ob,{...e}))),sb=d((e=>{const t=pe(),n=l((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:a,...i}=t({...e.item,onClick:n});return o(lb,{...e,tag:"a",item:i,onClick:a})})),ob=d((({item:e={},onClick:t,...n})=>{const a=l((()=>{t&&t(e)}),[t,e]);return o(lb,{item:e,onClick:a,...n})})),cb=(e,t,n)=>(a,i)=>o(rb,{isActive:a===e,onClick:t,type:n,item:a},String(i)),db=d((({className:e,tabsType:t="default",items:n=[],activeItem:a,onChange:i})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(cb(a,i,t))}))),mb={categories:[],extraOptions:[],propertyType:[],stage:[]},ub=Ft((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...i})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Pm(mb,{block:i.block,page:i.options?.page}),f=l(((e=mb)=>p(e)),[]),x=(({hotFilters:e=Kx,filtrationState:t=Xx,blocks:n=Kx,onFiltrationStateChange:a})=>{const i=r((()=>Math.max(0,e.findIndex((e=>Gx(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Hx(n,t.filter),version:Wx(t===e[i])})))),[e,n,i]),o=l((t=>{a(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[i],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:i.block?.blocks,onFiltrationStateChange:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(db,{...x}),o(Cm,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(ym,{blocksToRender:d,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),hb=(e,t,n)=>{const a=Wx("all"===t),i=Wx("business"===t),l=(e,t,a)=>{const i=e.currentTarget===e.target&&"business"===t?r(a):a;return n(t),i},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(Hl,{"data-id":"all",onClick:t=>l(t,"all",e),version:a,children:"Для физических лиц"}),o(Hl,{"data-id":"business",onClick:t=>l(t,"business",e),version:i,children:"Для юридических лиц"})]})},pb=({__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(_e,{__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(Ee,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,gb="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",fb=({filters:e,field:{field:t,reset:n},onlyOffice:a,labels:i})=>{const l=a?5:6,r=(e||[]).map((e=>o(xi,{text:i[e],...t(e)},e))),[s,d]=l>0?[r.slice(0,l),r.slice(l)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(_r,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:gb,children:s}),o(Ar,{className:gb,isUnfolded:e,children:d})]}),renderFoldButton:xb(n,a)})}):null})},xb=(e,t=!1)=>({isUnfolded:n,onToggle:a})=>c("div",{className:"flex space-x-lg",children:[t?o(Ne,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:a}):null,o(Ne,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:bb()})]}),bb=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),yb=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Ee,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),vb=()=>{},Nb=e=>"all"===e?"block":"hidden",wb=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:i=[],renderCard:l=vb,renderRemoteWorkplaceCard:r=vb,getBalloon:s=vb,getBalloonRemoteWorkplaces:d=vb,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=an(cs),{filteredItems:b,points:y,filteredRemoteWorkplaces:v,lengthItems:N}=ps({data:t,remoteWorkplaces:i,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=a("all"),S={filters:Cb([...t,...i]),field:{field:f,reset:x},onlyOffice:p,labels:ds};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[yb(h,N),m?pb(m):null,p&&hb(t,w,C),o("div",{className:u("pb-3xl",Nb(w)),children:fb(S)})]}),o("div",{className:"h-[600px]",children:o(bs,{children:o(Sr,{points:y,isLoad:n,className:"h-full"})})})]}),c(bs,{children:[b.map(l),v.map(r)]})]})})),Cb=e=>Object.keys(cs).filter((t=>e.filter((e=>ms[t](e))).length)),Sb=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:i,atmCode:l="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Tb(a)},{label:"Модуль приема наличных",value:i?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:l}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ee,{size:"text-h4",children:Tb(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Kr,{color:"green",children:Tb(s)})})]}),o("div",{className:"hidden sm:block",children:o(Fr,{className:"flex-wrap",children:m?.map(Ib)})}),o(_r,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ar,{isUnfolded:e,children:o(Fr,{className:"flex-wrap",children:m?.map(Ib)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ns({isUnfolded:e,onToggle:t})})]},String(d))},kb=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Tb(t)} №${n}`,body:e.toUpperCase()}),Ib=(e,t)=>o(Er,{...e},String(t)),Tb=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Rb=[];const Bb=async e=>{const t=await Pt(e,{method:"GET"});return Array.isArray(t)?t:Rb},Pb={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Db={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)},_b=d((({descriptionData:e,className:t})=>{const n=dg(),a=n?.code??"000",{data:i,isLoad:l}=function(e){const{data:t,error:n}=ya(`${Ut}/atms?regionCode=${e}`,Bb);return{data:t||Rb,isLoad:!t&&!n}}(a);return o(wb,{className:t,filterItems:Ab,data:i,isLoad:l,initFilterState:Pb,renderCard:Sb,getBalloon:kb,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Ab=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),a=n.filter((e=>e.startsWith("terminalType"))),i=n.filter((e=>!a.includes(e)));return e.filter((e=>{const t=i.every((t=>Db[t](e))),n=!a.length||a.some((t=>Db[t](e)));return t&&n}))},Eb=({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(Ee,{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(Ee,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Mb({workScheduleDescription:t})}),o(_r,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ar,{isUnfolded:e,children:Mb({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ns({isUnfolded:e,onToggle:t})})]},String(n)):null,Mb=({workScheduleDescription:e})=>c("div",{children:[c(Fr,{className:"flex",children:[o(Er,{label:"Операции для физических лиц",children:o(Ee,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Er,{label:"Операции для физических лиц",children:o(Ee,{children:"Оформление и обслуживание банковских карт"})}),o(Er,{label:"Операции для физических лиц",children:o(Ee,{children:"Инвестиционное и накопительное страхование"})}),o(Er,{label:"Операции для физических лиц",children:o(Ee,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Er,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]}),Ob=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),zb={branches:[],remoteWorkplaces:[]};const Fb=async e=>await Pt(e,{method:"GET"})||zb,Vb=d((({className:e})=>{const t=dg(),n=t?.code??"000",{data:a,isLoad:i}=function(e="000"){const{data:t,error:n}=ya(`${Ut}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,Fb);return{data:t||zb,isLoad:!t&&!n}}(n);return o(wb,{className:e,data:a?.branches,isLoad:i,remoteWorkplaces:a?.remoteWorkplaces,renderCard:rs,renderRemoteWorkplaceCard:Eb,getBalloon:os,getBalloonRemoteWorkplaces:Ob,title:`Офисы филиала ${t?.name}`})})),Lb=d((({data:e,className:t,...n})=>{const a=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===a?o(Vb,{}):o(_b,{descriptionData:e})})})),$b=d((({className:e,title:t,description:n="Блок в разработке...",...a})=>c(g,{className:u("box-border",e),...a,children:[o(S,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),jb="hidden sm:flex absolute z-40 top-10",qb=Ft((({className:e="",padding:t,slides:n=[],...i})=>{const[l,r]=a(0),[s,d]=Qd({itemCount:n?.length||0});return c(g,{className:u("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...i,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*l}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(Ze,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...i})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(Wd,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(Ub({activeSlideIndex:l,onClick:r}))}),d.canScrollLeft?o(im,{className:u("left-6",jb),onClick:d.scrollLeft}):null,d.canScrollRight?o(lm,{className:u("right-6",jb),onClick:d.scrollRight}):null]})]})})),Ub=({activeSlideIndex:e,onClick:t})=>({nav:n},a)=>{const i=a===e,l=i?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=i?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=i?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"aria-label":n?.title,className:u("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",l),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(a))},Wb=d((({address:e,email:t,telephone:n,button:a,className:i="",__html:l,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",i),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[$e(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[l?Hb({__html:l,richVersion:r}):null,Yb({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Yb({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Yb({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?je([a]):null]})]}))),Hb=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(_e,{...e,itemSize:"list-s"})}),Yb=({label:e,data:t,iconName:n,dataColor:a=""})=>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(Ee,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ee,{size:"text-xl",color:a,children:t})]})]}):null,Gb=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(_e,{__html:t,richVersion:n})})})),Kb=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:a,labelIcon:i})=>o(hm,{tag:"button",className:u("border-none bg-transparent items-center group/button",i?.icon?"py-xs":"py-lg"),onClick:a,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?o(Ee,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Xb=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Jb=(e=!1)=>e?"MinusIcon":"PlusIcon",Zb=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Qb=Ft((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:a="Развернуть",labelIcon:i,labelIconBgVersion:l,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=ke();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(_r,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Ar,{className:u("gap-lg",Xb(m)),isUnfolded:e,children:P({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ey({foldButtonVersion:r,label:a,labelIcon:i,labelIconBgVersion:l,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),ey=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:a,isUnfolded:i,onToggle:l,isMobile:r=!1})=>{const s=t||(i?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?Zb(e):Jb(e))(i,r);return"accordion"===e?o(Kb,{label:s,labelIcon:n,labelIconBgVersion:a,icon:c,onToggle:l}):o(pm,{label:s,icon:i?"ArrowUpIcon":"ArrowDownIcon",onClick:l})},ty=d((({name:e,text:t,value:n,checked:a,onChange:i,className:l})=>o("div",{className:l,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:u(hn.split(" ").filter((e=>"rounded"!==e)),gi,"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:a,onChange:e=>i?.(e.target.value),role:"radio"}),t?o(Ee,{color:"text-primary-text",children:t}):null]})}))),ny=d((({className:e=""})=>{const[t,n]=a("option2"),i=l((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(ty,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:i}),o(ty,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:i})]})})),ay=d((({data:e,fieldLabel:t,fieldValue:n,selected:a,placeholder:i="",setSelected:l,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===a));return o(Dn,{options:s,label:r,placeholder:i||a,onChange:e=>l(e.key),value:c})})),iy=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:a=[],selectedBranch:i,onSelectedBranch:l})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(ay,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(ay,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:i,setSelected:l,label:"Отделение",placeholder:"Выберите отделение"})})]}))),ly=["От 1 дня","До 365 дней"],ry=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ee,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Aa,{min:1,max:365,value:e,items:ly,onChange:t})]}))),sy=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:a=[],selectedBoxSize:i,onSelectedBoxSize:l})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(ay,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(ay,{data:a,fieldLabel:"safeBoxCasesSize",selected:i,setSelected:l,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),oy=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:a,days:i,selectedCaseVolume:l,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(iy,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:cy(m)}),o(ry,{days:i,setDays:e=>m({days:e})}),o(sy,{caseVolumes:d,selectedCaseVolume:l,onSelectedCaseVolume:dy(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(ny,{}),o(Ne,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),cy=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},dy=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},my=d((({days:e,tariffs:t=[]})=>{const n=hy(e,t),a="На рисунке изображена пачка листов\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:[uy("Аренда за",e),uy("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:a})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:a})})]})]})})),uy=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),hy=(e,t)=>{const n=py(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},py=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},gy=(e,t)=>e.find((e=>e.branchCode===t)),fy=d((e=>{const{regions:t,data:n,branches:a,onChange:l,onClick:r}=e;i((()=>{l({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,l]);const s=gy(a,n.selectedBranch),d=xy(s?.safeBoxCaseVolumes),m=by(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=yy(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(oy,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:l}),o(my,{days:n.days,tariffs:u})]})})),xy=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],by=(e,t)=>e?.find((e=>e.volume===t)),yy=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,vy=`${Ut}/safeboxes`,Ny=[];const wy=async e=>await Pt(e,{method:"GET"})||Ny,Cy=d((({title:e,footnote:t,className:n="",...i})=>{const[r,s]=a(!1),d=l((()=>s((e=>!e))),[]),[m,u]=a({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=Cl(),p=Sy(m.selectedRegion,h),f=function(e){const{data:t}=ya(e?`${vy}?regionCode=${e}`:null,wy);return t||Ny}(p),x=l((e=>u((t=>({...t,...e})))),[u]),b=(y=gy(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:"",...i,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(fy,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Sr,{points:b,className:"h-[640px]"}):null]})})),Sy=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,ky=e=>e<4?"w-72":"w-52",Iy={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"},Ty=d((({buttons:e,className:t="",description:n,showLines:a=!0,steps:i=[],stepVersion:l="gray",title:r,version:s="primary",...d})=>{const m=i.length>3,h=Iy,p=(e=>e?"":"opacity-0")(a),f=ke();return c(g,{className:u("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(S,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:Mm(f)}),i?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:u("flex items-center",m?"px-16":"px-24"),children:Nm(o("div",{className:u("h-0.5 w-full bg-secondary-light flex-1",p)}))(i.map(Ry(h,m,l)))}),o("div",{className:u("flex justify-between",m?"gap-x-s":"gap-x-20"),children:i.map((x={styleMap:h,version:s},(e,t,n)=>{const{styleMap:a,version:i}=x,{label:l,description:r,button:s,isDotted:d}=e;return c("div",{className:u("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",ky(n.length)),children:[c("div",{className:"space-y-xs",children:[l?o(Ee,{size:"text-h6",align:"text-center",children:l}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:a.description,children:r}):null,o(_e,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(Ne,{className:"box-border py-s w-full mt-auto",version:i,...s,children:s?.text}):null]},String(t))}))})]}):null,je(e)]});var x})),Ry=(e,t,n)=>({icon:a},i)=>{const l="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${By(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:$e(a)?o(ne,{image:{...a,iconVersion:a?.iconVersion||l},width:"48",height:"48"}):o("span",{className:u("text-h4","transparent"===n?e.iconText:(r=n,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:i+1})},String(i));var r},By=e=>e?"h-16 w-16":"h-24 w-24",Py=d((()=>o("div",{className:"hidden",role:"none"}))),Dy="hidden sm:flex absolute z-40",_y={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Ay=d((({className:e,items:t=[],activeItem:n,onChange:a,tabsType:l="default"})=>{const[r,s]=Qd({itemCount:t?.length||0});return i((()=>Ey(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(Wd,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:_y[l].item,gap:_y[l].gap,children:t.map(cb(n,a,l))}),s.canScrollLeft?o(im,{className:u("left-6",Dy,_y[l].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(lm,{className:u("right-6",Dy,_y[l].buttonTop),onClick:s.scrollRight}):null]})})),Ey=(e,t,n)=>{const a=t.findIndex((e=>e===n));e&&a>0&&e.scrollTo({left:e?.children[a]?.offsetLeft,behavior:"smooth"})},My={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Oy=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(My[t].wrapper,e),children:o(Ay,{className:My[t].component,tabsType:t,...n})}):null,zy=Ft((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=Fy(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]=a($y(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)));i((()=>{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 C=Ly(x[y],y),S=l((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:[Oy({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Vy(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])=>B(t,{...m?.options,slotName:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Ly)?.filter(Boolean)||[]}),Fy=({__id:e,anchor:t})=>t??e??"tabs",Vy=(e,t)=>t?.length?t:e,Ly=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",$y=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),jy={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},qy=d((({children:e,activeIndex:t,columnWidth:n,version:a="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:jy[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Uy=d((({className:e="",isOpen:t,onClick:n})=>o(Ne,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),Wy={Buttons:({buttons:e})=>je(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(_e,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Ee,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Ee,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:a,isOpen:i})=>e?o(Uy,{className:"w-fit",isOpen:i,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},Hy=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:l,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=a(!0);i((()=>{l===o&&s||m(!0)}),[s,o]);return Yy({cell:e,cellProps:{rowIdx:n,cellIdx:l,fieldIdx:t,displayTable:e=>{m(!1),c(l),r(e)},isVisible:d}})})),Yy=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in Wy))return null;return o(Wy[n],{...t,...a})},Gy=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,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(Hy,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,setOpenTableInnerIdx:r},String(s)))):null}))),Ky=(e,t)=>140*lf(e.slice(0,t).map((e=>e?.cols?.length??1))),Xy=(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(Ee,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Jy=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,a]=fx({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((i=n,(e,t)=>{if(!e?.length)return null;const[n,...a]=e,l=u("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Ee,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:l,style:{transform:`translateX(-${Ky(a,i)}px)`},children:a?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ee,{size:"text-xl",children:e.data}):null,e?.cols?Xy(e.cols,i):null]},`row${t}`)))})})]},String(t))})),xx({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var i})),Zy=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const a=`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(Ee,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(Jy,{rows:t.rowsData})})})]},a)}))}))),Qy=(e=!1)=>""+(e?"text-white":"text-secondary-text"),ev=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:a})=>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:()=>a(t),children:o(Ee,{size:"text-xl",font:"font-light",color:Qy(t===n),children:e||t+1})},e)))}):null,t?o(Ne,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),tv=Ft((({tableSource:e,pdfUrl:t,onClick:n})=>{const i=e?.tableData,[r,s]=a(0),d=l((e=>s(e)),[]),m=i?.[r]?.items??[],u=i?.map((e=>e.currency??""));return c("div",i?{className:"bg-white z-10",children:[o(ev,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Zy,{activeTabIndex:r,items:m}),o(Uy,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ee,{size:"text-h6",children:"Данных нет"}),o(Uy,{onClick:n,isOpen:!0})]})})),nv=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(tv,{...t,onClick:n})}):null]}))),av=d((({row:{header:e,data:t},activeIndex:n,rowIdx:i,...r})=>{const[s,d]=a(void 0),m=l((e=>d(e)),[]),[h,p]=a(void 0),g=l((e=>p(e)),[]);return c(nv,{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(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(qy,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Gy,{cells:e,rowIdx:i,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),iv=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,xx({...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]})})),lv=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:i,hiddenRowsNum:l=0,...r})=>{const s=i?.map((({data:e})=>e))||[],d=a?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,p]=fx({itemCount:m,visibleItemCount:2}),f=(d||[]).map(((e,t)=>o(av,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,b]=l>0?[f.slice(0,-l),f.slice(-l)]:[f,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:l>0?o(_r,{renderFoldableSection:({isUnfolded:e})=>c(iv,{controls:p,children:[x,o(Ar,{isUnfolded:e,children:b})]}),renderFoldButton:gm}):o(iv,{controls:p,children:f})})]})})),rv=d((({className:e="",title:t,description:n,iconVersion:a,__html:i,richVersion:l,...r})=>c(g,{className:u("flex gap-s sm:gap-m group-data-secondary:bg-primary-main/10",e),...r,children:["small"===a?sv():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ee,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?ov(n):null,i?o(_e,{richVersion:l,__html:i}):null]})]}))),sv=()=>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"}),ov=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),cv=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(Ee,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Ee,{size:"text-h2",children:n})}):null]}))),dv=d((e=>{const{prefix:t,unit:n,suffix:a,...i}=e;return o(g,{defaultPadding:"p-0",...i,children:o(cv,{prefix:t,unit:n,suffix:a})})})),mv=Ft((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:a=!0,version:i="transparent",isTheme:l=!1,isCardBorder:r=!1,image:s,...c})=>{const d=D();return o(g,{className:u("relative flex flex-col",hx[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:i,isTheme:l,...c,children:P({...c,extraProps:{className:u("w-full",Fd(r)),...ux(a)}})})}),{childrenTypes:[]}),uv=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(9),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",hv=d((({className:e,title:t,url:n,previewImg:a,...i})=>{const l=D();return c(g,{className:e,defaultPadding:uv(e),...i,children:[o(S,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:q(l)(a?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:q(l)(n)})}):null]})})),pv={AdTile:Lt,ApplicationForm:lr,ApplicationLeadForm:Od,BankAccountFiltration:Am,BenefitsBlock:Fm,BonusBenefitsBlock:qm,ButtonsBlock:Wm,CalculatorBonus:Zm,CalculatorBusinessDeposit:ou,CalculatorCredit:vo,CalculatorDeposit:Iu,CalculatorRefinancing:Eu,CardTransfer:$u,Carousel:Ku,CarouselCard:Qu,CarouselCatalogCard:th,CarouselLinks:ih,CarouselRecommendationCard:uh,CarouselTariffsCard:gh,ContactsBlock:xh,CreditCardForm:up,CreditForm:Vp,DepositFiltration:Up,Depository:rg,ErrorBlock:og,ExchangeRateTile:Vg,Footer:yf,GracePeriod:vf,GrantSupport:Sf,Header:cx,Headline:S,HorizontalLayout:px,ImgBlock:gx,InsuranceAmountBlock:wx,InvestmentInfo:Ix,LinkDocs:Lx,MobileAppTile:Ux,MortgageFiltration:ub,OfficesAtmsMap:Lb,Placeholder:$b,ProductBlock:Vt,ProductGallery:qb,RepresentativeOfficeInfo:Wb,RichTextBlock:Gb,RollupItem:Qb,SafeDepositRental:Cy,StepsBlock:Ty,StickyBottomMenu:Py,TabsLayout:zy,TariffsTable:lv,TextBlock:rv,UnitBlock:dv,VerticalLayout:mv,Video:hv},gv=ce((()=>{i((()=>{Qt()}),[]);const e=tn();cn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const a=JSON.parse(n?.dataset?.aspects??"[]");Xt({aspectsAttributes:a,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),fv="cookie",xv=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=on();tf((()=>{globalThis.localStorage?.getItem(fv)||n()}),[],3e3);const i=l((()=>{globalThis.localStorage?.setItem(fv,"true"),a()}),[]);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(_e,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Yl,{className:"bg-main-gray rounded-md w-11 h-11",onClose:i})})]})}):null}));function bv(e){const t=l((({key:t})=>{"Escape"===t&&e()}),[e]);cn(globalThis.document,"keydown",t)}function yv(e,t,n){i((()=>e.subscribe(t,(e=>{const t=e?.type;if(t&&"string"==typeof t){const a=n[t];a&&a(e)}}))),[e,t,...Object.values(n)])}const vv=()=>{const[e,{push:t,pop:n,clear:i}]=function(e=[]){const[t,n]=a(e),i=l((e=>n((t=>[...t,e]))),[]),r=l((()=>n((e=>e.slice(0,-1)))),[]),s=l((e=>n((t=>t.filter((t=>t!==e))))),[]),o=l((()=>n([])),[]);return[t,{setList:n,push:i,pop:r,remove:s,clear:o}]}();return yv(ue.observable,"dialog",{open:t,close:n,closeAll:i}),[e,{close:n,closeAll:i}]},Nv=d((()=>{const[e,{close:t}]=vv(),n=Boolean(e.length);return bv(t),i((()=>{n?globalThis.document?.body.classList.add("no-scrollbar","overflow-hidden"):globalThis.document?.body.classList.remove("no-scrollbar","overflow-hidden")}),[n]),n?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:e.map((({dialog:t,id:n},a)=>o("div",{className:u("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:a!==e.length-1}),children:t},String(n||a))))}):null})),wv=d((()=>{const[e,t]=a(null),n=l((()=>{t(null)}),[]);return yv(ue.observable,"popup",{open:t,close:n}),bv(n),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})),Cv="header",Sv="footer",kv="sticky-footer",Iv={},Tv=d((({className:e,data:t=Iv,blocksRegistry:n,blockDecorator:a})=>{const{slots:i,blocks:l,fallback:r,...s}=t,d=Ot(s,r);gv(),mg();const m={key:"",page:{slots:i,blocks:l,fallback:r,...d},blocksRegistry:n,blockDecorator:a,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:u("@container relative",t.style,e),children:[i?.[Cv]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:B(i?.[Cv],{...m,slotName:Cv})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[P({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),B(i?.[Sv],{...m,slotName:Sv})]})]}),i?.[kv]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:B(i?.[kv],{...m,slotName:kv})}):null,o(Nv,{}),o(wv,{}),o(xv,{__html:d?.cookieContent?.__html})]})}));Object.assign(Tv,{childrenTypes:[],slots:()=>[Cv,Sv,kv]});e.Blocks=pv,e.ContentPage=Tv,e.handlerDecorator=ce,e.joinList=Nm,e.locationNavigator=Jt,e.packageVersion="0.14.736",e.projectSettings=A,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,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).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),a=n("useState"),l=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:a,...l}=t||{},i=n?.slots?.default,r=a||i&&i();return e(Object.assign(l,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:a="p-xl",padding:l,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],l||a,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={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:a,children:l})=>o(n,{role:"heading",className:u("font-sans m-0",v[t],e),children:a||l}))),w=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),C={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"}},S=d((({className:e,version:t="",headlineVersion:n="XL",title:a,description:l,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=C[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[a?o(N,{className:u("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:a}):null,l?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...p,children:l}):null]})})),k=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function T(e,t,{className:n,...a}={}){const{key:l,blockDecorator:i=k,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,...a},l):null}},l)}const R=[],B=(e,{key:t,ancestors:n=R,slotName:a=null,extraProps:l,renderProps:i=T,...r})=>{const s=l?(e,t)=>T(e,t,l):i;return(e||[]).map(((e,l)=>s(e,{...r,key:`${t||e.type}-${l}`,ancestors:r.parent?[...n||R,[r.parent,a]]:n},l)))};function P({block:e,options:t,children:n,extraProps:a,renderProps:l}){return n||(e&&t?B(e.blocks,{...t,parent:e,extraProps:a,renderProps:l}):null)}function _(){return _._impl()}_._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),_.setup=e=>{_._impl=e};const D=["CDN","BASE_PATH"],A=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return D.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),E=e=>Boolean(e?.includes(":")),M=(e,t)=>Boolean(e&&!E(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),z=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),V=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),F=(e,t)=>!(!e||!t)&&(!!e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:E,isLocalURL:M,isHash:O,withoutQuery:z,joinPath:V,hasPrefix:F});const $="/api/",j=`${$}v1/storage`,U=e=>(t,n)=>{if([!t,E(t),O(t),[A.CDN,$].some((e=>F(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`${j}/${t}/attachment`;const a=t?.startsWith("/");return V(F(t,n)?"":n,a?"/":(l=e.pathname,l?.split("/").slice(0,-1).join("/")),t);var l},q={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:a=`Иконка ${n}`,title:l=a,iconVersion:i="color",width:r,height:s})=>{const d=_(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,h=U(d)(V(A.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:a,title:l,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(G,{className:e,children:c("svg",{className:u(Y(r),q[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[l?o("title",{children:l}):null,a?o("desc",{children:a}):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",G=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),K=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function X(e=""){try{return new URL(e).pathname}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":X(K.SITE_URL);return t&&!E(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 a=_();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:l},i)=>o("source",{srcSet:J(a)(e),type:te(n),media:l?`(max-width: ${l}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(a)(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="",...a})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...a}):o(Q,{className:e,imageClassName:n,image:t}):null)),ae={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","":""},le="bg-main-divider text-main-disabled",ie={primary:le,secondary:le,white:le,link:"",transparent:"",gray:le,"":""},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?ae[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ce=e=>ce._impl(e);function de(e,t){const n=s({});return r((()=>new Proxy({},{get:(a,l)=>(n.current||={},n.current[l]||=n=>e.fire(t,{...n??{},type:l}),n.current[l])})),[e,t])}ce._impl=e=>e,ce.setup=e=>{ce._impl=e};class me{watchers=new Set;subscribersMap={};subjectsStateMap={};emitter=this;observable=this;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}subscribe(e,t){this.subscribersMap[e]||=new Set,this.subscribersMap[e]?.add(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.subscribersMap[e]?.delete(t)}}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(e,t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t??void 0,this.fireSubscribers(e,t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){for(const n of this.subscribersMap[e]??[])n(t??null);for(const n of this.watchers)n({type:e,event:t??null})}}const ue=new me,he=()=>de(ue.emitter,"dialog");function pe(){const e=X(K.SITE_URL),t=_(),{closeAll:n}=he();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:ce(a({...e,href:n}))}};function a({href:a,target:l,onClick:i}){return r=>{i?.(r),ge(a,l,e)||(n(),r?.preventDefault(),t.push(((e,t="")=>e?.replace(t,"")||"/")(a,e)))}}}const ge=(e,t,n)=>{if(!M(e,t))return!0;const a=K.SUB_PORTALS?.split(",");return!!a?.some((t=>F(e,t)))||!F(e,n||"/")},fe=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},xe=d((e=>{const{text:t,aboveText:n,appendLeft:a,appendRight:l,version:i="primary"}=e,r=ye(e)&&"hidden lg:block";return c("div",{className:u(be(e),"flex gap-xs"),children:[a?o("div",{className:u(r,se[i]),children:a}):null,ye(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,l?o("div",{className:u(r,se[i]),children:l}):null]})})),be=e=>{const{version:t,aboveText:n,rounded:a}=e;if("link"===t)return"";const l=""+(n?"py-2.5 px-9":"py-4 px-9");return u("group/btn items-center justify-center",ye(e)?l:"h-12 w-12 m-auto",{"rounded-full":a})},ye=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),ve=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Ne=d((({disabled:e,children:t,method:n="LINK",href:a,...l})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:a,pathname:l,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[a,l].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:a}),s=pe()({onClick:r,href:a,...l}),c=t??o(xe,{...s});return o(e?Ce:we,{...s,children:c})})),we=d((({className:e="",href:t,rel:n,target:a,ariaLabel:l,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:a,"aria-label":l||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...fe(d),children:m}))),Ce=d((({className:e,ariaLabel:t,version:n,rounded:a,children:l})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ve({className:e,rounded:a,version:n}),children:l})));function Se({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:a=!1}){if(!n)return null;const l="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(a?"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:l}})}),o(Ne,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const ke=()=>{const[e,t]=a(false);return l((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Ie={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Te=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&Ie[n],t),children:e}):null,Re=d((({className:e,version:t="primary",defaultPadding:n,padding:a="",title:l,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=ke(),v=_(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,C=f&&!y;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",a||n,e),children:[C&&Se({version:t,handleClick:N,text:w}),l?o("div",{className:"relative h-full",children:l}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Te(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]}),Pe(P({...b,extraProps:{className:"@container-normal"}})),Te(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Be(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Be=e=>u(e?"row-span-2":"@xl:row-span-2"),Pe=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,_e=(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,De=d((({__html:e="",richVersion:t="",itemSize:n="list-m",isDotted:a=!0,children:l})=>e||l?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(t,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",a?"":"without-dots"),dangerouslySetInnerHTML:e?{__html:e}:void 0,children:l})}):null)),Ae=(e,t)=>e?o(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ee=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),Me=(e,t)=>e?o(Ee,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Oe=(e,t)=>["label"in e?Me(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Ae(e.description,t)},String(t)):null,"__html"in e?o(De,{...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?_e(n.icon,t):null,o("div",{children:Oe(n)})]}))),Ve=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)),Fe=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(Oe)}):null)),Le=d((({isTabularBenefits:e,...t})=>o(e?Fe:Ve,{...t}))),$e=e=>Boolean(e?.src||e?.icon),je=(e,{className:t,buttonClassName:n,isVertical:a}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",a?"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(Ue(n))}):null,Ue=(e="")=>(t,n)=>{const{text:a,icon:l,iconRight:i,version:r,...s}=t||{},c=qe(l,r),d=qe(i,r);return a||l?.icon?o(Ne,{className:u("basis-full @lg:basis-auto",e),appendLeft:We({...l,iconVersion:c}),appendRight:We({...i,iconVersion:d}),version:r,text:a,...s},n?String(n):""):null},qe=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},We=e=>$e(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),He=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),Ye=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(Ge)}):null)),Ge=({label:e,amount:t,unit:n},a)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Ee,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[He(2)(t)," ",n||"₽"]}):null]},String(a)),Ke=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Xe)}):null)),Xe=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ee,{size:"text-m",font:"font-light",children:e})},String(t)),Je={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Ze=d((({className:e,padding:t,defaultPadding:n,title:a,description:l,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:C=!1}={},backwardButton:k,children:I,...T})=>{const R=y?.src?o(ne,{image:y}):null,B=o(S,{title:a,description:l,headlineVersion:i,align:r,isEmbedded:!0}),P=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Re,{className:e,padding:t,defaultPadding:n,...g?{title:B}:{insetTitle:B},...Qe(R,N),isImageSecondary:C,imageAlign:v,isImageAlwaysOnRight:w,buttons:je(b),backwardButton:k,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(Le,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,h?o(De,{richVersion:p,__html:h,isDotted:m,itemSize:Je[i]}):null,I,f?.length?o(Ye,{priceList:f}):null,et(x)]})})})),Qe=(e,t)=>t?{rightImage:e}:{leftImage:e},et=e=>e?.length?o(Ke,{tags:e}):null;class tt{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof tt?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const nt=()=>!0,at=(e,t)=>(...n)=>e(...n)&&t(...n),lt=(...e)=>(...t)=>{const[,n]=function(e){if(!e)throw new Error("Value should be fulfilled");return e}(e.find((([e])=>e(...t))));return n(...t)};const it=e=>Boolean(e&&Array.isArray(e)),rt=e=>Boolean(e&&"object"==typeof e&&!it(e)),st=e=>e;function ot(e){return e instanceof tt?e._:e}class ct extends tt{from(e){return this.of(e.map(((e=st)=>([,t])=>e(t))(ot)))}entries(){return(this._??[]).map(((e,t)=>[t,this.of(e)]))}size(){return this._?.length??0}get(e){return this.of("number"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of(it(this._)?Array.from({length:Math.max(this._.length,Number(e)+1)},((n,a)=>a===e?t:this._[a])):Array.from({length:Number(e)+1},((n,a)=>a===e?t:void 0)))}}class dt extends tt{from(){return this}entries(){return[]}size(){return 0}get(e){return this.of(void 0!==e?void 0:this._)}set(e,t){return this.of(t)}}class mt extends tt{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,ot(t)]))))}entries(){return Object.entries(this._??{}).map((([e,t])=>[e,this.of(t)]))}size(){return Object.keys(this._??{}).length}get(e){return this.of("string"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of({...this._,[e]:t})}}class ut extends tt{proto=lt([e=>it(this._)||"number"==typeof e,()=>ct.prototype],[e=>rt(this._)||"string"==typeof e,()=>mt.prototype],[nt,()=>dt.prototype]);from(e){return this.proto(void 0).from.call(this,e)}entries(){return this.proto(void 0).entries.call(this)}size(){return this.proto(void 0).size.call(this)}get(e){return this.proto(e).get.call(this,e)}set(e,t){return this.proto(e).set.call(this,e,t)}}const ht=e=>e instanceof tt?e:new ut(e),pt=e=>{const t=(t,...n)=>ot(e(ht(t),...n));return t.fn=e,t},gt=[],ft=e=>e instanceof Function?e:t=>e===t,xt=e=>(t,n,a=gt)=>ht(t).entries().reduce(((t,[n,l])=>xt(e)(l,t,a.concat(n))),e(n,[a,ht(t)])),bt=pt(((e,[t,n])=>{const[a,...l]=t;return e.set(a,l.length?bt(e.get(a),[l,n]):n)})),yt=pt(((e,t)=>t.reduce(bt.fn,e))),vt=e=>xt(((e,[t,n])=>Nt(n)?[...e,[t,ot(n)]]:e))(e,[]),Nt=e=>0===e.size();pt(((e,t=gt)=>t.reduce(((e,t)=>e.get(t)),e)));const wt=pt(((e,[t,...n])=>n.length?e.set(t,wt(e.get(t),n)):e.filter((([e])=>e!==t)))),Ct=(St=["$ref"]).map(((e,t)=>n=>ft(e)(n[t+n.length-St.length]))).reduceRight(at,nt);var St;const kt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(It,e),It=lt([it,(e,t)=>e[parseInt(t,10)]],[rt,(e,t)=>e[t]],[nt,st]),Tt=(e,t)=>((e,t={})=>n=>yt(t,vt(n).map((t=>e(t)))))((([e,n])=>{return Ct(e)?[(a=e,a.slice(0,-1)),kt(t(n),n)]:[e,n];var a}))(e),Rt=e=>vt(e).filter(((e=st)=>([t])=>e(t))(Ct)),Bt=e=>{return t=Rt(e).map((([,e])=>e)),[...new Set(t)];var t};async function Pt(e,t){try{return e?await _t(e,t):null}catch(e){console.error(e)}return null}const _t=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),Dt=e=>[...new Set(e)],At={},Et=["/portal-resources"],Mt=(e,t)=>Tt(e,(e=>t?.[e])),Ot=(e,t)=>{const n=Bt(e),[i,r]=a({});return l((()=>{zt(n).then(r)}),[n.join()]),n.length?Mt(e,{...t,...i}):e},zt=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(Dt(e).filter((e=>!Et.some((t=>e.startsWith(t))))).map((async e=>[e,At[e]||=await _t(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),a={...t,...n},l=Object.entries(n).flatMap((([,e])=>Bt(e)));return l.length?zt(l,a):a}return t};function Vt(e,t={}){const n=d((t=>{const n=Ot((({block:e,options:t,className:n,defaultPadding:a,padding:l,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 Ft=Vt((({className:e,padding:t,defaultPadding:n,...a})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...a,children:o(Ze,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...a})})),{childrenTypes:["UnitBlock"]}),Lt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>$t(0,t?.length)),[t]),a=t?.[n];return a?o(Ft,{suppressHydrationWarning:!0,...a,...e}):o(g,{...e,children:o(f,{})})})),$t=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),jt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),l=String(e.getFullYear());return t?`${l}-${a}-${n}`:`${n}.${a}.${l}`}},Ut=e=>e?.replace(/[^+\d]/g,""),qt="/api/v1";const Wt=e=>e?{phone:Ut(e)}:{},Ht=(e,t="birthday")=>e?{[t]:jt(e)}:{},Yt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Kt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Ut(e)}:{},Xt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:a,params:l}of e??[])t[a??""]?.(n,l)};function Jt(){return Jt._impl()}Jt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Jt.setup=e=>{Jt._impl=e};const Zt="rshb-query-params";function Qt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(Zt)||"";return e&&globalThis.sessionStorage?.setItem(Zt,e),e}const en=e=>{const t=e.target?.closest("a"),n=Jt();if(E(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const a=(e=>{const t=Qt();if(!E(e)||!t)return e;const n=new URL(e);for(const[e,a]of new URLSearchParams(t))n.searchParams.set(e,a);return n.toString()})(t?.href)||t?.href;a&&n.assign(a,t?.target)}};function tn(){return tn._impl()}function nn(e=!1){const[t,n]=a(e),l=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:l,setFalse:r,toggle:s}]}tn._impl=()=>({forwardQuery:en}),tn.setup=e=>{tn._impl=e};const an=e=>t=>t&&Object.entries(e??{}).flatMap((([e,n])=>n?n(t[e]):[]))||[],ln=e=>!e?.length,rn=e=>t=>n=>e(n)?[]:[t],sn={},on=[];const cn=(e,t)=>e&&t&&(e===t||Object.keys({...e,...t}).every((n=>e[n]===t[n])));function dn(e,{resetOnSubmit:t,formValidator:n,normalizer:o,onChange:c,onSubmit:d}={}){const[m,u]=function(e,t,n){const[r,s]=a(e),o=i((e=>s((a=>{const l=e instanceof Function?e(a):e,i=t?t(l):l,r=cn(l,i)?l:i;return!cn(a,r)&&n?.(r),r}))),[t,n]);return l((()=>{t&&s(t)}),[t]),[r,o]}(e,o,c),[h,{setTrue:p,setFalse:g}]=nn(!1),f=s({}),[x,{isValid:b,errors:y}]=function(e,t){const n=r((()=>t?.(e)??sn),[t,e]),a=r((()=>an(n)(e)??on),[n,e]),l=ln(a);return[n,{isValid:l,errors:a}]}(m,n),v=i(((e,t={})=>{const{parse:n,format:a,onChange:l}=t,i=m[e],r=h||f.current?.[String(e)],s=t?.validator??x[e],o=r&&s?s(i):[];return{value:a?a(i):i,isDirty:r,errors:s&&o,error:o[0],onChange:t=>{f.current||={},f.current[String(e)]=!0;const a=n?n(t):t;l?.(a),u((t=>({...t,[e]:a})))}}}),[m,h,x,u]),N=i((e=>{f.current=e,u(e)}),[u]),w=i((()=>{f.current={},g(),u(e)}),[e,u]),C=i((e=>{e.preventDefault(),b?(t&&w(),d?.(m,e)):p()}),[t,m,b,w,d]);return[m,{errors:y,field:v,update:N,reset:w,onSubmit:C}]}const mn=d((e=>{const{className:t,title:n,children:a,...l}=e;return o(g,{className:t,defaultPadding:"p-6xl",...l,children:c("div",{className:"container space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,a]})})}));function un(e,t={}){const{open:n,close:a,...l}=he();return{open:i(((l,i={})=>n({dialog:o(e,{...t,...l,onClose:()=>{a(),l.onClose?.()}}),...i})),[e,n,a]),close:a,...l}}function hn(e,t,n,a){l((()=>{if(e&&n)return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}),[e,t,n])}function pn(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return hn(globalThis.document,"click",n),t}const gn=({label:e,errors:t})=>e&&t?`${e}*`:e,fn=()=>{},xn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",bn=e=>e?xn:"border-error",yn=e=>e?o(Ee,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,vn=d((({key:e,className:t="",id:n,name:a,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 C=s(null),S=i((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);l((()=>{v&&C.current?.focus()}),[v,C]);const k=g?"pr-3xl":"",I=bn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[yn(d),N?o("textarea",{className:u("block resize-y min-h-24",Nn,I),id:u("textarea",n),name:a||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,disabled:w},e):o("input",{type:r,className:u("h-14",Nn,k,I),ref:C,id:n,name:a||n,placeholder:m,value:h,onChange:S,onFocus:x,onBlur:b,pattern:y,disabled:w},e)]}),g]})})),Nn="w-full border rounded-md text-primary-text outline-none p-m",wn=e=>o("div",{className:"h-6",children:e?o(Ee,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Cn=e=>e?.value||"",Sn={url:"suggest/address"},kn={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||""},addressRegistration:Sn,addressFact:Sn,organizationAddress:Sn,addressCourier:Sn},In=()=>de(ue.emitter,"popup"),Tn=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 Rn({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=a([]),f=In(),x=kn[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:a,requestData:l={},responseItemHandler:i=Cn}=e,r=(s=i,e=>(e?.suggestions||[]).map((e=>{const t=s(e);return{...e,processedValue:t}})));var s;const o=`${a?`${a}, `:""}${n}`;return fetch(`${qt}/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...l,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 a=(...l)=>{a.dispose(),n=setTimeout((()=>{e(...l)}),t)};return a.dispose=()=>{n&&clearTimeout(n)},a})(N,300)),[N]);return l((()=>{if(!e||!v.current||h.current===t)return void b();const n=v.current,{top:a,left:l,width:i,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.open({popup:o(Tn,{options:p,value:t,onChange:y}),top:a+globalThis.scrollY+r,left:l,width:i})}),[e,p,t,y]),v}const Bn=d((({className:e,label:t,value:n="",placeholder:a,error:r,errors:s,onChange:d=fn,onDaDataChange:m,onBlur:h,isTextarea:p,type:g,name:f="",daDataQueryPrefix:x,isInteger:b=!1,maxLength:y,dadata:v=!1,disabled:N=!1})=>{const[w,{setFalse:C,setTrue:S}]=nn(),k=pn(C),I=i((e=>{v&&!w&&S(),y?e.length<=y&&d(e):d(e)}),[v,w,d]);l((()=>{b&&n&&d(Pn(n))}),[n]);const T=Rn({isOpen:w&&v,name:f,value:n,daDataQueryPrefix:x,onChange:d,onDaDataChange:m});return c("div",{className:u("shrink-0 w-full",e),ref:k,onBlur:C,onFocus:S,children:[o("div",{ref:T,children:o(vn,{disabled:N,type:g||"text","aria-label":t,label:gn({label:t,errors:s}),valid:Boolean(!r),value:n,onChange:I,onBlur:h,isTextarea:p,placeholder:_n(a,s,t)})}),wn(r)]})})),Pn=(e="")=>e.replace(/[^\d]+/g,""),_n=(e,t,n)=>t&&!n?`${e}*`:e,Dn=e=>e?.text||e?.key||"",An=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,En=d((({popupRef:e,options:t,value:n,query:a,onChange:l,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,a).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(),l&&l(e)},children:[o("span",{className:"min-h-6",children:Dn(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}]=nn(),[N,w]=a(""),C=Vn(x,n.length),S=b&&!C,k=i((()=>{C||v()}),[C]),I=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:a,onChange:r,onClose:c,iconVersion:d}){const m=In(),u=i((()=>{m.close(),c&&c()}),[c]),h=i((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=pn(u);return l((()=>{if(!e||!p.current)return;const l=p.current,{top:i,left:r,width:s,height:c}=l.getBoundingClientRect();m.open({popup:o(En,{popupRef:g,options:t,value:n,query:a,onChange:h,iconVersion:d}),top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,a,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:I,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[yn(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",zn(m,d,C)),onClick:S?I:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Dn(r)||h}),On(S,g)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(vn,{type:"text",autoFocus:!0,value:N,onChange:w,disabled:C})}):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"}),zn=(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"),Vn=(e,t)=>e||0===t,Fn=d((({className:e="",label:t,error:n,errors:a,...l})=>c("div",{className:e,children:[o(Mn,{...l,valid:!n,label:gn({label:t,errors:a})}),wn(n)]}))),Ln=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],$n=d((({field:e,input:t})=>o(Fn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ln,...e(t?.name??"")}))),jn=(e="")=>Boolean("trade"===e||"all"===e),Un=e=>null!=e,qn=new Map,Wn=(e,t=qn)=>n=>{const a=Yn(n),l=t.get(a);if(a&&Un(l))return l;const i=e(...n);return a&&Un(i)&&t.set(a,Promise.resolve(i)),i},Hn=e=>Boolean(e?.every((e=>Array.isArray(e)?Hn(e):!e||"string"==typeof e))),Yn=e=>Hn(e)?e.toString():"",Gn=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function Kn(e,t,{fallback:n,cache:i}={}){const s=r((()=>Xn(e)),[e]),[o,c]=a(void 0),[d,m]=a(void 0);l((()=>{if(!s.some(Un))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await Wn(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=n&&Gn(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Xn(e){return Array.isArray(e)?e:e instanceof Function?Xn(e()):[e]}const Jn=`${qt}/branches`,Zn=[];const Qn=async e=>await Pt(e,{method:"GET"})||Zn;function ea(e=!1){const{data:t}=Kn(`${qt}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,_t);return Array.isArray(t)?t:[]}const ta=(e="")=>"ULTRASERVICE"===e,na=d((({field:e,input:t,params:n})=>{const a=ta(n?.typeForm),i=e("region"),r=i?.value?.key,s=i?.value?.text,c=a?ea(a)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=Kn(e?`${Jn}?regionCode=${e}`:null,Qn);return t||Zn}(r)?.filter((e=>e?.address));return l((()=>{""!==i?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[i?.value]),o(Fn,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...e(t?.name??""),isSearch:!0})})),aa=(e,{normalize:t,format:n})=>{const{value:l,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=a(!1),m=i((e=>{d(!0),r&&r(e)}),[]),u=i((()=>{d(!1),o&&o(t(l)),s&&s()}),[o,l]);return{value:c||!n?l:n(l),onFocus:m,onBlur:u}},la=(e,t,n)=>Math.max(t,Math.min(e,n));function ia(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function ra({list:e=[],min:t,max:n,step:a,value:l=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(l):l,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:a,value:s,disabled:i,onChange:t=>{const n=ia(t.target?.value),a=e.length?e[n]:n;r&&r(a||0)}})})]})}const sa=1,oa=100,ca=d((e=>{const{className:t,title:n,items:a=[],list:l=[],min:r=(l.length?0:sa),max:s=(l.length?l.length-1:oa),step:d=1,value:m=l[0]||r,disabled:h=!1,onChange:p}=e,g=aa(e,{normalize:(e=0)=>l.length?da(l)(e):la(e,r,s),format:He()}),f=i((e=>{p&&p(ia(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Ee,{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",xn,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),ra({list:l,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),ma(a)]})})),da=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),ma=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),ua=["От 1 000 ₽","До 1 000 000 000 ₽"],ha=d((({field:e,input:t})=>o(ca,{title:"Сумма, ₽",items:ua,min:1e3,max:1e9,...e(t?.name??"")}))),pa=d((({field:e,input:t})=>o(Bn,{label:"Годовая выручка, ₽",...e(t?.name??"")}))),ga=d((({field:e,input:t})=>o(Bn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e(t?.name??"")}))),fa=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:a,currentYear:l,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(l,a,d),n=xa(t,e),c=ba(t,i,r);u.push(o("td",{children:o("div",{className:ya(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},xa=(e,t)=>t&&e.toDateString()===t.toDateString(),ba=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),ya=(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"),va=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Na=d((({today:e,currentMonth:t,currentYear:n,min:a,max:l,onDateSelect:s=fn,setValue:d=fn})=>{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:va.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:fa({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:a,max:l,onDateClick:m})})]})})),wa=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function Ca(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const a=[...t],l=a.findIndex(Sa),i=a.map(((e,t)=>Ia(e)?a.slice(0,t).filter(Ia).length:-1)),r=a.map(((e,t)=>ka(e)?e:n.charAt(i[t])||e)),s=i.indexOf(n.length-1)+1;return r.slice(0,Math.max(l,s)).join("")}const Sa=e=>"_"===e,ka=e=>/\d/.test(e),Ia=e=>Sa(e)||ka(e),Ta=1940,Ra={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Ba=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:i,disabled:r,onChange:d,onClick:m})=>{const h=s(null),[p,g]=a(i||"");return l((()=>{g(i||"")}),[i]),l((()=>{_a({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d})}),[p]),c("div",{onClick:()=>{null!==h.current&&h.current.focus(),m?.()},className:u("relative",n),children:[o("input",{ref:h,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(Ca(t,"__.__.____"))},onBlur:()=>{Pa(p)?_a({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(i||"")},disabled:r}),r?null:o(W,{className:"mr-s",...Ra})]})})),Pa=e=>{const[t,n,a]=e.split(".");if((e=>Number(e)>=Ta&&Number(e)<=(new Date).getFullYear())(a)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(a),Number(n)-1,1);let l=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),l++;return Number(t)>0&&Number(t)<=l}return!1},_a=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:a})=>{if(Pa(e)){const{day:l,month:i,year:r}=(e=>{const[t,n,a]=e.split(".");return{day:Number(t),month:Number(n)-1,year:Number(a)}})(e);t(i),n(r),a?.(new Date(r,i,l))}},Da=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:a,setSelectedMonth:l,setSelectedYear:i,disabled:r=!1})=>o(Ba,{onChange:a,disabled:r,onClick:e,value:t&&jt(t),setSelectedMonth:l,setSelectedYear:i,className:u("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),Aa=wa.map((e=>({key:e}))),Ea=Array.from({length:(new Date).getFullYear()-Ta+1},((e,t)=>Ta+t)).reverse().map((e=>({key:String(e)}))),Ma=(e,t)=>{const n=new Date(e,t,1);let a=0;for(;n.getMonth()===t;)a++,n.setDate(n.getDate()+1);return a},Oa=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:a,onChange:l})=>{a&&l?.(new Date(t,n,Math.min(e,a.getDate())))},za={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Va={className:"min-w-32",iconVersion:"black",isBorder:!1},Fa=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:h})=>{const[p,{setValue:g}]=nn(!1),[f,x]=a(n?.getMonth()||(new Date).getMonth()),[b,y]=a(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:v,handleNextMonth:N,handleSelectMonth:w,handleSelectYear:C,monthsOptions:S,yearsOptions:k,handleChangeVisibleCalendar:I,ref:T}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:a,onYearSelect:l,selectedYear:r,onChange:s,value:o})=>{const c=pn(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?a(n+1):(a(0),l(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?a(n-1):(a(11),l(r-1))}),[n]),handleSelectMonth:i((({key:e})=>{a(wa.indexOf(e));const t=Ma(r,wa.indexOf(e));Oa({maxDateOfMonth:t,selectedYear:r,selectedMonth:wa.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:i((({key:e})=>{l(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:Aa,yearsOptions:Ea,ref:c}})({onYearSelect:y,onMonthSelect:x,onShowCalendar:g,selectedYear:b,selectedMonth:f,showCalendar:p,onChange:h,value:n}),R=((e,t)=>{const[n,i]=a(!1);return l((()=>{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:[yn(t),c("div",{className:"relative",children:[Da({handleChangeVisibleCalendar:I,value:n,valid:r,onChange:h,disabled:m,setSelectedMonth:x,setSelectedYear:y}),p&&!m?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":R}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:v,children:o(W,{...za,className:"-rotate-90 cursor-pointer"})}),o(Mn,{onChange:w,value:{key:wa[f]},options:S,...Va}),o(Mn,{onChange:C,value:{key:String(b)},options:k,...Va}),o("div",{className:"my-auto",onClick:N,children:o(W,{...za,className:"rotate-90 cursor-pointer"})})]}),o(Na,{today:n,currentMonth:f,currentYear:b,onDateSelect:h,min:s,max:d,setValue:g})]}):null]})]})})),La=d((({className:e,label:t,error:n,errors:a,...l})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Fa,{label:gn({label:t,errors:a}),valid:Boolean(!n),...l}),wn(n)]}))),$a=d((({field:e,input:t})=>o(La,{label:"Дата рождения",...e(t?.name??"")}))),ja=d((({field:e,input:t})=>o(Bn,{label:"Количество объектов инкассации",isInteger:!0,...e(t?.name??"")}))),Ua=d((({field:e,input:t})=>o(Bn,{className:"col-span-2",...e(t?.name??""),placeholder:"Ваше сообщение",isTextarea:!0}))),qa=d((({className:e,viewBox:t,fill:n="none",width:a,height:l,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:a,height:l,children:i.map((({d:e,fill:t,...n},a)=>{const l={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:l.stroke,strokeLinecap:l.strokeLinecap,strokeLinejoin:l.strokeLinejoin,strokeWidth:l.strokeWidth,strokeMiterlimit:l.strokeMiterlimit},a)}))}))),Wa="appearance-none w-5 h-5 border-solid flex-none",Ha=[{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"}],Ya=d((({className:e,value:t,text:n,disabled:a,isRadio:l,onChange:r})=>{const s=i((e=>{a||(e.preventDefault(),r&&r(!t))}),[r,a,t]),d=l?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(qa,{paths:Ha,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",Ka(a)),onClick:s,children:[o("div",{className:u(Wa,"m-0",l?"rounded-full border-2":Ja(t),!a&&t?"border-primary-main":"border-gray",a?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Xa(l),"aria-checked":Boolean(t),"aria-disabled":Boolean(a),"aria-label":n}),t?d:null,Ga(n)]})})})),Ga=e=>e?o("div",{className:"ml-s",children:o(Ee,{size:"text-l",font:"font-light",children:e})}):null,Ka=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Xa=(e=!1)=>e?"radio":"checkbox",Ja=(e=!1)=>u("rounded border",{"bg-primary-main":e}),Za=d((({field:e,input:t})=>o(Ya,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...e(t?.name??"")}))),Qa=d((({field:e,input:t})=>o(La,{label:"Желаемая дата встречи",...e(t?.name??"")}))),el=d((({field:e,input:t})=>o(Bn,{label:"Электронная почта",...e(t?.name??""),...t}))),tl=[{key:"ULTRASERVICE",text:"Ультра"}],nl=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],al=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],ll=d((({field:e,input:t})=>o(Fn,{label:"Способ получения ответа",options:al,...e(t?.name??"")}))),il=d((({field:e,input:t})=>o(Bn,{label:"ФИО",...e(t?.name??""),...t})));function rl(e,t){for(const[n,a]of e.entries())null!=a?t.setItem(n,a):t.removeItem(n)}const sl={};function ol(e,t=sl){const n=s(null),o=function(){const[,e]=a(0);return i((()=>e((e=>(e+1)%65536))),[])}();return l((()=>e.bus.watch((e=>{n.current?.has(String(e.type))&&o()}))),[e,o]),r((()=>new Proxy(t,{get:(t,a)=>(n.current||=new Set,n.current.add(a),e.getItem(a)),has:(t,a)=>(n.current||=new Set,n.current.add(a),e.hasItem(a)),set:(t,n,a)=>(e.setItem(n,a),!0),deleteProperty:(t,n)=>(e.removeItem(n),!0)})),[e])}const cl=new class{bus;store=new Map;get size(){return this.store.size}constructor(e=new me){this.bus=e}hasItem(e){return this.store.has(e)}getItem(e){return this.store.get(e)}entries(){return this.store.entries()}setItem(e,t){this.store.set(e,t),this.bus.subject(e,t)}removeItem(e){this.store.delete(e),this.bus.subject(e,null)}};var dl,ml;function ul(e){return ol(cl,e)}dl=cl,ml=new class{storage;bus;get size(){return this.storage?.length??0}constructor(e,t=new me){this.storage=e,this.bus=t}hasItem(e){return Boolean(this.storage?.getItem(String(e)))}getItem(e){const t=this.storage?.getItem(String(e))??null;try{return JSON.parse(String(t))}catch(e){return null}}entries(){return Array.from({length:this.size},((e,t)=>{const n=String(this.storage?.key(t));return[n,this.getItem(n)]}))}setItem(e,t){null!==t?this.storage?.setItem(String(e),JSON.stringify(t)):this.storage?.removeItem(String(e)),this.bus?.subject(e,t)}removeItem(e){this.storage?.removeItem(String(e)),this.bus?.subject(e,null)}}(globalThis?.localStorage),rl(dl,ml),rl(ml,dl),dl.bus.watch((({type:e,event:t})=>{null!=t?ml.setItem(e,t):ml.removeItem(e)}));const hl=()=>ul(),pl=(e,t)=>{if(!t)return null;const n=bl(e),a=+t?.split(".")[0],l=+t?.split(".")[1];switch(a){case 1:return n("AGRICULTURE");case 35:return n("FUEL_AND_ENERGY");case 41:case 42:case 43:return n("CONSTRUCTION");case 46:case 47:return n("TRADE");case 55:case 79:return n("TOURISM");case 62:return n("TECHNOLOGY");case 63:return n("CONSULTING_SERVICE");case 64:return n("BANK");case 65:return n("INSURER");case 66:return n("FINANCIAL_INSTITUTIONS");case 72:case 74:return n("SCIENCE");case 80:return n("SECURITY");case 84:return n(l<22?"GOVERNANCE":22===l?"ARMY":"OTHER_SECTORS");case 85:return n("EDUCATION");case 86:return n("HEALTHCARE");case 87:return n("SOCIAL_SPHERE");default:return n(a>=10&&a<=33?"INDUSTRY":a>=5&&a<=9?"FUEL_AND_ENERGY":a>=49&&a<=53?"TRANSPORT":"OTHER_SECTORS")}},gl=(e,t)=>{if(!t)return null;const[n]=[e?.find((e=>t<=Number(e.description)))].map((e=>({key:e?.key??"",text:e?.value??""})));return n},fl=(e,t)=>{const n=bl(e);return[40001,40002,71610].includes(t)?n("FOREIGN"):n("RUSSIAN")},xl=(e,t,n)=>{const a=bl(e);return a("7725114488"===n?"RSHB":50102===t?"SOLE_TRADER":t>=75e3&&t<=75505&&75500!==t?"BUDGETARY":"COMMERCIAL")},bl=e=>t=>e.map((e=>({key:e.key,text:e.value}))).find((e=>e.key===t))??null,yl=(e,t)=>Boolean(e("esiaAccountTypeCd")?.value?.key)&&e(t).value,vl=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",a=e(n).value,l=i((t=>{e?.(n)?.onChange?.(Nl(t))}),[]),r=i((t=>{e?.(n)?.onChange?.({apartment:"",city:"",district:"",fullAddress:t,fiasCode:"",house:"",locality:"",okatoRegionCode:"",postcode:"",region:"",regionCode:"",street:"",qc:"",qcComplete:"",qcHouse:""})}),[]);return o(Bn,{disabled:t?.filledByEsia&&yl(e,n),label:"Адрес",...e(n),value:a?.fullAddress,onChange:r,...t,onDaDataChange:l})})),Nl=e=>({apartment:e?.data?.flat,city:e?.data?.city,district:e?.data?.area_with_type,fullAddress:e?.unrestricted_value,fiasCode:e?.data?.fias_id,house:e?.data?.house,locality:e?.data?.settlement_with_type,okatoRegionCode:e?.data?.okato,postcode:e?.data?.postal_code,region:e?.data?.region,regionCode:e?.data?.region_kladr_id?e?.data?.region_kladr_id.substring(0,2):"",street:e?.data?.street,qc:e?.data?.qc,qcComplete:e?.data?.qc_complete,qcHouse:e?.data?.qc_house}),wl=(e,t,n)=>{const{okved:a,okopf:l,inn:i}=Cl(n);t?.("legalForm")?.onChange?.(n.data?.opf?.short),t?.("organizationAddress")?.onChange?.(Nl(n.data?.address));const r={amountWorkers:gl(e?.amountWorkers,n.data?.employee_count),employerActivities:pl(e?.employerActivities??[],a),organization:xl(e?.organization??[],l,i),employerOrganization:fl(e?.employerOrganization??[],l)};for(const e in r)r[e]&&t?.(e)?.onChange?.(r[e])},Cl=e=>({inn:e.data?.inn??"",okopf:Number(e.data?.opf?.code),okved:e.data?.okved??""}),Sl=d((({field:e,input:t})=>{const n=hl(),a=i((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),wl(n,e,t)}),[]);return o(Bn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??""),onDaDataChange:a})})),kl=d((({className:e,text:t,value:n,key:a,disabled:l,error:i,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(Ya,{text:t,value:n,disabled:l,onChange:r},a),wn(i)]}))),Il=d((({field:e,input:t})=>o(kl,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Tl=`${qt}/outservice`,Rl=[];async function Bl(){const e=await Pt(`${Tl}/outserviceregions`);return e&&Array.isArray(e)?e:Rl}const Pl=d((({field:e,input:t})=>{const n=e("region"),a=n?.value?.key,{data:i}=Kn("outServiceRegions",Bl),s=r((()=>i?.find((e=>e.code===a))?.localities?.map((e=>({key:e,text:e})))),[i,a]);return l((()=>{""!==a&&e?.(t?.name??"")?.onChange?.("")}),[a,t?.name??""]),o(Fn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:s,...e(t?.name??""),isSearch:!0})})),_l=d((({field:e,input:t})=>o(Bn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,disabled:t?.filledByEsia&&yl(e,t?.name??""),...e(t?.name??""),...t}))),Dl=d((({field:e,input:t})=>o(Bn,{label:"Имя",maxLength:60,disabled:t?.filledByEsia&&yl(e,t.name??""),...e(t?.name??""),...t}))),Al=d((({value:e=!1,text:t,type:n="checkbox",onChange:a})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>a&&a(!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(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),El=d((({field:e,input:t})=>jn(e("acquiringType")?.value?.key)?o(Al,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),Ml=d((({field:e,input:t})=>o(Bn,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),Ol=e=>"_"===e,zl=e=>/\d/.test(e),Vl=e=>Ol(e)||zl(e),Fl=[..."+7 (___) ___-__-__"],Ll=Fl.findIndex(Ol),$l=Fl.map(((e,t)=>Vl(e)?Fl.slice(0,t).filter(Vl).length:-1));function jl(e){const t=e.replace(/\D/g,""),n=Fl.map(((e,n)=>zl(e)?e:t.charAt($l[n])||e)),a=$l.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max(Ll,a)):n).join("")}const Ul=d((({children:e,onChange:t,...n})=>{const a=i((e=>t&&t(jl(e))),[t]),l=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(vn,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>l(e?.target?.value||""),children:e})})),ql=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ul,{"aria-label":t,label:gn({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),wn(n)]}))),Wl=d((({field:e,input:t})=>{const n=t?.name||"phone";return o(ql,{label:"Телефон",...e(n),disabled:t?.filledByEsia&&yl(e,n),...t})})),Hl=d((({field:e})=>jn(e("acquiringType")?.value?.key)?o(Al,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Yl=d((({field:e,input:t,source:n})=>o(Fn,{placeholder:"Выберите продукт",label:"Продукт",options:Gl(n?.productList),...e(t?.name??"")}))),Gl=e=>(e??[]).map((e=>({key:e,value:e}))),Kl=`${qt}/regions`,Xl=[];function Jl(e=Kl){const{data:t}=Kn(e,_t);return Array.isArray(t)?t:Xl}const Zl=`${qt}/outservice/outserviceregions`,Ql=d((({field:e,input:t,params:n})=>{var a;const l=Jl((a=n?.typeForm,"OUTSERVICE"===a?Zl:void 0));return o(Fn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...e(t?.name??"")})})),ei=d((({field:e,input:t})=>{const n=ea(!0),a=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(Fn,{label:"Регион",placeholder:"Выберите регион",options:a,...e(t?.name??"")})})),ti=(e,t)=>{const{value:n,isDirty:a}=e,l=a?t(n):[];return{...e,errors:l,error:l[0]}},ni=rn((e=>null!=e&&""!==e)),ai="Некорректно заполненное поле",li="Укажите регион, город/населенный пункт, улицу, дом",ii=e=>ni(e??ai),ri=e=>rn((e=>e?.key&&""!==e?.key))(e??ai),si=e=>rn((e=>"string"==typeof e&&e.length>0&&e.length<=2))(e??ai),oi=e=>rn((e=>"string"==typeof e&&e.length>1&&bi(e)))(e??ai),ci=(e,t)=>rn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??ai),di=e=>rn((e=>"string"==typeof e&&6===e.length))(e),mi=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),ui=e=>rn(mi)(e),hi=rn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),pi=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},gi=e=>Boolean(e.region&&e.city&&e.house),fi=()=>rn(gi)(li),xi=/^[\u0400-\u04FF\d\s]+$/u,bi=(e="")=>xi.test(e),yi=e=>{const t=new Date,n=new Date(t.getFullYear()-23,t.getMonth(),t.getDate()),a=new Date(t.getFullYear()-75,t.getMonth(),t.getDate());return!(!e||e>n||e<a)},vi={processPersonalDataFlg:hi,consentProviderFlg:hi,consentInformFlg:hi,consentPfrFlg:hi,consentOthersFlg:hi},Ni={addressCourier:fi(),paymentSystem:ii("Укажите тип платежной системы"),currency:ii("Укажите валюту"),cardCategory:ii("Укажите категорию карты"),codeWord:(wi="Необходимо ввести кодовое слово",rn((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&bi(e)))(wi??ai)),confirmationIncome:ri(),methodObtain:ii(),deliveryDate:ii("Укажите дату доставки")};var wi;const Ci={organization:ri("Выберите тип организации"),organizationAddress:rn((e=>Boolean(e.fiasCode&&e.city&&e.house)))(li),organizationPhone:ui("Укажите номер телефона"),organizationName:ii("Укажите наименование организации"),legalForm:ii("Укажите ОПФ"),generalSeniority:si("Укажите количество лет стажа"),lastJobExperience:si("Укажите стаж на последнем месте работы"),experience5Years:si("Укажите общий стаж за последние 5 лет"),jobsNumber:si("Укажите количество мест работы за последние 5 лет"),beginDate:ii("Укажите дату заключения трудового договора"),addressFact:fi(),addressRegistration:fi(),addressRetail:ri("Выберите адрес банка"),addressMatch:ii(),sex:ii("Укажите свой пол"),limitedBirthday:rn(yi)("Допустимый возраст заёмщика - от 23 до 75 лет"),birthPlace:ii("Укажите место рождения"),education:ri("Выберите ваше образование"),housing:ri("Выберите тип жилья"),amountWorkers:ri("Выберите информацию о количестве сотрудников"),employment:ri("Выберите информацию о трудоустройстве"),employerActivities:ri("Выберите вид деятельности организации"),employerOrganization:ri("Выберите вид организации"),positionOrganization:ri("Выберите вашу должность"),familyStatus:ri("Выберите семейное положение"),familyMembers:ci(2,"Укажите количество членов семьи"),children:ci(2,"Укажите количество детей"),dependents:ci(2,"Укажите количество иждивенцев"),totalIncome:ci(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:ci(10,"Укажите сумму обязательных выплат"),snils:(e=>rn(pi)(e))("Некорректный номер СНИЛС"),conscription:ii(),armyIdFlg:hi,dulSerie:(e=>rn((e=>"string"==typeof e&&4===e.length))(e))("Укажите серию паспорта"),dulNumber:di("Укажите номер паспорта"),dulIssueDateField:ii("Укажите дату выдачи паспорта"),dulSubdivisionCode:di("Укажите код подразделения"),dulIssuedBy:ii("Укажите организацию, выдавшую паспорт"),participantDateRegistration:ii("Укажите дату регистрации"),retirementIncome:ii(),otherIncome:ii(),wages:ii(),mandatoryPayments:ii(),disablePeopleFlg:ii(),bankruptcyFlg:ii(),shareholderFlg:ii(),legalEntityName:ii(),bankEmployeeCode:ii(),partInBusiness:ii(),regionRetail:ri("Выберите регион")},Si={fullName:ii(),addressBranch:ri(),desiredMeetingDate:ii(),product:ii(),localities:ii(),partnerComments:ii(),collectionCount:ii(),acquiringType:ri(),serviceType:ri(),annualRevenue:ii(),feedbackMethod:ri(),serviceDirection:ri(),secondaryPhone:ui("Укажите номер телефона"),region:ri(),surname:oi("Укажите свою фамилию"),name:oi("Укажите своё имя"),middleName:oi("Укажите своё отчество"),birthday:ii("Укажите дату рождения"),phone:ui("Укажите номер телефона"),email:(e=>rn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),inn:(e=>rn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:ii(),typeForm:ii(),consentToReceiveMaterials:hi,consentDataProcessing:hi,...vi,...Ci,...Ni},ki=e=>{const t=e.filter((e=>Boolean(e?.required&&e?.name))),n=t.some((e=>e.condition?.values)),a=Object.fromEntries(t.filter(Ii).map((({name:e})=>[e,Si[e??""]])));return e=>n?Object.fromEntries(t.filter(Ii).filter(Ti(e)).map((({name:e})=>[e,Si[e??""]]))):a},Ii=({name:e})=>Boolean(Si[e??""]),Ti=e=>t=>!t?.condition||t.condition.values.find((n=>{const a=e?.[t?.condition?.name??""];return n===(a?.key??a)})),Ri=d((({field:e})=>{const t=e("secondaryPhone");return o(ql,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?ti(t,Si.secondaryPhone):t})})),Bi=d((({field:e,input:t})=>o(Fn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:nl,...e(t?.name??"")}))),Pi=d((({field:e,input:t})=>o(Bn,{label:"Фамилия",maxLength:60,disabled:t?.filledByEsia&&yl(e,"surname"),...e(t?.name??""),...t}))),_i=["От 1 мес","До 15 лет"],Di=d((({field:e})=>o(ca,{title:"Срок, месяцев",items:_i,min:1,max:180,...e("term")}))),Ai=d((({field:e,input:t})=>o(Fn,{label:"Тип обслуживания",options:tl,...e(t?.name??"")}))),Ei={horizontal:"@lg:flex-row",vertical:""},Mi=d((({label:e,items:t,value:n,className:a,disabled:l=!1,orientation:i="horizontal",onChange:r})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Ee,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",Ei[i],a),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Ya,{isRadio:!0,text:t,value:n===e,onChange:()=>r?.(e),disabled:l},String(e))))})]}))),Oi=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],zi=d((({field:e,input:t})=>{const n=i((t=>{"currencyControl"!==t&&(e("inn").onChange?.(""),e("region").onChange?.(""))}),[]);return o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(Mi,{className:"whitespace-normal",orientation:"horizontal",items:Oi,...e(t?.name??"",{onChange:n})})})}));const Vi={$ref:"/wcms-resources/outservice-productlist.json"},Fi={fullName:il,addressBranch:na,desiredMeetingDate:Qa,product:e=>o(Yl,{...e,source:Vi}),localities:Pl,isClient:Il,partnerComments:Ml,collectionCount:ja,acquiringType:$n,onlineCheckout:El,posTerminal:Hl,serviceType:Ai,term:Di,amount:ha,annualRevenue:pa,vedTypes:zi,feedbackMethod:ll,serviceDirection:Bi,bankEmpolee:ga,secondaryPhone:Ri,applicationDate:e=>o(Bn,{label:"Дата и время обращения в Банк",...e}),region:e=>ta(e?.params?.typeForm)?o(ei,{...e}):o(Ql,{...e}),consentToReceiveMaterials:Za,surname:Pi,name:Dl,middleName:_l,birthday:$a,phone:Wl,email:el,inn:Sl,comment:Ua},Li=(e,t,n={})=>(a,l)=>{const i={...Fi,...n};return function({input:e,field:t}){const{condition:n}=e,{value:a}=t(n?.name||"");return!n||n?.values?.find((e=>e===(a?.key??a)))}({input:a,field:e})?o("div",{children:i[a?.name||""]?.({field:e,input:a,params:t})},String(l)):null},$i=e=>2===e?"@xl:grid-cols-2":"",ji=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ee,{size:"text-h6",children:e})}):null,Ui=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0,size:a="big"})=>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 ","animate-spin rounded-full","border-solid border-current","border-r-transparent","small"===a?"border-4 h-8 w-8":"border-8 h-28 w-28",e),role:"status"})})));function qi({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const Wi={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"},Hi={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")},Yi=d((({children:e,...t})=>{const n=e=>({...e,onClick:ce(qi(e))}),{className:a,version:l="primary",active:i,disabled:r,isLoading:s,type:d="button",rounded:m=!0,role:h,onClick:p}=n(t);return c("button",{className:u("font-sans px-9 py-4","flex justify-center items-center gap-xs relative",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r||s,"rounded-md":m},i||r||s?"":u(Wi[l],Hi[l]),a),type:d,role:h,onClick:p,children:[s?o(Ui,{blur:!0,size:"small"}):null,e]})})),Gi=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"})}))),Ki=d((({className:e,head:t,children:n,onClose:a,onClick:l})=>c("div",{className:u("relative bg-white pt-0 p-lg",e),role:"dialog",onClick:l,children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Gi,{className:"absolute top-0 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),Xi=d((({ok:e,typeForm:t,onClose:n})=>{const a="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Ki,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:e?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?a:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Yi,{type:"button",onClick:n,children:"Хорошо"})]})})})),Ji=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:a,amount:l,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:a=!1,term:l,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${jn(t?.key)?`/Онлайн касса=${n}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${l}/Выручка=${r}`})(e):null,u={...d,...Qi(o),...Zi(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Zi=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Qi=e=>e?{vedTypes:Object.fromEntries(Oi.map((({id:t})=>[t,t===e])))}:{},er={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Ln[0],serviceType:tl[0],feedbackMethod:al[0],serviceDirection:nl[0],vedTypes:Oi[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},tr=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Ee,{children:e}):null,t?o(Ne,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Ee,{children:t.text})}):null]}))),nr=(e,t)=>o(Yi,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ar=(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(Ya,{...e}),o(tr,{link:t})]}),wn(ti(e,hi).error)]}):o(tr,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),nr(n)]}),lr={send:async function(e,t=!1){const{typeForm:n,region:a,phone:l="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f=`${qt}${g?"/lead":"/sendcorporatelead"}`,x={typeForm:n,...Yt(a,g),...Gt(i,g),...Wt(l),...Ht(s,"desiredMeetingDate"),...g?Ht(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...Kt(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}}},ir=d((({className:e,title:t,typeForm:n="",sections:a=[],button:l,link:s,endpoint:d,additionalParams:m,isContacts:h,data:p,...g})=>{const f=r((()=>a?.flatMap((e=>e?.inputs))||[]),[a]),x=r((()=>((e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"vedTypes"===e?.name&&e?.defaultValue||er[e.name||""]]))),typeForm:{key:t,text:""}}))(f,n)),[f,n]),b=r((()=>ki(f)),[f]),y=un(Xi),v=tn(),w=i((async(e,t)=>{const a=Ji({...e,...m}),l=Boolean(await lr.send(a,"lead"===d));y.open({ok:l,typeForm:n}),l&&Xt({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:C,onSubmit:S}]=dn(x,{resetOnSubmit:!0,formValidator:b,onSubmit:w}),k=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(f)?.name;return c(mn,{className:u("container space-y-m",e),title:t,...g,children:[c("form",{onSubmit:S,children:[a.map(((e,t)=>c("div",{className:u($i(e.columns),"grid gap-x-m"),children:[ji(e.title),(e?.inputs||[])?.map(Li(C,{typeForm:n}))]},`section-${t}`))),ar(k?C("consentDataProcessing"):void 0,s,l)]}),h?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),rr=[{columns:2,inputs:[{name:"surname",required:!0,dadata:!0},{name:"name",required:!0,dadata:!0},{name:"middleName",dadata:!0},{name:"limitedBirthday",required:!0},{name:"phone",required:!0},{name:"email",required:!0,dadata:!0}]},{inputs:[{name:"processPersonalDataFlg",required:!0},{name:"consentProviderFlg",required:!0},{name:"consentOthersFlg",required:!0},{name:"consentInformFlg"},{name:"consentPfrFlg"}]}],sr=d((({field:e,input:t})=>{const n="addressFact",a=e(n).value,{value:r}=e("addressMatch");l((()=>{r&&e("addressFact")?.onChange?.(e("addressRegistration").value)}),[r,e("addressRegistration").value]);const s=i((t=>{e?.(n)?.onChange?.({apartment:t?.data?.flat,city:t?.data?.city,district:t?.data?.area_with_type,fullAddress:t?.value,fiasCode:t?.data?.fias_id,house:t?.data?.house,locality:t?.data?.settlement_with_type,okatoRegionCode:t?.data?.okato,postcode:t?.data?.postal_code,region:t?.data?.region,regionCode:t?.data?.region_kladr_id?t?.data?.region_kladr_id.substring(0,2):"",street:t?.data?.house,qc:t?.data?.qc,qcComplete:t?.data?.qc_complete,qcHouse:t?.data?.qc_house})}),[]),c=i((t=>{e?.(n)?.onChange?.({apartment:"",city:"",district:"",fullAddress:t,fiasCode:"",house:"",locality:"",okatoRegionCode:"",postcode:"",region:"",regionCode:"",street:"",qc:"",qcComplete:"",qcHouse:""})}),[]);return o(Bn,{label:"Адрес",disabled:r,...e(n),value:a?.fullAddress,onChange:c,...t,onDaDataChange:s})})),or=d((({field:e,input:t})=>o(kl,{text:"Адрес фактического места жительства совпадает с адресом регистрации",...e(t?.name??"")}))),cr="/icons/MapMarkerClusterIcon.svg",dr="/icons/MapMarkerClusterYellowIcon.svg";function mr({yandexMaps:e,map:t,points:n,isLoad:a}){if(a||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const l=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=ur("offices",e,l);if(n.length&&n.every((e=>"type"in e))){const a=ur("workplaces",e,l),r=hr(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=hr(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),a.add(r),t.geoObjects.add(a),t.geoObjects.add(i)}else{const a=hr(n,"offices",e);i.add(a),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const ur=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?cr:dr,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),hr=(e,t,n)=>e.map((({coords:e,content:a})=>new n.Placemark(e,{balloonContentHeader:a?.header,balloonContentBody:a?.body,balloonContentFooter:a?.footer,hintContent:a?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?cr:dr,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),pr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},gr={...pr,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},fr=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(gr).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"})}),xr=e=>globalThis[e],br=(e,t)=>{const n=document.getElementById(t);if(n){const t=xr(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(xr(e))}))}))}return new Promise(((n,a)=>{const l=document.createElement("script");l.src=t,l.async=!0,l.id=t,l.addEventListener("load",(()=>{n(xr(e))})),l.addEventListener("error",(e=>{a(e)})),document.head.appendChild(l)}))};const yr=()=>function(e,t,n=!0){const[i,r]=a(void 0);return l((()=>{let a=!0;return br(e,t).then((e=>{a&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(a=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${A.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),vr={...pr,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Nr=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),a="in"===t?n+1:n-1;e.current.setZoom(a,{checkZoomRange:!0})},className:`${Object.values(vr).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),wr=[55.753995,37.614069],Cr=d((({points:e,className:t="",zoom:n=5,isLoad:a,selectedAddress:i})=>{const r=s(null),d=s(null),m=yr();if(l((()=>{r.current?mr({yandexMaps:m,map:r.current,points:e,isLoad:a}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:Sr(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),mr({yandexMaps:m,map:r.current,points:e,isLoad:a})})),r.current&&i&&m?.geocode(i).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();r.current.setCenter(t),r.current.setZoom(18)}))}),[m,e,n,a,i]),!m)return null;const h="z-10";return c("div",{ref:d,className:u("relative","w-full",t),children:[a?o(Ui,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[o(Nr,{yandexMaps:r}),o(Nr,{yandexMaps:r,direction:"out"})]}),fr(r,m,u("right-2 top-80",h))]})})),Sr=e=>{const t=[Ir(kr(e,0)),Ir(kr(e,1))];return t.every((e=>e))?t:wr},kr=(e,t)=>e.map((e=>e.coords?.[t])),Ir=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Tr=async(e,t,n)=>{try{return(await Rr(e,t,n)).json()}catch(e){return console.error(e),null}};async function Rr(e,t,n){return globalThis?.fetch?.(`${qt}${e}`,{method:t,headers:{"Content-Type":"application/json",...Br()},credentials:"include",body:n?JSON.stringify(n):null})}const Br=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},Pr=e=>Number(e.toString().replace(",",".")),_r=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:l,renderFoldButton:r})=>{const[s,o]=a(n),d=i((()=>{o((e=>!e))}),[]),m=l({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 Dr=d((({className:e="",isUnfolded:t,children:n})=>{const a=s(null),i=function(e,t){const n=s(null);return l((()=>{const t=n?.current;if(!t)return;const a=new ResizeObserver((n=>{e(t,n[0])}));return a.observe(t),()=>{a.disconnect()}}),[e,...t]),n}((e=>{a.current&&(a.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:a,className:`transition-max-h duration-300 overflow-hidden ${a.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),Ar=d((({value:e,subText:t,children:n,isPhone:a,...l})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:Er({textItems:i,subText:t,children:n,isPhone:a,...l})})),Er=({label:e,labelSize:t="text-m",textItems:n,subColor:a,subText:l,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(Ee,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Mr(n,s),l?o(Ee,{color:a,size:"text-m",children:l}):null]}),Mr=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Ee,{size:"text-l",children:t?o("a",{href:`tel:${Or(e)}`,children:e.trim()}):e.trim()},String(n)))),Or=e=>e.replace(/\D/g,""),zr=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}))),Vr=e=>{const t=Lr(e);return o(Ar,{label:"Режим работы",value:t,className:"max-w-none"})},Fr=({workTime:e="",lunchHour:t="",daysOff:n=""},a=!1)=>e?[`${a?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Lr=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))),a=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Fr({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":a}),Fr({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:a},!0)].filter(Boolean)},$r=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],jr=e=>$r.map((([t,n,a])=>({key:t,title:a,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??"")}}))),Ur=e=>{if(!e)return null;const t=qr(e);return c(zr,{className:"border-none",children:[o(Ar,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Wr)})}),o(Ar,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]})},qr=e=>{const t=$r.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],a=n[n.length-1]?.toLowerCase();return a?.includes("выходной")?t.map((e=>({...e,status:!a?.includes(e.short.toLowerCase())}))):t},Wr=({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(Ee,{size:"text-xs",children:e})},String(n)),Hr=({currency:e,buyExchangeRate:t,saleExchangeRate:n},a)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Ar,{label:"Валюта",value:e.currency}):null,t?o(Ar,{label:"Купить",value:String(t)}):null,n?o(Ar,{label:"Продать",value:String(n)}):null]},String(a)),Yr={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"}},Gr=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",Yr[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(Ee,{size:"text-m",color:Yr[n].text,children:t})]}))),Kr=(new Date).getDay(),Xr=e=>{const[t]=e?.slice(Kr-1)??[];if(!t)return null;const{lunchHour:n,status:a,workTime:l,hasLunch:i}=t;return a?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[l?o(Gr,{color:"green",children:l}):null,n&&i?o(Gr,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Gr,{color:"red",children:"Выходной"})},Jr=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",Zr=({title:e,status:t,workTime:n,lunchHour:a,hasLunch:l},i)=>o(Ar,{label:e,value:t&&n?n:"",subText:Jr({lunchHour:a,hasLunch:l,status:t}),subColor:!t||l?"text-error":"text-green-dark"},String(i)),Qr=["ArrowDownIcon","ArrowUpIcon"],es=["Подробнее","Скрыть"],ts=({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:es[Number(e)]}),o(W,{className:"text-primary-text",name:Qr[Number(e)],width:"16",height:"16"})]}),ns=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,as=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,ls=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,is=({name:e,address:t,phone:n,fax:a,phoneBusiness:l,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=jr(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ee,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),Xr(h)]}),o("div",{className:"hidden sm:block",children:rs({phone:n,fax:a,phoneBusiness:l,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(_r,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Dr,{isUnfolded:e,children:rs({phone:n,fax:a,phoneBusiness:l,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ts({isUnfolded:e,onToggle:t})})]},String(u))},rs=({phone:e,fax:t,phoneBusiness:n,phoneNatural:a,phoneCallCentre:l,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=jr(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(zr,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Ar,{label:"Факс",value:t,isPhone:!0}),o(Ar,{label:"Телефон филиала",value:e,isPhone:!0}),o(Ar,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Ar,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(Ar,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Ar,{label:"Контакт-центр",value:l,isPhone:!0})]}),r?.isMatchesPattern?o(zr,{children:o(Ar,{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(Zr)})})}):c(zr,{children:[o(Ar,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Wr)})}),Vr(d)]}),r?.businessScheduleVisibleTag?Ur(r?.businessScheduleDescription):null,s?.currencies?.length?o(zr,{className:"flex-wrap",children:s?.currencies?.map(Hr)}):null]})},ss=({name:e="",address:t="",workSchedule:n})=>{const a=(l=e)?`${l?.charAt(0)?.toUpperCase()}${l?.slice(1)}`:"";var l;const i=`${t} ${(e=>{const t=jr(e),n=e?Lr(t):"",a=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?ns(n):ls(n,a):as(n):""})(n)}`;return{header:a,body:i}},os={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},cs={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},ds={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)},ms=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>ds[t](e)))))},us=()=>{},hs=({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:a=us,getBalloonRemoteWorkplaces:l=us})=>{const[i,s,o,c]=r((()=>{const i=ms(e,n),r=ms(t,n),s=[...i.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a(e)}))),...r.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:l({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[i,s,r,i.length+r?.length]}),[e,t,n,a,l]);return{filteredItems:i,points:s,filteredRemoteWorkplaces:o,lengthItems:c}},ps=e=>{const{data:t,error:n}=Kn(`/api/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,gs);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},gs=async e=>await Pt(e,{method:"POST"})||[],fs=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),xs=d((({children:e})=>fs?e:null)),bs=d((({field:e,input:t})=>{const[n,i]=a([]),{data:r}=ps("REGION_RF"),s=e("regionRetail")?.value||{},d=e(t?.name??"");l((()=>{(async()=>{const e=await(async e=>{const t=await Tr("/public-data/regionOffices","POST",{regionRfCd:{key:e},cashCardFlg:!0});return t?.offices?.map((e=>({...e,gpsLatitude:Pr(e.latitude??wr[0]),gpsLongitude:Pr(e.longitude??wr[1])})))||[]})(s?.key??"");i(e)})(),s?.key&&d.onChange?.("")}),[s.key]);const{points:m}=hs({data:n,filtrationState:{},getBalloon:ss});return c("div",{children:[o(Fn,{label:"Адрес отделения",placeholder:"Выберите отделение",options:n.map((({id:e,address:t=""})=>({key:e?.toString()||"",text:t}))),...d,isSearch:!0}),o("div",{className:"h-[600px]",children:o(xs,{children:o(Cr,{points:m,isLoad:!r,className:"h-full",selectedAddress:d?.value?.text})})})]})})),ys=Vt((({field:e,source:t,fieldName:n,placeholder:a="Выберите из списка",options:l,...i})=>{const r=t?.map((e=>({key:e.key||"",text:e.value})))||[];return o(Fn,{placeholder:a,options:r,...e(n),...i})})),vs=d((({field:e,input:t})=>{const{data:n}=ps("EMPLOYEES_NUMBER"),a=hl();return l((()=>{n&&(a.amountWorkers=n)}),[n]),o(ys,{field:e,source:a.amountWorkers??[],label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),Ns=d((({field:e,input:t})=>o(kl,{text:"Наличие военного билета",...e(t?.name??"")}))),ws=d((({field:e,input:t})=>o(Bn,{label:"Код представителя Банка",placeholder:"Введите код",isInteger:!0,...e(t?.name??""),...t}))),Cs=d((({field:e,input:t})=>o(kl,{text:"В отношении меня ведётся производство по делу о банкротстве",...e(t?.name??"")}))),Ss=d((({field:e,input:t})=>o(La,{label:"Дата начала работы на текущем месте",...e(t?.name??""),...t}))),ks=d((({field:e,input:t})=>o(Bn,{label:"Место рождения",...e(t?.name??""),...t,disabled:t?.filledByEsia&&yl(e,"birthPlace")}))),Is=e=>{try{return JSON.parse(String(e))}catch(e){return null}};const Ts=d((({field:e,input:t})=>{const[n,r]=a([]),[s]=function(e){const t=globalThis.localStorage?.getItem(e),[n,l]=a(t?Is(t):null);return[n,i((t=>{l((n=>{const a=t instanceof Function?t(n):t;return globalThis.localStorage?.setItem(e,JSON.stringify(a)),a}))}),[e])]}("programId"),{value:c,onChange:d}=e("cardCategory"),m=e("paymentSystem")?.value?.key;return l((()=>{m&&s&&(async()=>{const e=await(async(e,t)=>{const n=await Tr("/dictionaryFiltered","POST",{type:"CARD_TYPE",presets:{paymentSystemTypeCd:e,creditProgramId:t}});return Array.isArray(n)?n:[]})(m,s);r(e),Rs(e,c)||d&&d(null)})()}),[m]),o(ys,{field:e,source:n,label:"Категория карты",fieldName:"cardCategory",input:t})})),Rs=(e,t)=>e.some((e=>e.key===t?.key)),Bs=d((({field:e,input:t})=>o(Bn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Ps=d((({field:e,input:t})=>o(Bn,{label:"Кодовое слово",...e(t?.name??""),...t}))),_s=d((({field:e,input:t})=>{const{data:n}=ps("INCOME_CERT_UNITED");return o(ys,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),Ds=d((({field:e,input:t})=>{const{data:n}=ps("MILITARY_STATUS");return o(ys,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),As={processPersonalDataFlg:{text:"Согласие на обработку персональных данных",docId:4},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentOthersFlg:{text:"Прочие согласия",docId:1},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3}},Es=d((({src:e,convertToPng:t,onClose:n,onDocumentRead:a})=>c(Ki,{className:"my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0",onClose:n,children:[t?o("img",{src:e}):o("iframe",{src:`${e}#toolbar=0`,className:"w-full h-[80vh]",id:"iframe-dialog"}),o(Yi,{className:"mx-auto mt-m",type:"button",onClick:()=>{a?.(),n?.()},children:"Ознакомиться"})]}))),Ms=(e,t)=>{const{open:n}=un(Es),a=ke();return i((async()=>{if(e){const l=URL.createObjectURL(await(async(e,t=!1)=>{const n=await Rr(`/feedback/file?id=${encodeURIComponent(e)}&convertToPngFlg=${t}`,"GET");return n?await n.blob():new Blob})(e,a));n({src:l,onDocumentRead:t})}}),[n,e,a])},Os=d((({className:e,error:t,docId:n,...a})=>{const l=Ms(n,(()=>a.onChange?.(!0)));return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(Ya,{...a}),n?o(Ne,{className:"text-primary-main",onClick:l,children:o(Ee,{children:"Ознакомиться"})}):null]}),wn(t)]})})),zs=d((({field:e,input:t})=>t&&t.name?o(Os,{text:As[t.name]?.text,docId:As[t.name]?.docId,...e(t.name)}):null)),Vs=Math.round(29.5),Fs=d((({className:e,title:t,children:n,...a})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...a,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),Ls="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",$s="flex flex-col lg:w-1/2 gap-2xl",js="flex flex-col gap-y-xl min-w-52",Us=d((({value:e,fractionDigits:t,fixed:n,prefix:a,postfix:l})=>o(Ee,{size:"text-h3",children:"number"==typeof e?[a,He(t,{fixed:n})(e),l].filter(Boolean).join(" "):e}))),qs=d((({className:e,title:t,value:n,color:a="text-secondary-text",...l})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Ee,{size:"text-l",font:"font-light",color:a,children:t}):null,n?o(Us,{value:n,...l}):o(Ee,{size:"text-h3",children:"-"})]}))),Ws=(e=[],t=!1)=>Hs([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Hs=(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]},Ys=(e,t=0)=>e?.sum?e.sum:t,Gs=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Ks=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Xs=({min:e=0,max:t=0,availableMonths:n,...a})=>o(ca,{items:[`От ${Js(e)}`,`До ${Js(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...a}),Js=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Zs=({items:e,title:t,mobileTitle:n=t,orientation:a="horizontal",value:l,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(Ee,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Ee,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(Mi,{orientation:a,items:e,value:e[l?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),Qs=e=>Zs({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),eo=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...a})=>o(ca,{items:e?[`От ${He(1)(a.min||0)} ${n}`,`До ${He(1)(a.max||0)} ${n}`]:[],step:t,...a}),to=({field:e,defParams:t,calcParams:n,map:a,monthsValue:l="maxMonths"})=>{Object.entries(a).forEach((([n,a])=>{e?.(n)?.onChange?.(t?.[a])})),e?.("monthsValue")?.onChange?.(la(t?.[l],n.minMonths,n.maxMonths))},no=(e,t)=>{const{isAnnuity:n,moneyValue:a,monthsValue:l,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(a+i)*(t+t/(Math.pow(1+t,l)-1)):a*(t+t/(Math.pow(1+t,l)-1))}return Math.round(a/l)+a*(e/1200)},ao=e=>e,lo=(e=ao)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),io=lo(),ro=(e=ao)=>lo((t=>-e(t))),so=ro(),oo=([e,t],n,a=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:co([e,t],a),co=([e,t],n=[])=>({[e]:n.length?so(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?io(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),mo=(e,[t,n],a)=>e>=a[t]&&e<=a[n],uo={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},ho=e=>po({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&po({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&po({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&po({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),po=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:l})=>!!n&&!n[l]||t[a]===e[a],go=(e,t,n)=>{const{moneyValue:a,monthsValue:l}=e,i=t?.rateRows||[uo],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>ho({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=oo(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=oo(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:l})=>e?.find((e=>ho({row:e,userInputParams:t,paramsViewSettings:n})&&mo(a,["minSum","maxSum"],e)&&mo(l,["minMonths","maxMonths"],e)))||uo)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:l}),{rate:u}=m,h=no(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:a,monthsValue:l,monthlyPayment:h}},fo=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),xo={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},bo=Vt((({className:e,title:t,calcSource:n,buttons:a,footnote:i,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const h=(p=n?.rateRows,Hs([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:f}]=dn({moneyValue:Ys(s,2e5),monthsValue:Gs(s,Vs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),x=go(g,n,r),b=Qs({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:y}=f("moneyValue"),{onChange:v}=f("monthsValue");return l((()=>{y&&y(la(g.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),l((()=>{v&&v(la(g.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),l((()=>{!fo(s)&&h&&to({field:f,defParams:h,calcParams:x,map:xo,monthsValue:"minMonths"})}),[n,s]),o(Fs,{className:e,title:t,...m,children:c("section",{className:u(Ls,e),children:[c("div",{className:$s,children:[eo({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...f("moneyValue"),value:x.moneyValue}),Xs({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...f("monthsValue"),value:x.monthsValue}),yo({...x,...r},f),o("div",{className:"sm:hidden",children:b})]}),c("div",{className:u(js,"@4xl:w-1/2"),children:[o(qs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(qs,{title:"Ставка",value:x?.rate,fractionDigits:2,postfix:"%"}),o(qs,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:b}),je(a,{isVertical:!0}),Ks(i)]})]})})})),yo=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Ya,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Ya,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Ya,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Ya,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),vo="calculator",No=d((({field:e,params:t})=>{const n=i((t=>{e(vo).onChange?.(t)}),[]);return o(bo,{...t?.calcData,padding:"p-0",defaultParams:Co(e(vo).value),onChange:n})})),wo={moneyValue:"sum",monthsValue:"period",isInsurance:"isEnableInsurance",isPensionClient:"isEnablePensionClient",isStateEmployee:"isEnableStateEmployee",isSalaryClient:"isEnableSalaryClient",isAnnuity:"isAnnuity"},Co=(e,t=!1)=>{const n=t?So(wo):wo;return Object.fromEntries(Object.entries(e??{}).map((([e,t])=>[n[e],t])))},So=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e]))),ko=d((({field:e,input:t})=>{const{data:n}=ps("CREDIT_IN_RSHB");return o(ys,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком /\n вкладчиком с долей участия более 20% уставного капитала руководителем,\n которого Вы являетесь, кредит в АО «Россельхозбанк»",fieldName:"creditInRshbCd",input:t,disabled:!e?.("shareholderFlg")?.value})})),Io=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Mi,{label:gn({label:t,errors:a?.errors}),...a}),wn(n)]}))),To=[{id:"810",text:"Рубли"}],Ro=d((({field:e,input:t})=>o(Io,{label:"Валюта",orientation:"horizontal",items:To,...e(t?.name??"")}))),Bo=d((({field:e,input:t})=>o(La,{label:"Дата доставки",...e(t?.name??"")}))),Po=d((({field:e,input:t})=>o(Bn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",isInteger:!0,maxLength:2,...e(t?.name??""),...t}))),_o=d((({field:e,input:t})=>o(kl,{text:"Являюсь инвалидом",...e(t?.name??"")}))),Do=d((({field:e,input:t})=>o(La,{label:"Дата выдачи",...e(t?.name??""),disabled:t?.filledByEsia&&yl(e,t?.name??"")}))),Ao=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("dulSubdivisionCode"),l=i((e=>{a?.(e?.data?.code?.replace("-",""))}),[]);return o(Bn,{disabled:t?.filledByEsia&&yl(e,t?.name??""),label:"Кем выдан",...t,...e(t?.name??""),onDaDataChange:l,daDataQueryPrefix:n})})),Eo=d((({field:e,input:t})=>o(Bn,{disabled:t?.filledByEsia&&yl(e,t.name??""),label:"Номер документа",isInteger:!0,maxLength:6,...e(t?.name??"")}))),Mo=d((({field:e,input:t})=>o(Bn,{disabled:t?.filledByEsia&&yl(e,t.name??""),label:"Серия документа",isInteger:!0,maxLength:4,...e(t?.name??"")}))),Oo=d((({field:e,input:t})=>{const n=i((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(Bn,{disabled:t?.filledByEsia&&yl(e,t.name??""),label:"Код подразделения",isInteger:!0,maxLength:6,...t,...e(t?.name??""),onDaDataChange:n})})),zo=d((({field:e,input:t})=>{const{data:n}=ps("EDUCATION_LEVEL");return o(ys,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),Vo=d((({field:e,input:t})=>{const{data:n}=ps("ORGANIZATION_ACTIVITY_TYPE"),a=hl();return l((()=>{n&&(a.employerActivities=n)}),[n]),o(ys,{field:e,source:a.employerActivities??[],label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),Fo=d((({field:e,input:t})=>{const{data:n}=ps("ORGANIZATION_KIND"),a=hl();return l((()=>{n&&(a.employerOrganization=n)}),[n]),o(ys,{field:e,source:a.employerOrganization??[],label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),Lo=d((({field:e,input:t})=>{const{data:n}=ps("EMPLOYMENT_INFO_UNITED");return o(ys,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),$o=d((({field:e,input:t})=>o(Bn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),jo=d((({field:e,input:t})=>{const n=i((n=>e(t?.name??"")?.onChange?.(String(la(Number(n),0,5)))),[]);return o(Bn,{label:"Стаж",placeholder:"За последние 5 лет",type:"number",...e(t?.name??""),...t,onChange:n})})),Uo=d((({field:e,input:t})=>{const{value:n,onChange:a}=e(t?.name??""),i=e("familyStatus")?.value?.key,r="MARRIED"===i?2:1,s=Number(e("children")?.value),c=Number(e("dependents")?.value),d=r+s+c;return l((()=>{a?.(d)}),[i,s,c]),o(Bn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",disabled:!0,value:n,onChange:a})})),qo=d((({field:e,input:t})=>{const{data:n}=ps("MARITAL_STATUS");return o(ys,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),Wo=d((({field:e,input:t})=>o(Bn,{label:"Общий стаж",type:"number",maxLength:2,placeholder:"Количество лет",...e(t?.name??""),...t}))),Ho=d((({field:e,input:t})=>{const{data:n}=ps("HOUSE_TYPE");return o(ys,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Yo=d((({__html:e,icon:t="InfoCircleIcon",iconVersion:n="black",link:a})=>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})}),c("div",{className:"",children:[o(De,{__html:e}),a?.text?o(Ne,{className:"text-primary-main",children:a.text}):null]})]}))),Go=d((({input:e})=>o(Yo,{__html:e?.label}))),Ko=d((({field:e,input:t})=>o(Bn,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",isInteger:!0,maxLength:2,...e(t?.name??""),...t}))),Xo=d((({field:e,input:t})=>o(Bn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",maxLength:2,...e(t?.name??""),...t}))),Jo=d((({field:e,input:t})=>o(Bn,{label:"Наименование юридического лица",...t,...e(t?.name??""),disabled:!e?.("shareholderFlg")?.value}))),Zo=d((({field:e,input:t})=>o(Bn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...e(t?.name??""),...t}))),Qo=d((({field:e,input:t})=>o(La,{label:"Дата рождения",...e(t?.name??""),disabled:t?.filledByEsia&&yl(e,t.name??"")}))),ec=d((({field:e,input:t})=>o(Bn,{label:"Обязательные выплаты",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),tc=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],nc=d((({field:e,input:t})=>o(Io,{orientation:"horizontal",items:tc,...e(t?.name??"")}))),ac=d((({field:e,input:t})=>{const{data:n}=ps("ORGANIZATION_TYPE"),a=hl();return l((()=>{n&&(a.organization=n)}),[n]),o(ys,{field:e,source:a.organization??[],label:"Тип организации",fieldName:"organization",input:t})})),lc=d((({field:e,input:t})=>{const n=hl(),a=i((t=>{e?.("inn")?.onChange?.(t.data?.inn),wl(n,e,t)}),[]);return o(Bn,{label:"Наименование организации",...t,...e(t?.name??""),onDaDataChange:a})})),ic=d((({field:e,input:t})=>o(Bn,{label:"Иные доходы",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),rc=d((({field:e,input:t})=>o(La,{label:"Дата регистрации по месту жительства",...e(t?.name??"")}))),sc=d((({field:e,input:t})=>{const n=i((n=>e(t?.name??"")?.onChange?.(String(la(Number(n),0,100)))),[]);return o(Bn,{label:"Доля участия в бизнесе",placeholder:"в %",isInteger:!0,maxLength:3,...e(t?.name??""),...t,onChange:n})})),oc=e=>e.map((e=>({key:e.type,text:e.name})));const cc=e=>e?.key,dc=d((({field:e,input:t})=>{const[n,i]=a([]),s=ul();var c;c=async()=>{const{programId:e}=s;if(e){const t=await(async e=>{const t=await Tr("/public-data/creditProgramConditions","POST",{creditProgramId:e});return oc(t?.paymentSystems||[])})(e);i(t??[])}},l((()=>{const e=c();return()=>{e.then((e=>{e instanceof Function&&e()}))}}),[]);const d=r((()=>n?.map((e=>({id:e.key,text:e.text})))??[]),[n]);return o(Io,{label:"Платежная система",orientation:"horizontal",items:d,...e(t?.name??"",{format:cc,parse:e=>n?.find((t=>t.key===e))})})})),mc=d((({field:e,input:t})=>{const{data:n}=ps("POSITION");return o(ys,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),uc=d((({field:e,input:t})=>{const{data:n}=ps("REGION_RF"),a=n?.map((({key:e,value:t})=>({key:e,text:t})));return o(Fn,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:a,...e(t?.name??"")})})),hc=d((({field:e,input:t})=>o(Bn,{label:"Пенсионные доходы",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),pc=["male","female"],gc=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],fc=d((({field:e,input:t})=>{const n=e("name")?.value,{value:a,onChange:i}=e("sex");return l((()=>{n&&!a&&(async()=>{const e=await(async e=>{const t=await Tr("/suggestions/suggest/fio","POST",{query:e,count:1,parts:["NAME"]}),n=t?.suggestions[0]?.data?.gender?.toLowerCase()||"";return pc.includes(n)?n:""})(n);e&&i?.(e)})()}),[]),o(Io,{label:"Пол",orientation:"horizontal",items:gc,...e(t?.name??"")})})),xc=d((({field:e,input:t})=>o(kl,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...e(t?.name??"")}))),bc=d((({children:e,onChange:t,maxLength:n,...a})=>{const l=i((e=>n?e.length<=n&&t?.(Ca(e,"___-___-___ __")):t?.(Ca(e,"___-___-___ __"))),[t]),r=i((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(vn,{...a,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>r(e?.target?.value||""),children:e})})),yc=d((({className:e,label:t,value:n,error:a,onChange:l,onBlur:i,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(bc,{"aria-label":t,label:gn({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:l,onBlur:i,placeholder:"___-___-___ __",...r}),wn(a)]}))),vc=d((({field:e,input:t})=>o(yc,{label:"СНИЛС",maxLength:14,...e(t?.name??""),...t}))),Nc=d((({field:e,input:t})=>o(Bn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),wc=d((({field:e,input:t})=>o(Bn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Cc={limitedBirthday:Qo},Sc={processPersonalDataFlg:zs,consentProviderFlg:zs,consentOthersFlg:zs,consentInformFlg:zs,consentPfrFlg:zs},kc={organization:ac,organizationAddress:vl,organizationPhone:Wl,organizationName:lc,legalForm:Zo,generalSeniority:Wo,lastJobExperience:Xo,experience5Years:jo,jobsNumber:Ko,beginDate:Ss,addressFact:sr,addressRegistration:vl,addressRetail:bs,addressMatch:or,sex:fc,limitedBirthday:Qo,birthPlace:ks,education:zo,housing:Ho,amountWorkers:vs,employment:Lo,employerActivities:Vo,employerOrganization:Fo,positionOrganization:mc,familyStatus:qo,familyMembers:Uo,children:Bs,dependents:Po,totalIncome:Nc,expenses:$o,snils:vc,conscription:Ds,armyIdFlg:Ns,dulSerie:Mo,dulNumber:Eo,dulIssueDateField:Do,dulSubdivisionCode:Oo,dulIssuedBy:Ao,participantDateRegistration:rc,retirementIncome:hc,otherIncome:ic,wages:wc,mandatoryPayments:ec,disablePeopleFlg:_o,bankruptcyFlg:Cs,shareholderFlg:xc,legalEntityName:Jo,creditInRshbCd:ko,bankEmployeeCode:ws,partInBusiness:sc,regionRetail:uc,infoCard:Go,calculator:No,confirmationIncome:_s},Ic={addressCourier:vl,paymentSystem:dc,currency:Ro,cardCategory:Ts,codeWord:Ps,methodObtain:nc,deliveryDate:Bo},Tc=d((({inputs:e=[],field:t,key:n})=>{const a=e.every((e=>Boolean(t(e.name).value))),l=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(ti(t(e?.name),Si[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(_r,{isFoldButtonOnTop:!0,unfoldedByDefault:!0,renderFoldableSection:({isUnfolded:n})=>o(Dr,{isUnfolded:n,className:"flex flex-col pl-2xl",children:e.map(Li(t,{},Sc))}),renderFoldButton:Rc(c("div",{children:[o(Ya,{value:a,onChange:n=>{for(const a of e){const e=t(a.name);e.onChange?.(n)}},text:"Согласие на все документы"},n),wn(l?"Отметьте все обязательные соглашения":"")]}))})})})),Rc=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",type:"button",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),Bc=({field:e,inputs:t})=>{const{consentInputs:n,restInputs:a}=Pc(t||[]);return n.length>2?c("div",{children:[a.map(Li(e,{},{...Cc})),o(Tc,{inputs:n,field:e})]}):(t||[])?.map(Li(e,{},{...Cc}))},Pc=e=>({consentInputs:e?.filter((e=>Object.keys(As).includes(e.name||"")))||[],restInputs:e?.filter((e=>!Object.keys(As).includes(e.name||"")))||[]}),_c=(e,t)=>o(Yi,{className:u("w-full @xl:w-auto"),type:"submit",isLoading:t,children:e?.text?e.text:"Отправить заявку"}),Dc=e=>Rr("/user-data/updateUserProfile","PUT",e),Ac=e=>Rr("/user-data/updateUserTask","PUT",e),Ec={width:"118",height:"24"},Mc={"bg-white":"color",transparent:"white"},Oc={"bg-white":"text-primary-main",transparent:"text-white"},zc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Mc[e]},className:Oc[e],width:n?.width,height:n?.height}),Vc={"bg-white":"text-primary-text",transparent:"text-white"},Fc=d((({className:e,href:t="/",logo:n,children:a,targetBlank:l,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:l?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...fe(s),children:[zc(i,n?.image,Ec),r?a??o("div",{className:"ml-s",children:o(Ee,{font:"font-medium",color:Vc[i],size:"",children:n?.title??"Россельхозбанк"})}):null]}))),Lc=d((({phoneNumber:e,sendCode:t,onClose:n})=>{const[r,s]=a(""),[d,m]=a(""),[u,h]=a(!1),[p,{setTrue:g,setFalse:f}]=nn(!1),x=i((async()=>{g();var e;await(e={captchaText:d},Rr("/sms/checkCaptcha","POST",e).then((e=>e.text())).then((e=>"ERROR"!==e)))?(n?.(),t?.()):h(!0),f()}),[d,t]),b=i((()=>{(async()=>{s(URL.createObjectURL(await(e=>Rr(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET").then((async e=>e?await e.blob():new Blob)))(e)))})()}),[]);return l(b,[]),o(Ki,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",head:o(Fc,{}),onClose:n,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:b,className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(vn,{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(Yi,{onClick:close,version:"secondary",children:"Вернуться"}),o(Yi,{type:"submit",disabled:!d,onClick:x,version:"secondary",children:"Отправить"})]}),p?o(Ui,{blur:!1}):null]})})})),$c=d((({time:e,setTime:t,className:n})=>(l((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:jc(e)})))),jc=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,Uc=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=a(0),u=s([]);l((()=>{u.current?.[d]?.focus()}),[d]);const h=i((n=>a=>{const{value:l}=a.currentTarget,i=l.slice(0,1);t(e.map(((e,t)=>t===n?i:e))),m(n+1)}),[e]),p=i((n=>a=>{const{key:l}=a;if("Backspace"===l&&!e[n]){const a=n>0?n-1:e.length-1,l=e.map(((e,t)=>t===a?"":e));t(l),m(a)}}),[e]),g=i((n=>{n.preventDefault();const a=n.clipboardData.getData("text"),l=e.map(((e,t)=>t<a.length?a[t]:e));t(l),m(l.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,a)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(a),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[a]=e},onFocus:e=>e.target.select(),onKeyDown:p(a),className:qc(a,e,n)},a)))}),n?o("div",{className:"text-error",children:r}):null]})})),qc=(e,t,n=!1)=>{const a=!t[e];return`w-16 sm:w-20 h-24 text-5xl text-center p-md m-2 border ${bn(!n||!a)} rounded-md caret-transparent outline-none`},Wc=d((({isDisabled:e,onClick:t,text:n})=>o(Yi,{type:"button",onClick:t,disabled:e,children:o(Ee,{font:"font-normal",children:n})}))),Hc=e=>{e&&(globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token))},Yc=({values:e,onSuccess:t})=>{const[n,r]=a(""),[s,{setTrue:o,setFalse:c}]=nn(!1),[d,m]=a(0),[u,h]=a(!1),[p,g]=a(0),f=i((()=>r("")),[]),x=Boolean(0===d&&u),b=p>2||x||!e.every(Boolean),y=i((async()=>{try{h(!1),m(0),g((e=>e+1)),o(),await(async e=>Tr("/sms/checkCode","POST",e).then(Hc))({smsText:e.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),f(),await(t?.(e.join("")))}catch{r(p>1?"Исчерпан лимит ввода смс-кода":"Неверный код")}finally{c()}}),[e,p]);return l((()=>{r(x?"Код просрочен":"")}),[x]),{handleSubmit:y,hasError:Boolean(n),errorText:n,isLoading:s,timeNextReq:d,isSubmitButtonDisabled:b,setTimeNextReq:m,setIsTimerStarted:h,setAttempts:g}},Gc=d((({phone:e,code:t=!0,codeLength:n=4,consents:r,onSuccess:s=fn,onClose:d=fn})=>{const[m,u]=a(Array(n).fill("")),{handleSubmit:h,hasError:p,errorText:g,isLoading:f,timeNextReq:x,isSubmitButtonDisabled:b,setTimeNextReq:y,setIsTimerStarted:v,setAttempts:N}=Yc({values:m,onSuccess:s}),w=un(Lc),C=Ut(e),k=i((async()=>{var e;await(e={phoneNumber:C,smsCodesSetName:{key:"AUTHENTICATION"}},Rr("/sms/sendCode","POST",e).then((e=>e.text())).then((e=>"OK"===e)))?(N(0),y(180),v(!0)):w.open({phoneNumber:C,sendCode:k})}),[C,d]);return l((()=>{k()}),[]),o(Ki,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-xl p-m",onClose:d,children:c("div",{className:"flex flex-col gap-xl items-center rounded-md",children:[o(S,{className:"w-full",title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,headlineVersion:"XS",isEmbedded:!0,as:"h6"}),t?o(Uc,{values:m,setValues:u,errorText:g,hasError:p}):null,Xc(x,y,k),c(De,{itemSize:"list-s",children:[o("span",{children:"Вводя код, я подтверждаю, что ознакомлен и подписываю: "}),o("ul",{children:r?.map(((e,t)=>o("li",{children:e},`${e}-${t}`)))})]}),Kc(b,h),f?o(Ui,{blur:!1}):null]})})})),Kc=(e,t)=>o(Wc,{text:"Далее",isDisabled:e,onClick:t}),Xc=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-base",children:["Получить новый код можно через",o($c,{className:"text-base ml-1",time:e,setTime:t})]}):o(Ne,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),Jc={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},Zc={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},Qc=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],ed=d((({onSubmit:e=fn,onClose:t=fn})=>{const[n,l]=a(""),[r,s]=a(!1),d=Ms(2),m=i((()=>{e(n)}),[e,n]),u=i((e=>{l(e),"REFUSE"===e&&s(!0)}),[]),h=r?Zc:Jc;return o(Ki,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg px-5xl",onClose:t,children:c("div",{className:"flex flex-col gap-xl items-center",children:[o("div",{role:"button",onClick:d,children:o(N,{className:"text-center text-balance",headingType:"h2",title:h.title})}),o(w,{align:"text-center",children:h.description}),o(Mi,{className:"whitespace-normal",orientation:"horizontal",items:Qc,value:n,onChange:u}),o(Yi,{disabled:!n,type:"button",onClick:m,children:"Далее"})]})})})),td=d((({title:e,icon:t,description:n,onClick:a=fn})=>c("button",{className:"flex gap-lg items-center border border-gray rounded-md cursor-pointer p-4 hover:border-green",type:"button",onClick:a,children:[o(ne,{image:{icon:t,iconVersion:"black"},width:"78",height:"78"}),c("div",{className:"w-full md:w-auto",children:[o(N,{className:"text-center md:text-left",title:e,headingType:"h5"}),n?o(w,{color:"text-secondary-text",size:"text-m",children:n}):null]})]}))),nd={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},ad={addressRegistration:"REGISTRATION",addressFact:"RESIDENTAL",organizationAddress:"WORK",addressCourier:"DELIVERY"},ld={incomeAverage:"INCOME_AVERAGE",mandatoryPayments:"MANDATORY_PAYMENTS",additionalIncome:"ADDITIONAL_INCOME",otherIncome:"OTHER_INCOME",otherPayments:"OTHER_PAYMENTS",rentalIncome:"RENTAL_INCOME",wages:"WAGES",retirementIncome:"RETIREMENT_INCOME"},id=e=>Object.entries(e).reduce(((e,[t,n])=>t in nd?[...e,{contactTypeCd:{key:nd[t]},value:n}]:e),[]),rd=e=>Object.entries(e).reduce(((e,[t,n])=>{if(t in ad){const a=Object.fromEntries(Object.entries(n??{}).filter((([e])=>!e.startsWith("qc"))).map((([e,t])=>[e,t??""])));return[...e,{addressType:{key:ad[t]},...a}]}return e}),[]),sd=e=>{const{familyStatus:t,familyMembers:n,dependents:a,children:l,confirmationIncome:i,wages:r,mandatoryPayments:s,additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u,snils:h,armyIdFlg:p,conscription:g}=e;return{maritalStatusCd:t,totalDependents:n,incomeCertificateCd:i,otherDependents:a,childrenDependents:l,militaryStatusCd:g,participantIncomes:(f={wages:r,mandatoryPayments:s,incomeAverage:od(r,u),additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u},Object.entries(f).reduce(((e,[t,n])=>t in ld?[...e,{incomeTypeCd:{key:ld[t]},value:Number(n||0)}]:e),[])),snils:h?.replace(/[-\s]/g,""),armyIdFlg:p};var f},od=(e,t)=>Number(e)+Number(t),cd={credit_cash:"10",credit_cash_single_doc:"28",credit_mcx:"39",family_offer_credit:"41",gas_engine_fuel:"33",pension_credit:"12",ref_credit:"11",ref_credit_single_doc:"29",self_employed:"34",summer_cash:"35",summer_cash_pens:"36"},dd={...cd,amur_card:"14",owner_card:"13",travel_card:"15"},md=e=>{const t=e?.find((e=>"WAGES"===e.incomeTypeCd.key))?.value,n=e?.find((e=>"MANDATORY_PAYMENTS"===e.incomeTypeCd.key))?.value,a=e?.find((e=>"ADDITIONAL_INCOME"===e.incomeTypeCd.key))?.value,l=e?.find((e=>"OTHER_INCOME"===e.incomeTypeCd.key))?.value,i=e?.find((e=>"OTHER_PAYMENTS"===e.incomeTypeCd.key))?.value,r=e?.find((e=>"RENTAL_INCOME"===e.incomeTypeCd.key))?.value,s=e?.find((e=>"RETIREMENT_INCOME"===e.incomeTypeCd.key))?.value;return{wages:t,mandatoryPayments:n,incomeAverage:od(t,s),additionalIncome:a,otherIncome:l,otherPayments:i,rentalIncome:r,retirementIncome:s}},ud=e=>{const t=e?.find((e=>"REGISTRATION"===e.addressType.key)),n=e?.find((e=>"RESIDENTAL"===e.addressType.key)),a=e?.find((e=>"WORK"===e.addressType.key));return{addressRegistration:t,addressFact:n,organizationAddress:a}},hd=e=>{const t=e?.find((e=>"EMAIL"===e.contactTypeCd.key))?.value,n=e?.find((e=>"MAIN_PHONE"===e.contactTypeCd.key))?.value,a=e?.find((e=>"ORGANIZATION_PHONE"===e.contactTypeCd.key))?.value;return{email:t,phone:n,organizationPhone:a}},pd=e=>e?.key?{key:e.key,text:e.value}:void 0,gd=d((function({task:e,isFromLead:t=!1,onClose:n=fn}){const a=hl(),l=Jt(),{participants:r,creditProgram:s,id:d}=e,m=dd[s.code],u=Boolean(cd[s.code]),h=u?"/credit-lead":"/credit-card-lead",{name:p,midname:g,id:f,profile:x}=r[0],b=i((()=>{const t=(e=>{const t=e.participants[0],{classCard:n,codeWord:a,paymentSystemTypeCd:l,currencyCode:i}=e,{loanAmount:r,creditPeriod:s,paymentTypeCd:o}=e,{birthDate:c,midname:d,name:m,surname:u,birthPlace:h,dulIssueDate:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:b,educationLevelCd:y,registrationDate:v,houseTypeCd:N,genderCd:w,participantContacts:C=[],participantAddresses:S=[],employmentContractDate:k,employmentTypeCd:I,organizationName:T,organizationInn:R,organizationActivityTypeCd:B,organizationTypeCd:P,organizationKindCd:_,employeesNumberCd:D,opf:A,seniority:E,generalSeniority:M,jobsNumber:O,lastWorkDuration:z,positionCd:V,maritalStatusCd:F,childrenDependents:L,totalDependents:$,otherDependents:j,militaryStatusCd:U,participantIncomes:q,snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,nameLegalEntity:K,creditInRshbCd:X,payrollCardRshbFlg:J,consentInsuranceFlg:Z,incomeCertificateCd:Q}=t;return{currency:i?.key,paymentSystem:pd(l),cardCategory:pd(n),codeWord:a,limitedBirthday:c,middleName:d,name:m,surname:u,birthPlace:h,dulIssueDateField:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:b,education:pd(y),participantDateRegistration:v,housing:pd(N),beginDate:k,employment:pd(I),organizationName:T,inn:R,employerActivities:pd(B),organization:pd(P),employerOrganization:pd(_),amountWorkers:pd(D),legalForm:A,generalSeniority:E?.toString(),experience5Years:M?.toString(),jobsNumber:O?.toString(),lastJobExperience:z?.toString(),positionOrganization:pd(V),familyStatus:pd(F),children:L?.toString(),familyMembers:$?.toString(),dependents:j?.toString(),conscription:pd(U),confirmationIncome:pd(Q),snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,legalEntityName:K,creditInRshbCd:pd(X),calculator:{isInsurance:J,isSalaryClient:Z,moneyValue:r,monthsValue:s,isAnnuity:"ANNUITY"===o?.key},...md(q),...ud(S),...hd(C),...(ee=w,ee?.key?{sex:"MAN"===ee.key?"male":"female"}:null)};var ee})(e);a.participantId=f,a.taskId=d,a.profileId=x?.id,a.programId=m,a.leadForm=t,l.assign(h)}),[]),y=i((()=>{l.assign(u?"/natural/loans/all-goals":"/natural/creditcards/svoya")}),[]),v=i((()=>{l.assign("/")}),[]);return o(Ki,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:n,children:c("div",{className:"flex flex-col gap-lg mt-xs md:mt-0",children:[o(N,{className:"whitespace-pre-wrap text-center",title:`${p&&g?`${p} ${g}, `:""}мы нашли черновик вашей заявки.\nПродолжите заполнение?`,headingType:"h5"}),o(td,{title:"Перейти к черновику",icon:"BankIcon",description:"Продолжайте заполнять заявку из черновика",onClick:b}),o(td,{title:t?"Продолжить заполнение текущей заявки":"Заполнить новую заявку",icon:"DocIcon",onClick:t?n:y}),o(Yi,{type:"button",version:"secondary",className:"w-full text-h5",onClick:v,children:"Вернуться на главную"})]})})})),fd=d((function({onClose:e=fn}){const t=Jt(),n=i((()=>{t.assign("/natural/loans/all-goals")}),[]),a=i((()=>{t.assign("/")}),[]);return o(Ki,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:e,children:c("div",{className:"flex flex-col gap-lg",children:[o(N,{className:"text-center",title:"Заявки не найдены",headingType:"h3"}),o(w,{size:"text-l",align:"text-center",children:"По данному номеру не найдено незавершенных заявок. Вы можете заполнить новую заявку или вернуться на главную страницу"}),o(Yi,{type:"button",className:"w-full",onClick:n,children:"Заполнить новую заявку"}),o(Yi,{type:"button",version:"secondary",className:"w-full",onClick:a,children:"Вернуться на главную"})]})})})),xd=d((({onClose:e})=>{const t=Jt(),n=hl(),a=i((async()=>{const e=await(n={redirectUri:t.href},Tr("/esia/getLink","POST",n));var n;e?.link&&t.assign(e.link)}),[]),l=i((()=>{if(n.leadForm){const e={...n.leadForm};delete e.esiaAccountTypeCd,n.leadForm=e}e?.()}),[]);return o(Ki,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",onClose:l,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex items-center justify-around w-full px-m",children:[c("ul",{className:"list-disc",children:[o("li",{children:"Вероятность одобрения выше"}),o("li",{children:"Без справок о доходах и трудоустройстве"}),o("li",{children:"С защитой Ваших данных"})]}),o(ne,{image:{icon:"GosUslugiIcon",iconVersion:"normal"},height:"70"})]}),c("div",{className:"flex flex-wrap gap-lg w-full",children:[o(Yi,{type:"button",onClick:a,children:"Заполнить через Госуслуги"}),o(Yi,{type:"button",version:"secondary",onClick:l,children:"Пропустить"})]})]})})})),bd=()=>{const e=new URLSearchParams(decodeURIComponent(globalThis.location?.search));return{utm_campaign:e.get("utm_campaign"),utm_medium:e.get("utm_medium"),utm_source:e.get("utm_source"),utm_content:e.get("utm_content"),utm_term:e.get("utm_term")}},yd=()=>ul(),vd=({programId:e,nextStepLink:t})=>{const[n,{setTrue:l,setFalse:r}]=nn(!1),[s,o]=a(),c=(()=>{const e=yd();return i((({participantId:t,taskId:n,profileId:a,programId:l,formData:i})=>{e.participantId=t,e.taskId=n,e.profileId=a,e.programId=l,e.leadForm=i}),[])})(),d=(e=>{const{open:t}=un(xd),n=Jt();return i((()=>{t({onClose:()=>n.assign(e)})}),[t,e])})(t),m=(e=>{const{open:t}=un(ed),n=un(Gc),a=t=>async n=>{try{t&&await Dc({profile:{id:t,consentBkiFlg:!0,smsConsentBki:n}}),e()}catch(e){console.log(e)}},l=(t,l)=>async i=>{"SIGNED"===i&&t?n.open({phone:t,consents:["согласие на запрос информации в БКИ"],onSuccess:a(l)}):e()};return{open:(n,a)=>t({onSubmit:l(n,a),onClose:e})}})(d),u=un(Gc),h=(()=>{const{open:e}=un(gd),{open:t}=un(fd);return{open:({task:n,isFromLead:a,onClose:l})=>{n?e({task:n,isFromLead:a,onClose:l}):t({})}}})();return{isSending:n,ok:s,handleSubmit:i((async t=>{try{l();const a=await(n={profile:{phone:Ut(t.phone)}},Tr("/public-data/createUserProfile","POST",n).then((e=>e?.profile?.id||null)));if(a&&t?.phone){const n=async()=>{await wd({programId:e,profileId:a,formData:t,saveUserData:c}),u.close(),m.open(t.phone,a)},l=async()=>{try{const t=await(async e=>{const t=await Tr("/user-data/getLastStatus","POST",e);return"DRAFT"===t?.statusCd?t?.taskId:null})({profileId:a,programId:e});if(t){const e=await(async e=>await Tr("/user-data/getTaskById","POST",e)||void 0)({taskId:t});u.close(),h.open({task:e,isFromLead:!0,onClose:n})}else await n()}catch{o(!1)}},i=Nd(t);u.open({phone:t?.phone,consents:i,onSuccess:l}),r()}}catch{o(!1)}var n}),[])}},Nd=e=>Object.keys(As).filter((t=>e[t])).map((e=>As[e]?.text)),wd=async({programId:e,profileId:t,formData:n,saveUserData:a})=>{const l=Cd(n);await Dc(((e,t)=>{const{name:n="",surname:a="",middleName:l="",limitedBirthday:i="",phone:r="",email:s="",processPersonalDataFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:a,midname:l,birthDate:i&&jt(i,!0),email:s,phone:Ut(r),processPersonalDataFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(t,l));const{taskId:i,participantId:r}=await(async e=>await Tr("/user-data/createDraftTask","POST",e)||{})({profileId:t,programId:e});try{await Ac((({participantId:e,taskId:t,profileId:n,formData:a})=>{const{name:l,surname:i,middleName:r,limitedBirthday:s,phone:o,email:c}=a;return{sendToBank:!0,taskKind:"SHORT",task:{taskSource:Jt().origin,id:t,participants:[{birthDate:s&&jt(s,!0),id:e,midname:r,name:l,surname:i,profile:{id:n},participantContacts:id({phone:o&&Ut(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}],marketingInfo:bd()}}})({participantId:r,taskId:i,profileId:t,formData:l}))}catch(e){console.log(e)}a({participantId:r,taskId:i,profileId:t,programId:e,formData:n})},Cd=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},Sd={surname:"",name:"",middleName:"",limitedBirthday:void 0,phone:"",email:"",processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,consentPfrFlg:!1},kd=(e,t)=>{if(t)return{...t,limitedBirthday:new Date(t?.limitedBirthday||0)};return{...Object.fromEntries(e.map((e=>[e.name,Sd[e.name||""]])))}},Id=e=>{const{profile:t,addInfo:n,document:a,addressRegistration:l,addressFact:i}=e;return{name:t?.name,surname:t?.surname,middleName:t?.midname,limitedBirthday:t?.birthDate,phone:jl(t?.phone),email:t?.email,dulIssueDateField:a?.dulIssueDate,dulIssuedBy:a?.dulIssuedBy,dulNumber:a?.dulNumber,dulSerie:a?.dulSerie,dulSubdivisionCode:a?.dulSubdivisionCode,snils:n?.snils,birthPlace:n?.birthPlace,addressRegistration:Td(l),addressFact:Td(i),esiaAccountTypeCd:t?.esiaAccountType}},Td=e=>{const{postcode:t,region:n,regionCode:a,locality:l,city:i,street:r,house:s,building:o,block:c,apartment:d}=e,m=[t,n,l||i,r?`ул ${r}`:void 0,s?`д ${s}`:void 0,c?`к ${c}`:void 0,o?`стр ${o}`:void 0,d?`кв ${d}`:void 0].reduce(((e,t)=>t?e?`${e}, ${t}`:t:e),"");return{...e,regionCode:a?.key,fullAddress:m}},Rd=(e,t)=>{const n=Jt(),[a,{setTrue:s,setFalse:o}]=nn(!1),c=yd(),d=i((e=>{const t=e instanceof Function?e(m[u]):e;null!=t?m[u]=t:delete m[u]}),[m=c,u="leadForm"]);var m,u;const h=r((()=>kd(e,c.leadForm)),[e,c.leadForm]),p=i((async(e,a,l)=>{s();try{const r=await(i={profileId:e,code:a,state:l,redirectUri:globalThis.location?.href},Tr("/esia/updateProfileEsia","POST",i));r&&d((e=>({...e,...Id(r)}))),n.assign(t)}finally{o()}var i}),[t]);return l((()=>{const e=Is(globalThis.localStorage?.getItem("profileId")??""),t=new URLSearchParams(decodeURIComponent(globalThis.location?.search)),n=t.get("code"),a=t.get("state");e&&n&&a?p(e,n,a):(sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken"))}),[]),[h,{isLoading:a}]},Bd=d((({className:e,title:t,programId:n="",nextStepLink:a="/credit-lead",button:i,...s})=>{const d=r((()=>rr?.flatMap((e=>e?.inputs))||[]),[rr]),m=r((()=>ki(d)),[d]),[h,{isLoading:p}]=Rd(d,a),{isSending:g,ok:f,handleSubmit:x}=vd({programId:n,nextStepLink:a}),[,{field:b,onSubmit:y}]=dn(h,{formValidator:m,onSubmit:x}),v=un(Xi);return l((()=>{void 0!==f&&v.open({ok:f})}),[f]),o(mn,{className:u("container space-y-m",e),title:t,...s,children:c("form",{onSubmit:y,className:"space-y-m relative",children:[p?o(Ui,{blur:!1}):null,rr.map(((e,t)=>c("div",{className:u($i(e.columns),"grid gap-x-m"),children:[ji(e.title),Bc({field:b,inputs:e?.inputs})]},`section-${t}`))),_c(i,g)]})})})),Pd=d((({title:e,description:t})=>{const n=ke();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(S,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),_d=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Dd=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Ad=10;function Ed(e,{sensitivity:t,rootRef:n}={}){const a=s(null),i=r((()=>({threshold:Md(t),root:n?.current})),[t,n?.current]);return l((()=>{if(!a.current)return;const t=new IntersectionObserver(e,i);return t.observe(a.current),()=>{t.disconnect()}}),[e,i]),a}function Md(e=0){const t=Math.round(e*Ad);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const Od=d((({className:e,style:t,idx:n,activeIndex:a,observerOptions:l,children:r,onIntersection:s})=>{const c=Ed(i((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),l);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===a),ref:c,role:"listitem",children:r})})),zd=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Vd=d((({className:e,itemClassName:t,containerRef:n,activeIndex:a,visibleItemCount:l=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(Ld(n))}),[g,f]),v=l>0?r*Number(l)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?Fd(c,v):{},...N?Dd(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:C,ref:n,role:"list",children:(S=(e,n)=>o(Od,{className:u(m,l?zd[l-1]:"",{"h-full":N},t),style:w?Fd(c/4):{},activeIndex:a,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})),Fd=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Ld=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),$d={"horizontal-list":"w-6","vertical-list":"h-6"},jd=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(a,l)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",l===e?$d[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(l)},String(l)),Ud=({activeIndex:e,onClick:t})=>(n,a)=>{const l=a===e,i=l?"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=l?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=l?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"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(a))},qd=e=>t=>e.scrollWidth/t,Wd=e=>(t,n)=>{e.scrollBy({left:n*qd(e)(t),behavior:"smooth"})},Hd=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[l,r]=a([]),o=i((e=>{r((t=>{return(n=t)===(a=e)||Boolean(n&&a&&n?.length===a?.length&&n.every(((e,t)=>e===a[t])))?t:e;var n,a})),t&&t(e)}),[t]),[c,d]=l.length?[ro()(l),lo()(l)]:[-1,-1],m=c>0,u=d<e-1,h=i((()=>{var t;n.current&&(m?Wd(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(u?Wd(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}]},Yd={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Gd=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:a="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=ke(),[h,p]=Hd({itemCount:s.length}),g=Kd(Boolean(s?.length));l((()=>{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(Vd,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Ud({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",Yd[a],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(jd({activeIndex:t,onClick:f,listType:a}))}):null})),Kd=(e=!1)=>({behavior:e?"auto":"smooth"}),Xd=d((({className:e,disabled:t,...n})=>o(Ne,{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"})}))),Jd=d((e=>o(Xd,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Zd=d((e=>o(Xd,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Qd="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",em=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:a,isBottom:l})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=a&&!l;return c("div",{className:e,children:[n?tm(t):null,i?o(Jd,{className:u(nm(l),m?"left-1":"left-0"),onClick:s}):null,r?o(Zd,{className:u(nm(l),m?"right-1":"right-0"),onClick:d}):null]})})),tm=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(Qd,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(Qd,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),nm=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),am=d((({className:e,version:t,gap:n=14,padding:a=16,visibleItemCount:l=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]=Hd({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===i?"relative h-full":""),children:[o(Vd,{containerRef:y,activeIndex:N,visibleItemCount:l,gap:n,padding:a,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(em,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(Gd,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),lm=({blocksToRender:e,...t})=>o(am,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:B(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",_d(!0)),children:T(e,t)},String(n))})}),im=e=>e%2!=0,rm=d((({textNode:e,iconNode:t,tag:n,onClick:a,justifyContent:l="between",className:i,role:r,...s})=>c(n,{tag:n,className:u("flex items-center w-full gap-1","between"===l?"justify-between":"justify-center",i),onClick:a,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),sm=d((({className:e="",label:t,icon:n,dataTheme:a="pc",disabled:l=!1,onClick:i})=>o(rm,{tag:"button",onClick:i,disabled:l,"data-theme":a,justifyContent:"center",role:"button",className:u("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",l?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Ee,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),om=({isUnfolded:e,onToggle:t})=>o(sm,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),cm=["ArrowDownIcon","ArrowUpIcon"],dm="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",mm=({topItemsCount:e=0,label:t="",block:n,blocksToRender:a=[],...l})=>{const[i,r]=e>0?[a.slice(0,e),a.slice(e)]:[a,[]];return c("div",{className:u("space-y-2xs",{hidden:!a.length}),children:[c("div",{className:u(dm),children:[B(i,{...l.options,parent:n}),im(i.length)?o(Lt,{className:"col-span-6",...l}):null]}),o(_r,{renderFoldableSection:({isUnfolded:e})=>c(Dr,{className:u(dm),isUnfolded:e,children:[B(r,{...l.options,parent:n}),im(r.length)?o(Lt,{className:"col-span-6",...l}):null]}),renderFoldButton:({isUnfolded:n,onToggle:a})=>o(sm,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:cm[Number(n)],dataTheme:l.options?.page?.colorPalette,onClick:a})})]})},um=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...a})=>{switch(e?.view){case"grid":return c("div",{children:[hm(n,t),mm({...e,...a,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[hm(n,t),lm({...a,blocksToRender:t})]});default:return null}})),hm=(e,t)=>e&&!t.length?o(Pd,{...e}):null,pm=e=>t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:`sep-${a}`},n):[n]),[]),gm=d((({value:e,onChange:t,items:n=[],multiple:a})=>n.map((n=>o(Al,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const l=e?.includes(n);t(a?l?(e||[]).filter((e=>e!==n)):[...e||[],n]:l?[]:[n])})(n.value),type:a?"checkbox":"radio"},n.value))))),fm=d((({children:e,filtrationSchema:t,resetButton:n,field:a,reset:l})=>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,pm(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(xm(a)).filter(Boolean))]}),n?o("div",{children:o(Yi,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:l,children:n?.text})}):null]}))),xm=e=>([t,n])=>{const a=n?.type;return"array"===a?bm(t,e)(n):null},bm=(e,t)=>n=>{const a=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(Ee,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(gm,{items:a,multiple:!n?.single,...t(e)})]},e)},ym=e=>e;function vm(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Nm=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,wm=(e,t)=>Object.entries(e).map((([n,a])=>"number"==typeof a?Array.isArray(t[n])?((e,t)=>n=>Nm(t[e])||Nm(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Nm(t[e])||Nm(n[e])||Cm(t[e])<=Cm(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>Nm(t[e])||Nm(n[e])||Cm(t[e]?.min)>=Cm(n[e]?.min)&&Cm(t[e]?.min)<=Cm(n[e]?.max))(n,e):Array.isArray(a)?((e,t)=>n=>Nm(t[e])||Nm(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Nm(t[e])||Nm(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Cm=e=>Number(e||0),Sm=(e,{block:t,page:n,normalize:a=ym})=>{const l=t?.blocks||[],[i,s]=dn(e),o=r((()=>vm(l,l.map((e=>Mt(e.content,n?.fallback))))),[l,n?.fallback]),c=i===e?l:((e,t)=>(n=ym)=>e?.filter((([,e])=>wm(t,n(e)||{}))).map((([e])=>e)))(o,i)(a);return[i,{blocksToRender:c,blocksWithProps:o},s]},km={},Im={},Tm=Vt((({className:e,filtrationSchema:t=km,consumerField:n={},resetButton:a,...l})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Sm(Im,{block:l.block,page:l.options?.page}),d=o(Mn,{className:"w-64",label:n?.title,options:Rm(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Rm(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...l,children:[o(fm,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Yi,{type:"reset",className:"mt-lg w-64",onClick:s,version:a?.version,children:a?.text})})]})}),o(um,{blocksToRender:i,...l})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Rm=e=>vm(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Bm=(e=!1)=>e?"text-left":"text-center",Pm={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},_m=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:a,icon:l,...i})=>{const r=String(a?.width||t);return l?o("div",{style:{width:`${r}px`,height:`${r}px`},className:u("rounded-icon object-fit flex justify-center items-center",Pm[n],e),children:o(W,{...i,width:"54%",height:"54%",name:l})}):null})),Dm=d((({className:e="",title:t,benefitList:n,...a})=>{const l=ke();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(N,{headingType:"h3",as:"h2",className:Bm(l),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(Am)}):null]})})),Am=({label:e,description:t,__html:n,icon:a,isDotted:l=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[a?.icon?o(_m,{className:"shrink-0",iconBgVersion:i,...a}):null,a?.src?o(ne,{className:"shrink-0",image:a}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Ee,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(De,{__html:n,isDotted:l,itemSize:"list-s"}):null]}):null]},String(r)),Em=e=>({icon:t,title:n,description:a},l)=>c("div",{className:u("flex flex-col gap-1","items-center",{"justify-center":!a&&!n}),children:[n?o(Ee,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,a?o(Ee,{size:"text-h6",font:"font-normal",align:e,children:a}):null]},String(l)),Mm=(e,t,n)=>o("div",{className:`grid gap-2xs ${Om(t)}`,children:e.map(Em(n))}),Om=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},zm=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:a="4",subtitle:l,title:i,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(S,{defaultPadding:"",title:i,description:l,headlineVersion:"M"}),e?.length?Mm(e,a,t):null]}))),Vm={start:"justify-start",center:"justify-center",end:"justify-end"},Fm=d((({buttons:e,className:t="",align:n,...a})=>{const l=n&&u("flex",Vm[n]);return o(g,{className:u("!bg-transparent",l,t),defaultPadding:"p-0",...a,children:je(e)})})),Lm=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:a=2,depositeName:l,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Ee,{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:He(a,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),l&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:l}):null]})]}))),$m=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),jm=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:a=2,color:l="text-secondary-text",children:i,...r})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o(Lm,{title:e,rate:t,unit:n,fractionDigits:a,color:l,...r})}),o(qs,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:a,fixed:!0,color:l,...r}),i]}):o($m,{title:e,...r}),Um={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},qm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Wm=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,[l,i]=((e,t,n)=>{const{maxBonus:a=5e3,prefMonthsNum:l=Um.prefMonthsNum,prefTravelBonusRate:i=Um.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),a);return[c,c*l+Math.min(Math.round(s*t)+Math.round(o*n),a)*(12-l)]})(t||qm,n,a);return{...t,...e,monthBonus:l,yearBonus:i}},Hm=Vt((({className:e="",title:t,calcSource:n,buttons:a,footnote:l,...i})=>{const[r,{field:s}]=dn({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=Wm(r,n);return o(Fs,{className:e,title:t,...i,children:c("section",{className:u(Ls,e),children:[c("div",{className:$s,children:[eo({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),eo({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?jm({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:js,children:[f>=0?o(qs,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,je(a,{isVertical:!0}),Ks(l)]})]})})})),Ym=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Gm=e=>Zs({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Km=" (c капитализацией)",Xm=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:l=[],isCapitalization:i=!1})=>c("div",{className:js,children:[o(qs,{title:`Доход в конце срока${i?Km:""}`,value:e,postfix:n,prefix:"+"}),o(qs,{title:`Сумма в конце срока${i?Km:""}`,value:t,postfix:n}),je(a,{isVertical:!0}),l?.map(Ks)]}),Jm={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Zm={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Qm=(e,t)=>{const{daysValue:n,moneyValue:a,isPartialWithdrawal:l,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||l,o=n<90||n>730,c=function(e){const t=e?.rateType?Jm[e?.rateType]:"",{data:n}=Kn(t?`${qt}/depositrates/${t}`:null,_t);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&eu(s,e)&&mo(a,["minSum","maxSum"],e)&&mo(n,["minDays","maxDays"],e)))||Zm,{rate:m}=d,u=tu(m,e),h=a+u,p=c||[Zm];return{...d,...co(["minSum","maxSum"],p),...co(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},eu=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,tu=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,daysValue:l}=t;return n?Math.round(a*Math.pow((1200+e)/1200,l/30)-a):Math.round(a*e*l/365/100)},nu=Vt((({className:e="",title:t,buttons:n,footnote:a,bottomFootnote:l,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=dn({moneyValue:Ys(r,1e5),daysValue:Gs(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=Qm(m,s),{income:g,finalSum:f,rate:x,depositeName:b}=p;return o(Fs,{className:e,title:t,...d,children:c("section",{className:u(Ls,e),children:[c("div",{className:$s,children:[eo({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(ca,{items:[`От ${Ym(y.min||0)}`,`До ${Ym(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[au(p,h),Gm({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),jm({rate:x,depositeName:b,isShowDepositeName:i}),Xm({income:g,finalSum:f,buttons:n,footnotes:[a,l]})]})});var y})),au=(e,t)=>c("div",{className:"space-y-s",children:[o(Ee,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Ya,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Ya,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),lu=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,a]=t[n-1],[l,i]=t[n];a>=l?t.splice(n-1,2,[e,Math.max(a,i)]):n++}return t},iu={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},ru=(e,t,n)=>{const{moneyValue:a,monthsValue:l}=e,i=t?.[0]?cu(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=>[ou({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),ou({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),ou({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),ou({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,mo(a,["minSum","maxSum"],t),mo(l||i,["minMonths","maxMonths"],t)].every(Boolean)))||iu,{rate:u}=m,h=su(u,e),p=a+h,g=t||[iu];return{...m,...co(["minSum","maxSum"],g),...co(["minMonths","maxMonths"],g),availableMonths:lu(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((a,l)=>t>=e?e+l*n:e-l*n)))(e,t))),...e,defaultMonth:i,income:h,finalSum:p}},su=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,monthsValue:l}=t;return n?Math.round(a*Math.pow((1200+e)/1200,l)-a):Math.round(a*e*30*l/365/100)},ou=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],cu=(e,t)=>e+Math.round((t-e)/2),du=(e="rub")=>"rub"===e,mu=(e,t)=>{const{minMonths:n,maxMonths:a}=co(["minMonths","maxMonths"],gu(t,e?.currency)),l=e.monthsValue||Math.round((n+a)/2);return{monthsValue:la(l,n,a)}},uu=(e,t)=>{const{minSum:n,maxSum:a}=co(["minSum","maxSum"],gu(t,e?.currency)),l=e.moneyValue||n;return{moneyValue:la(l,n,a)}},hu=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),pu=e=>{const t=du(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},gu=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},fu=(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?Zs({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?Zs({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),xu(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Gm({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(a={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},Zs({...a,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),xu(e.isShowNewClient),e.isShowNewClient?o(Ya,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},xu=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,bu={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},yu={text:"₽",key:"rub"},vu=Vt((({className:e,title:t,calcSource:n,buttons:a=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[yu],g=i((e=>t=>e?{...t,...pu(t),...uu(t,e),...mu(t,e),...hu(t,e)}:t)(h),[h]),[f,{field:x}]=dn({moneyValue:Ys(d,2e4),monthsValue:Gs(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:yu},{normalizer:g}),b=x?.("currency")?.value??yu,y=x?.("isNewClient")?.value,v=gu(h,b),N=ru(f,v,s),{rate:w,income:C,finalSum:S,type:k=""}=N,I=i((()=>{to({field:x,defParams:Ws(v,y),calcParams:N,monthsValue:"minMonths",map:bu})}),[x,h]);l((()=>{!fo(d)&&v&&I()}),[d,h]);const T=w===Ws(v,y)?.rate;return o(Fs,{className:e,title:t,...m,children:c("section",{className:u(Ls,e),children:[c("div",{className:$s,children:[c("div",{className:"flex gap-m",children:[eo({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:Nu(b?.key)}),h&&h?.length>1?o(Fn,{label:"Валюта",options:p,...x("currency")}):null]}),Xs({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),fu({...N,...s},x)]}),jm({rate:w,children:Cu(I,T)}),Xm({income:C,finalSum:S,buttons:[...a,wu(n?.buttons,k)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),Nu=(e="")=>du(e)?1e3:100,wu=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},Cu=(e,t=!1)=>t?null:o(Yi,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Su=e=>ku({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ku({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ku=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:l})=>!!n&&!n[l]||t[a]===e[a],Iu={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Tu=(e,t,n)=>{const{moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[Iu],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Su({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=oo(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=oo(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Su({row:e,userInputParams:t,paramsViewSettings:n})&&mo(a+r,["minSum","maxSum"],e)&&mo(i,["minSumOld","maxSumOld"],e)&&mo(r,["minSumExtra","maxSumExtra"],e)&&mo(l,["minMonths","maxMonths"],e)))||Iu)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=h,g=no(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:f}},Ru=Vt((({className:e="",title:t,calcSource:n,buttons:a,footnote:l,paramsViewSettings:i,...r})=>{const[s,{field:d}]=dn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Tu(s,n,i),h=Qs({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Fs,{className:e,title:t,...r,children:c("section",{className:u(Ls,e),children:[c("div",{className:$s,children:[eo({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),eo({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Xs({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Bu({...m,...i},d),m.isExtraMoney?eo({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(js,"@4xl:w-1/2"),children:[o(qs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(qs,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(qs,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(qs,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),je(a,{isVertical:!0}),Ks(l)]})]})})})),Bu=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Ya,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Ya,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Ya,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Pu=d((e=>{const{onChange:t,min:n,max:a,defaultValue:l="0",fractionDigits:r=0,...s}=e,c=aa(e,{normalize:(e=l)=>n&&a?String(la(Number(_u(e)),n,a)):_u(e),format:He(r)}),d=i((e=>t&&t(_u(e))),[t]);return o(vn,{onChange:d,...s,...c})})),_u=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Du=d((e=>o(Pu,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ee,{size:"text-xl",font:"font-light",children:"₽"})})}))),Au={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Eu={amount:1500},Mu=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=dn(Eu),[h,p]=a(!1);return l((()=>{p(d<=0)}),[d]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Au[r],children:[o(Du,{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(Yi,{className:"w-full mt-lg",type:"submit",disabled:h,children:i.text}):null]})]})})),Ou=({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(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),zu="relative h-full",Vu={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Fu=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...a})=>{const{blocks:l}=a.block||{},i=l?.some(ju),r=n?{defaultPadding:"p-6xl pb-m"}:{};return P({...a,renderProps:(n,a,l)=>c("div",{className:Lu(n,{someCardsHighlighted:i}),children:[T(n,a,{className:$u(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:l}),ju(n)?Ou({className:"absolute top-0 -right-4 z-40"}):null]},String(l))})},Lu=(e,{someCardsHighlighted:t})=>u(zu,t&&(ju(e)?"pt-3xl":"pt-3xl sm:pt-16")),$u=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u(zu,"min-w-80",Vu[a],t&&(ju(e)?"pt-3xl sm:pt-16":"pt-3xl"),_d(n),n&&"h-full"),ju=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Uu=Vt((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:a=!0,isGap:l=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(am,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:l?16:0,padding:0,arrowsPadded:a,navButtons:r?qu(s?.block?.blocks):[],hasBlur:!0,children:Fu({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),qu=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Wu="z-10 border border-solid w-full h-full",Hu=u(Wu,"absolute hidden @xl:block border-transparent"),Yu=d((({className:e,title:t,description:n,button:a,...l})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...l,children:c("div",{className:"relative h-full",children:[o("div",{className:u(Hu,"top-9 right-12 bg-green-dark")}),o("div",{className:u(Hu,"top-6 right-8 bg-green")}),o("div",{className:u(Hu,"top-3 right-4 bg-green-light")}),c("div",{className:u(Wu,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(S,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),je([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Gu={black:"bg-black",white:"bg-white"},Ku=d((({className:e="",title:t,description:n,image:a,price:l,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(Re,{className:"h-full",padding:d,title:o(S,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:a?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:a}):null,buttons:je([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Ee,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Xu)]}):null,l?c(Ee,{size:"text-h3",align:"text-left",children:[l," ₽"]}):null]})}))),Xu=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Gu[e]}`},String(t)),Ju=d((({icon:e,...t})=>{const n=pe(),{text:a,href:l,target:i,onClick:r}=n(t);return a?o("div",{className:u("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:l,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:a}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:a})]})})}):null})),Zu=d((({className:e,additionalDescription:t,description:n,links:a,title:l,...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(S,{isEmbedded:!0,title:l,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(S,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),a?.length?Qu(a):null]})}))),Qu=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(Ju,{...e},String(t))))}),eh=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),th=d((({className:e="",href:t,target:n,onClick:a,data:l,children:i})=>{const r=pe()({href:t,target:n,onClick:a});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...fe(l),children:i})})),nh=[{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"}}],ah=d((({className:e="",media:t,showButtonText:n,stretched:l,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=a(),m=t?.map((e=>{const{href:t,icon:a,text:l}=e,{iconMapped:r}=(e=>nh.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=$e(a)?a:r,c=n?{text:l}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&l&&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},lh(l));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:je(m,{className:ih(s??!1,l??!1,n),buttonClassName:h})}),r?o(Ee,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),lh=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",ih=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),rh=d((({className:e,padding:t,description:n,additionalDescription:a,href:l,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=true,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(th,{href:l,target:m,className:"h-full",data:eh(v),children:c(Re,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(S,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Qe($e(i)?o(ne,{image:i}):null,x),buttons:d.length?o(ah,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Le,{benefits:f}),s?o(De,{__html:s,isDotted:r,itemSize:"list-s"}):null,sh(a,p)]})})}))),sh=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,oh=new me,ch=(e,t)=>{const{title:n,description:a,buttons:l}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Ee,{size:"text-m",color:"text-secondary-text",children:n})}):null,a?o("div",{className:"mt-2xs",children:o(Ee,{size:"text-xl",color:"text-primary-text",children:a})}):null,l?.length?o("div",{className:"text-primary-main",children:je(l)}):null]},String(t))},dh=d((({className:e="",title:t,align:n="text-center",icon:r,button:s,visibleCellsCount:d=1,cardCells:m=[],options:h,data:p,...f})=>{const x=m.map(ch),[b,y]=d>0?[x.slice(0,d),x.slice(d)]:[x,[]],[v,w]=a(!1);l((()=>oh.subscribe("fold",(e=>{e&&h?.parent&&e.parent===h?.parent&&w(e.isUnfolded)}))),[h?.parent]);const C=i((()=>{oh.fire("fold",{type:"fold",isUnfolded:!v,parent:h?.parent})}),[v,h?.parent]);return c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...f,children:[$e(r)?o("div",{className:"self-center",children:o(ne,{image:r})}):null,t?o(N,{className:u("pt-xs",n),headingType:"h5",title:t}):null,s?.text?o(Ne,{className:"w-full mt-m mb-lg",...s}):null,y.length?o(_r,{renderFoldableSection:()=>c("div",{children:[b,o(Dr,{isUnfolded:v,children:y})]}),renderFoldButton:()=>m.length>=d?o(mh,{data:p,isUnfolded:v,onClick:C}):null}):o("div",{children:b})]})})),mh=d((({data:e,isUnfolded:t=!1,onClick:n})=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",type:"button",onClick:n,...t?fe(e):{},children:[o("div",{children:t?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:t?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}))),uh=d((({className:e,contacts:t,info:n,version:a="secondary",...l})=>c(g,{className:u("flex",e),defaultPadding:"p-6xl",version:a,...l,children:[n?.length?hh(n):null,t?.length?hh(t):null]}))),hh=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>ph({column:e,i:t})))}),ph=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:a},l)=>c("div",{children:[o(S,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:u({"mt-xl":Boolean(a?.text)}),children:je([a])})]},String(l))))},`col-${String(t)}`):null,gh=()=>{const e=globalThis.sessionStorage?.getItem("refreshToken"),t=globalThis.sessionStorage?.getItem("accessToken"),n=globalThis.localStorage.getItem("taskId"),a=Jt();if(!t||!e||!n)return a.assign("/"),()=>{};const l=async()=>{const n=await Rr("/auth/refresh","POST",{refresh_token:e,access_token:t});if(401==n?.status&&a.assign("/"),n?.ok){const e=await n.json();globalThis.sessionStorage.setItem("refreshToken",e.refresh_token),globalThis.sessionStorage.setItem("accessToken",e.access_token)}};l();const i=setInterval(l,24e4);return()=>clearInterval(i)},fh=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]})]}))),xh=d((({step:e=1,totalSteps:t=6,stepsTitles:n=[]})=>{const a=r((()=>(e+1)/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 mr-s",children:["Шаг ",e+1," из ",t,"."]}),n[e]||null,o(fh,{step:a,showPercentage:!1})]})})})),bh=e=>(t,n)=>t.filter((e=>e)).map((t=>[yh(n,e),vh(t,e),Sh(t,e),Nh(t,e),wh(t,e),Ch(t,e)].some(Boolean)?{...t,required:!1}:t)),yh=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,vh=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,Nh=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,wh=({name:e},t)=>"addressFact"===e&&t("addressMatch"),Ch=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),Sh=({name:e},t)=>"snils"===e&&kh(t),kh=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key;var Ih;!function(e){e.process="IN_PROCESS",e.ok="APPROVED",e.fail="CANCELLED",e.pre_decision="PRE_DECISION",e.approved="APPROVED",e.cancelled="CANCELLED",e.failed="FAILED",e.draft="DRAFT",e.rework="REVISION"}(Ih||(Ih={}));const Th=e=>Tr("/user-data/getTaskStatus","POST",e),Rh=e=>Rr("/user-data/sendSignalToProcess","POST",e),Bh=(e,t)=>{const n=s(null),a=i((()=>n.current&&clearInterval(n.current)),[]);return l((()=>(n.current=setInterval((()=>e(a)),t),a)),[e,t]),a},Ph=d((({interval:e=0,intervalExpireAction:t=(()=>null),title:n,__html:l})=>{const[i,r]=a(e),s=100-(e-i)/e*100;return c("div",{children:[n?o(S,{title:n,headlineVersion:"S"}):null,c("div",{className:"flex justify-center items-center flex-col",children:[c("div",{className:u("relative flex items-center justify-center w-24 h-24 rounded-full bg-gray text-transparent mb-5"),children:[o("div",{className:"absolute inset-0 rounded-full",style:{background:`conic-gradient(rgb(66, 171, 68) ${s}%, rgb(125, 126, 127) 0deg)`}}),o("div",{className:"z-10 flex items-center justify-center px-4 py-2 rounded-full w-20 h-20 bg-white text-primary-text text-m",children:o($c,{interval:e,time:i,setTime:e=>{0===e&&t(),r(e)}})})]}),l?o(De,{__html:l}):null]})]})})),_h=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:l,sectionAdditionalTitle:i,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Ph,{interval:d,intervalExpireAction:m}):null]}),o(Dh,{title:a,items:l}),o(Dh,{title:i,items:r,countColumns:!0}),n?.__html?o(Yo,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(Ne,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),Dh=({title:e,items:t,countColumns:n=!1})=>{const a=ke();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Ee,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",$i(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:Ah(e)},t)))}):null]})]}):null},Ah=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ee,{color:"text-secondary-text",size:"text-l",children:e}),o(Ee,{color:"text-primary-text",size:"text-xl",children:t})]}),Eh=d((()=>o(_h,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),Mh=d((({handleExpireTimer:e})=>{const{statusInfo:t}=hl();return o(_h,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:t?.cardCategory}]})})),Oh=d((()=>{const{statusInfo:e}=hl();return o(_h,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),zh=d((()=>{const{statusInfo:e}=hl();return o(_h,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:Vh(e),buttonText:"Вернуться на главную"})})),Vh=e=>{const t=[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:e?.cardCategory}];return e?.deliveryAddress&&e?.deliveryDate?t.concat([{label:"Адрес доставки",description:e?.deliveryAddress},{label:"Дата доставки",description:jt(e?.deliveryDate)}]):t},Fh=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Lh=d((()=>{const[e,t]=a(Ih.process),{taskId:n}=hl();l((()=>{(async()=>{for(const e of Fh)await Rh({signalType:e,taskId:n})})()}),[n]);const r=i((async e=>{const a=await Th({taskId:n});a&&a?.statusCd!==Ih.process&&(e(),t(a.statusCd))}),[n]);Bh(r,3e4);return $h(e,(()=>t(Ih.rework)))})),$h=(e,t)=>({IN_PROCESS:o(Mh,{handleExpireTimer:t}),CANCELLED:o(Eh,{}),FAILED:o(Eh,{}),DRAFT:o(Eh,{}),APPROVED:o(zh,{}),PRE_DECISION:o(zh,{}),REVISION:o(Oh,{})}[e]||o(Oh,{})),jh={...kc,...Ic},Uh=({field:e,inputs:t,params:n})=>t.map(Li(e,n,jh)),qh=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:l,title:i},r)=>{const s=bh(Wh(t))(e,n);return c("div",{className:u($i(l),"grid gap-x-m"),children:[ji(i),Uh({field:t,inputs:s,params:a})]},`section-${r}`)})),Wh=e=>t=>e(t)?.value,Hh=d((({step:e,isSending:t,onPrevStep:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Yi,{onClick:n,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Yi,{isLoading:t,type:"submit",children:a?"Отправить заявку":"Далее"})]})})),Yh=e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:l}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:l}},Gh=e=>{const{currency:t,paymentSystem:n,cardCategory:a,codeWord:l}=e;return{currencyCode:t?{key:t}:void 0,paymentSystemTypeCd:n,classCard:a,codeWord:l}},Kh=e=>{const{beginDate:t,employment:n,organizationName:a,inn:l,legalForm:i,organization:r,amountWorkers:s,employerActivities:o,employerOrganization:c,generalSeniority:d,lastJobExperience:m,experience5Years:u,jobsNumber:h,organizationPhone:p,organizationAddress:g,positionOrganization:f,partInBusiness:x}=e;return{employmentContractDate:jt(t||"",!0),employmentTypeCd:n,organizationName:a,organizationInn:l,organizationActivityTypeCd:o,organizationTypeCd:r,organizationKindCd:c,employeesNumberCd:s,opf:i,seniority:d,generalSeniority:u,jobsNumber:h,lastWorkDuration:m,positionCd:f,participantContacts:id({organizationPhone:p&&Ut(p)}),participantAddresses:rd({organizationAddress:g}),ownershipShare:"BUSINESS_OWNER"===f?.key?x:""}},Xh=e=>{const{name:t,surname:n,middleName:a,limitedBirthday:l="",phone:i="",email:r,sex:s,birthPlace:o,dulIssueDateField:c="",dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,education:p,participantDateRegistration:g="",housing:f,addressRegistration:x,addressFact:b}=e;return{birthDate:jt(l,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:jt(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:jt(g,!0),houseTypeCd:f,participantContacts:id({phone:Ut(i),email:r}),participantAddresses:rd({addressRegistration:x,addressFact:b}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}},Jh=e=>{const{methodObtain:t,deliveryDate:n=""}=e,a="courier"===t;return a?{courierDeliveryFlg:a,deliveryDate:n.toString().replace(/(GMT)[+-]\d{4}/,"GMT+0000"),deliveryTimeCd:{value:"TIME_2"},office:{id:"3"}}:{}},Zh=e=>{const{addressRetail:t,methodObtain:n}=e;return t?.key&&"office"===n?{office:{id:t.key}}:{}},Qh=(e,t)=>{switch(e){case 0:default:return{};case 1:return Xh(t);case 2:return Kh(t);case 3:return sd(t);case 4:return Yh(t);case 5:return(e=>{const{addressCourier:t,methodObtain:n}=e;return"courier"===n?{participantAddresses:rd({addressCourier:t})}:{}})(t)}},ep=[{paymentSystem:{key:"",text:""},currency:"810",codeWord:""},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:void 0,methodObtain:"office",addressCourier:{fullAddress:"",fiasCode:""}},{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:void 0,inn:void 0,jobsNumber:void 0,lastJobExperience:void 0,legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},{familyStatus:{key:"",text:""},familyMembers:void 0,dependents:void 0,confirmationIncome:{key:"",text:""},wages:void 0,mandatoryPayments:void 0,snils:"",armyIdFlg:!1},{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},{regionRetail:{key:"",text:""},addressRetail:{key:"",text:""},bankEmployeeCode:void 0,addressCourier:{fullAddress:"",fiasCode:""},methodObtain:"office",deliveryDate:void 0}],tp=e=>{try{return e?new Date(e):void 0}catch(e){return}},np=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:l,setFalse:s}]=nn(!1),o=5===e,c=hl(),d=r((()=>((e,t)=>({...ep[e],...t,limitedBirthday:tp(t?.limitedBirthday),dulIssueDateField:tp(t?.dulIssueDateField),participantDateRegistration:tp(t?.participantDateRegistration),beginDate:tp(t?.beginDate),deliveryDate:tp(t?.deliveryDate)}))(e,c.leadForm)),[e,c.leadForm]),m=i((e=>{const{leadForm:t}=c;o&&e.ok&&t&&(c.statusInfo={regionRetail:t?.regionRetail?.text,addressRetail:t?.addressRetail?.text,deliveryAddress:t?.addressCourier?.fullAddress,cardCategory:t?.cardCategory?.text,deliveryDate:t?.deliveryDate},c.leadForm=d)}),[o,d]),u=i((async a=>{l(),c.leadForm=a;try{const{taskId:l,profileId:i,participantId:r}=c;if(l&&i&&r){const t=await Ac((({participantId:e,taskId:t,profileId:n,formData:a,step:l=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,...Zh(a),authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Qh(l,a)}],...Gh(a),...Jh(a)}}))({participantId:r,taskId:l,profileId:i,step:e,formData:a}));m(t)}t(),o&&n?.()}catch(e){}finally{s()}}),[o,m]);return[d,u,a]},ap=d((({step:e,sections:t,isFormFinished:n,onPrevStep:a,onNextStep:l,onFinish:s})=>{const d=r((()=>t?.flatMap((e=>e?.inputs))||[]),[t]),m=i((t=>ki(bh((e=>t[e]))(d,e))(t)),[d]),[u,h,p]=np({step:e,onNextStep:l,onFinish:s}),[,{field:g,onSubmit:f}]=dn(u,{formValidator:m,onSubmit:h});return n?o(Lh,{}):c("form",{onSubmit:f,className:"space-y-m",children:[qh({sections:t,field:g,step:e}),o(Hh,{isSending:p,step:e,onPrevStep:a})]})})),lp=[[{title:"Персональные данные",columns:2,inputs:[{name:"surname",required:!0,dadata:!0,filledByEsia:!0},{name:"name",required:!0,dadata:!0,filledByEsia:!0},{name:"middleName",dadata:!0,filledByEsia:!0},{name:"sex",required:!0},{name:"limitedBirthday",required:!0,filledByEsia:!0},{name:"birthPlace",required:!0,filledByEsia:!0},{name:"phone",required:!0,filledByEsia:!0},{name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{name:"dulSerie",required:!0,filledByEsia:!0},{name:"dulNumber",required:!0,filledByEsia:!0},{name:"dulIssueDateField",required:!0,filledByEsia:!0},{name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{name:"addressMatch"}]},{columns:2,inputs:[{name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{name:"housing",required:!0}]},{inputs:[{name:"addressFact",required:!0,dadata:!0}]}],[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{name:"infoCard",label:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{name:"employment",required:!0},{name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{name:"inn",required:!0,dadata:!0},{name:"legalForm",required:!0}]},{inputs:[{name:"organization",required:!0},{name:"amountWorkers",required:!0}]},{columns:2,inputs:[{name:"employerActivities",required:!0},{name:"employerOrganization",required:!0},{name:"generalSeniority",required:!0},{name:"lastJobExperience",required:!0},{name:"experience5Years",required:!0},{name:"jobsNumber",required:!0}]},{inputs:[{name:"organizationPhone",label:"Телефон работодателя",required:!0},{name:"beginDate",required:!0}]},{columns:2,inputs:[{name:"positionOrganization",required:!0},{name:"partInBusiness",required:!0,condition:{name:"positionOrganization",values:["BUSINESS_OWNER"]}}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{name:"familyStatus",required:!0}]},{columns:1,inputs:[{name:"dependents",required:!0}]},{columns:2,inputs:[{name:"familyMembers"},{name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{name:"infoCard",label:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{name:"confirmationIncome",required:!0}]},{columns:1,inputs:[{name:"wages",required:!0}]},{columns:1,inputs:[{name:"mandatoryPayments",required:!0}]},{columns:1,inputs:[{name:"snils",required:!0}]},{columns:1,inputs:[{name:"conscription",required:!0}]},{columns:2,inputs:[{name:"armyIdFlg"}]}],[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{name:"disablePeopleFlg"}]},{inputs:[{name:"bankruptcyFlg"}]},{inputs:[{name:"shareholderFlg"}]},{inputs:[{name:"legalEntityName"}]},{inputs:[{name:"creditInRshbCd"}]}]],ip=[[{title:"Параметры карты",inputs:[]},{inputs:[{name:"currency",required:!0},{name:"paymentSystem",required:!0},{name:"cardCategory",required:!0},{name:"codeWord",required:!0}]}],...lp,[{title:"Способ получения",columns:1,inputs:[]},{inputs:[{name:"methodObtain"}]},{title:"Адрес",columns:1,inputs:[]},{inputs:[{name:"addressCourier",dadata:!0,condition:{name:"methodObtain",values:["courier"]},required:!0},{name:"deliveryDate",condition:{name:"methodObtain",values:["courier"]},required:!0},{name:"comment",condition:{name:"methodObtain",values:["courier"]}}]},{inputs:[{name:"regionRetail",required:!0,condition:{name:"methodObtain",values:["office"]}},{name:"addressRetail",required:!0,condition:{name:"methodObtain",values:["office"]}}]},{inputs:[{name:"infoCard",label:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код",condition:{name:"methodObtain",values:["office"]}},{name:"bankEmployeeCode",condition:{name:"methodObtain",values:["office"]}}]}]],rp=["Параметры карты","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Выбор способа получения"],sp=d((({className:e,...t})=>{const[n,r]=a(0),d=s(null),m=i((()=>d?.current?.scrollIntoView({behavior:"smooth"})),[d]);l(gh,[]);const u=i((()=>{r((e=>Math.min(e+1,6))),m()}),[]),h=i((()=>{r((e=>Math.max(e-1,0))),m()}),[]),p=ip[n],[f,{setTrue:x}]=nn(!1);return o(g,{className:e,...t,children:c("div",{ref:d,className:"container grid grid-cols-12",children:[f?null:o(xh,{stepsTitles:rp,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(ap,{step:n,sections:p,isFormFinished:f,onNextStep:u,onPrevStep:h,onFinish:x},String(n))})]})})})),op=d((({step:e=1,totalSteps:t=5,stepsTitles:n=[]})=>{const a=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 mr-s",children:["Шаг ",e," из ",t,"."]}),n[e]||null,o(fh,{step:a,showPercentage:!1})]})})})),cp=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:l,sectionAdditionalTitle:i,sectionInfoAdditional:r,buttonText:s,interval:d,intervalExpireAction:m=(()=>{}),...u})=>c(g,{...u,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(S,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Ph,{interval:d,intervalExpireAction:m}):null]}),o(dp,{title:a,items:l}),o(dp,{title:i,items:r,countColumns:!0}),n?.__html?o(Yo,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(Ne,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),dp=({title:e,items:t,countColumns:n=!1})=>{const a=ke();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Ee,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",$i(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:mp(e)},t)))}):null]})]}):null},mp=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ee,{color:"text-secondary-text",size:"text-l",children:e}),o(Ee,{color:"text-primary-text",size:"text-xl",children:t})]}),up=d((()=>o(cp,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),hp=d((({handleExpireTimer:e})=>{const{statusInfo:t}=hl();return o(cp,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Цель кредита",description:"На любые цели"},{label:"Сумма",description:`${t?.calculator?.moneyValue?.toLocaleString()??"0"} ₽`},{label:"Срок кредита",description:`${t?.calculator?.monthsValue??"0"} мес`},{label:"Тип платежа",description:t?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}]})})),pp=d((()=>{const{statusInfo:e}=hl();return o(cp,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),gp=d((()=>{const{statusInfo:e}=hl();return o(cp,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.calculator?.monthsValue+" мес"},{label:"Тип платежа",description:e?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),fp=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],xp=d((()=>{const[e,t]=a(Ih.process),{taskId:n}=hl();l((()=>{(async()=>{for(const e of fp)await Rh({signalType:e,taskId:n})})()}),[n]);const r=i((async e=>{const a=await Th({taskId:n});a&&a?.statusCd!==Ih.process&&(e(),t(a.statusCd))}),[n]);Bh(r,3e4);return bp(e,(()=>t(Ih.rework)))})),bp=(e,t)=>({IN_PROCESS:o(hp,{handleExpireTimer:t}),CANCELLED:o(up,{}),FAILED:o(up,{}),DRAFT:o(up,{}),APPROVED:o(gp,{}),PRE_DECISION:o(gp,{}),REVISION:o(pp,{})}[e]||o(pp,{})),yp=({field:e,inputs:t,params:n})=>t.map(Li(e,n,{...kc})),vp=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:l,title:i},r)=>{const s=bh(Np(t))(e,n);return c("div",{className:u($i(l),"grid gap-x-m"),children:[ji(i),yp({field:t,inputs:s,params:a})]},`section-${r}`)})),Np=e=>t=>e(t)?.value,wp=d((({step:e,onPrevStep:t,isSending:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Yi,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Yi,{type:"submit",isLoading:n,children:a?"Отправить заявку":"Далее"})]})})),Cp={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},Sp=e=>{const{moneyValue:t,monthsValue:n,isAnnuity:a}=e?.calculator??{};return{loanAmount:t,creditPeriod:n,paymentTypeCd:Cp[a?"annuity":"differential"]}},kp=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},Ip=(e,t)=>{switch(e){case 0:return(e=>{const{isInsurance:t,isSalaryClient:n}=e?.calculator??{};return{payrollCardRshbFlg:t,consentInsuranceFlg:n}})(t);case 1:return Xh(t);case 2:return Kh(t);case 3:return sd(t);case 4:return Yh(t);default:return{}}},Tp=[{calculator:{moneyValue:0,monthsValue:0,isAnnuity:!1,isInsurance:!1,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1}},{surname:"",name:"",middleName:"",sex:"",limitedBirthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:void 0},{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:void 0,inn:void 0,jobsNumber:void 0,lastJobExperience:void 0,legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},{familyStatus:{key:"",text:""},dependents:void 0,familyMembers:void 0,confirmationIncome:{key:"",text:""},wages:void 0,mandatoryPayments:void 0,snils:"",armyIdFlg:!1},{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},{regionRetail:{key:"",text:""},addressRetail:void 0,bankEmployeeCode:void 0}],Rp=e=>{try{return e?new Date(e):void 0}catch(e){return}},Bp=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:l,setFalse:s}]=nn(!1),o=5===e,c=hl(),d=r((()=>((e,t)=>({...Tp[e],...t,limitedBirthday:Rp(t?.limitedBirthday),dulIssueDateField:Rp(t?.dulIssueDateField),participantDateRegistration:Rp(t?.participantDateRegistration),beginDate:Rp(t?.beginDate),deliveryDate:Rp(t?.deliveryDate)}))(e,c.leadForm)),[e,c.leadForm]),m=i((e=>{const{leadForm:t}=c;o&&e.ok&&t&&(c.statusInfo={regionRetail:t?.regionRetail?.text,addressRetail:t?.addressRetail?.text,calculator:{monthsValue:t?.calculator?.monthsValue,moneyValue:t?.calculator?.moneyValue,isAnnuity:t?.calculator?.isAnnuity}},c.leadForm=d)}),[o,d]),u=i((async a=>{l(),c.leadForm=a;try{const{taskId:l,profileId:i,participantId:r}=c;if(l&&i&&r){const t=await Ac((({participantId:e,taskId:t,profileId:n,formData:a,step:l=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Ip(l,a)}],...Sp(a),...kp(a),esiaAccountTypeCd:{key:a?.esiaAccountTypeCd?.key}}}))({participantId:r,taskId:l,profileId:i,step:e,formData:a}));m(t)}t(),o&&n?.()}catch(e){}finally{s()}}),[o,m]);return[d,u,a]},Pp=d((({step:e,sections:t,isFormFinished:n,programsSource:a,onPrevStep:l,onNextStep:s,onFinish:d})=>{const{programId:m}=hl(),u=a?.[m??""],h=r((()=>t?.flatMap((e=>e?.inputs))||[]),[t]),p=i((t=>ki(bh((e=>t[e]))(h,e))(t)),[h]),[g,f,x]=Bp({step:e,onNextStep:s,onFinish:d}),[,{field:b,onSubmit:y}]=dn(g,{formValidator:p,onSubmit:f});return n?o(xp,{}):c("form",{onSubmit:y,className:"space-y-m",children:[vp({sections:t,field:b,step:e,params:{calcData:u}}),o(wp,{step:e,isSending:x,onPrevStep:l})]})})),_p=[[{columns:1,inputs:[{name:"calculator"}]}],...lp,[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{name:"regionRetail",required:!0}]},{inputs:[{name:"addressRetail",required:!0}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{name:"infoCard",label:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{name:"bankEmployeeCode"}]}]],Dp=["","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Отделение Банка"],Ap=Vt((({className:e,programsSource:t,...n})=>{const[r,d]=a(0),m=s(null),u=i((()=>m?.current?.scrollIntoView({behavior:"smooth"})),[m]);l(gh,[]);const h=i((()=>{d((e=>Math.min(e+1,5))),u()}),[]),p=i((()=>{d((e=>Math.max(e-1,0))),u()}),[]),f=_p[r],x=0===r,[b,{setTrue:y}]=nn(!1);return o(g,{className:e,...n,children:c("div",{ref:m,className:"container grid grid-cols-12",children:[x||b?null:o(op,{stepsTitles:Dp,step:r,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(Pp,{step:r,sections:f,isFormFinished:b,programsSource:t,onNextStep:h,onPrevStep:p,onFinish:y},String(r))})]})})})),Ep=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Mp=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),Op=1e9,zp={sum:{min:1e4,max:Op},period:3},Vp=Vt((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:l,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Sm(zp,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:Fp(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=Lp(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(fm,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Du,{label:a?.title,min:500,max:Op,...d("sum",{parse:e=>({min:Number(e),max:Op}),format:({min:e})=>String(e)})}),o(ca,{title:l?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(um,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Fp=e=>Dt((e?.paramsSource?.rateRows||[]).filter(Ep).flatMap((e=>Mp(e.minMonths,e.maxMonths)))),Lp=e=>Dt(e.flatMap((e=>e||[])).filter(Ep).flatMap((e=>Mp(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],$p=[{key:"10"},{key:"50"},{key:"100"}],jp=({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:$p,iconVersion:"black"})]})},Up="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",qp=(e,t)=>{const{currentPage:n,onPageChange:a,totalPages:l}=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!==l&&((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,l)?o("div",{onClick:()=>a(i),className:Up,"aria-label":`Страница ${i}`,children:i},String(t)):null},Wp={width:"24",height:"24"},Hp=({currentPage:e,onPageChange:t,totalPages:n})=>{const a=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),l=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:l,children:o(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Yp(1===e),...Wp})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Up,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,a.map(qp),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Up,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Yp(e===n),...Wp})})]})},Yp=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Gp=({currentPage:e,onPageChange:t,totalPages:n,itemCount:a,onItemCountChange:l})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Hp,{currentPage:e,onPageChange:t,totalPages:n}),a&&l?o(jp,{itemCount:a,onItemCountChange:l}):null]}),Kp=d((({className:e,value:t,autoFocus:n,onChange:a,onFocus:l,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{a&&a(e.target?.value||"")}),[a]);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",xn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:l})]})})),Xp=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Kp,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Fa,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Fa,{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(Yi,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Jp=d((({title:e,timestamp:t,publicId:n})=>{const a=pe(),{href:l}=a({href:`${qt}/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[null,c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Ee,{size:"text-m","font-weight":"font-light",children:jt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:l,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),Zp=`${qt}/depository`,Qp={startDate:void 0,endDate:void 0,query:""},eg=Vt((({className:e,...t})=>{const[n,l]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=dn(Qp),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:a,endDate:l})=>{const i=a?jt(a,!0):"",r=l?jt(l,!0):"",s=new URLSearchParams(Zp);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}=Kn(Zp+o,_t);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=i((e=>l(e-1)),[]),b=i((e=>{r!==e?(s(e),l(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(Xp,{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(Ee,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Ee,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(Jp,{...e},String(e.publicId)))):o(Pd,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Gp,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),tg=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,ng=d((({className:e="",title:t,description:n,error:a,button:l,...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:tg(a)}),o(S,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),l?.text?o(Ne,{version:l?.version,text:l?.text,...l}):null]}))),ag=`${qt}/region`;function lg(e="Москва"){return ul().location??{name:e}}function ig(e="Москва"){const t=ul(),n=i((async()=>{if(!t.location){const n=await Pt(ag);t.location=n??{name:e}}}),[t,e]);return Kn(ag,n),t}var rg;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(rg||(rg={}));const sg=new Intl.NumberFormat("ru",{style:"currency",currency:rg.RUB}),og=e=>e?sg.format(e):"",cg="text-m font-light text-secondary-text ",dg=`${cg} text-left`,mg=`${cg} pl-5xl text-center`,ug=`${cg} pl-5xl text-right`,hg={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},pg=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:dg,children:o(Ee,{size:"text-m",children:"Валюта"})}),o("th",{className:mg,children:o(Ee,{size:"text-m",children:"Купить"})}),o("th",{className:ug,children:o(Ee,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(gg)})]}))),gg=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:hg[t]},width:"24",height:"24"}):null,o(Ee,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Ee,{size:"text-h6",children:og(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ee,{size:"text-h6",children:og(e?.buyExchangeRate)})})]},t)},fg={icon:"GpsIcon"},xg=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(_m,{...fg,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),bg=(e,t,n)=>{const a=Number(yg(e))*Math.pow(t,n?-1:1);return Number.isInteger(a)?a:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(a)},yg=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function vg(e){if(!e)throw new Error("Value should be fulfilled");return e}const Ng=e=>t=>{const[,n]=vg(e.find((([e])=>e(t))));return n(t)},wg=e=>Ng(e.map((([e,t])=>[e,()=>t])));wg.if=e=>new Cg(void 0,e);class Cg{parent;predicate;unit;get entry(){return[vg(this.predicate),vg(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Cg(this,e)}then(e){return new Cg(this.parent,this.predicate,e)}else(e){return Ng([...Sg(this),[()=>!0,e]])}}const Sg=e=>[...e?.parent?Sg(e.parent):[],e.entry],kg=e=>wg([[e=>e.value!==rg.RUB&&e.oppositeValue!==rg.RUB,()=>e.handleConvert(e.value,rg.RUB)],[e=>e.value===rg.RUB&&e.oppositeValue===rg.RUB,()=>e.handleConvert(e.value,rg.USD)],[e=>e.value===rg.RUB&&e.oppositeValue===rg.RUB,()=>e.handleConvert(e.value,rg.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Ig(e){const{placeholder:t,rates:n,selected:a,value:l,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:a,text:a};return c("div",{className:"relative flex",children:[o(vn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:l,onChange:i}),s.length?o(Mn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Tg=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:l})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||rg.RUB,selectBuy:n?.[0]?.currency?.currency||rg.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:[Ig({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Rg(r,d,n),value:r.inputSell,setValue:e=>Pg(d,n)(e,r.selectSell,r.selectBuy)}),Ig({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Bg(r,d,t),value:r.inputBuy,setValue:e=>_g(d,t)(e,r.selectBuy,r.selectSell)})]}):null,l?.text?o(Ne,{text:l.text,version:l?.version,...l}):null]})})),Rg=(e,t,n)=>a=>{t({selectSell:a}),kg({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,l=e.selectBuy)=>{Pg(t,n)(e.inputSell,a,l)}})},Bg=(e,t,n)=>a=>{t({selectBuy:a}),kg({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,l=e.selectSell)=>_g(t,n)(e.inputBuy,a,l)})},Pg=(e,t)=>(n,a,l)=>{e({inputSell:yg(n),selectBuy:l});const i=t.find((e=>e.currency?.currency===l))?.buyExchangeRate||t.find((e=>e.currency?.currency===a))?.buyExchangeRate;i&&e({inputBuy:String(bg(n,i,a===rg.RUB)||"")})},_g=(e,t)=>(n,a,l)=>{e({inputBuy:yg(n),selectSell:l});const i=t.find((e=>e.currency?.currency===l))?.saleExchangeRate||t.find((e=>e.currency?.currency===a))?.saleExchangeRate;i&&e({inputSell:String(bg(n,i,a===rg.RUB)||"")})},Dg=`${qt}/exchangerates`;const Ag=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const l=function(e){const t=e?.code||"000",{data:n}=Kn(Dg+`?regionCode=${t}`,_t);return n||{}}(lg()),i=Eg(l?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:rg.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:rg.RUB}}),o(g,{className:u("box-border min-h-80",e),...a,children:o(Re,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[i?o(pg,{className:"mb-xl",exchangeCurrencyItems:i}):null,o(xg,{address:l?.address})]}),o(Tg,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),Eg=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Mg=d((({className:e="",items:t})=>{const n=pe();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(Og(n))})})),Og=e=>({dataFooter:t,...n},a)=>{const{text:l,href:i,target:r,onClick:s}=e(n);return l?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...fe(t),children:l||null})},String(a)):null},zg=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),Vg=["all","footer"],Fg=d((({className:e,navigationItems:t})=>{const n=pe();return o("div",{role:"menu",className:u("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(zg(Vg)).map(n).map(Lg)})})),Lg=(e,t)=>{const{text:n,items:a=[],href:l,target:i="_self",onClick:r,dataFooter:s}=e,d=a.filter(zg(Vg));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:l,target:i,onClick:r,...fe(s),children:n}),d?o(Mg,{items:d}):null]},String(t))},$g=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(jg)}):null)),jg=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Ee,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(Ug)})]},String(t)),Ug=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:qg(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),qg=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Wg(t)}`,children:o(Ee,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Wg=e=>e.replaceAll(/\D/g,""),Hg=d((({className:e="",index:t,text:n,...a})=>{const l=pe(),{href:i,target:r,onClick:s}=l(a);return o("a",{className:u("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),Yg=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(Ee,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(Hg,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Gg="w-full lg:w-52";function Kg(e,t,n=300){l((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const Xg=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:a,s2Matches:l}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),a=Array.from({length:e.length}),l=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++)a[r]||l[n]||e[r]!==t[n]||(i++,a[r]=!0,l[n]=!0)}return{m:i,s1Matches:a,s2Matches:l}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:a}){let l=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(a[s]){r=s+1;break}e[i]!==t[s]&&l++}return l}(e,t,{s1Matches:a,s2Matches:l}),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 Jg=(e,t)=>(n,a)=>{for(const[l,i]of a)n.set(l,e(n.get(l)||t,i));return n},Zg=(e=[])=>e.reduce(((e,t)=>e+t),0),Qg=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),ef=e=>t=>e.map((([e,n])=>[Xg(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>nf(t,e))).reduce(Jg(Math.max,0),new Map),tf=e=>t=>{return vm(t,t.map((({title:e})=>e)).map((e=>t=>{const n=Qg(t||"");return n.length?Zg(e.map((e=>io(n.map(Xg(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},nf=(e,t)=>new Map(e.map((e=>[e,t]))),af=({basePathList:e,initialQuery:t=""})=>{const[n,i]=a(t||"");l((()=>{null!=t&&i(t)}),[t]);const{data:r}=Kn(e?.length?e:null,lf),[s,o]=a(null);return Kg((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:a}=t||{};if(!(e&&n?.length&&a&&Object.keys(a).length))return[];const l=Qg(e);if(!l.length)return[];const i=Object.entries(a),r=[...l.map(ef(i)).reduce(Jg(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*l.length)).map((([e])=>n[e]));return tf(l)(r)})(n)))}),[r,n]),[s,{value:n,onChange:i}]},lf=async(...e)=>(await Promise.allSettled(e.map((e=>Pt(V(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),rf=d((({initialQuery:e,navigationItems:t,onClose:n})=>{const a=r((()=>t?.map((e=>e.href||"/"))),[t]),[l,i]=af({basePathList:a,initialQuery:e}),s=r((()=>sf(t)(l)),[t,l]);return o(Ki,{head:o(Kp,{autoFocus:!0,...i}),onClose:n,children:o(Fg,{navigationItems:s})})})),sf=e=>t=>e?.length&&t?.length?vm(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:V("/",t)})))}))):[],of=d((({className:e,search:t,...n})=>{const[l,r]=a(""),s=i((()=>r("")),[]),d=un(rf,n),m=i((e=>{r(e),cf(e)&&d.open({initialQuery:e,onClose:s})}),[s,d]);return c("div",{className:u("relative",e),role:"search",children:[o(Kp,{value:l,placeholder:t?.placeholder,onChange:m}),o(Gi,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),cf=e=>e&&e.length>=3,df=(e,t)=>{const{logo:n}=e??{},{dataHeader:a,dataFooter:l,...i}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(Fc,{className:Gg,logo:i,data:l,showTitle:!1}),o(of,{className:"grow",navigationItems:t,...e})]})},mf=d((({className:e="",index:t,...n})=>{const a=pe(),{href:l,target:i,text:r,onClick:s}=a(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:l,target:i,onClick:s,children:r||`Документ ${t}`})})),uf=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Ee,{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(mf,{index:t,...e},String(t))))}):null]}))),hf=Vt((({className:e,footer:t,...n})=>{const{navigationItems:a}=n.options?.page?.navigation??{},l=n.options?.page?.common??{},{documents:i,relatedEnterprises:r,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:h,license:p,otherLinks:f=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[df(l,a),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Fg,{navigationItems:a}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u(Gg,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o($g,{items:s}),h?o(Ne,{className:"w-full",version:"primary",...h}):null,d.map(((e,t)=>o(ah,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),f.map(((e,t)=>o(Ne,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Yg,{title:m,links:r}),o(uf,{links:i,license:p})]})})),pf=d((({className:e="",title:t,description:n,calendar:a,...l})=>c(g,{className:u("space-y-m",e),defaultPadding:"p-6xl",...l,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),a?gf(a):null]}))),gf=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>ff(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:xf(e)}),c("div",{className:"text-s",children:[o(Ee,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Ee,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},ff=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),xf=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ne,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),bf=Vt((({className:e,title:t,button:n,regionSource:l,data:i,...r})=>{const[s,d]=a({key:""}),m=l?.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 space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Fn,{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(Ne,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:eh(i,s?.key),children:f})}):null]})})}));function yf(e=[]){const t=_(),n=Array.from(e.entries()).filter((([,e])=>vf(t)(e)));return n.find((([,e])=>vf(t,!0)(e)))??n[n.length-1]??[]}const vf=(e,t=!1)=>({href:n})=>{if(!n)return!1;const a=z(Nf(e)(n));return t?a===z(n):a.startsWith(z(n))},Nf=e=>t=>{const n=X(K.SITE_URL);return E(t)?e.href:V(n,e.pathname)},wf=d((({className:e="",items:t,activeItem:n,ariaLabel:a="Меню"})=>{const[r,{setFalse:d,toggle:m}]=nn(!1),h=pn(d),p=s(null),g=i((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),a=t.current.getBoundingClientRect(),l=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${l}px`:a.left>e.left&&(l>a.left?n.current.style.left="":n.current.style.left=`${l}px`)}}),[r]);return hn(globalThis,"resize",(()=>g({isOpened:r,buttonRef:h,menuRef:p}))),l((()=>{g({isOpened:r,buttonRef:h,menuRef:p})}),[r]),c("div",{className:u(r?"rounded-md shadow-blue-gray":"",e),ref:h,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":a,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:u("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!r}),"aria-hidden":!r,children:Sf(t,n)})]})})),Cf=d((({isActive:e,...t})=>{const n=pe(),{text:a,href:l,target:i,onClick:r}=n(t);return o("a",{className:u("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:l,target:i,onClick:r,role:"link",...fe(t?.data),children:a})})),Sf=(e,t)=>e?.map(((e,n)=>o(Cf,{isActive:e===t,...e},e?.text??String(n)))),kf={default:"w-6 h-6",large:"w-12 h-12"},If=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:a=!1,disabled:l,ariaLabel:i="Меню второго уровня",image:r,data:s,onClick:c,version:d})=>o("button",{className:u("group/btn border-0 flex shrink-0 items-center",a?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":a&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${kf[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:l,"aria-label":i,onClick:c,...fe(s),children:o(ne,{image:r,className:u("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Tf="chatbot",Rf="text-page__btn-chat",Bf={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Pf=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:a="Чат",version:i})=>{const r=(e=>{l((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=Bf[e??""];return n=>{if(t)if("personal"!==e)br(Tf,t);else{const e=n.target;e?.classList.contains(Rf)||e?.classList.add(Rf),document.getElementById("webchat-js-container:webchat_rshb")||br(Tf,t)}}})(e);return o(If,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:a,onClick:r,buttonSize:"large",isGrayBg:!0,version:i})})),_f=d((({className:e="",active:t,dataItemName:n,children:a,data:l,...i})=>{const r=pe(),{href:s,target:d,text:m,onClick:h}=r(i);return c("a",{className:u("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:h,...fe(l),children:[o("span",{className:Df(t),children:m||a}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),Df=(e=!1)=>u("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Af=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...l})=>{const r=Ed(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(_f,{...l,children:n})})})),Ef={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"},Mf=d((({version:e,text:t,mobileText:n,...a})=>{const l=ke()?n:t;return l?o(Ne,{className:u("py-s px-lg font-light whitespace-nowrap",Ef["transparent"===e?"transparent":"default"]),...a,children:l}):null})),Of=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:l,chatBotAriaLabel:i})=>{const d="transparent"===t?"white":"black",[,m]=yf(e),[u,h]=a(e.length),p=e.slice(u),g=s(null),f={rootRef:g},x=r((()=>e.map(((e,t)=>e=>{h(e?zf(t):Vf(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(Af,{className:u-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:x[t],data:e.dataHeader,...e},String(t))))}),p.length?o(wf,{items:p,activeItem:m,ariaLabel:l}):null,A.CHAT_BOT?o(Pf,{version:t,iconVersion:d,chat:A.CHAT_BOT,ariaLabel:i}):null,o(Mf,{version:t,...n})]})})),zf=e=>t=>Math.max(t,e+1),Vf=e=>t=>Math.min(t,e),Ff=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Ee,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(Lf,{...e},String(t))))})]}):null,Lf=d((({icon:e,...t})=>{const n=pe(),{text:a,target:l,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,a?o("a",{className:"hover:text-primary-hover",href:i,target:l,onClick:r,children:o(Ee,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})}):null]})})),$f=(e,t)=>n=>n.name?o(th,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:eh(e,n.name),children:o(Ee,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,jf=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(xn,"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"})]}))),Uf=d((({defaultLocation:e})=>{const t=lg(e),n=pe(),{href:a}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(th,{href:a,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),qf=d((({foreignOffices:e,branches:t,onClose:n})=>{const l=ig(t?.default),[s,d]=a(""),m=Jl(),u=r((()=>Hf(m).sort(((e,t)=>e.name.localeCompare(t.name)))),[m]),h=r((()=>((e,t)=>{const n=new Map;for(const a of e){const e=t(a),l=n.get(e)||[];n.set(e,[...l,a])}return n})(u,Wf)),[u]),p=i((e=>{l.location=e,n?.()}),[l,n]);return c(Ki,{className:"pb-20",head:c("div",{children:[o(Ee,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Uf,{defaultLocation:t?.default}),o(jf,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:u.filter((({name:e})=>e&&Xg(e.toLowerCase())(s.toLowerCase())>=.8)).map($f(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(h.entries()).map((g=p,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ee,{size:"text-h6",children:e})}),t.map($f(f,g))]},e)))}),Ff(e)]});var g,f})),Wf=e=>e.name?.charAt(0)??"",Hf=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),Yf=d((({className:e="",active:t,flat:n,children:a,data:l,...i})=>{const r=pe(),{href:s,target:c,text:d,onClick:m}=r(i);return o("a",{className:u(Gf(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...fe(l),children:o("span",{suppressHydrationWarning:!0,className:Kf(t,n),children:d||a})})})),Gf=(e=!1,t=!1)=>u("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),Kf=(e=!1,t=!1)=>u("font-sans text-s font-light",e?"text-primary-main":u(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Xf=d((({className:e,version:t,...n})=>{const a="transparent"===t?"white":"black",l=lg(n?.branches?.default),r=un(rf,n),s=un(qf,n),d=i((()=>r.open({})),[r]),m=i((()=>s.open({})),[s]);return c("div",{className:u("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(Yf,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:l?.name,data:eh(n?.branches?.dataClick,l?.name??""),onClick:m}):null,n?.officesAtms?.href?o(Yf,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(If,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),Jf=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...l})=>{const r=Ed(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(Yf,{...l,children:n})})})),Zf=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:l,headerData:i,search:d,bgColor:m,logo:u})=>{const[h,p]=a(e.length),g=e.slice(h),f=s(null),x={rootRef:f},b=r((()=>e.map(((e,t)=>e=>{p(e?Qf(t):ex(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=u??{};return c("div",{className:"flex items-center justify-between",children:[o(Fc,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:f,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(Jf,{className:h-1<n?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(wf,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(Xf,{version:l,className:"ml-auto",search:d,navigationItems:e,...i})]})})),Qf=e=>t=>Math.max(t,e+1),ex=e=>t=>Math.min(t,e),tx={"bg-white":"primary",transparent:"transparent"},nx=["all","header"],ax=Vt((({className:e,bgColor:t="bg-white",logo:n={},version:a=tx[t],portal:l,header:i={},...r})=>{const{common:s,navigation:d}=ix(r?.options?.page),{navigationItems:m}=d,{logo:h={}}=s,[,p]=yf(m),{internetBankButton:f}=l||{},x=n.image?.icon||n.image?.src||n?.title?n:h;return o(g,{tag:"header",className:u("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:a,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(Zf,{activeTopItem:p,navigationItems:m?.filter(zg(nx)),version:a,headerData:{...i,...d},search:s.search,bgColor:t,logo:x})}),o("div",{className:u("mt-s h-px bg-main-divider",lx(a))}),p?.items?.length&&o(Of,{subItems:p?.items?.filter(zg(nx)),version:a,internetBankButton:f})]})})})),lx=e=>"transparent"===e?"opacity-30":"",ix=e=>({navigation:e?.navigation??{},common:e?.common??{}}),rx=(e=!1)=>e?{}:{padding:"p-0"},sx={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},ox=Vt((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:a=!0,version:l="transparent",isTheme:i=!1,isCardBorder:r,...s})=>o(g,{className:u("relative","grid grid-cols-12",sx[n],e),padding:t,version:l,isTheme:i,...s,children:P({...s,extraProps:{...rx(a),className:_d(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),cx=d((e=>{const{className:t,align:n,image:a,...l}=e,i=n?u("flex",Vm[n]):"";return o(g,{className:u(i,t),defaultPadding:"p-0",...l,children:o(ne,{image:a})})})),dx=(e,t=0)=>{const{itemCount:n,visibleItemCount:l}=e,[r,s]=a(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=l?n>l&&r<n-l:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};function mx({dec:e,inc:t,canDec:n,canInc:a,btnClass:l,className:i=""}){return n||a?c("div",{children:[n?o(Xd,{className:u("absolute z-40",l[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,a?o(Xd,{className:u("absolute z-40 rotate-180",l[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const ux=d((({className:e="",cards:t=[],button:n})=>{const[l,r]=a(0),s=i((e=>r(e)),[]),d=t.length,[m,u]=dx({itemCount:d,visibleItemCount:2}),{canDec:h,canInc:p}=u,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?hx({activeIndex:m,cards:t,selectedCardIndex:l,onClick:s}):null,mx({...u,btnClass:["left-12","right-12"],className:"top-16"}),h?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(Ne,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function hx({activeIndex:e,cards:t,selectedCardIndex:n,onClick:a}){const l=460*e,i=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${l}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:a}){return c("button",{type:"button",onClick:a,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ne,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?px("страховая сумма",e.sum):null,e?.fee?px("страховой взнос",e.fee):null]}),gx(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})})}function px(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Ee,{size:"text-h6",children:[He(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Ee,{size:"text-l",color:"text-secondary-text",children:e})})]})}function gx(e){return e?o(ne,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const fx=d((({className:e="",title:t,insuranceTabs:n=[],button:l,...r})=>{const[s,d]=a(0),m=i((e=>d(e)),[]);return c(g,{className:u("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:a}){return o("button",{type:"button",onClick:a,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:xx({insuranceTabs:n,button:l})})]})})),xx=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(ux,{button:t,cards:e},String(n)))):null};const bx={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},yx={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},vx=d((e=>{const{className:t="",__html:n,isDotted:a,investmentZeroColumn:l,investmentColumns:i,...r}=e,s=i?[...i]:[];return l&&s.unshift(l),o(g,{className:t,defaultPadding:"p-4xl",...r,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[pm(o("div",{className:"w-px h-4 bg-gray"}))(s.map(Nx)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Sx)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(De,{__html:n,isDotted:a,itemSize:"list-s"})}):null]})})})),Nx=(e,t,n)=>{const a=1===t,l=t===n.length-1,i=e.cells?.reverse()||[];return o("div",{className:`${wx(a,l,e.cells)}`,children:i.length?o("div",{className:"w-full "+(l?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:i.map(Cx)}):null},`column_${t}`)},wx=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),Cx=(e,t)=>{const n=e.cellSize||"XS",a=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${yx[n]} ${bx[a]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Ee,{align:"text-center",children:e.text})},`cell_${t}`):null},Sx=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,kx=["байт","Кб","Мб","Гб","Тб","Пб"],Ix=d((({icon:e,text:t,href:n,target:a,fileFormat:l,data:i,fileSize:r})=>{const s=r&&l?",":"",d=r??"",m=l?String(l):"";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:a,...fe(i),children:[e,t?c(Ee,{size:"text-l",font:"font-light",children:[t," ",Tx(d,m),o(Ee,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Tx=(e,t)=>e||t?o("span",{children:", "}):"",Rx=(e,t)=>(n,a)=>{const l=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))} ${kx[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Px(l):n?.fileFormat;return c("div",{role:"listitem",children:[o(Ix,{text:n?.text,target:n?.target,href:l,fileFormat:r,fileSize:i,icon:Bx(t),data:n?.data}),o(De,{__html:n?.__html})]},String(a))},Bx=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,Px=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),a=-1!==t?e.substring(t+1):"";return a.includes("/")?a.replace(n,""):a},_x=d((({href:e,__html:t,target:n,onClose:a})=>{const l=_(),i=U(l)(e);return c(Ki,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:a,children:[t?o(De,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(Ne,{text:"Я согласен",version:"primary",target:n,href:i,onClick:a}),o(Yi,{type:"button",version:"secondary",onClick:a,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Dx=d((({text:e,href:t,target:n,__html:a,icon:l})=>{const{open:r}=un(_x),s=i((()=>r({__html:a,href:t,target:n})),[a,t,n]);return e?c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[Bx(l),o(Ee,{font:"font-light",children:e})]}):null})),Ax={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Ex=Vt((({className:e="",title:t,description:n,align:a="text-center",documents:l,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=_();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(S,{title:t,description:n,align:a,headlineVersion:"M",as:"h2",isEmbedded:!0}),l?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Ax[r]),role:"list",children:l.map(Mx(d,i))}):null]})})),Mx=(e,t)=>(n,a)=>{const l=n?.docType;return""===l?null:"reportSource"in n&&n?.reportSource?.__html?Ox(t)(n,a):Rx(e,t)(n,a)},Ox=e=>(t,n)=>{const a={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(Dx,{...a,icon:e,href:zx(t)?t?.href:t?.attachment?.src}),o(De,{__html:t?.__html})]},String(n)):null},zx=e=>"href"in e,Vx=Vt((({className:e,padding:t,align:n="text-left",buttons:a=[],description:l,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(Re,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:je(a,{className:"flex-wrap"}),children:[l?o(Ee,{size:"text-xl","font-weight":"font-light",children:l}):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(De,{__html:r,itemSize:"list-m"}):null,o(Ee,{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]})]})})})),Fx=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Lx=(e=[],t={})=>e.filter((({content:e={}})=>wm(t,e))).length,$x=(e,t)=>e===t;const jx=(e=>(t,n)=>t===n||Boolean(t&&n&&Object.keys(t).length===Object.keys(n).length&&Object.entries(t).every((([t,a])=>e(a,n[t])))))(function(...e){return(t,n)=>e.some((e=>e(t,n)))}($x,((e=$x)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))())),Ux=[],qx={},Wx={primary:"bg-white/30",secondary:"bg-main-divider"},Hx={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Yx=d((({count:e,version:t="secondary"})=>{const n=ke(),a=n?"bg-main-divider":Wx[t],l=Hx[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",a),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Ee,{size:"text-xs",color:l,children:e})})})),Gx=({text:e,description:t,icon:n,isActive:a,type:l})=>{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"}))(a);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"===l?i.text:i.oldText,children:e}),o("div",{className:"animated"===l?i.desc:i.oldDesc,children:t})]})]})},Kx={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Xx={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Jx={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Zx={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Qx=d((({tag:e="div",item:t={},isActive:n=!1,type:a="default",onClick:l})=>{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",Kx[a],n?Zx[a]:Jx[a]),role:"tablist","aria-label":"Список табов",onClick:l,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Xx[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Gx({text:r,description:s,icon:d,isActive:n,type:a}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Yx,{count:m,version:Fx(n,a)})}):null]})})})),eb=d((e=>o(e?.item?.href?tb:nb,{...e}))),tb=d((e=>{const t=pe(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:a,...l}=t({...e.item,onClick:n});return o(Qx,{...e,tag:"a",item:l,onClick:a})})),nb=d((({item:e={},onClick:t,...n})=>{const a=i((()=>{t&&t(e)}),[t,e]);return o(Qx,{item:e,onClick:a,...n})})),ab=(e,t,n)=>(a,l)=>o(eb,{isActive:a===e,onClick:t,type:n,item:a},String(l)),lb=d((({className:e,tabsType:t="default",items:n=[],activeItem:a,onChange:l})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(ab(a,l,t))}))),ib={categories:[],extraOptions:[],propertyType:[],stage:[]},rb=Vt((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...l})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Sm(ib,{block:l.block,page:l.options?.page}),f=i(((e=ib)=>p(e)),[]),x=(({hotFilters:e=Ux,filtrationState:t=qx,blocks:n=Ux,onFiltrationStateChange:a})=>{const l=r((()=>Math.max(0,e.findIndex((e=>jx(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Lx(n,t.filter),version:Fx(t===e[l])})))),[e,n,l]),o=i((t=>{a(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[l],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:l.block?.blocks,onFiltrationStateChange:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...l,children:[o(lb,{...x}),o(fm,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(um,{blocksToRender:d,...l})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),sb=(e,t,n)=>{const a=Fx("all"===t),l=Fx("business"===t),i=(e,t,a)=>{const l=e.currentTarget===e.target&&"business"===t?r(a):a;return n(t),l},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(Yi,{"data-id":"all",onClick:t=>i(t,"all",e),version:a,children:"Для физических лиц"}),o(Yi,{"data-id":"business",onClick:t=>i(t,"business",e),version:l,children:"Для юридических лиц"})]})},ob=({__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(De,{__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(Ee,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,cb="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",db=({filters:e,field:{field:t,reset:n},onlyOffice:a,labels:l})=>{const i=a?5:6,r=(e||[]).map((e=>o(Ya,{text:l[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(_r,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:cb,children:s}),o(Dr,{className:cb,isUnfolded:e,children:d})]}),renderFoldButton:mb(n,a)})}):null})},mb=(e,t=!1)=>({isUnfolded:n,onToggle:a})=>c("div",{className:"flex space-x-lg",children:[t?o(Ne,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:a}):null,o(Ne,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:ub()})]}),ub=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),hb=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Ee,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),pb=()=>{},gb=e=>"all"===e?"block":"hidden",fb=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:l=[],renderCard:i=pb,renderRemoteWorkplaceCard:r=pb,getBalloon:s=pb,getBalloonRemoteWorkplaces:d=pb,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=dn(os),{filteredItems:b,points:y,filteredRemoteWorkplaces:v,lengthItems:N}=hs({data:t,remoteWorkplaces:l,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=a("all"),S={filters:xb([...t,...l]),field:{field:f,reset:x},onlyOffice:p,labels:cs};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[hb(h,N),m?ob(m):null,p&&sb(t,w,C),o("div",{className:u("pb-3xl",gb(w)),children:db(S)})]}),o("div",{className:"h-[600px]",children:o(xs,{children:o(Cr,{points:y,isLoad:n,className:"h-full"})})})]}),c(xs,{children:[b.map(i),v.map(r)]})]})})),xb=e=>Object.keys(os).filter((t=>e.filter((e=>ds[t](e))).length)),bb=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:l,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Nb(a)},{label:"Модуль приема наличных",value:l?"Да":"Нет"},{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(Ee,{size:"text-h4",children:Nb(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ee,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Gr,{color:"green",children:Nb(s)})})]}),o("div",{className:"hidden sm:block",children:o(zr,{className:"flex-wrap",children:m?.map(vb)})}),o(_r,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Dr,{isUnfolded:e,children:o(zr,{className:"flex-wrap",children:m?.map(vb)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ts({isUnfolded:e,onToggle:t})})]},String(d))},yb=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Nb(t)} №${n}`,body:e.toUpperCase()}),vb=(e,t)=>o(Ar,{...e},String(t)),Nb=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",wb=[];const Cb=async e=>{const t=await Pt(e,{method:"GET"});return Array.isArray(t)?t:wb},Sb={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},kb={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)},Ib=d((({descriptionData:e,className:t})=>{const n=lg(),a=n?.code??"000",{data:l,isLoad:i}=function(e){const{data:t,error:n}=Kn(`${qt}/atms?regionCode=${e}`,Cb);return{data:t||wb,isLoad:!t&&!n}}(a);return o(fb,{className:t,filterItems:Tb,data:l,isLoad:i,initFilterState:Sb,renderCard:bb,getBalloon:yb,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Tb=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),a=n.filter((e=>e.startsWith("terminalType"))),l=n.filter((e=>!a.includes(e)));return e.filter((e=>{const t=l.every((t=>kb[t](e))),n=!a.length||a.some((t=>kb[t](e)));return t&&n}))},Rb=({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(Ee,{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(Ee,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Bb({workScheduleDescription:t})}),o(_r,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Dr,{isUnfolded:e,children:Bb({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ts({isUnfolded:e,onToggle:t})})]},String(n)):null,Bb=({workScheduleDescription:e})=>c("div",{children:[c(zr,{className:"flex",children:[o(Ar,{label:"Операции для физических лиц",children:o(Ee,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Ar,{label:"Операции для физических лиц",children:o(Ee,{children:"Оформление и обслуживание банковских карт"})}),o(Ar,{label:"Операции для физических лиц",children:o(Ee,{children:"Инвестиционное и накопительное страхование"})}),o(Ar,{label:"Операции для физических лиц",children:o(Ee,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Ar,{label:"Режим работы",className:"max-w-none",children:o(Ee,{children:e})})]}),Pb=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),_b={branches:[],remoteWorkplaces:[]};const Db=async e=>await Pt(e,{method:"GET"})||_b,Ab=d((({className:e})=>{const t=lg(),n=t?.code??"000",{data:a,isLoad:l}=function(e="000"){const{data:t,error:n}=Kn(`${qt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,Db);return{data:t||_b,isLoad:!t&&!n}}(n);return o(fb,{className:e,data:a?.branches,isLoad:l,remoteWorkplaces:a?.remoteWorkplaces,renderCard:is,renderRemoteWorkplaceCard:Rb,getBalloon:ss,getBalloonRemoteWorkplaces:Pb,title:`Офисы филиала ${t?.name}`})})),Eb=d((({data:e,className:t,...n})=>{const a=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===a?o(Ab,{}):o(Ib,{descriptionData:e})})})),Mb=d((({className:e,title:t,description:n="Блок в разработке...",...a})=>c(g,{className:u("box-border",e),...a,children:[o(S,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),Ob="hidden sm:flex absolute z-40 top-10",zb=Vt((({className:e="",padding:t,slides:n=[],...l})=>{const[i,r]=a(0),[s,d]=Hd({itemCount:n?.length||0});return c(g,{className:u("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...l,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(Ze,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...l})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(Vd,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(Vb({activeSlideIndex:i,onClick:r}))}),d.canScrollLeft?o(Jd,{className:u("left-6",Ob),onClick:d.scrollLeft}):null,d.canScrollRight?o(Zd,{className:u("right-6",Ob),onClick:d.scrollRight}):null]})]})})),Vb=({activeSlideIndex:e,onClick:t})=>({nav:n},a)=>{const l=a===e,i=l?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=l?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=l?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"aria-label":n?.title,className:u("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(a))},Fb=d((({address:e,email:t,telephone:n,button:a,className:l="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",l),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[$e(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Lb({__html:i,richVersion:r}):null,$b({label:"Адрес",data:e,iconName:"GeolocationIcon"}),$b({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),$b({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?je([a]):null]})]}))),Lb=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{...e,itemSize:"list-s"})}),$b=({label:e,data:t,iconName:n,dataColor:a=""})=>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(Ee,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ee,{size:"text-xl",color:a,children:t})]})]}):null,jb=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(De,{__html:t,richVersion:n})})})),Ub=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:a,labelIcon:l})=>o(rm,{tag:"button",className:u("border-none bg-transparent items-center group/button",l?.icon?"py-xs":"py-lg"),onClick:a,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?o(Ee,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),qb=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Wb=(e=!1)=>e?"MinusIcon":"PlusIcon",Hb=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Yb=Vt((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:a="Развернуть",labelIcon:l,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=ke();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(_r,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Dr,{className:u("gap-lg",qb(m)),isUnfolded:e,children:P({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Gb({foldButtonVersion:r,label:a,labelIcon:l,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),Gb=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:a,isUnfolded:l,onToggle:i,isMobile:r=!1})=>{const s=t||(l?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?Hb(e):Wb(e))(l,r);return"accordion"===e?o(Ub,{label:s,labelIcon:n,labelIconBgVersion:a,icon:c,onToggle:i}):o(sm,{label:s,icon:l?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Kb=d((({name:e,text:t,value:n,checked:a,onChange:l,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(xn.split(" ").filter((e=>"rounded"!==e)),Wa,"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:a,onChange:e=>l?.(e.target.value),role:"radio"}),t?o(Ee,{color:"text-primary-text",children:t}):null]})}))),Xb=d((({className:e=""})=>{const[t,n]=a("option2"),l=i((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(Kb,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:l}),o(Kb,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:l})]})})),Jb=d((({data:e,fieldLabel:t,fieldValue:n,selected:a,placeholder:l="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===a));return o(Mn,{options:s,label:r,placeholder:l||a,onChange:e=>i(e.key),value:c})})),Zb=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:a=[],selectedBranch:l,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(Jb,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Jb,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:l,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Qb=["От 1 дня","До 365 дней"],ey=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ee,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(ca,{min:1,max:365,value:e,items:Qb,onChange:t})]}))),ty=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:a=[],selectedBoxSize:l,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(Jb,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Jb,{data:a,fieldLabel:"safeBoxCasesSize",selected:l,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),ny=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:a,days:l,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(Zb,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:ay(m)}),o(ey,{days:l,setDays:e=>m({days:e})}),o(ty,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:ly(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Xb,{}),o(Ne,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),ay=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},ly=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},iy=d((({days:e,tariffs:t=[]})=>{const n=sy(e,t),a="На рисунке изображена пачка листов\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:[ry("Аренда за",e),ry("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:a})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:a})})]})]})})),ry=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ee,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),sy=(e,t)=>{const n=oy(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},oy=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},cy=(e,t)=>e.find((e=>e.branchCode===t)),dy=d((e=>{const{regions:t,data:n,branches:a,onChange:i,onClick:r}=e;l((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=cy(a,n.selectedBranch),d=my(s?.safeBoxCaseVolumes),m=uy(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=hy(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(ny,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:i}),o(iy,{days:n.days,tariffs:u})]})})),my=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],uy=(e,t)=>e?.find((e=>e.volume===t)),hy=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,py=`${qt}/safeboxes`,gy=[];const fy=async e=>await Pt(e,{method:"GET"})||gy,xy=d((({title:e,footnote:t,className:n="",...l})=>{const[r,s]=a(!1),d=i((()=>s((e=>!e))),[]),[m,u]=a({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=Jl(),p=by(m.selectedRegion,h),f=function(e){const{data:t}=Kn(e?`${py}?regionCode=${e}`:null,fy);return t||gy}(p),x=i((e=>u((t=>({...t,...e})))),[u]),b=(y=cy(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:"",...l,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(dy,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Cr,{points:b,className:"h-[640px]"}):null]})})),by=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,yy=e=>e<4?"w-72":"w-52",vy={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"},Ny=d((({buttons:e,className:t="",description:n,showLines:a=!0,steps:l=[],stepVersion:i="gray",title:r,version:s="primary",...d})=>{const m=l.length>3,h=vy,p=(e=>e?"":"opacity-0")(a),f=ke();return c(g,{className:u("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(S,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:Bm(f)}),l?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:u("flex items-center",m?"px-16":"px-24"),children:pm(o("div",{className:u("h-0.5 w-full bg-secondary-light flex-1",p)}))(l.map(wy(h,m,i)))}),o("div",{className:u("flex justify-between",m?"gap-x-s":"gap-x-20"),children:l.map((x={styleMap:h,version:s},(e,t,n)=>{const{styleMap:a,version:l}=x,{label:i,description:r,button:s,isDotted:d}=e;return c("div",{className:u("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",yy(n.length)),children:[c("div",{className:"space-y-xs",children:[i?o(Ee,{size:"text-h6",align:"text-center",children:i}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:a.description,children:r}):null,o(De,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(Ne,{className:"box-border py-s w-full mt-auto",version:l,...s,children:s?.text}):null]},String(t))}))})]}):null,je(e)]});var x})),wy=(e,t,n)=>({icon:a},l)=>{const i="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${Cy(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:$e(a)?o(ne,{image:{...a,iconVersion:a?.iconVersion||i},width:"48",height:"48"}):o("span",{className:u("text-h4","transparent"===n?e.iconText:(r=n,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:l+1})},String(l));var r},Cy=e=>e?"h-16 w-16":"h-24 w-24",Sy=d((()=>o("div",{className:"hidden",role:"none"}))),ky="hidden sm:flex absolute z-40",Iy={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Ty=d((({className:e,items:t=[],activeItem:n,onChange:a,tabsType:i="default"})=>{const[r,s]=Hd({itemCount:t?.length||0});return l((()=>Ry(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(Vd,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Iy[i].item,gap:Iy[i].gap,children:t.map(ab(n,a,i))}),s.canScrollLeft?o(Jd,{className:u("left-6",ky,Iy[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(Zd,{className:u("right-6",ky,Iy[i].buttonTop),onClick:s.scrollRight}):null]})})),Ry=(e,t,n)=>{const a=t.findIndex((e=>e===n));e&&a>0&&e.scrollTo({left:e?.children[a]?.offsetLeft,behavior:"smooth"})},By={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Py=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(By[t].wrapper,e),children:o(Ty,{className:By[t].component,tabsType:t,...n})}):null,_y=Vt((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=Dy(n??{}),p=_(),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]=a(My(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)));l((()=>{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 C=Ey(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:[Py({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Ay(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])=>B(t,{...m?.options,slotName:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Ey)?.filter(Boolean)||[]}),Dy=({__id:e,anchor:t})=>t??e??"tabs",Ay=(e,t)=>t?.length?t:e,Ey=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",My=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Oy={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},zy=d((({children:e,activeIndex:t,columnWidth:n,version:a="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Oy[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Vy=d((({className:e="",isOpen:t,onClick:n})=>o(Ne,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),Fy={Buttons:({buttons:e})=>je(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(De,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Ee,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Ee,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:a,isOpen:l})=>e?o(Vy,{className:"w-fit",isOpen:l,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},Ly=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=a(!0);l((()=>{i===o&&s||m(!0)}),[s,o]);return $y({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),$y=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in Fy))return null;return o(Fy[n],{...t,...a})},jy=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:l,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(Ly,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:l,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Uy=(e,t)=>140*Zg(e.slice(0,t).map((e=>e?.cols?.length??1))),qy=(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(Ee,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Wy=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,a]=dx({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((l=n,(e,t)=>{if(!e?.length)return null;const[n,...a]=e,i=u("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Ee,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${Uy(a,l)}px)`},children:a?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ee,{size:"text-xl",children:e.data}):null,e?.cols?qy(e.cols,l):null]},`row${t}`)))})})]},String(t))})),mx({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var l})),Hy=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const a=`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(Ee,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(Wy,{rows:t.rowsData})})})]},a)}))}))),Yy=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Gy=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:a})=>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:()=>a(t),children:o(Ee,{size:"text-xl",font:"font-light",color:Yy(t===n),children:e||t+1})},e)))}):null,t?o(Ne,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),Ky=Vt((({tableSource:e,pdfUrl:t,onClick:n})=>{const l=e?.tableData,[r,s]=a(0),d=i((e=>s(e)),[]),m=l?.[r]?.items??[],u=l?.map((e=>e.currency??""));return c("div",l?{className:"bg-white z-10",children:[o(Gy,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Hy,{activeTabIndex:r,items:m}),o(Vy,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ee,{size:"text-h6",children:"Данных нет"}),o(Vy,{onClick:n,isOpen:!0})]})})),Xy=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(Ky,{...t,onClick:n})}):null]}))),Jy=d((({row:{header:e,data:t},activeIndex:n,rowIdx:l,...r})=>{const[s,d]=a(void 0),m=i((e=>d(e)),[]),[h,p]=a(void 0),g=i((e=>p(e)),[]);return c(Xy,{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(Ee,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(zy,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(jy,{cells:e,rowIdx:l,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),Zy=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,mx({...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]})})),Qy=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:l,hiddenRowsNum:i=0,...r})=>{const s=l?.map((({data:e})=>e))||[],d=a?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,p]=dx({itemCount:m,visibleItemCount:2}),f=(d||[]).map(((e,t)=>o(Jy,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,b]=i>0?[f.slice(0,-i),f.slice(-i)]:[f,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:i>0?o(_r,{renderFoldableSection:({isUnfolded:e})=>c(Zy,{controls:p,children:[x,o(Dr,{isUnfolded:e,children:b})]}),renderFoldButton:om}):o(Zy,{controls:p,children:f})})]})})),ev=d((({className:e="",title:t,description:n,iconVersion:a,__html:l,richVersion:i,...r})=>c(g,{className:u("flex gap-s sm:gap-m group-data-secondary:bg-primary-main/10",e),...r,children:["small"===a?tv():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ee,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?nv(n):null,l?o(De,{richVersion:i,__html:l}):null]})]}))),tv=()=>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"}),nv=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),av=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(Ee,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Ee,{size:"text-h2",children:n})}):null]}))),lv=d((e=>{const{prefix:t,unit:n,suffix:a,...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(av,{prefix:t,unit:n,suffix:a})})})),iv=Vt((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:a=!0,version:l="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=_();return o(g,{className:u("relative flex flex-col",sx[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:l,isTheme:i,...c,children:P({...c,extraProps:{className:u("w-full",_d(r)),...rx(a)}})})}),{childrenTypes:[]}),rv=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(9),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",sv=d((({className:e,title:t,url:n,previewImg:a,...l})=>{const i=_();return c(g,{className:e,defaultPadding:rv(e),...l,children:[o(S,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:U(i)(a?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:U(i)(n)})}):null]})})),ov={AdTile:Lt,ApplicationForm:ir,ApplicationLeadForm:Bd,BankAccountFiltration:Tm,BenefitsBlock:Dm,BonusBenefitsBlock:zm,ButtonsBlock:Fm,CalculatorBonus:Hm,CalculatorBusinessDeposit:nu,CalculatorCredit:bo,CalculatorDeposit:vu,CalculatorRefinancing:Ru,CardTransfer:Mu,Carousel:Uu,CarouselCard:Yu,CarouselCatalogCard:Ku,CarouselLinks:Zu,CarouselRecommendationCard:rh,CarouselTariffsCard:dh,ContactsBlock:uh,CreditCardForm:sp,CreditForm:Ap,DepositFiltration:Vp,Depository:eg,ErrorBlock:ng,ExchangeRateTile:Ag,Footer:hf,GracePeriod:pf,GrantSupport:bf,Header:ax,Headline:S,HorizontalLayout:ox,ImgBlock:cx,InsuranceAmountBlock:fx,InvestmentInfo:vx,LinkDocs:Ex,MobileAppTile:Vx,MortgageFiltration:rb,OfficesAtmsMap:Eb,Placeholder:Mb,ProductBlock:Ft,ProductGallery:zb,RepresentativeOfficeInfo:Fb,RichTextBlock:jb,RollupItem:Yb,SafeDepositRental:xy,StepsBlock:Ny,StickyBottomMenu:Sy,TabsLayout:_y,TariffsTable:Qy,TextBlock:ev,UnitBlock:lv,VerticalLayout:iv,Video:sv},cv=ce((()=>{l((()=>{Qt()}),[]);const e=tn();hn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const a=JSON.parse(n?.dataset?.aspects??"[]");Xt({aspectsAttributes:a,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),dv="cookie",mv=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=nn();Kg((()=>{globalThis.localStorage?.getItem(dv)||n()}),[],3e3);const l=i((()=>{globalThis.localStorage?.setItem(dv,"true"),a()}),[]);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(De,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Gi,{className:"bg-main-gray rounded-md w-11 h-11",onClose:l})})]})}):null}));function uv(e){const t=i((({key:t})=>{"Escape"===t&&e()}),[e]);hn(globalThis.document,"keydown",t)}function hv(e,t,n){l((()=>e.subscribe(t,(e=>{const t=e?.type;if(t&&"string"==typeof t){const a=n[t];a&&a(e)}}))),[e,t,...Object.values(n)])}const pv=()=>{const[e,{push:t,pop:n,clear:l}]=function(e=[]){const[t,n]=a(e),l=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:l,pop:r,remove:s,clear:o}]}();return hv(ue.observable,"dialog",{open:t,close:n,closeAll:l}),[e,{close:n,closeAll:l}]},gv=d((()=>{const[e,{close:t}]=pv(),n=Boolean(e.length);return uv(t),l((()=>{n?globalThis.document?.body.classList.add("no-scrollbar","overflow-hidden"):globalThis.document?.body.classList.remove("no-scrollbar","overflow-hidden")}),[n]),n?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:e.map((({dialog:t,id:n},a)=>o("div",{className:u("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:a!==e.length-1}),children:t},String(n||a))))}):null})),fv=d((()=>{const[e,t]=a(null),n=i((()=>{t(null)}),[]);return hv(ue.observable,"popup",{open:t,close:n}),uv(n),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})),xv="header",bv="footer",yv="sticky-footer",vv={},Nv=d((({className:e,data:t=vv,blocksRegistry:n,blockDecorator:a})=>{const{slots:l,blocks:i,fallback:r,...s}=t,d=Ot(s,r);cv(),ig();const m={key:"",page:{slots:l,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:a,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:u("@container relative",t.style,e),children:[l?.[xv]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:B(l?.[xv],{...m,slotName:xv})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[P({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),B(l?.[bv],{...m,slotName:bv})]})]}),l?.[yv]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:B(l?.[yv],{...m,slotName:yv})}):null,o(gv,{}),o(fv,{}),o(mv,{__html:d?.cookieContent?.__html})]})}));Object.assign(Nv,{childrenTypes:[],slots:()=>[xv,bv,yv]});e.Blocks=ov,e.ContentPage=Nv,e.handlerDecorator=ce,e.joinList=pm,e.locationNavigator=Jt,e.packageVersion="0.14.737",e.projectSettings=A,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=_,Object.defineProperty(e,"__esModule",{value:!0})}));