@redneckz/wildless-cms-uni-blocks 0.14.26 → 0.14.27
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/bin/migration-scripts/0.14.26.js +3 -1
- package/bin/migration-scripts/0.14.27.js +38 -0
- package/bundle/api/{CorporateLeadAPI.d.ts → LeadServiceAPI.d.ts} +2 -2
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +258 -216
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +11 -1
- package/bundle/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -0
- package/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -1
- package/bundle/components/ApplicationForm/DatePickerControl.d.ts +8 -0
- package/bundle/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/bundle/components/ApplicationForm/Footnote.d.ts +1 -0
- package/bundle/components/ApplicationForm/IndividualsFormState.d.ts +9 -0
- package/bundle/components/ApplicationForm/renderIndividualsFields.d.ts +4 -0
- package/bundle/components/CarouselCard/titleSize.d.ts +1 -1
- package/bundle/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +1 -0
- package/bundle/icons/IconName.d.ts +4 -2
- package/bundle/ui-kit/DatePicker/DatePicker.d.ts +1 -0
- package/cosmos-static/icons/DzenIcon.svg +1 -0
- package/{lib/api/CorporateLeadAPI.d.ts → dist/api/LeadServiceAPI.d.ts} +2 -2
- package/dist/api/{CorporateLeadAPI.js → LeadServiceAPI.js} +7 -6
- package/dist/api/LeadServiceAPI.js.map +1 -0
- package/dist/components/ApplicationForm/ApplicationForm.js +4 -4
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +11 -1
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js +1 -2
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormGrantSupport.js +1 -1
- package/dist/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -0
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.js +52 -0
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -0
- package/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -1
- package/dist/components/ApplicationForm/DatePickerControl.d.ts +8 -0
- package/dist/components/ApplicationForm/DatePickerControl.js +8 -0
- package/dist/components/ApplicationForm/DatePickerControl.js.map +1 -0
- package/dist/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/dist/components/ApplicationForm/EmbeddableForms.js +2 -0
- package/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/dist/components/ApplicationForm/Footnote.d.ts +1 -0
- package/dist/components/ApplicationForm/Footnote.js +1 -1
- package/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/dist/components/ApplicationForm/IndividualsFormState.d.ts +9 -0
- package/dist/components/{Tile/TileContent.js → ApplicationForm/IndividualsFormState.js} +1 -1
- package/dist/components/ApplicationForm/IndividualsFormState.js.map +1 -0
- package/dist/components/ApplicationForm/renderIndividualsFields.d.ts +4 -0
- package/dist/components/ApplicationForm/renderIndividualsFields.js +11 -0
- package/dist/components/ApplicationForm/renderIndividualsFields.js.map +1 -0
- package/dist/components/Blocks.js +0 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +0 -2
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Calculator/Calculator.mobile.js +4 -4
- package/dist/components/Calculator/Calculator.mobile.js.map +1 -1
- package/dist/components/Carousel/renderCarouselCards.js +1 -1
- package/dist/components/Carousel/renderCarouselCards.js.map +1 -1
- package/dist/components/CarouselCard/CarouselCard.js +1 -1
- package/dist/components/CarouselCard/CarouselCard.js.map +1 -1
- package/dist/components/CarouselCard/titleSize.d.ts +1 -1
- package/dist/components/CarouselCard/titleSize.js +1 -1
- package/dist/components/CarouselCard/titleSize.js.map +1 -1
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +1 -1
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +2 -2
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/HorizontalNavigation.mobile.js +2 -1
- package/dist/components/Footer/HorizontalNavigation.mobile.js.map +1 -1
- package/dist/components/Footer/SocialMedia.js +3 -3
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/Footer/iconsMap.js +4 -0
- package/dist/components/Footer/iconsMap.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +1 -0
- package/dist/components/ProductBlock/ProductBlock.js +1 -3
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductGallery/ProductGallery.js +1 -1
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +2 -0
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/dist/ui-kit/DatePicker/DatePicker.d.ts +1 -0
- package/dist/ui-kit/DatePicker/DatePicker.js +4 -4
- package/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/dist/ui-kit/DatePicker/getYears.js +1 -1
- package/dist/ui-kit/Input/Input.js +1 -1
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/NotFound/NotFound.js +1 -1
- package/dist/ui-kit/NotFound/NotFound.js.map +1 -1
- package/dist/ui-kit/SearchDialog/SearchInput.js +1 -1
- package/dist/ui-kit/Select/Select.js +1 -1
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/{mobile/bundle/api/CorporateLeadAPI.d.ts → lib/api/LeadServiceAPI.d.ts} +2 -2
- package/lib/api/{CorporateLeadAPI.js → LeadServiceAPI.js} +5 -4
- package/lib/api/LeadServiceAPI.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationForm.fixture.mobile.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationForm.js +4 -4
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +11 -1
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js +1 -2
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormGrantSupport.js +1 -1
- package/lib/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -0
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.js +50 -0
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -0
- package/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -1
- package/lib/components/ApplicationForm/DatePickerControl.d.ts +8 -0
- package/lib/components/ApplicationForm/DatePickerControl.js +6 -0
- package/lib/components/ApplicationForm/DatePickerControl.js.map +1 -0
- package/lib/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/lib/components/ApplicationForm/EmbeddableForms.js +2 -0
- package/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/lib/components/ApplicationForm/Footnote.d.ts +1 -0
- package/lib/components/ApplicationForm/Footnote.js +1 -1
- package/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/lib/components/ApplicationForm/IndividualsFormState.d.ts +9 -0
- package/lib/components/ApplicationForm/IndividualsFormState.js +2 -0
- package/lib/components/ApplicationForm/IndividualsFormState.js.map +1 -0
- package/lib/components/ApplicationForm/renderIndividualsFields.d.ts +3 -0
- package/lib/components/ApplicationForm/renderIndividualsFields.js +8 -0
- package/lib/components/ApplicationForm/renderIndividualsFields.js.map +1 -0
- package/lib/components/Blocks.js +0 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +0 -2
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Calculator/Calculator.mobile.js +4 -4
- package/lib/components/Calculator/Calculator.mobile.js.map +1 -1
- package/lib/components/Carousel/renderCarouselCards.js +1 -1
- package/lib/components/Carousel/renderCarouselCards.js.map +1 -1
- package/lib/components/CarouselCard/CarouselCard.js +1 -1
- package/lib/components/CarouselCard/CarouselCard.js.map +1 -1
- package/lib/components/CarouselCard/titleSize.d.ts +1 -1
- package/lib/components/CarouselCard/titleSize.js +1 -1
- package/lib/components/CarouselCard/titleSize.js.map +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +2 -2
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/HorizontalNavigation.mobile.js +2 -1
- package/lib/components/Footer/HorizontalNavigation.mobile.js.map +1 -1
- package/lib/components/Footer/SocialMedia.js +3 -3
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/Footer/iconsMap.js +4 -0
- package/lib/components/Footer/iconsMap.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +1 -0
- package/lib/components/ProductBlock/ProductBlock.js +1 -3
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.js +1 -1
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +2 -0
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/lib/ui-kit/DatePicker/DatePicker.d.ts +1 -0
- package/lib/ui-kit/DatePicker/DatePicker.js +4 -4
- package/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/lib/ui-kit/DatePicker/getYears.js +1 -1
- package/lib/ui-kit/Input/Input.js +1 -1
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/NotFound/NotFound.js +1 -1
- package/lib/ui-kit/NotFound/NotFound.js.map +1 -1
- package/lib/ui-kit/SearchDialog/SearchInput.js +1 -1
- package/lib/ui-kit/Select/Select.js +1 -1
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/{dist/api/CorporateLeadAPI.d.ts → mobile/bundle/api/LeadServiceAPI.d.ts} +2 -2
- package/mobile/bundle/bundle.umd.js +263 -68
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +11 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -0
- package/mobile/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -1
- package/mobile/bundle/components/ApplicationForm/DatePickerControl.d.ts +8 -0
- package/mobile/bundle/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/Footnote.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/IndividualsFormState.d.ts +9 -0
- package/mobile/bundle/components/ApplicationForm/renderIndividualsFields.d.ts +4 -0
- package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +1 -0
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/bundle/ui-kit/DatePicker/DatePicker.d.ts +1 -0
- package/mobile/dist/api/LeadServiceAPI.d.ts +15 -0
- package/mobile/dist/api/{CorporateLeadAPI.js → LeadServiceAPI.js} +7 -6
- package/mobile/dist/api/LeadServiceAPI.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +4 -4
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +11 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js +1 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormGrantSupport.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js +52 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -1
- package/mobile/dist/components/ApplicationForm/DatePickerControl.d.ts +8 -0
- package/mobile/dist/components/ApplicationForm/DatePickerControl.js +8 -0
- package/mobile/dist/components/ApplicationForm/DatePickerControl.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.js +2 -0
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/Footnote.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/Footnote.js +1 -1
- package/mobile/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/IndividualsFormState.d.ts +9 -0
- package/mobile/dist/components/{Tile/TileContent.js → ApplicationForm/IndividualsFormState.js} +1 -1
- package/mobile/dist/components/ApplicationForm/IndividualsFormState.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/renderIndividualsFields.d.ts +4 -0
- package/mobile/dist/components/ApplicationForm/renderIndividualsFields.js +11 -0
- package/mobile/dist/components/ApplicationForm/renderIndividualsFields.js.map +1 -0
- package/mobile/dist/components/Blocks.js +0 -2
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Calculator/Calculator.js +4 -4
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Carousel/renderCarouselCards.js +1 -1
- package/mobile/dist/components/Carousel/renderCarouselCards.js.map +1 -1
- package/mobile/dist/components/CarouselCard/CarouselCard.js +1 -1
- package/mobile/dist/components/CarouselCard/CarouselCard.js.map +1 -1
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +1 -1
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +2 -2
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/HorizontalNavigation.js +2 -1
- package/mobile/dist/components/Footer/HorizontalNavigation.js.map +1 -1
- package/mobile/dist/components/Footer/SocialMedia.js +3 -3
- package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/dist/components/Footer/iconsMap.js +4 -0
- package/mobile/dist/components/Footer/iconsMap.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +1 -0
- package/mobile/dist/components/ProductBlock/ProductBlock.js +1 -3
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +2 -0
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/mobile/dist/ui-kit/DatePicker/DatePicker.d.ts +1 -0
- package/mobile/dist/ui-kit/DatePicker/DatePicker.js +4 -4
- package/mobile/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/mobile/dist/ui-kit/DatePicker/getYears.js +1 -1
- package/mobile/dist/ui-kit/Input/Input.js +1 -1
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/NotFound/NotFound.js +1 -1
- package/mobile/dist/ui-kit/NotFound/NotFound.js.map +1 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchInput.js +1 -1
- package/mobile/dist/ui-kit/Select/Select.js +1 -1
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/api/LeadServiceAPI.d.ts +15 -0
- package/mobile/lib/api/{CorporateLeadAPI.js → LeadServiceAPI.js} +5 -4
- package/mobile/lib/api/LeadServiceAPI.js.map +1 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +4 -4
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +11 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js +1 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormGrantSupport.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js +50 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -1
- package/mobile/lib/components/ApplicationForm/DatePickerControl.d.ts +8 -0
- package/mobile/lib/components/ApplicationForm/DatePickerControl.js +6 -0
- package/mobile/lib/components/ApplicationForm/DatePickerControl.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.js +2 -0
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/Footnote.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/Footnote.js +1 -1
- package/mobile/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/IndividualsFormState.d.ts +9 -0
- package/mobile/lib/components/ApplicationForm/IndividualsFormState.js +2 -0
- package/mobile/lib/components/ApplicationForm/IndividualsFormState.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/renderIndividualsFields.d.ts +4 -0
- package/mobile/lib/components/ApplicationForm/renderIndividualsFields.js +8 -0
- package/mobile/lib/components/ApplicationForm/renderIndividualsFields.js.map +1 -0
- package/mobile/lib/components/Blocks.js +0 -2
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/Calculator/Calculator.js +4 -4
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Carousel/renderCarouselCards.js +1 -1
- package/mobile/lib/components/Carousel/renderCarouselCards.js.map +1 -1
- package/mobile/lib/components/CarouselCard/CarouselCard.js +1 -1
- package/mobile/lib/components/CarouselCard/CarouselCard.js.map +1 -1
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +1 -1
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +2 -2
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/HorizontalNavigation.js +2 -1
- package/mobile/lib/components/Footer/HorizontalNavigation.js.map +1 -1
- package/mobile/lib/components/Footer/SocialMedia.js +3 -3
- package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/lib/components/Footer/iconsMap.js +4 -0
- package/mobile/lib/components/Footer/iconsMap.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +1 -0
- package/mobile/lib/components/ProductBlock/ProductBlock.js +1 -3
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +2 -0
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/mobile/lib/ui-kit/DatePicker/DatePicker.d.ts +1 -0
- package/mobile/lib/ui-kit/DatePicker/DatePicker.js +4 -4
- package/mobile/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/mobile/lib/ui-kit/DatePicker/getYears.js +1 -1
- package/mobile/lib/ui-kit/Input/Input.js +1 -1
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/NotFound/NotFound.js +1 -1
- package/mobile/lib/ui-kit/NotFound/NotFound.js.map +1 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchInput.js +1 -1
- package/mobile/lib/ui-kit/Select/Select.js +1 -1
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/src/api/{CorporateLeadAPI.ts → LeadServiceAPI.ts} +5 -3
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +14 -8
- package/mobile/src/components/ApplicationForm/ApplicationForm.ui.json +5 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +13 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +1 -3
- package/mobile/src/components/ApplicationForm/ApplicationFormGrantSupport.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +74 -0
- package/mobile/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -1
- package/mobile/src/components/ApplicationForm/DatePickerControl.tsx +33 -0
- package/mobile/src/components/ApplicationForm/EmbeddableForms.tsx +2 -0
- package/mobile/src/components/ApplicationForm/Footnote.tsx +3 -2
- package/mobile/src/components/ApplicationForm/IndividualsFormState.ts +9 -0
- package/mobile/src/components/ApplicationForm/renderIndividualsFields.tsx +46 -0
- package/mobile/src/components/Blocks.ts +0 -2
- package/mobile/src/components/Calculator/Calculator.tsx +5 -7
- package/mobile/src/components/Carousel/renderCarouselCards.tsx +1 -1
- package/mobile/src/components/CarouselCard/CarouselCard.tsx +1 -1
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +2 -2
- package/mobile/src/components/Footer/Footer.tsx +7 -5
- package/mobile/src/components/Footer/HorizontalNavigation.tsx +2 -1
- package/mobile/src/components/Footer/SocialMedia.tsx +8 -8
- package/mobile/src/components/Footer/iconsMap.ts +4 -0
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMap.ui.json +16 -1
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapContent.ts +1 -0
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +1 -6
- package/mobile/src/components/ProductGallery/ProductGallery.example.json +1 -1
- package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.example.json +1 -0
- package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.ui.json +1 -0
- package/mobile/src/icons/DzenIcon.svg +4 -0
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/ui-kit/BenefitItem/BenefitItem.tsx +1 -7
- package/mobile/src/ui-kit/DatePicker/DatePicker.tsx +13 -5
- package/mobile/src/ui-kit/DatePicker/getYears.ts +1 -1
- package/mobile/src/ui-kit/Input/Input.tsx +1 -1
- package/mobile/src/ui-kit/NotFound/NotFound.tsx +1 -1
- package/mobile/src/ui-kit/SearchDialog/SearchInput.tsx +1 -1
- package/mobile/src/ui-kit/Select/Select.tsx +1 -1
- package/package.json +1 -1
- package/src/api/{CorporateLeadAPI.ts → LeadServiceAPI.ts} +5 -3
- package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +14 -0
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +14 -0
- package/src/components/ApplicationForm/ApplicationForm.tsx +14 -8
- package/src/components/ApplicationForm/ApplicationForm.ui.json +5 -2
- package/src/components/ApplicationForm/ApplicationFormContent.ts +13 -1
- package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +1 -3
- package/src/components/ApplicationForm/ApplicationFormGrantSupport.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +74 -0
- package/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -1
- package/src/components/ApplicationForm/DatePickerControl.tsx +33 -0
- package/src/components/ApplicationForm/EmbeddableForms.tsx +2 -0
- package/src/components/ApplicationForm/Footnote.tsx +3 -2
- package/src/components/ApplicationForm/IndividualsFormState.ts +9 -0
- package/src/components/ApplicationForm/renderIndividualsFields.tsx +46 -0
- package/src/components/Blocks.mobile.ts +0 -2
- package/src/components/Blocks.ts +0 -2
- package/src/components/Calculator/Calculator.mobile.tsx +5 -7
- package/src/components/Carousel/renderCarouselCards.tsx +1 -1
- package/src/components/CarouselCard/CarouselCard.tsx +1 -1
- package/src/components/CarouselCard/titleSize.tsx +1 -1
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +2 -2
- package/src/components/Footer/Footer.mobile.tsx +7 -5
- package/src/components/Footer/HorizontalNavigation.mobile.tsx +2 -1
- package/src/components/Footer/SocialMedia.tsx +8 -8
- package/src/components/Footer/iconsMap.ts +4 -0
- package/src/components/OfficesAtmsMap/OfficesAtmsMap.ui.json +16 -1
- package/src/components/OfficesAtmsMap/OfficesAtmsMapContent.ts +1 -0
- package/src/components/ProductBlock/ProductBlock.tsx +1 -6
- package/src/components/ProductGallery/ProductGallery.example.json +1 -1
- package/src/components/ProductGallery/ProductGallery.tsx +1 -1
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.example.json +1 -0
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.ui.json +1 -0
- package/src/icons/DzenIcon.svg +4 -0
- package/src/icons/IconName.ts +4 -1
- package/src/ui-kit/BenefitItem/BenefitItem.tsx +1 -7
- package/src/ui-kit/DatePicker/DatePicker.tsx +13 -5
- package/src/ui-kit/DatePicker/getYears.ts +1 -1
- package/src/ui-kit/Input/Input.tsx +1 -1
- package/src/ui-kit/NotFound/NotFound.tsx +1 -1
- package/src/ui-kit/SearchDialog/SearchInput.tsx +1 -1
- package/src/ui-kit/Select/Select.tsx +1 -1
- package/bundle/components/Tile/Tile.d.ts +0 -5
- package/bundle/components/Tile/TileContent.d.ts +0 -6
- package/dist/api/CorporateLeadAPI.js.map +0 -1
- package/dist/components/Tile/Tile.d.ts +0 -5
- package/dist/components/Tile/Tile.js +0 -8
- package/dist/components/Tile/Tile.js.map +0 -1
- package/dist/components/Tile/TileContent.d.ts +0 -6
- package/dist/components/Tile/TileContent.js.map +0 -1
- package/lib/api/CorporateLeadAPI.js.map +0 -1
- package/lib/components/Tile/Tile.d.ts +0 -5
- package/lib/components/Tile/Tile.fixture.d.ts +0 -15
- package/lib/components/Tile/Tile.fixture.mobile.d.ts +0 -9
- package/lib/components/Tile/Tile.js +0 -6
- package/lib/components/Tile/Tile.js.map +0 -1
- package/lib/components/Tile/TileContent.d.ts +0 -6
- package/lib/components/Tile/TileContent.js +0 -2
- package/lib/components/Tile/TileContent.js.map +0 -1
- package/mobile/bundle/components/Tile/Tile.d.ts +0 -5
- package/mobile/bundle/components/Tile/TileContent.d.ts +0 -6
- package/mobile/dist/api/CorporateLeadAPI.d.ts +0 -15
- package/mobile/dist/api/CorporateLeadAPI.js.map +0 -1
- package/mobile/dist/components/Tile/Tile.d.ts +0 -5
- package/mobile/dist/components/Tile/Tile.js +0 -8
- package/mobile/dist/components/Tile/Tile.js.map +0 -1
- package/mobile/dist/components/Tile/TileContent.d.ts +0 -6
- package/mobile/dist/components/Tile/TileContent.js.map +0 -1
- package/mobile/lib/api/CorporateLeadAPI.d.ts +0 -15
- package/mobile/lib/api/CorporateLeadAPI.js.map +0 -1
- package/mobile/lib/components/Tile/Tile.d.ts +0 -5
- package/mobile/lib/components/Tile/Tile.js +0 -6
- package/mobile/lib/components/Tile/Tile.js.map +0 -1
- package/mobile/lib/components/Tile/TileContent.d.ts +0 -6
- package/mobile/lib/components/Tile/TileContent.js +0 -2
- package/mobile/lib/components/Tile/TileContent.js.map +0 -1
- package/mobile/src/components/Tile/Tile.example.json +0 -28
- package/mobile/src/components/Tile/Tile.tsx +0 -23
- package/mobile/src/components/Tile/Tile.ui.json +0 -17
- package/mobile/src/components/Tile/TileContent.ts +0 -7
- package/src/components/Tile/Tile.example.json +0 -28
- package/src/components/Tile/Tile.fixture.mobile.tsx +0 -48
- package/src/components/Tile/Tile.fixture.tsx +0 -146
- package/src/components/Tile/Tile.tsx +0 -23
- package/src/components/Tile/Tile.ui.json +0 -17
- package/src/components/Tile/TileContent.ts +0 -7
|
@@ -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 l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),x=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:g(e)),t._tmpl},g=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t};class f{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const b=new f;function y(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:v(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function v(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const N=new f;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),k={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","":""},S=x((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return y(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];N.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[x,g]=n(!1);a((()=>b.subscribe("tab",(e=>{g(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:w("@container font-sans",f?"group":"",k[t],x?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),C={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=x((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=C[l]||"h3";return u(i,{className:w("font-sans m-0",I[t],e),children:n||a})})),B=e=>e,R=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=B,format:i=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),x=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:x}]},M=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],P=e=>!e?.length,V=e=>t=>l=>e(l)?[]:[t],_=e=>null!=e,z=new Map;function A(e,t,{fallback:l,cache:i}={}){const s=r((()=>j(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{if(!s.some(_))return;let e=!1;const l=(t,l)=>{e||(d(t),h(l))};return(async()=>{try{l(await(o?((e,t=z)=>l=>{const n=t.get(l);if(_(n))return n;const a=e(l);return _(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s)))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0)}}function j(e){return Array.isArray(e)?e:e instanceof Function?j(e()):[e]}async function D(e,t){try{return e?await E(e,t):null}catch(e){console.error(e)}return null}async function E(e,t){return(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json()}const O=[];function L(){const{data:e}=A("/api/v1/regions",E);return e||O}const F=()=>({open:(e,t={})=>b.fire("dialog",{type:"open",dialog:e,...t}),close:()=>b.fire("dialog",{type:"close"}),closeAll:()=>b.fire("dialog",{type:"close",all:!0})}),$=e=>Boolean(e?.includes(":")),U=(e,t)=>Boolean(e&&!$(e)&&(!t||"_self"===t)),H=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),W=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var K=Object.freeze({__proto__:null,isURL:$,isLocalURL:U,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:H,joinPath:W});const X=e=>(t,l=d.BASE_PATH)=>{if(!t||$(t)||G(t,d.CDN))return t;const n=t.startsWith("/");return W(G(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},G=(e,t)=>t&&e&&e.startsWith(t),q=(e,t)=>q._impl(e,t);function J(){return J._impl()}function Y(e={}){const{isRemote:t,basePath:l}=e,n=J(),{closeAll:a}=F();return e=>({...e,href:t&&!l?e.href:X(n)(e.href,l),"aria-label":e.text,onClick:q(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&U(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}q._impl=e=>e,q.setup=e=>{q._impl=e},J._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),J.setup=e=>{J._impl=e};const Q={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","":""},Z="bg-main-divider text-main-disabled",ee={primary:Z,secondary:Z,white:Z,link:"",transparent:"",gray:Z,"":""},te="text-center font-sans select-none",le={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","":""},ne=x((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=ie(e)?"hidden lg:block":"";return p("div",{className:w(ae(e),"flex gap-xs"),children:[n?u("div",{className:w(r,le[i]),children:n}):null,ie(e)?p("div",{className:"whitespace-pre",children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:w(r,le[i]),children:a}):null]})})),ae=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return w("group/btn items-center justify-center",ie(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},ie=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),re=({className:e,rounded:t,version:l})=>["inline-block",te,l?ee[l]:"",t?"rounded-full":"rounded-md",e].join(" "),se=({className:e,rounded:t,version:l})=>[te,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?Q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),oe=x((({disabled:e,children:t,...l})=>{const n=Y()(l),a=t??u(ne,{...n});return u(e?de:ce,{...n,children:a})})),ce=x((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:se({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),de=x((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:re({className:e,rounded:n,version:l}),children:a}))),me=x((({children:e,...t})=>u("p",{className:w("font-sans",Object.values(t)),children:e}))),he=x((({children:e,...t})=>u("span",{className:w("font-sans",Object.values(t)),children:e}))),ue=x((({link:e})=>p(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(he,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(oe,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(he,{children:e.text})}):null]}))),pe=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},xe=x((({key:e,className:t="",inputClassName:l="",id:n,name:r,type:o="text",label:c,placeholder:d,value:m="",valid:h=!0,children:x,onChange:g,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1})=>{const N=s(null),k=i((e=>{g&&g(e.target?.value||"")}),[g]);a((()=>{v&&N.current?.focus()}),[v,N]);const S=x?"pr-3xl":"",C=h?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[c?u("div",{className:"mb-xs",children:u(he,{size:"text-m",font:"font-light",children:c})}):null,u("input",{ref:N,className:w("w-full border rounded-md text-primary-text outline-none p-m",S,C,l),id:n,name:r||n,placeholder:d,type:o,value:m,onInput:k,onFocus:f,onBlur:b,pattern:y},e)]}),x]})})),ge=x((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(xe,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),fe=e=>"_"===e,be=e=>/\d/.test(e),ye=e=>fe(e)||be(e),ve=[..."+7 (___) ___-__-__"],Ne=ve.findIndex(fe),we=ve.map(((e,t)=>ye(e)?ve.slice(0,t).filter(ye).length:-1));const ke=x((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=ve.map(((e,l)=>be(e)?e:t.charAt(we[l])||e)),n=we.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Ne,n)):l).join("")}(e))),[t]);return u(xe,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Se=x((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(ke,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),Ce="Некорректно заполненное поле",Ie=V((e=>null!=e&&""!==e))(Ce),Te=V((e=>"string"==typeof e&&e.length>1))(Ce),Be=V((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Ce),Re=(Me=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,V((e=>"string"==typeof e&&Me.test(e))))(Ce);var Me;const Pe=e=>p("div",{className:"space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Наименование организации",...pe(e("fullName"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)}),u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Re)})]}),Ve=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function _e(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const ze={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},Ae=x((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const o=J(),c=X(o)(W(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(Ee,{className:e,children:p("svg",{className:w(De(r),ze[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]})}):u("img",{className:e,src:c,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:je(e,s)})})),je=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},De=e=>e?"":"w-full h-full",Ee=x((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),Oe=e=>e?.text||e?.key||"";function Le(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}const Fe=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,$e=x((({popupRef:e,options:t,value:l,query:n,onChange:a})=>t?.length?u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:Fe(t,n).map((e=>p("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[u("span",{className:"min-h-6",children:Oe(e)}),u(Ae,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function Ue({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:o}){const c={open:(e,t)=>b.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>b.fire("popup",{type:"update",popup:e,...t}),close:()=>b.fire("popup",{type:"close"})},d=i((()=>{c.close(),o&&o()}),[o]),m=i((e=>{d(),r&&r(e)}),[d,r]),h=s(null),p=function(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return Le(globalThis.document,"click",l),t}(d);return a((()=>{if(!e||!h.current)return;const a=h.current,{top:i,left:r,width:s,height:o}=a.getBoundingClientRect();c.update(u($e,{popupRef:p,options:t,value:l,query:n,onChange:m}),{top:i+window.scrollY+o,left:r,width:s})}),[e,t,l,n,m]),h}const He=x((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:o="",isSearch:c=!1,iconVersion:d,onChange:m})=>{const[h,{setFalse:x,setTrue:g}]=_e(),[f,b]=n(""),y=i((()=>{b(""),x()}),[]),v=Ue({isOpen:h,options:l,value:a,query:f,onChange:m,onClose:y});return p("div",{className:e,children:[We(t),p("div",{className:w("relative",h?"z-20":"z-10"),ref:v,children:[p("div",{className:w("text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",Xe(s,r)),onClick:h?y:g,children:[u("p",{className:"p-m pr-3xl flex items-center overflow-hidden text-ellipsis whitespace-nowrap",children:Oe(a)||o}),Ke(h,d)]}),c&&h?u("div",{className:w("absolute top-0 w-full z-20"),children:u(xe,{type:"text",autoFocus:!0,value:f,onChange:b})}):null]})]})})),We=e=>e?u("div",{className:"mb-xs",children:u(he,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,Ke=(e,t)=>u(Ae,{className:w("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Xe=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Ge=x((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(He,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),qe=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg ",children:[u("div",{className:"@xl:w-1/2",children:u(Ge,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ve.map((({name:e=""})=>({key:e,text:e}))),...pe(t("acquiringType"),Ie)})}),u("div",{className:"@xl:w-1/2",children:u(Ge,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(t("region"),Ie)})})]}),Je=x((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:w("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(he,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),Ye=e=>p("div",{children:[u(Je,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Je,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),Qe=(e,t)=>{const l=se({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-m w-full @xl:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},Ze={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},et=M({acquiringType:Ie,region:Ie,fullName:Ie,inn:Be,name:Te,phone:Re}),tt=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;P(et(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=R(Ze,a),o=L();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"@xl:text-center"}),qe({regions:o,field:r}),u(T,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),Pe(r),Ye(r),Qe(t),u(ue,{link:l})]})})),lt=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)}),u(ge,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Se,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Re)}),u(ge,{className:"shrink-0 w-full",label:"Электронная почта",...pe(e("mail"),Ie)})]})]}),nt=({regions:e,field:t})=>u(Ge,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(t("region"),Ie)}),at={name:"",phone:"",inn:"",mail:""},it=M({region:Ie,name:Te,phone:Re,inn:Be,mail:Ie}),rt=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;P(it(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,inn:i,mail:r,phone:a.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=R(at,a),o=L();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[nt({regions:o,field:r}),lt(r),Qe(t),u(ue,{link:l})]})})),st=[];const ot=async e=>await D(e,{method:"GET"})||st,ct=["От 1 000 ₽","До 1 000 000 000 ₽"],dt=["От 1 мес","До 15 лет"],mt=e=>u("div",{className:"pb-2xs border-b border-b-main-divider",children:p("div",{className:"space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Наименование организации",...pe(e("fullName"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...pe(e("annualRevenue"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Re)}),u(ge,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)}),u(ge,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})}),ht=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},ut=(e,t,l)=>Math.max(t,Math.min(e,l)),pt=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function xt(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function gt({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:w("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=xt(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const ft=1,bt=100,yt=x((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:ft),max:s=(a.length?a.length-1:bt),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=ht(e,{normalize:(e=0)=>a.length?vt(a)(e):ut(e,r,s),format:pt()}),x=i((e=>{m&&m(xt(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(he,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:w("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:x,...h}),gt({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),Nt(n)]})})),vt=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),Nt=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),wt=e=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg",children:[p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(he,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(yt,{items:ct,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(he,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(yt,{items:dt,min:1,max:180,...e("term")})]})]}),kt=({regions:e,branches:t,field:l})=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg @xl:mb-2xl @xl:border-none @xl:pb-0",children:[u("div",{className:"@xl:w-1/2",children:u(Ge,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(l("region"),Ie)})}),u("div",{className:"@xl:w-1/2",children:u(Ge,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...pe(l("department"),Ie)})})]}),St={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},Ct=M({fullName:Ie,annualRevenue:Ie,inn:Be,name:Te,phone:Re,region:Ie,department:Ie}),It=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;P(Ct(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,""),mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=R(St,n),o=L(),c=function(e){const{data:t}=A(e?`/api/v1/branches?regionCode=${e}`:null,ot);return t||st}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры",className:"@xl:text-center"}),wt(r),u(T,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),mt(r),u(T,{headingType:"h6",title:"Офис банка",className:"@xl:text-center"}),kt({regions:o,branches:c,field:r}),Qe(e),u(ue,{link:t})]})})),Tt={name:"",phone:""},Bt=M({name:Te,phone:Re}),Rt=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{name:t,phone:l}=e;P(Bt(e))&&n({typeForm:"dpst",name:t,phone:l.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=R(Tt,a);return p("form",{className:"container",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"@xl:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Имя",...pe(r("name"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...pe(r("phone"),Re)})]}),p("div",{className:"flex justify-between flex-col-reverse @xl:items-center @xl:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(ue,{link:l})}),Qe(t)]})]})})),Mt={},Pt="wcms-resources";function Vt(e,t={}){const{fallback:l=Mt,folderName:n=Pt,setBasePath:a=!1}=t,i=W("/",a?d.BASE_PATH:"",n,`${e}.json`),{data:r}=A(e?i:null,E,{fallback:l});return r||Mt}const _t=x((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=Vt(l||"regions-grant-support"),[i,r]=n({key:""}),s=se({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s @xl:space-y-lg",children:[a?u(Ge,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:a.map((({name:e=""})=>({key:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(oe,{href:o,target:"_blank",className:w("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),zt=(e,t)=>e?.media&&t?.media?e.media-t.media:0,At=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=J();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(zt).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:Dt(a,n)(e),type:Et(l),media:i?`(max-width: ${i}px)`:"",...t.size},`${r}_${e}`))):null,t?.src?jt({...t,src:Dt(a,n)(t.src)},l):null]})})),jt=(e,t="")=>u("img",{src:e.src,className:w("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"},...e.size}),Dt=(e,t)=>l=>l&&!$(l)?X(e)(W(t,l)):l,Et=e=>e?`image/${String(e)}`:void 0,Ot=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(Ae,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(At,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),Lt=x((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u(he,{color:"text-primary-text",children:t}):null]})}))),Ft=e=>{const{value:t,onChange:l}=e("vedTypes");return u("div",{className:"space-y-m",children:p("div",{className:"@xl:flex @xl:items-center @xl:gap-xl",children:[u(Lt,{className:"mb-xs",name:"vedTypes",text:"Валютный котроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),u(Lt,{className:"mb-xs",name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),u(Lt,{className:"mb-xs",name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),u(Lt,{className:"mb-xs",name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},$t=(e,t)=>{const l="currencyControl"===e("vedTypes").value;return p("div",{children:[l?u(Ge,{className:"mb-s",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(e("region"),Ie)}):null,p("div",{className:"@xl:grid @xl:grid-cols-2 @xl:gap-x-lg",children:[l?u(ge,{className:"w-full mb-s",label:"ИНН",...pe(e("inn"),Be)}):null,u(ge,{className:"w-full mb-s",label:"Наименование организации",...pe(e("fullName"),Ie)}),u(ge,{className:"w-full mb-s",label:"ФИО",...pe(e("name"),Te)}),u(Se,{className:"w-full mb-s",label:"Телефон",...pe(e("phone"),Re)}),l?null:u(ge,{className:"w-full mb-s",label:"Электронная почта",...pe(e("mail"),Ie)})]})]})},Ut=e=>{const t=e("text");return p("label",{children:[u("div",{className:"mb-xs",children:u(he,{size:"text-m",font:"font-light",children:"Обращение"})}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:w("block w-full resize-y min-h-24 p-m outline-none border rounded-md border-gray","hover:border-primary-hover active:focus:border-primary-text focus:border-primary-text"),value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},Ht={fullName:"",name:"",phone:"",inn:"",vedTypes:"currencyControl",text:""},Wt={fullName:Ie,name:Te,phone:Re},Kt=M({...Wt,mail:Ie}),Xt=M({...Wt,inn:Be,region:Ie}),Gt=e=>"currencyControl"===e,qt=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),Jt={ApplicationFormBusinessCard:rt,ApplicationFormWed:x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,inn:r,region:s,vedTypes:o,text:c}=e,d={typeForm:"KVED",fullName:t,name:l,phone:a.replace(/[^+\d]/g,""),text:c,vedTypes:qt(o),PartnerComments:c,...Gt(o)?{inn:r,region:s?.text||""}:{mail:i}};P((e=>Gt(e)?Xt:Kt)(o)(e))&&n(d)}),[n]),[,{field:r,...s}]=R(Ht,a),o=L();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[Ft(r),u(T,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),$t(r,o),Ut(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg @xl:items-center @xl:flex-row @xl:pb-4xl",children:[Qe(t),u(ue,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),p("div",{className:"flex gap-xl",children:[p("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:[u(Ot,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(Ot,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Rt,ApplicationFormCredit:It,ApplicationFormAcquiring:tt,ApplicationFormGrantSupport:_t},Yt=x((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(Ot,t?{image:{icon:"ResponseOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponseFailIcon"},width:"37",height:"34"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),Qt={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return t?.ok?await t.json():null}catch(e){return null}}},Zt=x((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async e=>{const t=await Qt.send(e)?"OK":"Fail";return s(t),t}),[]);return u(S,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(T,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?el(l,o):null,r?u(Yt,{responseType:r}):null]})})})),el=(e,t)=>{const l=e?.formType;if(!l||!(l in Jt))return null;return u(Jt[l],{...e,onSubmit:t})},tl="text-left",ll={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},nl=x((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:w("rounded-icon object-fit flex justify-center items-center",ll[l],e),children:u(Ae,{...i,width:"54%",height:"54%",name:a})}):null})),al=x((({className:e="",title:t,benefitList:l,...n})=>p(S,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(T,{headingType:"h3",as:"h2",className:tl,title:t}):null,l?.length?u("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(il)}):null]}))),il=(e,t)=>p("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[e?.icon?.icon?u(nl,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(Ot,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"@sm:h-full",children:[u(T,{headingType:"h6",children:e.label}),rl(e.description)]}):null]},String(t)),rl=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?ol(e):sl(e)}):null},sl=e=>e?.name?u(he,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:e.name}):null,ol=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:u(he,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:e})},`benefitListItem-${t}`)))}):null},cl=e=>Boolean(e?.src||e?.icon),dl=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map(ml(l))}):null,ml=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o=hl(a,r),c=hl(i,r);return n||a?.icon?u(oe,{className:w("basis-full sm:basis-auto",e),appendLeft:ul({...a,iconVersion:o}),appendRight:ul({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},hl=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},ul=e=>cl(e)?u(Ot,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,pl={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"}},xl={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},gl=x((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=pl[l],m={marginTop:d.descriptionStyle};return p(S,{className:w(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(T,{className:w("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(me,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),fl=x((({className:e="",title:t,description:l,bonusItems:n=[],align:a="text-left",...i})=>u(S,{className:e,defaultPadding:"p-6xl",...i,children:p("div",{className:"container",children:[u(gl,{className:"mb-xl",isEmbedded:!0,title:t,description:l,headlineVersion:"M",align:a}),u("div",{className:"flex flex-wrap gap-3xl gap-x-m w-full",children:n.length>0?n.map(((e,t)=>p("div",{className:"w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow w-full p-xl sm:p-m border border-gray",children:[u("div",{className:"grow",children:u(gl,{title:e?.title,description:e?.description,headlineVersion:"S",isEmbedded:!0,align:"text-left"})}),p("div",{className:"flex justify-center sm:justify-between sm:items-end",children:[u("div",{className:"hidden sm:block",children:dl(e?.buttons)}),e.bonusItemContent?.bonusType?bl(e.bonusItemContent):null]})]},String(t)))):null})]})}))),bl=e=>"count"===e.bonusType?yl(e):vl(e),yl=e=>p("div",{className:"w-full pt-default @xl:mt-s @xl:mb-4 flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(he,{size:"text-h2",children:e.bonusName})}):null]}),vl=e=>e.image?u(Ot,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,Nl=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),wl=x((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=y(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),kl=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],Sl=x((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const x={sensitivity:1,rootRef:t},g=s([]),f=i(((e,t)=>{const l=[...g.current||[]];l[e]=t,g.current=l,h&&h(l),p&&p(Il(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?Cl(r,b):{},...y?Nl(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(k=(e,t)=>u(wl,{className:w(c,n?kl[n-1]:"",y?"h-full":""),style:v?Cl(r/4):{},activeIndex:l,idx:t,observerOptions:x,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(k):k(e,0))(m)});var k})),Cl=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Il=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Tl={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Bl={"horizontal-list":"w-6","vertical-list":"h-6"},Rl=x((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?u("div",{className:w("flex gap-xs",Tl[a],i?"group":"",e),...i?{"data-ver":i}:{},children:new Array(n).fill(null).map(((e,n)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?Bl[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Ml=e=>e,Pl=(e=Ml)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Vl=Pl(),_l=(e=Ml)=>Pl((t=>-e(t))),zl=_l(),Al=e=>t=>e.scrollWidth/t,jl=e=>(t,l)=>{e.scrollBy({left:l*Al(e)(t),behavior:"smooth"})},Dl=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[_l()(a),Pl()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?jl(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?jl(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),x=i((e=>{l?.current&&l.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:x,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},El=x((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=true,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=Dl({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===o?"relative h-full":""),children:[u(Sl,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(Rl,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Ol=(e,t,l)=>{return u(El,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>p("div",{className:w("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(he,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?u(Ot,{image:e,height:"180",className:"w-auto"}):null,l?u(he,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},Ll=x((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(S,{className:l,defaultPadding:"p-6xl",...r,children:[u(gl,{title:i,description:a,headlineVersion:"M"}),e?.length?Ol(e,0,t):null]}))),Fl={start:"justify-start",center:"justify-center",end:"justify-end"},$l=x((({buttons:e,className:t="",align:l,...n})=>{const a=l?w("flex",Fl[l]):"";return u(S,{className:w("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:dl(e)})})),Ul=x((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),Hl=x((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return a((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),Wl=x((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:w("flex justify-between @xl:flex-col",a),children:[e?u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(he,{size:"text-h3",children:[n," ",pt(2)(Math.round(t))," ",l]})}:{children:u(he,{size:"text-h3",children:"-"})})]}))),Kl=Math.round(23.5),Xl={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Gl={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},ql={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Jl={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Yl={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Ql=e=>e?u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,Zl=x((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,fractionDigits:i=2})=>p("div",{children:[u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:String(e.toFixed(i)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:n}):null]})]}))),en=x((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{className:"space-y-s",children:[u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u(Ae,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),u("div",{className:"w-64",children:t?p(me,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(me,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),tn=({rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,title:a,unit:i})=>u(Zl,{rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,unit:i,title:a}),ln=({rate:e,title:t,unit:l})=>u(Wl,{title:t,value:e,postfix:l}),nn=({isUnknownRateShown:e=!0,isUnavailableByTerm:t=!1,title:l="Ставка",unit:n="%",rate:a=0,...i})=>e&&0===a?u(en,{isUnavailableByTerm:t,title:l}):p("div",{children:[u("div",{className:"hidden @xl:block",children:tn({title:l,unit:n,rate:a,...i})}),u("div",{className:"@xl:hidden",children:ln({title:l,unit:n,rate:a,...i})})]});function an({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${pt(2)(l.min||0)} ₽`,`До ${pt(2)(l.max||0)} ₽`];return u(yt,{items:e?n:[],step:t,...l})}function rn(e){const{data:t}=A(`/wcms-resources/${e}.json`,E);return t}const sn=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=rn(t||"bonus-calculator-data")||ql,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},on=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=R({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=sn(a,t);return p("section",{className:w("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[p("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[an({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),an({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?nn({title:"Баллов за месяц",rate:d,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,p("div",{className:"flex flex-col gap-y-4xl @xl:w-96",children:[m>=0?u(Wl,{title:"Баллов за год",value:m}):null,dl(l,{isVertical:!0}),Ql(n)]})]})})),cn=x((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>u("path",{d:e,fill:t||"currentColor",...r,...l},n)))}))),dn=[{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"}],mn=x((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(cn,{paths:dn,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":hn(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(he,{size:"text-l",font:"font-light",children:l})}):null]})})})),hn=e=>w("rounded border",e?"bg-primary-main":""),un=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,pn={horizontal:"gap-5xl",vertical:"flex-col gap-s"},xn=x((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:w(`flex ${pn[a]}`,l),children:e?.map((({id:e,text:l})=>u(mn,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),gn=({items:e,title:t,orientation:l="horizontal",value:n,radioGroupClassName:a,onChange:i})=>p("div",{className:"space-y-s",children:[t?u("div",{children:u(he,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(xn,{orientation:l,items:e,checkedItem:e[n?0:1].id,className:w("flex-col sm:flex-row",a),onChange:t=>i&&i(t===e[0].id)})]}),fn=e=>gn({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),bn=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},yn=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:vn([e,t],n),vn=([e,t],l=[])=>({[e]:l.length?zl(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Vl(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Nn=(e,[t,l],n)=>e>=n[t]&&e<=n[l],wn=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,kn=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},Sn=x((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i})=>{const[r,{field:s}]=R({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=rn(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...Yl,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&wn(o,e)&&Nn(n,["minSum","maxSum"],e)&&Nn(l,["minDays","maxDays"],e)))||Yl,{rate:m}=d,h=kn(m,e),u=n+h,p=s?.rateRows||[Yl];return{...d,...vn(["minSum","maxSum"],p),...vn(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(r,t?.sourceBookDir),{income:c,finalSum:d,rate:m,isUnavailableByTerm:h,depositeName:x}=o;return p("section",{className:w("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[an({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),(g={title:"Срок, дней",min:o.minDays,max:o.maxDays,...s("daysValue"),value:o.daysValue},u(yt,{items:[`От ${un(g.min||0)}`,`До ${un(g.max||0)}`],step:1,...g})),p("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[Cn(o,s),fn({title:"Выплата процентов",orientation:"vertical",...s("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),u("div",{className:"border-b border-main-divider md:hidden"}),nn({rate:m,depositeName:x,isShowDepositeName:i,isUnavailableByTerm:h}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[In(d,c),dl(l,{isVertical:!0}),Ql(n),Ql(a)]})]});var g})),Cn=(e,t)=>p("div",{className:"space-y-s",children:[u(he,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(mn,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(mn,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),In=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Wl,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Wl,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),Tn=({min:e=0,max:t=0,availableMonths:l,...n})=>u(yt,{items:[`От ${Bn(e)}`,`До ${Bn(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Bn=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Rn=e=>gn({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Mn=e=>Pn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Pn({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Pn({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Pn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Pn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Vn=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},_n=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=rn(t||"credit-calculator-data"),s=i?.rateRows||[Xl],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Mn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=yn(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=yn(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>Mn({row:e,userInputParams:t,paramsViewSettings:l})&&Nn(n,["minSum","maxSum"],e)&&Nn(a,["minMonths","maxMonths"],e)))||Xl)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,x=Vn(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:x})),[e,i])},zn=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,isMobile:i})=>{const[r,{field:s}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:Kl}),o=_n(r,t,a),c=Rn({title:i?"Тип платежа":"",orientation:"vertical",...s("isAnnuity")});return p("section",{className:w("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[an({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Tn({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),An({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),nn({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Wl,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),dl(l,{isVertical:!0}),Ql(n)]})]})})),An=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(mn,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(mn,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(mn,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(mn,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),jn=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=rn(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?On(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>En({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&En({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Nn(n,["minSum","maxSum"],t)&&Nn(a||r,["minMonths","maxMonths"],t)))||Jl,{rate:d}=c,m=Dn(d,e),h=n+m,u=i?.rateRows||[Jl];return{...c,...vn(["minSum","maxSum"],u),...vn(["minMonths","maxMonths"],u),availableMonths:bn(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},Dn=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},En=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],On=(e,t)=>e+Math.round((t-e)/2),Ln=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[r,{field:s}]=R({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=jn(r,t,i),{defaultMonth:c,rate:d,income:m,finalSum:h}=o,{onChange:x}=s("monthsValue");return a((()=>{x&&x(c)}),[c]),p("section",{className:w("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[an({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Tn({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),Fn({...o,...i},s)]}),u("div",{className:"border-b border-main-divider md:hidden"}),nn({rate:d}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Wl,{title:"Доход в конце срока",value:m,postfix:"₽",prefix:"+"}),u(Wl,{title:"Сумма в конце срока",value:h,postfix:"₽"}),dl(l,{isVertical:!0}),Ql(n)]})]})})),Fn=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?fn({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},gn({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},$n=e=>Un({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Un({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Un=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Hn=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=rn(t||"refinancing-calculator-data"),c=o?.rateRows||[Gl],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>$n({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=yn(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=yn(["minMonths","maxMonths"],d,c),x=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>$n({row:e,userInputParams:t,paramsViewSettings:l})&&Nn(n+r,["minSum","maxSum"],e)&&Nn(i,["minSumOld","maxSumOld"],e)&&Nn(r,["minSumExtra","maxSumExtra"],e)&&Nn(a,["minMonths","maxMonths"],e)))||Gl)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:g}=x,f=Vn(g,e),b=e.oldMonthlyPayment-f;return r((()=>({...x,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},Wn=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=R({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Hn(i,t,a);return p("section",{className:w("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[an({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),an({title:"Ежемесячный платеж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),Tn({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Kn({...s,...a},r),s.isExtraMoney?an({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null]}),nn({rate:s.rate,fractionDigits:1}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Wl,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Wl,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,Rn({orientation:"vertical",...r("isAnnuity")}),dl(l,{isVertical:!0}),Ql(n)]})]})})),Kn=(e,t)=>p("div",{className:"space-y-s",children:[e.isShowSalaryClient?u(mn,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(mn,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u(mn,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Xn={CreditCalculatorForm:zn,DepositCalculatorForm:Ln,BusinessDepositCalculatorForm:Sn,BonusCalculatorForm:on,RefinancingCalculatorForm:Wn},Gn=x((({className:e,calculatorTabs:t=[]})=>u(S,{className:e,defaultPadding:"p-0",children:Jn(t)}))),qn=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in Xn))return null;const l=Xn[t];return p("div",{children:[e?.calculatorBlock?.title?u(T,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,u(l,{...e.calculatorBlock,isMobile:!0})]})},Jn=e=>{if(!e||!e.length)return null;return 1===e.length?u(S,{children:qn(e[0])}):e.map(((e,t)=>u(Ul,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(Hl,{isUnfolded:t,children:u(S,{children:qn(e)})}),renderFoldButton:Yn(e)},t.toString())))},Yn=e=>({isUnfolded:t,onToggle:l})=>p("button",{onClick:l,className:"w-full p-xl bg-primary-main flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(Ae,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(he,{align:"text-left",color:"text-white",children:e.nav?.title}),u(he,{align:"text-left",size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(Ae,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]}),Qn=x((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=ht(e,{normalize:(e=a)=>l&&n?String(ut(Number(Zn(e)),l,n)):Zn(e),format:pt(r)}),c=i((e=>t&&t(Zn(e))),[t]);return u(xe,{onChange:c,...s,...o})})),Zn=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),ea=x((e=>u(Qn,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(he,{size:"text-xl",font:"font-light",children:"₽"})})}))),ta={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},la={amount:1500,_amount:1500},na=x((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,formType:i="private",...r})=>{const[{amount:s,_amount:o},{field:c}]=R(la),d=s<=0,m=d?re({version:a?.version}):se({className:"text-white",version:a?.version}),h=Y();return p(S,{className:w("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?u(T,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:ta[i],children:[u(ea,{name:"_amount",valid:!d,placeholder:n,label:l,...c("_amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:o}),a?.text?u("button",{type:"submit",className:w("w-full p-m mt-lg",m),disabled:d,...h(a),children:a.text}):null]})]})})),aa=(e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},ia=x((({className:e,disabled:t,...l})=>u(oe,{rounded:!0,className:w("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,...l,children:u(Ot,{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"})}))),ra=x((e=>u(ia,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),sa=x((e=>u(ia,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),oa="absolute top-[calc(50%-24px)] z-40",ca="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",da=x((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,x=a?t<l-1:c,g=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[ma(e),h?u(ra,{className:w(oa,n?"left-1 @lg:left-8":"left-0"),onClick:g}):null,x?u(sa,{className:w(oa,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),ma=e=>p("div",{children:[e.canScrollLeft?u("div",{className:w(ca,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:w(ca,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),ha=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),ua=[];function pa(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=ha,blocksRegistry:r={},ancestors:s=ua}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:w(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const xa=[],ga=(e,{key:t,ancestors:l=xa,slotName:n=null,extraProps:a,renderProps:i=pa,...r})=>{const s=a?(e,t)=>pa(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||xa,[r.parent,n]]:l},a)))};function fa({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?ga(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const ba=({className:e,text:t="ХИТ"}={})=>p("div",{className:w("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[u(Ae,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(me,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),ya="relative h-full",va={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},Na=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(Sa);return fa({...n,renderProps:(n,a,r)=>p("div",{className:wa(n,{someCardsHighlighted:i}),children:[pa(n,a,{className:ka(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Sa(n)?ba({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},wa=(e,{someCardsHighlighted:t})=>w(ya,t&&(Sa(e)?"pt-3xl":"pt-3xl sm:pt-16")),ka=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>w(ya,"min-w-80",va[n],t&&(Sa(e)?"pt-3xl sm:pt-16":"pt-3xl"),l&&"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider"),Sa=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Ca=x((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...o})=>{const{blocks:c=[]}=o.block||{},d=t||c?.length,[m,{inc:h,dec:x}]=aa({itemCount:d,visibleItemCount:l},Math.floor(l/2)),[g,f]=Dl({itemCount:d}),[b]=f.visibleIndicesRange,y=c&&"CarouselBankHistoryCard"===c[0]?.type;return p(S,{className:e,defaultPadding:"p-6xl",...o,children:[p("div",{className:w(a?"flex justify-center":"","relative max-w-full"),children:[u(Sl,{containerRef:g,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:Na({noCardBorder:n,activeIndex:m,cardSize:s,...o})}),u(da,{scroll:f,arrowsPadded:i,onScrollLeft:x,onScrollRight:h,hasEdgeBlocks:y,activeIndex:m,itemCount:d})]}),u(Rl,{className:"@5xl:hidden",containerRef:g,activeIndex:b,dotCount:d,listType:"horizontal-list"})]})}));Ca.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","ProductBlock"],Ca.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const Ia=x((({title:e,description:t,className:l})=>u(S,{className:l,defaultPadding:"p-6xl",children:u(gl,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),Ta="z-10 border border-solid w-full h-full",Ba=w(Ta,"absolute hidden @xl:block border-transparent"),Ra=x((({className:e,title:t,description:l,button:n,...a})=>u(S,{className:w("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative",children:[u("div",{className:w(Ba,"top-9 right-12 bg-green-dark")}),u("div",{className:w(Ba,"top-6 right-8 bg-green")}),u("div",{className:w(Ba,"top-3 right-4 bg-green-light")}),p("div",{className:w(Ta,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-light"),children:[u(gl,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),dl([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Ma={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Pa=x((({className:e,defaultPadding:t,padding:l,title:n="",insetTitle:a="",buttons:i,leftImage:r,rightImage:s,imageAlign:o,isImageAlwaysOnRight:c=!1,isImageSecondary:d=!1,children:m})=>p("div",{className:w("relative flex flex-col gap-3xl overflow-hidden",l||t,e),children:[n?u("div",{className:"relative",children:n}):null,p("div",{className:w("grow relative flex flex-col @md:flex-row gap-3xl",r?"self-start":""),children:[Aa(r,{imageAlign:o,className:"m-auto"}),p("div",{className:w("grid gap-3xl",s?"@xl:grid-cols-2":"",r?"":"grow"),children:[p("div",{className:"grow space-y-lg min-w-fit",children:[a,m]}),Aa(s,{className:w("@xl:justify-self-end @xl:col-start-2",i?Va(c):"",_a(c),ja(d)),imageAlign:o}),za(i)]})]})]}))),Va=e=>e?"row-span-2":"@xl:row-span-2",_a=e=>e?"justify-self-end col-start-2 self-center":"",za=e=>e?u("div",{className:"self-end",children:e}):null,Aa=(e,{className:t,imageAlign:l})=>e?u("div",{className:w("shrink-1/2 justify-self-center",l&&Ma[l],t),children:e}):null,ja=e=>e?"hidden @md:block":"",Da={black:"bg-black",white:"bg-white"},Ea=x((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:o,...c})=>u(S,{className:w("flex flex-col justify-left",e),defaultPadding:"p-2xl",...c,children:p(Pa,{className:"h-full",padding:o,title:t||l?u(gl,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}):null,rightImage:n?.src?u(Ot,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:dl([i],{buttonClassName:"w-full self-end"}),children:[r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(he,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Oa)]}):null,a?p(he,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Oa=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Da[e]}`},String(t)),La="hidden xl:block absolute w-full h-full border border-white",Fa=x((({text:e,href:t="",target:l="",className:n=""})=>{const a=Y()({href:t,target:l});return e?u("div",{className:w("flex relative group/link pl-s pb-s min-w-[16rem] xl:min-w-[20rem]",n),children:p("div",{className:"relative min-h-16 w-full",children:[p("a",{className:w("absolute border\n bg-white flex justify-between group-hover/link:text-primary-main","sm:rounded-md rounded-none w-full px-xl py-lg whitespace-nowrap z-10"),role:"link",...a,children:[u(he,{size:"text-l",font:"font-light",color:"text-primary-text",children:e}),u(Ot,{className:"group-hover/link:brightness-100 hidden xl:block ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main hidden xl:block",width:"24",height:"24"})]}),u("div",{className:w(La,"-bottom-1.5 -left-1.5")}),u("div",{className:w(La,"-bottom-3 -left-3")})]})}):null})),$a=x((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>u(S,{className:w("overflow-hidden",e),...i,children:p("div",{className:"flex flex-col @6xl:flex-row gap-m",children:[p("div",{children:[u(gl,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),t?u(gl,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0}):null]}),n?.length?Ua(n,"@6xl:min-w-[672px] p-0 justify-self-end"):null]})}))),Ua=(e,t="")=>{const l=Math.ceil(e.length/3);return u(Ca,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",children:new Array(l).fill(null).map(((t,l)=>u("div",{className:w("flex flex-wrap gap-2xs self-start xl:justify-center @5xl:grid @5xl:grid-cols-2"),children:e.slice(3*l,3*(l+1)).map(((e,t)=>u(Fa,{...e},String(t))))},String(l))))})},Ha=x((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=Y({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?i:{},children:a})})),Wa={L:"w-1.5 h-1.5 mr-m",M:"w-1.5 h-1.5 mr-s",S:"w-1 h-1 mr-xs",XS:"w-1 h-1 mr-xs"},Ka=x((({className:e,isDotted:t=!0,children:l,size:n="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",Wa[n])})}):null,u("span",{children:l})]}))),Xa={XS:"text-m font-light",S:"text-l font-light",M:"text-h6",L:"text-h5"},Ga={XS:"ml-2xs",S:"ml-xs",M:"ml-s",L:"ml-m"},qa=x((({className:e,hasIndent:t,isDotted:l,items:n,listItemSize:a="M"})=>n?.length?u("section",{className:w("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",Xa[a],t?Ga[a]:"",e),role:"list",children:n.map(((e,t)=>u(Ka,{isDotted:l,size:a,children:e},String(t))))}):null)),Ja=x((({additionalDescription:e,align:t="text-left",button:l={},className:n="",description:a,headlineSmallVersion:i="H6",href:r,icon:s,isDotted:o=!0,isButtonFullWidth:c=!0,isImageFullWidth:d=!1,isTopPosition:m=!1,items:h=[],target:u,title:x,version:g="primary",...f})=>p(S,{className:w("flex flex-col justify-between",n),defaultPadding:"p-0",version:g,...f,children:[p(Ha,{className:"p-m flex flex-col gap-xs",href:r,target:u,children:[Qa(i,x,t),Za(a,t),ti(h,o,g),ei(e,t),Ya(s,d,m)]}),dl([l],{className:w("p-m pt-0",c?"":"self-center"),isVertical:c})]}))),Ya=(e,t,l)=>p("div",{className:w("flex gap-y-lg justify-center",t?"min-w-full h-full":"",l?"order-first":"order-last"),children:[e?.src?u(Ot,{image:e}):null,e?.icon?u(Ot,{className:w(t?"w-full h-full":"w-8 h-8 min-w-8"),image:e}):null]}),Qa=(e,t,l)=>t?u(he,{align:l,size:xl[e],children:t}):null,Za=(e,t)=>e?u(me,{align:t,size:"text-l",children:e}):null,ei=(e,t)=>e?u(he,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,ti=(e,t,l="primary")=>e?.length?u(qa,{className:w("text-s","primary"===l?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,listItemSize:"S"}):null,li=(e=[])=>e.reduce(((e,t)=>e+t),0),ni=(e=[])=>e?.length?li(e)/e.length:0,ai=(e,t="normal")=>e?u("div",{className:w("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:u(Ot,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,ii=x((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?u("div",{className:w(l,"md-container"),dangerouslySetInnerHTML:{__html:t}}):null})),ri=(e,t)=>e?u(me,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,si=(e,t)=>e?u(he,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,oi=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(ii,{...e},`rte-${t}`):["label"in e?si(e.label,t):null,"description"in e?u("span",{className:e.descriptionClassName,children:ri(e.description,t)},String(t)):null],ci=x((({className:e,benefitsVersion:t,...l})=>p("div",{className:w("flex gap-m min-w-56","description"in l&&l.description?"items-start":"items-center",e),children:["icon"in l?ai(l.icon,t):null,u("div",{children:oi(l)})]}))),di=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),mi=e=>{return((t=e.map(di))?.length?Math.sqrt(Math.abs(ni(t.map((e=>e**2)))-ni(t)**2)):0)>16;var t},hi=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),ui=e=>!e.some(hi),pi=x((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:w("flex gap-x-m gap-y-s",mi(l)||ui(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(ci,{benefitsVersion:t,...e},String(l))))}):null)),xi=x((({className:e,benefits:t})=>t?.length?u("div",{className:w("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(oi)}):null)),gi=x((({isTabularBenefits:e,...t})=>u(e?xi:pi,{...t}))),fi=x((({className:e,tags:t})=>t?.length?u("div",{className:w("flex flex-wrap gap-xs",e),role:"list",children:t.map(bi)}):null)),bi=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(he,{size:"text-m",font:"font-light",children:e})},String(t)),yi=x((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m,items:h,isDotted:x=!0,listItemSize:g,tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},children:S})=>{const C=y?.src?u(Ot,{image:y}):null,I=wi({title:n,description:a,headlineVersion:i,align:r}),T=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(Pa,{className:e,padding:t,defaultPadding:l,...m?{title:I}:{insetTitle:I},...vi(C,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:dl(b),children:p("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[T?.length?u(gi,{benefitsVersion:s,isTabularBenefits:o,benefits:T}):null,d?u(ii,{__html:d}):null,h?.length?u(qa,{items:h,isDotted:x,listItemSize:g}):null,S,Ni(f)]})})})),vi=(e,t)=>t?{rightImage:e}:{leftImage:e},Ni=e=>e?.length?u(fi,{tags:e}):null,wi=({title:e,description:t,headlineVersion:l,align:n})=>e||t?u(gl,{title:e,description:t,headlineVersion:l,align:n,isEmbedded:!0}):null,ki=[{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:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}}],Si=e=>ki.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},Ci=x((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,o]=n(),c=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=Si(t),c=cl(n)?n:r,d=l?{text:a}:{text:""};return!s&&a&&o(!0),{...e,...d,icon:{...c,iconVersion:"color"},version:i}})),d=w("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":" basis-auto",a?"flex-1 justify-center":"");return p("div",{className:"flex flex-col sm:flex-col-reverse gap-xs",children:[r?u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null,u("div",{className:w("flex gap-xs",e),children:dl(c,{className:a?"w-full":"",buttonClassName:d})})]})})),Ii=x((({className:e,padding:t,description:l,href:n,icon:a,items:i=[],listItemSize:r="S",socialMedia:s=[],target:o,title:c,align:d="text-left",benefits:m,imageOptions:{directionRight:h=!0,isImageAlwaysOnRight:x=false,isImageSecondary:g=!1}={},...f})=>u(S,{className:w("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...f,children:u(Ha,{href:n,target:o,className:"h-full",children:p(Pa,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:c?u(gl,{title:c,description:l,headlineVersion:"S",isEmbedded:!0,align:d}):null,...vi(cl(a)?u(Ot,{image:a}):null,h),buttons:s.length?u(Ci,{media:s,showButtonText:!0,version:f?.version}):null,isImageAlwaysOnRight:x,isImageSecondary:g,children:[u(gi,{benefits:m}),u(qa,{items:i,listItemSize:r})]})})}))),Ti=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(he,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(he,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:dl(a)}):null]},String(t))},Bi=x((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(Ti),o=s.slice(0,1),c=s.slice(1);return p(S,{className:w("flex flex-col",e),defaultPadding:"p-3xl",...r,children:[cl(n)?u("div",{className:"self-center",children:u(Ot,{image:n})}):null,t?u(T,{className:w("pt-xs",l),headingType:"h5",title:t}):null,a?u(oe,{className:"w-full mt-m",...a}):null,i.length?u(Ul,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(Hl,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?Ri:null}):null]})})),Ri=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(Ae,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Mi=(e=!1)=>e?"text-white":"",Pi=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),Vi=x((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(Ot,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(Ot,{image:t})}),l?u(T,{headingType:"h4",className:Mi(a),title:l}):null,n?u("div",{className:Pi(a),children:n}):null]}))),_i=x((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:w("h-full","border-main-divider border-b"),children:e.map(zi(l,t))})}))),zi=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:w("text-right",e?"text-white":""),children:l}):null,n?u("div",{className:w("text-right",e?"text-white/80":"text-secondary-text"),children:n}):null]})]},String(a)),Ai=x((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:w("border border-gray rounded-md p-m mb-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),role:"row",children:[u(Vi,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(_i,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(oe,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,ji({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),ji=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:l?"Скрыть":"Показать описание"})}),Di=x((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(T,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(Ei,{...e})})]})})),Ei=x((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(Ai,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(El,{onVisibleIndicesChange:m,children:h}):h})),Oi=x((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>p(l,{tag:l,className:w("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?u("div",{children:e}):null,t?u("div",{children:t}):null]}))),Li=x((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>u(Oi,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:w("py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:u("span",{className:"text-h4 pr-s",children:t}),iconNode:l?u(Ot,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Fi=({isUnfolded:e,onToggle:t})=>u(Li,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),$i=x((({title:e,description:t})=>p("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[u(Ot,{image:{icon:"MagnifierIcon"},width:"120",height:"120"}),u(gl,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:tl})]}))),Ui=["ArrowDownIcon","ArrowUpIcon"],Hi="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",Wi=x((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return p("div",{children:[u("div",{className:w(t.length?"hidden":"block"),children:a?u($i,{...a}):null}),p("div",{className:w("space-y-2xs",t.length?"":"hidden"),children:[u("div",{className:w(Hi),children:ga(r,{...i.options,parent:n})}),u(Ul,{renderFoldableSection:({isUnfolded:e})=>u(Hl,{className:w(Hi),isUnfolded:e,children:ga(s,{...i.options,parent:n})}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(Li,{className:w(l<1?"hidden":""),disabled:!s?.length,label:e,icon:Ui[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),Ki=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Xi=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>Ki(t[e])||Ki(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>Ki(t[e])||Ki(l[e])||Gi(t[e])<=Gi(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>Ki(t[e])||Ki(l[e])||Gi(t[e]?.min)>=Gi(l[e]?.min)&&Gi(t[e]?.min)<=Gi(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>Ki(t[e])||Ki(l[e])||t[e]?.some((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>Ki(t[e])||Ki(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),Gi=e=>Number(e||0),qi=(e,t)=>(l=B)=>e&&e.filter((e=>Xi(t,l(e.content||{})))),Ji=x((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(Je,{text:l.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(t)if(n){const n=e?.includes(l);t(n?(e||[]).filter((e=>e!==l)):[...e||[],l])}else t(e===l?"":l)})(l.value),type:n?"checkbox":"radio"},l.value))))),Yi=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(Qi(e))]}),n?u("div",{children:u(oe,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,...n})}):null]}),Qi=e=>([t,l])=>{const n=l?.type;return"array"===n?Zi(t,e)(l):null},Zi=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(Ji,{items:n,multiple:!0,...t(e)})]},e)},er=(e,t)=>e[t?.sourceBook]?.rateRows.map((e=>e.minMonths)).filter((e=>void 0!==e));async function tr(...e){const t=e.map((e=>D(e)));return Promise.all(t)}function lr(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const nr=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function ar(e){const{dirs:t=[],source:l=[]}=r((()=>{const t=(e=>e?.filter(nr).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=A(t,tr);return{source:Object.fromEntries(lr(l,n).filter((([,e])=>Boolean(e)))),months:(a=n.flatMap((e=>e?.rateRows||[])).filter((e=>"number"==typeof e.minMonths&&e.minMonths===e.maxMonths)).map((e=>e.minMonths)),[...new Set(a)]).sort(((e,t)=>e-t))||[]};var a}const ir=1e9,rr={sum:{min:1e4,max:ir},period:3},sr=x((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=ar(i.block?.blocks),[o,{field:c,reset:d}]=R(rr),m=qi(i.block?.blocks,o)((e=>({...e,period:er(r,e||{})||[]}))),h=p("div",{children:[u(ea,{label:n?.title,min:500,max:ir,...c("sum",{parse:e=>({min:Number(e),max:ir}),format:({min:e})=>String(e)})}),u(yt,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...c("period")})]});return p(S,{className:w("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[Yi({field:c,reset:d,filtrationSchema:t,resetButton:l,children:h}),u(Wi,{blocksToRender:m,...i})]})})),or={type:"string",title:"Адрес справочника"};sr.childrenTypes=["ProductTile"],sr.childSchema=e=>({...e?.filtrationSchema||{},sourceBook:or});const cr=e=>"Image"===e?.contentType&&e?.image?u(Ot,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,dr=x((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(S,{className:w("flex flex-col justify-center items-center",e),defaultPadding:w("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:cr(n)}),u(gl,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?u(oe,{version:a?.version,text:a?.text,...a}):null]})));var mr;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(mr||(mr={}));const hr=new Intl.NumberFormat("ru",{style:"currency",currency:mr.RUB}),ur=e=>e?hr.format(e):"",pr="text-left text-m font-light text-secondary-text",xr=`${pr} pl-5xl`,gr={USD:"DollarIcon",EUR:"EuroIcon"},fr=x((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:pr,children:u(he,{size:"text-m",children:"Валюта"})}),u("th",{className:xr,children:u(he,{size:"text-m",children:"Купить"})}),u("th",{className:xr,children:u(he,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(br)})]}))),br=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(Ot,{image:{icon:gr[t]},width:"24",height:"24"}):null,u(he,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(he,{size:"text-h6",children:ur(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(he,{size:"text-h6",children:ur(e?.buyExchangeRate)})})]},t)},yr={icon:"GpsIcon"},vr=x((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(nl,{...yr,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),Nr=(e,t,l)=>{const n=Number(wr(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},wr=e=>e.replace(/[^\d.,]/g,"").replace(",","."),kr=e=>{return(t=[[e=>e.value!==mr.RUB&&e.oppositeValue!==mr.RUB,()=>e.handleConvert(e.value,mr.RUB)],[e=>e.value===mr.RUB&&e.oppositeValue===mr.RUB,()=>e.handleConvert(e.value,mr.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Sr(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(xe,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(He,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const Cr=x((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||mr.RUB,selectBuy:l?.[0]?.currency?.currency||mr.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Sr({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Ir(r,o,l),value:r.inputSell,setValue:e=>Br(o,l)(e,r.selectSell,r.selectBuy)}),Sr({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Tr(r,o,t),value:r.inputBuy,setValue:e=>Rr(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(oe,{text:a.text,version:a?.version,...a}):null]})})),Ir=(e,t,l)=>n=>{t({selectSell:n}),kr({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Br(t,l)(e.inputSell,n,a)}})},Tr=(e,t,l)=>n=>{t({selectBuy:n}),kr({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Rr(t,l)(e.inputBuy,n,a)})},Br=(e,t)=>(l,n,a)=>{e({inputSell:wr(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Nr(l,i,n===mr.RUB)||"")})},Rr=(e,t)=>(l,n,a)=>{e({inputBuy:wr(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Nr(l,i,n===mr.RUB)||"")})};const Mr=async e=>{const t=await Pr(),l=t?.code||"000";return{region:t,exchangeRates:await Vr(e,l)}},Pr=async()=>{try{return await E("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},Vr=async(e,t)=>{try{return await E(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},_r=x((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:a}=function(){const{data:e}=A("/api/v1/exchangerates",Mr);return e||{}}(),i=zr(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:mr.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:mr.RUB}}),u(S,{className:w("box-border min-h-80",e),...n,children:u(Pa,{className:"h-full",title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[i?u(fr,{className:"mb-xl",exchangeCurrencyItems:i}):null,u(vr,{address:a?.address})]}),i.length&&r.length&&s.length?u(Cr,{className:"grow",currencyRatesBuy:r,currencyRatesSell:s,button:l}):null]})})})})),zr=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Ar=e=>Vt(d.SITEMAP||"sitemap",{fallback:e}),jr=()=>{const e=globalThis.document?.cookie.split(";")??[];for(const t of e){const[e]=t.split("=");globalThis.document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}},Dr=(e,t)=>u(nl,{...e,iconBgVersion:t,className:"shrink-0"}),Er=x((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>u(Oi,{tag:"button",className:w("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Dr(a,t),e?u(he,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?u(Ae,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),Or=x((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,version:r="primary",...s})=>u(S,{className:w("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...s,children:u(Ul,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(Hl,{className:w("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:fa({...s,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Lr({version:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));Or.childrenTypes={exclude:["RollupItem"]};const Lr=({version:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=(e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"primary"===e?u(Er,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):u(Li,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Fr=x((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map($r):null,u(oe,{version:"primary",className:"w-full",href:"https://old.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),$r=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(he,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(Ur)})]},String(t)),Ur=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:Hr(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),Hr=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Wr(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},Wr=e=>e.replaceAll(/\D/g,""),Kr=x((({className:e="",index:t,text:l,...n})=>{const a=Y(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),Xr=x((({title:e,links:t,className:l=""})=>p("div",{className:l,children:[u(he,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>u(Kr,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),Gr=x((({className:e="",items:t,basePath:l})=>t?.length?u("ul",{className:w("flex flex-col",e),children:t.map(qr(l))}):null)),qr=e=>(t,l)=>{const{text:n,...a}=t,i=Y({isRemote:!(!d.BASE_PATH||!e)&&!d.BASE_PATH.startsWith(e),basePath:e}),{href:r,target:s,onClick:o}=i(a);return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",href:r,target:s||"_self",onClick:o,children:n||null})},`list_item_${String(l)}`)},Jr=x((({className:e="",index:t,...l})=>{const n=Y({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),Yr=x((({className:e="",links:t})=>p("div",{className:w("@container",e),children:[u("div",{className:"pt-lg",children:u(he,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(Jr,{index:t,...e},String(t))))}):null]}))),Qr=x((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=Ar(l),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:c,documents:m}=Vt(d.FOOTER||"footer",{fallback:l});return p(S,{tag:"footer",className:e,defaultPadding:"p-4xl pb-24",...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(Or,{label:e?.text,labelIcon:e?.icon,children:u(Gr,{items:e.items,basePath:o(e.href)})},String(t))))}),u(Fr,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(Ci,{className:"mb-xl",media:r,stretched:!0,children:"Соцсети"}),u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"}),u("div",{className:"mt-xs",children:s?.map(Zr)})]}),u("div",{className:"py-lg border-t border-main-divider",children:u(Kr,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:jr})}),u(Xr,{className:"py-lg border-y border-main-divider",title:c,links:a}),u(Yr,{links:m})]})})),Zr=({href:e="/",text:t},l)=>{const{label:n}=Si(e);return u(oe,{className:"w-full mb-lg",text:t||n,version:"secondary",href:e,target:"_blank"},String(l))},es={width:"34",height:"34"},ts={"bg-white":"color",transparent:"white"},ls={"bg-white":"text-primary-main",transparent:"text-white"},ns=(e,t,l)=>u(Ot,t?.src?{image:t,className:ls[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:ts[e]},className:ls[e],width:l?.width,height:l?.height}),as={"bg-white":"text-primary-text",transparent:"text-white"},is=x((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:w("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[ns(i,l?.image,es),r?n??u("div",{className:"ml-s",children:u(he,{font:"font-medium",color:as[i],size:"text-s",children:l?.title||"Россельхозбанк"})}):null]}))),rs={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},ss=x((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=J(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u("div",{children:u(is,{className:"my-2xs",bgColor:e,logo:t})}):os(s),l?u("div",{children:u(oe,{href:l,ariaLabel:"Войти",target:"_blank",className:w("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",rs["transparent"===n?"transparent":"default"]),children:"Войти"})}):null]})})),os=e=>u("div",{children:p("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(Ot,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),cs={"bg-white":"primary",transparent:"transparent"},ds=x((({bgColor:e="bg-white",version:t=cs[e],...l})=>{const{logo:n}=Ar(l.options?.page?.fallback),{internetBankUrl:a}=Vt(d.PORTAL_DATA||"portal-data",{folderName:"portal-resources",setBasePath:!0});return u(S,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(ss,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),ms={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},hs=x((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,...r})=>u(S,{className:w("relative flex flex-col",ms[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...r,children:fa({...r,extraProps:{className:"w-full",padding:n?"":"p-0"}})})));hs.childrenTypes=[];const us=x((e=>u(hs,{...e})));us.childrenTypes=[];const ps=x((e=>{const{className:t,image:l,...n}=e;return u(S,{className:t,defaultPadding:"p-0",...n,children:u(Ot,{image:l})})})),xs=["байт","Кб","Мб","Гб","Тб","Пб"],gs=x((({icon:e,text:t,fileSize:l,...n})=>p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",...n,children:[e,t?p(he,{size:"text-l",font:"font-light",children:[t,u(he,{color:"text-secondary-text",children:n?.href&&fs(bs(n.href),l)})]}):null]}))),fs=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),bs=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},ys={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},vs=x((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=J();return p(S,{className:w("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(gl,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:w("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",ys[r]),role:"list",children:a.map(Ns(o,r,i))}):null]})})),Ns=(e,t,l)=>(t,n)=>{const a="Attachment"===t?.docType?X(e)(t?.attachment?.src):t?.href,i="Attachment"===t?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${xs[l]}`})(t?.attachment?.fileSize||0):t?.fileSize;return u("div",{role:"listitem",children:u(gs,{text:t?.text,target:t?.target,href:a,fileSize:i,icon:l?u(Ot,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:l,width:"24",height:"24"}):null})},String(n))},ws=(e,t)=>e?.length?u(qa,{items:e,listItemSize:t,className:"text-l font-light"}):u("span",{className:"text-m font-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),ks=x((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,headingType:i="h4",image:r,items:s,listItemSize:o,qr:c,title:d="Мобильное приложение",version:m="primary",...h})=>{const x="secondary"===m?"p-m min-w-32":"min-w-24",g=r?.src?u(Ot,{className:"hidden lg:block",image:r}):null;return u(S,{className:w("min-h-80",e),padding:"p-0",version:m,...h,children:p(Pa,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:d?u(T,{headingType:i,title:d,className:w("whitespace-pre-wrap",l)}):null,rightImage:g,buttons:dl(n,{className:"flex-wrap"}),children:[a?u(he,{size:"text-xl","font-weight":"font-light",children:a}):null,p("div",{className:w("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[ws(s,o),c?.src?u("div",{className:w("flex justify-center bg-white rounded-md @xl:-order-1",x),children:u(Ot,{className:"w-fit",image:c})}):null,r?.src?u(Ot,{className:"lg:hidden",image:r}):null]})]})})})),Ss={primary:"bg-white/30",secondary:"bg-main-divider"},Cs={primary:"text-white",secondary:"text-secondary-text"},Is=x((({count:e,version:t="secondary"})=>u("div",{className:w("w-6 h-6 rounded-full flex items-center justify-center",Ss[t]),children:u(he,{size:"text-xs",color:Cs[t],children:e})}))),Ts=(e=[],t={})=>e.filter((({content:e={}})=>Xi(t,e))).length,Bs=(e,t)=>e===t;const Rs=(Ms=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Bs,((e=Bs)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Ms(l,t[e])))));var Ms;const Ps=[],Vs={},_s={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},zs={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},As={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},js={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Ds=x((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:w("h-12","block flex-1","cursor-pointer",_s[n],l?js[n]:As[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:w("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?zs[n]:"text-secondary-text hover:text-primary-main"),children:[u(he,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),Es=x((e=>u(e?.item?.href?Os:Ls,{...e}))),Os=x((e=>{const t=Y(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(Ds,{...e,tag:"a",item:a,onClick:n})})),Ls=x((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(Ds,{item:e,onClick:n,...l})})),Fs=(e,t,l)=>(n,a)=>u(Es,{isActive:n===e,onClick:t,type:l,item:n},String(a)),$s=x((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:w("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(Fs(n,a,t))}))),Us={categories:[],extraOptions:[],propertyType:[],stage:[]},Hs=x((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:o,reset:c,update:d}]=R(Us),m=qi(a.block?.blocks,s)(),h=i(((e=Us)=>d(e)),[]),x=(({hotFilters:e=Ps,filtrationState:t=Vs,blocks:l=Ps,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Rs(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:u(Is,{version:t===e[a]?"primary":"secondary",count:Ts(l,t.filter)})})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:h});return p(S,{className:w("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u($s,{...x}),Yi({field:o,reset:c,filtrationSchema:l,resetButton:n}),u(Wi,{blocksToRender:m,...a})]})}));Hs.childrenTypes=["ProductTile"],Hs.childSchema=e=>e?.filtrationSchema||{};const Ws=(e,t)=>e||t?p("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:[Number(e)>0?Ks("Страховая сумма",e):null,Number(t)>0?Ks("Ежемесячный лимит",t):null]}):null,Ks=(e,t=0)=>p("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",children:[u(he,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),p("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[pt(2)(t)," ₽"]})]}),Xs=x((({className:e,padding:t,headlineVersion:l="M",align:n="text-center",sum:a,monthLimit:i,imageOptions:r,...s})=>u(S,{className:e,padding:"p-0",...s,children:u(yi,{className:"h-full",defaultPadding:"p-6xl",padding:t,headlineVersion:l,align:n,isFullWidthTitle:!0,imageOptions:{directionRight:!1,imageAlign:"center",...r},...s,children:Ws(Number(a),Number(i))})}))),Gs=x((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(S,{className:w("box-border",e),...n,children:[u(gl,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:qs()})]}))),qs=(e=3)=>Ys(100,e).map((e=>Math.floor(e))).map(Js),Js=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),Ys=(e,t)=>[e].concat(t>0?Ys(e/1.618,t-1):[]);function Qs(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"hidden sm:flex items-center gap-s",children:[u("div",{className:se({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(Ot,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(oe,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const Zs=x((({className:e,padding:t,backwardButton:l,showBorder:n,...a})=>{const r=J(),s=i((e=>{e?.preventDefault(),r.back()}),[]);return p(S,{className:w("overflow-hidden flex flex-col gap-3xl box-border",n?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",e),defaultPadding:"p-6xl",padding:t,...a,children:[l?Qs(a.version&&"primary"!==a.version?"white":"primary",s):null,u(yi,{className:"grow h-full",...a})]})})),eo=x((({className:e,padding:t,slides:l=[],...n})=>u(S,{className:w("overflow-hidden relative",e),padding:t,...n,children:u(El,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",role:"listitem",children:u(yi,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),to=x((({className:e,padding:t,headlineVersion:l="S",isTabularBenefits:n=!0,additionalDescription:a,imageOptions:i,isFullWidthTitle:r=!0,...s})=>u(S,{className:e,padding:"p-0",...s,children:u(yi,{className:"h-full",defaultPadding:"p-4xl sm:p-xl",padding:t,headlineVersion:l,isTabularBenefits:n,imageOptions:{isImageSecondary:!0,...i},isFullWidthTitle:r,...s,children:a?u(me,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:a}):null})}))),lo=x((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(S,{className:w("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[cl(r)?u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:u(Ot,{image:r})}):null,s?u(T,{headingType:"h3",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?no(i):null,ao({label:"Адрес",data:e,iconName:"GeolocationIcon"}),ao({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),ao({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?dl([n]):null]})]}))),no=e=>u("div",{className:"border-b border-main-divider pb-lg",children:u(ii,{__html:e})}),ao=({label:e,data:t,iconName:l,dataColor:n=""})=>t?p("div",{className:"flex gap-s",children:[u(Ae,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col gap-2xs",children:[u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),u(he,{size:"text-xl",color:n,children:t})]})]}):null,io=x((e=>{const{__html:t,richVersion:l,...n}=e;return u(S,{defaultPadding:"p-0",...n,children:u(ii,{__html:t,richVersion:l})})}));function ro(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const so={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},oo=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(so).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),co={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},mo=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(co).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(Ae,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),ho=e=>globalThis[e];const uo=()=>function(e,t){const[l,r]=n(),s=i((()=>r(ho(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!ho(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),po={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},xo=x((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(po).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(Ae,{name:l,width:"20",height:"16"})})})),go={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},fo=[55.753995,37.614069],bo=x((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=uo(),[o,c]=n(),d=e?yo(e):fo;if(a((()=>{i?.current||r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:d,zoom:l,controls:[],suppressMapOpenBlock:!0}),ro(r,i.current,e))})),i.current&&r&&(ro(r,i.current,e),e?.length||i.current.setCenter(fo))}),[r,i,e,d,l]),!r)return null;const m=o?"z-[100000]":"z-10";return p("div",{id:"map",className:w(!o&&"relative","w-full",t),children:[u("div",{className:w("absolute flex left-2 top-4 w-1/2",m),children:oo(d)}),u("div",{className:w(Object.values(go),m,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;o?e.exitFullscreen():e.enterFullscreen(),c(e.isFullscreen())},children:u(Ae,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:w("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",m),children:[u(xo,{yandexMaps:i}),u(xo,{yandexMaps:i,direction:"out"})]}),mo(i.current,r,w("right-2 top-80",m))]})})),yo=e=>[No(vo(e,0)),No(vo(e,1))],vo=(e,t)=>e.map((e=>e[t])),No=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,wo=x((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:w("order-4",e),children:[u(Lt,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(Lt,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),ko=x((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(He,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),So=x((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(ko,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(ko,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Co=["От 1 дня","До 365 дней"],Io=x((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(he,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(yt,{min:1,max:365,value:e,items:Co,onChange:t})]}))),To=x((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(ko,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(ko,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Bo=x((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents @xl:block flex-1 space-y-xl",children:[u(So,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Ro(c)}),u(Io,{days:a,setDays:e=>c({days:e})}),u(To,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:Mo(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents @md:flex justify-between items-center gap-m",children:[u(wo,{}),u(oe,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),Ro=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Mo=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Po=x((({days:e,tariffs:t=[]})=>{const l=_o(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[p("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:[Vo("Аренда за",e),Vo("Цена",l+" ₽")]}),u("span",{className:"@xl:hidden order-3 mb-xs text-s font-light text-secondary-text",children:n}),p("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:[u(Ot,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),u("span",{className:"hidden @xl:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),Vo=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),_o=(e,t)=>{const l=zo(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},zo=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},Ao=(e,t)=>e.find((e=>e.branchCode===t)),jo=x((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Ao(n,l.selectedBranch),o=Do(s?.safeBoxCaseVolumes),c=Eo(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Oo(c,l.selectedBoxSize);return p("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[u(Bo,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(Po,{days:l.days,tariffs:d})]})})),Do=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Eo=(e,t)=>e?.find((e=>e.volume===t)),Oo=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Lo=[];const Fo=async e=>await D(e,{method:"GET"})||Lo,$o=x((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=L(),h=Uo(c.selectedRegion,m),x=function(e){const{data:t}=A(e?`/api/v1/safeboxes?regionCode=${e}`:null,Fo);return t||Lo}(h),g=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Ao(x,c.selectedBranch)||x,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(S,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(jo,{regions:m,branches:x,data:{...c,selectedRegion:h},onClick:o,onChange:g}),t?u(me,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(bo,{points:f,className:"h-[640px]"}):null]})})),Uo=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Ho(e){throw new Error(e)}const Wo={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Ko={normal:"",small:"min-h-6xl"},Xo={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"},Go=x((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",version:r="primary",...s})=>p(S,{className:w("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[u(gl,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(qo(i,r))})}):null,dl(a,{isVertical:!0})]}))),qo=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Jo(e,t)(l,n);case"rte":return u(ii,{__html:l.__html});default:Ho(l)}},Jo=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Yo(e,t)(l,n)}),p("div",{className:w("flex flex-col justify-center h-fit",Ko[e]),children:[l.label?u("div",{className:"text-l text-left",children:l.label}):null,l.description?u("div",{className:w("text-s font-light text-left",Xo.description),children:l.description}):null]})]})},String(n)),Yo=(e,t)=>(l,n)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",r=Boolean(l?.icon?.src),s=Wo[e][r?"image":"icon"];return u("div",{className:w(s,r?"":`rounded-md ${Xo.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex max-w-full max-h-full self-center text-h4 text-secondary-text group-data-secondary:text-white",children:cl(l?.icon)?u(Ot,{image:{...l.icon,iconVersion:l.icon?.iconVersion||i},imageClassName:"max-w-full max-h-full",width:a,height:a}):u("span",{children:n+1})})})},Qo=e=>({href:t})=>!!t&&H($(t)?e.href:e.pathname).startsWith(H(t));function Zo(e=[]){const t=J(),l=e.findIndex((e=>Qo(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(t));return[l,e[l]]}const ec=x((({isActive:e,item:t,onClick:l})=>{const n=Y({isRemote:!d?.BASE_PATH||!t.href?.startsWith(d?.BASE_PATH)}),{href:a,target:i,onClick:r}=n({href:t.href,target:"_self"}),s="BurgerIcon"===t?.icon?.icon?t.isActive:e,o=s?"color":"black";return p("a",{className:w(s?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:()=>"BurgerIcon"===t?.icon?.icon&&l?l():r(),href:a,target:i,children:[u(Ot,{className:"w-6 h-6",image:{icon:t?.icon?.icon,iconVersion:o}}),t.title]})})),tc=x((({menuItems:e,onClick:t})=>{const[l]=Zo(e);return u("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:e.map(((e,n)=>u(ec,{isActive:n===l,item:e,onClick:t},String(n))))})}));const lc=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>b.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Ho(e)}}))),[c,d]),l},nc="location";function ac(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(b,"location",rc()??{name:e}),r=i((e=>{sc(e),l(e)}),[]),{data:s}=A("/api/v1/region",E);return a((()=>{s&&!ic()&&l(s)}),[s]),[t??{name:e},r]}const ic=()=>Boolean(globalThis.localStorage?.getItem(nc)),rc=()=>{try{const e=globalThis.localStorage?.getItem(nc);return e&&JSON.parse(e)}catch(e){return null}},sc=e=>{try{globalThis.localStorage?.setItem(nc,JSON.stringify(e))}catch(e){}},oc=x((({className:e,onClose:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(Ot,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),cc=x((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=F(),r=i((()=>{a(),n&&n()}),[n]);return p("div",{className:w("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(oc,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})}));const dc=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=new Array(e.length),a=new Array(t.length);let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const mc=e=>e?.length?p("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>u(hc,{...e},String(t))))})]}):null,hc=x((({icon:e,...t})=>{const l=Y(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s items-center",children:[e?u(Ot,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:u(he,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),uc=e=>t=>u("div",{className:"mb-xs sm:mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:u(he,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),pc=x((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),xc=x((()=>{const{defaultLocation:e,foreignOffices:t}=Ar(),[l,a]=ac(e),[r,s]=n(""),o=fc(function(){const{data:e}=A("/api/v1/regions",E);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(o,gc),{close:d}=F(),m=i((e=>{a(e),d()}),[]);return p(cc,{className:"pb-20",head:p("div",{children:[u(he,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?p("div",{className:"mb-s",children:[u(he,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(l),children:u(he,{color:"text-primary-main",children:l.name})})]}):null,u(pc,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&dc(e.toLowerCase())(r.toLowerCase())>=.8)).map(uc(m))}):u("div",{className:"columns-1 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(he,{size:"text-h6",children:e})}),t.map(uc(h))]},e)))}),mc(t)]});var h})),gc=e=>e.name?.charAt(0)||"",fc=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),bc=x((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:w("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(Ot,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:w("h-12 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})}));function yc(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const vc=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},Nc=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),wc=e=>t=>e.map((([e,l])=>[dc(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>Sc(t,e))).reduce(vc(Math.max,0),new Map),kc=e=>t=>{return lr(t,t.map((({title:e})=>e)).map((e=>t=>{const l=Nc(t||"");return l.length?li(e.map((e=>Vl(l.map(dc(e)))))):0})(e))).sort((e=>(t,l)=>-e(t,l))((l=([,e])=>e,(e,t)=>l(e)-l(t)))).map((([e])=>e));var l},Sc=(e,t)=>new Map(e.map((e=>[e,t]))),Cc=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=A(e?.length?e:null,Ic),[s,o]=n(null);return yc((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=Nc(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(wc(i)).reduce(vc(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return kc(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},Ic=async(...e)=>(await Promise.allSettled(e.map((e=>D(W(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Tc=x((({className:e,topItems:t})=>{const l=Y({isRemote:!0});return u("div",{className:w("flex items-start justify-between",e),children:t?.map(l).map(Rc)})})),Bc=["all","footer"],Rc=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||Bc.includes(e.displayArea.toLowerCase())));return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>u(Mc,{...e,basePath:o(a),index:t},String(t))))]},String(t))},Mc=x((({text:e,index:t,basePath:l,...n})=>{const a=Y({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),Pc=x((({initialQuery:e})=>{const{topItems:t}=Ar(),l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,i]=Cc({basePathList:l,initialQuery:e}),s=r((()=>Vc(t)(n)),[t,n]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(cc,{head:u(bc,{autoFocus:!0,...i}),children:u(Tc,{topItems:s})})})),Vc=e=>t=>e?.length&&t?.length?lr(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:W("/",t)})))}))):[];const _c=x((({className:e})=>{const[t,l]=n(""),a=i((()=>l("")),[]),{open:r}=(()=>{const{open:e,close:t}=F();return{open:(t={},l={})=>e(u(Pc,{...t}),l),close:t}})(),s=i((e=>{l(e),zc(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:w("relative",e),children:[u(bc,{value:t,onChange:s}),u(oc,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),zc=e=>e&&e.length>=3,Ac=x((({item:e,basePath:t})=>{const l=Y({isRemote:!(!d.BASE_PATH||!t)&&!d.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=J(),s=Qo(r)({href:n});return p("a",{className:w(s?"text-primary-main":"text-primary-text","py-3 text-h5 font-light flex justify-between cursor-pointer"),href:n,target:a,onClick:i,children:[e.text,u(Ot,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]})})),jc=x((({activeMenuSubItems:e,basePath:t})=>e?u("div",{className:"mb-5",children:e.map(((e,l)=>u(Ac,{item:e,basePath:t},String(l))))}):null)),Dc=({item:e,isActive:t,onClick:l})=>p("button",{type:"button",className:"relative",onClick:l,children:[u("span",{className:w("whitespace-nowrap",t?"text-primary-main":""),children:e.text}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]}),Ec=x((e=>{const{topItems:t,officesLink:l,defaultLocation:s}=Ar(e.options?.page?.fallback),[o]=ac(s),c=(()=>{const{open:e,close:t}=F();return{open:(t={})=>e(u(xc,{}),t),close:t}})(),d=i((()=>c.open()),[]),[m,h]=Dl({itemCount:t?.length??0}),[x]=Zo(t),[g,f]=n(x),b=r((()=>t?.[g]),[t,g]),y=b?.items||[];a((()=>{f(x)}),[x]),a((()=>{g>0&&h.scrollTo(g)}),[g,h]);const v=i((e=>f(e)),[]);return u(cc,{head:u("div",{className:"flex items-center",children:u(T,{as:"h4",title:"Меню"})}),children:p("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[u("div",{className:"w-full mb-3",children:u(Sl,{containerRef:m,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>u(Dc,{item:e,isActive:g===t,onClick:()=>v(t)},String(t))))})}),p("div",{className:"relative grow overflow-auto",children:[u(jc,{activeMenuSubItems:y,basePath:b?.href}),u(_c,{className:"grow mb-5"}),Oc(l),p("div",{className:"flex items-center text-s cursor-pointer",onClick:d,children:[u(Ot,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),p("div",{className:"flex flex-col items-start",children:[u(he,{size:"text-h5",children:o.name}),u(he,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]})]})]})})})),Oc=e=>e?p("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[u(Ot,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),u("span",{children:"Офисы и банкоматы"})]}):null,Lc="burgerMenuDialog",Fc=x((({...e})=>{const{menuItems:t=[]}=Vt(d.STICKY_MOBILE_MENU||"sticky-mobile-menu",{fallback:e.options?.page?.fallback,folderName:"portal-resources",setBasePath:!0}),[l,{toggle:n}]=(()=>{const{open:e,closeAll:t,close:l}=F(),n=lc(),a=((e,t)=>t.find((t=>t.id===e),e))(Lc,n),r=i((()=>e(u(Ec,{}),{id:Lc})),[]),s=i((()=>{a?t():r()}),[a]);return[Boolean(a),{open:r,close:l,toggle:s}]})(),a={title:"Меню",icon:{icon:"BurgerIcon",iconVersion:l?"color":"black"},isActive:l},s=Math.floor(t.length/2),o=r((()=>[...t.slice(0,s),a,...t.slice(s)]),[t,s,a]);return u("div",{className:"w-full mb-5","data-component":"sticky-bottom-menu-container",children:u(S,{className:"@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]",padding:"p-0",children:u(tc,{menuItems:o,onClick:n})})})})),$c="hidden sm:flex absolute z-40 top-0",Uc=x((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Dl({itemCount:t?.length||0});return p("div",{className:w("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(Sl,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(Fs(l,n,a))}),r.canScrollLeft?u(ra,{className:w("left-6",$c),onClick:r.scrollLeft}):null,r.canScrollRight?u(sa,{className:w("right-6",$c),onClick:r.scrollRight}):null]})})),Hc=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u($s,{...t});case"centered":return u("div",{className:"flex",children:u($s,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Uc,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Wc="tab",Kc=x((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=J(),{isReady:d}=c,m=r((()=>l.map(Gc)),[l]),[h,p]=n(0);a((()=>{if(!l||!l[0])return;const e=c.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===c.query.tab))||0,t=l[e]||l[0];p(e),Xc(t)}),[d]),a((()=>{const e=l[h];"group"===e?.type&&b.subject("tab",{type:e.type,label:e.ref})}),[l,h]);const x=i((e=>{const t=m.indexOf(e),n=l[t];p(t),Xc(n),"group"===n.type&&(e=>{const t=new URLSearchParams(c.query);e.name?t.set(Wc,e.name):t.delete(Wc),c.replace(`${c.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,m]);return u(S,{className:w(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:Hc({items:m,value:m[h],tabsMode:s,onChange:x})})})),Xc=e=>{"group"===e.type&&b.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&b.fire("tab",{type:e.type,label:e.href})},Gc=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,qc={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Jc=x((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:qc[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),Yc=x((({className:e="",isOpen:t,onClick:l})=>u(oe,{className:e,appendRight:u(Ot,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),Qc={Buttons:({buttons:e})=>dl(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?u(Ot,{image:e}):null,List:({isDotted:e,...t})=>u(qa,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{className:"space-y-2xs",children:[e?u("div",{children:e}):null,t?u("div",{children:u(he,{size:"text-s",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(Yc,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},Zc=({rowIdx:e,cellIdx:t,setTableInner:l,tableInner:i,openTableInnerIdx:r,setOpenTableInnerIdx:s})=>(o,c)=>{const[d,m]=n(!0);a((()=>{t===r&&i||m(!0)}),[i,r]);return u("div",{children:ed({cell:o,cellProps:{rowIdx:e,cellIdx:t,fieldIdx:c,displayTable:e=>{m(!1),s(t),l(e)},isVisible:d}})},String(c))},ed=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in Qc))return null;return u(Qc[l],{...t,...n})},td=x((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>u("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(Zc({rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})):null}))),ld=(e,t)=>140*li(e.slice(0,t).map((e=>e?.cols?.length??1))),nd=(e,t)=>e?.length>0?u("div",{className:w("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>u("div",{className:"w-20 text-h6 mx-lg",children:e},String(t))))}):null,ad=x((({rows:e})=>{return u(Sl,{visibleItemCount:0,snapAlign:"snap-start",children:u("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=w("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return p("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?u("div",{className:"text-xl font-light w-56 min-w-56 py-lg",children:n.data}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${ld(a,t)}px)`},children:a?.map(((e,l)=>p("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?u("div",{className:"text-xl font-light",children:e.data}):null,e?.cols?nd(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),id=x((({activeTabIndex:e,items:t})=>u("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return p("div",{className:"w-full @container",children:[u("div",{className:"flex p-m bg-white @4xl:bg-gray text-center justify-center relative",children:u(he,{size:"text-xl",font:"font-light",children:t.title})}),u("div",{className:"w-full pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:u("div",{className:"relative",children:u(ad,{rows:t.rowsData})})})]},n)}))}))),rd=x((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>u("div",{className:"rounded-md text-xl font-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>n(t),children:e||t+1},e)))}):null,t?u(oe,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:u(Ae,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function sd(e){const t=await fetch(e);return await t.json()}const od=x((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=A(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),sd);return t||{}}(e),[r,s]=n(0),o=i((e=>s(e)),[]),c=a?.[r]?.items??[],d=a?.map((e=>e.currency??""));return p("div",a?{className:"bg-white z-10",children:[u(rd,{currencies:d,activeTabIndex:r,setActiveTabIndex:o,linkToPDF:t}),u(id,{activeTabIndex:r,items:c}),u(Yc,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-h6 text-center",children:[u("p",{children:"Данных нет"}),u(Yc,{onClick:l,isOpen:!0})]})})),cd=x((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:w("@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?u("div",{className:"origin-top animate-expansion",children:u(od,{...t,onClick:l})}):null]}))),dd=x((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,o]=n(void 0),c=i((e=>o(e)),[]),[d,m]=n(void 0),h=i((e=>m(e)),[]);return p(cd,{onHideContentClick:()=>o(void 0),tableInner:s,...r,children:[u("div",{className:w("text-s","w-80 flex-shrink-0"),children:p("div",{className:"flex gap-m items-center text-primary-text",role:"cell",children:[e?.icon?u(Ot,{className:"hidden @4xl:block max-w-6",image:e.icon,width:"24",height:"24"}):null,e?.title?u("div",{className:"text-m font-light",children:e?.title}):null]})}),t?.length?u(Jc,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(td,{cells:e,rowIdx:a,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...r},String(t))))}):null]})}));function md({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?p("div",{children:[l?u(ia,{className:`absolute z-40 ${a[0]} ${i}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u(ia,{className:`absolute z-40 rotate-180 ${a[1]} ${i}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const hd=x((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative space-y-xs",children:[e,md({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),ud=x((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=aa({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(dd,{row:e,activeIndex:d,rowIdx:t,...r},String(t)))),[x,g]=i>0?[h.slice(0,-i),h.slice(-i)]:[h,[]];return p(S,{className:w("overflow-hidden relative space-y-0 @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[u(gl,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),u("div",{className:"space-y-m",children:i>0?u(Ul,{renderFoldableSection:({isUnfolded:e})=>p(hd,{controls:m,children:[x,u(Hl,{isUnfolded:e,children:g})]}),renderFoldButton:Fi}):u(hd,{controls:m,children:h})})]})})),pd=x((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(S,{className:w("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?xd():null,"big"===n?gd(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(he,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?fd(l):null,r?.length?bd(r,!0):null,i?u(ii,{__html:i}):null]})]}))),xd=()=>u("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"}),gd=e=>e?.src?u(Ot,{className:"h-fit flex-shrink-0",image:e}):null,fd=e=>u(me,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),bd=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(he,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),yd=x((({className:e,padding:t,headlineVersion:l="S",listItemSize:n="M",...a})=>u(S,{className:e,padding:"p-0",...a,children:u(yi,{className:"h-full",defaultPadding:"p-xl",padding:t,headlineVersion:l,listItemSize:n,isFullWidthTitle:!1,...a})}))),vd={ApplicationForm:Zt,BenefitsBlock:al,Bonus:fl,BonusBenefitsBlock:Ll,ButtonsBlock:$l,Calculator:Gn,CardTransfer:na,Carousel:Ca,CarouselBankHistoryCard:Ia,CarouselCard:Ra,CarouselCatalogCard:Ea,CarouselLinks:$a,CarouselProductCard:Ja,CarouselRecommendationCard:Ii,CarouselTariffsCard:Bi,ComparisonTable:Di,DepositFiltration:sr,MortgageFiltration:Hs,ErrorBlock:dr,ExchangeRateTile:_r,Footer:Qr,Header:ds,Headline:gl,HorizontalLayout:us,ImgBlock:ps,LinkDocs:vs,MobileAppTile:ks,PictureText:Xs,Placeholder:Gs,ProductBlock:Zs,ProductGallery:eo,ProductTile:to,RepresentativeOfficeInfo:lo,RichTextBlock:io,RollupItem:Or,SafeDepositRental:$o,StepsBlock:Go,StickyBottomMenu:Fc,Tabs:Kc,TariffsTable:ud,TextBlock:pd,Tile:yd,VerticalLayout:hs};const Nd=["Header","Footer"],wd=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function kd(e=globalThis){const t=s(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!Nd.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?_l(wd)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const Sd="cookie",Cd=x((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=_e();yc((()=>{globalThis.localStorage?.getItem(Sd)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Sd,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[u("div",{className:"sm:flex-1",children:p(me,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(Ha,{isRemote:!0,className:Id(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(Ha,{isRemote:!0,className:Id(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(oc,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),Id=e=>w("inline mx-2xs",e?"text-green-dark":""),Td=x((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=lc({onCloseAll:e,onClose:t}),{close:n}=F(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return Le(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:w("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Bd=x((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>b.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Ho(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return Le(globalThis.document,"keydown",r),e?u("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Rd=h();const Md=x((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Pd()}))),Pd=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),u("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},Vd=x((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Rd.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Rd.like(e))}),[e]),dislike:i((async()=>{l(await Rd.dislike(e))}),[e])}}(J().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(Md,{onClick:q(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(Md,{onClick:q(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),_d=x((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return kd(),p("div",{"data-theme":s,children:[p("section",{className:w("@container relative",a,e),children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:ga(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[fa({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),ga(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Vd,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Fc,{}),u(Td,{}),u(Bd,{}),u(Cd,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));_d.childrenTypes=[],_d.slots=()=>["header","footer","StickyBottomMenu"];e.Blocks=vd,e.ContentPage=_d,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=q,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.14.26",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=K,e.useRouter=J,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 l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),x=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:g(e)),t._tmpl},g=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t};class f{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const b=new f;function y(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:v(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function v(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const N=new f;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),k={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","":""},S=x((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return y(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];N.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[x,g]=n(!1);a((()=>b.subscribe("tab",(e=>{g(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:w("@container font-sans",f?"group":"",k[t],x?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),C={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=x((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=C[l]||"h3";return u(i,{className:w("font-sans m-0",I[t],e),children:n||a})})),B=e=>e,M=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=B,format:i=B}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),x=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:x}]},R=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],P=e=>!e?.length,V=e=>t=>l=>e(l)?[]:[t],z=e=>null!=e,_=new Map;function A(e,t,{fallback:l,cache:i}={}){const s=r((()=>D(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{if(!s.some(z))return;let e=!1;const l=(t,l)=>{e||(d(t),h(l))};return(async()=>{try{l(await(o?((e,t=_)=>l=>{const n=t.get(l);if(z(n))return n;const a=e(l);return z(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s)))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0)}}function D(e){return Array.isArray(e)?e:e instanceof Function?D(e()):[e]}async function j(e,t){try{return e?await O(e,t):null}catch(e){console.error(e)}return null}async function O(e,t){return(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json()}const E=[];function L(){const{data:e}=A("/api/v1/regions",O);return e||E}const $=()=>({open:(e,t={})=>b.fire("dialog",{type:"open",dialog:e,...t}),close:()=>b.fire("dialog",{type:"close"}),closeAll:()=>b.fire("dialog",{type:"close",all:!0})}),F=e=>Boolean(e?.includes(":")),U=(e,t)=>Boolean(e&&!F(e)&&(!t||"_self"===t)),H=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),W=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var K=Object.freeze({__proto__:null,isURL:F,isLocalURL:U,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:H,joinPath:W});const Y=e=>(t,l=d.BASE_PATH)=>{if(!t||F(t)||X(t,d.CDN))return t;const n=t.startsWith("/");return W(X(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},X=(e,t)=>t&&e&&e.startsWith(t),G=(e,t)=>G._impl(e,t);function q(){return q._impl()}function J(e={}){const{isRemote:t,basePath:l}=e,n=q(),{closeAll:a}=$();return e=>({...e,href:t&&!l?e.href:Y(n)(e.href,l),"aria-label":e.text,onClick:G(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&U(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}G._impl=e=>e,G.setup=e=>{G._impl=e},q._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),q.setup=e=>{q._impl=e};const Q={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","":""},Z="bg-main-divider text-main-disabled",ee={primary:Z,secondary:Z,white:Z,link:"",transparent:"",gray:Z,"":""},te="text-center font-sans select-none",le={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","":""},ne=x((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=ie(e)?"hidden lg:block":"";return p("div",{className:w(ae(e),"flex gap-xs"),children:[n?u("div",{className:w(r,le[i]),children:n}):null,ie(e)?p("div",{className:"whitespace-pre",children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:w(r,le[i]),children:a}):null]})})),ae=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return w("group/btn items-center justify-center",ie(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},ie=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),re=({className:e,rounded:t,version:l})=>["inline-block",te,l?ee[l]:"",t?"rounded-full":"rounded-md",e].join(" "),se=({className:e,rounded:t,version:l})=>[te,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?Q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),oe=x((({disabled:e,children:t,...l})=>{const n=J()(l),a=t??u(ne,{...n});return u(e?de:ce,{...n,children:a})})),ce=x((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:se({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),de=x((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:re({className:e,rounded:n,version:l}),children:a}))),me=x((({children:e,...t})=>u("p",{className:w("font-sans",Object.values(t)),children:e}))),he=x((({children:e,...t})=>u("span",{className:w("font-sans",Object.values(t)),children:e}))),ue=x((({text:e,link:t})=>p(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(he,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?u(oe,{href:t.href,ariaLabel:"условия передачи данных",target:t.target,className:"text-primary-main",children:u(he,{children:t.text})}):null]}))),pe=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},xe=x((({key:e,className:t="",inputClassName:l="",id:n,name:r,type:o="text",label:c,placeholder:d,value:m="",valid:h=!0,children:x,onChange:g,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1})=>{const N=s(null),k=i((e=>{g&&g(e.target?.value||"")}),[g]);a((()=>{v&&N.current?.focus()}),[v,N]);const S=x?"pr-3xl":"",C=h?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:w("relative",t),children:[p("label",{children:[c?u("div",{className:"mb-xs",children:u(he,{size:"text-m",font:"font-light",children:c})}):null,u("input",{ref:N,className:w("w-full h-14 border rounded-md text-primary-text outline-none p-m",S,C,l),id:n,name:r||n,placeholder:d,type:o,value:m,onInput:k,onFocus:f,onBlur:b,pattern:y},e)]}),x]})})),ge=x((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(xe,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),fe=e=>"_"===e,be=e=>/\d/.test(e),ye=e=>fe(e)||be(e),ve=[..."+7 (___) ___-__-__"],Ne=ve.findIndex(fe),we=ve.map(((e,t)=>ye(e)?ve.slice(0,t).filter(ye).length:-1));const ke=x((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=ve.map(((e,l)=>be(e)?e:t.charAt(we[l])||e)),n=we.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Ne,n)):l).join("")}(e))),[t]);return u(xe,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Se=x((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(ke,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),Ce="Некорректно заполненное поле",Ie=V((e=>null!=e&&""!==e))(Ce),Te=V((e=>"string"==typeof e&&e.length>1))(Ce),Be=V((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Ce),Me=(Re=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,V((e=>"string"==typeof e&&Re.test(e))))(Ce);var Re;const Pe=e=>p("div",{className:"space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Наименование организации",...pe(e("fullName"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)}),u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Me)})]}),Ve=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function ze(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const _e={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},Ae=x((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const o=q(),c=Y(o)(W(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(Oe,{className:e,children:p("svg",{className:w(je(r),_e[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]})}):u("img",{className:e,src:c,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:De(e,s)})})),De=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},je=e=>e?"":"w-full h-full",Oe=x((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),Ee=e=>e?.text||e?.key||"";function Le(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function $e(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return Le(globalThis.document,"click",l),t}const Fe=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Ue=x((({popupRef:e,options:t,value:l,query:n,onChange:a})=>t?.length?u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:Fe(t,n).map((e=>p("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[u("span",{className:"min-h-6",children:Ee(e)}),u(Ae,{name:"DoneSimpleIcon",width:"16",height:"16",className:w("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function He({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:o}){const c={open:(e,t)=>b.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>b.fire("popup",{type:"update",popup:e,...t}),close:()=>b.fire("popup",{type:"close"})},d=i((()=>{c.close(),o&&o()}),[o]),m=i((e=>{d(),r&&r(e)}),[d,r]),h=s(null),p=$e(d);return a((()=>{if(!e||!h.current)return;const a=h.current,{top:i,left:r,width:s,height:o}=a.getBoundingClientRect();c.update(u(Ue,{popupRef:p,options:t,value:l,query:n,onChange:m}),{top:i+window.scrollY+o,left:r,width:s})}),[e,t,l,n,m]),h}const We=x((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:o="",isSearch:c=!1,iconVersion:d,onChange:m})=>{const[h,{setFalse:x,setTrue:g}]=ze(),[f,b]=n(""),y=i((()=>{b(""),x()}),[]),v=He({isOpen:h,options:l,value:a,query:f,onChange:m,onClose:y});return p("div",{className:e,children:[Ke(t),p("div",{className:w("relative",h?"z-20":"z-10"),ref:v,children:[p("div",{className:w("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",Xe(s,r)),onClick:h?y:g,children:[u("p",{className:"p-m pr-3xl flex items-center overflow-hidden text-ellipsis whitespace-nowrap",children:Ee(a)||o}),Ye(h,d)]}),c&&h?u("div",{className:w("absolute top-0 w-full z-20"),children:u(xe,{type:"text",autoFocus:!0,value:f,onChange:b})}):null]})]})})),Ke=e=>e?u("div",{className:"mb-xs",children:u(he,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,Ye=(e,t)=>u(Ae,{className:w("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Xe=(e,t)=>w(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Ge=x((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(We,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),qe=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg ",children:[u("div",{className:"@xl:w-1/2",children:u(Ge,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ve.map((({name:e=""})=>({key:e,text:e}))),...pe(t("acquiringType"),Ie)})}),u("div",{className:"@xl:w-1/2",children:u(Ge,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(t("region"),Ie)})})]}),Je=x((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:w("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:w("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(he,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),Qe=e=>p("div",{children:[u(Je,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Je,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),Ze=(e,t)=>{const l=se({className:"text-white",version:e?.version});return u("button",{type:"submit",className:w("p-m w-full @xl:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},et={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},tt=R({acquiringType:Ie,region:Ie,fullName:Ie,inn:Be,name:Te,phone:Me}),lt=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;P(tt(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=M(et,a),o=L();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"@xl:text-center"}),qe({regions:o,field:r}),u(T,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),Pe(r),Qe(r),Ze(t),u(ue,{link:l})]})})),nt=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)}),u(ge,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Se,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Me)}),u(ge,{className:"shrink-0 w-full",label:"Электронная почта",...pe(e("mail"),Ie)})]})]}),at=({regions:e,field:t})=>u(Ge,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(t("region"),Ie)}),it={name:"",phone:"",inn:"",mail:""},rt=R({region:Ie,name:Te,phone:Me,inn:Be,mail:Ie}),st=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;P(rt(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,inn:i,mail:r,phone:a.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=M(it,a),o=L();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[at({regions:o,field:r}),nt(r),Ze(t),u(ue,{link:l})]})})),ot=[];const ct=async e=>await j(e,{method:"GET"})||ot,dt=["От 1 000 ₽","До 1 000 000 000 ₽"],mt=["От 1 мес","До 15 лет"],ht=e=>u("div",{className:"pb-2xs border-b border-b-main-divider",children:p("div",{className:"space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Наименование организации",...pe(e("fullName"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...pe(e("annualRevenue"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"Контактное лицо",...pe(e("name"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Me)}),u(ge,{className:"shrink-0 w-full",label:"ИНН",...pe(e("inn"),Be)}),u(ge,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})}),ut=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},pt=(e,t,l)=>Math.max(t,Math.min(e,l)),xt=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0);function gt(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function ft({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:w("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=gt(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const bt=1,yt=100,vt=x((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:bt),max:s=(a.length?a.length-1:yt),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=ut(e,{normalize:(e=0)=>a.length?Nt(a)(e):pt(e,r,s),format:xt()}),x=i((e=>{m&&m(gt(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(he,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:w("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:x,...h}),ft({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),wt(n)]})})),Nt=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),wt=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),kt=e=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg",children:[p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(he,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(vt,{items:dt,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(he,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(vt,{items:mt,min:1,max:180,...e("term")})]})]}),St=({regions:e,branches:t,field:l})=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg @xl:mb-2xl @xl:border-none @xl:pb-0",children:[u("div",{className:"@xl:w-1/2",children:u(Ge,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(l("region"),Ie)})}),u("div",{className:"@xl:w-1/2",children:u(Ge,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...pe(l("department"),Ie)})})]}),Ct={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},It=R({fullName:Ie,annualRevenue:Ie,inn:Be,name:Te,phone:Me,region:Ie,department:Ie}),Tt=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;P(It(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,""),mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=M(Ct,n),o=L(),c=function(e){const{data:t}=A(e?`/api/v1/branches?regionCode=${e}`:null,ct);return t||ot}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(T,{headingType:"h6",title:"Параметры",className:"@xl:text-center"}),kt(r),u(T,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),ht(r),u(T,{headingType:"h6",title:"Офис банка",className:"@xl:text-center"}),St({regions:o,branches:c,field:r}),Ze(e),u(ue,{link:t})]})})),Bt={name:"",phone:""},Mt=R({name:Te,phone:Me}),Rt=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{name:t,phone:n}=e;P(Mt(e))&&l({typeForm:"dpst",name:t,phone:n.replace(/[^+\d]/g,"")})}),[l]),[,{field:a,...r}]=M(Bt,n);return p("form",{className:"container",onSubmit:r.onSubmit,children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"@xl:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Имя",...pe(a("name"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...pe(a("phone"),Me)})]}),p("div",{className:"flex justify-between flex-col-reverse @xl:items-center @xl:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(ue,{link:t})}),Ze(e)]})]})})),Pt={},Vt="wcms-resources";function zt(e,t={}){const{fallback:l=Pt,folderName:n=Vt,setBasePath:a=!1}=t,i=W("/",a?d.BASE_PATH:"",n,`${e}.json`),{data:r}=A(e?i:null,O,{fallback:l});return r||Pt}const _t=x((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=zt(l||"regions-grant-support"),[i,r]=n({key:""}),s=se({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s @xl:space-y-lg",children:[a?u(Ge,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:a.map((({name:e=""})=>({key:e,text:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(oe,{href:o,target:"_blank",className:w("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),At=x((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>u("path",{d:e,fill:t||"currentColor",...r,...l},n)))}))),Dt=[{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"}],jt=x((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(At,{paths:Dt,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:w("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Ot(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(he,{size:"text-l",font:"font-light",children:l})}):null]})})})),Ot=e=>w("rounded border",e?"bg-primary-main":""),Et=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Lt=()=>{},$t=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const o=[];let c=1;for(let d=0;d<6;d++){const m=[];for(let o=0;o<7;o++)if(0===d&&o<t)m.push(u("td",{},`empty-${o}`));else if(c>l)m.push(u("td",{},`empty-${o}`));else{const t=new Date(a,n,c),l=Ft(t,e),o=Ut(t,i,r);m.push(u("td",{children:u("div",{className:Ht(l,o),onClick:()=>!o&&s(t),children:c})},`day-${c}`)),c++}o.push(u("tr",{children:m},`row-${d}`))}return o},Ft=(e,t)=>t&&e.toDateString()===t.toDateString(),Ut=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Ht=(e,t)=>w("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Wt=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Kt=x((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=Lt})=>{const o=i((e=>s(e)),[]),{firstDayOfWeek:c,totalDays:d}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return p("table",{className:"mx-auto",children:[u("thead",{className:"text-gray font-light",children:u("tr",{children:Wt.map(((e,t)=>u("th",{className:"p-s",children:e},String(t))))})}),u("tbody",{children:$t({firstDayOfWeek:c,today:e,totalDays:d,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:o})})]})})),Yt=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Xt=Yt.map((e=>({key:e}))),Gt=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),qt={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Jt={className:"min-w-32",iconVersion:"black",isBorder:!1},Qt=x((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:o})=>{const[c,{setValue:d}]=ze(!1),[m,h]=n(l?.getMonth()||(new Date).getMonth()),[x,g]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:f,handleNextMonth:b,handleSelectMonth:y,handleSelectYear:v,monthsOptions:N,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=$e(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Yt.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Xt,yearsOptions:Gt,ref:s}})({onYearSelect:g,onMonthSelect:h,onShowCalendar:d,selectedYear:x,selectedMonth:m,showCalendar:c});return p("div",{className:w(e,"relative"),ref:C,children:[u(he,{size:"text-m",children:t}),Zt(S,l,a),c?p("div",{className:"absolute bg-white z-10 select-none",children:[p("div",{className:"flex gap-s",children:[u("div",{className:"my-auto",onClick:f,children:u(Ae,{...qt,className:"-rotate-90 cursor-pointer"})}),u(We,{onChange:y,value:{key:Yt[m]},options:N,...Jt}),u(We,{onChange:v,value:{key:String(x)},options:k,...Jt}),u("div",{className:"my-auto",onClick:b,children:u(Ae,{...qt,className:"rotate-90 cursor-pointer"})})]}),u(Kt,{today:l,currentMonth:m,currentYear:x,onDateSelect:o,min:r,max:s})]}):null]})})),Zt=(e,t,l)=>p("div",{onClick:e,className:w("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[u(me,{children:t&&Et(t)}),u(Ae,{...qt,name:"CalendarIcon"})]}),el=x((({className:e,label:t,value:l,error:n,onChange:a})=>p("div",{className:e,children:[t?u("div",{className:"mb-xs",children:u(he,{size:"text-m",font:"font-light",children:t})}):null,u(Qt,{value:l,onChange:a,valid:Boolean(!n)}),u("div",{className:"h-2",children:n?u(he,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),tl=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Фамилия",...pe(e("surname"),Te)}),u(ge,{className:"shrink-0 w-full",label:"Отчество",...pe(e("middleName"),Te)}),u(Se,{className:"shrink-0 w-full",label:"Телефон",...pe(e("phone"),Me)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(ge,{className:"shrink-0 w-full",label:"Имя",...pe(e("name"),Te)}),u(el,{className:"shrink-0 w-full",label:"Дата рождения",...pe(e("date"),Ie)}),u(ge,{className:"shrink-0 w-full",label:"Электронная почта",...pe(e("mail"),Ie)})]})]}),ll={surname:"",name:"",middleName:"",phone:"",mail:"",date:void 0,consentDataProcessing:!0},nl=R({surname:Te,name:Te,middleName:Te,phone:Me,mail:Ie,date:Ie}),al=x((e=>{const{button:t,link:l,product:n,onSubmit:a}=e,r=i((e=>{const{surname:t,name:l,middleName:i,phone:r,mail:s,date:o,consentDataProcessing:c}=e;P(nl(e))&&a({typeForm:"dpst",surname:t,name:l,middleName:i,mail:s,consentDataProcessing:c,phone:r.replace(/[^+\d]/g,""),date:o?.toISOString().slice(0,10)||"",product:n||""},!0)}),[a]),[,{field:s,...o}]=M(ll,r);return p("form",{className:"container space-y-s",onSubmit:o.onSubmit,children:[tl(s),p("div",{className:"@xl:flex justify-between items-center",children:[p("div",{className:"@xl:mb-0 mb-2 flex items-center gap-3",children:[u(jt,{...pe(s("consentDataProcessing"),Ie)}),u(ue,{text:"Согласен с ",link:l})]}),Ze(t)]})]})})),il=(e,t)=>e?.media&&t?.media?e.media-t.media:0,rl=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=q();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(il).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:ol(a,n)(e),type:cl(l),media:i?`(max-width: ${i}px)`:"",...t.size},`${r}_${e}`))):null,t?.src?sl({...t,src:ol(a,n)(t.src)},l):null]})})),sl=(e,t="")=>u("img",{src:e.src,className:w("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"},...e.size}),ol=(e,t)=>l=>l&&!F(l)?Y(e)(W(t,l)):l,cl=e=>e?`image/${String(e)}`:void 0,dl=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(Ae,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(rl,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),ml=x((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u(he,{color:"text-primary-text",children:t}):null]})}))),hl=e=>{const{value:t,onChange:l}=e("vedTypes");return u("div",{className:"space-y-m",children:p("div",{className:"@xl:flex @xl:items-center @xl:gap-xl",children:[u(ml,{className:"mb-xs",name:"vedTypes",text:"Валютный котроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),u(ml,{className:"mb-xs",name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),u(ml,{className:"mb-xs",name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),u(ml,{className:"mb-xs",name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},ul=(e,t)=>{const l="currencyControl"===e("vedTypes").value;return p("div",{children:[l?u(Ge,{className:"mb-s",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...pe(e("region"),Ie)}):null,p("div",{className:"@xl:grid @xl:grid-cols-2 @xl:gap-x-lg",children:[l?u(ge,{className:"w-full mb-s",label:"ИНН",...pe(e("inn"),Be)}):null,u(ge,{className:"w-full mb-s",label:"Наименование организации",...pe(e("fullName"),Ie)}),u(ge,{className:"w-full mb-s",label:"ФИО",...pe(e("name"),Te)}),u(Se,{className:"w-full mb-s",label:"Телефон",...pe(e("phone"),Me)}),l?null:u(ge,{className:"w-full mb-s",label:"Электронная почта",...pe(e("mail"),Ie)})]})]})},pl=e=>{const t=e("text");return p("label",{children:[u("div",{className:"mb-xs",children:u(he,{size:"text-m",font:"font-light",children:"Обращение"})}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:w("block w-full resize-y min-h-24 p-m outline-none border rounded-md border-gray","hover:border-primary-hover active:focus:border-primary-text focus:border-primary-text"),value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},xl={fullName:"",name:"",phone:"",inn:"",vedTypes:"currencyControl",text:""},gl={fullName:Ie,name:Te,phone:Me},fl=R({...gl,mail:Ie}),bl=R({...gl,inn:Be,region:Ie}),yl=e=>"currencyControl"===e,vl=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),Nl={ApplicationFormBusinessCard:st,ApplicationFormWed:x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,inn:r,region:s,vedTypes:o,text:c}=e,d={typeForm:"KVED",fullName:t,name:l,phone:a.replace(/[^+\d]/g,""),text:c,vedTypes:vl(o),PartnerComments:c,...yl(o)?{inn:r,region:s?.text||""}:{mail:i}};P((e=>yl(e)?bl:fl)(o)(e))&&n(d)}),[n]),[,{field:r,...s}]=M(xl,a),o=L();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[hl(r),u(T,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),ul(r,o),pl(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg @xl:items-center @xl:flex-row @xl:pb-4xl",children:[Ze(t),u(ue,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),p("div",{className:"flex gap-xl",children:[p("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:[u(dl,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(dl,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Rt,ApplicationFormCredit:Tt,ApplicationFormAcquiring:lt,ApplicationFormGrantSupport:_t,ApplicationFormIndividuals:al},wl=x((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(dl,t?{image:{icon:"ResponseOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponseFailIcon"},width:"37",height:"34"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),kl={send:async function(e,t){const l=t?"/api/v1/lead":"/api/v1/sendcorporatelead";try{const t=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return t?.ok?await t.json():null}catch(e){return null}}},Sl=x((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async(e,t)=>{const l=await kl.send(e,t)?"OK":"Fail";return s(l),l}),[]);return u(S,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(T,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?Cl(l,o):null,r?u(wl,{responseType:r}):null]})})})),Cl=(e,t)=>{const l=e?.formType;if(!l||!(l in Nl))return null;return u(Nl[l],{...e,onSubmit:t})},Il="text-left",Tl={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Bl=x((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:w("rounded-icon object-fit flex justify-center items-center",Tl[l],e),children:u(Ae,{...i,width:"54%",height:"54%",name:a})}):null})),Ml=x((({className:e="",title:t,benefitList:l,...n})=>p(S,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(T,{headingType:"h3",as:"h2",className:Il,title:t}):null,l?.length?u("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(Rl)}):null]}))),Rl=(e,t)=>p("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[e?.icon?.icon?u(Bl,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(dl,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"@sm:h-full",children:[u(T,{headingType:"h6",children:e.label}),Pl(e.description)]}):null]},String(t)),Pl=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?zl(e):Vl(e)}):null},Vl=e=>e?.name?u(he,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:e.name}):null,zl=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:u(he,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:e})},`benefitListItem-${t}`)))}):null},_l=e=>Boolean(e?.src||e?.icon),Al=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:w("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map(Dl(l))}):null,Dl=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o=jl(a,r),c=jl(i,r);return n||a?.icon?u(oe,{className:w("basis-full sm:basis-auto",e),appendLeft:Ol({...a,iconVersion:o}),appendRight:Ol({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},jl=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Ol=e=>_l(e)?u(dl,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,El={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"}},Ll={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},$l=x((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=El[l],m={marginTop:d.descriptionStyle};return p(S,{className:w(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(T,{className:w("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(me,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),Fl=x((({className:e="",title:t,description:l,bonusItems:n=[],align:a="text-left",...i})=>u(S,{className:e,defaultPadding:"p-6xl",...i,children:p("div",{className:"container",children:[u($l,{className:"mb-xl",isEmbedded:!0,title:t,description:l,headlineVersion:"M",align:a}),u("div",{className:"flex flex-wrap gap-3xl gap-x-m w-full",children:n.length>0?n.map(((e,t)=>p("div",{className:"w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow w-full p-xl sm:p-m border border-gray",children:[u("div",{className:"grow",children:u($l,{title:e?.title,description:e?.description,headlineVersion:"S",isEmbedded:!0,align:"text-left"})}),p("div",{className:"flex justify-center sm:justify-between sm:items-end",children:[u("div",{className:"hidden sm:block",children:Al(e?.buttons)}),e.bonusItemContent?.bonusType?Ul(e.bonusItemContent):null]})]},String(t)))):null})]})}))),Ul=e=>"count"===e.bonusType?Hl(e):Wl(e),Hl=e=>p("div",{className:"w-full pt-default @xl:mt-s @xl:mb-4 flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(he,{size:"text-h2",children:e.bonusName})}):null]}),Wl=e=>e.image?u(dl,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,Kl=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Yl=x((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=y(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),Xl=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],Gl=x((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const x={sensitivity:1,rootRef:t},g=s([]),f=i(((e,t)=>{const l=[...g.current||[]];l[e]=t,g.current=l,h&&h(l),p&&p(Jl(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?ql(r,b):{},...y?Kl(d):{},gap:`${a}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(k=(e,t)=>u(Yl,{className:w(c,n?Xl[n-1]:"",y?"h-full":""),style:v?ql(r/4):{},activeIndex:l,idx:t,observerOptions:x,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(k):k(e,0))(m)});var k})),ql=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Jl=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Ql={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Zl={"horizontal-list":"w-6","vertical-list":"h-6"},en=x((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?u("div",{className:w("flex gap-xs",Ql[a],i?"group":"",e),...i?{"data-ver":i}:{},children:new Array(n).fill(null).map(((e,n)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?Zl[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),tn=e=>e,ln=(e=tn)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),nn=ln(),an=(e=tn)=>ln((t=>-e(t))),rn=an(),sn=e=>t=>e.scrollWidth/t,on=e=>(t,l)=>{e.scrollBy({left:l*sn(e)(t),behavior:"smooth"})},cn=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[an()(a),ln()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?on(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?on(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),x=i((e=>{l?.current&&l.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:x,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},dn=x((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=true,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=cn({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===o?"relative h-full":""),children:[u(Gl,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(en,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),mn=(e,t,l)=>{return u(dn,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>p("div",{className:w("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(he,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?u(dl,{image:e,height:"180",className:"w-auto"}):null,l?u(he,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},hn=x((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(S,{className:l,defaultPadding:"p-6xl",...r,children:[u($l,{title:i,description:a,headlineVersion:"M"}),e?.length?mn(e,0,t):null]}))),un={start:"justify-start",center:"justify-center",end:"justify-end"},pn=x((({buttons:e,className:t="",align:l,...n})=>{const a=l?w("flex",un[l]):"";return u(S,{className:w("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Al(e)})})),xn=x((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),gn=x((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return a((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),fn=x((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:w("flex justify-between @xl:flex-col",a),children:[e?u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(he,{size:"text-h3",children:[n," ",xt(2)(Math.round(t))," ",l]})}:{children:u(he,{size:"text-h3",children:"-"})})]}))),bn=Math.round(23.5),yn={minSum:1e4,maxSum:5e6,minMonths:13,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},vn={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Nn={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},wn={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},kn={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Sn=e=>e?u(me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,Cn=x((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,fractionDigits:i=2})=>p("div",{children:[u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:String(e.toFixed(i)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:n}):null]})]}))),In=x((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{className:"space-y-s",children:[u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u(Ae,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),u("div",{className:"w-64",children:t?p(me,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(me,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Tn=({rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,title:a,unit:i})=>u(Cn,{rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,unit:i,title:a}),Bn=({rate:e,title:t,unit:l})=>u(fn,{title:t,value:e,postfix:l}),Mn=({isUnknownRateShown:e=!0,isUnavailableByTerm:t=!1,title:l="Ставка",unit:n="%",rate:a=0,...i})=>e&&0===a?u(In,{isUnavailableByTerm:t,title:l}):p("div",{children:[u("div",{className:"hidden @xl:block",children:Tn({title:l,unit:n,rate:a,...i})}),u("div",{className:"@xl:hidden",children:Bn({title:l,unit:n,rate:a,...i})})]});function Rn({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${xt(2)(l.min||0)} ₽`,`До ${xt(2)(l.max||0)} ₽`];return u(vt,{items:e?n:[],step:t,...l})}function Pn(e){const{data:t}=A(`/wcms-resources/${e}.json`,O);return t}const Vn=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=Pn(t||"bonus-calculator-data")||Nn,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},zn=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=M({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Vn(a,t);return p("section",{className:w("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[p("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[Rn({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),Rn({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?Mn({title:"Баллов за месяц",rate:d,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,p("div",{className:"flex flex-col gap-y-4xl @xl:w-96",children:[m>=0?u(fn,{title:"Баллов за год",value:m}):null,Al(l,{isVertical:!0}),Sn(n)]})]})})),_n=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,An={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Dn=x((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:w(`flex ${An[a]}`,l),children:e?.map((({id:e,text:l})=>u(jt,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),jn=({items:e,title:t,orientation:l="horizontal",value:n,radioGroupClassName:a,onChange:i})=>p("div",{className:"space-y-s",children:[t?u("div",{children:u(he,{color:"text-secondary-text",font:"font-light",children:t})}):null,u(Dn,{orientation:l,items:e,checkedItem:e[n?0:1].id,className:w("flex-col sm:flex-row",a),onChange:t=>i&&i(t===e[0].id)})]}),On=e=>jn({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),En=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},Ln=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:$n([e,t],n),$n=([e,t],l=[])=>({[e]:l.length?rn(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?nn(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Fn=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Un=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Hn=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},Wn=x((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i})=>{const[r,{field:s}]=M({moneyValue:1e5,daysValue:90,isReplenished:!1,isPartialWithdrawal:!1,isMonthlyInterestPayment:!1}),o=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=Pn(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...kn,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&Un(o,e)&&Fn(n,["minSum","maxSum"],e)&&Fn(l,["minDays","maxDays"],e)))||kn,{rate:m}=d,h=Hn(m,e),u=n+h,p=s?.rateRows||[kn];return{...d,...$n(["minSum","maxSum"],p),...$n(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(r,t?.sourceBookDir),{income:c,finalSum:d,rate:m,isUnavailableByTerm:h,depositeName:x}=o;return p("section",{className:w("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[Rn({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),(g={title:"Срок, дней",min:o.minDays,max:o.maxDays,...s("daysValue"),value:o.daysValue},u(vt,{items:[`От ${_n(g.min||0)}`,`До ${_n(g.max||0)}`],step:1,...g})),p("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[Kn(o,s),On({title:"Выплата процентов",orientation:"vertical",...s("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),u("div",{className:"border-b border-main-divider md:hidden"}),Mn({rate:m,depositeName:x,isShowDepositeName:i,isUnavailableByTerm:h}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[Yn(d,c),Al(l,{isVertical:!0}),Sn(n),Sn(a)]})]});var g})),Kn=(e,t)=>p("div",{className:"space-y-s",children:[u(he,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(jt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(jt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Yn=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(fn,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(fn,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),Xn=({min:e=0,max:t=0,availableMonths:l,...n})=>u(vt,{items:[`От ${Gn(e)}`,`До ${Gn(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Gn=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,qn=e=>jn({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Jn=e=>Qn({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Qn({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Qn({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Qn({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Qn=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Zn=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},ea=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Pn(t||"credit-calculator-data"),s=i?.rateRows||[yn],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Jn({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Ln(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Ln(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>Jn({row:e,userInputParams:t,paramsViewSettings:l})&&Fn(n,["minSum","maxSum"],e)&&Fn(a,["minMonths","maxMonths"],e)))||yn)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,x=Zn(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:x})),[e,i])},ta=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,isMobile:i})=>{const[r,{field:s}]=M({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,moneyValue:2e5,monthsValue:bn}),o=ea(r,t,a),c=qn({title:i?"Тип платежа":"",orientation:"vertical",...s("isAnnuity")});return p("section",{className:w("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[Rn({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Xn({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),la({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),Mn({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(fn,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),Al(l,{isVertical:!0}),Sn(n)]})]})})),la=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(jt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(jt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(jt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(jt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),na=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=Pn(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?ra(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>ia({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&ia({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Fn(n,["minSum","maxSum"],t)&&Fn(a||r,["minMonths","maxMonths"],t)))||wn,{rate:d}=c,m=aa(d,e),h=n+m,u=i?.rateRows||[wn];return{...c,...$n(["minSum","maxSum"],u),...$n(["minMonths","maxMonths"],u),availableMonths:En(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},aa=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},ia=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],ra=(e,t)=>e+Math.round((t-e)/2),sa=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[r,{field:s}]=M({moneyValue:2e4,monthsValue:0,isMonthlyInterestPayment:!1,isRemoteRegistration:!1}),o=na(r,t,i),{defaultMonth:c,rate:d,income:m,finalSum:h}=o,{onChange:x}=s("monthsValue");return a((()=>{x&&x(c)}),[c]),p("section",{className:w("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[Rn({title:"Сумма, ₽",min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Xn({title:"Срок, месяцев",min:o.minMonths,max:o.maxMonths,availableMonths:o.availableMonths,...s("monthsValue"),value:o.monthsValue}),oa({...o,...i},s)]}),u("div",{className:"border-b border-main-divider md:hidden"}),Mn({rate:d}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(fn,{title:"Доход в конце срока",value:m,postfix:"₽",prefix:"+"}),u(fn,{title:"Сумма в конце срока",value:h,postfix:"₽"}),Al(l,{isVertical:!0}),Sn(n)]})]})})),oa=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?On({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},jn({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},ca=e=>da({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&da({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),da=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],ma=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=Pn(t||"refinancing-calculator-data"),c=o?.rateRows||[vn],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>ca({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=Ln(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=Ln(["minMonths","maxMonths"],d,c),x=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>ca({row:e,userInputParams:t,paramsViewSettings:l})&&Fn(n+r,["minSum","maxSum"],e)&&Fn(i,["minSumOld","maxSumOld"],e)&&Fn(r,["minSumExtra","maxSumExtra"],e)&&Fn(a,["minMonths","maxMonths"],e)))||vn)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:g}=x,f=Zn(g,e),b=e.oldMonthlyPayment-f;return r((()=>({...x,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},ha=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=M({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=ma(i,t,a);return p("section",{className:w("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[Rn({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),Rn({title:"Ежемесячный платеж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),Xn({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),ua({...s,...a},r),s.isExtraMoney?Rn({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null]}),Mn({rate:s.rate,fractionDigits:1}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(fn,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(fn,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,qn({orientation:"vertical",...r("isAnnuity")}),Al(l,{isVertical:!0}),Sn(n)]})]})})),ua=(e,t)=>p("div",{className:"space-y-s",children:[e.isShowSalaryClient?u(jt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(jt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u(jt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),pa={CreditCalculatorForm:ta,DepositCalculatorForm:sa,BusinessDepositCalculatorForm:Wn,BonusCalculatorForm:zn,RefinancingCalculatorForm:ha},xa=x((({className:e,calculatorTabs:t=[],...l})=>u(S,{className:e,defaultPadding:"p-0",...l,children:fa(t)}))),ga=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in pa))return null;const l=pa[t];return p("div",{className:"p-xl",children:[e?.calculatorBlock?.title?u(T,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,u(l,{...e.calculatorBlock,isMobile:!0})]})},fa=e=>{if(!e||!e.length)return null;return 1===e.length?ga(e[0]):e.map(((e,t)=>u(xn,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(gn,{isUnfolded:t,children:ga(e)}),renderFoldButton:ba(e)},t.toString())))},ba=e=>({isUnfolded:t,onToggle:l})=>p("button",{onClick:l,className:"w-full p-xl bg-primary-main flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(Ae,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(he,{align:"text-left",color:"text-white",children:e.nav?.title}),u(he,{align:"text-left",size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(Ae,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]}),ya=x((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=ut(e,{normalize:(e=a)=>l&&n?String(pt(Number(va(e)),l,n)):va(e),format:xt(r)}),c=i((e=>t&&t(va(e))),[t]);return u(xe,{onChange:c,...s,...o})})),va=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Na=x((e=>u(ya,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(he,{size:"text-xl",font:"font-light",children:"₽"})})}))),wa={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},ka={amount:1500,_amount:1500},Sa=x((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:a,formType:i="private",...r})=>{const[{amount:s,_amount:o},{field:c}]=M(ka),d=s<=0,m=d?re({version:a?.version}):se({className:"text-white",version:a?.version}),h=J();return p(S,{className:w("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?u(T,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:wa[i],children:[u(Na,{name:"_amount",valid:!d,placeholder:n,label:l,...c("_amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:o}),a?.text?u("button",{type:"submit",className:w("w-full p-m mt-lg",m),disabled:d,...h(a),children:a.text}):null]})]})})),Ca=(e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},Ia=x((({className:e,disabled:t,...l})=>u(oe,{rounded:!0,className:w("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,...l,children:u(dl,{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"})}))),Ta=x((e=>u(Ia,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Ba=x((e=>u(Ia,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Ma="absolute top-[calc(50%-24px)] z-40",Ra="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Pa=x((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,x=a?t<l-1:c,g=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[Va(e),h?u(Ta,{className:w(Ma,n?"left-1 @lg:left-8":"left-0"),onClick:g}):null,x?u(Ba,{className:w(Ma,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),Va=e=>p("div",{children:[e.canScrollLeft?u("div",{className:w(Ra,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:w(Ra,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),za=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),_a=[];function Aa(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=za,blocksRegistry:r={},ancestors:s=_a}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:w(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const Da=[],ja=(e,{key:t,ancestors:l=Da,slotName:n=null,extraProps:a,renderProps:i=Aa,...r})=>{const s=a?(e,t)=>Aa(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||Da,[r.parent,n]]:l},a)))};function Oa({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?ja(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const Ea=({className:e,text:t="ХИТ"}={})=>p("div",{className:w("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[u(Ae,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(me,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),La="relative h-full",$a={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},Fa=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(Wa);return Oa({...n,renderProps:(n,a,r)=>p("div",{className:Ua(n,{someCardsHighlighted:i}),children:[Aa(n,a,{className:Ha(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Wa(n)?Ea({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},Ua=(e,{someCardsHighlighted:t})=>w(La,t&&(Wa(e)?"pt-3xl":"pt-3xl sm:pt-16")),Ha=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>w(La,"min-w-80",$a[n],t&&(Wa(e)?"pt-3xl sm:pt-16":"pt-3xl"),l&&"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider h-full"),Wa=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Ka=x((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...o})=>{const{blocks:c=[]}=o.block||{},d=t||c?.length,[m,{inc:h,dec:x}]=Ca({itemCount:d,visibleItemCount:l},Math.floor(l/2)),[g,f]=cn({itemCount:d}),[b]=f.visibleIndicesRange,y=c&&"CarouselBankHistoryCard"===c[0]?.type;return p(S,{className:e,defaultPadding:"p-6xl",...o,children:[p("div",{className:w(a?"flex justify-center":"","relative max-w-full"),children:[u(Gl,{containerRef:g,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:Fa({noCardBorder:n,activeIndex:m,cardSize:s,...o})}),u(Pa,{scroll:f,arrowsPadded:i,onScrollLeft:x,onScrollRight:h,hasEdgeBlocks:y,activeIndex:m,itemCount:d})]}),u(en,{className:"@5xl:hidden",containerRef:g,activeIndex:b,dotCount:d,listType:"horizontal-list"})]})}));Ka.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","ProductBlock"],Ka.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const Ya=x((({title:e,description:t,className:l})=>u(S,{className:l,defaultPadding:"p-6xl",children:u($l,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),Xa="z-10 border border-solid w-full h-full",Ga=w(Xa,"absolute hidden @xl:block border-transparent"),qa=x((({className:e,title:t,description:l,button:n,...a})=>u(S,{className:w("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative h-full",children:[u("div",{className:w(Ga,"top-9 right-12 bg-green-dark")}),u("div",{className:w(Ga,"top-6 right-8 bg-green")}),u("div",{className:w(Ga,"top-3 right-4 bg-green-light")}),p("div",{className:w(Xa,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-light"),children:[u($l,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Al([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Ja={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Qa=x((({className:e,defaultPadding:t,padding:l,title:n="",insetTitle:a="",buttons:i,leftImage:r,rightImage:s,imageAlign:o,isImageAlwaysOnRight:c=!1,isImageSecondary:d=!1,children:m})=>p("div",{className:w("relative flex flex-col gap-3xl overflow-hidden",l||t,e),children:[n?u("div",{className:"relative",children:n}):null,p("div",{className:w("grow relative flex flex-col @md:flex-row gap-3xl",r?"self-start":""),children:[li(r,{imageAlign:o,className:"m-auto"}),p("div",{className:w("grid gap-3xl",s?"@xl:grid-cols-2":"",r?"":"grow"),children:[p("div",{className:"grow space-y-lg min-w-fit",children:[a,m]}),li(s,{className:w("@xl:justify-self-end @xl:col-start-2",i?Za(c):"",ei(c),ni(d)),imageAlign:o}),ti(i)]})]})]}))),Za=e=>e?"row-span-2":"@xl:row-span-2",ei=e=>e?"justify-self-end col-start-2 self-center":"",ti=e=>e?u("div",{className:"self-end",children:e}):null,li=(e,{className:t,imageAlign:l})=>e?u("div",{className:w("shrink-1/2 justify-self-center",l&&Ja[l],t),children:e}):null,ni=e=>e?"hidden @md:block":"",ai={black:"bg-black",white:"bg-white"},ii=x((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:o,...c})=>u(S,{className:w("flex flex-col justify-left",e),defaultPadding:"p-2xl",...c,children:p(Qa,{className:"h-full",padding:o,title:t||l?u($l,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}):null,rightImage:n?.src?u(dl,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Al([i],{buttonClassName:"w-full self-end"}),children:[r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(he,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(ri)]}):null,a?p(he,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),ri=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${ai[e]}`},String(t)),si="hidden xl:block absolute w-full h-full border border-white",oi=x((({text:e,href:t="",target:l="",className:n=""})=>{const a=J()({href:t,target:l});return e?u("div",{className:w("flex relative group/link pl-s pb-s min-w-[16rem] xl:min-w-[20rem]",n),children:p("div",{className:"relative min-h-16 w-full",children:[p("a",{className:w("absolute border\n bg-white flex justify-between group-hover/link:text-primary-main","sm:rounded-md rounded-none w-full px-xl py-lg whitespace-nowrap z-10"),role:"link",...a,children:[u(he,{size:"text-l",font:"font-light",color:"text-primary-text",children:e}),u(dl,{className:"group-hover/link:brightness-100 hidden xl:block ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main hidden xl:block",width:"24",height:"24"})]}),u("div",{className:w(si,"-bottom-1.5 -left-1.5")}),u("div",{className:w(si,"-bottom-3 -left-3")})]})}):null})),ci=x((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>u(S,{className:w("overflow-hidden",e),...i,children:p("div",{className:"flex flex-col @6xl:flex-row gap-m",children:[p("div",{children:[u($l,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),t?u($l,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0}):null]}),n?.length?di(n,"@6xl:min-w-[672px] p-0 justify-self-end"):null]})}))),di=(e,t="")=>{const l=Math.ceil(e.length/3);return u(Ka,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",children:new Array(l).fill(null).map(((t,l)=>u("div",{className:w("flex flex-wrap gap-2xs self-start xl:justify-center @5xl:grid @5xl:grid-cols-2"),children:e.slice(3*l,3*(l+1)).map(((e,t)=>u(oi,{...e},String(t))))},String(l))))})},mi=x((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=J({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?i:{},children:a})})),hi={L:"w-1.5 h-1.5 mr-m",M:"w-1.5 h-1.5 mr-s",S:"w-1 h-1 mr-xs",XS:"w-1 h-1 mr-xs"},ui=x((({className:e,isDotted:t=!0,children:l,size:n="M"})=>p("div",{className:w("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:w("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",hi[n])})}):null,u("span",{children:l})]}))),pi={XS:"text-m font-light",S:"text-l font-light",M:"text-h6",L:"text-h5"},xi={XS:"ml-2xs",S:"ml-xs",M:"ml-s",L:"ml-m"},gi=x((({className:e,hasIndent:t,isDotted:l,items:n,listItemSize:a="M"})=>n?.length?u("section",{className:w("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",pi[a],t?xi[a]:"",e),role:"list",children:n.map(((e,t)=>u(ui,{isDotted:l,size:a,children:e},String(t))))}):null)),fi=x((({additionalDescription:e,align:t="text-left",button:l={},className:n="",description:a,headlineSmallVersion:i="H6",href:r,icon:s,isDotted:o=!0,isButtonFullWidth:c=!0,isImageFullWidth:d=!1,isTopPosition:m=!1,items:h=[],target:u,title:x,version:g="primary",...f})=>p(S,{className:w("flex flex-col justify-between",n),defaultPadding:"p-0",version:g,...f,children:[p(mi,{className:"p-m flex flex-col gap-xs",href:r,target:u,children:[yi(i,x,t),vi(a,t),wi(h,o,g),Ni(e,t),bi(s,d,m)]}),Al([l],{className:w("p-m pt-0",c?"":"self-center"),isVertical:c})]}))),bi=(e,t,l)=>p("div",{className:w("flex gap-y-lg justify-center",t?"min-w-full h-full":"",l?"order-first":"order-last"),children:[e?.src?u(dl,{image:e}):null,e?.icon?u(dl,{className:w(t?"w-full h-full":"w-8 h-8 min-w-8"),image:e}):null]}),yi=(e,t,l)=>t?u(he,{align:l,size:Ll[e],children:t}):null,vi=(e,t)=>e?u(me,{align:t,size:"text-l",children:e}):null,Ni=(e,t)=>e?u(he,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,wi=(e,t,l="primary")=>e?.length?u(gi,{className:w("text-s","primary"===l?"!text-secondary-text":""),items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,listItemSize:"S"}):null,ki=(e=[])=>e.reduce(((e,t)=>e+t),0),Si=(e=[])=>e?.length?ki(e)/e.length:0,Ci=(e,t="normal")=>e?u("div",{className:w("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:u(dl,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Ii=x((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?u("div",{className:w(l,"md-container"),dangerouslySetInnerHTML:{__html:t}}):null})),Ti=(e,t)=>e?u(me,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Bi=(e,t)=>e?u(he,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Mi=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Ii,{...e},`rte-${t}`):["label"in e?Bi(e.label,t):null,"description"in e?u("span",{className:e.descriptionClassName,children:Ti(e.description,t)},String(t)):null],Ri=x((({className:e,benefitsVersion:t,...l})=>p("div",{className:w("flex gap-m min-w-56 items-center",e),children:["icon"in l?Ci(l.icon,t):null,u("div",{children:Mi(l)})]}))),Pi=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Vi=e=>{return((t=e.map(Pi))?.length?Math.sqrt(Math.abs(Si(t.map((e=>e**2)))-Si(t)**2)):0)>16;var t},zi=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),_i=e=>!e.some(zi),Ai=x((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:w("flex gap-x-m gap-y-s",Vi(l)||_i(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Ri,{benefitsVersion:t,...e},String(l))))}):null)),Di=x((({className:e,benefits:t})=>t?.length?u("div",{className:w("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Mi)}):null)),ji=x((({isTabularBenefits:e,...t})=>u(e?Di:Ai,{...t}))),Oi=x((({className:e,tags:t})=>t?.length?u("div",{className:w("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ei)}):null)),Ei=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(he,{size:"text-m",font:"font-light",children:e})},String(t)),Li=x((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m,items:h,isDotted:x=!0,listItemSize:g,tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},children:S})=>{const C=y?.src?u(dl,{image:y}):null,I=Ui({title:n,description:a,headlineVersion:i,align:r}),T=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(Qa,{className:e,padding:t,defaultPadding:l,...m?{title:I}:{insetTitle:I},...$i(C,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Al(b),children:p("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[T?.length?u(ji,{benefitsVersion:s,isTabularBenefits:o,benefits:T}):null,d?u(Ii,{__html:d}):null,h?.length?u(gi,{items:h,isDotted:x,listItemSize:g}):null,S,Fi(f)]})})})),$i=(e,t)=>t?{rightImage:e}:{leftImage:e},Fi=e=>e?.length?u(Oi,{tags:e}):null,Ui=({title:e,description:t,headlineVersion:l,align:n})=>e||t?u($l,{title:e,description:t,headlineVersion:l,align:n,isEmbedded:!0}):null,Hi=[{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:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Wi=e=>Hi.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},Ki=x((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,o]=n(),c=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=Wi(t),c=_l(n)?n:r,d=l?{text:a}:{text:""};return!s&&a&&o(!0),{...e,...d,icon:{...c,iconVersion:"color"},version:i}})),d=w("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",a?"flex-1 justify-center":"");return p("div",{className:w("flex flex-col gap-xs",e),children:[u("div",{className:"flex gap-xs",children:Al(c,{className:a?"w-full":"",buttonClassName:d})}),r?u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Yi=x((({className:e,padding:t,description:l,href:n,icon:a,items:i=[],listItemSize:r="S",socialMedia:s=[],target:o,title:c,align:d="text-left",benefits:m,imageOptions:{directionRight:h=!0,isImageAlwaysOnRight:x=false,isImageSecondary:g=!1}={},...f})=>u(S,{className:w("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...f,children:u(mi,{href:n,target:o,className:"h-full",children:p(Qa,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:c?u($l,{title:c,description:l,headlineVersion:"S",isEmbedded:!0,align:d}):null,...$i(_l(a)?u(dl,{image:a}):null,h),buttons:s.length?u(Ki,{media:s,showButtonText:!0,version:f?.version}):null,isImageAlwaysOnRight:x,isImageSecondary:g,children:[u(ji,{benefits:m}),u(gi,{items:i,listItemSize:r})]})})}))),Xi=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(he,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(he,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:Al(a)}):null]},String(t))},Gi=x((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(Xi),o=s.slice(0,1),c=s.slice(1);return p(S,{className:w("flex flex-col",e),defaultPadding:"p-2xl",...r,children:[_l(n)?u("div",{className:"self-center",children:u(dl,{image:n})}):null,t?u(T,{className:w("pt-xs",l),headingType:"h5",title:t}):null,a?u(oe,{className:"w-full mt-m mb-lg",...a}):null,i.length?u(xn,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(gn,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?qi:null}):null]})})),qi=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(Ae,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Ji=(e=!1)=>e?"text-white":"",Qi=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),Zi=x((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(dl,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(dl,{image:t})}),l?u(T,{headingType:"h4",className:Ji(a),title:l}):null,n?u("div",{className:Qi(a),children:n}):null]}))),er=x((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:w("h-full","border-main-divider border-b"),children:e.map(tr(l,t))})}))),tr=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:w("text-right",e?"text-white":""),children:l}):null,n?u("div",{className:w("text-right",e?"text-white/80":"text-secondary-text"),children:n}):null]})]},String(a)),lr=x((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:w("border border-gray rounded-md p-m mb-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),role:"row",children:[u(Zi,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(er,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(oe,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,nr({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),nr=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:l?"Скрыть":"Показать описание"})}),ar=x((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(T,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(ir,{...e})})]})})),ir=x((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(lr,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(dn,{onVisibleIndicesChange:m,children:h}):h})),rr=x((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>p(l,{tag:l,className:w("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?u("div",{children:e}):null,t?u("div",{children:t}):null]}))),sr=x((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>u(rr,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:w("py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:u("span",{className:"text-h4 pr-s",children:t}),iconNode:l?u(dl,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),or=({isUnfolded:e,onToggle:t})=>u(sr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),cr=x((({title:e,description:t})=>p("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[u(dl,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),u($l,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:Il})]}))),dr=["ArrowDownIcon","ArrowUpIcon"],mr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",hr=x((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return p("div",{children:[u("div",{className:w(t.length?"hidden":"block"),children:a?u(cr,{...a}):null}),p("div",{className:w("space-y-2xs",t.length?"":"hidden"),children:[u("div",{className:w(mr),children:ja(r,{...i.options,parent:n})}),u(xn,{renderFoldableSection:({isUnfolded:e})=>u(gn,{className:w(mr),isUnfolded:e,children:ja(s,{...i.options,parent:n})}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(sr,{className:w(l<1?"hidden":""),disabled:!s?.length,label:e,icon:dr[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),ur=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,pr=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>ur(t[e])||ur(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>ur(t[e])||ur(l[e])||xr(t[e])<=xr(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>ur(t[e])||ur(l[e])||xr(t[e]?.min)>=xr(l[e]?.min)&&xr(t[e]?.min)<=xr(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>ur(t[e])||ur(l[e])||t[e]?.some((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>ur(t[e])||ur(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),xr=e=>Number(e||0),gr=(e,t)=>(l=B)=>e&&e.filter((e=>pr(t,l(e.content||{})))),fr=x((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(Je,{text:l.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(t)if(n){const n=e?.includes(l);t(n?(e||[]).filter((e=>e!==l)):[...e||[],l])}else t(e===l?"":l)})(l.value),type:n?"checkbox":"radio"},l.value))))),br=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(yr(e))]}),n?u("div",{children:u(oe,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,...n})}):null]}),yr=e=>([t,l])=>{const n=l?.type;return"array"===n?vr(t,e)(l):null},vr=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(fr,{items:n,multiple:!0,...t(e)})]},e)},Nr=(e,t)=>e[t?.sourceBook]?.rateRows.map((e=>e.minMonths)).filter((e=>void 0!==e));async function wr(...e){const t=e.map((e=>j(e)));return Promise.all(t)}function kr(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const Sr=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function Cr(e){const{dirs:t=[],source:l=[]}=r((()=>{const t=(e=>e?.filter(Sr).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=A(t,wr);return{source:Object.fromEntries(kr(l,n).filter((([,e])=>Boolean(e)))),months:(a=n.flatMap((e=>e?.rateRows||[])).filter((e=>"number"==typeof e.minMonths&&e.minMonths===e.maxMonths)).map((e=>e.minMonths)),[...new Set(a)]).sort(((e,t)=>e-t))||[]};var a}const Ir=1e9,Tr={sum:{min:1e4,max:Ir},period:3},Br=x((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=Cr(i.block?.blocks),[o,{field:c,reset:d}]=M(Tr),m=gr(i.block?.blocks,o)((e=>({...e,period:Nr(r,e||{})||[]}))),h=p("div",{children:[u(Na,{label:n?.title,min:500,max:Ir,...c("sum",{parse:e=>({min:Number(e),max:Ir}),format:({min:e})=>String(e)})}),u(vt,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...c("period")})]});return p(S,{className:w("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[br({field:c,reset:d,filtrationSchema:t,resetButton:l,children:h}),u(hr,{blocksToRender:m,...i})]})})),Mr={type:"string",title:"Адрес справочника"};Br.childrenTypes=["ProductTile"],Br.childSchema=e=>({...e?.filtrationSchema||{},sourceBook:Mr});const Rr=e=>"Image"===e?.contentType&&e?.image?u(dl,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Pr=x((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(S,{className:w("flex flex-col justify-center items-center",e),defaultPadding:w("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:Rr(n)}),u($l,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?u(oe,{version:a?.version,text:a?.text,...a}):null]})));var Vr;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(Vr||(Vr={}));const zr=new Intl.NumberFormat("ru",{style:"currency",currency:Vr.RUB}),_r=e=>e?zr.format(e):"",Ar="text-left text-m font-light text-secondary-text",Dr=`${Ar} pl-5xl`,jr={USD:"DollarIcon",EUR:"EuroIcon"},Or=x((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Ar,children:u(he,{size:"text-m",children:"Валюта"})}),u("th",{className:Dr,children:u(he,{size:"text-m",children:"Купить"})}),u("th",{className:Dr,children:u(he,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Er)})]}))),Er=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(dl,{image:{icon:jr[t]},width:"24",height:"24"}):null,u(he,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(he,{size:"text-h6",children:_r(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(he,{size:"text-h6",children:_r(e?.buyExchangeRate)})})]},t)},Lr={icon:"GpsIcon"},$r=x((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Bl,{...Lr,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),Fr=(e,t,l)=>{const n=Number(Ur(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Ur=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Hr=e=>{return(t=[[e=>e.value!==Vr.RUB&&e.oppositeValue!==Vr.RUB,()=>e.handleConvert(e.value,Vr.RUB)],[e=>e.value===Vr.RUB&&e.oppositeValue===Vr.RUB,()=>e.handleConvert(e.value,Vr.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Wr(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(xe,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(We,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const Kr=x((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Vr.RUB,selectBuy:l?.[0]?.currency?.currency||Vr.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Wr({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Yr(r,o,l),value:r.inputSell,setValue:e=>Gr(o,l)(e,r.selectSell,r.selectBuy)}),Wr({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Xr(r,o,t),value:r.inputBuy,setValue:e=>qr(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(oe,{text:a.text,version:a?.version,...a}):null]})})),Yr=(e,t,l)=>n=>{t({selectSell:n}),Hr({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{Gr(t,l)(e.inputSell,n,a)}})},Xr=(e,t,l)=>n=>{t({selectBuy:n}),Hr({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>qr(t,l)(e.inputBuy,n,a)})},Gr=(e,t)=>(l,n,a)=>{e({inputSell:Ur(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Fr(l,i,n===Vr.RUB)||"")})},qr=(e,t)=>(l,n,a)=>{e({inputBuy:Ur(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Fr(l,i,n===Vr.RUB)||"")})};const Jr=async e=>{const t=await Qr(),l=t?.code||"000";return{region:t,exchangeRates:await Zr(e,l)}},Qr=async()=>{try{return await O("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},Zr=async(e,t)=>{try{return await O(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},es=x((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:a}=function(){const{data:e}=A("/api/v1/exchangerates",Jr);return e||{}}(),i=ts(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:Vr.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:Vr.RUB}}),u(S,{className:w("box-border min-h-80",e),...n,children:u(Qa,{className:"h-full",title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[i?u(Or,{className:"mb-xl",exchangeCurrencyItems:i}):null,u($r,{address:a?.address})]}),i.length&&r.length&&s.length?u(Kr,{className:"grow",currencyRatesBuy:r,currencyRatesSell:s,button:l}):null]})})})})),ts=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],ls=e=>zt(d.SITEMAP||"sitemap",{fallback:e}),ns=()=>{const e=globalThis.document?.cookie.split(";")??[];for(const t of e){const[e]=t.split("=");globalThis.document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}},as=(e,t)=>u(Bl,{...e,iconBgVersion:t,className:"shrink-0"}),is=x((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>u(rr,{tag:"button",className:w("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[as(a,t),e?u(he,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?u(Ae,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),rs=x((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,version:r="primary",...s})=>u(S,{className:w("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...s,children:u(xn,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(gn,{className:w("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:Oa({...s,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ss({version:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));rs.childrenTypes={exclude:["RollupItem"]};const ss=({version:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=(e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"primary"===e?u(is,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):u(sr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},os=x((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(cs):null,u(oe,{version:"primary",className:"w-full",href:"https://old.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),cs=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(he,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(ds)})]},String(t)),ds=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:ms(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),ms=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${hs(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},hs=e=>e.replaceAll(/\D/g,""),us=x((({className:e="",index:t,text:l,...n})=>{const a=J(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),ps=x((({title:e,links:t,className:l=""})=>p("div",{className:w("flex flex-col gap-4",l),children:[u(he,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>u(us,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),xs=x((({className:e="",items:t,basePath:l})=>t?.length?u("ul",{className:w("flex flex-col",e),children:t.map(gs(l))}):null)),gs=e=>(t,l)=>{const{text:n,...a}=t,i=J({isRemote:!(!d.BASE_PATH||!e)&&!d.BASE_PATH.startsWith(e),basePath:e}),{href:r,target:s,onClick:o}=i(a);return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",href:r,target:s||"_self",onClick:o,children:n||null})},`list_item_${String(l)}`)},fs=x((({className:e="",index:t,...l})=>{const n=J({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),bs=x((({className:e="",links:t})=>p("div",{className:w("@container",e),children:[u("div",{className:"pt-lg",children:u(he,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(fs,{index:t,...e},String(t))))}):null]}))),ys=x((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=ls(l),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:c,documents:m}=zt(d.FOOTER||"footer",{fallback:l});return p(S,{tag:"footer",className:e,defaultPadding:"p-4xl pb-24",...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(rs,{label:e?.text,labelIcon:e?.icon,children:u(xs,{items:e.items,basePath:o(e.href)})},String(t))))}),u(os,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(Ki,{className:"mb-xl",media:r,stretched:!0,children:"Соцсети"}),p("div",{className:"mb-xl",children:[u("div",{className:"flex flex-col gap-4 mb-xs",children:s?.map(vs)}),u(he,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),u("div",{className:"py-lg border-t border-main-divider",children:u(us,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:ns})}),u(ps,{className:"py-lg border-y border-main-divider",title:c,links:a}),u(bs,{links:m})]})})),vs=({href:e="/",text:t},l)=>{const{label:n}=Wi(e);return u(oe,{className:"w-full",text:t||n,version:"secondary",href:e,target:"_blank"},String(l))},Ns={width:"34",height:"34"},ws={"bg-white":"color",transparent:"white"},ks={"bg-white":"text-primary-main",transparent:"text-white"},Ss=(e,t,l)=>u(dl,t?.src?{image:t,className:ks[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:ws[e]},className:ks[e],width:l?.width,height:l?.height}),Cs={"bg-white":"text-primary-text",transparent:"text-white"},Is=x((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:w("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[Ss(i,l?.image,Ns),r?n??u("div",{className:"ml-s",children:u(he,{font:"font-medium",color:Cs[i],size:"text-s",children:l?.title||"Россельхозбанк"})}):null]}))),Ts={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Bs=x((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=q(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u("div",{children:u(Is,{className:"my-2xs",bgColor:e,logo:t})}):Ms(s),l?u("div",{children:u(oe,{href:l,ariaLabel:"Войти",target:"_blank",className:w("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",Ts["transparent"===n?"transparent":"default"]),children:"Войти"})}):null]})})),Ms=e=>u("div",{children:p("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(dl,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),Rs={"bg-white":"primary",transparent:"transparent"},Ps=x((({bgColor:e="bg-white",version:t=Rs[e],...l})=>{const{logo:n}=ls(l.options?.page?.fallback),{internetBankUrl:a}=zt(d.PORTAL_DATA||"portal-data",{folderName:"portal-resources",setBasePath:!0});return u(S,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(Bs,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),Vs={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},zs=x((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,...r})=>u(S,{className:w("relative flex flex-col",Vs[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...r,children:Oa({...r,extraProps:{className:"w-full",padding:n?"":"p-0"}})})));zs.childrenTypes=[];const _s=x((e=>u(zs,{...e})));_s.childrenTypes=[];const As=x((e=>{const{className:t,image:l,...n}=e;return u(S,{className:t,defaultPadding:"p-0",...n,children:u(dl,{image:l})})})),Ds=["байт","Кб","Мб","Гб","Тб","Пб"],js=x((({icon:e,text:t,fileSize:l,...n})=>p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",...n,children:[e,t?p(he,{size:"text-l",font:"font-light",children:[t,u(he,{color:"text-secondary-text",children:n?.href&&Os(Es(n.href),l)})]}):null]}))),Os=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Es=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},Ls={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},$s=x((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=q();return p(S,{className:w("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u($l,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:w("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Ls[r]),role:"list",children:a.map(Fs(o,r,i))}):null]})})),Fs=(e,t,l)=>(t,n)=>{const a="Attachment"===t?.docType?Y(e)(t?.attachment?.src):t?.href,i="Attachment"===t?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Ds[l]}`})(t?.attachment?.fileSize||0):t?.fileSize;return u("div",{role:"listitem",children:u(js,{text:t?.text,target:t?.target,href:a,fileSize:i,icon:l?u(dl,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:l,width:"24",height:"24"}):null})},String(n))},Us=(e,t)=>e?.length?u(gi,{items:e,listItemSize:t,className:"text-l font-light"}):u("span",{className:"text-m font-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Hs=x((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,headingType:i="h4",image:r,items:s,listItemSize:o,qr:c,title:d="Мобильное приложение",version:m="primary",...h})=>{const x="secondary"===m?"p-m min-w-32":"min-w-24",g=r?.src?u(dl,{className:"hidden lg:block",image:r}):null;return u(S,{className:w("min-h-80",e),padding:"p-0",version:m,...h,children:p(Qa,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:d?u(T,{headingType:i,title:d,className:w("whitespace-pre-wrap",l)}):null,rightImage:g,buttons:Al(n,{className:"flex-wrap"}),children:[a?u(he,{size:"text-xl","font-weight":"font-light",children:a}):null,p("div",{className:w("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[Us(s,o),c?.src?u("div",{className:w("flex justify-center bg-white rounded-md @xl:-order-1",x),children:u(dl,{className:"w-fit",image:c})}):null,r?.src?u(dl,{className:"lg:hidden",image:r}):null]})]})})})),Ws={primary:"bg-white/30",secondary:"bg-main-divider"},Ks={primary:"text-white",secondary:"text-secondary-text"},Ys=x((({count:e,version:t="secondary"})=>u("div",{className:w("w-6 h-6 rounded-full flex items-center justify-center",Ws[t]),children:u(he,{size:"text-xs",color:Ks[t],children:e})}))),Xs=(e=[],t={})=>e.filter((({content:e={}})=>pr(t,e))).length,Gs=(e,t)=>e===t;const qs=(Js=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Gs,((e=Gs)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>Js(l,t[e])))));var Js;const Qs=[],Zs={},eo={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},to={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},lo={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},no={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},ao=x((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:w("h-12","block flex-1","cursor-pointer",eo[n],l?no[n]:lo[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:w("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?to[n]:"text-secondary-text hover:text-primary-main"),children:[u(he,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),io=x((e=>u(e?.item?.href?ro:so,{...e}))),ro=x((e=>{const t=J(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(ao,{...e,tag:"a",item:a,onClick:n})})),so=x((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(ao,{item:e,onClick:n,...l})})),oo=(e,t,l)=>(n,a)=>u(io,{isActive:n===e,onClick:t,type:l,item:n},String(a)),co=x((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:w("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(oo(n,a,t))}))),mo={categories:[],extraOptions:[],propertyType:[],stage:[]},ho=x((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:o,reset:c,update:d}]=M(mo),m=gr(a.block?.blocks,s)(),h=i(((e=mo)=>d(e)),[]),x=(({hotFilters:e=Qs,filtrationState:t=Zs,blocks:l=Qs,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>qs(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:u(Ys,{version:t===e[a]?"primary":"secondary",count:Xs(l,t.filter)})})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:h});return p(S,{className:w("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(co,{...x}),br({field:o,reset:c,filtrationSchema:l,resetButton:n}),u(hr,{blocksToRender:m,...a})]})}));ho.childrenTypes=["ProductTile"],ho.childSchema=e=>e?.filtrationSchema||{};const uo=(e,t)=>e||t?p("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:[Number(e)>0?po("Страховая сумма",e):null,Number(t)>0?po("Ежемесячный лимит",t):null]}):null,po=(e,t=0)=>p("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",children:[u(he,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),p("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[xt(2)(t)," ₽"]})]}),xo=x((({className:e,padding:t,headlineVersion:l="M",align:n="text-center",sum:a,monthLimit:i,imageOptions:r,...s})=>u(S,{className:e,padding:"p-0",...s,children:u(Li,{className:"h-full",defaultPadding:"p-6xl",padding:t,headlineVersion:l,align:n,isFullWidthTitle:!0,imageOptions:{directionRight:!1,imageAlign:"center",...r},...s,children:uo(Number(a),Number(i))})}))),go=x((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(S,{className:w("box-border",e),...n,children:[u($l,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:fo()})]}))),fo=(e=3)=>yo(100,e).map((e=>Math.floor(e))).map(bo),bo=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),yo=(e,t)=>[e].concat(t>0?yo(e/1.618,t-1):[]);function vo(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"hidden sm:flex items-center gap-s",children:[u("div",{className:se({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(dl,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(oe,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const No=x((({className:e,padding:t,backwardButton:l,showBorder:n,...a})=>{const r=q(),s=i((e=>{e?.preventDefault(),r.back()}),[]);return p(S,{className:w("overflow-hidden flex flex-col gap-3xl box-border",n?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",e),defaultPadding:"p-6xl",padding:t,...a,children:[l?vo(a.version||"primary",s):null,u(Li,{className:"grow h-full",...a})]})})),wo=x((({className:e,padding:t,slides:l=[],...n})=>u(S,{className:w("overflow-hidden relative",e),padding:t,...n,children:u(dn,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",role:"listitem",children:u(Li,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),ko=x((({className:e,padding:t,headlineVersion:l="S",isTabularBenefits:n=!0,additionalDescription:a,imageOptions:i,isFullWidthTitle:r=!0,...s})=>u(S,{className:e,padding:"p-0",...s,children:u(Li,{className:"h-full",defaultPadding:"p-4xl sm:p-xl",padding:t,headlineVersion:l,isTabularBenefits:n,imageOptions:{isImageSecondary:!0,...i},isFullWidthTitle:r,...s,children:a?u(me,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:a}):null})}))),So=x((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(S,{className:w("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[_l(r)?u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:u(dl,{image:r})}):null,s?u(T,{headingType:"h3",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?Co(i):null,Io({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Io({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Io({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Al([n]):null]})]}))),Co=e=>u("div",{className:"border-b border-main-divider pb-lg",children:u(Ii,{__html:e})}),Io=({label:e,data:t,iconName:l,dataColor:n=""})=>t?p("div",{className:"flex gap-s",children:[u(Ae,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col gap-2xs",children:[u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),u(he,{size:"text-xl",color:n,children:t})]})]}):null,To=x((e=>{const{__html:t,richVersion:l,...n}=e;return u(S,{defaultPadding:"p-0",...n,children:u(Ii,{__html:t,richVersion:l})})}));function Bo(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Mo={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},Ro=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(Mo).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),Po={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},Vo=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Po).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(Ae,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),zo=e=>globalThis[e];const _o=()=>function(e,t){const[l,r]=n(),s=i((()=>r(zo(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!zo(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),Ao={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},Do=x((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(Ao).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(Ae,{name:l,width:"20",height:"16"})})})),jo={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},Oo=[55.753995,37.614069],Eo=x((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=_o(),[o,c]=n(),d=e?Lo(e):Oo;if(a((()=>{i?.current||r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:d,zoom:l,controls:[],suppressMapOpenBlock:!0}),Bo(r,i.current,e))})),i.current&&r&&(Bo(r,i.current,e),e?.length||i.current.setCenter(Oo))}),[r,i,e,d,l]),!r)return null;const m=o?"z-[100000]":"z-10";return p("div",{id:"map",className:w(!o&&"relative","w-full",t),children:[u("div",{className:w("absolute flex left-2 top-4 w-1/2",m),children:Ro(d)}),u("div",{className:w(Object.values(jo),m,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;o?e.exitFullscreen():e.enterFullscreen(),c(e.isFullscreen())},children:u(Ae,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:w("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",m),children:[u(Do,{yandexMaps:i}),u(Do,{yandexMaps:i,direction:"out"})]}),Vo(i.current,r,w("right-2 top-80",m))]})})),Lo=e=>[Fo($o(e,0)),Fo($o(e,1))],$o=(e,t)=>e.map((e=>e[t])),Fo=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Uo=x((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:w("order-4",e),children:[u(ml,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(ml,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Ho=x((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(We,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),Wo=x((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Ho,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(Ho,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Ko=["От 1 дня","До 365 дней"],Yo=x((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(he,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(vt,{min:1,max:365,value:e,items:Ko,onChange:t})]}))),Xo=x((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Ho,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(Ho,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Go=x((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents @xl:block flex-1 space-y-xl",children:[u(Wo,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:qo(c)}),u(Yo,{days:a,setDays:e=>c({days:e})}),u(Xo,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:Jo(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(he,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents @md:flex justify-between items-center gap-m",children:[u(Uo,{}),u(oe,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),qo=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Jo=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Qo=x((({days:e,tariffs:t=[]})=>{const l=ec(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[p("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:[Zo("Аренда за",e),Zo("Цена",l+" ₽")]}),u("span",{className:"@xl:hidden order-3 mb-xs text-s font-light text-secondary-text",children:n}),p("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:[u(dl,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),u("span",{className:"hidden @xl:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),Zo=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),ec=(e,t)=>{const l=tc(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},tc=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},lc=(e,t)=>e.find((e=>e.branchCode===t)),nc=x((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=lc(n,l.selectedBranch),o=ac(s?.safeBoxCaseVolumes),c=ic(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=rc(c,l.selectedBoxSize);return p("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[u(Go,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(Qo,{days:l.days,tariffs:d})]})})),ac=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],ic=(e,t)=>e?.find((e=>e.volume===t)),rc=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,sc=[];const oc=async e=>await j(e,{method:"GET"})||sc,cc=x((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=L(),h=dc(c.selectedRegion,m),x=function(e){const{data:t}=A(e?`/api/v1/safeboxes?regionCode=${e}`:null,oc);return t||sc}(h),g=i((e=>d((t=>({...t,...e})))),[d]),f=(b=lc(x,c.selectedBranch)||x,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(S,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(nc,{regions:m,branches:x,data:{...c,selectedRegion:h},onClick:o,onChange:g}),t?u(me,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(Eo,{points:f,className:"h-[640px]"}):null]})})),dc=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function mc(e){throw new Error(e)}const hc={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},uc={normal:"",small:"min-h-6xl"},pc={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"},xc=x((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",version:r="primary",...s})=>p(S,{className:w("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[u($l,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(gc(i,r))})}):null,Al(a,{isVertical:!0})]}))),gc=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return fc(e,t)(l,n);case"rte":return u(Ii,{__html:l.__html});default:mc(l)}},fc=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:bc(e,t)(l,n)}),p("div",{className:w("flex flex-col justify-center h-fit",uc[e]),children:[l.label?u("div",{className:"text-l text-left",children:l.label}):null,l.description?u("div",{className:w("text-s font-light text-left",pc.description),children:l.description}):null]})]})},String(n)),bc=(e,t)=>(l,n)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",r=Boolean(l?.icon?.src),s=hc[e][r?"image":"icon"];return u("div",{className:w(s,r?"":`rounded-md ${pc.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex max-w-full max-h-full self-center text-h4 text-secondary-text group-data-secondary:text-white",children:_l(l?.icon)?u(dl,{image:{...l.icon,iconVersion:l.icon?.iconVersion||i},imageClassName:"max-w-full max-h-full",width:a,height:a}):u("span",{children:n+1})})})},yc=e=>({href:t})=>!!t&&H(F(t)?e.href:e.pathname).startsWith(H(t));function vc(e=[]){const t=q(),l=e.findIndex((e=>yc(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(t));return[l,e[l]]}const Nc=x((({isActive:e,item:t,onClick:l})=>{const n=J({isRemote:!d?.BASE_PATH||!t.href?.startsWith(d?.BASE_PATH)}),{href:a,target:i,onClick:r}=n({href:t.href,target:"_self"}),s="BurgerIcon"===t?.icon?.icon?t.isActive:e,o=s?"color":"black";return p("a",{className:w(s?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:()=>"BurgerIcon"===t?.icon?.icon&&l?l():r(),href:a,target:i,children:[u(dl,{className:"w-6 h-6",image:{icon:t?.icon?.icon,iconVersion:o}}),t.title]})})),wc=x((({menuItems:e,onClick:t})=>{const[l]=vc(e);return u("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:e.map(((e,n)=>u(Nc,{isActive:n===l,item:e,onClick:t},String(n))))})}));const kc=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>b.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:mc(e)}}))),[c,d]),l},Sc="location";function Cc(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(b,"location",Tc()??{name:e}),r=i((e=>{Bc(e),l(e)}),[]),{data:s}=A("/api/v1/region",O);return a((()=>{s&&!Ic()&&l(s)}),[s]),[t??{name:e},r]}const Ic=()=>Boolean(globalThis.localStorage?.getItem(Sc)),Tc=()=>{try{const e=globalThis.localStorage?.getItem(Sc);return e&&JSON.parse(e)}catch(e){return null}},Bc=e=>{try{globalThis.localStorage?.setItem(Sc,JSON.stringify(e))}catch(e){}},Mc=x((({className:e,onClose:t})=>u("button",{className:w("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(dl,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),Rc=x((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=$(),r=i((()=>{a(),n&&n()}),[n]);return p("div",{className:w("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(Mc,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})}));const Pc=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=new Array(e.length),a=new Array(t.length);let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const Vc=e=>e?.length?p("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(he,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>u(zc,{...e},String(t))))})]}):null,zc=x((({icon:e,...t})=>{const l=J(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s items-center",children:[e?u(dl,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:u(he,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),_c=e=>t=>u("div",{className:"mb-xs sm:mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:u(he,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),Ac=x((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Dc=x((()=>{const{defaultLocation:e,foreignOffices:t}=ls(),[l,a]=Cc(e),[r,s]=n(""),o=Oc(function(){const{data:e}=A("/api/v1/regions",O);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(o,jc),{close:d}=$(),m=i((e=>{a(e),d()}),[]);return p(Rc,{className:"pb-20",head:p("div",{children:[u(he,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?p("div",{className:"mb-s",children:[u(he,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(l),children:u(he,{color:"text-primary-main",children:l.name})})]}):null,u(Ac,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&Pc(e.toLowerCase())(r.toLowerCase())>=.8)).map(_c(m))}):u("div",{className:"columns-1 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(he,{size:"text-h6",children:e})}),t.map(_c(h))]},e)))}),Vc(t)]});var h})),jc=e=>e.name?.charAt(0)||"",Oc=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Ec=x((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:w("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(dl,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:w("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})}));function Lc(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const $c=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},Fc=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Uc=e=>t=>e.map((([e,l])=>[Pc(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>Wc(t,e))).reduce($c(Math.max,0),new Map),Hc=e=>t=>{return kr(t,t.map((({title:e})=>e)).map((e=>t=>{const l=Fc(t||"");return l.length?ki(e.map((e=>nn(l.map(Pc(e)))))):0})(e))).sort((e=>(t,l)=>-e(t,l))((l=([,e])=>e,(e,t)=>l(e)-l(t)))).map((([e])=>e));var l},Wc=(e,t)=>new Map(e.map((e=>[e,t]))),Kc=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=A(e?.length?e:null,Yc),[s,o]=n(null);return Lc((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=Fc(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(Uc(i)).reduce($c(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return Hc(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},Yc=async(...e)=>(await Promise.allSettled(e.map((e=>j(W(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Xc=x((({className:e,topItems:t})=>{const l=J({isRemote:!0});return u("div",{className:w("flex items-start justify-between",e),children:t?.map(l).map(qc)})})),Gc=["all","footer"],qc=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||Gc.includes(e.displayArea.toLowerCase())));return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>u(Jc,{...e,basePath:o(a),index:t},String(t))))]},String(t))},Jc=x((({text:e,index:t,basePath:l,...n})=>{const a=J({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:w("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),Qc=x((({initialQuery:e})=>{const{topItems:t}=ls(),l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,i]=Kc({basePathList:l,initialQuery:e}),s=r((()=>Zc(t)(n)),[t,n]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(Rc,{head:u(Ec,{autoFocus:!0,...i}),children:u(Xc,{topItems:s})})})),Zc=e=>t=>e?.length&&t?.length?kr(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:W("/",t)})))}))):[];const ed=x((({className:e})=>{const[t,l]=n(""),a=i((()=>l("")),[]),{open:r}=(()=>{const{open:e,close:t}=$();return{open:(t={},l={})=>e(u(Qc,{...t}),l),close:t}})(),s=i((e=>{l(e),td(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:w("relative",e),children:[u(Ec,{value:t,onChange:s}),u(Mc,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),td=e=>e&&e.length>=3,ld=x((({item:e,basePath:t})=>{const l=J({isRemote:!(!d.BASE_PATH||!t)&&!d.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=q(),s=yc(r)({href:n});return p("a",{className:w(s?"text-primary-main":"text-primary-text","py-3 text-h5 font-light flex justify-between cursor-pointer"),href:n,target:a,onClick:i,children:[e.text,u(dl,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]})})),nd=x((({activeMenuSubItems:e,basePath:t})=>e?u("div",{className:"mb-5",children:e.map(((e,l)=>u(ld,{item:e,basePath:t},String(l))))}):null)),ad=({item:e,isActive:t,onClick:l})=>p("button",{type:"button",className:"relative",onClick:l,children:[u("span",{className:w("whitespace-nowrap",t?"text-primary-main":""),children:e.text}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]}),id=x((e=>{const{topItems:t,officesLink:l,defaultLocation:s}=ls(e.options?.page?.fallback),[o]=Cc(s),c=(()=>{const{open:e,close:t}=$();return{open:(t={})=>e(u(Dc,{}),t),close:t}})(),d=i((()=>c.open()),[]),[m,h]=cn({itemCount:t?.length??0}),[x]=vc(t),[g,f]=n(x),b=r((()=>t?.[g]),[t,g]),y=b?.items||[];a((()=>{f(x)}),[x]),a((()=>{g>0&&h.scrollTo(g)}),[g,h]);const v=i((e=>f(e)),[]);return u(Rc,{head:u("div",{className:"flex items-center",children:u(T,{as:"h4",title:"Меню"})}),children:p("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[u("div",{className:"w-full mb-3",children:u(Gl,{containerRef:m,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>u(ad,{item:e,isActive:g===t,onClick:()=>v(t)},String(t))))})}),p("div",{className:"relative grow overflow-auto",children:[u(nd,{activeMenuSubItems:y,basePath:b?.href}),u(ed,{className:"grow mb-5"}),rd(l),p("div",{className:"flex items-center text-s cursor-pointer",onClick:d,children:[u(dl,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),p("div",{className:"flex flex-col items-start",children:[u(he,{size:"text-h5",children:o.name}),u(he,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]})]})]})})})),rd=e=>e?p("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[u(dl,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),u("span",{children:"Офисы и банкоматы"})]}):null,sd="burgerMenuDialog",od=x((({...e})=>{const{menuItems:t=[]}=zt(d.STICKY_MOBILE_MENU||"sticky-mobile-menu",{fallback:e.options?.page?.fallback,folderName:"portal-resources",setBasePath:!0}),[l,{toggle:n}]=(()=>{const{open:e,closeAll:t,close:l}=$(),n=kc(),a=((e,t)=>t.find((t=>t.id===e),e))(sd,n),r=i((()=>e(u(id,{}),{id:sd})),[]),s=i((()=>{a?t():r()}),[a]);return[Boolean(a),{open:r,close:l,toggle:s}]})(),a={title:"Меню",icon:{icon:"BurgerIcon",iconVersion:l?"color":"black"},isActive:l},s=Math.floor(t.length/2),o=r((()=>[...t.slice(0,s),a,...t.slice(s)]),[t,s,a]);return u("div",{className:"w-full mb-5","data-component":"sticky-bottom-menu-container",children:u(S,{className:"@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]",padding:"p-0",children:u(wc,{menuItems:o,onClick:n})})})})),cd="hidden sm:flex absolute z-40 top-0",dd=x((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=cn({itemCount:t?.length||0});return p("div",{className:w("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(Gl,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(oo(l,n,a))}),r.canScrollLeft?u(Ta,{className:w("left-6",cd),onClick:r.scrollLeft}):null,r.canScrollRight?u(Ba,{className:w("right-6",cd),onClick:r.scrollRight}):null]})})),md=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(co,{...t});case"centered":return u("div",{className:"flex",children:u(co,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(dd,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},hd="tab",ud=x((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=q(),{isReady:d}=c,m=r((()=>l.map(xd)),[l]),[h,p]=n(0);a((()=>{if(!l||!l[0])return;const e=c.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===c.query.tab))||0,t=l[e]||l[0];p(e),pd(t)}),[d]),a((()=>{const e=l[h];"group"===e?.type&&b.subject("tab",{type:e.type,label:e.ref})}),[l,h]);const x=i((e=>{const t=m.indexOf(e),n=l[t];p(t),pd(n),"group"===n.type&&(e=>{const t=new URLSearchParams(c.query);e.name?t.set(hd,e.name):t.delete(hd),c.replace(`${c.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,m]);return u(S,{className:w(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:md({items:m,value:m[h],tabsMode:s,onChange:x})})})),pd=e=>{"group"===e.type&&b.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&b.fire("tab",{type:e.type,label:e.href})},xd=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,gd={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},fd=x((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:gd[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),bd=x((({className:e="",isOpen:t,onClick:l})=>u(oe,{className:e,appendRight:u(dl,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),yd={Buttons:({buttons:e})=>Al(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?u(dl,{image:e}):null,List:({isDotted:e,...t})=>u(gi,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{className:"space-y-2xs",children:[e?u("div",{children:e}):null,t?u("div",{children:u(he,{size:"text-s",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(bd,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},vd=({rowIdx:e,cellIdx:t,setTableInner:l,tableInner:i,openTableInnerIdx:r,setOpenTableInnerIdx:s})=>(o,c)=>{const[d,m]=n(!0);a((()=>{t===r&&i||m(!0)}),[i,r]);return u("div",{children:Nd({cell:o,cellProps:{rowIdx:e,cellIdx:t,fieldIdx:c,displayTable:e=>{m(!1),s(t),l(e)},isVisible:d}})},String(c))},Nd=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in yd))return null;return u(yd[l],{...t,...n})},wd=x((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>u("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(vd({rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})):null}))),kd=(e,t)=>140*ki(e.slice(0,t).map((e=>e?.cols?.length??1))),Sd=(e,t)=>e?.length>0?u("div",{className:w("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>u("div",{className:"w-20 text-h6 mx-lg",children:e},String(t))))}):null,Cd=x((({rows:e})=>{return u(Gl,{visibleItemCount:0,snapAlign:"snap-start",children:u("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=w("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return p("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?u("div",{className:"text-xl font-light w-56 min-w-56 py-lg",children:n.data}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${kd(a,t)}px)`},children:a?.map(((e,l)=>p("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?u("div",{className:"text-xl font-light",children:e.data}):null,e?.cols?Sd(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),Id=x((({activeTabIndex:e,items:t})=>u("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return p("div",{className:"w-full @container",children:[u("div",{className:"flex p-m bg-white @4xl:bg-gray text-center justify-center relative",children:u(he,{size:"text-xl",font:"font-light",children:t.title})}),u("div",{className:"w-full pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:u("div",{className:"relative",children:u(Cd,{rows:t.rowsData})})})]},n)}))}))),Td=x((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>u("div",{className:"rounded-md text-xl font-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>n(t),children:e||t+1},e)))}):null,t?u(oe,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:u(Ae,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function Bd(e){const t=await fetch(e);return await t.json()}const Md=x((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=A(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),Bd);return t||{}}(e),[r,s]=n(0),o=i((e=>s(e)),[]),c=a?.[r]?.items??[],d=a?.map((e=>e.currency??""));return p("div",a?{className:"bg-white z-10",children:[u(Td,{currencies:d,activeTabIndex:r,setActiveTabIndex:o,linkToPDF:t}),u(Id,{activeTabIndex:r,items:c}),u(bd,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-h6 text-center",children:[u("p",{children:"Данных нет"}),u(bd,{onClick:l,isOpen:!0})]})})),Rd=x((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:w("@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?u("div",{className:"origin-top animate-expansion",children:u(Md,{...t,onClick:l})}):null]}))),Pd=x((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,o]=n(void 0),c=i((e=>o(e)),[]),[d,m]=n(void 0),h=i((e=>m(e)),[]);return p(Rd,{onHideContentClick:()=>o(void 0),tableInner:s,...r,children:[u("div",{className:w("text-s","w-80 flex-shrink-0"),children:p("div",{className:"flex gap-m items-center text-primary-text",role:"cell",children:[e?.icon?u(dl,{className:"hidden @4xl:block max-w-6",image:e.icon,width:"24",height:"24"}):null,e?.title?u("div",{className:"text-m font-light",children:e?.title}):null]})}),t?.length?u(fd,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(wd,{cells:e,rowIdx:a,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...r},String(t))))}):null]})}));function Vd({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?p("div",{children:[l?u(Ia,{className:`absolute z-40 ${a[0]} ${i}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u(Ia,{className:`absolute z-40 rotate-180 ${a[1]} ${i}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const zd=x((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative space-y-xs",children:[e,Vd({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),_d=x((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=Ca({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(Pd,{row:e,activeIndex:d,rowIdx:t,...r},String(t)))),[x,g]=i>0?[h.slice(0,-i),h.slice(-i)]:[h,[]];return p(S,{className:w("overflow-hidden relative space-y-0 @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[u($l,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),u("div",{className:"space-y-m",children:i>0?u(xn,{renderFoldableSection:({isUnfolded:e})=>p(zd,{controls:m,children:[x,u(gn,{isUnfolded:e,children:g})]}),renderFoldButton:or}):u(zd,{controls:m,children:h})})]})})),Ad=x((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(S,{className:w("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?Dd():null,"big"===n?jd(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(he,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Od(l):null,r?.length?Ed(r,!0):null,i?u(Ii,{__html:i}):null]})]}))),Dd=()=>u("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"}),jd=e=>e?.src?u(dl,{className:"h-fit flex-shrink-0",image:e}):null,Od=e=>u(me,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Ed=(e,t)=>u("ul",{className:w("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(he,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),Ld={ApplicationForm:Sl,BenefitsBlock:Ml,Bonus:Fl,BonusBenefitsBlock:hn,ButtonsBlock:pn,Calculator:xa,CardTransfer:Sa,Carousel:Ka,CarouselBankHistoryCard:Ya,CarouselCard:qa,CarouselCatalogCard:ii,CarouselLinks:ci,CarouselProductCard:fi,CarouselRecommendationCard:Yi,CarouselTariffsCard:Gi,ComparisonTable:ar,DepositFiltration:Br,MortgageFiltration:ho,ErrorBlock:Pr,ExchangeRateTile:es,Footer:ys,Header:Ps,Headline:$l,HorizontalLayout:_s,ImgBlock:As,LinkDocs:$s,MobileAppTile:Hs,PictureText:xo,Placeholder:go,ProductBlock:No,ProductGallery:wo,ProductTile:ko,RepresentativeOfficeInfo:So,RichTextBlock:To,RollupItem:rs,SafeDepositRental:cc,StepsBlock:xc,StickyBottomMenu:od,Tabs:ud,TariffsTable:_d,TextBlock:Ad,VerticalLayout:zs};const $d=["Header","Footer"],Fd=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Ud(e=globalThis){const t=s(new Map);a((()=>N.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!$d.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?an(Fd)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const Hd="cookie",Wd=x((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=ze();Lc((()=>{globalThis.localStorage?.getItem(Hd)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Hd,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[u("div",{className:"sm:flex-1",children:p(me,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(mi,{isRemote:!0,className:Kd(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(mi,{isRemote:!0,className:Kd(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(Mc,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),Kd=e=>w("inline mx-2xs",e?"text-green-dark":""),Yd=x((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=kc({onCloseAll:e,onClose:t}),{close:n}=$(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return Le(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:w("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Xd=x((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>b.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:mc(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return Le(globalThis.document,"keydown",r),e?u("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Gd=h();const qd=x((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Jd()}))),Jd=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),u("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},Qd=x((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Gd.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Gd.like(e))}),[e]),dislike:i((async()=>{l(await Gd.dislike(e))}),[e])}}(q().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(qd,{onClick:G(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(qd,{onClick:G(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),Zd=x((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return Ud(),p("div",{"data-theme":s,children:[p("section",{className:w("@container relative",a,e),children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:ja(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[Oa({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),ja(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Qd,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(od,{}),u(Yd,{}),u(Xd,{}),u(Wd,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Zd.childrenTypes=[],Zd.slots=()=>["header","footer","StickyBottomMenu"];e.Blocks=Ld,e.ContentPage=Zd,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=G,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.14.27",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=K,e.useRouter=q,Object.defineProperty(e,"__esModule",{value:!0})}));
|