@redneckz/wildless-cms-uni-blocks 0.14.751 → 0.14.753
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.
- package/bundle/api/RetailAPI/getTraceId.d.ts +1 -0
- package/bundle/bundle.umd.js +130 -134
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/OfficesAtmsMap/FiltrationForm.d.ts +0 -2
- package/bundle/components/RollupItem/RollupItem.d.ts +0 -4
- package/bundle/ui-kit/Button/Button.d.ts +7 -3
- package/bundle/ui-kit/Button/ButtonTitle.d.ts +5 -0
- package/bundle/ui-kit/Button/SubmitButton.d.ts +5 -0
- package/bundle/ui-kit/ControlStateProps.d.ts +0 -1
- package/bundle/ui-kit/DraftDialog/utils.d.ts +11 -1
- package/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +4 -11
- package/bundle/ui-kit/Foldable/Foldable.d.ts +2 -1
- package/bundle/ui-kit/Icon/IconProps.d.ts +12 -0
- package/bundle/ui-kit/Icon/ToggleIcon.d.ts +6 -0
- package/bundle/ui-kit/Input/InputPopup.d.ts +2 -1
- package/dist/api/RetailAPI/doRequest.js +5 -0
- package/dist/api/RetailAPI/doRequest.js.map +1 -1
- package/dist/api/RetailAPI/getGenderFromName.js +7 -5
- package/dist/api/RetailAPI/getGenderFromName.js.map +1 -1
- package/dist/api/RetailAPI/getTraceId.d.ts +1 -0
- package/dist/api/RetailAPI/getTraceId.js +9 -0
- package/dist/api/RetailAPI/getTraceId.js.map +1 -0
- package/dist/components/ApplicationForm/renderAgreementSubmit.js +2 -2
- package/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
- package/dist/components/ApplicationLeadForm/GroupedConsents.js +3 -2
- package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/dist/components/ApplicationLeadForm/renderSubmitButton.js +2 -3
- package/dist/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
- package/dist/components/CardTransfer/CardTransfer.js +2 -2
- package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +5 -9
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/dist/components/CreditCardForm/StepsNavigationButtons.js +2 -1
- package/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/dist/components/CreditForm/StepsNavigationButtons.js +2 -1
- package/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/dist/components/Depository/DepositoryItem.js +2 -2
- package/dist/components/Depository/DepositoryItem.js.map +1 -1
- package/dist/components/OfficesAtmsMap/FiltrationForm.d.ts +0 -2
- package/dist/components/OfficesAtmsMap/FiltrationForm.js +5 -6
- package/dist/components/OfficesAtmsMap/FiltrationForm.js.map +1 -1
- package/dist/components/OfficesAtmsMap/FoldableCardContent.js +2 -2
- package/dist/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderAtmCard.js +1 -2
- package/dist/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
- package/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +1 -1
- package/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
- package/dist/components/RollupItem/RollupItem.d.ts +0 -4
- package/dist/components/RollupItem/RollupItem.js +4 -20
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js +2 -2
- package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +1 -1
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/ui-kit/BaseFiltration/GridBlocks.js +2 -2
- package/dist/ui-kit/BaseFiltration/GridBlocks.js.map +1 -1
- package/dist/ui-kit/Button/Button.d.ts +7 -3
- package/dist/ui-kit/Button/Button.js +15 -17
- package/dist/ui-kit/Button/Button.js.map +1 -1
- package/dist/ui-kit/Button/ButtonTitle.d.ts +5 -0
- package/dist/ui-kit/Button/ButtonTitle.js +7 -0
- package/dist/ui-kit/Button/ButtonTitle.js.map +1 -0
- package/dist/ui-kit/Button/SubmitButton.d.ts +5 -0
- package/dist/ui-kit/Button/SubmitButton.js +8 -0
- package/dist/ui-kit/Button/SubmitButton.js.map +1 -0
- package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +2 -1
- package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/dist/ui-kit/ControlStateProps.d.ts +0 -1
- package/dist/ui-kit/DraftDialog/parseDraftTask.js +2 -2
- package/dist/ui-kit/DraftDialog/parseDraftTask.js.map +1 -1
- package/dist/ui-kit/DraftDialog/utils.d.ts +11 -1
- package/dist/ui-kit/DraftDialog/utils.js +13 -3
- package/dist/ui-kit/DraftDialog/utils.js.map +1 -1
- package/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +4 -11
- package/dist/ui-kit/Foldable/DefaultFoldButton.js +5 -12
- package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/dist/ui-kit/Foldable/Foldable.d.ts +2 -1
- package/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/dist/ui-kit/Icon/Icon.js +16 -11
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/Icon/IconProps.d.ts +12 -0
- package/dist/ui-kit/Icon/RoundedIcon.js +1 -1
- package/dist/ui-kit/Icon/RoundedIcon.js.map +1 -1
- package/dist/ui-kit/Icon/ToggleIcon.d.ts +6 -0
- package/dist/ui-kit/Icon/ToggleIcon.js +7 -0
- package/dist/ui-kit/Icon/ToggleIcon.js.map +1 -0
- package/dist/ui-kit/Input/InputPopup.d.ts +2 -1
- package/dist/ui-kit/Input/InputPopup.js +29 -1
- package/dist/ui-kit/Input/InputPopup.js.map +1 -1
- package/dist/ui-kit/Input/useInputPopup.js +4 -3
- package/dist/ui-kit/Input/useInputPopup.js.map +1 -1
- package/dist/ui-kit/Loader/Loader.js +1 -1
- package/dist/ui-kit/Loader/Loader.js.map +1 -1
- package/dist/ui-kit/Sitemap/Sitemap.mobile.js +14 -2
- package/dist/ui-kit/Sitemap/Sitemap.mobile.js.map +1 -1
- package/lib/api/RetailAPI/doRequest.js +5 -0
- package/lib/api/RetailAPI/doRequest.js.map +1 -1
- package/lib/api/RetailAPI/getGenderFromName.js +7 -5
- package/lib/api/RetailAPI/getGenderFromName.js.map +1 -1
- package/lib/api/RetailAPI/getTraceId.d.ts +1 -0
- package/lib/api/RetailAPI/getTraceId.js +6 -0
- package/lib/api/RetailAPI/getTraceId.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/renderAgreementSubmit.js +2 -2
- package/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
- package/lib/components/ApplicationLeadForm/GroupedConsents.js +3 -2
- package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/lib/components/ApplicationLeadForm/renderSubmitButton.js +2 -3
- package/lib/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
- package/lib/components/CardTransfer/CardTransfer.js +2 -2
- package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -10
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/lib/components/CreditCardForm/StepsNavigationButtons.js +2 -1
- package/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/lib/components/CreditForm/StepsNavigationButtons.js +2 -1
- package/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/lib/components/Depository/DepositoryItem.js +2 -2
- package/lib/components/Depository/DepositoryItem.js.map +1 -1
- package/lib/components/OfficesAtmsMap/FiltrationForm.d.ts +0 -2
- package/lib/components/OfficesAtmsMap/FiltrationForm.js +4 -4
- package/lib/components/OfficesAtmsMap/FiltrationForm.js.map +1 -1
- package/lib/components/OfficesAtmsMap/FoldableCardContent.js +2 -2
- package/lib/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderAtmCard.js +1 -2
- package/lib/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
- package/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +1 -1
- package/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.d.ts +0 -4
- package/lib/components/RollupItem/RollupItem.js +4 -20
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js +2 -2
- package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +2 -2
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/ui-kit/BaseFiltration/GridBlocks.js +2 -2
- package/lib/ui-kit/BaseFiltration/GridBlocks.js.map +1 -1
- package/lib/ui-kit/Button/Button.d.ts +7 -3
- package/lib/ui-kit/Button/Button.js +16 -18
- package/lib/ui-kit/Button/Button.js.map +1 -1
- package/lib/ui-kit/Button/ButtonTitle.d.ts +5 -0
- package/lib/ui-kit/Button/ButtonTitle.js +5 -0
- package/lib/ui-kit/Button/ButtonTitle.js.map +1 -0
- package/lib/ui-kit/Button/SubmitButton.d.ts +5 -0
- package/lib/ui-kit/Button/SubmitButton.js +6 -0
- package/lib/ui-kit/Button/SubmitButton.js.map +1 -0
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +2 -1
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/lib/ui-kit/ControlStateProps.d.ts +0 -1
- package/lib/ui-kit/DraftDialog/parseDraftTask.js +3 -3
- package/lib/ui-kit/DraftDialog/parseDraftTask.js.map +1 -1
- package/lib/ui-kit/DraftDialog/utils.d.ts +14 -4
- package/lib/ui-kit/DraftDialog/utils.js +12 -2
- package/lib/ui-kit/DraftDialog/utils.js.map +1 -1
- package/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +4 -11
- package/lib/ui-kit/Foldable/DefaultFoldButton.js +5 -11
- package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/lib/ui-kit/Foldable/Foldable.d.ts +2 -1
- package/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/ui-kit/Icon/Icon.js +16 -11
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/Icon/IconProps.d.ts +12 -0
- package/lib/ui-kit/Icon/RoundedIcon.js +1 -1
- package/lib/ui-kit/Icon/RoundedIcon.js.map +1 -1
- package/lib/ui-kit/Icon/ToggleIcon.d.ts +6 -0
- package/lib/ui-kit/Icon/ToggleIcon.js +5 -0
- package/lib/ui-kit/Icon/ToggleIcon.js.map +1 -0
- package/lib/ui-kit/Input/InputPopup.d.ts +2 -1
- package/lib/ui-kit/Input/InputPopup.js +29 -1
- package/lib/ui-kit/Input/InputPopup.js.map +1 -1
- package/lib/ui-kit/Input/useInputPopup.js +4 -3
- package/lib/ui-kit/Input/useInputPopup.js.map +1 -1
- package/lib/ui-kit/Loader/Loader.js +1 -1
- package/lib/ui-kit/Loader/Loader.js.map +1 -1
- package/lib/ui-kit/Sitemap/Sitemap.mobile.js +15 -3
- package/lib/ui-kit/Sitemap/Sitemap.mobile.js.map +1 -1
- package/mobile/bundle/api/RetailAPI/getTraceId.d.ts +1 -0
- package/mobile/bundle/bundle.umd.js +147 -146
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/OfficesAtmsMap/FiltrationForm.d.ts +0 -2
- package/mobile/bundle/components/RollupItem/RollupItem.d.ts +0 -4
- package/mobile/bundle/ui-kit/Button/Button.d.ts +7 -3
- package/mobile/bundle/ui-kit/Button/ButtonTitle.d.ts +5 -0
- package/mobile/bundle/ui-kit/Button/SubmitButton.d.ts +5 -0
- package/mobile/bundle/ui-kit/ControlStateProps.d.ts +0 -1
- package/mobile/bundle/ui-kit/DraftDialog/utils.d.ts +11 -1
- package/mobile/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +4 -11
- package/mobile/bundle/ui-kit/Foldable/Foldable.d.ts +2 -1
- package/mobile/bundle/ui-kit/Icon/IconProps.d.ts +12 -0
- package/mobile/bundle/ui-kit/Icon/ToggleIcon.d.ts +6 -0
- package/mobile/bundle/ui-kit/Input/InputPopup.d.ts +2 -1
- package/mobile/dist/api/RetailAPI/doRequest.js +5 -0
- package/mobile/dist/api/RetailAPI/doRequest.js.map +1 -1
- package/mobile/dist/api/RetailAPI/getGenderFromName.js +7 -5
- package/mobile/dist/api/RetailAPI/getGenderFromName.js.map +1 -1
- package/mobile/dist/api/RetailAPI/getTraceId.d.ts +1 -0
- package/mobile/dist/api/RetailAPI/getTraceId.js +9 -0
- package/mobile/dist/api/RetailAPI/getTraceId.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js +2 -2
- package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +3 -2
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/renderSubmitButton.js +2 -3
- package/mobile/dist/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
- package/mobile/dist/components/CardTransfer/CardTransfer.js +2 -2
- package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +5 -9
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js +2 -1
- package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.js +2 -1
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/dist/components/Depository/DepositoryItem.js +2 -2
- package/mobile/dist/components/Depository/DepositoryItem.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/FiltrationForm.d.ts +0 -2
- package/mobile/dist/components/OfficesAtmsMap/FiltrationForm.js +5 -6
- package/mobile/dist/components/OfficesAtmsMap/FiltrationForm.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/FoldableCardContent.js +2 -2
- package/mobile/dist/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderAtmCard.js +1 -2
- package/mobile/dist/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
- package/mobile/dist/components/RollupItem/RollupItem.d.ts +0 -4
- package/mobile/dist/components/RollupItem/RollupItem.js +4 -20
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js +2 -2
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/GridBlocks.js +2 -2
- package/mobile/dist/ui-kit/BaseFiltration/GridBlocks.js.map +1 -1
- package/mobile/dist/ui-kit/Button/Button.d.ts +7 -3
- package/mobile/dist/ui-kit/Button/Button.js +15 -17
- package/mobile/dist/ui-kit/Button/Button.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonTitle.d.ts +5 -0
- package/mobile/dist/ui-kit/Button/ButtonTitle.js +7 -0
- package/mobile/dist/ui-kit/Button/ButtonTitle.js.map +1 -0
- package/mobile/dist/ui-kit/Button/SubmitButton.d.ts +5 -0
- package/mobile/dist/ui-kit/Button/SubmitButton.js +8 -0
- package/mobile/dist/ui-kit/Button/SubmitButton.js.map +1 -0
- package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +2 -1
- package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/mobile/dist/ui-kit/ControlStateProps.d.ts +0 -1
- package/mobile/dist/ui-kit/DraftDialog/parseDraftTask.js +2 -2
- package/mobile/dist/ui-kit/DraftDialog/parseDraftTask.js.map +1 -1
- package/mobile/dist/ui-kit/DraftDialog/utils.d.ts +11 -1
- package/mobile/dist/ui-kit/DraftDialog/utils.js +13 -3
- package/mobile/dist/ui-kit/DraftDialog/utils.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +4 -11
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +5 -12
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +2 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.js +16 -11
- package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/IconProps.d.ts +12 -0
- package/mobile/dist/ui-kit/Icon/RoundedIcon.js +1 -1
- package/mobile/dist/ui-kit/Icon/RoundedIcon.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/ToggleIcon.d.ts +6 -0
- package/mobile/dist/ui-kit/Icon/ToggleIcon.js +7 -0
- package/mobile/dist/ui-kit/Icon/ToggleIcon.js.map +1 -0
- package/mobile/dist/ui-kit/Input/InputPopup.d.ts +2 -1
- package/mobile/dist/ui-kit/Input/InputPopup.js +29 -1
- package/mobile/dist/ui-kit/Input/InputPopup.js.map +1 -1
- package/mobile/dist/ui-kit/Input/useInputPopup.js +4 -3
- package/mobile/dist/ui-kit/Input/useInputPopup.js.map +1 -1
- package/mobile/dist/ui-kit/Loader/Loader.js +1 -1
- package/mobile/dist/ui-kit/Loader/Loader.js.map +1 -1
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js +14 -2
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/lib/api/RetailAPI/doRequest.js +5 -0
- package/mobile/lib/api/RetailAPI/doRequest.js.map +1 -1
- package/mobile/lib/api/RetailAPI/getGenderFromName.js +7 -5
- package/mobile/lib/api/RetailAPI/getGenderFromName.js.map +1 -1
- package/mobile/lib/api/RetailAPI/getTraceId.d.ts +1 -0
- package/mobile/lib/api/RetailAPI/getTraceId.js +6 -0
- package/mobile/lib/api/RetailAPI/getTraceId.js.map +1 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js +2 -2
- package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +3 -2
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/renderSubmitButton.js +2 -3
- package/mobile/lib/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
- package/mobile/lib/components/CardTransfer/CardTransfer.js +2 -2
- package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -10
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js +2 -1
- package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.js +2 -1
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/lib/components/Depository/DepositoryItem.js +2 -2
- package/mobile/lib/components/Depository/DepositoryItem.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/FiltrationForm.d.ts +0 -2
- package/mobile/lib/components/OfficesAtmsMap/FiltrationForm.js +4 -4
- package/mobile/lib/components/OfficesAtmsMap/FiltrationForm.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/FoldableCardContent.js +2 -2
- package/mobile/lib/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderAtmCard.js +1 -2
- package/mobile/lib/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
- package/mobile/lib/components/RollupItem/RollupItem.d.ts +0 -4
- package/mobile/lib/components/RollupItem/RollupItem.js +4 -20
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js +2 -2
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.js +2 -2
- package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/GridBlocks.js +2 -2
- package/mobile/lib/ui-kit/BaseFiltration/GridBlocks.js.map +1 -1
- package/mobile/lib/ui-kit/Button/Button.d.ts +7 -3
- package/mobile/lib/ui-kit/Button/Button.js +16 -18
- package/mobile/lib/ui-kit/Button/Button.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonTitle.d.ts +5 -0
- package/mobile/lib/ui-kit/Button/ButtonTitle.js +5 -0
- package/mobile/lib/ui-kit/Button/ButtonTitle.js.map +1 -0
- package/mobile/lib/ui-kit/Button/SubmitButton.d.ts +5 -0
- package/mobile/lib/ui-kit/Button/SubmitButton.js +6 -0
- package/mobile/lib/ui-kit/Button/SubmitButton.js.map +1 -0
- package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +2 -1
- package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/mobile/lib/ui-kit/ControlStateProps.d.ts +0 -1
- package/mobile/lib/ui-kit/DraftDialog/parseDraftTask.js +3 -3
- package/mobile/lib/ui-kit/DraftDialog/parseDraftTask.js.map +1 -1
- package/mobile/lib/ui-kit/DraftDialog/utils.d.ts +11 -1
- package/mobile/lib/ui-kit/DraftDialog/utils.js +12 -2
- package/mobile/lib/ui-kit/DraftDialog/utils.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +4 -11
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +5 -11
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +2 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.js +16 -11
- package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/IconProps.d.ts +12 -0
- package/mobile/lib/ui-kit/Icon/RoundedIcon.js +1 -1
- package/mobile/lib/ui-kit/Icon/RoundedIcon.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/ToggleIcon.d.ts +6 -0
- package/mobile/lib/ui-kit/Icon/ToggleIcon.js +5 -0
- package/mobile/lib/ui-kit/Icon/ToggleIcon.js.map +1 -0
- package/mobile/lib/ui-kit/Input/InputPopup.d.ts +2 -1
- package/mobile/lib/ui-kit/Input/InputPopup.js +29 -1
- package/mobile/lib/ui-kit/Input/InputPopup.js.map +1 -1
- package/mobile/lib/ui-kit/Input/useInputPopup.js +4 -3
- package/mobile/lib/ui-kit/Input/useInputPopup.js.map +1 -1
- package/mobile/lib/ui-kit/Loader/Loader.js +1 -1
- package/mobile/lib/ui-kit/Loader/Loader.js.map +1 -1
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js +15 -3
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/src/api/RetailAPI/doRequest.ts +6 -0
- package/mobile/src/api/RetailAPI/getGenderFromName.ts +7 -10
- package/mobile/src/api/RetailAPI/getTraceId.ts +6 -0
- package/mobile/src/components/ApplicationForm/renderAgreementSubmit.tsx +5 -2
- package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +5 -2
- package/mobile/src/components/ApplicationLeadForm/renderSubmitButton.tsx +3 -4
- package/mobile/src/components/CardTransfer/CardTransfer.tsx +3 -3
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +19 -27
- package/mobile/src/components/CreditCardForm/StepsNavigationButtons.tsx +3 -2
- package/mobile/src/components/CreditForm/StepsNavigationButtons.tsx +3 -2
- package/mobile/src/components/Depository/DepositoryItem.tsx +2 -2
- package/mobile/src/components/OfficesAtmsMap/FiltrationForm.tsx +17 -29
- package/mobile/src/components/OfficesAtmsMap/FoldableCardContent.tsx +14 -5
- package/mobile/src/components/OfficesAtmsMap/renderAtmCard.tsx +5 -6
- package/mobile/src/components/OfficesAtmsMap/renderOfficeCard.tsx +0 -1
- package/mobile/src/components/OfficesAtmsMap/renderRemoteWorkplaceCard.tsx +0 -1
- package/mobile/src/components/RollupItem/RollupItem.tsx +14 -61
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +2 -2
- package/mobile/src/components/TariffsTable/TariffsTable.tsx +2 -2
- package/mobile/src/ui-kit/BaseFiltration/GridBlocks.tsx +5 -5
- package/mobile/src/ui-kit/Button/Button.tsx +60 -44
- package/mobile/src/ui-kit/Button/ButtonTitle.tsx +17 -0
- package/mobile/src/ui-kit/Button/SubmitButton.tsx +14 -0
- package/mobile/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +6 -8
- package/mobile/src/ui-kit/ControlStateProps.ts +0 -1
- package/mobile/src/ui-kit/DraftDialog/parseDraftTask.ts +4 -2
- package/mobile/src/ui-kit/DraftDialog/utils.ts +18 -3
- package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +16 -51
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +4 -3
- package/mobile/src/ui-kit/Icon/Icon.tsx +21 -15
- package/mobile/src/ui-kit/Icon/IconProps.ts +13 -0
- package/mobile/src/ui-kit/Icon/RoundedIcon.tsx +1 -1
- package/mobile/src/ui-kit/Icon/ToggleIcon.tsx +11 -0
- package/mobile/src/ui-kit/Input/InputPopup.tsx +52 -18
- package/mobile/src/ui-kit/Input/useInputPopup.tsx +11 -3
- package/mobile/src/ui-kit/Loader/Loader.tsx +1 -1
- package/mobile/src/ui-kit/Sitemap/Sitemap.tsx +40 -8
- package/package.json +1 -1
- package/src/api/RetailAPI/doRequest.ts +6 -0
- package/src/api/RetailAPI/getGenderFromName.ts +7 -10
- package/src/api/RetailAPI/getTraceId.ts +6 -0
- package/src/components/ApplicationForm/renderAgreementSubmit.tsx +5 -2
- package/src/components/ApplicationLeadForm/GroupedConsents.tsx +5 -2
- package/src/components/ApplicationLeadForm/renderSubmitButton.tsx +3 -4
- package/src/components/CardTransfer/CardTransfer.tsx +3 -3
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +19 -27
- package/src/components/CreditCardForm/StepsNavigationButtons.tsx +3 -2
- package/src/components/CreditForm/StepsNavigationButtons.tsx +3 -2
- package/src/components/Depository/DepositoryItem.tsx +2 -2
- package/src/components/OfficesAtmsMap/FiltrationForm.tsx +17 -29
- package/src/components/OfficesAtmsMap/FoldableCardContent.tsx +14 -5
- package/src/components/OfficesAtmsMap/renderAtmCard.tsx +5 -6
- package/src/components/OfficesAtmsMap/renderOfficeCard.tsx +0 -1
- package/src/components/OfficesAtmsMap/renderRemoteWorkplaceCard.tsx +0 -1
- package/src/components/RollupItem/RollupItem.fixture.mobile.tsx +1 -12
- package/src/components/RollupItem/RollupItem.tsx +14 -61
- package/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +2 -2
- package/src/components/TariffsTable/TariffsTable.tsx +2 -2
- package/src/ui-kit/BaseFiltration/GridBlocks.tsx +5 -5
- package/src/ui-kit/Button/Button.fixture.tsx +0 -8
- package/src/ui-kit/Button/Button.tsx +60 -44
- package/src/ui-kit/Button/ButtonTitle.tsx +17 -0
- package/src/ui-kit/Button/SubmitButton.tsx +14 -0
- package/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +6 -8
- package/src/ui-kit/ControlStateProps.ts +0 -1
- package/src/ui-kit/DraftDialog/parseDraftTask.ts +4 -2
- package/src/ui-kit/DraftDialog/utils.ts +18 -3
- package/src/ui-kit/Foldable/DefaultFoldButton.tsx +16 -51
- package/src/ui-kit/Foldable/Foldable.tsx +4 -3
- package/src/ui-kit/Icon/Icon.tsx +21 -15
- package/src/ui-kit/Icon/IconProps.ts +13 -0
- package/src/ui-kit/Icon/RoundedIcon.tsx +1 -1
- package/src/ui-kit/Icon/ToggleIcon.tsx +11 -0
- package/src/ui-kit/Input/InputPopup.tsx +52 -18
- package/src/ui-kit/Input/useInputPopup.tsx +11 -3
- package/src/ui-kit/Loader/Loader.tsx +1 -1
- package/src/ui-kit/Sitemap/Sitemap.mobile.tsx +40 -8
- package/bundle/components/ApplicationForm/renderSubmitButton.d.ts +0 -2
- package/bundle/components/OfficesAtmsMap/renderFoldButton.d.ts +0 -3
- package/bundle/components/RollupItem/AccordionFoldButton.d.ts +0 -12
- package/bundle/components/RollupItem/getIconName.d.ts +0 -1
- package/bundle/components/RollupItem/renderRoundedIcon.d.ts +0 -3
- package/bundle/components/RollupItem/renderRoundedIcon.mobile.d.ts +0 -3
- package/bundle/components/RollupItem/rollupIconVersion.mobile.d.ts +0 -1
- package/bundle/ui-kit/Button/IconButton.d.ts +0 -10
- package/bundle/ui-kit/Button/useButton.d.ts +0 -2
- package/bundle/ui-kit/TextWithIcon/TextWithIcon.d.ts +0 -13
- package/dist/components/ApplicationForm/renderSubmitButton.d.ts +0 -2
- package/dist/components/ApplicationForm/renderSubmitButton.js +0 -8
- package/dist/components/ApplicationForm/renderSubmitButton.js.map +0 -1
- package/dist/components/OfficesAtmsMap/renderFoldButton.d.ts +0 -3
- package/dist/components/OfficesAtmsMap/renderFoldButton.js +0 -7
- package/dist/components/OfficesAtmsMap/renderFoldButton.js.map +0 -1
- package/dist/components/RollupItem/AccordionFoldButton.d.ts +0 -12
- package/dist/components/RollupItem/AccordionFoldButton.js +0 -11
- package/dist/components/RollupItem/AccordionFoldButton.js.map +0 -1
- package/dist/components/RollupItem/getIconName.d.ts +0 -1
- package/dist/components/RollupItem/getIconName.js +0 -7
- package/dist/components/RollupItem/getIconName.js.map +0 -1
- package/dist/components/RollupItem/renderRoundedIcon.d.ts +0 -3
- package/dist/components/RollupItem/renderRoundedIcon.js +0 -6
- package/dist/components/RollupItem/renderRoundedIcon.js.map +0 -1
- package/dist/components/RollupItem/renderRoundedIcon.mobile.d.ts +0 -3
- package/dist/components/RollupItem/renderRoundedIcon.mobile.js +0 -7
- package/dist/components/RollupItem/renderRoundedIcon.mobile.js.map +0 -1
- package/dist/components/RollupItem/rollupIconVersion.mobile.d.ts +0 -1
- package/dist/components/RollupItem/rollupIconVersion.mobile.js +0 -4
- package/dist/components/RollupItem/rollupIconVersion.mobile.js.map +0 -1
- package/dist/ui-kit/Button/IconButton.d.ts +0 -10
- package/dist/ui-kit/Button/IconButton.js +0 -13
- package/dist/ui-kit/Button/IconButton.js.map +0 -1
- package/dist/ui-kit/Button/useButton.d.ts +0 -2
- package/dist/ui-kit/Button/useButton.js +0 -16
- package/dist/ui-kit/Button/useButton.js.map +0 -1
- package/dist/ui-kit/TextWithIcon/TextWithIcon.d.ts +0 -13
- package/dist/ui-kit/TextWithIcon/TextWithIcon.js +0 -10
- package/dist/ui-kit/TextWithIcon/TextWithIcon.js.map +0 -1
- package/lib/components/ApplicationForm/renderSubmitButton.d.ts +0 -2
- package/lib/components/ApplicationForm/renderSubmitButton.js +0 -5
- package/lib/components/ApplicationForm/renderSubmitButton.js.map +0 -1
- package/lib/components/OfficesAtmsMap/renderFoldButton.d.ts +0 -3
- package/lib/components/OfficesAtmsMap/renderFoldButton.js +0 -4
- package/lib/components/OfficesAtmsMap/renderFoldButton.js.map +0 -1
- package/lib/components/RollupItem/AccordionFoldButton.d.ts +0 -12
- package/lib/components/RollupItem/AccordionFoldButton.js +0 -9
- package/lib/components/RollupItem/AccordionFoldButton.js.map +0 -1
- package/lib/components/RollupItem/getIconName.d.ts +0 -1
- package/lib/components/RollupItem/getIconName.js +0 -4
- package/lib/components/RollupItem/getIconName.js.map +0 -1
- package/lib/components/RollupItem/renderRoundedIcon.d.ts +0 -3
- package/lib/components/RollupItem/renderRoundedIcon.js +0 -3
- package/lib/components/RollupItem/renderRoundedIcon.js.map +0 -1
- package/lib/components/RollupItem/renderRoundedIcon.mobile.d.ts +0 -3
- package/lib/components/RollupItem/renderRoundedIcon.mobile.js +0 -4
- package/lib/components/RollupItem/renderRoundedIcon.mobile.js.map +0 -1
- package/lib/components/RollupItem/rollupIconVersion.mobile.d.ts +0 -1
- package/lib/components/RollupItem/rollupIconVersion.mobile.js +0 -2
- package/lib/components/RollupItem/rollupIconVersion.mobile.js.map +0 -1
- package/lib/ui-kit/Button/IconButton.d.ts +0 -10
- package/lib/ui-kit/Button/IconButton.js +0 -11
- package/lib/ui-kit/Button/IconButton.js.map +0 -1
- package/lib/ui-kit/Button/useButton.d.ts +0 -2
- package/lib/ui-kit/Button/useButton.js +0 -13
- package/lib/ui-kit/Button/useButton.js.map +0 -1
- package/lib/ui-kit/TextWithIcon/TextWithIcon.d.ts +0 -13
- package/lib/ui-kit/TextWithIcon/TextWithIcon.js +0 -8
- package/lib/ui-kit/TextWithIcon/TextWithIcon.js.map +0 -1
- package/mobile/bundle/components/ApplicationForm/renderSubmitButton.d.ts +0 -2
- package/mobile/bundle/components/OfficesAtmsMap/renderFoldButton.d.ts +0 -3
- package/mobile/bundle/components/RollupItem/AccordionFoldButton.d.ts +0 -12
- package/mobile/bundle/components/RollupItem/getIconName.d.ts +0 -1
- package/mobile/bundle/components/RollupItem/renderRoundedIcon.d.ts +0 -3
- package/mobile/bundle/ui-kit/Button/IconButton.d.ts +0 -10
- package/mobile/bundle/ui-kit/Button/useButton.d.ts +0 -2
- package/mobile/bundle/ui-kit/TextWithIcon/TextWithIcon.d.ts +0 -13
- package/mobile/dist/components/ApplicationForm/renderSubmitButton.d.ts +0 -2
- package/mobile/dist/components/ApplicationForm/renderSubmitButton.js +0 -8
- package/mobile/dist/components/ApplicationForm/renderSubmitButton.js.map +0 -1
- package/mobile/dist/components/OfficesAtmsMap/renderFoldButton.d.ts +0 -3
- package/mobile/dist/components/OfficesAtmsMap/renderFoldButton.js +0 -7
- package/mobile/dist/components/OfficesAtmsMap/renderFoldButton.js.map +0 -1
- package/mobile/dist/components/RollupItem/AccordionFoldButton.d.ts +0 -12
- package/mobile/dist/components/RollupItem/AccordionFoldButton.js +0 -11
- package/mobile/dist/components/RollupItem/AccordionFoldButton.js.map +0 -1
- package/mobile/dist/components/RollupItem/getIconName.d.ts +0 -1
- package/mobile/dist/components/RollupItem/getIconName.js +0 -7
- package/mobile/dist/components/RollupItem/getIconName.js.map +0 -1
- package/mobile/dist/components/RollupItem/renderRoundedIcon.d.ts +0 -3
- package/mobile/dist/components/RollupItem/renderRoundedIcon.js +0 -7
- package/mobile/dist/components/RollupItem/renderRoundedIcon.js.map +0 -1
- package/mobile/dist/ui-kit/Button/IconButton.d.ts +0 -10
- package/mobile/dist/ui-kit/Button/IconButton.js +0 -13
- package/mobile/dist/ui-kit/Button/IconButton.js.map +0 -1
- package/mobile/dist/ui-kit/Button/useButton.d.ts +0 -2
- package/mobile/dist/ui-kit/Button/useButton.js +0 -16
- package/mobile/dist/ui-kit/Button/useButton.js.map +0 -1
- package/mobile/dist/ui-kit/TextWithIcon/TextWithIcon.d.ts +0 -13
- package/mobile/dist/ui-kit/TextWithIcon/TextWithIcon.js +0 -10
- package/mobile/dist/ui-kit/TextWithIcon/TextWithIcon.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/renderSubmitButton.d.ts +0 -2
- package/mobile/lib/components/ApplicationForm/renderSubmitButton.js +0 -5
- package/mobile/lib/components/ApplicationForm/renderSubmitButton.js.map +0 -1
- package/mobile/lib/components/OfficesAtmsMap/renderFoldButton.d.ts +0 -3
- package/mobile/lib/components/OfficesAtmsMap/renderFoldButton.js +0 -4
- package/mobile/lib/components/OfficesAtmsMap/renderFoldButton.js.map +0 -1
- package/mobile/lib/components/RollupItem/AccordionFoldButton.d.ts +0 -12
- package/mobile/lib/components/RollupItem/AccordionFoldButton.js +0 -9
- package/mobile/lib/components/RollupItem/AccordionFoldButton.js.map +0 -1
- package/mobile/lib/components/RollupItem/getIconName.d.ts +0 -1
- package/mobile/lib/components/RollupItem/getIconName.js +0 -4
- package/mobile/lib/components/RollupItem/getIconName.js.map +0 -1
- package/mobile/lib/components/RollupItem/renderRoundedIcon.d.ts +0 -3
- package/mobile/lib/components/RollupItem/renderRoundedIcon.js +0 -4
- package/mobile/lib/components/RollupItem/renderRoundedIcon.js.map +0 -1
- package/mobile/lib/ui-kit/Button/IconButton.d.ts +0 -10
- package/mobile/lib/ui-kit/Button/IconButton.js +0 -11
- package/mobile/lib/ui-kit/Button/IconButton.js.map +0 -1
- package/mobile/lib/ui-kit/Button/useButton.d.ts +0 -2
- package/mobile/lib/ui-kit/Button/useButton.js +0 -13
- package/mobile/lib/ui-kit/Button/useButton.js.map +0 -1
- package/mobile/lib/ui-kit/TextWithIcon/TextWithIcon.d.ts +0 -13
- package/mobile/lib/ui-kit/TextWithIcon/TextWithIcon.js +0 -8
- package/mobile/lib/ui-kit/TextWithIcon/TextWithIcon.js.map +0 -1
- package/mobile/src/components/ApplicationForm/renderSubmitButton.tsx +0 -9
- package/mobile/src/components/OfficesAtmsMap/renderFoldButton.tsx +0 -12
- package/mobile/src/components/RollupItem/AccordionFoldButton.tsx +0 -41
- package/mobile/src/components/RollupItem/getIconName.tsx +0 -6
- package/mobile/src/components/RollupItem/renderRoundedIcon.tsx +0 -7
- package/mobile/src/ui-kit/Button/IconButton.tsx +0 -36
- package/mobile/src/ui-kit/Button/useButton.ts +0 -16
- package/mobile/src/ui-kit/TextWithIcon/TextWithIcon.tsx +0 -37
- package/src/components/ApplicationForm/renderSubmitButton.tsx +0 -9
- package/src/components/OfficesAtmsMap/renderFoldButton.tsx +0 -12
- package/src/components/RollupItem/AccordionFoldButton.tsx +0 -41
- package/src/components/RollupItem/getIconName.tsx +0 -6
- package/src/components/RollupItem/renderRoundedIcon.mobile.tsx +0 -7
- package/src/components/RollupItem/renderRoundedIcon.tsx +0 -5
- package/src/components/RollupItem/rollupIconVersion.mobile.tsx +0 -1
- package/src/ui-kit/Button/IconButton.tsx +0 -36
- package/src/ui-kit/Button/useButton.ts +0 -16
- package/src/ui-kit/TextWithIcon/TextWithIcon.tsx +0 -37
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),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)=>b(100,e).map((e=>Math.floor(e))).map(y),y=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),b=(e,t)=>[e].concat(t>0?b(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:a,children:i})=>{const l=v[n]||"h3";return o(l,{role:"heading",className:u("font-sans m-0",N[t],e),children:a||i})})),C=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},k=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=S[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[a?o(w,{className:u("whitespace-pre-wrap",l),...h?.title,as:r||h?.title.as,title:a}):null,i?o(C,{size:h.descriptionSize,font:h.descriptionWeight,align:l,...p,children:i}):null]})})),I=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),T=[];function R(e,t,{className:n,...a}={}){const{key:i,blockDecorator:l=I,blocksRegistry:r={},ancestors:s=T}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return 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 B=[],P=(e,{key:t,ancestors:n=B,slotName:a=null,extraProps:i,renderProps:l=R,...r})=>{const s=i?(e,t)=>R(e,t,i):l;return(e||[]).map(((e,i)=>s(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...n||B,[r.parent,a]]:n},i)))};function D({block:e,options:t,children:n,extraProps:a,renderProps:i}){return n||(e&&t?P(e.blocks,{...t,parent:e,extraProps:a,renderProps:i}):null)}function _(){return _._impl()}_._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),_.setup=e=>{_._impl=e};const E=["CDN","BASE_PATH"],A=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return E.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),M=e=>Boolean(e?.includes(":")),O=(e,t)=>Boolean(e&&!M(e)&&(!t||"_self"===t)),z=e=>Boolean(e?.startsWith("#")),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:M,isLocalURL:O,isHash:z,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:V,hasPrefix:F});const j="/api/",$=`${j}v1/storage`,U=e=>(t,n)=>{if([!t,M(t),z(t),[A.CDN,j].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`${$}/${t}/attachment`;const a=t?.startsWith("/");return V(F(t,n)?"":n,a?"/":(i=e.pathname,i?.split("/").slice(0,-1).join("/")),t);var i},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:i=a,iconVersion:l="color",width:r,height:s})=>{const d=_(),m="normal"===l?`${n}.svg`:`sprites.svg#${n}`,h=U(d)(V(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),q[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&&!M(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: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=_(),{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: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(!O(e,t))return!0;const a=K.SUB_PORTALS?.split(",");return!!a?.some((t=>F(e,t)))||!F(e,n||"/")},fe=e=>{try{return Array.isArray(e)&&e.length?{"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=be(e)&&"hidden lg:block";return c("div",{className:u(ye(e),"flex gap-xs"),children:[a?o("div",{className:u(r,se[l]),children:a}):null,be(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]})})),ye=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",be(e)?i:"h-12 w-12 m-auto",{"rounded-full":a})},be=({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(true);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,...y})=>{const b=ke(),v=_(),N=l((()=>v.back()),[]),w=y.options?.page?.common?.backwardButton,C=f&&!b;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(D({...y,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)),Ee=(e,t)=>e?o(C,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ae=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),Me=(e,t)=>e?o(Ae,{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:Ee(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)})]}))),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}))),je=e=>Boolean(e?.src||e?.icon),$e=(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:i,iconRight:l,version:r,...s}=t||{},c=qe(i,r),d=qe(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},qe=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},We=e=>je(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(Ae,{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(Ae,{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:y,image:b,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:C=!1}={},backwardButton:S,children:I,...T})=>{const R=b?.src?o(ne,{image:b}):null,B=o(k,{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:$e(y),backwardButton:S,...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)])),yt=pt(((e,[t,n])=>{const[a,...i]=t;return e.set(a,i.length?yt(e.get(a),[i,n]):n)})),bt=pt(((e,t)=>t.reduce(yt.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=>bt(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)],Et={},At=["/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=>!At.some((t=>e.startsWith(t))))).map((async e=>[e,Et[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 Vt(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 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((()=>jt(0,t?.length)),[t]),a=t?.[n];return a?o(Ft,{suppressHydrationWarning:!0,...a,...e}):o(g,{...e,children:o(f,{})})})),jt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),$t=(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}`}},Ut=e=>e?.replace(/[^+\d]/g,""),qt="/api/v1";const Wt=e=>e?{phone:Ut(e)}:{},Ht=(e,t="birthday")=>e?{[t]:$t(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: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(M(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const a=(e=>{const t=Qt();if(!M(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),i=l((()=>n(!0)),[]),r=l((()=>n(!1)),[]),s=l((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:i,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=l((e=>s((a=>{const i=e instanceof Function?e(a):e,l=t?t(i):i,r=cn(i,l)?i:l;return!cn(a,r)&&n?.(r),r}))),[t,n]);return i((()=>{t&&s(t)}),[t]),[r,o]}(e,o,c),[h,{setTrue:p,setFalse:g}]=nn(!1),f=s({}),[x,{isValid:y,errors:b}]=function(e,t){const n=r((()=>t?.(e)??sn),[t,e]),a=r((()=>an(n)(e)??on),[n,e]),i=ln(a);return[n,{isValid:i,errors:a}]}(m,n),v=l(((e,t={})=>{const{parse:n,format:a,onChange:i}=t,l=m[e],r=h||f.current?.[String(e)],s=t?.validator??x[e],o=r&&s?s(l):[];return{value:a?a(l):l,isDirty:r,errors:s&&o,error:o[0],onChange:t=>{f.current||={},f.current[String(e)]=!0;const a=n?n(t):t;i?.(a),u((t=>({...t,[e]:a})))}}}),[m,h,x,u]),N=l((e=>{f.current=e,u(e)}),[u]),w=l((()=>{f.current={},g(),u(e)}),[e,u]),C=l((e=>{e.preventDefault(),y?(t&&w(),d?.(m,e)):p()}),[t,m,y,w,d]);return[m,{errors:b,field:v,update:N,reset:w,onSubmit:C}]}const mn=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(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,a]})})}));function un(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 hn(e,t,n,a){i((()=>{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=l((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",yn=e=>e?xn:"border-error",bn=e=>e?o(Ae,{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:y,pattern:b,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=yn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[bn(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:y,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:y,pattern:b,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(Ae,{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],y=l((()=>{h.current=t,f.close()}),[t]),b=l((e=>{y(),h.current=e.processedValue,c&&c(e.processedValue),d&&d(e)}),[y,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=Cn}=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(`${qt}/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 y();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(Tn,{options:p,value:t,onChange:b}),top:a+globalThis.scrollY+r,left:i,width:l})}),[e,p,t,b]),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:y=!1,maxLength:b,dadata:v=!1,disabled:N=!1})=>{const[w,{setFalse:C,setTrue:S}]=nn(),k=pn(C),I=l((e=>{v&&!w&&S(),b?e.length<=b&&d(e):d(e)}),[v,w,d]);i((()=>{y&&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:Dn(a,s,t)})}),wn(r)]})})),Pn=(e="")=>e.replace(/[^\d]+/g,""),Dn=(e,t,n)=>t&&!n?`${e}*`:e,_n=e=>e?.text||e?.key||"",En=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,An=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:En(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:_n(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 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[y,{setFalse:b,setTrue:v}]=nn(),[N,w]=a(""),C=Vn(x,n.length),S=y&&!C,k=l((()=>{C||v()}),[C]),I=l((()=>{w(""),b()}),[]),T=function({isOpen:e,options:t,value:n,query:a,onChange:r,onClose:c,iconVersion:d}){const m=In(),u=l((()=>{m.close(),c&&c()}),[c]),h=l((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=pn(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(An,{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:y,options:n,value:r,query:N,onChange:f,onClose:I,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[bn(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:_n(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,...i})=>c("div",{className:e,children:[o(Mn,{...i,valid:!n,label:gn({label:t,errors:a})}),wn(n)]}))),Ln=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],jn=d((({field:e,input:t})=>o(Fn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ln,...e(t?.name??"")}))),$n=(e="")=>Boolean("trade"===e||"all"===e),Un=e=>null!=e,qn=new Map,Wn=(e,t=qn)=>n=>{const a=Yn(n),i=t.get(a);if(a&&Un(i))return i;const l=e(...n);return a&&Un(l)&&t.set(a,Promise.resolve(l)),l},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:l}={}){const s=r((()=>Xn(e)),[e]),[o,c]=a(void 0),[d,m]=a(void 0);i((()=>{if(!s.some(Un))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await Wn(t,l)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,l,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"}`,Dt);return Array.isArray(t)?t:[]}const ta=(e="")=>"ULTRASERVICE"===e,na=d((({field:e,input:t,params:n})=>{const a=ta(n?.typeForm),l=e("region"),r=l?.value?.key,s=l?.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 i((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.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: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}},ia=(e,t,n)=>Math.max(t,Math.min(e,n));function la(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: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=la(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:i=[],min:r=(i.length?0:sa),max:s=(i.length?i.length-1:oa),step:d=1,value:m=i[0]||r,disabled:h=!1,onChange:p}=e,g=aa(e,{normalize:(e=0)=>i.length?da(i)(e):ia(e,r,s),format:He()}),f=l((e=>{p&&p(la(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Ae,{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:i,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(Ae,{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: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=xa(t,e),c=ya(t,l,r);u.push(o("td",{children:o("div",{className:ba(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(),ya=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),ba=(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:i,onDateSelect:s=fn,setValue:d=fn})=>{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: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:i,onDateClick:m})})]})})),wa=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function Ca(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const a=[...t],i=a.findIndex(Sa),l=a.map(((e,t)=>Ia(e)?a.slice(0,t).filter(Ia).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 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:l,disabled:r,onChange:d,onClick:m})=>{const h=s(null),[p,g]=a(l||"");return i((()=>{g(l||"")}),[l]),i((()=>{Da({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)?Da({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(l||"")},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 i=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),i++;return Number(t)>0&&Number(t)<=i}return!1},Da=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:a})=>{if(Pa(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))}},_a=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:a,setSelectedMonth:i,setSelectedYear:l,disabled:r=!1})=>o(Ba,{onChange:a,disabled:r,onClick:e,value:t&&$t(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")}),Ea=wa.map((e=>({key:e}))),Aa=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:i})=>{a&&i?.(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()),[y,b]=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=pn(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(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:l((({key:e})=>{i(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:Ea,yearsOptions:Aa,ref:c}})({onYearSelect:b,onMonthSelect:x,onShowCalendar:g,selectedYear:y,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:[bn(t),c("div",{className:"relative",children:[_a({handleChangeVisibleCalendar:I,value:n,valid:r,onChange:h,disabled:m,setSelectedMonth:x,setSelectedYear:b}),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(y)},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:y,onDateSelect:h,min:s,max:d,setValue:g})]}):null]})]})})),La=d((({className:e,label:t,error:n,errors:a,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Fa,{label:gn({label:t,errors:a}),valid:Boolean(!n),...i}),wn(n)]}))),ja=d((({field:e,input:t})=>o(La,{label:"Дата рождения",...e(t?.name??"")}))),$a=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: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)}))}))),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: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(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",i?"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(i),"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(Ae,{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??"")}))),ei=d((({field:e,input:t})=>o(Bn,{label:"Электронная почта",...e(t?.name??""),...t}))),ti=[{key:"ULTRASERVICE",text:"Ультра"}],ni=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],ai=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],ii=d((({field:e,input:t})=>o(Fn,{label:"Способ получения ответа",options:ai,...e(t?.name??"")}))),li=d((({field:e,input:t})=>o(Bn,{label:"ФИО",...e(t?.name??""),...t})));function ri(e,t){for(const[n,a]of e.entries())null!=a?t.setItem(n,a):t.removeItem(n)}function si(e,t){return ri(e,t),ri(t,e),e.bus.watch((({type:e,event:n})=>{null!=n?t.setItem(e,n):t.removeItem(e)}))}class oi{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)}}class ci{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)}}const di={};function mi(e,t=di){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 ui=new ci;function hi(e){return mi(ui,e)}si(ui,new oi(globalThis?.localStorage));const pi=()=>hi(),gi=(e,t)=>{if(!t)return null;const n=bi(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")}},fi=(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},xi=(e,t)=>{const n=bi(e);return[40001,40002,71610].includes(t)?n("FOREIGN"):n("RUSSIAN")},yi=(e,t,n)=>{const a=bi(e);return a("7725114488"===n?"RSHB":50102===t?"SOLE_TRADER":t>=75e3&&t<=75505&&75500!==t?"BUDGETARY":"COMMERCIAL")},bi=e=>t=>e.map((e=>({key:e.key,text:e.value}))).find((e=>e.key===t))??null,vi=(e,t)=>Boolean(e("esiaAccountTypeCd")?.value?.key)&&e(t).value,Ni=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",a=e(n).value,i=l((t=>{e?.(n)?.onChange?.(wi(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(Bn,{disabled:t?.filledByEsia&&vi(e,n),label:"Адрес",...e(n),value:a?.fullAddress,onChange:r,...t,onDaDataChange:i})})),wi=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}),Ci=(e,t,n)=>{const{okved:a,okopf:i,inn:l}=Si(n);t?.("legalForm")?.onChange?.(n.data?.opf?.short),t?.("organizationAddress")?.onChange?.(wi(n.data?.address));const r={amountWorkers:fi(e?.amountWorkers,n.data?.employee_count),employerActivities:gi(e?.employerActivities??[],a),organization:yi(e?.organization??[],i,l),employerOrganization:xi(e?.employerOrganization??[],i)};for(const e in r)r[e]&&t?.(e)?.onChange?.(r[e])},Si=e=>({inn:e.data?.inn??"",okopf:Number(e.data?.opf?.code),okved:e.data?.okved??""}),ki=d((({field:e,input:t})=>{const n=pi(),a=l((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),Ci(n,e,t)}),[]);return o(Bn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??""),onDaDataChange:a})})),Ii=d((({className:e,text:t,value:n,key:a,disabled:i,error:l,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(Ya,{text:t,value:n,disabled:i,onChange:r},a),wn(l)]}))),Ti=d((({field:e,input:t})=>o(Ii,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Ri=`${qt}/outservice`,Bi=[];async function Pi(){const e=await Pt(`${Ri}/outserviceregions`);return e&&Array.isArray(e)?e:Bi}const Di=d((({field:e,input:t})=>{const n=e("region"),a=n?.value?.key,{data:l}=Kn("outServiceRegions",Pi),s=r((()=>l?.find((e=>e.code===a))?.localities?.map((e=>({key:e,text:e})))),[l,a]);return i((()=>{""!==a&&e?.(t?.name??"")?.onChange?.("")}),[a,t?.name??""]),o(Fn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:s,...e(t?.name??""),isSearch:!0})})),_i=d((({field:e,input:t})=>o(Bn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,disabled:t?.filledByEsia&&vi(e,t?.name??""),...e(t?.name??""),...t}))),Ei=d((({field:e,input:t})=>o(Bn,{label:"Имя",maxLength:60,disabled:t?.filledByEsia&&vi(e,t.name??""),...e(t?.name??""),...t}))),Ai=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(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Mi=d((({field:e,input:t})=>$n(e("acquiringType")?.value?.key)?o(Ai,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),Oi=d((({field:e,input:t})=>o(Bn,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),zi=e=>"_"===e,Vi=e=>/\d/.test(e),Fi=e=>zi(e)||Vi(e),Li=[..."+7 (___) ___-__-__"],ji=Li.findIndex(zi),$i=Li.map(((e,t)=>Fi(e)?Li.slice(0,t).filter(Fi).length:-1));function Ui(e){const t=e.replace(/\D/g,""),n=Li.map(((e,n)=>Vi(e)?e:t.charAt($i[n])||e)),a=$i.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max(ji,a)):n).join("")}const qi=d((({children:e,onChange:t,...n})=>{const a=l((e=>t&&t(Ui(e))),[t]),i=l((e=>{"+7 ("===e&&t&&t("")}),[]);return o(vn,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>i(e?.target?.value||""),children:e})})),Wi=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(qi,{"aria-label":t,label:gn({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),wn(n)]}))),Hi=d((({field:e,input:t})=>{const n=t?.name||"phone";return o(Wi,{label:"Телефон",...e(n),disabled:t?.filledByEsia&&vi(e,n),...t})})),Yi=d((({field:e})=>$n(e("acquiringType")?.value?.key)?o(Ai,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Gi=Vt((({field:e,input:t,source:n})=>o(Fn,{placeholder:"Выберите продукт",label:"Продукт",options:Ki(n?.productList),...e(t?.name??"")}))),Ki=e=>(e??[]).map((e=>({key:e,value:e}))),Xi=`${qt}/regions`,Ji=[];function Zi(e=Xi){const{data:t}=Kn(e,Dt);return Array.isArray(t)?t:Ji}const Qi=`${qt}/outservice/outserviceregions`,el=d((({field:e,input:t,params:n})=>{var a;const i=Zi((a=n?.typeForm,"OUTSERVICE"===a?Qi:void 0));return o(Fn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>i?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[i]),...e(t?.name??"")})})),tl=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??"")})})),nl=(e,t)=>{const{value:n,isDirty:a}=e,i=a?t(n):[];return{...e,errors:i,error:i[0]}},al=rn((e=>null!=e&&""!==e)),il="Некорректно заполненное поле",ll="Укажите регион, город/населенный пункт, улицу, дом",rl=e=>al(e??il),sl=e=>rn((e=>e?.key&&""!==e?.key))(e??il),ol=e=>rn((e=>"string"==typeof e&&/^[0-9]{1,2}$/g.test(e)))(e??il),cl=e=>rn((e=>"string"==typeof e&&e.length>1&&bl(e)))(e??il),dl=(e,t)=>rn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??il),ml=e=>rn((e=>"string"==typeof e&&6===e.length))(e),ul=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),hl=e=>rn(ul)(e),pl=rn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),gl=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},fl=e=>Boolean(e.region&&e.city&&e.house),xl=()=>rn(fl)(ll),yl=/^[\u0400-\u04FF\d\s]+$/u,bl=(e="")=>yl.test(e),vl=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)},Nl={processPersonalDataFlg:pl,consentProviderFlg:pl,consentInformFlg:pl,consentPfrFlg:pl,consentOthersFlg:pl},wl={addressCourier:xl(),paymentSystem:rl("Укажите тип платежной системы"),currency:rl("Укажите валюту"),cardCategory:rl("Укажите категорию карты"),codeWord:(Cl="Необходимо ввести кодовое слово",rn((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&bl(e)))(Cl??il)),confirmationIncome:sl(),methodObtain:rl(),deliveryDate:rl("Укажите дату доставки")};var Cl;const Sl={organization:sl("Выберите тип организации"),organizationAddress:rn((e=>Boolean(e.fiasCode&&e.city&&e.house)))(ll),organizationPhone:hl("Укажите номер телефона"),organizationName:rl("Укажите наименование организации"),legalForm:rl("Укажите ОПФ"),generalSeniority:ol("Укажите количество лет стажа"),lastJobExperience:ol("Укажите стаж на последнем месте работы"),experience5Years:ol("Укажите общий стаж за последние 5 лет"),jobsNumber:ol("Укажите количество мест работы за последние 5 лет"),beginDate:rl("Укажите дату заключения трудового договора"),addressFact:xl(),addressRegistration:xl(),addressRetail:sl("Выберите адрес банка"),addressMatch:rl(),sex:rl("Укажите свой пол"),limitedBirthday:rn(vl)("Допустимый возраст заёмщика - от 23 до 75 лет"),birthPlace:rl("Укажите место рождения"),education:sl("Выберите ваше образование"),housing:sl("Выберите тип жилья"),amountWorkers:sl("Выберите информацию о количестве сотрудников"),employment:sl("Выберите информацию о трудоустройстве"),employerActivities:sl("Выберите вид деятельности организации"),employerOrganization:sl("Выберите вид организации"),positionOrganization:sl("Выберите вашу должность"),familyStatus:sl("Выберите семейное положение"),familyMembers:dl(2,"Укажите количество членов семьи"),children:dl(2,"Укажите количество детей"),dependents:dl(2,"Укажите количество иждивенцев"),totalIncome:dl(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:dl(10,"Укажите сумму обязательных выплат"),snils:(e=>rn(gl)(e))("Некорректный номер СНИЛС"),conscription:rl(),armyIdFlg:pl,dulSerie:(e=>rn((e=>"string"==typeof e&&4===e.length))(e))("Укажите серию паспорта"),dulNumber:ml("Укажите номер паспорта"),dulIssueDateField:rl("Укажите дату выдачи паспорта"),dulSubdivisionCode:ml("Укажите код подразделения"),dulIssuedBy:rl("Укажите организацию, выдавшую паспорт"),participantDateRegistration:rl("Укажите дату регистрации"),retirementIncome:rl(),otherIncome:rl(),wages:rl(),mandatoryPayments:rl(),disablePeopleFlg:rl(),bankruptcyFlg:rl(),shareholderFlg:rl(),legalEntityName:rl(),bankEmployeeCode:rl(),partInBusiness:rl(),regionRetail:sl("Выберите регион")},kl={fullName:rl(),addressBranch:sl(),desiredMeetingDate:rl(),product:rl(),localities:rl(),partnerComments:rl(),collectionCount:rl(),acquiringType:sl(),serviceType:sl(),annualRevenue:rl(),feedbackMethod:sl(),serviceDirection:sl(),secondaryPhone:hl("Укажите номер телефона"),region:sl(),surname:cl("Укажите свою фамилию на кириллице"),name:cl("Укажите своё имя на кириллице"),middleName:cl("Укажите своё отчество на кириллице"),birthday:rl("Укажите дату рождения"),phone:hl("Укажите номер телефона"),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:rl(),typeForm:rl(),consentToReceiveMaterials:pl,consentDataProcessing:pl,...Nl,...Sl,...wl},Il=e=>{const t=e.filter((e=>Boolean(e?.required&&e?.name))),n=t.some((e=>e.condition?.values)),a=Object.fromEntries(t.filter(Tl).map((({name:e})=>[e,kl[e??""]])));return e=>n?Object.fromEntries(t.filter(Tl).filter(Rl(e)).map((({name:e})=>[e,kl[e??""]]))):a},Tl=({name:e})=>Boolean(kl[e??""]),Rl=e=>t=>!t?.condition||t.condition.values.find((n=>{const a=e?.[t?.condition?.name??""];return n===(a?.key??a)})),Bl=d((({field:e})=>{const t=e("secondaryPhone");return o(Wi,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?nl(t,kl.secondaryPhone):t})})),Pl=d((({field:e,input:t})=>o(Fn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:ni,...e(t?.name??"")}))),Dl=d((({field:e,input:t})=>o(Bn,{label:"Фамилия",maxLength:60,disabled:t?.filledByEsia&&vi(e,"surname"),...e(t?.name??""),...t}))),_l=["От 1 мес","До 15 лет"],El=d((({field:e})=>o(ca,{title:"Срок, месяцев",items:_l,min:1,max:180,...e("term")}))),Al=d((({field:e,input:t})=>o(Fn,{label:"Тип обслуживания",options:ti,...e(t?.name??"")}))),Ml={horizontal:"@lg:flex-row",vertical:""},Ol=d((({label:e,items:t,value:n,className:a,disabled:i=!1,orientation:l="horizontal",onChange:r})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",Ml[l],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:i},String(e))))})]}))),zl=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],Vl=d((({field:e,input:t})=>{const n=l((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(Ol,{className:"whitespace-normal",orientation:"horizontal",items:zl,...e(t?.name??"",{onChange:n})})})}));const Fl={$ref:"/wcms-resources/outservice-productlist.json"},Ll={fullName:li,addressBranch:na,desiredMeetingDate:Qa,product:e=>o(Gi,{...e,source:Fl}),localities:Di,isClient:Ti,partnerComments:Oi,collectionCount:$a,acquiringType:jn,onlineCheckout:Mi,posTerminal:Yi,serviceType:Al,term:El,amount:ha,annualRevenue:pa,vedTypes:Vl,feedbackMethod:ii,serviceDirection:Pl,bankEmpolee:ga,secondaryPhone:Bl,applicationDate:e=>o(Bn,{label:"Дата и время обращения в Банк",...e}),region:e=>ta(e?.params?.typeForm)?o(tl,{...e}):o(el,{...e}),consentToReceiveMaterials:Za,surname:Dl,name:Ei,middleName:_i,birthday:ja,phone:Hi,email:ei,inn:ki,comment:Ua},jl=(e,t,n={})=>(a,i)=>{const l={...Ll,...n}[String(a.name)];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})&&l?o("div",{children:o(l,{field:e,input:a,params:t})},i):null},$l=e=>2===e?"@xl:grid-cols-2":"",Ul=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ae,{size:"text-h6",children:e})}):null,ql=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 Wl({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const Hl={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"},Yl={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")},Gl=d((({children:e,...t})=>{const n=e=>({...e,onClick:ce(Wl(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(Hl[i],Yl[i]),a),type:d,role:h,onClick:p,children:[s?o(ql,{blur:!0,size:"small"}):null,e]})})),Kl=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"})}))),Xl=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(Kl,{className:"absolute top-0 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),Jl=d((({ok:e,typeForm:t,onClose:n})=>{const a="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Xl,{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(k,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?a:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Gl,{type:"button",onClick:n,children:"Хорошо"})]})})})),Zl=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:a,amount:i,term:l,annualRevenue:r,serviceType:s,vedTypes:o,region:c,inn:d,...m}=e,u=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:a=!1,term:i,amount:l,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${$n(t?.key)?`/Онлайн касса=${n}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${l}/Срок=${i}/Выручка=${r}`})(e):null,h={...m,...er(o),...Ql(c),...d&&{inn:d},...u?{partnerComments:u}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(h)?.map((([e,t])=>[e,t?.key||t])))},Ql=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},er=e=>e?{vedTypes:Object.fromEntries(zl.map((({id:t})=>[t,t===e])))}:{},tr={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:Ln[0],serviceType:ti[0],feedbackMethod:ai[0],serviceDirection:ni[0],vedTypes:zl[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},nr=d((({text:e,link:t})=>c(C,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Ae,{children:e}):null,t?o(Ne,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Ae,{children:t.text})}):null]}))),ar=(e,t)=>o(Gl,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ir=(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(nr,{link:t})]}),wn(nl(e,pl).error)]}):o(nr,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),ar(n)]}),lr={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=`${qt}${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}}},rr=d((({className:e,title:t,typeForm:n="",sections:a=[],button:i,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||tr[e.name||""]]))),typeForm:{key:t,text:""}}))(f,n)),[f,n]),y=r((()=>Il(f)),[f]),b=un(Jl),v=tn(),N=l((async(e,t)=>{const a=Zl({...e,...m}),i=Boolean(await lr.send(a,"lead"===d));b.open({ok:i,typeForm:n}),i&&Xt({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:C,onSubmit:S}]=dn(x,{resetOnSubmit:!0,formValidator:y,onSubmit:N}),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($l(e.columns),"grid gap-x-m"),children:[Ul(e.title),(e?.inputs||[])?.map(jl(C,{typeForm:n}))]},`section-${t}`))),ir(k?C("consentDataProcessing"):void 0,s,i)]}),h?c("div",{className:"space-y-m",children:[o(w,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),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(Bn,{label:"Адрес",disabled:r,...e(n),value:a?.fullAddress,onChange:c,...t,onDaDataChange:s})})),cr=d((({field:e,input:t})=>o(Ii,{text:"Адрес фактического места жительства совпадает с адресом регистрации",...e(t?.name??"")}))),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"})}),yr=e=>globalThis[e];function br(e,t,n=!0){const[l,r]=a(void 0);return i((()=>{let a=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=yr(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(yr(e))}))}))}return new Promise(((n,a)=>{const i=document.createElement("script");i.src=t,i.async=!0,i.id=t,i.addEventListener("load",(()=>{n(yr(e))})),i.addEventListener("error",(e=>{a(e)})),document.head.appendChild(i)}))})(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}const vr={...gr,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:l})=>{const r=s(null),d=s(null),m=br("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${A.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);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:Sr(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(ql,{}):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"})]}),xr(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?.(`/light-api-cash/v1${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(",",".")),Dr=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:_r({textItems:l,subText:t,children:n,isPhone:a,...i})})),_r=({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(Ae,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Er(n,s),i?o(Ae,{color:a,size:"text-m",children:i}):null]}),Er=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Ae,{size:"text-l",children:t?o("a",{href:`tel:${Ar(e)}`,children:e.trim()}):e.trim()},String(n)))),Ar=e=>e.replace(/\D/g,""),Mr=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}))),Or=d((({className:e,children:t})=>o("div",{className:u(e),role:"group",children:t})));const zr=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})})})),Vr=d((({className:e,name:t,text:n,data:a,onClick:i})=>{const l=r((()=>fe(a)),[a]);return c("button",{className:u("text-primary-main flex justify-between items-center border-none px-m",n?"pt-lg":"py-2xs",e),type:"button",...l,onClick:i,children:[n?o("div",{className:"pr-m",children:n}):null,o(W,{className:"text-primary-text",name:t,width:"16",height:"16"})]})})),Fr=({isUnfolded:e,onToggle:t})=>o(Vr,{className:"w-full border-b border-solid border-main-divider",name:e?"ArrowUpIcon":"ArrowDownIcon",text:e?"Скрыть":"Подробнее",onClick:t}),Lr=d((({children:e})=>{const[t,{toggle:n}]=nn(!1);return c(Or,{className:"block sm:hidden",children:[o(zr,{isUnfolded:t,children:e}),Fr({isUnfolded:t,onToggle:n})]})})),jr=e=>{const t=Ur(e);return o(Dr,{label:"Режим работы",value:t,className:"max-w-none"})},$r=({workTime:e="",lunchHour:t="",daysOff:n=""},a=!1)=>e?[`${a?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Ur=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[$r({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":a}),$r({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:a},!0)].filter(Boolean)},qr=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Wr=e=>qr.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??"")}}))),Hr=e=>{if(!e)return null;const t=Yr(e);return c(Mr,{className:"border-none",children:[o(Dr,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Gr)})}),o(Dr,{label:"Режим работы",className:"max-w-none",children:o(Ae,{children:e})})]})},Yr=e=>{const t=qr.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},Gr=({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(Ae,{size:"text-xs",children:e})},String(n)),Kr=({currency:e,buyExchangeRate:t,saleExchangeRate:n},a)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Dr,{label:"Валюта",value:e.currency}):null,t?o(Dr,{label:"Купить",value:String(t)}):null,n?o(Dr,{label:"Продать",value:String(n)}):null]},String(a)),Xr={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"}},Jr=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",Xr[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(Ae,{size:"text-m",color:Xr[n].text,children:t})]}))),Zr=(new Date).getDay(),Qr=e=>{const[t]=e?.slice(Zr-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(Jr,{color:"green",children:i}):null,n&&l?o(Jr,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Jr,{color:"red",children:"Выходной"})},es=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",ts=({title:e,status:t,workTime:n,lunchHour:a,hasLunch:i},l)=>o(Dr,{label:e,value:t&&n?n:"",subText:es({lunchHour:a,hasLunch:i,status:t}),subColor:!t||i?"text-error":"text-green-dark"},String(l)),ns=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,as=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,is=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,ls=(e,t)=>{if(!e.workSchedule)return null;const n=Wr(e.workSchedule);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(Ae,{size:"text-h4",children:e.name}),e.address?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:e.address})]}):null]}),Qr(n)]}),o("div",{className:"hidden sm:block",children:rs(e)}),o(Lr,{children:rs(e)})]},String(t))},rs=({phone:e,fax:t,phoneBusiness:n,phoneNatural:a,phoneCallCentre:i,phoneCurrencyControl:l,workSchedule:r,exchangeRate:s})=>{const d=Wr(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Mr,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Dr,{label:"Факс",value:t,isPhone:!0}),o(Dr,{label:"Телефон филиала",value:e,isPhone:!0}),o(Dr,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Dr,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(Dr,{label:"Для консультаций по валютному контролю",value:l,isPhone:!0}),o(Dr,{label:"Контакт-центр",value:i,isPhone:!0})]}),r?.isMatchesPattern?o(Mr,{children:o(Dr,{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(ts)})})}):c(Mr,{children:[o(Dr,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Gr)})}),jr(d)]}),r?.businessScheduleVisibleTag?Hr(r?.businessScheduleDescription):null,s?.currencies?.length?o(Mr,{className:"flex-wrap",children:s?.currencies?.map(Kr)}):null]})},ss=({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=Wr(e),n=e?Ur(t):"",a=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?ns(n):is(n,a):as(n):""})(n)}`;return{header:a,body:l}},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:i=us})=>{const[l,s,o,c]=r((()=>{const l=ms(e,n),r=ms(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}},ps=e=>{const{data:t,error:n}=Kn(`/light-api-cash/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)),ys=d((({field:e,input:t})=>{const[n,l]=a([]),{data:r}=ps("REGION_RF"),s=e("regionRetail")?.value||{},d=e(t?.name??"");i((()=>{(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??"");l(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})})})]})})),bs=Vt((({field:e,source:t,fieldName:n,placeholder:a="Выберите из списка",options:i,...l})=>{const r=t?.map((e=>({key:e.key||"",text:e.value})))||[];return o(Fn,{placeholder:a,options:r,...e(n),...l})})),vs=d((({field:e,input:t})=>{const{data:n}=ps("EMPLOYEES_NUMBER"),a=pi();return i((()=>{n&&(a.amountWorkers=n)}),[n]),o(bs,{field:e,source:a.amountWorkers??[],label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),Ns=d((({field:e,input:t})=>o(Ii,{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(Ii,{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&&vi(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,i]=a(t?Is(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])]}("programId"),{value:c,onChange:d}=e("cardCategory"),m=e("paymentSystem")?.value?.key;return i((()=>{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(bs,{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}))),Ds=d((({field:e,input:t})=>{const{data:n}=ps("INCOME_CERT_UNITED");return o(bs,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),_s=d((({field:e,input:t})=>{const{data:n}=ps("MILITARY_STATUS");return o(bs,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),Es={processPersonalDataFlg:{text:"Согласие на обработку персональных данных",docId:4},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentOthersFlg:{text:"Прочие согласия",docId:1},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3}},As=d((({src:e,convertToPng:t,onClose:n,onDocumentRead:a})=>c(Xl,{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(Gl,{className:"mx-auto mt-m",type:"button",onClick:()=>{a?.(),n?.()},children:"Ознакомиться"})]}))),Ms=(e,t)=>{const{open:n}=un(As),a=ke();return l((async()=>{if(e){const i=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:i,onDocumentRead:t})}}),[n,e,a])},Os=d((({className:e,error:t,docId:n,...a})=>{const i=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:i,children:o(Ae,{children:"Ознакомиться"})}):null]}),wn(t)]})})),zs=d((({field:e,input:t})=>t&&t.name?o(Os,{text:Es[t.name]?.text,docId:Es[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(w,{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",js="flex flex-col lg:w-1/2 gap-2xl",$s="flex flex-col gap-y-xl min-w-52",Us=d((({value:e,fractionDigits:t,fixed:n,prefix:a,postfix:i})=>o(Ae,{size:"text-h3",children:"number"==typeof e?[a,He(t,{fixed:n})(e),i].filter(Boolean).join(" "):e}))),qs=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(Ae,{size:"text-l",font:"font-light",color:a,children:t}):null,n?o(Us,{value:n,...i}):o(Ae,{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(C,{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: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(Ae,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(Ol,{orientation:a,items:e,value:e[i?0:1].id,onChange:t=>l&&l(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:i="maxMonths"})=>{Object.entries(a).forEach((([n,a])=>{e?.(n)?.onChange?.(t?.[a])})),e?.("monthsValue")?.onChange?.(ia(t?.[i],n.minMonths,n.maxMonths))},no=(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)},ao=e=>e,io=(e=ao)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),lo=io(),ro=(e=ao)=>io((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?lo(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:i})=>!!n&&!n[i]||t[a]===e[a],go=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=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,l),{minMonths:c,maxMonths:d}=oo(["minMonths","maxMonths"],r,l),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i})=>e?.find((e=>ho({row:e,userInputParams:t,paramsViewSettings:n})&&mo(a,["minSum","maxSum"],e)&&mo(i,["minMonths","maxMonths"],e)))||uo)({rateRows:l,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i}),{rate:u}=m,h=no(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:a,monthsValue:i,monthlyPayment:h}},fo=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),xo={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},yo=Vt((({className:e,title:t,calcSource:n,buttons:a,footnote:l,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),y=Qs({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:b}=f("moneyValue"),{onChange:v}=f("monthsValue");return i((()=>{b&&b(ia(g.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),i((()=>{v&&v(ia(g.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),i((()=>{!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:js,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}),bo({...x,...r},f),o("div",{className:"sm:hidden",children:y})]}),c("div",{className:u($s,"@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:y}),$e(a,{isVertical:!0}),Ks(l)]})]})})})),bo=(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=l((t=>{e(vo).onChange?.(t)}),[]);return o(yo,{...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(bs,{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(Ol,{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}))),Do=d((({field:e,input:t})=>o(Ii,{text:"Являюсь инвалидом",...e(t?.name??"")}))),_o=d((({field:e,input:t})=>o(La,{label:"Дата выдачи",...e(t?.name??""),disabled:t?.filledByEsia&&vi(e,t?.name??"")}))),Eo=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("dulSubdivisionCode"),i=l((e=>{a?.(e?.data?.code?.replace("-",""))}),[]);return o(Bn,{disabled:t?.filledByEsia&&vi(e,t?.name??""),label:"Кем выдан",...t,...e(t?.name??""),onDaDataChange:i,daDataQueryPrefix:n})})),Ao=d((({field:e,input:t})=>o(Bn,{disabled:t?.filledByEsia&&vi(e,t.name??""),label:"Номер документа",isInteger:!0,maxLength:6,...e(t?.name??"")}))),Mo=d((({field:e,input:t})=>o(Bn,{disabled:t?.filledByEsia&&vi(e,t.name??""),label:"Серия документа",isInteger:!0,maxLength:4,...e(t?.name??"")}))),Oo=d((({field:e,input:t})=>{const n=l((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(Bn,{disabled:t?.filledByEsia&&vi(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(bs,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),Vo=d((({field:e,input:t})=>{const{data:n}=ps("ORGANIZATION_ACTIVITY_TYPE"),a=pi();return i((()=>{n&&(a.employerActivities=n)}),[n]),o(bs,{field:e,source:a.employerActivities??[],label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),Fo=d((({field:e,input:t})=>{const{data:n}=ps("ORGANIZATION_KIND"),a=pi();return i((()=>{n&&(a.employerOrganization=n)}),[n]),o(bs,{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(bs,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),jo=d((({field:e,input:t})=>o(Bn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),$o=d((({field:e,input:t})=>{const n=l((n=>e(t?.name??"")?.onChange?.(String(ia(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??""),l=e("familyStatus")?.value?.key,r="MARRIED"===l?2:1,s=Number(e("children")?.value),c=Number(e("dependents")?.value),d=r+s+c;return i((()=>{a?.(d)}),[l,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(bs,{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(bs,{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(_e,{__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&&vi(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=pi();return i((()=>{n&&(a.organization=n)}),[n]),o(bs,{field:e,source:a.organization??[],label:"Тип организации",fieldName:"organization",input:t})})),ic=d((({field:e,input:t})=>{const n=pi(),a=l((t=>{e?.("inn")?.onChange?.(t.data?.inn),Ci(n,e,t)}),[]);return o(Bn,{label:"Наименование организации",...t,...e(t?.name??""),onDaDataChange:a})})),lc=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=l((n=>e(t?.name??"")?.onChange?.(String(ia(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,l]=a([]),s=hi();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);l(t??[])}},i((()=>{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(bs,{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:l}=e("sex");return i((()=>{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&&l?.(e)})()}),[]),o(Io,{label:"Пол",orientation:"horizontal",items:gc,...e(t?.name??"")})})),xc=d((({field:e,input:t})=>o(Ii,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...e(t?.name??"")}))),yc=d((({children:e,onChange:t,maxLength:n,...a})=>{const i=l((e=>n?e.length<=n&&t?.(Ca(e,"___-___-___ __")):t?.(Ca(e,"___-___-___ __"))),[t]),r=l((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(vn,{...a,onChange:i,onFocus:e=>i(e?.target?.value||""),onBlur:e=>r(e?.target?.value||""),children:e})})),bc=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(yc,{"aria-label":t,label:gn({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:i,onBlur:l,placeholder:"___-___-___ __",...r}),wn(a)]}))),vc=d((({field:e,input:t})=>o(bc,{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:Ni,organizationPhone:Hi,organizationName:ic,legalForm:Zo,generalSeniority:Wo,lastJobExperience:Xo,experience5Years:$o,jobsNumber:Ko,beginDate:Ss,addressFact:or,addressRegistration:Ni,addressRetail:ys,addressMatch:cr,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:jo,snils:vc,conscription:_s,armyIdFlg:Ns,dulSerie:Mo,dulNumber:Ao,dulIssueDateField:_o,dulSubdivisionCode:Oo,dulIssuedBy:Eo,participantDateRegistration:rc,retirementIncome:hc,otherIncome:lc,wages:wc,mandatoryPayments:ec,disablePeopleFlg:Do,bankruptcyFlg:Cs,shareholderFlg:xc,legalEntityName:Jo,creditInRshbCd:ko,bankEmployeeCode:ws,partInBusiness:sc,regionRetail:uc,infoCard:Go,calculator:No,confirmationIncome:Ds},Ic={addressCourier:Ni,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))),i=l((n=>{for(const a of e){const e=t(a.name);e.onChange?.(n)}}),[e]),s=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(nl(t(e?.name),kl[e?.name]).error)))),[e]),[d,{toggle:m}]=nn(!0);return o("div",{className:"w-fit",children:c(Or,{children:[c("div",{className:"flex items-start",children:[c("div",{children:[o(Ya,{text:"Согласие на все документы",value:a,onChange:i},n),wn(s?"Отметьте все обязательные соглашения":"")]}),o(Vr,{name:d?"ArrowUpIcon":"ArrowDownIcon",onClick:m})]}),o(zr,{className:"flex flex-col pl-2xl",isUnfolded:d,children:e.map(jl(t,{},Sc))})]})})})),Rc=({field:e,inputs:t})=>{const{consentInputs:n,restInputs:a}=Bc(t||[]);return n.length>2?c("div",{children:[a.map(jl(e,{},{...Cc})),o(Tc,{inputs:n,field:e})]}):(t||[])?.map(jl(e,{},{...Cc}))},Bc=(e=[])=>({consentInputs:e.filter((({name:e})=>Object.keys(Es).includes(String(e)))),restInputs:e.filter((({name:e})=>!Object.keys(Es).includes(String(e))))}),Pc=(e,t)=>o(Gl,{className:u("w-full @xl:w-auto"),type:"submit",isLoading:t,children:e?.text?e.text:"Отправить заявку"}),Dc=e=>Rr("/user-data/updateUserProfile","PUT",e),_c=e=>Rr("/user-data/updateUserTask","PUT",e),Ec={width:"103",height:"21"},Ac={"bg-white":"color",transparent:"white"},Mc={"bg-white":"text-primary-main",transparent:"text-white"},Oc=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Ac[e]},className:Mc[e],width:n?.width,height:n?.height}),zc={"bg-white":"text-primary-text",transparent:"text-white"},Vc=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:[Oc(l,n?.image,Ec),r?a??o("div",{className:"ml-s",children:o(Ae,{font:"font-medium",color:zc[l],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),Fc=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=l((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]),y=l((()=>{(async()=>{s(URL.createObjectURL(await(e=>Rr(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET").then((async e=>e?await e.blob():new Blob)))(e)))})()}),[]);return i(y,[]),o(Xl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",head:o(Vc,{}),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:y,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(Gl,{onClick:close,version:"secondary",children:"Вернуться"}),o(Gl,{type:"submit",disabled:!d,onClick:x,version:"secondary",children:"Отправить"})]}),p?o(ql,{blur:!1}):null]})})})),Lc=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:jc(e)})))),jc=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,$c=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:Uc(a,e,n)},a)))}),n?o("div",{className:"text-error",children:r}):null]})})),Uc=(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 ${yn(!n||!a)} rounded-md caret-transparent outline-none`},qc=d((({isDisabled:e,onClick:t,text:n})=>o(Gl,{type:"button",onClick:t,disabled:e,children:o(Ae,{font:"font-normal",children:n})}))),Wc=e=>{e&&(globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token))},Hc=({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=l((()=>r("")),[]),x=Boolean(0===d&&u),y=p>2||x||!e.every(Boolean),b=l((async()=>{try{h(!1),m(0),g((e=>e+1)),o(),await(async e=>Tr("/sms/checkCode","POST",e).then(Wc))({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:b,hasError:Boolean(n),errorText:n,isLoading:s,timeNextReq:d,isSubmitButtonDisabled:y,setTimeNextReq:m,setIsTimerStarted:h,setAttempts:g}},Yc=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:y,setTimeNextReq:b,setIsTimerStarted:v,setAttempts:N}=Hc({values:m,onSuccess:s}),w=un(Fc),C=Ut(e),S=l((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),b(180),v(!0)):w.open({phoneNumber:C,sendCode:S})}),[C,d]);return i((()=>{S()}),[]),o(Xl,{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(k,{className:"w-full",title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,headlineVersion:"XS",isEmbedded:!0,as:"h6"}),t?o($c,{values:m,setValues:u,errorText:g,hasError:p}):null,Kc(x,b,S),c(_e,{itemSize:"list-s",children:[o("span",{children:"Вводя код, я подтверждаю, что ознакомлен и подписываю: "}),o("ul",{children:r?.map(((e,t)=>o("li",{children:e},`${e}-${t}`)))})]}),Gc(y,h),f?o(ql,{blur:!1}):null]})})})),Gc=(e,t)=>o(qc,{text:"Далее",isDisabled:e,onClick:t}),Kc=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-base",children:["Получить новый код можно через",o(Lc,{className:"text-base ml-1",time:e,setTime:t})]}):o(Ne,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),Xc={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},Jc={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},Zc=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],Qc=d((({onSubmit:e=fn,onClose:t=fn})=>{const[n,i]=a(""),[r,s]=a(!1),d=Ms(2),m=l((()=>{e(n)}),[e,n]),u=l((e=>{i(e),"REFUSE"===e&&s(!0)}),[]),h=r?Jc:Xc;return o(Xl,{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(w,{className:"text-center text-balance",headingType:"h2",title:h.title})}),o(C,{align:"text-center",children:h.description}),o(Ol,{className:"whitespace-normal",orientation:"horizontal",items:Zc,value:n,onChange:u}),o(Gl,{disabled:!n,type:"button",onClick:m,children:"Далее"})]})})})),ed=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(w,{className:"text-center md:text-left",title:e,headingType:"h5"}),n?o(C,{color:"text-secondary-text",size:"text-m",children:n}):null]})]}))),td={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},nd={addressRegistration:"REGISTRATION",addressFact:"RESIDENTAL",organizationAddress:"WORK",addressCourier:"DELIVERY"},ad={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 td?[...e,{contactTypeCd:{key:td[t]},value:n}]:e),[]),ld=e=>Object.entries(e).reduce(((e,[t,n])=>{if(t in nd){const a=Object.fromEntries(Object.entries(n??{}).filter((([e])=>!e.startsWith("qc"))).map((([e,t])=>[e,t??""])));return[...e,{addressType:{key:nd[t]},...a}]}return e}),[]),rd=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:sd(r,u),additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u},Object.entries(f).reduce(((e,[t,n])=>t in ad?[...e,{incomeTypeCd:{key:ad[t]},value:Number(n||0)}]:e),[])),snils:h?.replace(/[-\s]/g,""),armyIdFlg:p};var f},sd=(e,t)=>Number(e)+Number(t),od={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"},cd={...od,amur_card:"14",owner_card:"13",travel_card:"15"},dd=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:sd(t,s),additionalIncome:a,otherIncome:i,otherPayments:l,rentalIncome:r,retirementIncome:s}},md=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}},ud=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}},hd=e=>e?.key?{key:e.key,text:e.value}:void 0,pd=d((function({task:e,isFromLead:t=!1,onClose:n=fn}){const a=pi(),i=Jt(),{participants:r,creditProgram:s,id:d}=e,m=cd[s.code],u=Boolean(od[s.code]),h=u?"/credit-lead":"/credit-card-lead",{name:p,midname:g,id:f,profile:x}=r[0],y=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:y,educationLevelCd:b,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:E,seniority:A,generalSeniority:M,jobsNumber:O,lastWorkDuration:z,positionCd:V,maritalStatusCd:F,childrenDependents:L,totalDependents:j,otherDependents:$,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:l?.key,paymentSystem:hd(i),cardCategory:hd(n),codeWord:a,limitedBirthday:c,middleName:d,name:m,surname:u,birthPlace:h,dulIssueDateField:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:y,education:hd(b),participantDateRegistration:v,housing:hd(N),beginDate:k,employment:hd(I),organizationName:T,inn:R,employerActivities:hd(B),organization:hd(P),employerOrganization:hd(D),amountWorkers:hd(_),legalForm:E,generalSeniority:A?.toString(),experience5Years:M?.toString(),jobsNumber:O?.toString(),lastJobExperience:z?.toString(),positionOrganization:hd(V),familyStatus:hd(F),children:L?.toString(),familyMembers:j?.toString(),dependents:$?.toString(),conscription:hd(U),confirmationIncome:hd(Q),snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,legalEntityName:K,creditInRshbCd:hd(X),calculator:{isInsurance:J,isSalaryClient:Z,moneyValue:r,monthsValue:s,isAnnuity:"ANNUITY"===o?.key},...dd(q),...md(S),...ud(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)}),[]),b=l((()=>{i.assign(u?"/natural/loans/all-goals":"/natural/creditcards/svoya")}),[]),v=l((()=>{i.assign("/")}),[]);return o(Xl,{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(w,{className:"whitespace-pre-wrap text-center",title:`${p&&g?`${p} ${g}, `:""}мы нашли черновик вашей заявки.\nПродолжите заполнение?`,headingType:"h5"}),o(ed,{title:"Перейти к черновику",icon:"BankIcon",description:"Продолжайте заполнять заявку из черновика",onClick:y}),o(ed,{title:t?"Продолжить заполнение текущей заявки":"Заполнить новую заявку",icon:"DocIcon",onClick:t?n:b}),o(Gl,{type:"button",version:"secondary",className:"w-full text-h5",onClick:v,children:"Вернуться на главную"})]})})})),gd=d((function({onClose:e=fn}){const t=Jt(),n=l((()=>{t.assign("/natural/loans/all-goals")}),[]),a=l((()=>{t.assign("/")}),[]);return o(Xl,{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(w,{className:"text-center",title:"Заявки не найдены",headingType:"h3"}),o(C,{size:"text-l",align:"text-center",children:"По данному номеру не найдено незавершенных заявок. Вы можете заполнить новую заявку или вернуться на главную страницу"}),o(Gl,{type:"button",className:"w-full",onClick:n,children:"Заполнить новую заявку"}),o(Gl,{type:"button",version:"secondary",className:"w-full",onClick:a,children:"Вернуться на главную"})]})})})),fd=d((({onClose:e})=>{const t=Jt(),n=pi(),a=l((async()=>{const e=await(n={redirectUri:t.href},Tr("/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(Xl,{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(Gl,{type:"button",onClick:a,children:"Заполнить через Госуслуги"}),o(Gl,{type:"button",version:"secondary",onClick:i,children:"Пропустить"})]})]})})})),xd=()=>{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=()=>hi(),bd=({programId:e,nextStepLink:t})=>{const[n,{setTrue:i,setFalse:r}]=nn(!1),[s,o]=a(),c=(()=>{const e=yd();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}),[])})(),d=(e=>{const{open:t}=un(fd),n=Jt();return l((()=>{t({onClose:()=>n.assign(e)})}),[t,e])})(t),m=(e=>{const{open:t}=un(Qc),n=un(Yc),a=t=>async n=>{try{t&&await Dc({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})}})(d),u=un(Yc),h=(()=>{const{open:e}=un(pd),{open:t}=un(gd);return{open:({task:n,isFromLead:a,onClose:i})=>{n?e({task:n,isFromLead:a,onClose:i}):t({})}}})();return{isSending:n,ok:s,handleSubmit:l((async t=>{try{i();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 Nd({programId:e,profileId:a,formData:t,saveUserData:c}),u.close(),m.open(t.phone,a)},i=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)}},l=vd(t);u.open({phone:t?.phone,consents:l,onSuccess:i}),r()}}catch{o(!1)}var n}),[])}},vd=e=>Object.keys(Es).filter((t=>e[t])).map((e=>Es[e]?.text)),Nd=async({programId:e,profileId:t,formData:n,saveUserData:a})=>{const i=wd(n);await Dc(((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&&$t(l,!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,i));const{taskId:l,participantId:r}=await(async e=>await Tr("/user-data/createDraftTask","POST",e)||{})({profileId:t,programId:e});try{await _c((({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&&$t(s,!0),id:e,midname:r,name:i,surname:l,profile:{id:n},participantContacts:id({phone:o&&Ut(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}],marketingInfo:xd()}}})({participantId:r,taskId:l,profileId:t,formData:i}))}catch(e){console.log(e)}a({participantId:r,taskId:l,profileId:t,programId:e,formData:n})},wd=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},Cd={surname:"",name:"",middleName:"",limitedBirthday:void 0,phone:"",email:"",processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,consentPfrFlg:!1},Sd=(e,t)=>{if(t)return{...t,limitedBirthday:new Date(t?.limitedBirthday||0)};return{...Object.fromEntries(e.map((e=>[e.name,Cd[e.name||""]])))}},kd=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:Ui(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:Id(i),addressFact:Id(l),esiaAccountTypeCd:t?.esiaAccountType}},Id=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}},Td=(e,t)=>{const n=Jt(),[a,{setTrue:s,setFalse:o}]=nn(!1),c=yd(),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((()=>Sd(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},Tr("/esia/updateProfileEsia","POST",l));r&&d((e=>({...e,...kd(r)}))),n.assign(t)}finally{o()}var l}),[t]);return i((()=>{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}]},Rd=d((({className:e,title:t,programId:n="",nextStepLink:a="/credit-lead",button:l,...s})=>{const d=r((()=>sr?.flatMap((e=>e?.inputs))||[]),[sr]),m=r((()=>Il(d)),[d]),[h,{isLoading:p}]=Td(d,a),{isSending:g,ok:f,handleSubmit:x}=bd({programId:n,nextStepLink:a}),[,{field:y,onSubmit:b}]=dn(h,{formValidator:m,onSubmit:x}),v=un(Jl);return i((()=>{void 0!==f&&v.open({ok:f})}),[f]),o(mn,{className:u("container space-y-m",e),title:t,...s,children:c("form",{onSubmit:b,className:"space-y-m relative",children:[p?o(ql,{blur:!1}):null,sr.map(((e,t)=>c("div",{className:u($l(e.columns),"grid gap-x-m"),children:[Ul(e.title),Rc({field:y,inputs:e?.inputs})]},`section-${t}`))),Pc(l,g)]})})})),Bd=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(k,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Pd=e=>e%2!=0,Dd=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]}))),_d=d((({className:e="",label:t,icon:n,dataTheme:a="pc",disabled:i=!1,onClick:l})=>o(Dd,{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(Ae,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Ed=({isUnfolded:e,onToggle:t})=>o(_d,{icon:e?"ArrowUpIcon":"ArrowDownIcon",label:e?"Скрыть":"Развернуть",onClick:t}),Ad="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Md=d((({topItemsCount:e=0,label:t="",block:n,blocksToRender:a=[],...i})=>{const[l,r]=e>0?[a.slice(0,e),a.slice(e)]:[a,[]],[s,{toggle:d}]=nn(!1);return c("div",{className:u("space-y-2xs",{hidden:!a.length}),children:[c("div",{className:u(Ad),children:[P(l,{...i.options,parent:n}),Pd(l.length)?o(Lt,{className:"col-span-6",...i}):null]}),c(Or,{children:[c(zr,{className:u(Ad),isUnfolded:s,children:[P(r,{...i.options,parent:n}),Pd(r.length)?o(Lt,{className:"col-span-6",...i}):null]}),o(_d,{className:u({hidden:e<1}),dataTheme:i.options?.page?.colorPalette,disabled:!r?.length,label:t,icon:s?"ArrowUpIcon":"ArrowDownIcon",onClick:d})]})]})})),Od=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",zd=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Vd=10;function Fd(e=0){const t=Math.round(e*Vd);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const Ld=d((({className:e,style:t,idx:n,activeIndex:a,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:n}={}){const a=s(null),l=r((()=>({threshold:Fd(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}(l((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===a),ref:h,role:"listitem",children:d})})),jd=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],$d=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},y=s([]),b=l(((e,t)=>{const n=[...y.current||[]];n[e]=t,y.current=n,g&&g(n),f&&f(qd(n))}),[g,f]),v=i>0?r*Number(i)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?Ud(c,v):{},...N?zd(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(Ld,{className:u(m,i?jd[i-1]:"",{"h-full":N},t),style:w?Ud(c/4):{},activeIndex:a,idx:n,observerOptions:x,onIntersection:b,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Ud=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),qd=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Wd={"horizontal-list":"w-6","vertical-list":"h-6"},Hd=({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?Wd[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(i)},String(i)),Yd=({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))},Gd=e=>t=>e.scrollWidth/t,Kd=e=>(t,n)=>{e.scrollBy({left:n*Gd(e)(t),behavior:"smooth"})},Xd=({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?[ro()(i),io()(i)]:[-1,-1],m=c>0,u=d<e-1,h=l((()=>{var t;n.current&&(m?Kd(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=l((()=>{n.current&&(u?Kd(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}]},Jd={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Zd=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]=Xd({itemCount:s.length}),g=Qd(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($d,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Yd({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",Jd[a],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Hd({activeIndex:t,onClick:f,listType:a}))}):null})),Qd=(e=!1)=>({behavior:e?"auto":"smooth"}),em=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"})}))),tm=d((e=>o(em,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),nm=d((e=>o(em,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),am="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",im=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?lm(t):null,l?o(tm,{className:u(rm(i),m?"left-1":"left-0"),onClick:s}):null,r?o(nm,{className:u(rm(i),m?"right-1":"right-0"),onClick:d}):null]})})),lm=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(am,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(am,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),rm=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),sm=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 y=Array.isArray(g)?g.length:0,[b,v]=Xd({itemCount:y,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===l?"relative h-full":""),children:[o($d,{containerRef:b,activeIndex:N,visibleItemCount:i,gap:n,padding:a,listType:l,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(im,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(Zd,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:y,listType:l,version:t,navButtons:x,containerRef:b,containerScroll:v})]})})),om=({blocksToRender:e,...t})=>o(sm,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Od(!0)),children:R(e,t)},String(n))})}),cm=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...a})=>{switch(e?.view){case"grid":return c("div",{children:[dm(n,t),o(Md,{...e,...a,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[dm(n,t),om({...a,blocksToRender:t})]});default:return null}})),dm=(e,t)=>e&&!t.length?o(Bd,{...e}):null,mm=e=>t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:`sep-${a}`},n):[n]),[]),um=d((({value:e,onChange:t,items:n=[],multiple:a})=>n.map((n=>o(Ai,{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))))),hm=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,mm(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(pm(a)).filter(Boolean))]}),n?o("div",{children:o(Gl,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:i,children:n?.text})}):null]}))),pm=e=>([t,n])=>{const a=n?.type;return"array"===a?gm(t,e)(n):null},gm=(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(Ae,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(um,{items:a,multiple:!n?.single,...t(e)})]},e)},fm=e=>e;function xm(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const ym=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,bm=(e,t)=>Object.entries(e).map((([n,a])=>"number"==typeof a?Array.isArray(t[n])?((e,t)=>n=>ym(t[e])||ym(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>ym(t[e])||ym(n[e])||vm(t[e])<=vm(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>ym(t[e])||ym(n[e])||vm(t[e]?.min)>=vm(n[e]?.min)&&vm(t[e]?.min)<=vm(n[e]?.max))(n,e):Array.isArray(a)?((e,t)=>n=>ym(t[e])||ym(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>ym(t[e])||ym(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),vm=e=>Number(e||0),Nm=(e,{block:t,page:n,normalize:a=fm})=>{const i=t?.blocks||[],[l,s]=dn(e),o=r((()=>xm(i,i.map((e=>Mt(e.content,n?.fallback))))),[i,n?.fallback]),c=l===e?i:((e,t)=>(n=fm)=>e?.filter((([,e])=>bm(t,n(e)||{}))).map((([e])=>e)))(o,l)(a);return[l,{blocksToRender:c,blocksWithProps:o},s]},wm={},Cm={},Sm=Vt((({className:e,filtrationSchema:t=wm,consumerField:n={},resetButton:a,...i})=>{const[,{blocksToRender:l},{field:r,reset:s}]=Nm(Cm,{block:i.block,page:i.options?.page}),d=o(Mn,{className:"w-64",label:n?.title,options:km(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>km(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...i,children:[o(hm,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Gl,{type:"reset",className:"mt-lg w-64",onClick:s,version:a?.version,children:a?.text})})]})}),o(cm,{blocksToRender:l,...i})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),km=e=>xm(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Im=(e=!1)=>e?"text-left":"text-center",Tm={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Rm=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",Tm[n],e),children:o(W,{...l,width:"54%",height:"54%",name:i})}):null})),Bm=d((({className:e="",title:t,benefitList:n,...a})=>{const i=ke();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(w,{headingType:"h3",as:"h2",className:Im(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(Pm)}):null]})})),Pm=({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(Rm,{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(w,{headingType:"h6",children:e}),o(Ae,{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)),Dm=(e,t,n)=>{return o(sm,{children:e.map((a=n,({icon:e,title:t,description:n},i)=>c("div",{className:u("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(Ae,{size:"text-h6",font:"font-normal",align:a,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(Ae,{size:"text-h6",font:"font-normal",align:a,children:n}):null]},String(i))))});var a},_m=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(k,{defaultPadding:"",title:l,description:i,headlineVersion:"M"}),e?.length?Dm(e,0,t):null]}))),Em={start:"justify-start",center:"justify-center",end:"justify-end"},Am=d((({buttons:e,className:t="",align:n,...a})=>{const i=n&&u("flex",Em[n]);return o(g,{className:u("!bg-transparent",i,t),defaultPadding:"p-0",...a,children:$e(e)})})),Mm=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:a=2,depositeName:i,isShowDepositeName:l,color:r="text-secondary-text"})=>c("div",{children:[o(Ae,{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]})]}))),Om=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o(Ae,{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(C,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),zm=({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(Mm,{title:e,rate:t,unit:n,fractionDigits:a,color:i,...r})}),o(qs,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:a,fixed:!0,color:i,...r}),l]}):o(Om,{title:e,...r}),Vm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Fm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Lm=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,[i,l]=((e,t,n)=>{const{maxBonus:a=5e3,prefMonthsNum:i=Vm.prefMonthsNum,prefTravelBonusRate:l=Vm.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||Fm,n,a);return{...t,...e,monthBonus:i,yearBonus:l}},jm=Vt((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,...l})=>{const[r,{field:s}]=dn({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=Lm(r,n);return o(Fs,{className:e,title:t,...l,children:c("section",{className:u(Ls,e),children:[c("div",{className:js,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?zm({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:$s,children:[f>=0?o(qs,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,$e(a,{isVertical:!0}),Ks(i)]})]})})})),$m=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Um=e=>Zs({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),qm=" (c капитализацией)",Wm=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:i=[],isCapitalization:l=!1})=>c("div",{className:$s,children:[o(qs,{title:`Доход в конце срока${l?qm:""}`,value:e,postfix:n,prefix:"+"}),o(qs,{title:`Сумма в конце срока${l?qm:""}`,value:t,postfix:n}),$e(a,{isVertical:!0}),i?.map(Ks)]}),Hm={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Ym={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Gm=(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?Hm[e?.rateType]:"",{data:n}=Kn(t?`${qt}/depositrates/${t}`:null,Dt);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&Km(s,e)&&mo(a,["minSum","maxSum"],e)&&mo(n,["minDays","maxDays"],e)))||Ym,{rate:m}=d,u=Xm(m,e),h=a+u,p=c||[Ym];return{...d,...co(["minSum","maxSum"],p),...co(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},Km=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Xm=(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)},Jm=Vt((({className:e="",title:t,buttons:n,footnote:a,bottomFootnote:i,isShowDepositeName:l,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=Gm(m,s),{income:g,finalSum:f,rate:x,depositeName:y}=p;return o(Fs,{className:e,title:t,...d,children:c("section",{className:u(Ls,e),children:[c("div",{className:js,children:[eo({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(b={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(ca,{items:[`От ${$m(b.min||0)}`,`До ${$m(b.max||0)}`],step:1,...b})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Zm(p,h),Um({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),zm({rate:x,depositeName:y,isShowDepositeName:l}),Wm({income:g,finalSum:f,buttons:n,footnotes:[a,i]})]})});var b})),Zm=(e,t)=>c("div",{className:"space-y-s",children:[o(Ae,{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})]})]}),Qm=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},eu={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},tu=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.[0]?iu(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=>[au({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),au({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),au({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),au({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,mo(a,["minSum","maxSum"],t),mo(i||l,["minMonths","maxMonths"],t)].every(Boolean)))||eu,{rate:u}=m,h=nu(u,e),p=a+h,g=t||[eu];return{...m,...co(["minSum","maxSum"],g),...co(["minMonths","maxMonths"],g),availableMonths:Qm(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}},nu=(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)},au=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],iu=(e,t)=>e+Math.round((t-e)/2),lu=(e="rub")=>"rub"===e,ru=(e,t)=>{const{minMonths:n,maxMonths:a}=co(["minMonths","maxMonths"],du(t,e?.currency)),i=e.monthsValue||Math.round((n+a)/2);return{monthsValue:ia(i,n,a)}},su=(e,t)=>{const{minSum:n,maxSum:a}=co(["minSum","maxSum"],du(t,e?.currency)),i=e.moneyValue||n;return{moneyValue:ia(i,n,a)}},ou=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),cu=e=>{const t=lu(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},du=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},mu=(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]}),uu(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Um({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]}),uu(e.isShowNewClient),e.isShowNewClient?o(Ya,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},uu=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,hu={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},pu={text:"₽",key:"rub"},gu=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))??[pu],g=l((e=>t=>e?{...t,...cu(t),...su(t,e),...ru(t,e),...ou(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:pu},{normalizer:g}),y=x?.("currency")?.value??pu,b=x?.("isNewClient")?.value,v=du(h,y),N=tu(f,v,s),{rate:w,income:C,finalSum:S,type:k=""}=N,I=l((()=>{to({field:x,defParams:Ws(v,b),calcParams:N,monthsValue:"minMonths",map:hu})}),[x,h]);i((()=>{!fo(d)&&v&&I()}),[d,h]);const T=w===Ws(v,b)?.rate;return o(Fs,{className:e,title:t,...m,children:c("section",{className:u(Ls,e),children:[c("div",{className:js,children:[c("div",{className:"flex gap-m",children:[eo({className:"w-full",title:`Сумма, ${y?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:y?.text,step:fu(y?.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}),mu({...N,...s},x)]}),zm({rate:w,children:yu(I,T)}),Wm({income:C,finalSum:S,buttons:[...a,xu(n?.buttons,k)],footnotes:[r],postfix:y?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),fu=(e="")=>lu(e)?1e3:100,xu=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},yu=(e,t=!1)=>t?null:o(Gl,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),bu=e=>vu({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&vu({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),vu=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],Nu={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},wu=(e,t,n)=>{const{moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}=e,s=t?.rateRows||[Nu],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>bu({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:i,oldMonthlyPayment:l,moneyExtra:r})=>e?.find((e=>bu({row:e,userInputParams:t,paramsViewSettings:n})&&mo(a+r,["minSum","maxSum"],e)&&mo(l,["minSumOld","maxSumOld"],e)&&mo(r,["minSumExtra","maxSumExtra"],e)&&mo(i,["minMonths","maxMonths"],e)))||Nu)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,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:i,oldMonthlyPayment:l,moneyExtra:r,monthlyPayment:g,benefit:f}},Cu=Vt((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,paramsViewSettings:l,...r})=>{const[s,{field:d}]=dn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=wu(s,n,l),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:js,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}),Su({...m,...l},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($s,"@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}),$e(a,{isVertical:!0}),Ks(i)]})]})})})),Su=(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})]}),ku=d((e=>{const{onChange:t,min:n,max:a,defaultValue:i="0",fractionDigits:r=0,...s}=e,c=aa(e,{normalize:(e=i)=>n&&a?String(ia(Number(Iu(e)),n,a)):Iu(e),format:He(r)}),d=l((e=>t&&t(Iu(e))),[t]);return o(vn,{onChange:d,...s,...c})})),Iu=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Tu=d((e=>o(ku,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ae,{size:"text-xl",font:"font-light",children:"₽"})})}))),Ru=new ci;function Bu(){return mi(Ru)}si(Ru,new oi(globalThis?.sessionStorage));const Pu={private:"p2p/registerP2P",business:"b2c/registerB2C"},Du=({onClose:e,errorCode:t,errorMessage:n})=>{const a=t?`Код ошибки - ${t}`:"Пожалуйста, повторите позднее";return o(Xl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(k,{className:"w-full",title:"Ошибка перевода",description:a,headlineVersion:"XS",isEmbedded:!0}),n?c("div",{className:"bg-secondary-dark rounded-xl px-4 pt-4 pb-8 grid gap-4 grid-cols-12",children:[c("div",{className:"col-span-8",children:[" ",n]}),o("div",{className:"col-span-4",children:o(ne,{image:{icon:"ResponseFailIcon",iconVersion:"normal"}})})]}):null]})})},_u=e=>{const t=un(Du),n=Bu(),a=Jt(),i="private"===e?"p2p":"b2c";return l((async({amount:l})=>{const r=await(async(e,t)=>{const n=Jt(),a={amount:String(t),currency:"643",returnUrl:`${n.origin}/p2p/success`,failUrl:`${n.origin}/p2p/failed`,language:"ru"},i=`${qt}/payment/${Pu[e]}`;try{const e=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(a)});return e.ok?await e.json():null}catch(e){return null}})(e,l);(e=>Boolean(e?.formUrl)&&Boolean(e?.orderId))(r)&&(n.transaction={orderId:r.orderId,type:i,url:a.href},a.assign(`${i}/?formUrl=${encodeURIComponent(r.formUrl)}`)),(e=>Boolean(e?.errorMessage)&&0!==e?.errorCode)(r)&&t.open({errorCode:r.errorCode,errorMessage:r.errorMessage})}),[e])},Eu={amount:1500},Au=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:a,formType:l="private",...r})=>{const[s,{setValue:d}]=nn(!1),m=_u(l),[{amount:h},{field:p,onSubmit:f}]=dn(Eu,{onSubmit:m});return i((()=>{d(h<=0)}),[h]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?o(w,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",onSubmit:f,children:[o(Tu,{valid:!s,label:n,max:3e5,min:1,...p("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:h}),a?.text?o(Gl,{className:"w-full mt-lg",type:"submit",disabled:s,children:a.text}):null]})]})})),Mu=({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(C,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Ou="relative h-full",zu={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Vu=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...a})=>{const{blocks:i}=a.block||{},l=i?.some(ju),r=n?{defaultPadding:"p-6xl pb-m"}:{};return D({...a,renderProps:(n,a,i)=>c("div",{className:Fu(n,{someCardsHighlighted:l}),children:[R(n,a,{className:Lu(n,{someCardsHighlighted:l,showBorder:!e,cardSize:t}),...r,blockIndex:i}),ju(n)?Mu({className:"absolute top-0 -right-4 z-40"}):null]},String(i))})},Fu=(e,{someCardsHighlighted:t})=>u(Ou,t&&(ju(e)?"pt-3xl":"pt-3xl sm:pt-16")),Lu=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u(Ou,"min-w-80",zu[a],t&&(ju(e)?"pt-3xl sm:pt-16":"pt-3xl"),Od(n),n&&"h-full"),ju=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,$u=Vt((({className:e,visibleItemCount:t=0,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(sm,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:i?16:0,padding:0,arrowsPadded:a,navButtons:r?Uu(s?.block?.blocks):[],hasBlur:!0,children:Vu({noCardBorder:n,cardSize:l,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Uu=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],qu="z-10 border border-solid w-full h-full",Wu=u(qu,"absolute hidden @xl:block border-transparent"),Hu=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(Wu,"top-9 right-12 bg-green-dark")}),o("div",{className:u(Wu,"top-6 right-8 bg-green")}),o("div",{className:u(Wu,"top-3 right-4 bg-green-light")}),c("div",{className:u(qu,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(k,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),$e([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Yu={black:"bg-black",white:"bg-white"},Gu=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(k,{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:$e([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(Ae,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Ku)]}):null,i?c(Ae,{size:"text-h3",align:"text-left",children:[i," ₽"]}):null]})}))),Ku=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Yu[e]}`},String(t)),Xu=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})),Ju=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(k,{isEmbedded:!0,title:i,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(k,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),a?.length?Zu(a):null]})}))),Zu=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(Xu,{...e},String(t))))}),Qu=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),eh=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})})),th=[{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"}}],nh=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=>th.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=je(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},ah(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:$e(m,{className:ih(s??!1,i??!1,n),buttonClassName:h})}),r?o(Ae,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),ah=(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":""),lh=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:y=false,isImageSecondary:b=!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(eh,{href:i,target:m,className:"h-full",data:Qu(v),children:c(Re,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(k,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Qe(je(l)?o(ne,{image:l}):null,x),buttons:d.length?o(nh,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:y,isImageSecondary:b,imageAlign:"center",children:[o(Le,{benefits:f}),s?o(_e,{__html:s,isDotted:r,itemSize:"list-s"}):null,rh(a,p)]})})}))),rh=(e,t)=>e?o(C,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,sh=new me,oh=(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(Ae,{size:"text-m",color:"text-secondary-text",children:n})}):null,a?o("div",{className:"mt-2xs",children:o(Ae,{size:"text-xl",color:"text-primary-text",children:a})}):null,i?.length?o("div",{className:"text-primary-main",children:$e(i)}):null]},String(t))},ch=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(oh),[y,b]=d>0?[x.slice(0,d),x.slice(d)]:[x,[]],[v,N]=a(!1);i((()=>sh.subscribe("fold",(e=>{e&&h?.parent&&e.parent===h?.parent&&N(e.isUnfolded)}))),[h?.parent]);const C=l((()=>{sh.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:[je(r)?o("div",{className:"self-center",children:o(ne,{image:r})}):null,t?o(w,{className:u("pt-xs",n),headingType:"h5",title:t}):null,s?.text?o(Ne,{className:"w-full mt-m mb-lg",...s}):null,b.length?c(Or,{children:[c("div",{children:[y,o(zr,{isUnfolded:v,children:b})]}),m.length>=d?o(dh,{isUnfolded:v,data:p,onClick:C}):null]}):o("div",{children:y})]})})),dh=d((({data:e,isUnfolded:t,onClick:n})=>o(Vr,{className:"w-full",...t?{name:"ArrowUpIcon",text:"Скрыть",data:e}:{name:"ArrowDownIcon",text:"Подробнее о тарифе"},onClick:n}))),mh=()=>{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 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)}};i();const l=setInterval(i,24e4);return()=>clearInterval(l)},uh=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]})]}))),hh=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(uh,{step:a,showPercentage:!1})]})})}));var ph;!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"}(ph||(ph={}));const gh=e=>Tr("/user-data/getTaskStatus","POST",e),fh=e=>Rr("/user-data/sendSignalToProcess","POST",e),xh=(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},yh=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(k,{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(Lc,{interval:e,time:l,setTime:e=>{0===e&&t(),r(e)}})})]}),i?o(_e,{__html:i}):null]})]})})),bh=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(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(yh,{interval:d,intervalExpireAction:m}):null]}),o(vh,{title:a,items:i}),o(vh,{title:l,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]}))),vh=({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(Ae,{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",$l(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:Nh(e)},t)))}):null]})]}):null},Nh=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ae,{color:"text-secondary-text",size:"text-l",children:e}),o(Ae,{color:"text-primary-text",size:"text-xl",children:t})]}),wh=d((()=>o(bh,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),Ch=d((({handleExpireTimer:e})=>{const{statusInfo:t}=pi();return o(bh,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:t?.cardCategory}]})})),Sh=d((()=>{const{statusInfo:e}=pi();return o(bh,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),kh=d((()=>{const{statusInfo:e}=pi();return o(bh,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:Ih(e),buttonText:"Вернуться на главную"})})),Ih=e=>{const t=[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:e?.cardCategory}];return e?.deliveryAddress&&e?.deliveryDate?t.concat([{label:"Адрес доставки",description:e?.deliveryAddress},{label:"Дата доставки",description:$t(e?.deliveryDate)}]):t},Th=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Rh=d((()=>{const[e,t]=a(ph.process),{taskId:n}=pi();i((()=>{(async()=>{for(const e of Th)await fh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await gh({taskId:n});a&&a?.statusCd!==ph.process&&(e(),t(a.statusCd))}),[n]);xh(r,3e4);return Bh(e,(()=>t(ph.rework)))})),Bh=(e,t)=>({IN_PROCESS:o(Ch,{handleExpireTimer:t}),CANCELLED:o(wh,{}),FAILED:o(wh,{}),DRAFT:o(wh,{}),APPROVED:o(kh,{}),PRE_DECISION:o(kh,{}),REVISION:o(Sh,{})}[e]||o(Sh,{})),Ph=e=>(t,n)=>t.filter((e=>e)).map((t=>[Dh(n,e),_h(t,e),Oh(t,e),Eh(t,e),Ah(t,e),Mh(t,e)].some(Boolean)?{...t,required:!1}:t)),Dh=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,_h=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,Eh=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,Ah=({name:e},t)=>"addressFact"===e&&t("addressMatch"),Mh=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),Oh=({name:e},t)=>"snils"===e&&zh(t),zh=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key,Vh={...kc,...Ic},Fh=({field:e,inputs:t,params:n})=>t.map(jl(e,n,Vh)),Lh=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Ph(jh(t))(e,n);return c("div",{className:u($l(i),"grid gap-x-m"),children:[Ul(l),Fh({field:t,inputs:s,params:a})]},`section-${r}`)})),jh=e=>t=>e(t)?.value,$h=d((({step:e,isSending:t,onPrevStep:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Gl,{onClick:n,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Gl,{isLoading:t,type:"submit",children:a?"Отправить заявку":"Далее"})]})})),Uh=e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:i}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:i}},qh=e=>{const{currency:t,paymentSystem:n,cardCategory:a,codeWord:i}=e;return{currencyCode:t?{key:t}:void 0,paymentSystemTypeCd:n,classCard:a,codeWord:i}},Wh=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:$t(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:id({organizationPhone:p&&Ut(p)}),participantAddresses:ld({organizationAddress:g}),ownershipShare:"BUSINESS_OWNER"===f?.key?x:""}},Hh=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:y}=e;return{birthDate:$t(i,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:$t(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:$t(g,!0),houseTypeCd:f,participantContacts:id({phone:Ut(l),email:r}),participantAddresses:ld({addressRegistration:x,addressFact:y}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}},Yh=e=>{const{methodObtain:t,deliveryDate:n=""}=e,a="courier"===t;return a?{courierDeliveryFlg:a,deliveryDate:(i=n.toString().replace(/(GMT)[+-]\d{4}/,"GMT+0000"),i?new Date(i).toISOString().split(".")[0]:""),deliveryTimeCd:{value:"TIME_2"},office:{id:"3"}}:{};var i},Gh=e=>{const{addressRetail:t,methodObtain:n}=e;return t?.key&&"office"===n?{office:{id:t.key}}:{}},Kh=(e,t)=>{switch(e){case 0:default:return{};case 1:return Hh(t);case 2:return Wh(t);case 3:return rd(t);case 4:return Uh(t);case 5:return(e=>{const{addressCourier:t,methodObtain:n}=e;return"courier"===n?{participantAddresses:ld({addressCourier:t})}:{}})(t)}},Xh=[{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}],Jh=e=>{try{return e?new Date(e):void 0}catch(e){return}},Zh=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:i,setFalse:s}]=nn(!1),o=5===e,c=pi(),d=r((()=>((e,t)=>({...Xh[e],...t,limitedBirthday:Jh(t?.limitedBirthday),dulIssueDateField:Jh(t?.dulIssueDateField),participantDateRegistration:Jh(t?.participantDateRegistration),beginDate:Jh(t?.beginDate),deliveryDate:Jh(t?.deliveryDate)}))(e,c.leadForm)),[e,c.leadForm]),m=l((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=l((async a=>{i(),c.leadForm=a;try{const{taskId:i,profileId:l,participantId:r}=c;if(i&&l&&r){const t=await _c((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,...Gh(a),authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Kh(i,a)}],...qh(a),...Yh(a)}}))({participantId:r,taskId:i,profileId:l,step:e,formData:a}));m(t)}o?n?.():t()}catch(e){}finally{s()}}),[o,m]);return[d,u,a]},Qh=d((({step:e,sections:t,onPrevStep:n,onNextStep:a,onFinish:i})=>{const s=r((()=>t?.flatMap((e=>e?.inputs||[]))),[t]),d=l((t=>Il(Ph((e=>t[e]))(s,e))(t)),[s]),[m,u,h]=Zh({step:e,onNextStep:a,onFinish:i}),[,{field:p,onSubmit:g}]=dn(m,{formValidator:d,onSubmit:u});return c("form",{onSubmit:g,className:"space-y-m",children:[Lh({sections:t,field:p,step:e}),o($h,{isSending:h,step:e,onPrevStep:n})]})})),ep=[[{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"}]}]],tp=[[{title:"Параметры карты",inputs:[]},{inputs:[{name:"currency",required:!0},{name:"paymentSystem",required:!0},{name:"cardCategory",required:!0},{name:"codeWord",required:!0}]}],...ep,[{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"]}}]}]],np=["Параметры карты","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Выбор способа получения"],ap=d((({className:e,...t})=>{const[n,r]=a(0),d=s(null),m=l((()=>d?.current?.scrollIntoView({behavior:"smooth"})),[d]);i(mh,[]);const u=l((()=>{r((e=>Math.min(e+1,6))),m()}),[]),h=l((()=>{r((e=>Math.max(e-1,0))),m()}),[]),p=tp[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(hh,{stepsTitles:np,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:f?o(Rh,{}):o(Qh,{step:n,sections:p,onNextStep:u,onPrevStep:h,onFinish:x},String(n))})]})})})),ip=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(uh,{step:a,showPercentage:!1})]})})})),lp=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(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(yh,{interval:d,intervalExpireAction:m}):null]}),o(rp,{title:a,items:i}),o(rp,{title:l,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]}))),rp=({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(Ae,{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",$l(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:sp(e)},t)))}):null]})]}):null},sp=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ae,{color:"text-secondary-text",size:"text-l",children:e}),o(Ae,{color:"text-primary-text",size:"text-xl",children:t})]}),op=d((()=>o(lp,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),cp=d((({handleExpireTimer:e})=>{const{statusInfo:t}=pi();return o(lp,{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?"Аннуитетный":"Дифференцированный"}]})})),dp=d((()=>{const{statusInfo:e}=pi();return o(lp,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),mp=d((()=>{const{statusInfo:e}=pi();return o(lp,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.calculator?.monthsValue+" мес"},{label:"Тип платежа",description:e?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),up=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],hp=d((()=>{const[e,t]=a(ph.process),{taskId:n}=pi();i((()=>{(async()=>{for(const e of up)await fh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await gh({taskId:n});a&&a?.statusCd!==ph.process&&(e(),t(a.statusCd))}),[n]);xh(r,3e4);return pp(e,(()=>t(ph.rework)))})),pp=(e,t)=>({IN_PROCESS:o(cp,{handleExpireTimer:t}),CANCELLED:o(op,{}),FAILED:o(op,{}),DRAFT:o(op,{}),APPROVED:o(mp,{}),PRE_DECISION:o(mp,{}),REVISION:o(dp,{})}[e]||o(dp,{})),gp=({field:e,inputs:t,params:n})=>t.map(jl(e,n,{...kc})),fp=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Ph(xp(t))(e,n);return c("div",{className:u($l(i),"grid gap-x-m"),children:[Ul(l),gp({field:t,inputs:s,params:a})]},`section-${r}`)})),xp=e=>t=>e(t)?.value,yp=d((({step:e,onPrevStep:t,isSending:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Gl,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(Gl,{type:"submit",isLoading:n,children:a?"Отправить заявку":"Далее"})]})})),bp={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},vp=e=>{const{moneyValue:t,monthsValue:n,isAnnuity:a}=e?.calculator??{};return{loanAmount:t,creditPeriod:n,paymentTypeCd:bp[a?"annuity":"differential"]}},Np=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},wp=(e,t)=>{switch(e){case 0:return(e=>{const{isInsurance:t,isSalaryClient:n}=e?.calculator??{};return{payrollCardRshbFlg:t,consentInsuranceFlg:n}})(t);case 1:return Hh(t);case 2:return Wh(t);case 3:return rd(t);case 4:return Uh(t);default:return{}}},Cp=[{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}],Sp=e=>{try{return e?new Date(e):void 0}catch(e){return}},kp=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:i,setFalse:s}]=nn(!1),o=5===e,c=pi(),d=r((()=>((e,t)=>({...Cp[e],...t,limitedBirthday:Sp(t?.limitedBirthday),dulIssueDateField:Sp(t?.dulIssueDateField),participantDateRegistration:Sp(t?.participantDateRegistration),beginDate:Sp(t?.beginDate),deliveryDate:Sp(t?.deliveryDate)}))(e,c.leadForm)),[e,c.leadForm]),m=l((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=l((async a=>{i(),c.leadForm=a;try{const{taskId:i,profileId:l,participantId:r}=c;if(i&&l&&r){const t=await _c((({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:"Заемщик"},...wp(i,a)}],...vp(a),...Np(a),esiaAccountTypeCd:{key:a?.esiaAccountTypeCd?.key}}}))({participantId:r,taskId:i,profileId:l,step:e,formData:a}));m(t)}t(),o&&n?.()}catch(e){}finally{s()}}),[o,m]);return[d,u,a]},Ip=d((({step:e,sections:t,programsSource:n,onPrevStep:a,onNextStep:i,onFinish:s})=>{const{programId:d}=pi(),m=n?.[d??""],u=r((()=>t?.flatMap((e=>e?.inputs??[]))),[t]),h=l((t=>Il(Ph((e=>t[e]))(u,e))(t)),[u]),[p,g,f]=kp({step:e,onNextStep:i,onFinish:s}),[,{field:x,onSubmit:y}]=dn(p,{formValidator:h,onSubmit:g});return c("form",{onSubmit:y,className:"space-y-m",children:[fp({sections:t,field:x,step:e,params:{calcData:m}}),o(yp,{step:e,isSending:f,onPrevStep:a})]})})),Tp=[[{columns:1,inputs:[{name:"calculator"}]}],...ep,[{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"}]}]],Rp=["","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Отделение Банка"],Bp=Vt((({className:e,programsSource:t,...n})=>{const[r,d]=a(0),m=s(null),u=l((()=>m?.current?.scrollIntoView({behavior:"smooth"})),[m]);i(mh,[]);const h=l((()=>{d((e=>Math.min(e+1,5))),u()}),[]),p=l((()=>{d((e=>Math.max(e-1,0))),u()}),[]),f=Tp[r],x=0===r,[y,{setTrue:b}]=nn(!1);return o(g,{className:e,...n,children:c("div",{ref:m,className:"container grid grid-cols-12",children:[x||y?null:o(ip,{stepsTitles:Rp,step:r,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:y?o(hp,{}):o(Ip,{step:r,sections:f,programsSource:t,onNextStep:h,onPrevStep:p,onFinish:b},String(r))})]})})})),Pp=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Dp=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),_p=1e9,Ep={sum:{min:1e4,max:_p},period:3},Ap=Vt((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:i,...l})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Nm(Ep,{block:l.block,page:l.options?.page,normalize:e=>({...e,period:Mp(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=Op(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...l,children:[o(hm,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Tu,{label:a?.title,min:500,max:_p,...d("sum",{parse:e=>({min:Number(e),max:_p}),format:({min:e})=>String(e)})}),o(ca,{title:i?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(cm,{blocksToRender:r,...l})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Mp=e=>_t((e?.paramsSource?.rateRows||[]).filter(Pp).flatMap((e=>Dp(e.minMonths,e.maxMonths)))),Op=e=>_t(e.flatMap((e=>e||[])).filter(Pp).flatMap((e=>Dp(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],zp=[{key:"10"},{key:"50"},{key:"100"}],Vp=({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(Mn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:zp,iconVersion:"black"})]})},Fp="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",Lp=(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:Fp,"aria-label":`Страница ${l}`,children:l},String(t)):null},jp={width:"24",height:"24"},$p=({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:Up(1===e),...jp})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Fp,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,a.map(Lp),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Fp,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Up(e===n),...jp})})]})},Up=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",qp=({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($p,{currentPage:e,onPageChange:t,totalPages:n}),a&&i?o(Vp,{itemCount:a,onItemCountChange:i}):null]}),Wp=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",xn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:i})]})})),Hp=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Wp,{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(Gl,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Yp=(e,t)=>o(Rm,{...e,iconBgVersion:t,className:"shrink-0"}),Gp=d((({title:e,timestamp:t,publicId:n})=>{const a=pe(),{href:i}=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:[Yp({icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Ae,{size:"text-m","font-weight":"font-light",children:$t(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:i,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),Kp=`${qt}/depository`,Xp={startDate:void 0,endDate:void 0,query:""},Jp=Vt((({className:e,...t})=>{const[n,i]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=dn(Xp),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:a,endDate:i})=>{const l=a?$t(a,!0):"",r=i?$t(i,!0):"",s=new URLSearchParams(Kp);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}=Kn(Kp+o,Dt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=l((e=>i(e-1)),[]),y=l((e=>{r!==e?(s(e),i(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(Hp,{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(Ae,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Ae,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(Gp,{...e},String(e.publicId)))):o(Bd,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(qp,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:y})]})]})})),Zp=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,Qp=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:Zp(a)}),o(k,{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]}))),eg=`${qt}/region`;function tg(e="Москва"){return hi().location??{name:e}}function ng(e="Москва"){const t=hi(),n=l((async()=>{if(!t.location){const n=await Pt(eg);t.location=n??{name:e}}}),[t,e]);return Kn(eg,n),t}var ag;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(ag||(ag={}));const ig=new Intl.NumberFormat("ru",{style:"currency",currency:ag.RUB}),lg=e=>e?ig.format(e):"",rg="text-m font-light text-secondary-text ",sg=`${rg} text-left`,og=`${rg} pl-5xl text-center`,cg=`${rg} pl-5xl text-right`,dg={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},mg=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:sg,children:o(Ae,{size:"text-m",children:"Валюта"})}),o("th",{className:og,children:o(Ae,{size:"text-m",children:"Купить"})}),o("th",{className:cg,children:o(Ae,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(ug)})]}))),ug=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:dg[t]},width:"24",height:"24"}):null,o(Ae,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Ae,{size:"text-h6",children:lg(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ae,{size:"text-h6",children:lg(e?.buyExchangeRate)})})]},t)},hg={icon:"GpsIcon"},pg=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Rm,{...hg,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(C,{size:"text-l",color:"text-primary-main",children:t}):null,o(C,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),gg=(e,t,n)=>{const a=Number(fg(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)},fg=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function xg(e){if(!e)throw new Error("Value should be fulfilled");return e}const yg=e=>t=>{const[,n]=xg(e.find((([e])=>e(t))));return n(t)},bg=e=>yg(e.map((([e,t])=>[e,()=>t])));bg.if=e=>new vg(void 0,e);class vg{parent;predicate;unit;get entry(){return[xg(this.predicate),xg(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new vg(this,e)}then(e){return new vg(this.parent,this.predicate,e)}else(e){return yg([...Ng(this),[()=>!0,e]])}}const Ng=e=>[...e?.parent?Ng(e.parent):[],e.entry],wg=e=>bg([[e=>e.value!==ag.RUB&&e.oppositeValue!==ag.RUB,()=>e.handleConvert(e.value,ag.RUB)],[e=>e.value===ag.RUB&&e.oppositeValue===ag.RUB,()=>e.handleConvert(e.value,ag.USD)],[e=>e.value===ag.RUB&&e.oppositeValue===ag.RUB,()=>e.handleConvert(e.value,ag.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Cg(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(vn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:i,onChange:l}),s.length?o(Mn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Sg=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:i})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||ag.RUB,selectBuy:n?.[0]?.currency?.currency||ag.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:[Cg({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:kg(r,d,n),value:r.inputSell,setValue:e=>Tg(d,n)(e,r.selectSell,r.selectBuy)}),Cg({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Ig(r,d,t),value:r.inputBuy,setValue:e=>Rg(d,t)(e,r.selectBuy,r.selectSell)})]}):null,i?.text?o(Ne,{text:i.text,version:i?.version,...i}):null]})})),kg=(e,t,n)=>a=>{t({selectSell:a}),wg({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,i=e.selectBuy)=>{Tg(t,n)(e.inputSell,a,i)}})},Ig=(e,t,n)=>a=>{t({selectBuy:a}),wg({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,i=e.selectSell)=>Rg(t,n)(e.inputBuy,a,i)})},Tg=(e,t)=>(n,a,i)=>{e({inputSell:fg(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(gg(n,l,a===ag.RUB)||"")})},Rg=(e,t)=>(n,a,i)=>{e({inputBuy:fg(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(gg(n,l,a===ag.RUB)||"")})},Bg=`${qt}/exchangerates`;const Pg=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const i=function(e){const t=e?.code||"000",{data:n}=Kn(Bg+`?regionCode=${t}`,Dt);return n||{}}(tg()),l=Dg(i?.exchangeRate?.currencies),r=l.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:ag.RUB}});const s=l.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:ag.RUB}}),o(g,{className:u("box-border min-h-80",e),...a,children:o(Re,{className:"h-full",title:o(w,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[l?o(mg,{className:"mb-xl",exchangeCurrencyItems:l}):null,o(pg,{address:i?.address})]}),o(Sg,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),Dg=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(Eg(n))})})),Eg=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},Ag=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:a,labelIcon:i})=>o(Dd,{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:[Yp(i,t),e?o(Ae,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Mg=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Og=(e=!1)=>e?"MinusIcon":"PlusIcon",zg=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Vg=Vt((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:a="Развернуть",labelIcon:i,labelIconBgVersion:l,foldButtonVersion:r="default",version:s,role:d,...m})=>{const h=ke(),[p,{toggle:f}]=nn(t),x=o(zr,{className:u("gap-lg",Mg(h)),isUnfolded:p,children:D({...m,extraProps:{className:"w-full",padding:"p-0"}})}),y=Fg({foldButtonVersion:r,label:a,labelIcon:i,labelIconBgVersion:l,isMobile:h,isUnfolded:p,onToggle:f});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:d,...m,children:c(Or,{children:[n?y:x,n?x:y]})})}),{childrenTypes:{exclude:["RollupItem"]}}),Fg=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:a,isUnfolded:i,isMobile:l=!1,onToggle:r})=>{const s=t||(i?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?zg(e):Og(e))(i,l);return"accordion"===e?o(Ag,{label:s,labelIcon:n,labelIconBgVersion:a,icon:c,onToggle:r}):o(_d,{label:s,icon:i?"ArrowUpIcon":"ArrowDownIcon",onClick:r})},Lg=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:jg(e)}))),jg=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(Vg,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(_g,{items:e.items}):null},String(t)))),$g=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(Ug)}):null)),Ug=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Ae,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(qg)})]},String(t)),qg=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Wg(e.type,e.text)}),o(C,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Wg=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Hg(t)}`,children:o(Ae,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(C,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Hg=e=>e.replaceAll(/\D/g,""),Yg=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}`})})),Gg=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(Ae,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(Yg,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Kg=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}`})})),Xg=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Ae,{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(Kg,{index:t,...e},String(t))))}):null]}))),Jg=Vt((({className:e,footer:t,...n})=>{const{navigationItems:a}=n.options?.page?.navigation??{};n.options;const{documents:i,relatedEnterprises:l,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:h,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Lg,{navigationItems:a}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o($g,{items:r}),m?o(Ne,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(nh,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(Ne,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Gg,{title:d,links:l}),o(Xg,{links:i,license:h})]})})),Zg=Vt((({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(w,{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:Qu(l,s?.key),children:f})}):null]})})})),Qg={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"},ef=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",Qg["transparent"===e?"transparent":"default"]),...a,children:i}):null})),tf=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:a,version:i,backwardButton:r})=>{const s=_(),d="/"===s.pathname,{dataFooter:m,dataHeader:u,...h}=t??{},p=l((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(Vc,{className:"my-2xs",bgColor:e,logo:h,data:u,showTitle:!1})}):nf(p,r),o(ef,{version:i,...a})]})})),nf=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(W,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,af={"bg-white":"primary",transparent:"transparent"},lf=Vt((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=af[e],portal:a,logo:i={},...l})=>{const{backwardButton:r,logo:s={}}=l.options?.page?.common??{},{internetBankButton:c}=a||{},d=i.image?.icon||i.image?.src?i:s;return o(g,{tag:"header",defaultPadding:"",version:n,...l,children:o("div",{className:"container px-lg py-2xs box-border",children:o(tf,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...l})})})})),rf=(e=!1)=>e?{}:{padding:"p-0"},sf={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},of=Vt((({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=_();return o(g,{className:u("relative flex flex-col",sf[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:D({...c,extraProps:{className:u("w-full",Od(r)),...rf(a)}})})}),{childrenTypes:[]}),cf=Vt((e=>o(of,{...e})),{childrenTypes:[]}),df=d((e=>{const{className:t,align:n,image:a,...i}=e,l=n?u("flex",Em[n]):"";return o(g,{className:u(l,t),defaultPadding:"p-0",...i,children:o(ne,{image:a})})})),mf=["байт","Кб","Мб","Гб","Тб","Пб"],uf=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(Ae,{size:"text-l",font:"font-light",children:[t," ",hf(d,m),o(Ae,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),hf=(e,t)=>e||t?o("span",{children:", "}):"",pf=(e,t)=>(n,a)=>{const i=U(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))} ${mf[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?ff(i):n?.fileFormat;return c("div",{role:"listitem",children:[o(uf,{text:n?.text,target:n?.target,href:i,fileFormat:r,fileSize:l,icon:gf(t),data:n?.data}),o(_e,{__html:n?.__html})]},String(a))},gf=e=>e?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,ff=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},xf=d((({href:e,__html:t,target:n,onClose:a})=>{const i=_(),l=U(i)(e);return c(Xl,{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(Gl,{type:"button",version:"secondary",onClick:a,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),yf=d((({text:e,href:t,target:n,__html:a,icon:i})=>{const{open:r}=un(xf),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:[gf(i),o(Ae,{font:"font-light",children:e})]}):null})),bf={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},vf=Vt((({className:e="",title:t,description:n,align:a="text-center",documents:i,icon:l={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=_();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(k,{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",bf[r]),role:"list",children:i.map(Nf(d,l))}):null]})})),Nf=(e,t)=>(n,a)=>{const i=n?.docType;return""===i?null:"reportSource"in n&&n?.reportSource?.__html?wf(t)(n,a):pf(e,t)(n,a)},wf=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(yf,{...a,icon:e,href:Cf(t)?t?.href:t?.attachment?.src}),o(_e,{__html:t?.__html})]},String(n)):null},Cf=e=>"href"in e,Sf=Vt((({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",y=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(w,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:y,buttons:$e(a,{className:"flex-wrap"}),children:[i?o(Ae,{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(Ae,{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]})]})})})),kf=(e,t)=>e&&"underlined"!==t?"primary":"secondary",If=(e=[],t={})=>e.filter((({content:e={}})=>bm(t,e))).length,Tf=(e,t)=>e===t;const Rf=(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)))}(Tf,((e=Tf)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))())),Bf=[],Pf={},Df={primary:"bg-white/30",secondary:"bg-main-divider"},_f={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Ef=d((({count:e,version:t="secondary"})=>{const n=ke(),a=n?"bg-main-divider":Df[t],i=_f[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(Ae,{size:"text-xs",color:i,children:e})})})),Af=({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})]})]})},Mf={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Of={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},zf={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Vf={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Ff=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",Mf[a],n?Vf[a]:zf[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?Of[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Af({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(Ef,{count:m,version:kf(n,a)})}):null]})})})),Lf=d((e=>o(e?.item?.href?jf:$f,{...e}))),jf=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(Ff,{...e,tag:"a",item:i,onClick:a})})),$f=d((({item:e={},onClick:t,...n})=>{const a=l((()=>{t&&t(e)}),[t,e]);return o(Ff,{item:e,onClick:a,...n})})),Uf=(e,t,n)=>(a,i)=>o(Lf,{isActive:a===e,onClick:t,type:n,item:a},String(i)),qf=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(Uf(a,i,t))}))),Wf={categories:[],extraOptions:[],propertyType:[],stage:[]},Hf=Vt((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...i})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Nm(Wf,{block:i.block,page:i.options?.page}),f=l(((e=Wf)=>p(e)),[]),x=(({hotFilters:e=Bf,filtrationState:t=Pf,blocks:n=Bf,onFiltrationStateChange:a})=>{const i=r((()=>Math.max(0,e.findIndex((e=>Rf(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:If(n,t.filter),version:kf(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(qf,{...x}),o(hm,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(cm,{blocksToRender:d,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Yf="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Gf=d((({filters:e,field:{field:t,reset:n},onlyOffice:a,labels:i})=>{const l=a?5:6,r=(e||[]).map((e=>o(Ya,{text:i[e],...t(e)},e))),[s,d]=l>0?[r.slice(0,l),r.slice(l)]:[r,[]],[m,{toggle:u}]=nn(!1);return o("div",{children:e?.length?o("div",{children:c(Or,{children:[c("div",{children:[o("div",{className:Yf,children:s}),o(zr,{className:Yf,isUnfolded:m,children:d})]}),Kf(n,a)({isUnfolded:m,onToggle:u})]})}):null})})),Kf=(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:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"}),text:n?"Меньше фильтров":"Больше фильтров",onClick:a}):null,o(Ne,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]})})]}),Xf=(e,t,n)=>{const a=kf("all"===t),i=kf("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(Gl,{"data-id":"all",onClick:t=>l(t,"all",e),version:a,children:"Для физических лиц"}),o(Gl,{"data-id":"business",onClick:t=>l(t,"business",e),version:i,children:"Для юридических лиц"})]})},Jf=({__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(Ae,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Zf=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Ae,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Qf=()=>{},ex=e=>"all"===e?"block":"hidden",tx=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:i=[],renderCard:l=Qf,renderRemoteWorkplaceCard:r=Qf,getBalloon:s=Qf,getBalloonRemoteWorkplaces:d=Qf,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=dn(os),{filteredItems:y,points:b,filteredRemoteWorkplaces:v,lengthItems:N}=hs({data:t,remoteWorkplaces:i,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=a("all");return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Zf(h,N),m?Jf(m):null,p&&Xf(t,w,C),o("div",{className:u("pb-3xl",ex(w)),children:o(Gf,{filters:nx([...t,...i]),field:{field:f,reset:x},onlyOffice:p,labels:cs})})]}),o("div",{className:"h-[600px]",children:o(xs,{children:o(Cr,{points:b,isLoad:n,className:"h-full"})})})]}),c(xs,{children:[y.map(l),v.map(r)]})]})})),nx=e=>Object.keys(os).filter((t=>e.filter((e=>ds[t](e))).length)),ax=e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:"",ix=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:i,atmCode:l="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:ax(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(Ae,{size:"text-h4",children:ax(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Jr,{color:"green",children:ax(s)})})]}),o("div",{className:"hidden sm:block",children:o(Mr,{className:"flex-wrap",children:m?.map(rx)})}),o(Lr,{children:o(Mr,{className:"flex-wrap",children:m?.map(rx)})})]},String(d))},lx=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${ax(t)} №${n}`,body:e.toUpperCase()}),rx=(e,t)=>o(Dr,{...e},String(t)),sx=[];const ox=async e=>{const t=await Pt(e,{method:"GET"});return Array.isArray(t)?t:sx},cx={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},dx={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)},mx=d((({descriptionData:e,className:t})=>{const n=tg(),a=n?.code??"000",{data:i,isLoad:l}=function(e){const{data:t,error:n}=Kn(`${qt}/atms?regionCode=${e}`,ox);return{data:t||sx,isLoad:!t&&!n}}(a);return o(tx,{className:t,filterItems:ux,data:i,isLoad:l,initFilterState:cx,renderCard:ix,getBalloon:lx,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),ux=(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=>dx[t](e))),n=!a.length||a.some((t=>dx[t](e)));return t&&n}))},hx=({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(Ae,{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(Ae,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:px(t)}),o(Lr,{children:px(t)})]},String(n)):null,px=e=>c("div",{children:[c(Mr,{className:"flex",children:[o(Dr,{label:"Операции для физических лиц",children:o(Ae,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Dr,{label:"Операции для физических лиц",children:o(Ae,{children:"Оформление и обслуживание банковских карт"})}),o(Dr,{label:"Операции для физических лиц",children:o(Ae,{children:"Инвестиционное и накопительное страхование"})}),o(Dr,{label:"Операции для физических лиц",children:o(Ae,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Dr,{label:"Режим работы",className:"max-w-none",children:o(Ae,{children:e})})]}),gx=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),fx={branches:[],remoteWorkplaces:[]};const xx=async e=>await Pt(e,{method:"GET"})||fx,yx=d((({className:e})=>{const t=tg(),n=t?.code??"000",{data:a,isLoad:i}=function(e="000"){const{data:t,error:n}=Kn(`${qt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,xx);return{data:t||fx,isLoad:!t&&!n}}(n);return o(tx,{className:e,data:a?.branches,isLoad:i,remoteWorkplaces:a?.remoteWorkplaces,renderCard:ls,renderRemoteWorkplaceCard:hx,getBalloon:ss,getBalloonRemoteWorkplaces:gx,title:`Офисы филиала ${t?.name}`})})),bx=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(yx,{}):o(mx,{descriptionData:e})})})),vx=d((({className:e,title:t,description:n="Блок в разработке...",...a})=>c(g,{className:u("box-border",e),...a,children:[o(k,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),Nx=d((({className:e,padding:t,slides:n=[],...a})=>o(g,{className:u("overflow-hidden relative",e),padding:t,...a,children:o(sm,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Ze,{className:"px-5 h-full",headlineVersion:"L",...e,...a})},String(t))))})}))),wx=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:[je(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[l?Cx({__html:l,richVersion:r}):null,Sx({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Sx({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Sx({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?$e([a]):null]})]}))),Cx=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(_e,{...e,itemSize:"list-s"})}),Sx=({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(Ae,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ae,{size:"text-xl",color:a,children:t})]})]}):null,kx=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(_e,{__html:t,richVersion:n})})})),Ix=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(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=>i?.(e.target.value),role:"radio"}),t?o(Ae,{color:"text-primary-text",children:t}):null]})}))),Tx=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(Ix,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:i}),o(Ix,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:i})]})})),Rx=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(Mn,{options:s,label:r,placeholder:i||a,onChange:e=>l(e.key),value:c})})),Bx=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(Rx,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Rx,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:i,setSelected:l,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Px=["От 1 дня","До 365 дней"],Dx=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ae,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(ca,{min:1,max:365,value:e,items:Px,onChange:t})]}))),_x=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(Rx,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Rx,{data:a,fieldLabel:"safeBoxCasesSize",selected:i,setSelected:l,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Ex=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(Bx,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:Ax(m)}),o(Dx,{days:i,setDays:e=>m({days:e})}),o(_x,{caseVolumes:d,selectedCaseVolume:l,onSelectedCaseVolume:Mx(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ae,{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(Tx,{}),o(Ne,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),Ax=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Mx=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Ox=d((({days:e,tariffs:t=[]})=>{const n=Vx(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:[zx("Аренда за",e),zx("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(C,{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(C,{size:"text-s",font:"font-light",color:"text-white",children:a})})]})]})})),zx=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ae,{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})]}),Vx=(e,t)=>{const n=Fx(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},Fx=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},Lx=(e,t)=>e.find((e=>e.branchCode===t)),jx=d((e=>{const{regions:t,data:n,branches:a,onChange:l,onClick:r}=e;i((()=>{l({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,l]);const s=Lx(a,n.selectedBranch),d=$x(s?.safeBoxCaseVolumes),m=Ux(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=qx(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Ex,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:l}),o(Ox,{days:n.days,tariffs:u})]})})),$x=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Ux=(e,t)=>e?.find((e=>e.volume===t)),qx=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Wx=`${qt}/safeboxes`,Hx=[];const Yx=async e=>await Pt(e,{method:"GET"})||Hx,Gx=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=Zi(),p=Kx(m.selectedRegion,h),f=function(e){const{data:t}=Kn(e?`${Wx}?regionCode=${e}`:null,Yx);return t||Hx}(p),x=l((e=>u((t=>({...t,...e})))),[u]),y=(b=Lx(f,m.selectedBranch)||f,Array.isArray(b)?b.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):b?.gpsLatitude&&b?.gpsLongitude?[{coords:[b.gpsLatitude,b.gpsLongitude]}]:[]);var b;return c(g,{className:n,defaultPadding:"",...i,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(jx,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(C,{size:"text-s",font:"font-light",children:t}):null]}),y.length&&r?o(Cr,{points:y,className:"h-[640px]"}):null]})})),Kx=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Xx={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"},Jx=(e,t,n)=>(a,i)=>{const{button:l}=a;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Zx(e,n)(a,i)}),c("div",{className:u("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[Qx(a),l?.text?o(Ne,{className:"box-border py-s w-full mt-lg",version:t,...l,children:l?.text}):null]})]})},String(i))},Zx=(e,t)=>(n,a)=>{const i="secondary"===t?"white":"color",l=Boolean(n?.icon?.src),r=ey(e,l),s=l?"transparent"===t:t;return o(g,{className:u("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:ty({step:n,iconVersion:i,i:a,stepVersion:t})})})},Qx=e=>c("div",{children:[e?.label?o(C,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:u("text-s font-light text-left",Xx.description),children:e.description}):null,o(_e,{__html:e.__html})]}),ey=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",ty=({step:e,iconVersion:t,i:n,stepVersion:a})=>{return je(e?.icon)?o(ne,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:u("text-h4","transparent"===a?Xx.iconText:(i=a,"secondary"===i?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var i},ny=d((({className:e="",title:t,description:n,steps:a=[],buttons:i,stepVersion:l="gray",version:r="primary",...s})=>{const d=a.length>3;return c(g,{className:u("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),a?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:a.map(Jx(d,r,l))}):null,$e(i,{isVertical:!0})]})})),ay=d((({isActive:e,item:t,onClick:n})=>c("div",{className:u(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(W,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),iy=d((({className:e,head:t,children:n,onClose:a,onClick:i})=>c("div",{onClick:i,className:u("relative bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(Kl,{className:"absolute top-1.5 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})));function ly(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 ry=()=>{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 ly(ue.observable,"dialog",{open:t,close:n,closeAll:i}),[e,{close:n,closeAll:i}]},sy=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 oy=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(Ae,{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(cy,{...e},String(t))))})]}):null,cy=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(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})}):null]})})),dy=(e,t)=>n=>n.name?o(eh,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Qu(e,n.name),children:o(Ae,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,my=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"})]}))),uy=d((({defaultLocation:e})=>{const t=tg(e),n=pe(),{href:a}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(C,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(eh,{href:a,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),hy=d((({foreignOffices:e,branches:t,onClose:n})=>{const i=ng(t?.default),[s,d]=a(""),m=Zi(),u=r((()=>gy(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,py)),[u]),p=l((e=>{i.location=e,n?.()}),[i,n]);return c(Xl,{className:"pb-20",head:c("div",{children:[o(Ae,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(uy,{defaultLocation:t?.default}),o(my,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:u.filter((({name:e})=>e&&sy(e.toLowerCase())(s.toLowerCase())>=.8)).map(dy(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(Ae,{size:"text-h6",children:e})}),t.map(dy(f,g))]},e)))}),oy(e)]});var g,f})),py=e=>e.name?.charAt(0)??"",gy=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),fy=d((({menuRef:e,menuItem:t,locationDialogProps:n,onClose:a})=>{const l=un(hy,n),{name:r}=tg(),s=e?.current?.getBoundingClientRect(),c=X(K.SITE_URL);return i((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),i((()=>{const e=e=>{if("location"===e.data.type&&l.open({}),"reload"===e.data.type&&a?.(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[a]),o(iy,{head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),onClick:e=>e.stopPropagation(),onClose:a,children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),xy="burgerMenuDialog",yy=({menuRef:e,centralMenuItem:t,locationDialogProps:n,onClose:a=fn})=>{const{open:i}=un(fy),[r]=ry(),s=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(xy,r),o=l((()=>i({menuRef:e,locationDialogProps:n,menuItem:t,onClose:a},{id:xy})),[e,n,t,a]);return[s,{toggle:s?a:o}]},by=[],vy=Vt((({sticky:e,...t})=>{const{menuItems:n=by}=e??{},i=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),u=r.slice(d),[h,p]=a(-1),[f,x]=a(""),{closeAll:y}=he(),b=l((()=>{p(-1),x(""),y()}),[y]),v=pn(b),N=s(null),[C,{toggle:S}]=yy({menuRef:N,centralMenuItem:i,locationDialogProps:t.header,onClose:b}),k=(({menuRef:e,dialogRef:t,leftItems:n,rightItems:a,onClose:i})=>{const{open:r,close:s}=he(),c=l((()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=`${e?.contentWindow?.document.body.offsetHeight}px`}),[]);return l(((l,d)=>{const m="left"===d?n:a,u=e?.current?.getBoundingClientRect();r({id:"left"===d?n[l].title:a[l].title,dialog:o(iy,{className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:m[l].description||m[l].title})}),onClick:e=>e.stopPropagation(),onClose:()=>{s(),i?.()},children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",src:m[l]?.src,width:u?.width??0,onLoad:c})})})})}),[c,n,a,i])})({menuRef:N,dialogRef:v,leftItems:m,rightItems:u,onClose:b}),I=l((e=>{e.stopPropagation(),b(),S()}),[b,S]),T=l(((e,t)=>{x(t),p(e),y(),k(e,t)}),[y,k]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(Ny(T,"left",{activeIndex:h,currentItemPosition:f})),o(ay,{item:i,isActive:C,onClick:e=>I(e)}),u.map(Ny(T,"right",{activeIndex:h,currentItemPosition:f}))]})})})),Ny=(e,t,n)=>(a,i,l)=>o(ay,{item:a,isActive:l[n.activeIndex]?.title===a?.title&&n.currentItemPosition===t,onClick:r=>{l[n.activeIndex]?.title===a?.title&&n.currentItemPosition===t||r.stopPropagation(),e(i,t)}},a.title||String(i)),wy="hidden sm:flex absolute z-40",Cy={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Sy=d((({className:e,items:t=[],activeItem:n,onChange:a,tabsType:l="default"})=>{const[r,s]=Xd({itemCount:t?.length||0});return i((()=>ky(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o($d,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Cy[l].item,gap:Cy[l].gap,children:t.map(Uf(n,a,l))}),s.canScrollLeft?o(tm,{className:u("left-6",wy,Cy[l].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(nm,{className:u("right-6",wy,Cy[l].buttonTop),onClick:s.scrollRight}):null]})})),ky=(e,t,n)=>{const a=t.findIndex((e=>e===n));e&&a>0&&e.scrollTo({left:e?.children[a]?.offsetLeft,behavior:"smooth"})},Iy={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Ty=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(Iy[t].wrapper,e),children:o(Sy,{className:Iy[t].component,tabsType:t,...n})}):null,Ry=Vt((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=By(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:y}=p,[b,v]=a(_y(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[b],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)}),[y,w,h]);const C=Dy(x[b],b),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:[Ty({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Py(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])=>P(t,{...m?.options,slotName:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Dy)?.filter(Boolean)||[]}),By=({__id:e,anchor:t})=>t??e??"tabs",Py=(e,t)=>t?.length?t:e,Dy=(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),Ey={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Ay=d((({children:e,activeIndex:t,columnWidth:n,version:a="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Ey[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),My=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}))),Oy={Buttons:({buttons:e})=>$e(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(Ae,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Ae,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:a,isOpen:i})=>e?o(My,{className:"w-fit",isOpen:i,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},zy=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 Vy({cell:e,cellProps:{rowIdx:n,cellIdx:l,fieldIdx:t,displayTable:e=>{m(!1),c(l),r(e)},isVisible:d}})})),Vy=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in Oy))return null;return o(Oy[n],{...t,...a})},Fy=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(zy,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,setOpenTableInnerIdx:r},String(s)))):null}))),Ly=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),jy=(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(Ae,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,$y=d((({rows:e})=>{return o($d,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[a,...i]=e,l=u("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[a?.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(Ae,{size:"text-xl",font:"font-light",children:a.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:l,style:{transform:`translateX(-${Ly(i,t)}px)`},children:i?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ae,{size:"text-xl",children:e.data}):null,e?.cols?jy(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),Uy=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(Ae,{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($y,{rows:t.rowsData})})})]},a)}))}))),qy=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Wy=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(Ae,{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:"link",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),Hy=Vt((({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(Wy,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Uy,{activeTabIndex:r,items:m}),o(My,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ae,{size:"text-h6",children:"Данных нет"}),o(My,{onClick:n,isOpen:!0})]})})),Yy=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(Hy,{...t,onClick:n})}):null]}))),Gy=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(Yy,{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(Ae,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Ay,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Fy,{cells:e,rowIdx:i,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function Ky({dec:e,inc:t,canDec:n,canInc:a,btnClass:i,className:l=""}){return n||a?c("div",{children:[n?o(em,{className:u("absolute z-40",i[0],l),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,a?o(em,{className:u("absolute z-40 rotate-180",i[1],l),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const Xy=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,Ky({...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]})})),Jy=d((({className:e="",title:t,description:n,rowHeaders:i,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],h=i?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[f,x]=((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}]})({itemCount:p,visibleItemCount:2}),y=(h||[]).map(((e,t)=>o(Gy,{row:e,activeIndex:f,rowIdx:t,...d},String(t)))),[b,v]=s>0?[y.slice(0,-s),y.slice(-s)]:[y,[]],[N,{toggle:w}]=nn(!1);return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?c(Or,{children:[c(Xy,{controls:x,children:[b,o(zr,{isUnfolded:N,children:v})]}),Ed({isUnfolded:N,onToggle:w})]}):o(Xy,{controls:x,children:y})})]})})),Zy=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?Qy():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ae,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?eb(n):null,i?o(_e,{richVersion:l,__html:i}):null]})]}))),Qy=()=>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"}),eb=e=>o(C,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),tb=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(Ae,{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(Ae,{size:"text-h2",children:n})}):null]}))),nb=d((e=>{const{prefix:t,unit:n,suffix:a,...i}=e;return o(g,{defaultPadding:"p-0",...i,children:o(tb,{prefix:t,unit:n,suffix:a})})})),ab={AdTile:Lt,ApplicationForm:rr,ApplicationLeadForm:Rd,BankAccountFiltration:Sm,BenefitsBlock:Bm,BonusBenefitsBlock:_m,ButtonsBlock:Am,CalculatorBonus:jm,CalculatorBusinessDeposit:Jm,CalculatorCredit:yo,CalculatorDeposit:gu,CalculatorRefinancing:Cu,CardTransfer:Au,Carousel:$u,CarouselCard:Hu,CarouselCatalogCard:Gu,CarouselLinks:Ju,CarouselRecommendationCard:lh,CarouselTariffsCard:ch,CreditCardForm:ap,CreditForm:Bp,DepositFiltration:Ap,Depository:Jp,ErrorBlock:Qp,ExchangeRateTile:Pg,Footer:Jg,GrantSupport:Zg,Header:lf,Headline:k,HorizontalLayout:cf,ImgBlock:df,LinkDocs:vf,MobileAppTile:Sf,MortgageFiltration:Hf,OfficesAtmsMap:bx,Placeholder:vx,ProductBlock:Ft,ProductGallery:Nx,RepresentativeOfficeInfo:wx,RichTextBlock:kx,RollupItem:Vg,SafeDepositRental:Gx,StepsBlock:ny,StickyBottomMenu:vy,TabsLayout:Ry,TariffsTable:Jy,TextBlock:Zy,UnitBlock:nb,VerticalLayout:of},ib=ce((()=>{i((()=>{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))}));const lb="cookie",rb=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=nn();!function(e,t,n=300){i((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(lb)||n()}),[],3e3);const r=l((()=>{globalThis.localStorage?.setItem(lb,"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(Kl,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null}));function sb(e){const t=l((({key:t})=>{"Escape"===t&&e()}),[e]);hn(globalThis.document,"keydown",t)}const ob=d((()=>{const[e,{close:t}]=ry(),n=Boolean(e.length);return sb(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})),cb=d((()=>{const[e,t]=a(null),n=l((()=>{t(null)}),[]);return ly(ue.observable,"popup",{open:t,close:n}),sb(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})),db="header",mb="footer",ub="sticky-footer",hb={},pb=d((({className:e,data:t=hb,blocksRegistry:n,blockDecorator:a})=>{const{slots:i,blocks:l,fallback:r,...s}=t,d=Ot(s,r);ib(),ng();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?.[db]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(i?.[db],{...m,slotName:db})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[D({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(i?.[mb],{...m,slotName:mb})]})]}),i?.[ub]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(i?.[ub],{...m,slotName:ub})}):null,o(ob,{}),o(cb,{}),o(rb,{__html:d?.cookieContent?.__html})]})}));Object.assign(pb,{childrenTypes:[],slots:()=>[db,mb,ub]});e.Blocks=ab,e.ContentPage=pb,e.handlerDecorator=ce,e.joinList=mm,e.locationNavigator=Jt,e.packageVersion="0.14.750",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})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),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)=>b(100,e).map((e=>Math.floor(e))).map(y),y=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),b=(e,t)=>[e].concat(t>0?b(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:a,children:i})=>{const l=v[n]||"h3";return o(l,{role:"heading",className:u("font-sans m-0",N[t],e),children:a||i})})),C=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},k=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=S[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[a?o(w,{className:u("whitespace-pre-wrap",l),...h?.title,as:r||h?.title.as,title:a}):null,i?o(C,{size:h.descriptionSize,font:h.descriptionWeight,align:l,...p,children:i}):null]})})),I=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),T=[];function R(e,t,{className:n,...a}={}){const{key:i,blockDecorator:l=I,blocksRegistry:r={},ancestors:s=T}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return 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 B=[],P=(e,{key:t,ancestors:n=B,slotName:a=null,extraProps:i,renderProps:l=R,...r})=>{const s=i?(e,t)=>R(e,t,i):l;return(e||[]).map(((e,i)=>s(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...n||B,[r.parent,a]]:n},i)))};function _({block:e,options:t,children:n,extraProps:a,renderProps:i}){return n||(e&&t?P(e.blocks,{...t,parent:e,extraProps:a,renderProps:i}):null)}function E(){return E._impl()}E._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),E.setup=e=>{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}}),M=e=>Boolean(e?.includes(":")),O=(e,t)=>Boolean(e&&!M(e)&&(!t||"_self"===t)),z=e=>Boolean(e?.startsWith("#")),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:M,isLocalURL:O,isHash:z,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:V,hasPrefix:F});const $="/api/",j=`${$}v1/storage`,U=e=>(t,n)=>{if([!t,M(t),z(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?"/":(i=e.pathname,i?.split("/").slice(0,-1).join("/")),t);var i},q={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W={small:"16",medium:"24",large:"48",xl:"78"},H=d((({className:e="",imageClassName:t="",name:n="",alt:a=`Иконка ${n}`,title:i=a,iconVersion:l="color",size:r,width:s=r&&W[r],height:d=s})=>{const m=E(),h="normal"===l?`${n}.svg`:`sprites.svg#${n}`,p=U(m)(V(A.CDN,"/icons/",h));return"normal"===l?o("img",{className:e,style:Y(e,d),src:p,alt:a,title:i,"aria-hidden":"true",width:s,height:d}):o(G,{className:e,children:c("svg",{className:u(q[l],{"w-full h-full":!s,invert:"white"===l},t),width:s,height:d,"aria-hidden":"true",children:[i?o("title",{children:i}):null,a?o("desc",{children:a}):null,o("use",{href:p,xlinkHref:p})]})})})),Y=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},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&&!M(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=E();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(H,{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=E(),{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: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(!O(e,t))return!0;const a=K.SUB_PORTALS?.split(",");return!!a?.some((t=>F(e,t)))||!F(e,n||"/")},fe=e=>{try{return Array.isArray(e)&&e.length?{"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=be(e)&&"hidden lg:block";return c("div",{className:u(ye(e),"flex gap-xs"),children:[a?o("div",{className:u(r,se[l]),children:a}):null,be(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]})})),ye=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",be(e)?i:"h-12 w-12 m-auto",{"rounded-full":a})},be=({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(true);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,...y})=>{const b=ke(),v=E(),N=l((()=>v.back()),[]),w=y.options?.page?.common?.backwardButton,C=f&&!b;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(_({...y,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,Ee=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)),De=(e,t)=>e?o(C,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ae=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),Me=(e,t)=>e?o(Ae,{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:De(e.description,t)},String(t)):null,"__html"in e?o(Ee,{...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:i,iconRight:l,version:r,...s}=t||{},c=qe(i,r),d=qe(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},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(Ae,{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(Ae,{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:y,image:b,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:C=!1}={},backwardButton:S,children:I,...T})=>{const R=b?.src?o(ne,{image:b}):null,B=o(k,{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(y),backwardButton:S,...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(Ee,{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)])),yt=pt(((e,[t,n])=>{const[a,...i]=t;return e.set(a,i.length?yt(e.get(a),[i,n]):n)})),bt=pt(((e,t)=>t.reduce(yt.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=>bt(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(),Et=e=>[...new Set(e)],Dt={},At=["/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(Et(e).filter((e=>!At.some((t=>e.startsWith(t))))).map((async e=>[e,Dt[e]||=await _t(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 Vt(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 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"),i=String(e.getFullYear());return t?`${i}-${a}-${n}`:`${n}.${a}.${i}`}},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: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(M(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const a=(e=>{const t=Qt();if(!M(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),i=l((()=>n(!0)),[]),r=l((()=>n(!1)),[]),s=l((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:i,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=l((e=>s((a=>{const i=e instanceof Function?e(a):e,l=t?t(i):i,r=cn(i,l)?i:l;return!cn(a,r)&&n?.(r),r}))),[t,n]);return i((()=>{t&&s(t)}),[t]),[r,o]}(e,o,c),[h,{setTrue:p,setFalse:g}]=nn(!1),f=s({}),[x,{isValid:y,errors:b}]=function(e,t){const n=r((()=>t?.(e)??sn),[t,e]),a=r((()=>an(n)(e)??on),[n,e]),i=ln(a);return[n,{isValid:i,errors:a}]}(m,n),v=l(((e,t={})=>{const{parse:n,format:a,onChange:i}=t,l=m[e],r=h||f.current?.[String(e)],s=t?.validator??x[e],o=r&&s?s(l):[];return{value:a?a(l):l,isDirty:r,errors:s&&o,error:o[0],onChange:t=>{f.current||={},f.current[String(e)]=!0;const a=n?n(t):t;i?.(a),u((t=>({...t,[e]:a})))}}}),[m,h,x,u]),N=l((e=>{f.current=e,u(e)}),[u]),w=l((()=>{f.current={},g(),u(e)}),[e,u]),C=l((e=>{e.preventDefault(),y?(t&&w(),d?.(m,e)):p()}),[t,m,y,w,d]);return[m,{errors:b,field:v,update:N,reset:w,onSubmit:C}]}const mn=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(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,a]})})}));function un(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 hn(e,t,n,a){i((()=>{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=l((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",yn=e=>e?xn:"border-error",bn=e=>e?o(Ae,{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:y,pattern:b,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=yn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[bn(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:y,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:y,pattern:b,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(Ae,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Cn=e=>e?.value||"",Sn=e=>{const{url:t,query:n,queryPrefix:a,requestData:i={},responseItemHandler:l=Cn}=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(`${qt}/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)},kn={url:"suggest/address"},In={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:kn,addressFact:kn,organizationAddress:kn,addressCourier:kn},Tn=()=>de(ue.emitter,"popup"),Rn=d((({options:e,container:t,onChange:n})=>{const[l,r]=a(-1),s=t=>{const a=e.length-1;"ArrowDown"===t.key?r(l<a?l+1:0):"ArrowUp"===t.key?r(l>0?l-1:a):"Enter"===t.key&&e[l]&&(t.preventDefault(),n(e[l]))};return i((()=>(t.addEventListener("keydown",s),()=>t.removeEventListener("keydown",s))),[l]),o("div",{className:"bg-white text-l overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,t)=>o("div",{className:u("flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",{"bg-main-divider":l===t}),role:"listitem",onMouseDown:()=>n(e),children:o("span",{className:"min-h-6",children:e.processedValue})},t.toString())))})}));function Bn({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=a([]),f=Tn(),x=In[n],y=l((()=>{h.current=t,f.close()}),[t]),b=l((e=>{y(),h.current=e.processedValue,c?.(e.processedValue),d?.(e)}),[y,c]),v=s(null),N=r((()=>async e=>{if(!x)return;const t=await Sn({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 y();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(Rn,{options:p,container:n,value:t,onChange:b}),top:a+globalThis.scrollY+r,left:i,width:l})}),[e,p,t,b]),v}const Pn=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:y=!1,maxLength:b,dadata:v=!1,disabled:N=!1})=>{const[w,{setFalse:C,setTrue:S}]=nn(),k=pn(C),I=l((e=>{v&&!w&&S(),b?e.length<=b&&d(e):d(e)}),[v,w,d]);i((()=>{y&&n&&d(_n(n))}),[n]);const T=Bn({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:En(a,s,t)})}),wn(r)]})})),_n=(e="")=>e.replace(/[^\d]+/g,""),En=(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,Mn=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: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(),i&&i(e)},children:[o("span",{className:"min-h-6",children:Dn(e)}),o(H,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:l,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const On=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[y,{setFalse:b,setTrue:v}]=nn(),[N,w]=a(""),C=Fn(x,n.length),S=y&&!C,k=l((()=>{C||v()}),[C]),I=l((()=>{w(""),b()}),[]),T=function({isOpen:e,options:t,value:n,query:a,onChange:r,onClose:c,iconVersion:d}){const m=Tn(),u=l((()=>{m.close(),c&&c()}),[c]),h=l((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=pn(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(Mn,{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:y,options:n,value:r,query:N,onChange:f,onClose:I,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[bn(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",Vn(m,d,C)),onClick:S?I:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Dn(r)||h}),zn(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]})]})})),zn=(e,t)=>o(H,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Vn=(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"),Fn=(e,t)=>e||0===t,Ln=d((({className:e="",label:t,error:n,errors:a,...i})=>c("div",{className:e,children:[o(On,{...i,valid:!n,label:gn({label:t,errors:a})}),wn(n)]}))),$n=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],jn=d((({field:e,input:t})=>o(Ln,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:$n,...e(t?.name??"")}))),Un=(e="")=>Boolean("trade"===e||"all"===e),qn=e=>null!=e,Wn=new Map,Hn=(e,t=Wn)=>n=>{const a=Gn(n),i=t.get(a);if(a&&qn(i))return i;const l=e(...n);return a&&qn(l)&&t.set(a,Promise.resolve(l)),l},Yn=e=>Boolean(e?.every((e=>Array.isArray(e)?Yn(e):!e||"string"==typeof e))),Gn=e=>Yn(e)?e.toString():"",Kn=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function Xn(e,t,{fallback:n,cache:l}={}){const s=r((()=>Jn(e)),[e]),[o,c]=a(void 0),[d,m]=a(void 0);i((()=>{if(!s.some(qn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await Hn(t,l)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,l,s]);const u=n&&Kn(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Jn(e){return Array.isArray(e)?e:e instanceof Function?Jn(e()):[e]}const Zn=`${qt}/branches`,Qn=[];const ea=async e=>await Pt(e,{method:"GET"})||Qn;function ta(e=!1){const{data:t}=Xn(`${qt}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,_t);return Array.isArray(t)?t:[]}const na=(e="")=>"ULTRASERVICE"===e,aa=d((({field:e,input:t,params:n})=>{const a=na(n?.typeForm),l=e("region"),r=l?.value?.key,s=l?.value?.text,c=a?ta(a)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=Xn(e?`${Zn}?regionCode=${e}`:null,ea);return t||Qn}(r)?.filter((e=>e?.address));return i((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(Ln,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...e(t?.name??""),isSearch:!0})})),ia=(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}},la=(e,t,n)=>Math.max(t,Math.min(e,n));function ra(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function sa({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=ra(t.target?.value),a=e.length?e[n]:n;r&&r(a||0)}})})]})}const oa=1,ca=100,da=d((e=>{const{className:t,title:n,items:a=[],list:i=[],min:r=(i.length?0:oa),max:s=(i.length?i.length-1:ca),step:d=1,value:m=i[0]||r,disabled:h=!1,onChange:p}=e,g=ia(e,{normalize:(e=0)=>i.length?ma(i)(e):la(e,r,s),format:He()}),f=l((e=>{p&&p(ra(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Ae,{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}),sa({list:i,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),ua(a)]})})),ma=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),ua=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ae,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),ha=["От 1 000 ₽","До 1 000 000 000 ₽"],pa=d((({field:e,input:t})=>o(da,{title:"Сумма, ₽",items:ha,min:1e3,max:1e9,...e(t?.name??"")}))),ga=d((({field:e,input:t})=>o(Pn,{label:"Годовая выручка, ₽",...e(t?.name??"")}))),fa=d((({field:e,input:t})=>o(Pn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e(t?.name??"")}))),xa=({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=ya(t,e),c=ba(t,l,r);u.push(o("td",{children:o("div",{className:va(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},ya=(e,t)=>t&&e.toDateString()===t.toDateString(),ba=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),va=(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"),Na=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],wa=d((({today:e,currentMonth:t,currentYear:n,min:a,max:i,onDateSelect:s=fn,setValue:d=fn})=>{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:Na.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:xa({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:a,max:i,onDateClick:m})})]})})),Ca=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function Sa(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const a=[...t],i=a.findIndex(ka),l=a.map(((e,t)=>Ta(e)?a.slice(0,t).filter(Ta).length:-1)),r=a.map(((e,t)=>Ia(e)?e:n.charAt(l[t])||e)),s=l.indexOf(n.length-1)+1;return r.slice(0,Math.max(i,s)).join("")}const ka=e=>"_"===e,Ia=e=>/\d/.test(e),Ta=e=>ka(e)||Ia(e),Ra=1940,Ba={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Pa=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((()=>{Ea({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(Sa(t,"__.__.____"))},onBlur:()=>{_a(p)?Ea({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(l||"")},disabled:r}),r?null:o(H,{className:"mr-s",...Ba})]})})),_a=e=>{const[t,n,a]=e.split(".");if((e=>Number(e)>=Ra&&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},Ea=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:a})=>{if(_a(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))}},Da=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:a,setSelectedMonth:i,setSelectedYear:l,disabled:r=!1})=>o(Pa,{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")}),Aa=Ca.map((e=>({key:e}))),Ma=Array.from({length:(new Date).getFullYear()-Ra+1},((e,t)=>Ra+t)).reverse().map((e=>({key:String(e)}))),Oa=(e,t)=>{const n=new Date(e,t,1);let a=0;for(;n.getMonth()===t;)a++,n.setDate(n.getDate()+1);return a},za=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:a,onChange:i})=>{a&&i?.(new Date(t,n,Math.min(e,a.getDate())))},Va={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Fa={className:"min-w-32",iconVersion:"black",isBorder:!1},La=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()),[y,b]=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=pn(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(Ca.indexOf(e));const t=Oa(r,Ca.indexOf(e));za({maxDateOfMonth:t,selectedYear:r,selectedMonth:Ca.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:Aa,yearsOptions:Ma,ref:c}})({onYearSelect:b,onMonthSelect:x,onShowCalendar:g,selectedYear:y,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:[bn(t),c("div",{className:"relative",children:[Da({handleChangeVisibleCalendar:I,value:n,valid:r,onChange:h,disabled:m,setSelectedMonth:x,setSelectedYear:b}),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(H,{...Va,className:"-rotate-90 cursor-pointer"})}),o(On,{onChange:w,value:{key:Ca[f]},options:S,...Fa}),o(On,{onChange:C,value:{key:String(y)},options:k,...Fa}),o("div",{className:"my-auto",onClick:N,children:o(H,{...Va,className:"rotate-90 cursor-pointer"})})]}),o(wa,{today:n,currentMonth:f,currentYear:y,onDateSelect:h,min:s,max:d,setValue:g})]}):null]})]})})),$a=d((({className:e,label:t,error:n,errors:a,...i})=>c("div",{className:u("shrink-0 w-full",e),children:[o(La,{label:gn({label:t,errors:a}),valid:Boolean(!n),...i}),wn(n)]}))),ja=d((({field:e,input:t})=>o($a,{label:"Дата рождения",...e(t?.name??"")}))),Ua=d((({field:e,input:t})=>o(Pn,{label:"Количество объектов инкассации",isInteger:!0,...e(t?.name??"")}))),qa=d((({field:e,input:t})=>o(Pn,{className:"col-span-2",...e(t?.name??""),placeholder:"Ваше сообщение",isTextarea:!0}))),Wa=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)}))}))),Ha="appearance-none w-5 h-5 border-solid flex-none",Ya=[{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"}],Ga=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(Wa,{paths:Ya,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",Xa(a)),onClick:s,children:[o("div",{className:u(Ha,"m-0",i?"rounded-full border-2":Za(t),!a&&t?"border-primary-main":"border-gray",a?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Ja(i),"aria-checked":Boolean(t),"aria-disabled":Boolean(a),"aria-label":n}),t?d:null,Ka(n)]})})})),Ka=e=>e?o("div",{className:"ml-s",children:o(Ae,{size:"text-l",font:"font-light",children:e})}):null,Xa=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Ja=(e=!1)=>e?"radio":"checkbox",Za=(e=!1)=>u("rounded border",{"bg-primary-main":e}),Qa=d((({field:e,input:t})=>o(Ga,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...e(t?.name??"")}))),ei=d((({field:e,input:t})=>o($a,{label:"Желаемая дата встречи",...e(t?.name??"")}))),ti=d((({field:e,input:t})=>o(Pn,{label:"Электронная почта",...e(t?.name??""),...t}))),ni=[{key:"ULTRASERVICE",text:"Ультра"}],ai=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],ii=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],li=d((({field:e,input:t})=>o(Ln,{label:"Способ получения ответа",options:ii,...e(t?.name??"")}))),ri=d((({field:e,input:t})=>o(Pn,{label:"ФИО",...e(t?.name??""),...t})));function si(e,t){for(const[n,a]of e.entries())null!=a?t.setItem(n,a):t.removeItem(n)}function oi(e,t){return si(e,t),si(t,e),e.bus.watch((({type:e,event:n})=>{null!=n?t.setItem(e,n):t.removeItem(e)}))}class ci{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)}}class di{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)}}const mi={};function ui(e,t=mi){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 hi=new di;function pi(e){return ui(hi,e)}oi(hi,new ci(globalThis?.localStorage));const gi=()=>pi(),fi=(e,t)=>{if(!t)return null;const n=vi(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")}},xi=(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},yi=(e,t)=>{const n=vi(e);return[40001,40002,71610].includes(t)?n("FOREIGN"):n("RUSSIAN")},bi=(e,t,n)=>{const a=vi(e);return a("7725114488"===n?"RSHB":50102===t?"SOLE_TRADER":t>=75e3&&t<=75505&&75500!==t?"BUDGETARY":"COMMERCIAL")},vi=e=>t=>e.map((e=>({key:e.key,text:e.value}))).find((e=>e.key===t))??null,Ni=(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?.(Ci(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(Pn,{disabled:t?.filledByEsia&&Ni(e,n),label:"Адрес",...e(n),value:a?.fullAddress,onChange:r,...t,onDaDataChange:i})})),Ci=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}),Si=(e,t,n)=>{const{okved:a,okopf:i,inn:l}=ki(n);t?.("legalForm")?.onChange?.(n.data?.opf?.short),t?.("organizationAddress")?.onChange?.(Ci(n.data?.address));const r={amountWorkers:xi(e?.amountWorkers,n.data?.employee_count),employerActivities:fi(e?.employerActivities??[],a),organization:bi(e?.organization??[],i,l),employerOrganization:yi(e?.employerOrganization??[],i)};for(const e in r)r[e]&&t?.(e)?.onChange?.(r[e])},ki=e=>({inn:e.data?.inn??"",okopf:Number(e.data?.opf?.code),okved:e.data?.okved??""}),Ii=d((({field:e,input:t})=>{const n=gi(),a=l((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),Si(n,e,t)}),[]);return o(Pn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??""),onDaDataChange:a})})),Ti=d((({className:e,text:t,value:n,key:a,disabled:i,error:l,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(Ga,{text:t,value:n,disabled:i,onChange:r},a),wn(l)]}))),Ri=d((({field:e,input:t})=>o(Ti,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Bi=`${qt}/outservice`,Pi=[];async function _i(){const e=await Pt(`${Bi}/outserviceregions`);return e&&Array.isArray(e)?e:Pi}const Ei=d((({field:e,input:t})=>{const n=e("region"),a=n?.value?.key,{data:l}=Xn("outServiceRegions",_i),s=r((()=>l?.find((e=>e.code===a))?.localities?.map((e=>({key:e,text:e})))),[l,a]);return i((()=>{""!==a&&e?.(t?.name??"")?.onChange?.("")}),[a,t?.name??""]),o(Ln,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:s,...e(t?.name??""),isSearch:!0})})),Di=d((({field:e,input:t})=>o(Pn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,disabled:t?.filledByEsia&&Ni(e,t?.name??""),...e(t?.name??""),...t}))),Ai=d((({field:e,input:t})=>o(Pn,{label:"Имя",maxLength:60,disabled:t?.filledByEsia&&Ni(e,t.name??""),...e(t?.name??""),...t}))),Mi=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(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Oi=d((({field:e,input:t})=>Un(e("acquiringType")?.value?.key)?o(Mi,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),zi=d((({field:e,input:t})=>o(Pn,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),Vi=e=>"_"===e,Fi=e=>/\d/.test(e),Li=e=>Vi(e)||Fi(e),$i=[..."+7 (___) ___-__-__"],ji=$i.findIndex(Vi),Ui=$i.map(((e,t)=>Li(e)?$i.slice(0,t).filter(Li).length:-1));function qi(e){const t=e.replace(/\D/g,""),n=$i.map(((e,n)=>Fi(e)?e:t.charAt(Ui[n])||e)),a=Ui.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max(ji,a)):n).join("")}const Wi=d((({children:e,onChange:t,...n})=>{const a=l((e=>t&&t(qi(e))),[t]),i=l((e=>{"+7 ("===e&&t&&t("")}),[]);return o(vn,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>i(e?.target?.value||""),children:e})})),Hi=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Wi,{"aria-label":t,label:gn({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),wn(n)]}))),Yi=d((({field:e,input:t})=>{const n=t?.name||"phone";return o(Hi,{label:"Телефон",...e(n),disabled:t?.filledByEsia&&Ni(e,n),...t})})),Gi=d((({field:e})=>Un(e("acquiringType")?.value?.key)?o(Mi,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Ki=Vt((({field:e,input:t,source:n})=>o(Ln,{placeholder:"Выберите продукт",label:"Продукт",options:Xi(n?.productList),...e(t?.name??"")}))),Xi=e=>(e??[]).map((e=>({key:e,value:e}))),Ji=`${qt}/regions`,Zi=[];function Qi(e=Ji){const{data:t}=Xn(e,_t);return Array.isArray(t)?t:Zi}const el=`${qt}/outservice/outserviceregions`,tl=d((({field:e,input:t,params:n})=>{var a;const i=Qi((a=n?.typeForm,"OUTSERVICE"===a?el:void 0));return o(Ln,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>i?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[i]),...e(t?.name??"")})})),nl=d((({field:e,input:t})=>{const n=ta(!0),a=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(Ln,{label:"Регион",placeholder:"Выберите регион",options:a,...e(t?.name??"")})})),al=(e,t)=>{const{value:n,isDirty:a}=e,i=a?t(n):[];return{...e,errors:i,error:i[0]}},il=rn((e=>null!=e&&""!==e)),ll="Некорректно заполненное поле",rl="Укажите регион, город/населенный пункт, улицу, дом",sl=e=>il(e??ll),ol=e=>rn((e=>e?.key&&""!==e?.key))(e??ll),cl=e=>rn((e=>"string"==typeof e&&/^[0-9]{1,2}$/g.test(e)))(e??ll),dl=e=>rn((e=>"string"==typeof e&&e.length>1&&vl(e)))(e??ll),ml=(e,t)=>rn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??ll),ul=e=>rn((e=>"string"==typeof e&&6===e.length))(e),hl=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),pl=e=>rn(hl)(e),gl=rn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),fl=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},xl=e=>Boolean(e.region&&e.city&&e.house),yl=()=>rn(xl)(rl),bl=/^[\u0400-\u04FF\d\s]+$/u,vl=(e="")=>bl.test(e),Nl=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)},wl={processPersonalDataFlg:gl,consentProviderFlg:gl,consentInformFlg:gl,consentPfrFlg:gl,consentOthersFlg:gl},Cl={addressCourier:yl(),paymentSystem:sl("Укажите тип платежной системы"),currency:sl("Укажите валюту"),cardCategory:sl("Укажите категорию карты"),codeWord:(Sl="Необходимо ввести кодовое слово",rn((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&vl(e)))(Sl??ll)),confirmationIncome:ol(),methodObtain:sl(),deliveryDate:sl("Укажите дату доставки")};var Sl;const kl={organization:ol("Выберите тип организации"),organizationAddress:rn((e=>Boolean(e.fiasCode&&e.city&&e.house)))(rl),organizationPhone:pl("Укажите номер телефона"),organizationName:sl("Укажите наименование организации"),legalForm:sl("Укажите ОПФ"),generalSeniority:cl("Укажите количество лет стажа"),lastJobExperience:cl("Укажите стаж на последнем месте работы"),experience5Years:cl("Укажите общий стаж за последние 5 лет"),jobsNumber:cl("Укажите количество мест работы за последние 5 лет"),beginDate:sl("Укажите дату заключения трудового договора"),addressFact:yl(),addressRegistration:yl(),addressRetail:ol("Выберите адрес банка"),addressMatch:sl(),sex:sl("Укажите свой пол"),limitedBirthday:rn(Nl)("Допустимый возраст заёмщика - от 23 до 75 лет"),birthPlace:sl("Укажите место рождения"),education:ol("Выберите ваше образование"),housing:ol("Выберите тип жилья"),amountWorkers:ol("Выберите информацию о количестве сотрудников"),employment:ol("Выберите информацию о трудоустройстве"),employerActivities:ol("Выберите вид деятельности организации"),employerOrganization:ol("Выберите вид организации"),positionOrganization:ol("Выберите вашу должность"),familyStatus:ol("Выберите семейное положение"),familyMembers:ml(2,"Укажите количество членов семьи"),children:ml(2,"Укажите количество детей"),dependents:ml(2,"Укажите количество иждивенцев"),totalIncome:ml(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:ml(10,"Укажите сумму обязательных выплат"),snils:(e=>rn(fl)(e))("Некорректный номер СНИЛС"),conscription:sl(),armyIdFlg:gl,dulSerie:(e=>rn((e=>"string"==typeof e&&4===e.length))(e))("Укажите серию паспорта"),dulNumber:ul("Укажите номер паспорта"),dulIssueDateField:sl("Укажите дату выдачи паспорта"),dulSubdivisionCode:ul("Укажите код подразделения"),dulIssuedBy:sl("Укажите организацию, выдавшую паспорт"),participantDateRegistration:sl("Укажите дату регистрации"),retirementIncome:sl(),otherIncome:sl(),wages:sl(),mandatoryPayments:sl(),disablePeopleFlg:sl(),bankruptcyFlg:sl(),shareholderFlg:sl(),legalEntityName:sl(),bankEmployeeCode:sl(),partInBusiness:sl(),regionRetail:ol("Выберите регион")},Il={fullName:sl(),addressBranch:ol(),desiredMeetingDate:sl(),product:sl(),localities:sl(),partnerComments:sl(),collectionCount:sl(),acquiringType:ol(),serviceType:ol(),annualRevenue:sl(),feedbackMethod:ol(),serviceDirection:ol(),secondaryPhone:pl("Укажите номер телефона"),region:ol(),surname:dl("Укажите свою фамилию на кириллице"),name:dl("Укажите своё имя на кириллице"),middleName:dl("Укажите своё отчество на кириллице"),birthday:sl("Укажите дату рождения"),phone:pl("Укажите номер телефона"),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:sl(),typeForm:sl(),consentToReceiveMaterials:gl,consentDataProcessing:gl,...wl,...kl,...Cl},Tl=e=>{const t=e.filter((e=>Boolean(e?.required&&e?.name))),n=t.some((e=>e.condition?.values)),a=Object.fromEntries(t.filter(Rl).map((({name:e})=>[e,Il[e??""]])));return e=>n?Object.fromEntries(t.filter(Rl).filter(Bl(e)).map((({name:e})=>[e,Il[e??""]]))):a},Rl=({name:e})=>Boolean(Il[e??""]),Bl=e=>t=>!t?.condition||t.condition.values.find((n=>{const a=e?.[t?.condition?.name??""];return n===(a?.key??a)})),Pl=d((({field:e})=>{const t=e("secondaryPhone");return o(Hi,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?al(t,Il.secondaryPhone):t})})),_l=d((({field:e,input:t})=>o(Ln,{label:"Направление обслуживания",placeholder:"Выберите направление",options:ai,...e(t?.name??"")}))),El=d((({field:e,input:t})=>o(Pn,{label:"Фамилия",maxLength:60,disabled:t?.filledByEsia&&Ni(e,"surname"),...e(t?.name??""),...t}))),Dl=["От 1 мес","До 15 лет"],Al=d((({field:e})=>o(da,{title:"Срок, месяцев",items:Dl,min:1,max:180,...e("term")}))),Ml=d((({field:e,input:t})=>o(Ln,{label:"Тип обслуживания",options:ni,...e(t?.name??"")}))),Ol={horizontal:"@lg:flex-row",vertical:""},zl=d((({label:e,items:t,value:n,className:a,disabled:i=!1,orientation:l="horizontal",onChange:r})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",Ol[l],a),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Ga,{isRadio:!0,text:t,value:n===e,onChange:()=>r?.(e),disabled:i},String(e))))})]}))),Vl=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],Fl=d((({field:e,input:t})=>{const n=l((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(zl,{className:"whitespace-normal",orientation:"horizontal",items:Vl,...e(t?.name??"",{onChange:n})})})}));const Ll={$ref:"/wcms-resources/outservice-productlist.json"},$l={fullName:ri,addressBranch:aa,desiredMeetingDate:ei,product:e=>o(Ki,{...e,source:Ll}),localities:Ei,isClient:Ri,partnerComments:zi,collectionCount:Ua,acquiringType:jn,onlineCheckout:Oi,posTerminal:Gi,serviceType:Ml,term:Al,amount:pa,annualRevenue:ga,vedTypes:Fl,feedbackMethod:li,serviceDirection:_l,bankEmpolee:fa,secondaryPhone:Pl,applicationDate:e=>o(Pn,{label:"Дата и время обращения в Банк",...e}),region:e=>na(e?.params?.typeForm)?o(nl,{...e}):o(tl,{...e}),consentToReceiveMaterials:Qa,surname:El,name:Ai,middleName:Di,birthday:ja,phone:Yi,email:ti,inn:Ii,comment:qa},jl=(e,t,n={})=>(a,i)=>{const l={...$l,...n}[String(a.name)];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})&&l?o("div",{children:o(l,{field:e,input:a,params:t})},i):null},Ul=e=>2===e?"@xl:grid-cols-2":"",ql=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ae,{size:"text-h6",children:e})}):null,Wl={primary:u("justify-center px-9 py-4","text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active","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("justify-center px-9 py-4","text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","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=u("group/btn-embedded","justify-between p-0","bg-transparent border border-transparent outline-none"),Yl=d((({className:e,type:t="button",version:n="primary",embedded:a,rounded:i=!0,disabled:s,role:c,data:d,dataTheme:m,children:h,onClick:p})=>{const g=l(ce((e=>{!s&&p?.(e)})),[s,p]),f=r((()=>fe(d)),[d]);return o("button",{className:u("font-sans flex items-center gap-xs relative",!s&&!a&&Wl[n],{[Hl]:a,"rounded-md":i,"bg-main-gray text-main-disabled cursor-not-allowed":s},e),type:t,role:c,"data-theme":m,...f,onClick:g,children:h})})),Gl=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(H,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),Kl=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(Gl,{className:"absolute top-0 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),Xl=d((({ok:e,typeForm:t,onClose:n})=>{const a="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(Kl,{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(k,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?a:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Yl,{type:"button",onClick:n,children:"Хорошо"})]})})})),Jl=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:a,amount:i,term:l,annualRevenue:r,serviceType:s,vedTypes:o,region:c,inn:d,...m}=e,u=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:a=!1,term:i,amount:l,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Un(t?.key)?`/Онлайн касса=${n}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${l}/Срок=${i}/Выручка=${r}`})(e):null,h={...m,...Ql(o),...Zl(c),...d&&{inn:d},...u?{partnerComments:u}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(h)?.map((([e,t])=>[e,t?.key||t])))},Zl=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Ql=e=>e?{vedTypes:Object.fromEntries(Vl.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:$n[0],serviceType:ni[0],feedbackMethod:ii[0],serviceDirection:ai[0],vedTypes:Vl[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},tr=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"})}))),nr=d((({isLoading:e,disabled:t,children:n,...a})=>c(Yl,{type:"submit",disabled:e||t,...a,children:[e?o(tr,{blur:!0,size:"small"}):null,n]}))),ar=d((({text:e,link:t})=>c(C,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Ae,{children:e}):null,t?o(Ne,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Ae,{children:t.text})}):null]}))),ir=(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(Ga,{...e}),o(ar,{link:t})]}),wn(al(e,gl).error)]}):o(ar,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),o(nr,{className:"w-full @xl:w-auto",children:n?.text?n.text:"Отправить заявку"})]}),lr={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=`${qt}${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}}},rr=d((({className:e,title:t,typeForm:n="",sections:a=[],button:i,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]),y=r((()=>Tl(f)),[f]),b=un(Xl),v=tn(),N=l((async(e,t)=>{const a=Jl({...e,...m}),i=Boolean(await lr.send(a,"lead"===d));b.open({ok:i,typeForm:n}),i&&Xt({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:C,onSubmit:S}]=dn(x,{resetOnSubmit:!0,formValidator:y,onSubmit:N}),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(Ul(e.columns),"grid gap-x-m"),children:[ql(e.title),(e?.inputs||[])?.map(jl(C,{typeForm:n}))]},`section-${t}`))),ir(k?C("consentDataProcessing"):void 0,s,i)]}),h?c("div",{className:"space-y-m",children:[o(w,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),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(Pn,{label:"Адрес",disabled:r,...e(n),value:a?.fullAddress,onChange:c,...t,onDaDataChange:s})})),cr=d((({field:e,input:t})=>o(Ti,{text:"Адрес фактического места жительства совпадает с адресом регистрации",...e(t?.name??"")}))),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(H,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),yr=e=>globalThis[e];function br(e,t,n=!0){const[l,r]=a(void 0);return i((()=>{let a=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=yr(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(yr(e))}))}))}return new Promise(((n,a)=>{const i=document.createElement("script");i.src=t,i.async=!0,i.id=t,i.addEventListener("load",(()=>{n(yr(e))})),i.addEventListener("error",(e=>{a(e)})),document.head.appendChild(i)}))})(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}const vr={...gr,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(H,{name:n,width:"20",height:"16"})})})),wr=[55.753995,37.614069],Cr=d((({points:e,className:t="",zoom:n=5,isLoad:a,selectedAddress:l})=>{const r=s(null),d=s(null),m=br("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${A.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);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:Sr(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(tr,{}):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"})]}),xr(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){const a=(()=>{const e=new Uint8Array(8);return globalThis.crypto.getRandomValues(e),e.reduce(((e,t)=>`${e}${t.toString(16).padStart(2,"0")}`),"")})();return globalThis?.fetch?.(`/light-api-cash/v1${e}`,{method:t,headers:{"Content-Type":"application/json","X-B3-Sampled":"1","X-B3-Spanid":a,"X-B3-Traceid":a,...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((({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:Er({textItems:l,subText:t,children:n,isPhone:a,...i})})),Er=({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(Ae,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Dr(n,s),i?o(Ae,{color:a,size:"text-m",children:i}):null]}),Dr=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Ae,{size:"text-l",children:t?o("a",{href:`tel:${Ar(e)}`,children:e.trim()}):e.trim()},String(n)))),Ar=e=>e.replace(/\D/g,""),Mr=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}))),Or=d((({className:e,children:t})=>o("span",{className:u("inline-flex items-center text-start gap-s group-hover/btn-embedded:text-primary-main",e),children:t}))),zr=d((({isUnfolded:e,...t})=>o(H,{name:e?"ArrowUpIcon":"ArrowDownIcon",size:"small",iconVersion:"",...t}))),Vr=d((({className:e,isUnfolded:t,label:n=(t?"Скрыть":"Развернуть"),embedded:a,...i})=>c(Yl,{className:u({"text-h4":!a},e),rounded:!1,embedded:a,...i,children:[o(Or,{children:n}),o(zr,{isUnfolded:t,iconVersion:a?"color":""})]}))),Fr=d((({className:e,role:t="group",children:n})=>o("div",{className:u(e),role:t,children:n})));const Lr=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})})})),$r=d((({children:e})=>{const[t,{toggle:n}]=nn(!1);return c("div",{children:[o("div",{className:"hidden sm:block",children:e}),c(Fr,{className:"block sm:hidden",children:[o(Lr,{isUnfolded:t,children:e}),o(Vr,{className:"w-full my-m mr-m border-b border-solid border-main-divider",label:t?"Скрыть":"Подробнее",isUnfolded:t,embedded:!0,onClick:n})]})]})})),jr=e=>{const t=qr(e);return o(_r,{label:"Режим работы",value:t,className:"max-w-none"})},Ur=({workTime:e="",lunchHour:t="",daysOff:n=""},a=!1)=>e?[`${a?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",qr=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[Ur({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":a}),Ur({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:a},!0)].filter(Boolean)},Wr=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Hr=e=>Wr.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??"")}}))),Yr=e=>{if(!e)return null;const t=Gr(e);return c(Mr,{className:"border-none",children:[o(_r,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Kr)})}),o(_r,{label:"Режим работы",className:"max-w-none",children:o(Ae,{children:e})})]})},Gr=e=>{const t=Wr.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},Kr=({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(Ae,{size:"text-xs",children:e})},String(n)),Xr=({currency:e,buyExchangeRate:t,saleExchangeRate:n},a)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(_r,{label:"Валюта",value:e.currency}):null,t?o(_r,{label:"Купить",value:String(t)}):null,n?o(_r,{label:"Продать",value:String(n)}):null]},String(a)),Jr={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"}},Zr=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",Jr[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(Ae,{size:"text-m",color:Jr[n].text,children:t})]}))),Qr=(new Date).getDay(),es=e=>{const[t]=e?.slice(Qr-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(Zr,{color:"green",children:i}):null,n&&l?o(Zr,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Zr,{color:"red",children:"Выходной"})},ts=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",ns=({title:e,status:t,workTime:n,lunchHour:a,hasLunch:i},l)=>o(_r,{label:e,value:t&&n?n:"",subText:ts({lunchHour:a,hasLunch:i,status:t}),subColor:!t||i?"text-error":"text-green-dark"},String(l)),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=(e,t)=>{if(!e.workSchedule)return null;const n=Hr(e.workSchedule);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(Ae,{size:"text-h4",children:e.name}),e.address?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:e.address})]}):null]}),es(n)]}),o($r,{children:ss(e)})]},String(t))},ss=({phone:e,fax:t,phoneBusiness:n,phoneNatural:a,phoneCallCentre:i,phoneCurrencyControl:l,workSchedule:r,exchangeRate:s})=>{const d=Hr(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Mr,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(_r,{label:"Факс",value:t,isPhone:!0}),o(_r,{label:"Телефон филиала",value:e,isPhone:!0}),o(_r,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(_r,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(_r,{label:"Для консультаций по валютному контролю",value:l,isPhone:!0}),o(_r,{label:"Контакт-центр",value:i,isPhone:!0})]}),r?.isMatchesPattern?o(Mr,{children:o(_r,{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(ns)})})}):c(Mr,{children:[o(_r,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Kr)})}),jr(d)]}),r?.businessScheduleVisibleTag?Yr(r?.businessScheduleDescription):null,s?.currencies?.length?o(Mr,{className:"flex-wrap",children:s?.currencies?.map(Xr)}):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=Hr(e),n=e?qr(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}=Xn(`/light-api-cash/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),ys=d((({children:e})=>xs?e:null)),bs=d((({field:e,input:t})=>{const[n,l]=a([]),{data:r}=gs("REGION_RF"),s=e("regionRetail")?.value||{},d=e(t?.name??"");i((()=>{(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??"");l(e)})(),s?.key&&d.onChange?.("")}),[s.key]);const{points:m}=ps({data:n,filtrationState:{},getBalloon:os});return c("div",{children:[o(Ln,{label:"Адрес отделения",placeholder:"Выберите отделение",options:n.map((({id:e,address:t=""})=>({key:e?.toString()||"",text:t}))),...d,isSearch:!0}),o("div",{className:"h-[600px]",children:o(ys,{children:o(Cr,{points:m,isLoad:!r,className:"h-full",selectedAddress:d?.value?.text})})})]})})),vs=Vt((({field:e,source:t,fieldName:n,placeholder:a="Выберите из списка",options:i,...l})=>{const r=t?.map((e=>({key:e.key||"",text:e.value})))||[];return o(Ln,{placeholder:a,options:r,...e(n),...l})})),Ns=d((({field:e,input:t})=>{const{data:n}=gs("EMPLOYEES_NUMBER"),a=gi();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(Ti,{text:"Наличие военного билета",...e(t?.name??"")}))),Cs=d((({field:e,input:t})=>o(Pn,{label:"Код представителя Банка",placeholder:"Введите код",isInteger:!0,...e(t?.name??""),...t}))),Ss=d((({field:e,input:t})=>o(Ti,{text:"В отношении меня ведётся производство по делу о банкротстве",...e(t?.name??"")}))),ks=d((({field:e,input:t})=>o($a,{label:"Дата начала работы на текущем месте",...e(t?.name??""),...t}))),Is=d((({field:e,input:t})=>o(Pn,{label:"Место рождения",...e(t?.name??""),...t,disabled:t?.filledByEsia&&Ni(e,"birthPlace")}))),Ts=e=>{try{return JSON.parse(String(e))}catch(e){return null}};const Rs=d((({field:e,input:t})=>{const[n,r]=a([]),[s]=function(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])]}("programId"),{value:c,onChange:d}=e("cardCategory"),m=e("paymentSystem")?.value?.key;return i((()=>{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),Bs(e,c)||d&&d(null)})()}),[m]),o(vs,{field:e,source:n,label:"Категория карты",fieldName:"cardCategory",input:t})})),Bs=(e,t)=>e.some((e=>e.key===t?.key)),Ps=d((({field:e,input:t})=>o(Pn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),_s=d((({field:e,input:t})=>o(Pn,{label:"Кодовое слово",...e(t?.name??""),...t}))),Es=d((({field:e,input:t})=>{const{data:n}=gs("INCOME_CERT_UNITED");return o(vs,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),Ds=d((({field:e,input:t})=>{const{data:n}=gs("MILITARY_STATUS");return o(vs,{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}},Ms=d((({src:e,convertToPng:t,onClose:n,onDocumentRead:a})=>c(Kl,{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(Yl,{className:"mx-auto mt-m",type:"button",onClick:()=>{a?.(),n?.()},children:"Ознакомиться"})]}))),Os=(e,t)=>{const{open:n}=un(Ms),a=ke();return l((async()=>{if(e){const i=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:i,onDocumentRead:t})}}),[n,e,a])},zs=d((({className:e,error:t,docId:n,...a})=>{const i=Os(n,(()=>a.onChange?.(!0)));return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(Ga,{...a}),n?o(Ne,{className:"text-primary-main",onClick:i,children:o(Ae,{children:"Ознакомиться"})}):null]}),wn(t)]})})),Vs=d((({field:e,input:t})=>t&&t.name?o(zs,{text:As[t.name]?.text,docId:As[t.name]?.docId,...e(t.name)}):null)),Fs=Math.round(29.5),Ls=d((({className:e,title:t,children:n,...a})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...a,children:[t?o(w,{className:"text-center",title:t}):null,n]}))),$s="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",js="flex flex-col lg:w-1/2 gap-2xl",Us="flex flex-col gap-y-xl min-w-52",qs=d((({value:e,fractionDigits:t,fixed:n,prefix:a,postfix:i})=>o(Ae,{size:"text-h3",children:"number"==typeof e?[a,He(t,{fixed:n})(e),i].filter(Boolean).join(" "):e}))),Ws=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(Ae,{size:"text-l",font:"font-light",color:a,children:t}):null,n?o(qs,{value:n,...i}):o(Ae,{size:"text-h3",children:"-"})]}))),Hs=(e=[],t=!1)=>Ys([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Ys=(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]},Gs=(e,t=0)=>e?.sum?e.sum:t,Ks=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Xs=(e,t)=>e?o(C,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Js=({min:e=0,max:t=0,availableMonths:n,...a})=>o(da,{items:[`От ${Zs(e)}`,`До ${Zs(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...a}),Zs=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Qs=({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(Ae,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(zl,{orientation:a,items:e,value:e[i?0:1].id,onChange:t=>l&&l(t===e[0].id),...r})]}),eo=e=>Qs({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),to=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...a})=>o(da,{items:e?[`От ${He(1)(a.min||0)} ${n}`,`До ${He(1)(a.max||0)} ${n}`]:[],step:t,...a}),no=({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?.(la(t?.[i],n.minMonths,n.maxMonths))},ao=(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)},io=e=>e,lo=(e=io)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),ro=lo(),so=(e=io)=>lo((t=>-e(t))),oo=so(),co=([e,t],n,a=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:mo([e,t],a),mo=([e,t],n=[])=>({[e]:n.length?oo(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?ro(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),uo=(e,[t,n],a)=>e>=a[t]&&e<=a[n],ho={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},po=e=>go({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&go({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&go({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&go({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),go=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],fo=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.rateRows||[ho],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>po({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=co(["minSum","maxSum"],r,l),{minMonths:c,maxMonths:d}=co(["minMonths","maxMonths"],r,l),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i})=>e?.find((e=>po({row:e,userInputParams:t,paramsViewSettings:n})&&uo(a,["minSum","maxSum"],e)&&uo(i,["minMonths","maxMonths"],e)))||ho)({rateRows:l,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i}),{rate:u}=m,h=ao(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:a,monthsValue:i,monthlyPayment:h}},xo=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),yo={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},bo=Vt((({className:e,title:t,calcSource:n,buttons:a,footnote:l,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const h=(p=n?.rateRows,Ys([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:f}]=dn({moneyValue:Gs(s,2e5),monthsValue:Ks(s,Fs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),x=fo(g,n,r),y=eo({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:b}=f("moneyValue"),{onChange:v}=f("monthsValue");return i((()=>{b&&b(la(g.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),i((()=>{v&&v(la(g.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),i((()=>{!xo(s)&&h&&no({field:f,defParams:h,calcParams:x,map:yo,monthsValue:"minMonths"})}),[n,s]),o(Ls,{className:e,title:t,...m,children:c("section",{className:u($s,e),children:[c("div",{className:js,children:[to({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...f("moneyValue"),value:x.moneyValue}),Js({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...f("monthsValue"),value:x.monthsValue}),vo({...x,...r},f),o("div",{className:"sm:hidden",children:y})]}),c("div",{className:u(Us,"@4xl:w-1/2"),children:[o(Ws,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Ws,{title:"Ставка",value:x?.rate,fractionDigits:2,postfix:"%"}),o(Ws,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:y}),je(a,{isVertical:!0}),Xs(l)]})]})})})),vo=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Ga,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Ga,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Ga,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Ga,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),No="calculator",wo=d((({field:e,params:t})=>{const n=l((t=>{e(No).onChange?.(t)}),[]);return o(bo,{...t?.calcData,padding:"p-0",defaultParams:So(e(No).value),onChange:n})})),Co={moneyValue:"sum",monthsValue:"period",isInsurance:"isEnableInsurance",isPensionClient:"isEnablePensionClient",isStateEmployee:"isEnableStateEmployee",isSalaryClient:"isEnableSalaryClient",isAnnuity:"isAnnuity"},So=(e,t=!1)=>{const n=t?ko(Co):Co;return Object.fromEntries(Object.entries(e??{}).map((([e,t])=>[n[e],t])))},ko=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e]))),Io=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})})),To=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(zl,{label:gn({label:t,errors:a?.errors}),...a}),wn(n)]}))),Ro=[{id:"810",text:"Рубли"}],Bo=d((({field:e,input:t})=>o(To,{label:"Валюта",orientation:"horizontal",items:Ro,...e(t?.name??"")}))),Po=d((({field:e,input:t})=>o($a,{label:"Дата доставки",...e(t?.name??"")}))),_o=d((({field:e,input:t})=>o(Pn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",isInteger:!0,maxLength:2,...e(t?.name??""),...t}))),Eo=d((({field:e,input:t})=>o(Ti,{text:"Являюсь инвалидом",...e(t?.name??"")}))),Do=d((({field:e,input:t})=>o($a,{label:"Дата выдачи",...e(t?.name??""),disabled:t?.filledByEsia&&Ni(e,t?.name??"")}))),Ao=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("dulSubdivisionCode"),i=l((e=>{a?.(e?.data?.code?.replace("-",""))}),[]);return o(Pn,{disabled:t?.filledByEsia&&Ni(e,t?.name??""),label:"Кем выдан",...t,...e(t?.name??""),onDaDataChange:i,daDataQueryPrefix:n})})),Mo=d((({field:e,input:t})=>o(Pn,{disabled:t?.filledByEsia&&Ni(e,t.name??""),label:"Номер документа",isInteger:!0,maxLength:6,...e(t?.name??"")}))),Oo=d((({field:e,input:t})=>o(Pn,{disabled:t?.filledByEsia&&Ni(e,t.name??""),label:"Серия документа",isInteger:!0,maxLength:4,...e(t?.name??"")}))),zo=d((({field:e,input:t})=>{const n=l((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(Pn,{disabled:t?.filledByEsia&&Ni(e,t.name??""),label:"Код подразделения",isInteger:!0,maxLength:6,...t,...e(t?.name??""),onDaDataChange:n})})),Vo=d((({field:e,input:t})=>{const{data:n}=gs("EDUCATION_LEVEL");return o(vs,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),Fo=d((({field:e,input:t})=>{const{data:n}=gs("ORGANIZATION_ACTIVITY_TYPE"),a=gi();return i((()=>{n&&(a.employerActivities=n)}),[n]),o(vs,{field:e,source:a.employerActivities??[],label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),Lo=d((({field:e,input:t})=>{const{data:n}=gs("ORGANIZATION_KIND"),a=gi();return i((()=>{n&&(a.employerOrganization=n)}),[n]),o(vs,{field:e,source:a.employerOrganization??[],label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),$o=d((({field:e,input:t})=>{const{data:n}=gs("EMPLOYMENT_INFO_UNITED");return o(vs,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),jo=d((({field:e,input:t})=>o(Pn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Uo=d((({field:e,input:t})=>{const n=l((n=>e(t?.name??"")?.onChange?.(String(la(Number(n),0,5)))),[]);return o(Pn,{label:"Стаж",placeholder:"За последние 5 лет",type:"number",...e(t?.name??""),...t,onChange:n})})),qo=d((({field:e,input:t})=>{const{value:n,onChange:a}=e(t?.name??""),l=e("familyStatus")?.value?.key,r="MARRIED"===l?2:1,s=Number(e("children")?.value),c=Number(e("dependents")?.value),d=r+s+c;return i((()=>{a?.(d)}),[l,s,c]),o(Pn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",disabled:!0,value:n,onChange:a})})),Wo=d((({field:e,input:t})=>{const{data:n}=gs("MARITAL_STATUS");return o(vs,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),Ho=d((({field:e,input:t})=>o(Pn,{label:"Общий стаж",type:"number",maxLength:2,placeholder:"Количество лет",...e(t?.name??""),...t}))),Yo=d((({field:e,input:t})=>{const{data:n}=gs("HOUSE_TYPE");return o(vs,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Go=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(H,{name:t,width:"24",height:"24",iconVersion:n})}),c("div",{className:"",children:[o(Ee,{__html:e}),a?.text?o(Ne,{className:"text-primary-main",children:a.text}):null]})]}))),Ko=d((({input:e})=>o(Go,{__html:e?.label}))),Xo=d((({field:e,input:t})=>o(Pn,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",isInteger:!0,maxLength:2,...e(t?.name??""),...t}))),Jo=d((({field:e,input:t})=>o(Pn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",maxLength:2,...e(t?.name??""),...t}))),Zo=d((({field:e,input:t})=>o(Pn,{label:"Наименование юридического лица",...t,...e(t?.name??""),disabled:!e?.("shareholderFlg")?.value}))),Qo=d((({field:e,input:t})=>o(Pn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...e(t?.name??""),...t}))),ec=d((({field:e,input:t})=>o($a,{label:"Дата рождения",...e(t?.name??""),disabled:t?.filledByEsia&&Ni(e,t.name??"")}))),tc=d((({field:e,input:t})=>o(Pn,{label:"Обязательные выплаты",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),nc=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],ac=d((({field:e,input:t})=>o(To,{orientation:"horizontal",items:nc,...e(t?.name??"")}))),ic=d((({field:e,input:t})=>{const{data:n}=gs("ORGANIZATION_TYPE"),a=gi();return i((()=>{n&&(a.organization=n)}),[n]),o(vs,{field:e,source:a.organization??[],label:"Тип организации",fieldName:"organization",input:t})})),lc=d((({field:e,input:t})=>{const n=gi(),a=l((t=>{e?.("inn")?.onChange?.(t.data?.inn),Si(n,e,t)}),[]);return o(Pn,{label:"Наименование организации",...t,...e(t?.name??""),onDaDataChange:a})})),rc=d((({field:e,input:t})=>o(Pn,{label:"Иные доходы",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),sc=d((({field:e,input:t})=>o($a,{label:"Дата регистрации по месту жительства",...e(t?.name??"")}))),oc=d((({field:e,input:t})=>{const n=l((n=>e(t?.name??"")?.onChange?.(String(la(Number(n),0,100)))),[]);return o(Pn,{label:"Доля участия в бизнесе",placeholder:"в %",isInteger:!0,maxLength:3,...e(t?.name??""),...t,onChange:n})})),cc=e=>e.map((e=>({key:e.type,text:e.name})));const dc=e=>e?.key,mc=d((({field:e,input:t})=>{const[n,l]=a([]),s=pi();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 cc(t?.paymentSystems||[])})(e);l(t??[])}},i((()=>{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(To,{label:"Платежная система",orientation:"horizontal",items:d,...e(t?.name??"",{format:dc,parse:e=>n?.find((t=>t.key===e))})})})),uc=d((({field:e,input:t})=>{const{data:n}=gs("POSITION");return o(vs,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),hc=d((({field:e,input:t})=>{const{data:n}=gs("REGION_RF"),a=n?.map((({key:e,value:t})=>({key:e,text:t})));return o(Ln,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:a,...e(t?.name??"")})})),pc=d((({field:e,input:t})=>o(Pn,{label:"Пенсионные доходы",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),gc=["male","female"],fc=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],xc=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 Sn({url:"/suggest/fio",requestData:{parts:["NAME"]},query:e}),n=t[0]?.data?.gender?.toLowerCase()||"";return gc.includes(n)?n:""})(n);e&&l?.(e)})()}),[]),o(To,{label:"Пол",orientation:"horizontal",items:fc,...e(t?.name??"")})})),yc=d((({field:e,input:t})=>o(Ti,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",...e(t?.name??"")}))),bc=d((({children:e,onChange:t,maxLength:n,...a})=>{const i=l((e=>n?e.length<=n&&t?.(Sa(e,"___-___-___ __")):t?.(Sa(e,"___-___-___ __"))),[t]),r=l((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(vn,{...a,onChange:i,onFocus:e=>i(e?.target?.value||""),onBlur:e=>r(e?.target?.value||""),children:e})})),vc=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(bc,{"aria-label":t,label:gn({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:i,onBlur:l,placeholder:"___-___-___ __",...r}),wn(a)]}))),Nc=d((({field:e,input:t})=>o(vc,{label:"СНИЛС",maxLength:14,...e(t?.name??""),...t}))),wc=d((({field:e,input:t})=>o(Pn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Cc=d((({field:e,input:t})=>o(Pn,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",isInteger:!0,...e(t?.name??""),...t}))),Sc={limitedBirthday:ec},kc={processPersonalDataFlg:Vs,consentProviderFlg:Vs,consentOthersFlg:Vs,consentInformFlg:Vs,consentPfrFlg:Vs},Ic={organization:ic,organizationAddress:wi,organizationPhone:Yi,organizationName:lc,legalForm:Qo,generalSeniority:Ho,lastJobExperience:Jo,experience5Years:Uo,jobsNumber:Xo,beginDate:ks,addressFact:or,addressRegistration:wi,addressRetail:bs,addressMatch:cr,sex:xc,limitedBirthday:ec,birthPlace:Is,education:Vo,housing:Yo,amountWorkers:Ns,employment:$o,employerActivities:Fo,employerOrganization:Lo,positionOrganization:uc,familyStatus:Wo,familyMembers:qo,children:Ps,dependents:_o,totalIncome:wc,expenses:jo,snils:Nc,conscription:Ds,armyIdFlg:ws,dulSerie:Oo,dulNumber:Mo,dulIssueDateField:Do,dulSubdivisionCode:zo,dulIssuedBy:Ao,participantDateRegistration:sc,retirementIncome:pc,otherIncome:rc,wages:Cc,mandatoryPayments:tc,disablePeopleFlg:Eo,bankruptcyFlg:Ss,shareholderFlg:yc,legalEntityName:Zo,creditInRshbCd:Io,bankEmployeeCode:Cs,partInBusiness:oc,regionRetail:hc,infoCard:Ko,calculator:wo,confirmationIncome:Es},Tc={addressCourier:wi,paymentSystem:mc,currency:Bo,cardCategory:Rs,codeWord:_s,methodObtain:ac,deliveryDate:Po},Rc=d((({inputs:e=[],field:t,key:n})=>{const a=e.every((e=>Boolean(t(e.name).value))),i=l((n=>{for(const a of e){const e=t(a.name);e.onChange?.(n)}}),[e]),s=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(al(t(e?.name),Il[e?.name]).error)))),[e]),[d,{toggle:m}]=nn(!0);return o("div",{className:"w-fit",children:c(Fr,{children:[c("div",{className:"flex items-start",children:[c("div",{children:[o(Ga,{text:"Согласие на все документы",value:a,onChange:i},n),wn(s?"Отметьте все обязательные соглашения":"")]}),o(Yl,{embedded:!0,onClick:m,children:o(zr,{className:"p-2xs",iconVersion:"color",isUnfolded:d})})]}),o(Lr,{className:"flex flex-col pl-2xl",isUnfolded:d,children:e.map(jl(t,{},kc))})]})})})),Bc=({field:e,inputs:t})=>{const{consentInputs:n,restInputs:a}=Pc(t||[]);return n.length>2?c("div",{children:[a.map(jl(e,{},{...Sc})),o(Rc,{inputs:n,field:e})]}):(t||[])?.map(jl(e,{},{...Sc}))},Pc=(e=[])=>({consentInputs:e.filter((({name:e})=>Object.keys(As).includes(String(e)))),restInputs:e.filter((({name:e})=>!Object.keys(As).includes(String(e))))}),_c=(e,t)=>o(nr,{className:"w-full @xl:w-auto",isLoading:t,children:e?.text?e.text:"Отправить заявку"}),Ec=e=>Rr("/user-data/updateUserProfile","PUT",e),Dc=e=>Rr("/user-data/updateUserTask","PUT",e),Ac={width:"103",height:"21"},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: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:[zc(l,n?.image,Ac),r?a??o("div",{className:"ml-s",children:o(Ae,{font:"font-medium",color:Vc[l],size:"text-s",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=l((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]),y=l((()=>{(async()=>{s(URL.createObjectURL(await(e=>Rr(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET").then((async e=>e?await e.blob():new Blob)))(e)))})()}),[]);return i(y,[]),o(Kl,{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(Yl,{className:"w-8",embedded:!0,onClick:y,children:o(H,{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(Yl,{version:"secondary",onClick:close,children:"Вернуться"}),o(nr,{version:"secondary",disabled:!d,onClick:x,children:"Отправить"})]}),p?o(tr,{blur:!1}):null]})})})),$c=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: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([]);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: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 ${yn(!n||!a)} rounded-md caret-transparent outline-none`},Wc=d((({isDisabled:e,onClick:t,text:n})=>o(Yl,{type:"button",onClick:t,disabled:e,children:o(Ae,{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=l((()=>r("")),[]),x=Boolean(0===d&&u),y=p>2||x||!e.every(Boolean),b=l((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 i((()=>{r(x?"Код просрочен":"")}),[x]),{handleSubmit:b,hasError:Boolean(n),errorText:n,isLoading:s,timeNextReq:d,isSubmitButtonDisabled:y,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:y,setTimeNextReq:b,setIsTimerStarted:v,setAttempts:N}=Yc({values:m,onSuccess:s}),w=un(Lc),C=Ut(e),S=l((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),b(180),v(!0)):w.open({phoneNumber:C,sendCode:S})}),[C,d]);return i((()=>{S()}),[]),o(Kl,{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(k,{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,b,S),c(Ee,{itemSize:"list-s",children:[o("span",{children:"Вводя код, я подтверждаю, что ознакомлен и подписываю: "}),o("ul",{children:r?.map(((e,t)=>o("li",{children:e},`${e}-${t}`)))})]}),Kc(y,h),f?o(tr,{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,i]=a(""),[r,s]=a(!1),d=Os(2),m=l((()=>{e(n)}),[e,n]),u=l((e=>{i(e),"REFUSE"===e&&s(!0)}),[]),h=r?Zc:Jc;return o(Kl,{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(w,{className:"text-center text-balance",headingType:"h2",title:h.title})}),o(C,{align:"text-center",children:h.description}),o(zl,{className:"whitespace-normal",orientation:"horizontal",items:Qc,value:n,onChange:u}),o(Yl,{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(w,{className:"text-center md:text-left",title:e,headingType:"h5"}),n?o(C,{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"},id={incomeAverage:"INCOME_AVERAGE",mandatoryPayments:"MANDATORY_PAYMENTS",additionalIncome:"ADDITIONAL_INCOME",otherIncome:"OTHER_INCOME",otherPayments:"OTHER_PAYMENTS",rentalIncome:"RENTAL_INCOME",wages:"WAGES",retirementIncome:"RETIREMENT_INCOME"},ld=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: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:od(r,u),additionalIncome:o,otherIncome:c,otherPayments:d,rentalIncome:m,retirementIncome:u},Object.entries(f).reduce(((e,[t,n])=>t in id?[...e,{incomeTypeCd:{key:id[t]},value:Number(n||0)}]:e),[])),snils:h?.replace(/[-\s]/g,""),armyIdFlg:p};var f},od=(e,t)=>Number(e)+Number(t),cd={WORK:"Работаю",RETIREE:"Пенсионер"},dd={BANK_STATEMENT:"Получаю зарплату на счет/карту в РСХБ",BANK_STATEMENT_PENS:"Получаю пенсию на счет/карту в РСХБ",PFR_CERTIFICATE:"Получаю зарплату на счет/карту в другом банке",OTHER:"Другое"},md={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"},ud={...md,amur_card:"14",owner_card:"13",travel_card:"15"},hd=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:od(t,s),additionalIncome:a,otherIncome:i,otherPayments:l,rentalIncome:r,retirementIncome:s}},pd=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}},gd=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}},fd=(e,t)=>e?.key?{key:e.key,text:t?t[e.key]:e.value}:void 0,xd=d((function({task:e,isFromLead:t=!1,onClose:n=fn}){const a=gi(),i=Jt(),{participants:r,creditProgram:s,id:d}=e,m=ud[s.code],u=Boolean(md[s.code]),h=u?"/credit-lead":"/credit-card-lead",{name:p,midname:g,id:f,profile:x}=r[0],y=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:y,educationLevelCd:b,registrationDate:v,houseTypeCd:N,genderCd:w,participantContacts:C=[],participantAddresses:S=[],employmentContractDate:k,employmentTypeCd:I,organizationName:T,organizationInn:R,organizationActivityTypeCd:B,organizationTypeCd:P,organizationKindCd:_,employeesNumberCd:E,opf:D,seniority:A,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:l?.key,paymentSystem:fd(i),cardCategory:fd(n),codeWord:a,limitedBirthday:c,middleName:d,name:m,surname:u,birthPlace:h,dulIssueDateField:p,dulIssuedBy:g,dulNumber:f,dulSerie:x,dulSubdivisionCode:y,education:fd(b),participantDateRegistration:v,housing:fd(N),beginDate:k,employment:fd(I,cd),organizationName:T,inn:R,employerActivities:fd(B),organization:fd(P),employerOrganization:fd(_),amountWorkers:fd(E),legalForm:D,generalSeniority:A?.toString(),experience5Years:M?.toString(),jobsNumber:O?.toString(),lastJobExperience:z?.toString(),positionOrganization:fd(V),familyStatus:fd(F),children:L?.toString(),familyMembers:$?.toString(),dependents:j?.toString(),conscription:fd(U),confirmationIncome:fd(Q,dd),snils:W,armyIdFlg:H,bankruptcyFlg:Y,shareholderFlg:G,legalEntityName:K,creditInRshbCd:fd(X),calculator:{isInsurance:J,isSalaryClient:Z,moneyValue:r,monthsValue:s,isAnnuity:"ANNUITY"===o?.key},...hd(q),...pd(S),...gd(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)}),[]),b=l((()=>{i.assign(u?"/natural/loans/all-goals":"/natural/creditcards/svoya")}),[]),v=l((()=>{i.assign("/")}),[]);return o(Kl,{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(w,{className:"whitespace-pre-wrap text-center",title:`${p&&g?`${p} ${g}, `:""}мы нашли черновик вашей заявки.\nПродолжите заполнение?`,headingType:"h5"}),o(td,{title:"Перейти к черновику",icon:"BankIcon",description:"Продолжайте заполнять заявку из черновика",onClick:y}),o(td,{title:t?"Продолжить заполнение текущей заявки":"Заполнить новую заявку",icon:"DocIcon",onClick:t?n:b}),o(Yl,{type:"button",version:"secondary",className:"w-full text-h5",onClick:v,children:"Вернуться на главную"})]})})})),yd=d((function({onClose:e=fn}){const t=Jt(),n=l((()=>{t.assign("/natural/loans/all-goals")}),[]),a=l((()=>{t.assign("/")}),[]);return o(Kl,{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(w,{className:"text-center",title:"Заявки не найдены",headingType:"h3"}),o(C,{size:"text-l",align:"text-center",children:"По данному номеру не найдено незавершенных заявок. Вы можете заполнить новую заявку или вернуться на главную страницу"}),o(Yl,{type:"button",className:"w-full",onClick:n,children:"Заполнить новую заявку"}),o(Yl,{type:"button",version:"secondary",className:"w-full",onClick:a,children:"Вернуться на главную"})]})})})),bd=d((({onClose:e})=>{const t=Jt(),n=gi(),a=l((async()=>{const e=await(n={redirectUri:t.href},Tr("/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(Kl,{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(Yl,{type:"button",onClick:a,children:"Заполнить через Госуслуги"}),o(Yl,{type:"button",version:"secondary",onClick:i,children:"Пропустить"})]})]})})})),vd=()=>{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")}},Nd=()=>pi(),wd=({programId:e,nextStepLink:t})=>{const[n,{setTrue:i,setFalse:r}]=nn(!1),[s,o]=a(),c=(()=>{const e=Nd();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}),[])})(),d=(e=>{const{open:t}=un(bd),n=Jt();return l((()=>{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 Ec({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})}})(d),u=un(Gc),h=(()=>{const{open:e}=un(xd),{open:t}=un(yd);return{open:({task:n,isFromLead:a,onClose:i})=>{n?e({task:n,isFromLead:a,onClose:i}):t({})}}})();return{isSending:n,ok:s,handleSubmit:l((async t=>{try{i();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 Sd({programId:e,profileId:a,formData:t,saveUserData:c}),u.close(),m.open(t.phone,a)},i=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)}},l=Cd(t);u.open({phone:t?.phone,consents:l,onSuccess:i}),r()}}catch{o(!1)}var n}),[])}},Cd=e=>Object.keys(As).filter((t=>e[t])).map((e=>As[e]?.text)),Sd=async({programId:e,profileId:t,formData:n,saveUserData:a})=>{const i=kd(n);await Ec(((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:Ut(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 Tr("/user-data/createDraftTask","POST",e)||{})({profileId:t,programId:e});try{await Dc((({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:ld({phone:o&&Ut(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}],marketingInfo:vd()}}})({participantId:r,taskId:l,profileId:t,formData:i}))}catch(e){console.log(e)}a({participantId:r,taskId:l,profileId:t,programId:e,formData:n})},kd=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},Id={surname:"",name:"",middleName:"",limitedBirthday:void 0,phone:"",email:"",processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,consentPfrFlg:!1},Td=(e,t)=>{if(t)return{...t,limitedBirthday:new Date(t?.limitedBirthday||0)};return{...Object.fromEntries(e.map((e=>[e.name,Id[e.name||""]])))}},Rd=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:qi(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:Bd(i),addressFact:Bd(l),esiaAccountTypeCd:t?.esiaAccountType}},Bd=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}},Pd=(e,t)=>{const n=Jt(),[a,{setTrue:s,setFalse:o}]=nn(!1),c=Nd(),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((()=>Td(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},Tr("/esia/updateProfileEsia","POST",l));r&&d((e=>({...e,...Rd(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}]},_d=d((({className:e,title:t,programId:n="",nextStepLink:a="/credit-lead",button:l,...s})=>{const d=r((()=>sr?.flatMap((e=>e?.inputs))||[]),[sr]),m=r((()=>Tl(d)),[d]),[h,{isLoading:p}]=Pd(d,a),{isSending:g,ok:f,handleSubmit:x}=wd({programId:n,nextStepLink:a}),[,{field:y,onSubmit:b}]=dn(h,{formValidator:m,onSubmit:x}),v=un(Xl);return i((()=>{void 0!==f&&v.open({ok:f})}),[f]),o(mn,{className:u("container space-y-m",e),title:t,...s,children:c("form",{onSubmit:b,className:"space-y-m relative",children:[p?o(tr,{blur:!1}):null,sr.map(((e,t)=>c("div",{className:u(Ul(e.columns),"grid gap-x-m"),children:[ql(e.title),Bc({field:y,inputs:e?.inputs})]},`section-${t}`))),_c(l,g)]})})})),Ed=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(k,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Dd=e=>e%2!=0,Ad="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Md=d((({topItemsCount:e=0,label:t,block:n,blocksToRender:a=[],...i})=>{const[l,r]=e>0?[a.slice(0,e),a.slice(e)]:[a,[]],[s,{toggle:d}]=nn(!1);return c("div",{className:u("space-y-2xs",{hidden:!a.length}),children:[c("div",{className:u(Ad),children:[P(l,{...i.options,parent:n}),Dd(l.length)?o(Lt,{className:"col-span-6",...i}):null]}),c(Fr,{children:[c(Lr,{className:u(Ad),isUnfolded:s,children:[P(r,{...i.options,parent:n}),Dd(r.length)?o(Lt,{className:"col-span-6",...i}):null]}),o(Vr,{className:u("w-full",{hidden:e<1}),label:t,isUnfolded:s,disabled:!r?.length,dataTheme:i.options?.page?.colorPalette,onClick:d})]})]})})),Od=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",zd=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Vd=10;function Fd(e=0){const t=Math.round(e*Vd);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const Ld=d((({className:e,style:t,idx:n,activeIndex:a,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:n}={}){const a=s(null),l=r((()=>({threshold:Fd(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}(l((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===a),ref:h,role:"listitem",children:d})})),$d=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],jd=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},y=s([]),b=l(((e,t)=>{const n=[...y.current||[]];n[e]=t,y.current=n,g&&g(n),f&&f(qd(n))}),[g,f]),v=i>0?r*Number(i)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?Ud(c,v):{},...N?zd(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(Ld,{className:u(m,i?$d[i-1]:"",{"h-full":N},t),style:w?Ud(c/4):{},activeIndex:a,idx:n,observerOptions:x,onIntersection:b,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Ud=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),qd=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Wd={"horizontal-list":"w-6","vertical-list":"h-6"},Hd=({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?Wd[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(i)},String(i)),Yd=({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))},Gd=e=>t=>e.scrollWidth/t,Kd=e=>(t,n)=>{e.scrollBy({left:n*Gd(e)(t),behavior:"smooth"})},Xd=({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?[so()(i),lo()(i)]:[-1,-1],m=c>0,u=d<e-1,h=l((()=>{var t;n.current&&(m?Kd(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=l((()=>{n.current&&(u?Kd(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}]},Jd={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Zd=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]=Xd({itemCount:s.length}),g=Qd(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(jd,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Yd({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",Jd[a],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Hd({activeIndex:t,onClick:f,listType:a}))}):null})),Qd=(e=!1)=>({behavior:e?"auto":"smooth"}),em=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"})}))),tm=d((e=>o(em,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),nm=d((e=>o(em,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),am="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",im=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?lm(t):null,l?o(tm,{className:u(rm(i),m?"left-1":"left-0"),onClick:s}):null,r?o(nm,{className:u(rm(i),m?"right-1":"right-0"),onClick:d}):null]})})),lm=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(am,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(am,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),rm=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),sm=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 y=Array.isArray(g)?g.length:0,[b,v]=Xd({itemCount:y,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===l?"relative h-full":""),children:[o(jd,{containerRef:b,activeIndex:N,visibleItemCount:i,gap:n,padding:a,listType:l,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(im,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(Zd,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:y,listType:l,version:t,navButtons:x,containerRef:b,containerScroll:v})]})})),om=({blocksToRender:e,...t})=>o(sm,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Od(!0)),children:R(e,t)},String(n))})}),cm=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...a})=>{switch(e?.view){case"grid":return c("div",{children:[dm(n,t),o(Md,{...e,...a,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[dm(n,t),om({...a,blocksToRender:t})]});default:return null}})),dm=(e,t)=>e&&!t.length?o(Ed,{...e}):null,mm=e=>t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:`sep-${a}`},n):[n]),[]),um=d((({value:e,onChange:t,items:n=[],multiple:a})=>n.map((n=>o(Mi,{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))))),hm=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,mm(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(pm(a)).filter(Boolean))]}),n?o("div",{children:o(Yl,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:i,children:n?.text})}):null]}))),pm=e=>([t,n])=>{const a=n?.type;return"array"===a?gm(t,e)(n):null},gm=(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(Ae,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(um,{items:a,multiple:!n?.single,...t(e)})]},e)},fm=e=>e;function xm(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const ym=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,bm=(e,t)=>Object.entries(e).map((([n,a])=>"number"==typeof a?Array.isArray(t[n])?((e,t)=>n=>ym(t[e])||ym(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>ym(t[e])||ym(n[e])||vm(t[e])<=vm(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>ym(t[e])||ym(n[e])||vm(t[e]?.min)>=vm(n[e]?.min)&&vm(t[e]?.min)<=vm(n[e]?.max))(n,e):Array.isArray(a)?((e,t)=>n=>ym(t[e])||ym(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>ym(t[e])||ym(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),vm=e=>Number(e||0),Nm=(e,{block:t,page:n,normalize:a=fm})=>{const i=t?.blocks||[],[l,s]=dn(e),o=r((()=>xm(i,i.map((e=>Mt(e.content,n?.fallback))))),[i,n?.fallback]),c=l===e?i:((e,t)=>(n=fm)=>e?.filter((([,e])=>bm(t,n(e)||{}))).map((([e])=>e)))(o,l)(a);return[l,{blocksToRender:c,blocksWithProps:o},s]},wm={},Cm={},Sm=Vt((({className:e,filtrationSchema:t=wm,consumerField:n={},resetButton:a,...i})=>{const[,{blocksToRender:l},{field:r,reset:s}]=Nm(Cm,{block:i.block,page:i.options?.page}),d=o(On,{className:"w-64",label:n?.title,options:km(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>km(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...i,children:[o(hm,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Yl,{type:"reset",className:"mt-lg w-64",onClick:s,version:a?.version,children:a?.text})})]})}),o(cm,{blocksToRender:l,...i})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),km=e=>xm(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Im=(e=!1)=>e?"text-left":"text-center",Tm={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Rm=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",Tm[n],e),children:o(H,{...l,width:"54%",name:i})}):null})),Bm=d((({className:e="",title:t,benefitList:n,...a})=>{const i=ke();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(w,{headingType:"h3",as:"h2",className:Im(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(Pm)}):null]})})),Pm=({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(Rm,{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(w,{headingType:"h6",children:e}),o(Ae,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Ee,{__html:n,isDotted:i,itemSize:"list-s"}):null]}):null]},String(r)),_m=(e,t,n)=>{return o(sm,{children:e.map((a=n,({icon:e,title:t,description:n},i)=>c("div",{className:u("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(Ae,{size:"text-h6",font:"font-normal",align:a,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(Ae,{size:"text-h6",font:"font-normal",align:a,children:n}):null]},String(i))))});var a},Em=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(k,{defaultPadding:"",title:l,description:i,headlineVersion:"M"}),e?.length?_m(e,0,t):null]}))),Dm={start:"justify-start",center:"justify-center",end:"justify-end"},Am=d((({buttons:e,className:t="",align:n,...a})=>{const i=n&&u("flex",Dm[n]);return o(g,{className:u("!bg-transparent",i,t),defaultPadding:"p-0",...a,children:je(e)})})),Mm=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:a=2,depositeName:i,isShowDepositeName:l,color:r="text-secondary-text"})=>c("div",{children:[o(Ae,{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]})]}))),Om=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o(Ae,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(H,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(C,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),zm=({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(Mm,{title:e,rate:t,unit:n,fractionDigits:a,color:i,...r})}),o(Ws,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:a,fixed:!0,color:i,...r}),l]}):o(Om,{title:e,...r}),Vm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Fm={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Lm=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,[i,l]=((e,t,n)=>{const{maxBonus:a=5e3,prefMonthsNum:i=Vm.prefMonthsNum,prefTravelBonusRate:l=Vm.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||Fm,n,a);return{...t,...e,monthBonus:i,yearBonus:l}},$m=Vt((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,...l})=>{const[r,{field:s}]=dn({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=Lm(r,n);return o(Ls,{className:e,title:t,...l,children:c("section",{className:u($s,e),children:[c("div",{className:js,children:[to({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),to({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?zm({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:Us,children:[f>=0?o(Ws,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,je(a,{isVertical:!0}),Xs(i)]})]})})})),jm=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Um=e=>Qs({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),qm=" (c капитализацией)",Wm=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:i=[],isCapitalization:l=!1})=>c("div",{className:Us,children:[o(Ws,{title:`Доход в конце срока${l?qm:""}`,value:e,postfix:n,prefix:"+"}),o(Ws,{title:`Сумма в конце срока${l?qm:""}`,value:t,postfix:n}),je(a,{isVertical:!0}),i?.map(Xs)]}),Hm={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Ym={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Gm=(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?Hm[e?.rateType]:"",{data:n}=Xn(t?`${qt}/depositrates/${t}`:null,_t);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&Km(s,e)&&uo(a,["minSum","maxSum"],e)&&uo(n,["minDays","maxDays"],e)))||Ym,{rate:m}=d,u=Xm(m,e),h=a+u,p=c||[Ym];return{...d,...mo(["minSum","maxSum"],p),...mo(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},Km=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Xm=(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)},Jm=Vt((({className:e="",title:t,buttons:n,footnote:a,bottomFootnote:i,isShowDepositeName:l,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=dn({moneyValue:Gs(r,1e5),daysValue:Ks(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=Gm(m,s),{income:g,finalSum:f,rate:x,depositeName:y}=p;return o(Ls,{className:e,title:t,...d,children:c("section",{className:u($s,e),children:[c("div",{className:js,children:[to({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(b={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(da,{items:[`От ${jm(b.min||0)}`,`До ${jm(b.max||0)}`],step:1,...b})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Zm(p,h),Um({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),zm({rate:x,depositeName:y,isShowDepositeName:l}),Wm({income:g,finalSum:f,buttons:n,footnotes:[a,i]})]})});var b})),Zm=(e,t)=>c("div",{className:"space-y-s",children:[o(Ae,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Ga,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Ga,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Qm=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},eu={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},tu=(e,t,n)=>{const{moneyValue:a,monthsValue:i}=e,l=t?.[0]?iu(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=>[au({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),au({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),au({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),au({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,uo(a,["minSum","maxSum"],t),uo(i||l,["minMonths","maxMonths"],t)].every(Boolean)))||eu,{rate:u}=m,h=nu(u,e),p=a+h,g=t||[eu];return{...m,...mo(["minSum","maxSum"],g),...mo(["minMonths","maxMonths"],g),availableMonths:Qm(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}},nu=(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)},au=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],iu=(e,t)=>e+Math.round((t-e)/2),lu=(e="rub")=>"rub"===e,ru=(e,t)=>{const{minMonths:n,maxMonths:a}=mo(["minMonths","maxMonths"],du(t,e?.currency)),i=e.monthsValue||Math.round((n+a)/2);return{monthsValue:la(i,n,a)}},su=(e,t)=>{const{minSum:n,maxSum:a}=mo(["minSum","maxSum"],du(t,e?.currency)),i=e.moneyValue||n;return{moneyValue:la(i,n,a)}},ou=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),cu=e=>{const t=lu(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},du=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},mu=(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?Qs({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?Qs({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),uu(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Um({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(a={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},Qs({...a,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),uu(e.isShowNewClient),e.isShowNewClient?o(Ga,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},uu=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,hu={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},pu={text:"₽",key:"rub"},gu=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))??[pu],g=l((e=>t=>e?{...t,...cu(t),...su(t,e),...ru(t,e),...ou(t,e)}:t)(h),[h]),[f,{field:x}]=dn({moneyValue:Gs(d,2e4),monthsValue:Ks(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:pu},{normalizer:g}),y=x?.("currency")?.value??pu,b=x?.("isNewClient")?.value,v=du(h,y),N=tu(f,v,s),{rate:w,income:C,finalSum:S,type:k=""}=N,I=l((()=>{no({field:x,defParams:Hs(v,b),calcParams:N,monthsValue:"minMonths",map:hu})}),[x,h]);i((()=>{!xo(d)&&v&&I()}),[d,h]);const T=w===Hs(v,b)?.rate;return o(Ls,{className:e,title:t,...m,children:c("section",{className:u($s,e),children:[c("div",{className:js,children:[c("div",{className:"flex gap-m",children:[to({className:"w-full",title:`Сумма, ${y?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:y?.text,step:fu(y?.key)}),h&&h?.length>1?o(Ln,{label:"Валюта",options:p,...x("currency")}):null]}),Js({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),mu({...N,...s},x)]}),zm({rate:w,children:yu(I,T)}),Wm({income:C,finalSum:S,buttons:[...a,xu(n?.buttons,k)],footnotes:[r],postfix:y?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),fu=(e="")=>lu(e)?1e3:100,xu=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},yu=(e,t=!1)=>t?null:o(Yl,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),bu=e=>vu({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&vu({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),vu=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:i})=>!!n&&!n[i]||t[a]===e[a],Nu={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},wu=(e,t,n)=>{const{moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}=e,s=t?.rateRows||[Nu],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>bu({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=co(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=co(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r})=>e?.find((e=>bu({row:e,userInputParams:t,paramsViewSettings:n})&&uo(a+r,["minSum","maxSum"],e)&&uo(l,["minSumOld","maxSumOld"],e)&&uo(r,["minSumExtra","maxSumExtra"],e)&&uo(i,["minMonths","maxMonths"],e)))||Nu)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:i,oldMonthlyPayment:l,moneyExtra:r}),{rate:p}=h,g=ao(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}},Cu=Vt((({className:e="",title:t,calcSource:n,buttons:a,footnote:i,paramsViewSettings:l,...r})=>{const[s,{field:d}]=dn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=wu(s,n,l),h=eo({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Ls,{className:e,title:t,...r,children:c("section",{className:u($s,e),children:[c("div",{className:js,children:[to({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),to({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Js({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Su({...m,...l},d),m.isExtraMoney?to({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:h})]}),c("div",{className:u(Us,"@4xl:w-1/2"),children:[o(Ws,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Ws,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Ws,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Ws,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),je(a,{isVertical:!0}),Xs(i)]})]})})})),Su=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Ga,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Ga,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Ga,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),ku=d((e=>{const{onChange:t,min:n,max:a,defaultValue:i="0",fractionDigits:r=0,...s}=e,c=ia(e,{normalize:(e=i)=>n&&a?String(la(Number(Iu(e)),n,a)):Iu(e),format:He(r)}),d=l((e=>t&&t(Iu(e))),[t]);return o(vn,{onChange:d,...s,...c})})),Iu=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Tu=d((e=>o(ku,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ae,{size:"text-xl",font:"font-light",children:"₽"})})}))),Ru=new di;function Bu(){return ui(Ru)}oi(Ru,new ci(globalThis?.sessionStorage));const Pu={private:"p2p/registerP2P",business:"b2c/registerB2C"},_u=({onClose:e,errorCode:t,errorMessage:n})=>{const a=t?`Код ошибки - ${t}`:"Пожалуйста, повторите позднее";return o(Kl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(k,{className:"w-full",title:"Ошибка перевода",description:a,headlineVersion:"XS",isEmbedded:!0}),n?c("div",{className:"bg-secondary-dark rounded-xl px-4 pt-4 pb-8 grid gap-4 grid-cols-12",children:[c("div",{className:"col-span-8",children:[" ",n]}),o("div",{className:"col-span-4",children:o(ne,{image:{icon:"ResponseFailIcon",iconVersion:"normal"}})})]}):null]})})},Eu=e=>{const t=un(_u),n=Bu(),a=Jt(),i="private"===e?"p2p":"b2c";return l((async({amount:l})=>{const r=await(async(e,t)=>{const n=Jt(),a={amount:String(t),currency:"643",returnUrl:`${n.origin}/p2p/success`,failUrl:`${n.origin}/p2p/failed`,language:"ru"},i=`${qt}/payment/${Pu[e]}`;try{const e=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(a)});return e.ok?await e.json():null}catch(e){return null}})(e,l);(e=>Boolean(e?.formUrl)&&Boolean(e?.orderId))(r)&&(n.transaction={orderId:r.orderId,type:i,url:a.href},a.assign(`${i}/?formUrl=${encodeURIComponent(r.formUrl)}`)),(e=>Boolean(e?.errorMessage)&&0!==e?.errorCode)(r)&&t.open({errorCode:r.errorCode,errorMessage:r.errorMessage})}),[e])},Du={amount:1500},Au=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:a,formType:l="private",...r})=>{const[s,{setValue:d}]=nn(!1),m=Eu(l),[{amount:h},{field:p,onSubmit:f}]=dn(Du,{onSubmit:m});return i((()=>{d(h<=0)}),[h]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?o(w,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",onSubmit:f,children:[o(Tu,{valid:!s,label:n,max:3e5,min:1,...p("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:h}),a?.text?o(nr,{className:"w-full mt-lg",disabled:s,children:a.text}):null]})]})})),Mu=({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(H,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(C,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Ou="relative h-full",zu={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Vu=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...a})=>{const{blocks:i}=a.block||{},l=i?.some($u),r=n?{defaultPadding:"p-6xl pb-m"}:{};return _({...a,renderProps:(n,a,i)=>c("div",{className:Fu(n,{someCardsHighlighted:l}),children:[R(n,a,{className:Lu(n,{someCardsHighlighted:l,showBorder:!e,cardSize:t}),...r,blockIndex:i}),$u(n)?Mu({className:"absolute top-0 -right-4 z-40"}):null]},String(i))})},Fu=(e,{someCardsHighlighted:t})=>u(Ou,t&&($u(e)?"pt-3xl":"pt-3xl sm:pt-16")),Lu=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u(Ou,"min-w-80",zu[a],t&&($u(e)?"pt-3xl sm:pt-16":"pt-3xl"),Od(n),n&&"h-full"),$u=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,ju=Vt((({className:e,visibleItemCount:t=0,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(sm,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:i?16:0,padding:0,arrowsPadded:a,navButtons:r?Uu(s?.block?.blocks):[],hasBlur:!0,children:Vu({noCardBorder:n,cardSize:l,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Uu=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],qu="z-10 border border-solid w-full h-full",Wu=u(qu,"absolute hidden @xl:block border-transparent"),Hu=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(Wu,"top-9 right-12 bg-green-dark")}),o("div",{className:u(Wu,"top-6 right-8 bg-green")}),o("div",{className:u(Wu,"top-3 right-4 bg-green-light")}),c("div",{className:u(qu,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(k,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),je([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Yu={black:"bg-black",white:"bg-white"},Gu=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(k,{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(Ae,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Ku)]}):null,i?c(Ae,{size:"text-h3",align:"text-left",children:[i," ₽"]}):null]})}))),Ku=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Yu[e]}`},String(t)),Xu=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})),Ju=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(k,{isEmbedded:!0,title:i,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(k,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),a?.length?Zu(a):null]})}))),Zu=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(Xu,{...e},String(t))))}),Qu=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),eh=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})})),th=[{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"}}],nh=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=>th.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},ah(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:ih(s??!1,i??!1,n),buttonClassName:h})}),r?o(Ae,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),ah=(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":""),lh=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:y=false,isImageSecondary:b=!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(eh,{href:i,target:m,className:"h-full",data:Qu(v),children:c(Re,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(k,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Qe($e(l)?o(ne,{image:l}):null,x),buttons:d.length?o(nh,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:y,isImageSecondary:b,imageAlign:"center",children:[o(Le,{benefits:f}),s?o(Ee,{__html:s,isDotted:r,itemSize:"list-s"}):null,rh(a,p)]})})}))),rh=(e,t)=>e?o(C,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,sh=new me,oh=(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(Ae,{size:"text-m",color:"text-secondary-text",children:n})}):null,a?o("div",{className:"mt-2xs",children:o(Ae,{size:"text-xl",color:"text-primary-text",children:a})}):null,i?.length?o("div",{className:"text-primary-main",children:je(i)}):null]},String(t))},ch=d((({className:e="",title:t,align:n="text-center",icon:s,button:d,visibleCellsCount:m=1,cardCells:h=[],options:p,data:f,...x})=>{const y=r((()=>h.map(oh)),[h]),[b,v]=r((()=>m>0?[y.slice(0,m),y.slice(m)]:[y,[]]),[m,y]),[N,C]=a(!1);i((()=>sh.subscribe("fold",(e=>{e&&p?.parent&&e.parent===p?.parent&&C(e.isUnfolded)}))),[p?.parent]);const S=l((()=>{sh.fire("fold",{type:"fold",isUnfolded:!N,parent:p?.parent})}),[N,p?.parent]);return c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...x,children:[o(ne,{className:"self-center",image:s}),t?o(w,{className:u("pt-xs",n),headingType:"h5",title:t}):null,d?.text?o(Ne,{className:"w-full mt-m mb-lg",...d}):null,v.length?c(Fr,{children:[c("div",{children:[b,o(Lr,{isUnfolded:N,children:v})]}),h.length>=m?o(Vr,{className:"w-full mt-m",label:N?"Скрыть":"Подробнее о тарифе",isUnfolded:N,embedded:!0,data:f,onClick:S}):null]}):o("div",{children:b})]})})),dh=()=>{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 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)}};i();const l=setInterval(i,24e4);return()=>clearInterval(l)},mh=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]})]}))),uh=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(mh,{step:a,showPercentage:!1})]})})}));var hh;!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"}(hh||(hh={}));const ph=e=>Tr("/user-data/getTaskStatus","POST",e),gh=e=>Rr("/user-data/sendSignalToProcess","POST",e),fh=(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},xh=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(k,{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:l,setTime:e=>{0===e&&t(),r(e)}})})]}),i?o(Ee,{__html:i}):null]})]})})),yh=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(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(xh,{interval:d,intervalExpireAction:m}):null]}),o(bh,{title:a,items:i}),o(bh,{title:l,items:r,countColumns:!0}),n?.__html?o(Go,{__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(Ae,{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",Ul(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:vh(e)},t)))}):null]})]}):null},vh=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ae,{color:"text-secondary-text",size:"text-l",children:e}),o(Ae,{color:"text-primary-text",size:"text-xl",children:t})]}),Nh=d((()=>o(yh,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),wh=d((({handleExpireTimer:e})=>{const{statusInfo:t}=gi();return o(yh,{interval:300,intervalExpireAction:e,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредитная карта"},{label:"Категория",description:t?.cardCategory}]})})),Ch=d((()=>{const{statusInfo:e}=gi();return o(yh,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Sh=d((()=>{const{statusInfo:e}=gi();return o(yh,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:kh(e),buttonText:"Вернуться на главную"})})),kh=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},Ih=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Th=d((()=>{const[e,t]=a(hh.process),{taskId:n}=gi();i((()=>{(async()=>{for(const e of Ih)await gh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await ph({taskId:n});a&&a?.statusCd!==hh.process&&(e(),t(a.statusCd))}),[n]);fh(r,3e4);return Rh(e,(()=>t(hh.rework)))})),Rh=(e,t)=>({IN_PROCESS:o(wh,{handleExpireTimer:t}),CANCELLED:o(Nh,{}),FAILED:o(Nh,{}),DRAFT:o(Nh,{}),APPROVED:o(Sh,{}),PRE_DECISION:o(Sh,{}),REVISION:o(Ch,{})}[e]||o(Ch,{})),Bh=e=>(t,n)=>t.filter((e=>e)).map((t=>[Ph(n,e),_h(t,e),Mh(t,e),Eh(t,e),Dh(t,e),Ah(t,e)].some(Boolean)?{...t,required:!1}:t)),Ph=(e,t)=>2===e&&"RETIREE"===t("employment")?.key,_h=({name:e},t)=>"partInBusiness"===e&&"BUSINESS_OWNER"!==t("positionOrganization")?.key,Eh=({name:e,filledByEsia:t},n)=>e?.startsWith("address")&&n("esiaAccountTypeCd")?.key&&t,Dh=({name:e},t)=>"addressFact"===e&&t("addressMatch"),Ah=({condition:e},t)=>e?.name&&e?.values?.some((n=>{const a=t(e?.name);return n!==(a?.key??a)})),Mh=({name:e},t)=>"snils"===e&&Oh(t),Oh=e=>"PFR_CERTIFICATE"!==e("confirmationIncome")?.key,zh={...Ic,...Tc},Vh=({field:e,inputs:t,params:n})=>t.map(jl(e,n,zh)),Fh=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Bh(Lh(t))(e,n);return c("div",{className:u(Ul(i),"grid gap-x-m"),children:[ql(l),Vh({field:t,inputs:s,params:a})]},`section-${r}`)})),Lh=e=>t=>e(t)?.value,$h=d((({step:e,isSending:t,onPrevStep:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Yl,{onClick:n,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(nr,{isLoading:t,children:a?"Отправить заявку":"Далее"})]})})),jh=e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:i}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:i}},Uh=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:ld({organizationPhone:p&&Ut(p)}),participantAddresses:rd({organizationAddress:g}),ownershipShare:"BUSINESS_OWNER"===f?.key?x:""}},Wh=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:y}=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:ld({phone:Ut(l),email:r}),participantAddresses:rd({addressRegistration:x,addressFact:y}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}},Hh=e=>{const{methodObtain:t,deliveryDate:n=""}=e,a="courier"===t;return a?{courierDeliveryFlg:a,deliveryDate:(i=n.toString().replace(/(GMT)[+-]\d{4}/,"GMT+0000"),i?new Date(i).toISOString().split(".")[0]:""),deliveryTimeCd:{value:"TIME_2"},office:{id:"3"}}:{};var i},Yh=e=>{const{addressRetail:t,methodObtain:n}=e;return t?.key&&"office"===n?{office:{id:t.key}}:{}},Gh=(e,t)=>{switch(e){case 0:default:return{};case 1:return Wh(t);case 2:return qh(t);case 3:return sd(t);case 4:return jh(t);case 5:return(e=>{const{addressCourier:t,methodObtain:n}=e;return"courier"===n?{participantAddresses:rd({addressCourier:t})}:{}})(t)}},Kh=[{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}],Xh=e=>{try{return e?new Date(e):void 0}catch(e){return}},Jh=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:i,setFalse:s}]=nn(!1),o=5===e,c=gi(),d=r((()=>((e,t)=>({...Kh[e],...t,limitedBirthday:Xh(t?.limitedBirthday),dulIssueDateField:Xh(t?.dulIssueDateField),participantDateRegistration:Xh(t?.participantDateRegistration),beginDate:Xh(t?.beginDate),deliveryDate:Xh(t?.deliveryDate)}))(e,c.leadForm)),[e,c.leadForm]),m=l((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=l((async a=>{i(),c.leadForm=a;try{const{taskId:i,profileId:l,participantId:r}=c;if(i&&l&&r){const t=await Dc((({participantId:e,taskId:t,profileId:n,formData:a,step:i=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:Jt().origin,id:t,...Yh(a),authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Gh(i,a)}],...Uh(a),...Hh(a)}}))({participantId:r,taskId:i,profileId:l,step:e,formData:a}));m(t)}o?n?.():t()}catch(e){}finally{s()}}),[o,m]);return[d,u,a]},Zh=d((({step:e,sections:t,onPrevStep:n,onNextStep:a,onFinish:i})=>{const s=r((()=>t?.flatMap((e=>e?.inputs||[]))),[t]),d=l((t=>Tl(Bh((e=>t[e]))(s,e))(t)),[s]),[m,u,h]=Jh({step:e,onNextStep:a,onFinish:i}),[,{field:p,onSubmit:g}]=dn(m,{formValidator:d,onSubmit:u});return c("form",{onSubmit:g,className:"space-y-m",children:[Fh({sections:t,field:p,step:e}),o($h,{isSending:h,step:e,onPrevStep:n})]})})),Qh=[[{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"}]}]],ep=[[{title:"Параметры карты",inputs:[]},{inputs:[{name:"currency",required:!0},{name:"paymentSystem",required:!0},{name:"cardCategory",required:!0},{name:"codeWord",required:!0}]}],...Qh,[{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"]}}]}]],tp=["Параметры карты","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Выбор способа получения"],np=d((({className:e,...t})=>{const[n,r]=a(0),d=s(null),m=l((()=>d?.current?.scrollIntoView({behavior:"smooth"})),[d]);i(dh,[]);const u=l((()=>{r((e=>Math.min(e+1,6))),m()}),[]),h=l((()=>{r((e=>Math.max(e-1,0))),m()}),[]),p=ep[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(uh,{stepsTitles:tp,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:f?o(Th,{}):o(Zh,{step:n,sections:p,onNextStep:u,onPrevStep:h,onFinish:x},String(n))})]})})})),ap=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(mh,{step:a,showPercentage:!1})]})})})),ip=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(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(xh,{interval:d,intervalExpireAction:m}):null]}),o(lp,{title:a,items:i}),o(lp,{title:l,items:r,countColumns:!0}),n?.__html?o(Go,{__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]}))),lp=({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(Ae,{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",Ul(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:rp(e)},t)))}):null]})]}):null},rp=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Ae,{color:"text-secondary-text",size:"text-l",children:e}),o(Ae,{color:"text-primary-text",size:"text-xl",children:t})]}),sp=d((()=>o(ip,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),op=d((({handleExpireTimer:e})=>{const{statusInfo:t}=gi();return o(ip,{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?"Аннуитетный":"Дифференцированный"}]})})),cp=d((()=>{const{statusInfo:e}=gi();return o(ip,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail},{label:"Адрес",description:e?.addressRetail}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),dp=d((()=>{const{statusInfo:e}=gi();return o(ip,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.calculator?.monthsValue+" мес"},{label:"Тип платежа",description:e?.calculator?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),mp=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],up=d((()=>{const[e,t]=a(hh.process),{taskId:n}=gi();i((()=>{(async()=>{for(const e of mp)await gh({signalType:e,taskId:n})})()}),[n]);const r=l((async e=>{const a=await ph({taskId:n});a&&a?.statusCd!==hh.process&&(e(),t(a.statusCd))}),[n]);fh(r,3e4);return hp(e,(()=>t(hh.rework)))})),hp=(e,t)=>({IN_PROCESS:o(op,{handleExpireTimer:t}),CANCELLED:o(sp,{}),FAILED:o(sp,{}),DRAFT:o(sp,{}),APPROVED:o(dp,{}),PRE_DECISION:o(dp,{}),REVISION:o(cp,{})}[e]||o(cp,{})),pp=({field:e,inputs:t,params:n})=>t.map(jl(e,n,{...Ic})),gp=({sections:e,field:t,step:n,params:a})=>e?.map((({inputs:e=[],columns:i,title:l},r)=>{const s=Bh(fp(t))(e,n);return c("div",{className:u(Ul(i),"grid gap-x-m"),children:[ql(l),pp({field:t,inputs:s,params:a})]},`section-${r}`)})),fp=e=>t=>e(t)?.value,xp=d((({step:e,onPrevStep:t,isSending:n})=>{const a=5===e;return c("div",{className:"flex justify-between gap-m",children:[o(Yl,{onClick:t,type:"button",version:"secondary",disabled:0===e,children:"Назад"}),o(nr,{isLoading:n,children:a?"Отправить заявку":"Далее"})]})})),yp={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:yp[a?"annuity":"differential"]}},vp=e=>{const{addressRetail:t}=e;return{office:t?.key?{id:t.key}:void 0}},Np=(e,t)=>{switch(e){case 0:return(e=>{const{isInsurance:t,isSalaryClient:n}=e?.calculator??{};return{payrollCardRshbFlg:t,consentInsuranceFlg:n}})(t);case 1:return Wh(t);case 2:return qh(t);case 3:return sd(t);case 4:return jh(t);default:return{}}},wp=[{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}],Cp=e=>{try{return e?new Date(e):void 0}catch(e){return}},Sp=({step:e,onNextStep:t,onFinish:n})=>{const[a,{setTrue:i,setFalse:s}]=nn(!1),o=5===e,c=gi(),d=r((()=>((e,t)=>({...wp[e],...t,limitedBirthday:Cp(t?.limitedBirthday),dulIssueDateField:Cp(t?.dulIssueDateField),participantDateRegistration:Cp(t?.participantDateRegistration),beginDate:Cp(t?.beginDate),deliveryDate:Cp(t?.deliveryDate)}))(e,c.leadForm)),[e,c.leadForm]),m=l((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=l((async a=>{i(),c.leadForm=a;try{const{taskId:i,profileId:l,participantId:r}=c;if(i&&l&&r){const t=await Dc((({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:"Заемщик"},...Np(i,a)}],...bp(a),...vp(a),esiaAccountTypeCd:{key:a?.esiaAccountTypeCd?.key}}}))({participantId:r,taskId:i,profileId:l,step:e,formData:a}));m(t)}t(),o&&n?.()}catch(e){}finally{s()}}),[o,m]);return[d,u,a]},kp=d((({step:e,sections:t,programsSource:n,onPrevStep:a,onNextStep:i,onFinish:s})=>{const{programId:d}=gi(),m=n?.[d??""],u=r((()=>t?.flatMap((e=>e?.inputs??[]))),[t]),h=l((t=>Tl(Bh((e=>t[e]))(u,e))(t)),[u]),[p,g,f]=Sp({step:e,onNextStep:i,onFinish:s}),[,{field:x,onSubmit:y}]=dn(p,{formValidator:h,onSubmit:g});return c("form",{onSubmit:y,className:"space-y-m",children:[gp({sections:t,field:x,step:e,params:{calcData:m}}),o(xp,{step:e,isSending:f,onPrevStep:a})]})})),Ip=[[{columns:1,inputs:[{name:"calculator"}]}],...Qh,[{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"}]}]],Tp=["","Персональные данные","Данные о трудоустройстве","Семейное положение и доход","Дополнительные сведения","Отделение Банка"],Rp=Vt((({className:e,programsSource:t,...n})=>{const[r,d]=a(0),m=s(null),u=l((()=>m?.current?.scrollIntoView({behavior:"smooth"})),[m]);i(dh,[]);const h=l((()=>{d((e=>Math.min(e+1,5))),u()}),[]),p=l((()=>{d((e=>Math.max(e-1,0))),u()}),[]),f=Ip[r],x=0===r,[y,{setTrue:b}]=nn(!1);return o(g,{className:e,...n,children:c("div",{ref:m,className:"container grid grid-cols-12",children:[x||y?null:o(ap,{stepsTitles:Tp,step:r,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:y?o(up,{}):o(kp,{step:r,sections:f,programsSource:t,onNextStep:h,onPrevStep:p,onFinish:b},String(r))})]})})})),Bp=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Pp=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),_p=1e9,Ep={sum:{min:1e4,max:_p},period:3},Dp=Vt((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:i,...l})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Nm(Ep,{block:l.block,page:l.options?.page,normalize:e=>({...e,period:Ap(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=Mp(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...l,children:[o(hm,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Tu,{label:a?.title,min:500,max:_p,...d("sum",{parse:e=>({min:Number(e),max:_p}),format:({min:e})=>String(e)})}),o(da,{title:i?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(cm,{blocksToRender:r,...l})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Ap=e=>Et((e?.paramsSource?.rateRows||[]).filter(Bp).flatMap((e=>Pp(e.minMonths,e.maxMonths)))),Mp=e=>Et(e.flatMap((e=>e||[])).filter(Bp).flatMap((e=>Pp(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Op=[{key:"10"},{key:"50"},{key:"100"}],zp=({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(On,{className:"min-w-20",onChange:n,value:{key:String(e)},options:Op,iconVersion:"black"})]})},Vp="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",Fp=(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:Vp,"aria-label":`Страница ${l}`,children:l},String(t)):null},Lp={width:"24",height:"24"},$p=({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(H,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:jp(1===e),...Lp})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Vp,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,a.map(Fp),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Vp,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(H,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:jp(e===n),...Lp})})]})},jp=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Up=({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($p,{currentPage:e,onPageChange:t,totalPages:n}),a&&i?o(zp,{itemCount:a,onItemCountChange:i}):null]}),qp=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",xn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:i})]})})),Wp=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(qp,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(La,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(La,{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(Yl,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Hp=d((({title:e,timestamp:t,publicId:n})=>{const a=pe(),{href:i}=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:[o(Rm,{className:"shrink-0",icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Ae,{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)})),Yp=`${qt}/depository`,Gp={startDate:void 0,endDate:void 0,query:""},Kp=Vt((({className:e,...t})=>{const[n,i]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=dn(Gp),{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(Yp);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}=Xn(Yp+o,_t);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=l((e=>i(e-1)),[]),y=l((e=>{r!==e?(s(e),i(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(Wp,{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(Ae,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Ae,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(Hp,{...e},String(e.publicId)))):o(Ed,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Up,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:y})]})]})})),Xp=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,Jp=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:Xp(a)}),o(k,{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]}))),Zp=`${qt}/region`;function Qp(e="Москва"){return pi().location??{name:e}}function eg(e="Москва"){const t=pi(),n=l((async()=>{if(!t.location){const n=await Pt(Zp);t.location=n??{name:e}}}),[t,e]);return Xn(Zp,n),t}var tg;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(tg||(tg={}));const ng=new Intl.NumberFormat("ru",{style:"currency",currency:tg.RUB}),ag=e=>e?ng.format(e):"",ig="text-m font-light text-secondary-text ",lg=`${ig} text-left`,rg=`${ig} pl-5xl text-center`,sg=`${ig} pl-5xl text-right`,og={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},cg=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:lg,children:o(Ae,{size:"text-m",children:"Валюта"})}),o("th",{className:rg,children:o(Ae,{size:"text-m",children:"Купить"})}),o("th",{className:sg,children:o(Ae,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(dg)})]}))),dg=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:og[t]},width:"24",height:"24"}):null,o(Ae,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Ae,{size:"text-h6",children:ag(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ae,{size:"text-h6",children:ag(e?.buyExchangeRate)})})]},t)},mg={icon:"GpsIcon"},ug=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Rm,{...mg,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(C,{size:"text-l",color:"text-primary-main",children:t}):null,o(C,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),hg=(e,t,n)=>{const a=Number(pg(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)},pg=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function gg(e){if(!e)throw new Error("Value should be fulfilled");return e}const fg=e=>t=>{const[,n]=gg(e.find((([e])=>e(t))));return n(t)},xg=e=>fg(e.map((([e,t])=>[e,()=>t])));xg.if=e=>new yg(void 0,e);class yg{parent;predicate;unit;get entry(){return[gg(this.predicate),gg(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new yg(this,e)}then(e){return new yg(this.parent,this.predicate,e)}else(e){return fg([...bg(this),[()=>!0,e]])}}const bg=e=>[...e?.parent?bg(e.parent):[],e.entry],vg=e=>xg([[e=>e.value!==tg.RUB&&e.oppositeValue!==tg.RUB,()=>e.handleConvert(e.value,tg.RUB)],[e=>e.value===tg.RUB&&e.oppositeValue===tg.RUB,()=>e.handleConvert(e.value,tg.USD)],[e=>e.value===tg.RUB&&e.oppositeValue===tg.RUB,()=>e.handleConvert(e.value,tg.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Ng(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(vn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:i,onChange:l}),s.length?o(On,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const wg=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:i})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||tg.RUB,selectBuy:n?.[0]?.currency?.currency||tg.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:[Ng({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Cg(r,d,n),value:r.inputSell,setValue:e=>kg(d,n)(e,r.selectSell,r.selectBuy)}),Ng({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Sg(r,d,t),value:r.inputBuy,setValue:e=>Ig(d,t)(e,r.selectBuy,r.selectSell)})]}):null,i?.text?o(Ne,{text:i.text,version:i?.version,...i}):null]})})),Cg=(e,t,n)=>a=>{t({selectSell:a}),vg({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,i=e.selectBuy)=>{kg(t,n)(e.inputSell,a,i)}})},Sg=(e,t,n)=>a=>{t({selectBuy:a}),vg({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,i=e.selectSell)=>Ig(t,n)(e.inputBuy,a,i)})},kg=(e,t)=>(n,a,i)=>{e({inputSell:pg(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(hg(n,l,a===tg.RUB)||"")})},Ig=(e,t)=>(n,a,i)=>{e({inputBuy:pg(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(hg(n,l,a===tg.RUB)||"")})},Tg=`${qt}/exchangerates`;const Rg=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const i=function(e){const t=e?.code||"000",{data:n}=Xn(Tg+`?regionCode=${t}`,_t);return n||{}}(Qp()),l=Bg(i?.exchangeRate?.currencies),r=l.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:tg.RUB}});const s=l.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:tg.RUB}}),o(g,{className:u("box-border min-h-80",e),...a,children:o(Re,{className:"h-full",title:o(w,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[l?o(cg,{className:"mb-xl",exchangeCurrencyItems:l}):null,o(ug,{address:i?.address})]}),o(wg,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),Bg=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Pg=d((({className:e="",items:t})=>{const n=pe();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(_g(n))})})),_g=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},Eg=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:Dg(e)}))),Dg=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(Ag,{className:"w-full border-0 border-b border-solid border-main-divider last:border-b-0",item:e},String(t)))),Ag=d((({className:e,item:t})=>{const[n,{toggle:a}]=nn(!1);return c(Fr,{className:e,role:"menuitem",children:[c(Yl,{className:u("w-full",t.icon?.icon?"py-xs":"py-lg"),embedded:!0,onClick:a,children:[c(Or,{children:[o(Rm,{className:"shrink-0",...t.icon}),o(Ae,{size:"text-h6",font:"font-normal",children:t.text})]}),o(zr,{iconVersion:"color",size:"medium",isUnfolded:n})]}),o(Lr,{className:"flex flex-wrap gap-lg group-last:last:pb-0",isUnfolded:n,children:t.items?o(Pg,{items:t.items}):null})]})})),Mg=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(Og)}):null)),Og=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Ae,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(zg)})]},String(t)),zg=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Vg(e.type,e.text)}),o(C,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Vg=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Fg(t)}`,children:o(Ae,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(C,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Fg=e=>e.replaceAll(/\D/g,""),Lg=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}`})})),$g=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(Ae,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(Lg,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),jg=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}`})})),Ug=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Ae,{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(jg,{index:t,...e},String(t))))}):null]}))),qg=Vt((({className:e,footer:t,...n})=>{const{navigationItems:a}=n.options?.page?.navigation??{};n.options;const{documents:i,relatedEnterprises:l,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:h,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Eg,{navigationItems:a}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Mg,{items:r}),m?o(Ne,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(nh,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(Ne,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o($g,{title:d,links:l}),o(Ug,{links:i,license:h})]})})),Wg=Vt((({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(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Ln,{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:Qu(l,s?.key),children:f})}):null]})})})),Hg={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"},Yg=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",Hg["transparent"===e?"transparent":"default"]),...a,children:i}):null})),Gg=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:a,version:i,backwardButton:r})=>{const s=E(),d="/"===s.pathname,{dataFooter:m,dataHeader:u,...h}=t??{},p=l((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(Fc,{className:"my-2xs",bgColor:e,logo:h,data:u,showTitle:!1})}):Kg(p,r),o(Yg,{version:i,...a})]})})),Kg=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(H,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,Xg={"bg-white":"primary",transparent:"transparent"},Jg=Vt((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=Xg[e],portal:a,logo:i={},...l})=>{const{backwardButton:r,logo:s={}}=l.options?.page?.common??{},{internetBankButton:c}=a||{},d=i.image?.icon||i.image?.src?i:s;return o(g,{tag:"header",defaultPadding:"",version:n,...l,children:o("div",{className:"container px-lg py-2xs box-border",children:o(Gg,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...l})})})})),Zg=(e=!1)=>e?{}:{padding:"p-0"},Qg={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},ef=Vt((({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=E();return o(g,{className:u("relative flex flex-col",Qg[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:_({...c,extraProps:{className:u("w-full",Od(r)),...Zg(a)}})})}),{childrenTypes:[]}),tf=Vt((e=>o(ef,{...e})),{childrenTypes:[]}),nf=d((e=>{const{className:t,align:n,image:a,...i}=e,l=n?u("flex",Dm[n]):"";return o(g,{className:u(l,t),defaultPadding:"p-0",...i,children:o(ne,{image:a})})})),af=["байт","Кб","Мб","Гб","Тб","Пб"],lf=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(Ae,{size:"text-l",font:"font-light",children:[t," ",rf(d,m),o(Ae,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),rf=(e,t)=>e||t?o("span",{children:", "}):"",sf=(e,t)=>(n,a)=>{const i=U(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))} ${af[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?cf(i):n?.fileFormat;return c("div",{role:"listitem",children:[o(lf,{text:n?.text,target:n?.target,href:i,fileFormat:r,fileSize:l,icon:of(t),data:n?.data}),o(Ee,{__html:n?.__html})]},String(a))},of=e=>e?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,cf=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},df=d((({href:e,__html:t,target:n,onClose:a})=>{const i=E(),l=U(i)(e);return c(Kl,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:a,children:[t?o(Ee,{__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(Yl,{type:"button",version:"secondary",onClick:a,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),mf=d((({text:e,href:t,target:n,__html:a,icon:i})=>{const{open:r}=un(df),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:[of(i),o(Ae,{font:"font-light",children:e})]}):null})),uf={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},hf=Vt((({className:e="",title:t,description:n,align:a="text-center",documents:i,icon:l={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=E();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(k,{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",uf[r]),role:"list",children:i.map(pf(d,l))}):null]})})),pf=(e,t)=>(n,a)=>{const i=n?.docType;return""===i?null:"reportSource"in n&&n?.reportSource?.__html?gf(t)(n,a):sf(e,t)(n,a)},gf=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(mf,{...a,icon:e,href:ff(t)?t?.href:t?.attachment?.src}),o(Ee,{__html:t?.__html})]},String(n)):null},ff=e=>"href"in e,xf=Vt((({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",y=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(w,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:y,buttons:je(a,{className:"flex-wrap"}),children:[i?o(Ae,{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(Ee,{__html:r,itemSize:"list-m"}):null,o(Ae,{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]})]})})})),yf=(e,t)=>e&&"underlined"!==t?"primary":"secondary",bf=(e=[],t={})=>e.filter((({content:e={}})=>bm(t,e))).length,vf=(e,t)=>e===t;const Nf=(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)))}(vf,((e=vf)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))())),wf=[],Cf={},Sf={primary:"bg-white/30",secondary:"bg-main-divider"},kf={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},If=d((({count:e,version:t="secondary"})=>{const n=ke(),a=n?"bg-main-divider":Sf[t],i=kf[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(Ae,{size:"text-xs",color:i,children:e})})})),Tf=({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})]})]})},Rf={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Bf={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Pf={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},_f={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Ef=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",Rf[a],n?_f[a]:Pf[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?Bf[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Tf({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(If,{count:m,version:yf(n,a)})}):null]})})})),Df=d((e=>o(e?.item?.href?Af:Mf,{...e}))),Af=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(Ef,{...e,tag:"a",item:i,onClick:a})})),Mf=d((({item:e={},onClick:t,...n})=>{const a=l((()=>{t&&t(e)}),[t,e]);return o(Ef,{item:e,onClick:a,...n})})),Of=(e,t,n)=>(a,i)=>o(Df,{isActive:a===e,onClick:t,type:n,item:a},String(i)),zf=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(Of(a,i,t))}))),Vf={categories:[],extraOptions:[],propertyType:[],stage:[]},Ff=Vt((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...i})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=Nm(Vf,{block:i.block,page:i.options?.page}),f=l(((e=Vf)=>p(e)),[]),x=(({hotFilters:e=wf,filtrationState:t=Cf,blocks:n=wf,onFiltrationStateChange:a})=>{const i=r((()=>Math.max(0,e.findIndex((e=>Nf(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:bf(n,t.filter),version:yf(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(zf,{...x}),o(hm,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(cm,{blocksToRender:d,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Lf="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",$f=d((({filters:e,field:{field:t,reset:n},onlyOffice:a,labels:i})=>{const l=a?5:6,r=(e||[]).map((e=>o(Ga,{text:i[e],...t(e)},e))),[s,d]=l>0?[r.slice(0,l),r.slice(l)]:[r,[]],[m,{toggle:u}]=nn(!1);return o("div",{children:e?.length?o("div",{children:c(Fr,{children:[c("div",{children:[o("div",{className:Lf,children:s}),o(Lr,{className:Lf,isUnfolded:m,children:d})]}),c("div",{className:"flex space-x-lg",children:[a?o(Vr,{label:m?"Меньше фильтров":"Больше фильтров",isUnfolded:m,embedded:!0,onClick:u}):null,c(Yl,{embedded:!0,onClick:n,children:[o(Or,{children:"Очистить фильтр"}),o(H,{name:"CloseIcon",size:"small"})]})]})]})}):null})})),jf=(e,t,n)=>{const a=yf("all"===t),i=yf("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(Yl,{"data-id":"all",onClick:t=>l(t,"all",e),version:a,children:"Для физических лиц"}),o(Yl,{"data-id":"business",onClick:t=>l(t,"business",e),version:i,children:"Для юридических лиц"})]})},Uf=({__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(Ee,{__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(Ae,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,qf=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Ae,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Wf=()=>{},Hf=e=>"all"===e?"block":"hidden",Yf=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:i=[],renderCard:l=Wf,renderRemoteWorkplaceCard:r=Wf,getBalloon:s=Wf,getBalloonRemoteWorkplaces:d=Wf,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=dn(cs),{filteredItems:y,points:b,filteredRemoteWorkplaces:v,lengthItems:N}=ps({data:t,remoteWorkplaces:i,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=a("all");return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[qf(h,N),m?Uf(m):null,p&&jf(t,w,C),o("div",{className:u("pb-3xl",Hf(w)),children:o($f,{filters:Gf([...t,...i]),field:{field:f,reset:x},onlyOffice:p,labels:ds})})]}),o("div",{className:"h-[600px]",children:o(ys,{children:o(Cr,{points:b,isLoad:n,className:"h-full"})})})]}),c(ys,{children:[y.map(l),v.map(r)]})]})})),Gf=e=>Object.keys(cs).filter((t=>e.filter((e=>ms[t](e))).length)),Kf=e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:"",Xf=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:i,atmCode:l="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Kf(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(Ae,{size:"text-h4",children:Kf(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Zr,{color:"green",children:Kf(s)})})]}),o($r,{children:o(Mr,{className:"flex-wrap",children:m?.map(((e,t)=>o(_r,{...e},String(t))))})})]},String(d))},Jf=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Kf(t)} №${n}`,body:e.toUpperCase()}),Zf=[];const Qf=async e=>{const t=await Pt(e,{method:"GET"});return Array.isArray(t)?t:Zf},ex={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},tx={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)},nx=d((({descriptionData:e,className:t})=>{const n=Qp(),a=n?.code??"000",{data:i,isLoad:l}=function(e){const{data:t,error:n}=Xn(`${qt}/atms?regionCode=${e}`,Qf);return{data:t||Zf,isLoad:!t&&!n}}(a);return o(Yf,{className:t,filterItems:ax,data:i,isLoad:l,initFilterState:ex,renderCard:Xf,getBalloon:Jf,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),ax=(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=>tx[t](e))),n=!a.length||a.some((t=>tx[t](e)));return t&&n}))},ix=({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(Ae,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:e})]}):null]})}),o($r,{children:lx(t)})]},String(n)):null,lx=e=>c("div",{children:[c(Mr,{className:"flex",children:[o(_r,{label:"Операции для физических лиц",children:o(Ae,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(_r,{label:"Операции для физических лиц",children:o(Ae,{children:"Оформление и обслуживание банковских карт"})}),o(_r,{label:"Операции для физических лиц",children:o(Ae,{children:"Инвестиционное и накопительное страхование"})}),o(_r,{label:"Операции для физических лиц",children:o(Ae,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(_r,{label:"Режим работы",className:"max-w-none",children:o(Ae,{children:e})})]}),rx=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),sx={branches:[],remoteWorkplaces:[]};const ox=async e=>await Pt(e,{method:"GET"})||sx,cx=d((({className:e})=>{const t=Qp(),n=t?.code??"000",{data:a,isLoad:i}=function(e="000"){const{data:t,error:n}=Xn(`${qt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,ox);return{data:t||sx,isLoad:!t&&!n}}(n);return o(Yf,{className:e,data:a?.branches,isLoad:i,remoteWorkplaces:a?.remoteWorkplaces,renderCard:rs,renderRemoteWorkplaceCard:ix,getBalloon:os,getBalloonRemoteWorkplaces:rx,title:`Офисы филиала ${t?.name}`})})),dx=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(cx,{}):o(nx,{descriptionData:e})})})),mx=d((({className:e,title:t,description:n="Блок в разработке...",...a})=>c(g,{className:u("box-border",e),...a,children:[o(k,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),ux=d((({className:e,padding:t,slides:n=[],...a})=>o(g,{className:u("overflow-hidden relative",e),padding:t,...a,children:o(sm,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Ze,{className:"px-5 h-full",headlineVersion:"L",...e,...a})},String(t))))})}))),hx=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(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[l?px({__html:l,richVersion:r}):null,gx({label:"Адрес",data:e,iconName:"GeolocationIcon"}),gx({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),gx({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?je([a]):null]})]}))),px=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Ee,{...e,itemSize:"list-s"})}),gx=({label:e,data:t,iconName:n,dataColor:a=""})=>t?c("div",{className:"flex gap-s",children:[o(H,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Ae,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ae,{size:"text-xl",color:a,children:t})]})]}):null,fx=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Ee,{__html:t,richVersion:n})})})),xx=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",yx=Vt((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,foldButtonVersion:a="default",label:i,version:l,role:r,...s})=>{const d=ke(),[m,{toggle:h}]=nn(t),p=o(Lr,{className:u("gap-lg",xx(d)),isUnfolded:m,children:_({...s,extraProps:{className:"w-full",padding:"p-0"}})}),f="accordion"===a,x=o(Vr,{className:u("w-full",{"text-h6 my-lg":f}),label:i,isUnfolded:m,embedded:f,onClick:h});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:r,...s,children:c(Fr,{children:[n?x:p,n?p:x]})})}),{childrenTypes:{exclude:["RollupItem"]}}),bx=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(xn.split(" ").filter((e=>"rounded"!==e)),Ha,"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(Ae,{color:"text-primary-text",children:t}):null]})}))),vx=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(bx,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:i}),o(bx,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:i})]})})),Nx=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(On,{options:s,label:r,placeholder:i||a,onChange:e=>l(e.key),value:c})})),wx=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(Nx,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Nx,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:i,setSelected:l,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Cx=["От 1 дня","До 365 дней"],Sx=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ae,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(da,{min:1,max:365,value:e,items:Cx,onChange:t})]}))),kx=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(Nx,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Nx,{data:a,fieldLabel:"safeBoxCasesSize",selected:i,setSelected:l,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Ix=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(wx,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:Tx(m)}),o(Sx,{days:i,setDays:e=>m({days:e})}),o(kx,{caseVolumes:d,selectedCaseVolume:l,onSelectedCaseVolume:Rx(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ae,{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(vx,{}),o(Ne,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),Tx=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Rx=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Bx=d((({days:e,tariffs:t=[]})=>{const n=_x(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:[Px("Аренда за",e),Px("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(C,{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(H,{className:"@xl:h-60",name:"PackA4Icon"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(C,{size:"text-s",font:"font-light",color:"text-white",children:a})})]})]})})),Px=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ae,{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})]}),_x=(e,t)=>{const n=Ex(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},Ex=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},Dx=(e,t)=>e.find((e=>e.branchCode===t)),Ax=d((e=>{const{regions:t,data:n,branches:a,onChange:l,onClick:r}=e;i((()=>{l({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,l]);const s=Dx(a,n.selectedBranch),d=Mx(s?.safeBoxCaseVolumes),m=Ox(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=zx(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Ix,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:l}),o(Bx,{days:n.days,tariffs:u})]})})),Mx=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Ox=(e,t)=>e?.find((e=>e.volume===t)),zx=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Vx=`${qt}/safeboxes`,Fx=[];const Lx=async e=>await Pt(e,{method:"GET"})||Fx,$x=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=Qi(),p=jx(m.selectedRegion,h),f=function(e){const{data:t}=Xn(e?`${Vx}?regionCode=${e}`:null,Lx);return t||Fx}(p),x=l((e=>u((t=>({...t,...e})))),[u]),y=(b=Dx(f,m.selectedBranch)||f,Array.isArray(b)?b.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):b?.gpsLatitude&&b?.gpsLongitude?[{coords:[b.gpsLatitude,b.gpsLongitude]}]:[]);var b;return c(g,{className:n,defaultPadding:"",...i,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Ax,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(C,{size:"text-s",font:"font-light",children:t}):null]}),y.length&&r?o(Cr,{points:y,className:"h-[640px]"}):null]})})),jx=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Ux={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"},qx=(e,t,n)=>(a,i)=>{const{button:l}=a;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Wx(e,n)(a,i)}),c("div",{className:u("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[Hx(a),l?.text?o(Ne,{className:"box-border py-s w-full mt-lg",version:t,...l,children:l?.text}):null]})]})},String(i))},Wx=(e,t)=>(n,a)=>{const i="secondary"===t?"white":"color",l=Boolean(n?.icon?.src),r=Yx(e,l),s=l?"transparent"===t:t;return o(g,{className:u("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:Gx({step:n,iconVersion:i,i:a,stepVersion:t})})})},Hx=e=>c("div",{children:[e?.label?o(C,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:u("text-s font-light text-left",Ux.description),children:e.description}):null,o(Ee,{__html:e.__html})]}),Yx=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",Gx=({step:e,iconVersion:t,i:n,stepVersion:a})=>{return $e(e?.icon)?o(ne,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:u("text-h4","transparent"===a?Ux.iconText:(i=a,"secondary"===i?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var i},Kx=d((({className:e="",title:t,description:n,steps:a=[],buttons:i,stepVersion:l="gray",version:r="primary",...s})=>{const d=a.length>3;return c(g,{className:u("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),a?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:a.map(qx(d,r,l))}):null,je(i,{isVertical:!0})]})})),Xx=d((({isActive:e,item:t,onClick:n})=>c("div",{className:u(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(H,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),Jx=d((({className:e,head:t,children:n,onClose:a,onClick:i})=>c("div",{onClick:i,className:u("relative bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(Gl,{className:"absolute top-1.5 right-0",onClose:a}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})));function Zx(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 Qx=()=>{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 Zx(ue.observable,"dialog",{open:t,close:n,closeAll:i}),[e,{close:n,closeAll:i}]},ey=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 ty=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(Ae,{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(ny,{...e},String(t))))})]}):null,ny=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(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})}):null]})})),ay=(e,t)=>n=>n.name?o(eh,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Qu(e,n.name),children:o(Ae,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,iy=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"})]}))),ly=d((({defaultLocation:e})=>{const t=Qp(e),n=pe(),{href:a}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(C,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(eh,{href:a,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),ry=d((({foreignOffices:e,branches:t,onClose:n})=>{const i=eg(t?.default),[s,d]=a(""),m=Qi(),u=r((()=>oy(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,sy)),[u]),p=l((e=>{i.location=e,n?.()}),[i,n]);return c(Kl,{className:"pb-20",head:c("div",{children:[o(Ae,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(ly,{defaultLocation:t?.default}),o(iy,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:u.filter((({name:e})=>e&&ey(e.toLowerCase())(s.toLowerCase())>=.8)).map(ay(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(Ae,{size:"text-h6",children:e})}),t.map(ay(f,g))]},e)))}),ty(e)]});var g,f})),sy=e=>e.name?.charAt(0)??"",oy=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),cy=d((({menuRef:e,menuItem:t,locationDialogProps:n,onClose:a})=>{const l=un(ry,n),{name:r}=Qp(),s=e?.current?.getBoundingClientRect(),c=X(K.SITE_URL);return i((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),i((()=>{const e=e=>{if("location"===e.data.type&&l.open({}),"reload"===e.data.type&&a?.(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[a]),o(Jx,{head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),onClick:e=>e.stopPropagation(),onClose:a,children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),dy="burgerMenuDialog",my=({menuRef:e,centralMenuItem:t,locationDialogProps:n,onClose:a=fn})=>{const{open:i}=un(cy),[r]=Qx(),s=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(dy,r),o=l((()=>i({menuRef:e,locationDialogProps:n,menuItem:t,onClose:a},{id:dy})),[e,n,t,a]);return[s,{toggle:s?a:o}]},uy=[],hy=Vt((({sticky:e,...t})=>{const{menuItems:n=uy}=e??{},i=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),u=r.slice(d),[h,p]=a(-1),[f,x]=a(""),{closeAll:y}=he(),b=l((()=>{p(-1),x(""),y()}),[y]),v=pn(b),N=s(null),[C,{toggle:S}]=my({menuRef:N,centralMenuItem:i,locationDialogProps:t.header,onClose:b}),k=(({menuRef:e,dialogRef:t,leftItems:n,rightItems:a,onClose:i})=>{const{open:r,close:s}=he(),c=l((()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=`${e?.contentWindow?.document.body.offsetHeight}px`}),[]);return l(((l,d)=>{const m="left"===d?n:a,u=e?.current?.getBoundingClientRect();r({id:"left"===d?n[l].title:a[l].title,dialog:o(Jx,{className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:m[l].description||m[l].title})}),onClick:e=>e.stopPropagation(),onClose:()=>{s(),i?.()},children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",src:m[l]?.src,width:u?.width??0,onLoad:c})})})})}),[c,n,a,i])})({menuRef:N,dialogRef:v,leftItems:m,rightItems:u,onClose:b}),I=l((e=>{e.stopPropagation(),b(),S()}),[b,S]),T=l(((e,t)=>{x(t),p(e),y(),k(e,t)}),[y,k]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(py(T,"left",{activeIndex:h,currentItemPosition:f})),o(Xx,{item:i,isActive:C,onClick:e=>I(e)}),u.map(py(T,"right",{activeIndex:h,currentItemPosition:f}))]})})})),py=(e,t,n)=>(a,i,l)=>o(Xx,{item:a,isActive:l[n.activeIndex]?.title===a?.title&&n.currentItemPosition===t,onClick:r=>{l[n.activeIndex]?.title===a?.title&&n.currentItemPosition===t||r.stopPropagation(),e(i,t)}},a.title||String(i)),gy="hidden sm:flex absolute z-40",fy={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},xy=d((({className:e,items:t=[],activeItem:n,onChange:a,tabsType:l="default"})=>{const[r,s]=Xd({itemCount:t?.length||0});return i((()=>yy(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(jd,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:fy[l].item,gap:fy[l].gap,children:t.map(Of(n,a,l))}),s.canScrollLeft?o(tm,{className:u("left-6",gy,fy[l].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(nm,{className:u("right-6",gy,fy[l].buttonTop),onClick:s.scrollRight}):null]})})),yy=(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"}},vy=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(by[t].wrapper,e),children:o(xy,{className:by[t].component,tabsType:t,...n})}):null,Ny=Vt((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=wy(n??{}),p=E(),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:y}=p,[b,v]=a(ky(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[b],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)}),[y,w,h]);const C=Sy(x[b],b),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:[vy({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Cy(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])=>P(t,{...m?.options,slotName:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Sy)?.filter(Boolean)||[]}),wy=({__id:e,anchor:t})=>t??e??"tabs",Cy=(e,t)=>t?.length?t:e,Sy=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",ky=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Iy={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Ty=d((({children:e,activeIndex:t,columnWidth:n,version:a="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Iy[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Ry=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}))),By={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(Ee,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Ae,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Ae,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:a,isOpen:i})=>e?o(Ry,{className:"w-fit",isOpen:i,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},Py=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 _y({cell:e,cellProps:{rowIdx:n,cellIdx:l,fieldIdx:t,displayTable:e=>{m(!1),c(l),r(e)},isVisible:d}})})),_y=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in By))return null;return o(By[n],{...t,...a})},Ey=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(Py,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:i,openTableInnerIdx:l,setOpenTableInnerIdx:r},String(s)))):null}))),Dy=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),Ay=(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(Ae,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,My=d((({rows:e})=>{return o(jd,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[a,...i]=e,l=u("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[a?.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(Ae,{size:"text-xl",font:"font-light",children:a.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:l,style:{transform:`translateX(-${Dy(i,t)}px)`},children:i?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ae,{size:"text-xl",children:e.data}):null,e?.cols?Ay(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),Oy=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(Ae,{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(My,{rows:t.rowsData})})})]},a)}))}))),zy=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Vy=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(Ae,{size:"text-xl",font:"font-light",color:zy(t===n),children:e||t+1})},e)))}):null,t?o(Ne,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(H,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),Fy=Vt((({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(Vy,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Oy,{activeTabIndex:r,items:m}),o(Ry,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ae,{size:"text-h6",children:"Данных нет"}),o(Ry,{onClick:n,isOpen:!0})]})})),Ly=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(Fy,{...t,onClick:n})}):null]}))),$y=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(Ly,{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(Ae,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Ty,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Ey,{cells:e,rowIdx:i,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function jy({dec:e,inc:t,canDec:n,canInc:a,btnClass:i,className:l=""}){return n||a?c("div",{children:[n?o(em,{className:u("absolute z-40",i[0],l),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,a?o(em,{className:u("absolute z-40 rotate-180",i[1],l),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const Uy=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,jy({...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:i,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],h=i?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[f,x]=((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}]})({itemCount:p,visibleItemCount:2}),y=(h||[]).map(((e,t)=>o($y,{row:e,activeIndex:f,rowIdx:t,...d},String(t)))),[b,v]=s>0?[y.slice(0,-s),y.slice(-s)]:[y,[]],[N,{toggle:w}]=nn(!1);return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?c(Fr,{children:[c(Uy,{controls:x,children:[b,o(Lr,{isUnfolded:N,children:v})]}),o(Vr,{className:"w-full",isUnfolded:N,onClick:w})]}):o(Uy,{controls:x,children:y})})]})})),Wy=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?Hy():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ae,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?Yy(n):null,i?o(Ee,{richVersion:l,__html:i}):null]})]}))),Hy=()=>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"}),Yy=e=>o(C,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Gy=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(Ae,{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(Ae,{size:"text-h2",children:n})}):null]}))),Ky=d((e=>{const{prefix:t,unit:n,suffix:a,...i}=e;return o(g,{defaultPadding:"p-0",...i,children:o(Gy,{prefix:t,unit:n,suffix:a})})})),Xy={AdTile:Lt,ApplicationForm:rr,ApplicationLeadForm:_d,BankAccountFiltration:Sm,BenefitsBlock:Bm,BonusBenefitsBlock:Em,ButtonsBlock:Am,CalculatorBonus:$m,CalculatorBusinessDeposit:Jm,CalculatorCredit:bo,CalculatorDeposit:gu,CalculatorRefinancing:Cu,CardTransfer:Au,Carousel:ju,CarouselCard:Hu,CarouselCatalogCard:Gu,CarouselLinks:Ju,CarouselRecommendationCard:lh,CarouselTariffsCard:ch,CreditCardForm:np,CreditForm:Rp,DepositFiltration:Dp,Depository:Kp,ErrorBlock:Jp,ExchangeRateTile:Rg,Footer:qg,GrantSupport:Wg,Header:Jg,Headline:k,HorizontalLayout:tf,ImgBlock:nf,LinkDocs:hf,MobileAppTile:xf,MortgageFiltration:Ff,OfficesAtmsMap:dx,Placeholder:mx,ProductBlock:Ft,ProductGallery:ux,RepresentativeOfficeInfo:hx,RichTextBlock:fx,RollupItem:yx,SafeDepositRental:$x,StepsBlock:Kx,StickyBottomMenu:hy,TabsLayout:Ny,TariffsTable:qy,TextBlock:Wy,UnitBlock:Ky,VerticalLayout:ef},Jy=ce((()=>{i((()=>{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))}));const Zy="cookie",Qy=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=nn();!function(e,t,n=300){i((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(Zy)||n()}),[],3e3);const r=l((()=>{globalThis.localStorage?.setItem(Zy,"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(Ee,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(Gl,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null}));function eb(e){const t=l((({key:t})=>{"Escape"===t&&e()}),[e]);hn(globalThis.document,"keydown",t)}const tb=d((()=>{const[e,{close:t}]=Qx(),n=Boolean(e.length);return eb(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})),nb=d((()=>{const[e,t]=a(null),n=l((()=>{t(null)}),[]);return Zx(ue.observable,"popup",{open:t,close:n}),eb(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})),ab="header",ib="footer",lb="sticky-footer",rb={},sb=d((({className:e,data:t=rb,blocksRegistry:n,blockDecorator:a})=>{const{slots:i,blocks:l,fallback:r,...s}=t,d=Ot(s,r);Jy(),eg();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?.[ab]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(i?.[ab],{...m,slotName:ab})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[_({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(i?.[ib],{...m,slotName:ib})]})]}),i?.[lb]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(i?.[lb],{...m,slotName:lb})}):null,o(tb,{}),o(nb,{}),o(Qy,{__html:d?.cookieContent?.__html})]})}));Object.assign(sb,{childrenTypes:[],slots:()=>[ab,ib,lb]});e.Blocks=Xy,e.ContentPage=sb,e.handlerDecorator=ce,e.joinList=mm,e.locationNavigator=Jt,e.packageVersion="0.14.752",e.projectSettings=A,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=E,Object.defineProperty(e,"__esModule",{value:!0})}));
|