@redneckz/wildless-cms-uni-blocks 0.14.655 → 0.14.657
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/bundle.umd.js +105 -78
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CreditCardForm/formStateMap.d.ts +10 -10
- package/bundle/components/CreditCardForm/getFilteredInputs.d.ts +3 -0
- package/bundle/components/CreditCardForm/renderInfo.d.ts +2 -1
- package/bundle/components/CreditCardForm/renderStep.d.ts +3 -4
- package/bundle/ui-kit/Input/InputProps.d.ts +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStep.js +2 -4
- package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/dist/components/CreditCardForm/creditCardFormStepsData.js +61 -34
- package/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/dist/components/CreditCardForm/formStateMap.d.ts +10 -10
- package/dist/components/CreditCardForm/formStateMap.js +3 -7
- package/dist/components/CreditCardForm/formStateMap.js.map +1 -1
- package/dist/components/CreditCardForm/getFilteredInputs.d.ts +3 -0
- package/dist/components/CreditCardForm/getFilteredInputs.js +11 -0
- package/dist/components/CreditCardForm/getFilteredInputs.js.map +1 -0
- package/dist/components/CreditCardForm/getInitialFormState.js +3 -0
- package/dist/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/dist/components/CreditCardForm/renderInfo.d.ts +2 -1
- package/dist/components/CreditCardForm/renderInfo.js +5 -3
- package/dist/components/CreditCardForm/renderInfo.js.map +1 -1
- package/dist/components/CreditCardForm/renderStep.d.ts +3 -4
- package/dist/components/CreditCardForm/renderStep.js +1 -9
- package/dist/components/CreditCardForm/renderStep.js.map +1 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js +3 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/DependentsField.js +1 -1
- package/dist/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/DulNumberField.js +1 -1
- package/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/DulSerieField.js +1 -1
- package/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +1 -1
- package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/Experience5YearsField.js +1 -1
- package/dist/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/FamilyMembersField.js +3 -2
- package/dist/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js +1 -1
- package/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/InnField.js +1 -1
- package/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/JobsNumberField.js +1 -1
- package/dist/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/LastJobExperienceField.js +1 -1
- package/dist/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/MiddleNameField.js +1 -1
- package/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/NameField.js +1 -1
- package/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/PartInBusinessField.js +1 -1
- package/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/SurnameField.js +1 -1
- package/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
- package/dist/ui-kit/Input/InputControl.js +2 -2
- package/dist/ui-kit/Input/InputControl.js.map +1 -1
- package/dist/ui-kit/Input/InputProps.d.ts +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStep.js +2 -4
- package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/lib/components/CreditCardForm/creditCardFormStepsData.js +61 -34
- package/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/lib/components/CreditCardForm/formStateMap.d.ts +10 -10
- package/lib/components/CreditCardForm/formStateMap.js +3 -7
- package/lib/components/CreditCardForm/formStateMap.js.map +1 -1
- package/lib/components/CreditCardForm/getFilteredInputs.d.ts +3 -0
- package/lib/components/CreditCardForm/getFilteredInputs.js +8 -0
- package/lib/components/CreditCardForm/getFilteredInputs.js.map +1 -0
- package/lib/components/CreditCardForm/getInitialFormState.js +3 -0
- package/lib/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/lib/components/CreditCardForm/renderInfo.d.ts +2 -1
- package/lib/components/CreditCardForm/renderInfo.js +5 -3
- package/lib/components/CreditCardForm/renderInfo.js.map +1 -1
- package/lib/components/CreditCardForm/renderStep.d.ts +3 -4
- package/lib/components/CreditCardForm/renderStep.js +1 -9
- package/lib/components/CreditCardForm/renderStep.js.map +1 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js +3 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/DependentsField.js +1 -1
- package/lib/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/DulNumberField.js +1 -1
- package/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/DulSerieField.js +1 -1
- package/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +1 -1
- package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/Experience5YearsField.js +1 -1
- package/lib/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/FamilyMembersField.js +3 -2
- package/lib/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js +1 -1
- package/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/InnField.js +1 -1
- package/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/JobsNumberField.js +1 -1
- package/lib/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/LastJobExperienceField.js +1 -1
- package/lib/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/MiddleNameField.js +1 -1
- package/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/NameField.js +1 -1
- package/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/PartInBusinessField.js +1 -1
- package/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/SurnameField.js +1 -1
- package/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
- package/lib/ui-kit/Input/InputControl.js +2 -2
- package/lib/ui-kit/Input/InputControl.js.map +1 -1
- package/lib/ui-kit/Input/InputProps.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +105 -78
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CreditCardForm/formStateMap.d.ts +10 -10
- package/mobile/bundle/components/CreditCardForm/getFilteredInputs.d.ts +3 -0
- package/mobile/bundle/components/CreditCardForm/renderInfo.d.ts +2 -1
- package/mobile/bundle/components/CreditCardForm/renderStep.d.ts +3 -4
- package/mobile/bundle/ui-kit/Input/InputProps.d.ts +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +2 -4
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js +61 -34
- package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/formStateMap.d.ts +10 -10
- package/mobile/dist/components/CreditCardForm/formStateMap.js +3 -7
- package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getFilteredInputs.d.ts +3 -0
- package/mobile/dist/components/CreditCardForm/getFilteredInputs.js +11 -0
- package/mobile/dist/components/CreditCardForm/getFilteredInputs.js.map +1 -0
- package/mobile/dist/components/CreditCardForm/getInitialFormState.js +3 -0
- package/mobile/dist/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/renderInfo.d.ts +2 -1
- package/mobile/dist/components/CreditCardForm/renderInfo.js +5 -3
- package/mobile/dist/components/CreditCardForm/renderInfo.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/renderStep.d.ts +3 -4
- package/mobile/dist/components/CreditCardForm/renderStep.js +1 -9
- package/mobile/dist/components/CreditCardForm/renderStep.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +3 -1
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/DependentsField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/Experience5YearsField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/FamilyMembersField.js +3 -2
- package/mobile/dist/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/InnField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/JobsNumberField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/LastJobExperienceField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/NameField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
- package/mobile/dist/ui-kit/Input/InputControl.js +2 -2
- package/mobile/dist/ui-kit/Input/InputControl.js.map +1 -1
- package/mobile/dist/ui-kit/Input/InputProps.d.ts +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +2 -4
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js +61 -34
- package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/formStateMap.d.ts +10 -10
- package/mobile/lib/components/CreditCardForm/formStateMap.js +3 -7
- package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getFilteredInputs.d.ts +3 -0
- package/mobile/lib/components/CreditCardForm/getFilteredInputs.js +8 -0
- package/mobile/lib/components/CreditCardForm/getFilteredInputs.js.map +1 -0
- package/mobile/lib/components/CreditCardForm/getInitialFormState.js +3 -0
- package/mobile/lib/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/renderInfo.d.ts +2 -1
- package/mobile/lib/components/CreditCardForm/renderInfo.js +5 -3
- package/mobile/lib/components/CreditCardForm/renderInfo.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/renderStep.d.ts +3 -4
- package/mobile/lib/components/CreditCardForm/renderStep.js +1 -9
- package/mobile/lib/components/CreditCardForm/renderStep.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +3 -1
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/DependentsField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/DependentsField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/Experience5YearsField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/FamilyMembersField.js +3 -2
- package/mobile/lib/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/GeneralSeniorityField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/InnField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/InnField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/JobsNumberField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/JobsNumberField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/LastJobExperienceField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/LastJobExperienceField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/NameField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
- package/mobile/lib/ui-kit/Input/InputControl.js +2 -2
- package/mobile/lib/ui-kit/Input/InputControl.js.map +1 -1
- package/mobile/lib/ui-kit/Input/InputProps.d.ts +1 -1
- package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +3 -6
- package/mobile/src/components/CreditCardForm/creditCardFormStepsData.tsx +61 -34
- package/mobile/src/components/CreditCardForm/formStateMap.tsx +14 -17
- package/mobile/src/components/CreditCardForm/getFilteredInputs.tsx +18 -0
- package/mobile/src/components/CreditCardForm/getInitialFormState.tsx +3 -0
- package/mobile/src/components/CreditCardForm/renderInfo.tsx +9 -3
- package/mobile/src/components/CreditCardForm/renderStep.tsx +5 -22
- package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +3 -1
- package/mobile/src/ui-kit/FormField/Fields/DependentsField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/DulNumberField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/DulSerieField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/DulSubdivisionCodeField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/Experience5YearsField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/FamilyMembersField.tsx +3 -2
- package/mobile/src/ui-kit/FormField/Fields/GeneralSeniorityField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/InnField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/JobsNumberField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/LastJobExperienceField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/MiddleNameField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/NameField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/Fields/SurnameField.tsx +1 -1
- package/mobile/src/ui-kit/Input/InputControl.tsx +2 -2
- package/mobile/src/ui-kit/Input/InputProps.ts +1 -1
- package/package.json +1 -1
- package/src/components/CreditCardForm/CreditCardFormStep.tsx +3 -6
- package/src/components/CreditCardForm/creditCardFormStepsData.tsx +61 -34
- package/src/components/CreditCardForm/formStateMap.tsx +14 -17
- package/src/components/CreditCardForm/getFilteredInputs.tsx +18 -0
- package/src/components/CreditCardForm/getInitialFormState.tsx +3 -0
- package/src/components/CreditCardForm/renderInfo.tsx +9 -3
- package/src/components/CreditCardForm/renderStep.tsx +5 -22
- package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +3 -1
- package/src/ui-kit/FormField/Fields/DependentsField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/DulNumberField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/DulSerieField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/DulSubdivisionCodeField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/Experience5YearsField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/FamilyMembersField.tsx +3 -2
- package/src/ui-kit/FormField/Fields/GeneralSeniorityField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/InnField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/JobsNumberField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/LastJobExperienceField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/MiddleNameField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/NameField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +1 -1
- package/src/ui-kit/FormField/Fields/SurnameField.tsx +1 -1
- package/src/ui-kit/Input/InputControl.tsx +2 -2
- package/src/ui-kit/Input/InputProps.ts +1 -1
package/bundle/bundle.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),a=n("useState"),l=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:a,...l}=t||{},i=n?.slots?.default,r=a||i&&i();return e(Object.assign(l,r&&{children:r}),n)}return t.inheritAttrs=!1,t},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:a="p-xl",padding:l,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:u("@container font-sans",{group:m},p[t],l||a,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:a,children:l})=>o(n,{role:"heading",className:u("font-sans m-0",v[t],e),children:a||l}))),w=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),C={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},k=d((({className:e,version:t="",headlineVersion:n="XL",title:a,description:l,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=C[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[a?o(N,{className:u("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:a}):null,l?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...p,children:l}):null]})})),S=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),T=[];function I(e,t,{className:n,...a}={}){const{key:l,blockDecorator:i=S,blocksRegistry:r={},ancestors:s=T}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...a},l):null}},l)}const B=[],R=(e,{key:t,ancestors:n=B,slotName:a=null,extraProps:l,renderProps:i=I,...r})=>{const s=l?(e,t)=>I(e,t,l):i;return(e||[]).map(((e,l)=>s(e,{...r,key:`${t||e.type}-${l}`,ancestors:r.parent?[...n||B,[r.parent,a]]:n},l)))};function P({block:e,options:t,children:n,extraProps:a,renderProps:l}){return n||(e&&t?R(e.blocks,{...t,parent:e,extraProps:a,renderProps:l}):null)}function D(){return D._impl()}D._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),D.setup=e=>{D._impl=e};const M=["CDN","BASE_PATH"],_=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return M.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),A=e=>Boolean(e?.includes(":")),z=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),F=e=>Boolean(e?.startsWith("#")),E=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),V=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),O=(e,t)=>!(!e||!t)&&(!!e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:A,isLocalURL:z,isHash:F,withoutQuery:E,joinPath:V,hasPrefix:O});const j="/api/",$=`${j}v1/storage`,q=e=>(t,n)=>{if([!t,A(t),F(t),[_.CDN,j].some((e=>O(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${$}/${t}/attachment`;const a=t?.startsWith("/");return V(O(t,n)?"":n,a?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},U={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:a=`Иконка ${n}`,title:l=a,iconVersion:i="color",width:r,height:s})=>{const d=D(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,h=q(d)(V(_.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:a,title:l,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(K,{className:e,children:c("svg",{className:u(Y(r),U[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[l?o("title",{children:l}):null,a?o("desc",{children:a}):null,o("use",{href:h,xlinkHref:h})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},Y=e=>e?"":"w-full h-full",K=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),G=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function X(e=""){try{return new URL(e).pathname}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":X(G.SITE_URL);return t&&!A(t)?q(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const a=D();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:l},i)=>o("source",{srcSet:J(a)(e),type:te(n),media:l?`(max-width: ${l}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(a)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:u("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),te=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:n="",...a})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...a}):o(Q,{className:e,imageClassName:n,image:t}):null)),ae={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},le="bg-main-divider text-main-disabled",ie={primary:le,secondary:le,white:le,link:"",transparent:"",gray:le,"":""},re="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?ae[n]:"",t?"rounded-full":"rounded-md",e].join(" ");const ce=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}},de=()=>({open:(e,t={})=>ce.fire("dialog",{type:"open",dialog:e,...t}),close:()=>ce.fire("dialog",{type:"close"}),closeAll:()=>ce.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function ue(){const e=X(G.SITE_URL),t=D(),{closeAll:n}=de();return e=>{const n=q(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:me(a({...e,href:n}))}};function a({href:a,target:l,onClick:i}){return r=>{i?.(r),he(a,l,e)||(n(),r?.preventDefault(),t.push(((e,t="")=>e?.replace(t,"")||"/")(a,e)))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const he=(e,t,n)=>{if(!z(e,t))return!0;const a=G.SUB_PORTALS?.split(",");return!!a?.some((t=>O(e,t)))||!O(e,n||"/")},pe=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},ge=d((e=>{const{text:t,aboveText:n,appendLeft:a,appendRight:l,version:i="primary"}=e,r=xe(e)&&"hidden lg:block";return c("div",{className:u(fe(e),"flex gap-xs"),children:[a?o("div",{className:u(r,se[i]),children:a}):null,xe(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,l?o("div",{className:u(r,se[i]),children:l}):null]})})),fe=e=>{const{version:t,aboveText:n,rounded:a}=e;if("link"===t)return"";const l=""+(n?"py-2.5 px-9":"py-4 px-9");return u("group/btn items-center justify-center",xe(e)?l:"h-12 w-12 m-auto",{"rounded-full":a})},xe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),be=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ye=d((({disabled:e,children:t,method:n="LINK",href:a,...l})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:a,pathname:l,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[a,l].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:a}),s=ue()({onClick:r,href:a,...l}),c=t??o(ge,{...s});return o(e?Ne:ve,{...s,children:c})})),ve=d((({className:e="",href:t,rel:n,target:a,ariaLabel:l,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:u})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:a,"aria-label":l||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...pe(d),children:m}))),Ne=d((({className:e,ariaLabel:t,version:n,rounded:a,children:l})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:be({className:e,rounded:a,version:n}),children:l})));function we({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:a=!1}){if(!n)return null;const l="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(a?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:u(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),o(ye,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const Ce=()=>{const[e,t]=a(false);return l((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",n)}}),[]),e},ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Se=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Te=d((({className:e,version:t="primary",defaultPadding:n,padding:a="",title:l,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=Ce(),v=D(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,C=f&&!y;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",a||n,e),children:[C&&we({version:t,handleClick:N,text:w}),l?o("div",{className:"relative h-full",children:l}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Se(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[h,x]}),Be(P({...b,extraProps:{className:"@container-normal"}})),Se(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Ie(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Ie=e=>u(e?"row-span-2":"@xl:row-span-2"),Be=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Re=(e,t="normal")=>e?.icon||e?.src?o("div",{className:u("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pe=d((e=>{const{__html:t="",richVersion:n="",itemSize:a="list-m",isDotted:l=!0}=e,i=l?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(n,a,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),De=(e,t)=>e?o(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Me=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),_e=(e,t)=>e?o(Me,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ae=(e,t)=>["label"in e?_e(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:De(e.description,t)},String(t)):null,"__html"in e?o(Pe,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:u("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Re(n.icon,t):null,o("div",{children:Ae(n)})]}))),Fe=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:u("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(ze,{benefitsVersion:t,...e},String(n))))}):null)),Ee=d((({className:e,benefits:t})=>t?.length?o("div",{className:u("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Ae)}):null)),Ve=d((({isTabularBenefits:e,...t})=>o(e?Ee:Fe,{...t}))),Oe=e=>Boolean(e?.src||e?.icon),Le=(e,{className:t,buttonClassName:n,isVertical:a}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",a?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(je(n))}):null,je=(e="")=>(t,n)=>{const{text:a,icon:l,iconRight:i,version:r,...s}=t||{},c=$e(l,r),d=$e(i,r);return a||l?.icon?o(ye,{className:u("basis-full @lg:basis-auto",e),appendLeft:qe({...l,iconVersion:c}),appendRight:qe({...i,iconVersion:d}),version:r,text:a,...s},n?String(n):""):null},$e=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},qe=e=>Oe(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ue=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),We=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(He)}):null)),He=({label:e,amount:t,unit:n},a)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Me,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ue(2)(t)," ",n||"₽"]}):null]},String(a)),Ye=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ke)}):null)),Ke=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Me,{size:"text-m",font:"font-light",children:e})},String(t)),Ge={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Xe=d((({className:e,padding:t,defaultPadding:n,title:a,description:l,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:C=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(ne,{image:y}):null,R=o(k,{title:a,description:l,headlineVersion:i,align:r,isEmbedded:!0}),P=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Te,{className:e,padding:t,defaultPadding:n,...g?{title:R}:{insetTitle:R},...Je(B,N),isImageSecondary:C,imageAlign:v,isImageAlwaysOnRight:w,buttons:Le(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(Ve,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,h?o(Pe,{richVersion:p,__html:h,isDotted:m,itemSize:Ge[i]}):null,T,f?.length?o(We,{priceList:f}):null,Ze(x)]})})})),Je=(e,t)=>t?{rightImage:e}:{leftImage:e},Ze=e=>e?.length?o(Ye,{tags:e}):null,Qe=e=>Boolean(e&&Array.isArray(e)),et=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),tt=(e,t)=>{return n=e,Boolean(et(n)&&"string"==typeof n.$ref)?t.ref(e):et(e)?t.record(e):Qe(e)?t.array(e):t.scalar?t.scalar(e):e;var n},nt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(at,e),at=(e,t)=>e&&t?et(e)?e[t]:Qe(e)?e[parseInt(t,10)]:e:e,lt=(e,t)=>tt(e,{ref:({$ref:e,...n})=>lt(e?nt(t(e),e):n,t),record:e=>Object.entries(e).map((([e,n])=>({[e]:lt(n,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>lt(e,t)))}),it=(e,t,n=[])=>{tt(e,{ref:e=>t(e.$ref,n),record:e=>{for(const a in e)it(e[a],t,[...n,a])},array:e=>{for(let a=0;a<e.length;a++)it(e[a],t,[...n,a])}})};async function rt(e,t){try{return e?await st(e,t):null}catch(e){console.error(e)}return null}const st=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),ot=e=>[...new Set(e)],ct={},dt=["/portal-resources"],mt=(e,t)=>lt(e,(e=>t?.[e])),ut=(e,t)=>{const n=(e=>{const t=[];return it(e,(e=>t.push(e))),t})(e),[i,r]=a({});return l((()=>{n.length&&(async e=>Object.fromEntries((await Promise.allSettled(ot(e).filter((e=>!dt.some((t=>e.startsWith(t))))).map((async e=>[e,ct[e]||=await st(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(n).then(r)}),[n.join()]),n.length?mt(e,{...t,...i}):e};function ht(e,t={}){const n=d((t=>{const n=ut((({block:e,options:t,className:n,defaultPadding:a,padding:l,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const pt=ht((({className:e,padding:t,defaultPadding:n,...a})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...a,children:o(Xe,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...a})})),{childrenTypes:["UnitBlock"]}),gt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>ft(0,t?.length)),[t]),a=t?.[n];return a?o(pt,{suppressHydrationWarning:!0,...a,...e}):o(g,{...e,children:o(f,{})})})),ft=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),xt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),l=String(e.getFullYear());return t?`${l}-${a}-${n}`:`${n}.${a}.${l}`}},bt=e=>e?.replace(/[^+\d]/g,"");const yt=e=>e?{phone:bt(e)}:{},vt=(e,t="birthday")=>e?{[t]:xt(e)}:{},Nt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),wt=(e,t=!0)=>({[t?"email":"mail"]:e}),Ct=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:bt(e)}:{},kt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:a,params:l}of e)t[a??""]?.(n,l)},St="rshb-query-params";function Tt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(St)||"";return e&&globalThis.sessionStorage?.setItem(St,e),e}function It(e){if(!e)throw new Error("Value should be fulfilled");return e}const Bt=e=>t=>{const[,n]=It(e.find((([e])=>e(t))));return n(t)},Rt=e=>Bt(e.map((([e,t])=>[e,()=>t])));Rt.if=e=>new Pt(void 0,e);class Pt{parent;predicate;unit;get entry(){return[It(this.predicate),It(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Pt(this,e)}then(e){return new Pt(this.parent,this.predicate,e)}else(e){return Bt([...Dt(this),[()=>!0,e]])}}const Dt=e=>[...e?.parent?Dt(e.parent):[],e.entry],Mt=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=Tt();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,a]of new URLSearchParams(t))n.searchParams.set(e,a);return n.toString()})(t?.href)||t?.href;if(n){_t(t?.target)?.(n)}}},_t=Rt([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function At(){return At._impl()}At._impl=()=>({forwardQuery:Mt}),At.setup=e=>{At._impl=e};const zt=e=>e,Ft=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=a(e),c=i(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return Et(t,n)?t:n}:r(e)):o,[r]);l((()=>{r&&o(r)}),[r]);const[d,m]=a(!1),[u,h]=a({}),p=i(((e,t)=>{const{parse:n=zt,format:a=zt}=t||{};return{value:a(s[e]),isDirty:d||u[e],onChange:t=>{c((a=>({...a,[e]:n(t)}))),h((t=>({...t,[e]:!0})))}}}),[c,d,u]),g=i((e=>{c(e),h(e)}),[]),f=i((()=>{c(e),m(!1),h({})}),[e]),x=i((e=>(e.preventDefault(),t?f():m(!0),n&&n(s,e),s)),[n,s]);return[s,{isDirty:d||Object.values(u).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},Et=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),Vt=d((e=>{const{className:t,title:n,children:a,...l}=e;return o(g,{className:t,defaultPadding:"p-6xl",...l,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,a]})})})),Ot=e=>"OUTSERVICE"===e?"/api/v1/outservice/outserviceregions":void 0;function Lt(e=!1){const[t,n]=a(e),l=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:l,setFalse:r,toggle:s}]}function jt(e,t,n,a){l((()=>{if(e&&n)return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}),[e,t,n])}function $t(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return jt(globalThis.document,"click",n),t}const qt=({label:e,errors:t})=>e&&t?`${e}*`:e,Ut=()=>{},Wt="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",Ht=e=>e?o(Me,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Yt=d((({key:e,className:t="",id:n,name:a,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1,disabled:w=!1})=>{const C=s(null),k=i((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);l((()=>{v&&C.current?.focus()}),[v,C]);const S=g?"pr-3xl":"",T=Kt(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[Ht(d),N?o("textarea",{className:u("block resize-y min-h-24",Gt,T),id:u("textarea",n),name:a||n,placeholder:m,value:h,onChange:k,onFocus:x,onBlur:b,disabled:w},e):o("input",{type:r,className:u("h-14",Gt,S,T),ref:C,id:n,name:a||n,placeholder:m,value:h,onChange:k,onFocus:x,onBlur:b,pattern:y,disabled:w},e)]}),g]})})),Kt=e=>e?Wt:"border-error",Gt="w-full border rounded-md text-primary-text outline-none p-m",Xt=e=>o("div",{className:"h-6",children:e?o(Me,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Jt=e=>e?.value||"",Zt={url:"suggest/address"},Qt={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"},dulSubdivisionCode:{url:"suggest/fms_unit",responseItemHandler:e=>e?.data?.code?.replace("-","")||""},dulIssuedBy:{url:"suggest/fms_unit"},organizationName:{url:"suggest/party"},inn:{url:"suggest/party",responseItemHandler:e=>e?.data?.inn||""},addressRegistration:Zt,addressFact:Zt,organizationAddress:Zt,addressCourier:Zt},en=()=>({open:(e,t)=>ce.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>ce.fire("popup",{type:"update",popup:e,...t}),close:()=>ce.fire("popup",{type:"close"})}),tn=d((({options:e,onChange:t})=>o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,n)=>o("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem",onMouseDown:()=>t(e),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function nn({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=a([]),f=en(),x=Qt[n],b=i((()=>{h.current=t,f.close()}),[t]),y=i((e=>{b(),h.current=e.processedValue,c&&c(e.processedValue),d&&d(e)}),[b,c]),v=s(null),N=r((()=>async e=>{if(!x)return;const t=await(e=>{const{url:t,query:n,queryPrefix:a,requestData:l={},responseItemHandler:i=Jt}=e,r=(s=i,e=>(e?.suggestions||[]).map((e=>{const t=s(e);return{...e,processedValue:t}})));var s;const o=`${a?`${a}, `:""}${n}`;return fetch(`/api/v1/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...l,query:o})}).then((e=>e.json())).then(r)})({url:x.url,responseItemHandler:x.responseItemHandler,requestData:{...x?.requestData},query:e,queryPrefix:m});t?.length&&g(t)}),[m]),w=r((()=>((e,t=600)=>{let n;const a=(...l)=>{a.dispose(),n=setTimeout((()=>{e(...l)}),t)};return a.dispose=()=>{n&&clearTimeout(n)},a})(N,300)),[N]);return l((()=>{if(!e||!v.current||h.current===t)return void b();const n=v.current,{top:a,left:l,width:i,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.update(o(tn,{options:p,value:t,onChange:y}),{top:a+globalThis.scrollY+r,left:l,width:i})}),[e,p,t,y]),v}const an=d((({className:e,label:t,value:n="",placeholder:a,error:l,errors:r,onChange:s=Ut,onDaDataChange:d,onBlur:m,isTextarea:h,type:p,name:g="",daDataQueryPrefix:f,inputLength:x,dadata:b=!1,disabled:y=!1})=>{const[v,{setFalse:N,setTrue:w}]=Lt(),C=$t(N),k=i((e=>x?e.length<=x&&s(e):s(e)),[s]),S=nn({isOpen:v&&b,name:g,value:n,daDataQueryPrefix:f,onChange:s,onDaDataChange:d});return c("div",{className:u("shrink-0 w-full",e),ref:C,onBlur:N,onFocus:w,children:[o("div",{ref:S,children:o(Yt,{disabled:y,type:p||"text","aria-label":t,label:qt({label:t,errors:r}),valid:Boolean(!l),value:n,onChange:k,onBlur:m,isTextarea:h,placeholder:ln(a,r,t)})}),Xt(l)]})})),ln=(e,t,n)=>t&&!n?`${e}*`:e,rn=e=>e?.text||e?.key||"",sn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,on=d((({popupRef:e,options:t,value:n,query:a,onChange:l,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:sn(t,a).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),l&&l(e)},children:[o("span",{className:"min-h-6",children:rn(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const cn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:h="",isSearch:p=!1,iconVersion:g="black",onChange:f,disabled:x=!1})=>{const[b,{setFalse:y,setTrue:v}]=Lt(),[N,w]=a(""),C=un(x,n.length),k=b&&!C,S=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:a,onChange:r,onClose:c,iconVersion:d}){const m=en(),u=i((()=>{m.close(),c&&c()}),[c]),h=i((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=$t(u);return l((()=>{if(!e||!p.current)return;const l=p.current,{top:i,left:r,width:s,height:c}=l.getBoundingClientRect();m.update(o(on,{popupRef:g,options:t,value:n,query:a,onChange:h,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,a,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:S,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[Ht(t),c("div",{className:u("relative",k?"z-20":"z-10"),ref:T,children:[c("div",{className:u("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",mn(m,d,C)),onClick:k?S:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:rn(r)||h}),dn(k,g)]}),p&&k?o("div",{className:u("absolute top-0 w-full z-20"),children:o(Yt,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),dn=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),mn=(e,t,n)=>u(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),un=(e,t)=>e||0===t,hn=d((({className:e="",label:t,error:n,errors:a,...l})=>c("div",{className:e,children:[o(cn,{...l,valid:!n,label:qt({label:t,errors:a})}),Xt(n)]}))),pn=e=>!e?.length,gn=e=>t=>n=>e(n)?[]:[t],fn=gn((e=>null!=e&&""!==e)),xn="Некорректно заполненное поле",bn=e=>fn(e??xn),yn=e=>gn((e=>e?.key&&""!==e?.key))(e??xn),vn=e=>gn((e=>"string"==typeof e&&e.length>0&&e.length<=2))(e??xn),Nn=e=>gn((e=>"string"==typeof e&&e.length>1))(e??xn),wn=(e,t)=>gn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??xn),Cn=e=>gn((e=>"string"==typeof e&&6===e.length))(e),kn=e=>{return(t=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,gn((e=>"string"==typeof e&&t.test(e))))(e);var t},Sn=gn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Tn=e=>{const t=String(e).replace(/[^0-9]+/g,"");if(11===t.length){let e=0;for(let n=0;n<9;n++)e+=parseInt(t.charAt(n))*(9-n);return e>101&&(e%=101),100!==e&&101!==e||(e=0),e===parseInt(t.substr(9))}return!1},In=e=>Boolean("0"===e.qc&&"0"===e.qcComplete&&"2"===e.qcHouse),Bn=()=>gn(In)("Укажите регион, город/населенный пункт, улицу, дом, квартиру"),Rn={typeForm:bn(),surname:Nn("Укажите свою фамилию"),name:Nn("Укажите своё имя"),middleName:Nn("Укажите своё отчество"),region:yn(),addressBranch:yn(),phone:kn("Укажите номер телефона"),secondaryPhone:kn("Укажите номер телефона"),organizationPhone:kn("Укажите номер телефона"),birthday:bn("Укажите дату рождения"),birthPlace:bn("Укажите место рождения"),education:bn("Выберите ваше образование"),housing:bn("Выберите тип жилья"),employment:bn("Выберите информацию о трудоустройстве"),organization:bn("Выберите тип организации"),amountWorkers:bn("Выберите информацию о количестве сотрудников"),employerActivities:bn("Выберите вид деятельности организации"),employerOrganization:bn("Выберите вид организации"),positionOrganization:bn("Выберите вашу должность"),dulSerie:(Pn="Укажите серию паспорта",gn((e=>"string"==typeof e&&4===e.length))(Pn)),dulNumber:Cn("Укажите номер паспорта"),dulIssueDateField:bn("Укажите дату выдачи паспорта"),dulSubdivisionCode:Cn("Укажите код подразделения"),dulIssuedBy:bn("Укажите организацию, выдавшую паспорт"),email:(e=>gn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),fullName:Nn(),inn:(e=>gn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),legalForm:bn("Укажите ОПФ"),organizationName:bn("Укажите наименование организации"),generalSeniority:vn("Укажите количество лет стажа"),lastJobExperience:vn("Укажите стаж на последнем месте работы"),experience5Years:vn("Укажите общий стаж за последние 5 лет"),jobsNumber:vn("Укажите количество мест работы за последние 5 лет"),beginDate:bn("Укажите дату заключения трудового договора"),addressFact:Bn(),partnerComments:bn(),collectionCount:bn(),comment:bn(),acquiringType:yn(),feedbackMethod:yn(),serviceType:yn(),serviceDirection:yn(),meetingDay:bn(),product:bn(),localities:bn(),consentDataProcessing:Sn,annualRevenue:bn(),consentToReceiveMaterials:Sn,processPersonalDataFlg:Sn,consentProviderFlg:Sn,consentPfrFlg:Sn,consentOthersFlg:Sn,consentInformFlg:Sn,familyStatus:bn("Выберите семейное положение"),children:wn(2,"Укажите количество детей"),familyMembers:wn(2,"Укажите количество членов семьи"),dependents:wn(2,"Укажите количество иждивенцев"),totalIncome:wn(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:wn(10,"Укажите сумму обязательных выплат"),snils:(e=>gn(Tn)(e))("Некорректный номер СНИЛС"),conscription:bn(),armyIdFlg:Sn,sex:bn("Укажите свой пол"),addressRegistration:Bn(),organizationAddress:Bn(),deliveryDate:bn("Укажите дату доставки"),addressCourier:Bn(),participantDateRegistration:bn("Укажите дату регистрации"),retirementIncome:bn(),otherIncome:bn(),mandatoryIncome:bn(),otherPayments:bn(),disablePeopleFlg:bn(),bankruptcyFlg:bn(),shareholderFlg:bn(),legalEntityName:bn(),bankEmployeeCode:bn(),partInBusiness:bn(),regionRetail:yn("Выберите филиал банка"),addressRetail:yn("Выберите адрес банка"),addressMatch:bn(),codeWord:(e=>gn((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&/^[\u0400-\u04FF\d]+$/u.test(e)))(e??xn))("Необходимо ввести кодовое слово латиницей"),currency:bn(),paymentSystem:bn(),cardCategory:yn(),confirmationIncome:bn()};var Pn;const Dn=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>Boolean(e?.required))));return Object.fromEntries(t.map((e=>[e,Rn?.[e||""]])))},Mn=(e,t)=>{const{value:n,isDirty:a}=e,l=a?t(n):[];return{...e,errors:l,error:l[0]}},_n=(e,t,n=!1)=>n?Mn(e,t):e,An=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],zn=d((({field:e,input:t})=>o(hn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:An,..._n(e("acquiringType"),Rn.acquiringType,t?.required)}))),Fn=(e="")=>Boolean("trade"===e||"all"===e),En=e=>null!=e,Vn=new Map,On=e=>Boolean(e?.every((e=>Array.isArray(e)?On(e):!e||"string"==typeof e))),Ln=e=>On(e)?e.toString():"";function jn(e,t,{fallback:n,cache:i}={}){const s=r((()=>$n(e)),[e]),[o,c]=a(void 0),[d,m]=a(void 0);l((()=>{if(!s.some(En))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=Vn)=>n=>{const a=Ln(n),l=t.get(a);if(a&&En(l))return l;const i=e(...n);return a&&En(i)&&t.set(a,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function $n(e){return Array.isArray(e)?e:e instanceof Function?$n(e()):[e]}const qn=[];const Un=async e=>await rt(e,{method:"GET"})||qn;function Wn(e=!1){const{data:t}=jn("/api/v1"+(e?"/premiumBranchesByRegions":"/branchesByRegions"),st);return Array.isArray(t)?t:[]}const Hn=d((({field:e,input:t,isPremium:n=!1})=>{const a=e("region"),i=a?.value?.key,r=a?.value?.text,s=n?Wn(n)?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=jn(e?`/api/v1/branches?regionCode=${e}`:null,Un);return t||qn}(i)?.filter((e=>e?.address));return l((()=>{""!==a?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[a?.value]),o(hn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),..._n(e("addressBranch"),Rn.addressBranch,t?.required),isSearch:!0})})),Yn=d((({field:e,input:t})=>{const n="addressFact",a=e(n).value,{value:r}=e("addressMatch");l((()=>{r&&e("addressFact")?.onChange?.(e("addressRegistration").value)}),[r]);const s=i((t=>{e?.(n)?.onChange?.({apartment:t?.data?.flat,city:t?.data?.city,district:t?.data?.area_with_type,fullAddress:t?.value,fiasCode:t?.data?.fias_id,house:t?.data?.house,locality:t?.data?.settlement_with_type,okatoRegionCode:t?.data?.okato,postcode:t?.data?.postal_code,region:t?.data?.region,regionCode:t?.data?.region_kladr_id?t?.data?.region_kladr_id.substring(0,2):"",street:t?.data?.house})}),[]),c=i((t=>{e?.(n)?.onChange?.({...e(n).value,fullAddress:t})}),[]);return o(an,{label:"Адрес",disabled:r,..._n(e(n),Rn[n],t?.required),value:a.fullAddress,onChange:c,...t,onDaDataChange:s})})),Kn=(e,t)=>"RETIREE"!==e?.("employment")?.value?.key&&t,Gn=e=>Boolean(e("esiaAccountTypeCd")?.value?.key),Xn=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",a=e(n).value,l=i((t=>{e?.(n)?.onChange?.({apartment:t?.data?.flat,city:t?.data?.city,district:t?.data?.area_with_type,fullAddress:t?.value,fiasCode:t?.data?.fias_id,house:t?.data?.house,locality:t?.data?.settlement_with_type,okatoRegionCode:t?.data?.okato,postcode:t?.data?.postal_code,region:t?.data?.region,regionCode:t?.data?.region_kladr_id?t?.data?.region_kladr_id.substring(0,2):"",street:t?.data?.house,qc:t?.data?.qc,qcComplete:t?.data?.qc_complete,qcHouse:t?.data?.qc_house})}),[]),r=i((t=>{e?.(n)?.onChange?.({...e(n).value,fullAddress:t})}),[]),s=["addressRegistration"===n,t?.filledByEsia,Gn(e)].every(Boolean);return o(an,{disabled:s,label:"Адрес",..._n(e(n),Rn[n],"organizationAddress"===t?.name?Kn(e,t?.required):t?.required),value:a.fullAddress,onChange:r,...t,onDaDataChange:l})})),Jn=d((({className:e,viewBox:t,fill:n="none",width:a,height:l,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:a,height:l,children:i.map((({d:e,fill:t,...n},a)=>{const l={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:l.stroke,strokeLinecap:l.strokeLinecap,strokeLinejoin:l.strokeLinejoin,strokeWidth:l.strokeWidth,strokeMiterlimit:l.strokeMiterlimit},a)}))}))),Zn="appearance-none w-5 h-5 border-solid flex-none",Qn=[{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"}],ea=d((({className:e,value:t,text:n,disabled:a,isRadio:l,onChange:r})=>{const s=i((e=>{a||(e.preventDefault(),r&&r(!t))}),[r,a,t]),d=l?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Jn,{paths:Qn,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:u("flex items-center relative group/box",na(a)),onClick:s,children:[o("div",{className:u(Zn,"m-0",l?"rounded-full border-2":la(t),!a&&t?"border-primary-main":"border-gray",a?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:aa(l),"aria-checked":Boolean(t),"aria-disabled":Boolean(a),"aria-label":n}),t?d:null,ta(n)]})})})),ta=e=>e?o("div",{className:"ml-s",children:o(Me,{size:"text-l",font:"font-light",children:e})}):null,na=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",aa=(e=!1)=>e?"radio":"checkbox",la=(e=!1)=>u("rounded border",{"bg-primary-main":e}),ia=d((({className:e,text:t,value:n,key:a,disabled:l,error:i,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(ea,{text:t,value:n,disabled:l,onChange:r},a),Xt(i)]}))),ra=d((({field:e})=>o(ia,{text:"Адрес фактического места жительства совпадает с адресом регистрации",..._n(e("addressMatch"),Rn.addressMatch)}))),sa=(e,{normalize:t,format:n})=>{const{value:l,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=a(!1),m=i((e=>{d(!0),r&&r(e)}),[]),u=i((()=>{d(!1),o&&o(t(l)),s&&s()}),[o,l]);return{value:c||!n?l:n(l),onFocus:m,onBlur:u}},oa=(e,t,n)=>Math.max(t,Math.min(e,n));function ca(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function da({list:e=[],min:t,max:n,step:a,value:l=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(l):l,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:u("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:a,value:s,disabled:i,onChange:t=>{const n=ca(t.target?.value),a=e.length?e[n]:n;r&&r(a||0)}})})]})}const ma=1,ua=100,ha=d((e=>{const{className:t,title:n,items:a=[],list:l=[],min:r=(l.length?0:ma),max:s=(l.length?l.length-1:ua),step:d=1,value:m=l[0]||r,disabled:h=!1,onChange:p}=e,g=sa(e,{normalize:(e=0)=>l.length?pa(l)(e):oa(e,r,s),format:Ue()}),f=i((e=>{p&&p(ca(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Me,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:u("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",Wt,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),da({list:l,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),ga(a)]})})),pa=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),ga=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),fa=["От 1 000 ₽","До 1 000 000 000 ₽"],xa=d((({field:e})=>o(ha,{title:"Сумма, ₽",items:fa,min:1e3,max:1e9,...e("amount")}))),ba=e=>{const{data:t,error:n}=jn(`/api/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,ya);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},ya=async e=>await rt(e,{method:"POST"})||[],va=ht((({field:e,source:t,label:n,fieldName:a,input:l})=>{const i=t&&t?.map((e=>({key:e.key||"",text:e.value})))||[];return o(hn,{placeholder:"Выберите из списка",label:n,options:i,..._n(e(a),Rn[a],l?.required)})})),Na=d((({field:e,input:t})=>{const{data:n}=ba("EMPLOYEES_NUMBER");return o(va,{field:e,source:n,label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),wa=d((({field:e,input:t})=>o(an,{label:"Годовая выручка, ₽",..._n(e("annualRevenue"),Rn.annualRevenue,t?.required)}))),Ca=d((({field:e})=>o(ia,{text:"Наличие военного билета",..._n(e("armyIdFlg"),Rn.armyIdFlg)}))),ka=d((({field:e,input:t})=>o(an,{label:"Код представителя Банка",placeholder:"Введите код",type:"number",..._n(e("bankEmployeeCode"),Rn.bankEmployeeCode,t?.required),...t}))),Sa=d((({field:e})=>o(an,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),Ta=d((({field:e})=>o(ia,{text:"В отношении меня ведётся производство по делу о банкротстве",..._n(e("bankruptcyFlg"),Rn.bankruptcyFlg)}))),Ia=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:a,currentYear:l,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const u=[];for(let c=0;c<7;c++)if(0===m&&c<t)u.push(o("td",{},`empty-${c}`));else if(d>n)u.push(o("td",{},`empty-${c}`));else{const t=new Date(l,a,d),n=Ba(t,e),c=Ra(t,i,r);u.push(o("td",{children:o("div",{className:Pa(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},Ba=(e,t)=>t&&e.toDateString()===t.toDateString(),Ra=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),Pa=(e=!1,t=!1)=>u("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),Da=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Ma=d((({today:e,currentMonth:t,currentYear:n,min:a,max:l,onDateSelect:s=Ut,setValue:d=Ut})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:u,totalDays:h}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Da.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Ia({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:a,max:l,onDateClick:m})})]})})),_a=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function Aa(e,t){const n=e.replace(/\D/g,"");if(""===n||e?.length===t.length)return e;const a=[...t],l=a.findIndex(za),i=a.map(((e,t)=>Ea(e)?a.slice(0,t).filter(Ea).length:-1)),r=a.map(((e,t)=>Fa(e)?e:n.charAt(i[t])||e)),s=i.indexOf(n.length-1)+1;return r.slice(0,Math.max(l,s)).join("")}const za=e=>"_"===e,Fa=e=>/\d/.test(e),Ea=e=>za(e)||Fa(e),Va=1940,Oa={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},La=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:i,disabled:r,onChange:d,onClick:m})=>{const h=s(null),[p,g]=a(i||"");return l((()=>{g(i||"")}),[i]),c("div",{onClick:()=>{null!==h.current&&h.current.focus(),m?.()},className:u("relative",n),children:[o("input",{ref:h,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(Aa(t,"__.__.____"))},onBlur:()=>{if(ja(p)){const[n,a,l]=p.split(".");d?.(new Date(Number(l),Number(a)-1,Number(n))),e(Number(a)-1),t(Number(l))}else g(i||"")},disabled:r}),r?null:o(W,{className:"mr-s",...Oa})]})})),ja=e=>{const[t,n,a]=e.split(".");if((e=>Number(e)>=Va&&Number(e)<=(new Date).getFullYear())(a)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(a),Number(n)-1,1);let l=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),l++;if(Number(t)>0&&Number(t)<=l)return!0}return!1},$a=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:a,setSelectedMonth:l,setSelectedYear:i,disabled:r=!1})=>o(La,{onChange:a,disabled:r,onClick:e,value:t&&xt(t),setSelectedMonth:l,setSelectedYear:i,className:u("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),qa=_a.map((e=>({key:e}))),Ua=Array.from({length:(new Date).getFullYear()-Va+1},((e,t)=>Va+t)).reverse().map((e=>({key:String(e)}))),Wa=(e,t)=>{const n=new Date(e,t,1);let a=0;for(;n.getMonth()===t;)a++,n.setDate(n.getDate()+1);return a},Ha=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:a,onChange:l})=>{a&&l?.(new Date(t,n,Math.min(e,a.getDate())))},Ya={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Ka={className:"min-w-32",iconVersion:"black",isBorder:!1},Ga=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:h})=>{const[p,{setValue:g}]=Lt(!1),[f,x]=a(n?.getMonth()||(new Date).getMonth()),[b,y]=a(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:v,handleNextMonth:N,handleSelectMonth:w,handleSelectYear:C,monthsOptions:k,yearsOptions:S,handleChangeVisibleCalendar:T,ref:I}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:a,onYearSelect:l,selectedYear:r,onChange:s,value:o})=>{const c=$t(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?a(n+1):(a(0),l(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?a(n-1):(a(11),l(r-1))}),[n]),handleSelectMonth:i((({key:e})=>{a(_a.indexOf(e));const t=Wa(r,_a.indexOf(e));Ha({maxDateOfMonth:t,selectedYear:r,selectedMonth:_a.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:i((({key:e})=>{l(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:qa,yearsOptions:Ua,ref:c}})({onYearSelect:y,onMonthSelect:x,onShowCalendar:g,selectedYear:b,selectedMonth:f,showCalendar:p,onChange:h,value:n}),B=((e,t)=>{const[n,i]=a(!1);return l((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();i(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(I,370);return c("div",{className:u("space-y-xs",e),ref:I,children:[Ht(t),c("div",{className:"relative",children:[$a({handleChangeVisibleCalendar:T,value:n,valid:r,onChange:h,disabled:m,setSelectedMonth:x,setSelectedYear:y}),p&&!m?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":B}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:v,children:o(W,{...Ya,className:"-rotate-90 cursor-pointer"})}),o(cn,{onChange:w,value:{key:_a[f]},options:k,...Ka}),o(cn,{onChange:C,value:{key:String(b)},options:S,...Ka}),o("div",{className:"my-auto",onClick:N,children:o(W,{...Ya,className:"rotate-90 cursor-pointer"})})]}),o(Ma,{today:n,currentMonth:f,currentYear:b,onDateSelect:h,min:s,max:d,setValue:g})]}):null]})]})})),Xa=d((({className:e,label:t,error:n,errors:a,...l})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ga,{label:qt({label:t,errors:a}),valid:Boolean(!n),...l}),Xt(n)]}))),Ja=d((({field:e,input:t})=>o(Xa,{label:"Дата начала работы на текущем месте",..._n(e("beginDate"),Rn.beginDate,Kn(e,t?.required)),...t}))),Za=d((({field:e,input:t,isRetailForm:n=!1})=>{const{value:a}=e("birthday");return o(Xa,{label:"Дата рождения",..._n(e("birthday"),Rn.birthday,t?.required),error:n&&a&&!Qa(a)?"Допустимый возраст заёмщика - от 23 до 75 лет":""})})),Qa=e=>{const t=new Date,n=new Date(t.getFullYear()-23,t.getMonth(),t.getDate()),a=new Date(t.getFullYear()-75,t.getMonth(),t.getDate());return!(!e||e>n||e<a)},el=d((({field:e,input:t})=>o(an,{label:"Место рождения",..._n(e("birthPlace"),Rn.birthPlace,t?.required),...t}))),tl=d((({field:e,input:t})=>{const{data:n}=ba("CARD_TYPE");return o(va,{field:e,source:n,label:"Категория карты",fieldName:"cardCategory",input:t})})),nl=d((({field:e,input:t})=>o(an,{label:"Количество детей до 18 лет",placeholder:"Введите значение",type:"number",..._n(e("children"),Rn.children,t?.required),...t}))),al=d((({field:e,input:t})=>o(an,{label:"Кодовое слово",..._n(e("codeWord"),Rn.codeWord,t?.required),...t}))),ll=d((({field:e,input:t})=>o(an,{label:"Количество объектов инкассации",type:"number",..._n(e("collectionCount"),Rn.collectionCount,t?.required)}))),il=d((({field:e,input:t})=>o(an,{className:"col-span-2",..._n(e("comment"),Rn.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),rl=d((({field:e,input:t})=>{const{data:n}=ba("INCOME_CERT_UNITED");return o(va,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),sl=d((({field:e,input:t})=>{const{data:n}=ba("MILITARY_STATUS");return o(va,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),ol={processPersonalDataFlg:{text:"Согласие на обработку персональных данных",docId:4},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentOthersFlg:{text:"Прочие согласия",docId:1},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3},consentToReceiveMaterials:{text:"Согласен на получение информационных и аналитических материалов по электронной почте"}};async function cl(e,t,n){const a=await fetch(`/api/v1${e}`,{method:t,headers:{"Content-Type":"application/json",...ml()},credentials:"include",body:n?JSON.stringify(n):null});return dl(a)?a.json():a}const dl=e=>"application/json"===e.headers.get("Content-Type"),ml=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},ul=async(e,t=!1)=>{const n=await(async(e,t=!1)=>{const n=await cl(`/feedback/file?id=${encodeURIComponent(e)}&convertToPngFlg=${t}`,"GET");return await n.blob()})(e,t);return URL.createObjectURL(n)},hl=d((({className:e,onClose:t})=>o("button",{className:u("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(W,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),pl=d((({className:e,head:t,children:n,onClose:a,onClick:l})=>{const{close:r}=de(),s=i((()=>{r(),a&&a()}),[a]);return c("div",{onClick:l,className:u("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(hl,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),gl=async(e,t,n=!1)=>{const a=await ul(t,n);e(o(pl,{className:"my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0",children:n?o("img",{src:a}):o("iframe",{src:`${a}#toolbar=0`,className:"w-full h-[80vh]",id:"iframe-dialog"})}))},fl=d((({className:e,error:t,docId:n,...a})=>{const{open:l}=de(),i=Ce();return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(ea,{...a}),n?o(ye,{className:"text-primary-main",onClick:()=>gl(l,n,i),children:o(Me,{children:"Ознакомиться"})}):null]}),Xt(t)]})})),xl=d((({field:e,input:t})=>t&&t.name?o(fl,{text:ol[t.name]?.text,docId:ol[t.name]?.docId,..._n(e(t.name),Rn[t.name],t?.required)}):null)),bl=d((({field:e,input:t})=>{const{data:n}=ba("CREDIT_IN_RSHB");return o(va,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком / \n вкладчиком с долей участия более 20% уставного капитала руководителем, \n которого Вы являетесь, кредит в АО «Россельхозбанк»",fieldName:"creditInRshbCd",input:t})})),yl={horizontal:"@lg:flex-row",vertical:""},vl=d((({label:e,items:t,value:n,className:a,onChange:l,disabled:i=!1,orientation:r="horizontal"})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Me,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",yl[r],a),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(ea,{isRadio:!0,text:t,value:n===e,onChange:()=>l&&l(e),disabled:i},String(e))))})]}))),Nl=d((({className:e,label:t,onChange:n,error:a,...l})=>c("div",{className:u("shrink-0 w-full",e),children:[o(vl,{label:qt({label:t,errors:l?.errors}),onChange:e=>n&&n(e),...l}),Xt(a)]}))),wl=[{id:"rub",text:"Рубль"}],Cl=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("currency");return o(Nl,{label:"Валюта",orientation:"horizontal",items:wl,value:n,onChange:e=>a?.(e),..._n(e("currency"),Rn.currency,t?.required)})})),kl=d((({field:e,input:t})=>o(Xa,{label:"Дата доставки",..._n(e("deliveryDate"),Rn.deliveryDate,t?.required)}))),Sl=d((({field:e,input:t})=>o(an,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",type:"number",inputLength:2,..._n(e("dependents"),Rn.dependents,t?.required),...t}))),Tl=d((({field:e,input:t})=>o(Xa,{label:"Желаемая дата встречи",..._n(e("desiredMeetingDate"),Rn.meetingDay,t?.required)}))),Il=d((({field:e})=>o(ia,{text:"Являюсь инвалидом",..._n(e("disablePeopleFlg"),Rn.disablePeopleFlg)}))),Bl=d((({field:e,input:t})=>o(Xa,{label:"Дата выдачи",..._n(e("dulIssueDateField"),Rn.dulIssueDateField,t?.required),disabled:t?.filledByEsia&&Gn(e)}))),Rl=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("dulSubdivisionCode"),l=i((e=>{a?.(e?.data?.code?.replace("-",""))}),[]);return o(an,{disabled:t?.filledByEsia&&Gn(e),label:"Кем выдан",...t,..._n(e("dulIssuedBy"),Rn.dulIssuedBy,t?.required),onDaDataChange:l,daDataQueryPrefix:n})})),Pl=d((({field:e,input:t})=>o(an,{disabled:t?.filledByEsia&&Gn(e),label:"Номер документа",type:"number",inputLength:6,..._n(e("dulNumber"),Rn.dulNumber,t?.required)}))),Dl=d((({field:e,input:t})=>o(an,{disabled:t?.filledByEsia&&Gn(e),label:"Серия документа",type:"number",inputLength:4,..._n(e("dulSerie"),Rn.dulSerie,t?.required)}))),Ml=d((({field:e,input:t})=>{const n=i((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(an,{disabled:t?.filledByEsia&&Gn(e),label:"Код подразделения",type:"number",inputLength:6,...t,..._n(e("dulSubdivisionCode"),Rn.dulSubdivisionCode,t?.required),onDaDataChange:n})})),_l=d((({field:e,input:t})=>{const{data:n}=ba("EDUCATION_LEVEL");return o(va,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),Al=d((({field:e,input:t})=>{const{required:n,...a}=t;return o(an,{label:"Электронная почта",..._n(e("email"),Rn.email,n),...a})})),zl=d((({field:e,input:t})=>{const{data:n}=ba("ORGANIZATION_ACTIVITY_TYPE");return o(va,{field:e,source:n,label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),Fl=d((({field:e,input:t})=>{const{data:n}=ba("ORGANIZATION_KIND");return o(va,{field:e,source:n,label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),El=d((({field:e,input:t})=>{const{data:n}=ba("EMPLOYMENT_INFO_UNITED");return o(va,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),Vl=d((({field:e,input:t})=>o(an,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",type:"number",..._n(e("expenses"),Rn.expenses,t?.required),...t}))),Ol=d((({field:e,input:t})=>o(an,{label:"Стаж",placeholder:"За последние 5 лет",type:"number",inputLength:2,..._n(e("experience5Years"),Rn.experience5Years,Kn(e,t?.required)),...t}))),Ll=d((({field:e})=>{const{value:t,onChange:n}=e("familyMembers"),a="В браке"===e("familyStatus")?.value?.key?2:1,i=Number(e("children")?.value),r=Number(e("dependents")?.value),s=a+i+r;return l((()=>{e?.("familyMembers")?.onChange?.(s)}),[e("familyStatus")?.value?.key,i,r]),o(an,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",disabled:!0,value:t,onChange:e=>n?.(e)})})),jl=d((({field:e,input:t})=>{const{data:n}=ba("MARITAL_STATUS");return o(va,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),$l=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],ql=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Ul=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Wl=d((({field:e,input:t})=>o(hn,{label:"Способ получения ответа",options:Ul,..._n(e("feedbackMethod"),Rn.feedbackMethod,t?.required)}))),Hl=d((({field:e,input:t})=>o(an,{label:"ФИО",..._n(e("fullName"),Rn.fullName,t?.required),...t}))),Yl=d((({field:e,input:t})=>o(an,{label:"Общий стаж",type:"number",inputLength:2,placeholder:"Количество лет",..._n(e("generalSeniority"),Rn.generalSeniority,Kn(e,t?.required)),...t}))),Kl=d((({field:e,input:t})=>{const{data:n}=ba("HOUSE_TYPE");return o(va,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Gl=d((({field:e,input:t})=>{const n=i((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(an,{label:"ИНН",type:"number",inputLength:12,...t,..._n(e("inn"),Rn.inn,Kn(e,t?.required)),onDaDataChange:n})})),Xl=d((({field:e})=>o(ia,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Jl=d((({field:e,input:t})=>o(an,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",type:"number",inputLength:2,..._n(e("jobsNumber"),Rn.jobsNumber,Kn(e,t?.required)),...t}))),Zl=d((({field:e,input:t})=>o(an,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",inputLength:2,..._n(e("lastJobExperience"),Rn.lastJobExperience,Kn(e,t?.required)),...t}))),Ql=d((({field:e,input:t})=>o(an,{label:"Наименование юридического лица",...t,..._n(e("legalEntityName"),Rn.legalEntityName,t?.required)}))),ei=d((({field:e,input:t})=>o(an,{label:"ОПФ",placeholder:"ООО, ПАО и др.",..._n(e("legalForm"),Rn.legalForm,Kn(e,t?.required)),...t}))),ti=[];async function ni(){const e=await rt("/api/v1/outservice/outserviceregions");return e&&Array.isArray(e)?e:ti}const ai=d((({field:e,input:t})=>{const n=e("region")?.value?.key,{data:a}=jn("outServiceRegions",ni),i=a?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return l((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(hn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:i,..._n(e("localities"),Rn.localities,t?.required),isSearch:!0})})),li=d((({field:e,input:t})=>o(an,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",..._n(e("mandatoryIncome"),Rn.mandatoryIncome,t?.required),...t}))),ii=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],ri=d((({field:e,input:t})=>o(Nl,{orientation:"horizontal",items:ii,..._n(e("methodObtain"),Rn.methodObtain,t?.required)}))),si=d((({field:e,input:t})=>o(an,{label:"Отчество (Обязательно, при наличии)",inputLength:60,disabled:t?.filledByEsia&&Gn(e),..._n(e("middleName"),Rn.middleName),...t}))),oi=d((({field:e,input:t})=>o(an,{label:"Имя",inputLength:60,disabled:t?.filledByEsia&&Gn(e),..._n(e("name"),Rn.name,t?.required),...t}))),ci=d((({value:e=!1,text:t,type:n="checkbox",onChange:a})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>a&&a(!e),children:[o("div",{className:u("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:u("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Me,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),di=d((({field:e})=>Fn(e("acquiringType")?.value?.key)?o(ci,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),mi=d((({field:e,input:t})=>{const{data:n}=ba("ORGANIZATION_TYPE");return o(va,{field:e,source:n,label:"Тип организации",fieldName:"organization",input:t})})),ui=d((({field:e,input:t})=>{const n=i((t=>{e?.("inn")?.onChange?.(t.data?.inn),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(an,{label:"Наименование организации",...t,..._n(e("organizationName"),Rn.organizationName,Kn(e,t?.required)),onDaDataChange:n})})),hi=d((({field:e,input:t})=>o(an,{label:"Иные доходы",placeholder:"Введите значение",type:"number",..._n(e("otherIncome"),Rn.otherIncome,t?.required),...t}))),pi=d((({field:e,input:t})=>o(an,{label:"Обязательные выплаты",placeholder:"Введите значение",type:"number",..._n(e("otherPayments"),Rn.otherPayments,t?.required),...t}))),gi=d((({field:e,input:t})=>o(Xa,{label:"Дата регистрации по месту жительства",..._n(e("participantDateRegistration"),Rn.participantDateRegistration,t?.required)}))),fi=d((({field:e,input:t})=>{const n="BUSINESS_OWNER"===e("positionOrganization")?.value?.key,a={..._n(e("partInBusiness"),Rn.partInBusiness,Kn(e,n&&t?.required))};return o(an,{label:"Доля участия в бизнесе",placeholder:"в %",type:"number",inputLength:3,...a,...t,onChange:e=>a?.onChange&&a?.onChange(String(Number(e)>100?100:Number(e)||"")),value:n?a?.value:"",disabled:!n})})),xi=d((({field:e,input:t})=>{const{required:n,...a}=t;return o(an,{..._n(e("partnerComments"),Rn.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...a})})),bi=[{id:"mir",text:"Карта МИР"},{id:"union_pay",text:"UnionPay"},{id:"payment_system_j",text:"Платежная система (Дж)"},{id:"payment_system_b",text:"Платежная система (B) "},{id:"free_card",text:"Бесплатная карта"}],yi=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("paymentSystem");return o(Nl,{label:"Платежная система",orientation:"horizontal",items:bi,value:n,onChange:e=>a?.(e),..._n(e("paymentSystem"),Rn.paymentSystem,t?.required)})})),vi=e=>"_"===e,Ni=e=>/\d/.test(e),wi=e=>vi(e)||Ni(e),Ci=[..."+7 (___) ___-__-__"],ki=Ci.findIndex(vi),Si=Ci.map(((e,t)=>wi(e)?Ci.slice(0,t).filter(wi).length:-1));function Ti(e){const t=e.replace(/\D/g,""),n=Ci.map(((e,n)=>Ni(e)?e:t.charAt(Si[n])||e)),a=Si.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max(ki,a)):n).join("")}const Ii=d((({children:e,onChange:t,...n})=>{const a=i((e=>t&&t(Ti(e))),[t]),l=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(Yt,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>l(e?.target?.value||""),children:e})})),Bi=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ii,{"aria-label":t,label:qt({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),Xt(n)]}))),Ri=d((({field:e,input:t})=>o(Bi,{label:"Телефон",..._n(e(t?.name||"phone"),Rn.phone,"organizationPhone"===t?.name?Kn(e,t?.required):t?.required),...t}))),Pi=d((({field:e,input:t})=>{const{data:n}=ba("POSITION");return o(va,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),Di=d((({field:e})=>Fn(e("acquiringType")?.value?.key)?o(ci,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Mi=ht((({field:e,source:t})=>o(hn,{placeholder:"Выберите продукт",label:"Продукт",options:_i(t?.productList),...Mn(e("product"),Rn.product)}))),_i=e=>(e??[]).map((e=>({key:e,value:e})));function Ai(e="/api/v1/regions"){const{data:t}=jn(e,st);return Array.isArray(t)?t:[]}const zi=d((({field:e,input:t,url:n})=>{const a=Ai(n);return o(hn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>a?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[a]),..._n(e("region"),Rn.region,t?.required)})})),Fi=d((({field:e,input:t})=>{const n=Wn(!0),a=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(hn,{label:"Регион",placeholder:"Выберите регион",options:a,..._n(e("region"),Rn.region,t?.required)})})),Ei=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:l,renderFoldButton:r})=>{const[s,o]=a(n),d=i((()=>{o((e=>!e))}),[]),m=l({isUnfolded:s,onToggle:d}),u=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[u,m]}:{className:e,role:"group",children:[m,u]})}));const Vi=d((({className:e="",isUnfolded:t,children:n})=>{const a=s(null),i=function(e,t){const n=s(null);return l((()=>{const t=n?.current;if(!t)return;const a=new ResizeObserver((n=>{e(t,n[0])}));return a.observe(t),()=>{a.disconnect()}}),[e,...t]),n}((e=>{a.current&&(a.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:a,className:`transition-max-h duration-300 overflow-hidden ${a.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),Oi=d((({value:e,subText:t,children:n,isPhone:a,...l})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:Li({textItems:i,subText:t,children:n,isPhone:a,...l})})),Li=({label:e,labelSize:t="text-m",textItems:n,subColor:a,subText:l,className:i,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Me,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||ji(n,s),l?o(Me,{color:a,size:"text-m",children:l}):null]}),ji=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Me,{size:"text-l",children:t?o("a",{href:`tel:${$i(e)}`,children:e.trim()}):e.trim()},String(n)))),$i=e=>e.replace(/\D/g,""),qi=d((({className:e,children:t})=>o("div",{className:u("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Ui=e=>{const t=Hi(e);return o(Oi,{label:"Режим работы",value:t,className:"max-w-none"})},Wi=({workTime:e="",lunchHour:t="",daysOff:n=""},a=!1)=>e?[`${a?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Hi=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),a=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Wi({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":a}),Wi({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:a},!0)].filter(Boolean)},Yi=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Ki=e=>Yi.map((([t,n,a])=>({key:t,title:a,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Gi=e=>{if(!e)return null;const t=Xi(e);return c(qi,{className:"border-none",children:[o(Oi,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Ji)})}),o(Oi,{label:"Режим работы",className:"max-w-none",children:o(Me,{children:e})})]})},Xi=e=>{const t=Yi.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],a=n[n.length-1]?.toLowerCase();return a?.includes("выходной")?t.map((e=>({...e,status:!a?.includes(e.short.toLowerCase())}))):t},Ji=({short:e,status:t},n)=>o("div",{className:u("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Me,{size:"text-xs",children:e})},String(n)),Zi=({currency:e,buyExchangeRate:t,saleExchangeRate:n},a)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Oi,{label:"Валюта",value:e.currency}):null,t?o(Oi,{label:"Купить",value:String(t)}):null,n?o(Oi,{label:"Продать",value:String(n)}):null]},String(a)),Qi={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},er=d((({className:e,children:t,color:n="gray"})=>c("div",{className:u("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Qi[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Me,{size:"text-m",color:Qi[n].text,children:t})]}))),tr=(new Date).getDay(),nr=e=>{const[t]=e?.slice(tr-1)??[];if(!t)return null;const{lunchHour:n,status:a,workTime:l,hasLunch:i}=t;return a?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[l?o(er,{color:"green",children:l}):null,n&&i?o(er,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(er,{color:"red",children:"Выходной"})},ar=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",lr=({title:e,status:t,workTime:n,lunchHour:a,hasLunch:l},i)=>o(Oi,{label:e,value:t&&n?n:"",subText:ar({lunchHour:a,hasLunch:l,status:t}),subColor:!t||l?"text-error":"text-green-dark"},String(i)),ir=["ArrowDownIcon","ArrowUpIcon"],rr=["Подробнее","Скрыть"],sr=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:rr[Number(e)]}),o(W,{className:"text-primary-text",name:ir[Number(e)],width:"16",height:"16"})]}),or=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,cr=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,dr=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,mr=({name:e,address:t,phone:n,fax:a,phoneBusiness:l,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=Ki(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Me,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:t})]}):null]}),nr(h)]}),o("div",{className:"hidden sm:block",children:ur({phone:n,fax:a,phoneBusiness:l,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Ei,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Vi,{isUnfolded:e,children:ur({phone:n,fax:a,phoneBusiness:l,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>sr({isUnfolded:e,onToggle:t})})]},String(u))},ur=({phone:e,fax:t,phoneBusiness:n,phoneNatural:a,phoneCallCentre:l,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Ki(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(qi,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Oi,{label:"Факс",value:t,isPhone:!0}),o(Oi,{label:"Телефон филиала",value:e,isPhone:!0}),o(Oi,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Oi,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(Oi,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Oi,{label:"Контакт-центр",value:l,isPhone:!0})]}),r?.isMatchesPattern?o(qi,{children:o(Oi,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(lr)})})}):c(qi,{children:[o(Oi,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Ji)})}),Ui(d)]}),r?.businessScheduleVisibleTag?Gi(r?.businessScheduleDescription):null,s?.currencies?.length?o(qi,{className:"flex-wrap",children:s?.currencies?.map(Zi)}):null]})},hr=({name:e="",address:t="",workSchedule:n})=>{const a=(l=e)?`${l?.charAt(0)?.toUpperCase()}${l?.slice(1)}`:"";var l;const i=`${t} ${(e=>{const t=Ki(e),n=e?Hi(t):"",a=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?or(n):dr(n,a):cr(n):null})(n)}`;return{header:a,body:i}},pr=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),gr=d((({children:e})=>pr?e:null)),fr=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:u("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:u("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),xr="/icons/MapMarkerClusterIcon.svg",br="/icons/MapMarkerClusterYellowIcon.svg";function yr({yandexMaps:e,map:t,points:n,isLoad:a}){if(a||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const l=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=vr("offices",e,l);if(n.length&&n.every((e=>"type"in e))){const a=vr("workplaces",e,l),r=Nr(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=Nr(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),a.add(r),t.geoObjects.add(a),t.geoObjects.add(i)}else{const a=Nr(n,"offices",e);i.add(a),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const vr=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?xr:br,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),Nr=(e,t,n)=>e.map((({coords:e,content:a})=>new n.Placemark(e,{balloonContentHeader:a?.header,balloonContentBody:a?.body,balloonContentFooter:a?.footer,hintContent:a?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?xr:br,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),wr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},Cr={...wr,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},kr=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Cr).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(W,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Sr=e=>globalThis[e],Tr=(e,t)=>{const n=document.getElementById(t);if(n){const t=Sr(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(Sr(e))}))}))}return new Promise(((n,a)=>{const l=document.createElement("script");l.src=t,l.async=!0,l.id=t,l.addEventListener("load",(()=>{n(Sr(e))})),l.addEventListener("error",(e=>{a(e)})),document.head.appendChild(l)}))};const Ir=()=>function(e,t,n=!0){const[i,r]=a(void 0);return l((()=>{let a=!0;return Tr(e,t).then((e=>{a&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(a=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${_.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),Br={...wr,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Rr=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),a="in"===t?n+1:n-1;e.current.setZoom(a,{checkZoomRange:!0})},className:`${Object.values(Br).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),Pr=[55.753995,37.614069],Dr=d((({points:e,className:t="",zoom:n=5,isLoad:a,selectedAddress:i})=>{const r=s(null),d=Ir();if(l((()=>{r.current?yr({yandexMaps:d,map:r.current,points:e,isLoad:a}):d?.ready((()=>{r.current||(r.current=new d.Map("map",{center:Mr(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),yr({yandexMaps:d,map:r.current,points:e,isLoad:a})}))}),[d,e,n,a,i]),l((()=>{r.current&&i&&d?.geocode(i).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();r.current.setCenter(t),r.current.setZoom(18)}))}),[i]),!d)return null;const m="z-10";return c("div",{id:"map",className:u("relative","w-full",t),children:[a?o(fr,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",m),children:[o(Rr,{yandexMaps:r}),o(Rr,{yandexMaps:r,direction:"out"})]}),kr(r,d,u("right-2 top-80",m))]})})),Mr=e=>{const t=[Ar(_r(e,0)),Ar(_r(e,1))];return t.every((e=>e))?t:Pr},_r=(e,t)=>e.map((e=>e.coords?.[t])),Ar=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,zr={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Fr={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Er={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)};function Vr({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const Or={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"},Lr={primary:u("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:u("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},jr=d((({children:e,...t})=>{const n=e=>({...e,onClick:me(Vr(e))}),{className:a,version:l="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=n(t);return o("button",{className:u("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":u(Or[l],Lr[l]),a),type:s,role:d,onClick:m,children:e})})),$r=(e,t)=>e&&"underlined"!==t?"primary":"secondary",qr=(e,t,n)=>{const a=$r("all"===t),l=$r("business"===t),i=(e,t,a)=>{const l=e.currentTarget===e.target&&"business"===t?r(a):a;return n(t),l},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(jr,{"data-id":"all",onClick:t=>i(t,"all",e),version:a,children:"Для физических лиц"}),o(jr,{"data-id":"business",onClick:t=>i(t,"business",e),version:l,children:"Для юридических лиц"})]})},Ur=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Pe,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Me,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Wr="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Hr=({filters:e,field:{field:t,reset:n},onlyOffice:a,labels:l})=>{const i=a?5:6,r=(e||[]).map((e=>o(ea,{text:l[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(Ei,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Wr,children:s}),o(Vi,{className:Wr,isUnfolded:e,children:d})]}),renderFoldButton:Yr(n,a)})}):null})},Yr=(e,t=!1)=>({isUnfolded:n,onToggle:a})=>c("div",{className:"flex space-x-lg",children:[t?o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:a}):null,o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:Kr()})]}),Kr=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),Gr=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Me,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Xr=()=>{},Jr=e=>"all"===e?"block":"hidden",Zr=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:l=[],renderCard:i=Xr,renderRemoteWorkplaceCard:r=Xr,getBalloon:s=Xr,getBalloonRemoteWorkplaces:d=Xr,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=Ft(zr),{filteredItems:b,points:y,filteredRemoteWorkplaces:v,lengthItems:N}=ns({data:t,remoteWorkplaces:l,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=a("all"),k={filters:es([...t,...l]),field:{field:f,reset:x},onlyOffice:p,labels:Fr};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Gr(h,N),m?Ur(m):null,p&&qr(t,w,C),o("div",{className:u("pb-3xl",Jr(w)),children:Hr(k)})]}),o("div",{className:"h-[600px]",children:o(gr,{children:o(Dr,{points:y,isLoad:n,className:"h-full"})})})]}),c(gr,{children:[b.map(i),v.map(r)]})]})})),Qr=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Er[t](e)))))},es=e=>Object.keys(zr).filter((t=>e.filter((e=>Er[t](e))).length)),ts=()=>{},ns=({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:a=ts,getBalloonRemoteWorkplaces:l=ts})=>{const[i,s,o,c]=r((()=>{const i=Qr(e,n),r=Qr(t,n),s=[...i.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a(e)}))),...r.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:l({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[i,s,r,i.length+r?.length]}),[e,t,n,a,l]);return{filteredItems:i,points:s,filteredRemoteWorkplaces:o,lengthItems:c}},as=d((({field:e,input:t})=>{const n=e("regionRetail"),a=e("addressRetail"),i=Wn(),r=n?.value?.key,s=i.find((({region:e})=>e===r)),d=!i,m=n?.value?.text,u=Wn()?.find((e=>e?.region===m))?.branches;l((()=>{""!==n?.value?.key&&e?.("addressRetail")?.onChange?.("")}),[n?.value]);const{points:h}=ns({data:s?.branches||[],filtrationState:{},getBalloon:hr}),p=Boolean(n?.value?.key);return c("div",{children:[o(hn,{label:"Адрес отделения",placeholder:"Выберите отделение",options:(u||[]).map((({address:e=""})=>({key:e,text:e}))),..._n(e("addressRetail"),Rn.addressRetail,t?.required&&p),isSearch:!0}),o("div",{className:"h-[600px]",children:o(gr,{children:o(Dr,{points:h,isLoad:d,className:"h-full",selectedAddress:a?.value?.text})})})]})})),ls=d((({field:e,input:t})=>{const n=Wn();return o(hn,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:r((()=>n?.map((({region:e=""})=>({key:e,text:e})))),[n]),..._n(e("regionRetail"),Rn.regionRetail,t?.required)})})),is=d((({field:e,input:t})=>o(an,{label:"Пенсионные доходы",placeholder:"Введите значение",type:"number",..._n(e("retirementIncome"),Rn.retirementIncome,t?.required),...t}))),rs=d((({field:e})=>{const t=e("secondaryPhone");return o(Bi,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Mn(t,Rn.secondaryPhone):t})})),ss=d((({field:e,input:t})=>o(hn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:ql,..._n(e("serviceDirection"),Rn.serviceDirection,t?.required)}))),os=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],cs=d((({field:e,input:t})=>o(Nl,{label:"Пол",orientation:"horizontal",items:os,..._n(e("sex"),Rn.sex,t?.required)}))),ds=d((({field:e})=>o(ia,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",..._n(e("shareholderFlg"),Rn.shareholderFlg)}))),ms=d((({children:e,onChange:t,...n})=>{const a=i((e=>t&&t(Aa(e,"___-___-___ __"))),[t]),l=i((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(Yt,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>l(e?.target?.value||""),children:e})})),us=d((({className:e,label:t,value:n,error:a,onChange:l,onBlur:i,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(ms,{"aria-label":t,label:qt({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:l,onBlur:i,placeholder:"___-___-___ __"}),Xt(a)]}))),hs=d((({field:e,input:t})=>{const n=e("consentPfrFlg")?.value;return o(us,{label:"СНИЛС",..._n(e("snils"),Rn.snils,!!n&&t?.required),...t})})),ps=d((({field:e,input:t})=>o(an,{label:"Фамилия",inputLength:60,disabled:t?.filledByEsia&&Gn(e),..._n(e("surname"),Rn.surname,t?.required),...t}))),gs=["От 1 мес","До 15 лет"],fs=d((({field:e})=>o(ha,{title:"Срок, месяцев",items:gs,min:1,max:180,...e("term")}))),xs=d((({field:e,input:t})=>o(an,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",..._n(e("totalIncome"),Rn.totalIncome,t?.required),...t}))),bs=d((({field:e,input:t})=>o(hn,{label:"Тип обслуживания",options:$l,..._n(e("serviceType"),Rn.serviceType,t?.required)}))),ys=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],vs=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return l((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(vl,{className:"whitespace-normal",orientation:"horizontal",items:ys,value:t,onChange:e=>n&&n(e)})})}));const Ns={$ref:"/wcms-resources/outservice-productlist.json"},ws=(e,t,n=!1)=>(a,l)=>{const i="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,r={surname:o(ps,{field:e,input:a}),name:o(oi,{field:e,input:a}),middleName:o(si,{field:e,input:a}),phone:o(Ri,{field:e,input:a}),organizationPhone:o(Ri,{field:e,input:a}),email:o(Al,{field:e,input:a}),fullName:o(Hl,{field:e,input:a}),inn:o(Gl,{field:e,input:a}),legalForm:o(ei,{field:e,input:a}),organizationName:o(ui,{field:e,input:a}),generalSeniority:o(Yl,{field:e,input:a}),lastJobExperience:o(Zl,{field:e,input:a}),experience5Years:o(Ol,{field:e,input:a}),jobsNumber:o(Jl,{field:e,input:a}),beginDate:o(Ja,{field:e,input:a}),addressFact:o(Yn,{field:e,input:a}),organizationAddress:o(Xn,{field:e,input:a}),comment:o(il,{field:e,input:a}),addressBranch:o(Hn,{field:e,input:a,isPremium:i}),sex:o(cs,{field:e,input:a}),birthday:o(Za,{field:e,input:a,isRetailForm:n}),birthPlace:o(el,{field:e,input:a}),desiredMeetingDate:o(Tl,{field:e,input:a}),product:o(Mi,{field:e,source:Ns}),localities:o(ai,{field:e,input:a}),isClient:o(Xl,{field:e}),partnerComments:o(xi,{field:e,input:a}),collectionCount:o(ll,{field:e,input:a}),acquiringType:o(zn,{field:e,input:a}),onlineCheckout:o(di,{field:e}),posTerminal:o(Di,{field:e}),serviceType:o(bs,{field:e,input:a}),term:o(fs,{field:e}),amount:o(xa,{field:e}),annualRevenue:o(wa,{field:e,input:a}),vedTypes:o(vs,{field:e}),feedbackMethod:o(Wl,{field:e,input:a}),serviceDirection:o(ss,{field:e,input:a}),bankEmpolee:o(Sa,{field:e}),secondaryPhone:o(rs,{field:e}),consentToReceiveMaterials:o(xl,{field:e,input:a}),processPersonalDataFlg:o(xl,{field:e,input:a}),consentProviderFlg:o(xl,{field:e,input:a}),consentOthersFlg:o(xl,{field:e,input:a}),consentInformFlg:o(xl,{field:e,input:a}),consentPfrFlg:o(xl,{field:e,input:a}),applicationDate:o(an,{label:"Дата и время обращения в Банк",...e("applicationDate")}),region:i?o(Fi,{field:e}):o(zi,{field:e,input:a,url:Ot(t)}),education:o(_l,{field:e,input:a}),housing:o(Kl,{field:e,input:a}),employment:o(El,{field:e,input:a}),organization:o(mi,{field:e,input:a}),amountWorkers:o(Na,{field:e,input:a}),employerActivities:o(zl,{field:e,input:a}),employerOrganization:o(Fl,{field:e,input:a}),positionOrganization:o(Pi,{field:e,input:a}),familyStatus:o(jl,{field:e,input:a}),children:o(nl,{field:e,input:a}),familyMembers:o(Ll,{field:e,input:a}),dependents:o(Sl,{field:e,input:a}),totalIncome:o(xs,{field:e,input:a}),expenses:o(Vl,{field:e,input:a}),snils:o(hs,{field:e,input:a}),conscription:o(sl,{field:e,input:a}),armyIdFlg:o(Ca,{field:e,input:a}),dulSerie:o(Dl,{field:e,input:a}),dulNumber:o(Pl,{field:e,input:a}),dulIssueDateField:o(Bl,{field:e,input:a}),dulSubdivisionCode:o(Ml,{field:e,input:a}),dulIssuedBy:o(Rl,{field:e,input:a}),addressRegistration:o(Xn,{field:e,input:a}),addressCourier:o(Xn,{field:e,input:a}),participantDateRegistration:o(gi,{field:e,input:a}),retirementIncome:o(is,{field:e,input:a}),otherIncome:o(hi,{field:e,input:a}),mandatoryIncome:o(li,{field:e,input:a}),otherPayments:o(pi,{field:e,input:a}),disablePeopleFlg:o(Il,{field:e,input:a}),bankruptcyFlg:o(Ta,{field:e,input:a}),shareholderFlg:o(ds,{field:e,input:a}),legalEntityName:o(Ql,{field:e,input:a}),creditInRshbCd:o(bl,{field:e,input:a}),bankEmployeeCode:o(ka,{field:e,input:a}),partInBusiness:o(fi,{field:e,input:a}),regionRetail:o(ls,{field:e,input:a}),addressRetail:o(as,{field:e,input:a}),addressMatch:o(ra,{field:e,input:a}),paymentSystem:o(yi,{field:e,input:a}),currency:o(Cl,{field:e,input:a}),cardCategory:o(tl,{field:e,input:a}),codeWord:o(al,{field:e,input:a}),confirmationIncome:o(rl,{field:e,input:a}),methodObtain:o(ri,{field:e,input:a}),deliveryDate:o(kl,{field:e,input:a})};return function({input:e,field:t}){const{condition:n}=e,{value:a}=t(n?.name||"");return!n||n?.values?.find((e=>e===(a?.key??a)))}({input:a,field:e})?o("div",{children:r[a?.name||""]},String(l)):null},Cs=e=>2===e?"@xl:grid-cols-2":"",ks=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Me,{size:"text-h6",children:e})}):null,Ss=d((function({responseType:e,typeForm:t}){const n="OK"===e,a=n?"ResponseOKIcon":"ResponseFailIcon",{close:l}=de(),r=i((()=>{l()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(pl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:a,iconVersion:"normal"},width:"136",height:"136"}),o(k,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(jr,{type:"button",onClick:r,children:"Хорошо"})]})})})),Ts=e=>{const{open:t,close:n}=de();return{open:(n,a={})=>t(o(Ss,{...e,...n}),a),close:n}},Is=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Bs=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:a,amount:l,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:a=!1,term:l,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Fn(t?.key)?`/Онлайн касса=${n}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${l}/Выручка=${r}`})(e):null,u={...d,...Ps(o),...Rs(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Rs=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Ps=e=>e?{vedTypes:Object.fromEntries(ys.map((({id:t})=>[t,t===e])))}:{},Ds={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:An[0],serviceType:$l[0],feedbackMethod:Ul[0],serviceDirection:ql[0],vedTypes:ys[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Ms=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Me,{children:e}):null,t?o(ye,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Me,{children:t.text})}):null]}))),_s=(e,t)=>o(jr,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),As=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(ea,{...e}),o(Ms,{link:t})]}),Xt(Mn(e,Sn).error)]}):o(Ms,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),_s(n)]}),zs={send:async function(e,t=!1){const{typeForm:n,region:a,phone:l="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f="/api/v1"+(g?"/lead":"/sendcorporatelead"),x={typeForm:n,...Nt(a,g),...wt(i,g),...yt(l),...vt(s,"desiredMeetingDate"),...g?vt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...Ct(d)},...p};try{const e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},Fs=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:p,data:g,...f})=>{const x=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Ds[e.name||""]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=$l[1]),{...n,typeForm:{key:t,text:""}}})(x,n),[y,v]=a(""),w=Ts({typeForm:n}),C=i((async(e,t)=>{const n=Es(x,e),a=Is(Dn(n));if(!pn(a(e)))return console.warn("validation fail");const l=Bs({...e,...h}),i=await zs.send(l,"lead"===m)?"OK":"Fail";if(v(i),i&&w.open({responseType:i}),"OK"===i&&g){const e=At();kt({aspectsAttributes:g,aspects:e,ev:t})}return i}),[]),[,{field:k,onSubmit:S,reset:T}]=Ft(b,{onSubmit:C}),I=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return l((()=>{"OK"===y&&(v(""),T())}),[y]),c(Vt,{className:u("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:u(Cs(e.columns),"grid gap-x-m"),children:[ks(e.title),(e?.inputs||[])?.map(ws(k,n))]},`section-${t}`))),As(I?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),Es=(e,t)=>e.filter((e=>"secondaryPhone"===e?.name?Boolean(t.secondaryPhone):e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const a=t?.[e?.condition?.name??""];return n===(a?.key??a)}))));function Vs(e){const[t,n]=a(JSON.parse(globalThis.localStorage?.getItem(e)||"null"));return[t,i((t=>{globalThis.localStorage?.setItem(e,JSON.stringify(t)),n(t)}),[e,globalThis.localStorage])]}const Os=d((({inputs:e=[],typeForm:t="",field:n,key:a})=>{const l=e.every((e=>Boolean(n(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(Mn(n(e?.name),Rn[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(Ei,{isFoldButtonOnTop:!0,unfoldedByDefault:!0,renderFoldableSection:({isUnfolded:a})=>o(Vi,{isUnfolded:a,className:"flex flex-col pl-2xl",children:e.map(ws(n,t))}),renderFoldButton:Ls(c("div",{children:[o(ea,{value:l,onChange:t=>{for(const a of e){const e=n(a.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},a),Xt(i?"Отметьте все обязательные соглашения":"")]}))})})})),Ls=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",type:"button",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),js=({field:e,typeForm:t="",inputs:n,isRetailForm:a=!1})=>{const{consentInputs:l,restInputs:i}=$s(n||[]);return l.length>2?c("div",{children:[i.map(ws(e,t,a)),o(Os,{inputs:l,field:e})]}):(n||[])?.map(ws(e,t,a))},$s=e=>({consentInputs:e?.filter((e=>Object.keys(ol).includes(e.name||"")))||[],restInputs:e?.filter((e=>!Object.keys(ol).includes(e.name||"")))||[]}),qs={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",organizationPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:An[0],serviceType:$l[0],feedbackMethod:Ul[0],serviceDirection:ql[0],vedTypes:ys[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,addressRegistration:"",participantDateRegistration:void 0,currency:"",paymentSystem:"",cardCategory:{key:"",text:""},codeWord:""},Us=(e,t,n="")=>{if(t){const e={...t};return e.birthday=new Date(e?.birthday||0),e}return{...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||qs[e.name||""]]))),typeForm:{key:n,text:""}}},Ws=(e,t)=>o(jr,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Hs=e=>cl("/user-data/updateUserProfile","PUT",e),Ys=e=>cl("/user-data/updateUserTask","PUT",e),Ks={width:"118",height:"24"},Gs={"bg-white":"color",transparent:"white"},Xs={"bg-white":"text-primary-main",transparent:"text-white"},Js=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Gs[e]},className:Xs[e],width:n?.width,height:n?.height}),Zs={"bg-white":"text-primary-text",transparent:"text-white"},Qs=d((({className:e,href:t="/",logo:n,children:a,targetBlank:l,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:u("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:l?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...pe(s),children:[Js(i,n?.image,Ks),r?a??o("div",{className:"ml-s",children:o(Me,{font:"font-medium",color:Zs[i],size:"",children:n?.title??"Россельхозбанк"})}):null]}))),eo=async({code:e,setHasError:t,close:n,sendCode:a=Ut})=>{const l=await(i={captchaText:e},cl("/sms/checkCaptcha","POST",i));var i;"ERROR"===await l.text()?t(!0):(a(),n?.())},to=async(e,t)=>{const n=await(e=>cl(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET"))(t);e(URL.createObjectURL(await n.blob()))},no=d((({phoneNumber:e,close:t,sendCode:n,onClose:i})=>{const[r,s]=a(""),[d,m]=a(""),[u,h]=a(!1);return l((()=>{to(s,e)}),[]),o(pl,{head:o(Qs,{}),onClose:i,className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex h-36 w-72",children:[o("img",{className:"grow",src:r}),o("div",{onClick:()=>to(s,e),className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(Yt,{className:"w-[300px]",onChange:m,value:d,placeholder:"Введите код с картинки"}),u?o("div",{className:"text-error",children:"Неверный код"}):null,c("div",{className:"flex w-[310px] justify-between",children:[o(jr,{onClick:t,version:"secondary",children:"Вернуться"}),o(jr,{type:"submit",disabled:!d,onClick:()=>eo({code:d,setHasError:h,close:t,sendCode:n}),version:"secondary",children:"Отправить"})]})]})})})),ao=d((({time:e,setTime:t,className:n})=>(l((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:lo(e)})))),lo=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,io=async({phoneNumber:e,captchaDialog:t,setTimeNextReq:n,setIsTimerStarted:a,setAttemps:l})=>{try{await(i={phoneNumber:e,smsCodesSetName:{key:"AUTHENTICATION"}},cl("/sms/sendCode","POST",i)).then((t=>{if("string"!=typeof t&&t.errorMessage&&t.errorMessage.startsWith(`Too many request for phoneNumber [${e}]`))throw t})),l(0),n(180),a(!0)}catch(e){t.open()}var i},ro=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=a(0),u=s([]);l((()=>{u.current?.[d]?.focus()}),[d]);const h=i((n=>a=>{const{value:l}=a.currentTarget,i=l.slice(0,1);t(e.map(((e,t)=>t===n?i:e))),m(n+1)}),[e]),p=i((n=>a=>{const{key:l}=a;if("Backspace"===l&&!e[n]){const a=n>0?n-1:e.length-1,l=e.map(((e,t)=>t===a?"":e));t(l),m(a)}}),[e]),g=i((n=>{n.preventDefault();const a=n.clipboardData.getData("text"),l=e.map(((e,t)=>t<a.length?a[t]:e));t(l),m(l.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,a)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(a),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[a]=e},onFocus:e=>e.target.select(),onKeyDown:p(a),className:so(a,e,n)},a)))}),n?o("div",{className:"text-error",children:r}):null]})})),so=(e,t,n=!1)=>{const a=!t[e];return`w-16 h-20 text-3xl text-center p-2 m-2 border ${n&&a?"border-error":"border-gray"} rounded-md caret-transparent outline-none`},oo=d((({isDisabled:e,onClick:t,text:n})=>o(jr,{type:"button",onClick:t,disabled:e,children:o(Me,{font:"font-medium",children:n})}))),co=e=>{globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token)},mo=({close:e,values:t})=>{const[n,s]=a(!1),[o,c]=a(""),[d,m]=a(!1),[u,h]=a(0),[p,g]=a(!1),[f,x]=a(0),b=i((()=>{s(!1),c("")}),[]),y=r((()=>0===u&&p),[u,p]),v=r((()=>f>2||!t.every(Boolean)||y),[t]),N=i((async()=>{try{g(!1),h(0),x(f+1),m(!0),await(async e=>cl("/sms/checkCode","POST",e).then(co))({smsText:t.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),b(),e&&e(t.join(""))}catch{m(!1),c(f>1?"Исчерпан лимит ввода смс-кода":"Неверный код"),s(!0)}}),[t,f]);return l((()=>{y?(s(!0),c("Код просрочен")):s(!1)}),[y]),{handleSubmit:N,hasError:n,errorText:o,isLoading:d,timeNextReq:u,isSubmitButtonDisabled:v,setTimeNextReq:h,setIsTimerStarted:g,setAttemps:x}},uo=d((({close:e=Ut,onClose:t=Ut,title:n,description:r,__html:s,code:d=!0,codeLength:m=4,textButton:u="",phoneNumber:h="+79999999999"})=>{const[p,g]=a(Array(m).fill("")),{handleSubmit:f,hasError:x,errorText:b,isLoading:y,timeNextReq:v,isSubmitButtonDisabled:N,setTimeNextReq:w,setIsTimerStarted:C,setAttemps:S}=mo({values:p,close:e}),T=i((()=>{io({phoneNumber:h,captchaDialog:I,setTimeNextReq:w,setIsTimerStarted:C,setAttemps:S})}),[]),I=((e,t)=>{const{open:n,close:a,closeAll:l}=de();return{open:()=>n(o(no,{close:a,onClose:t,...e})),close:a,closeAll:l}})({phoneNumber:h,sendCode:T},t);return l((()=>{T()}),[]),o(pl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[o(k,{className:"w-full",title:n,description:r,headlineVersion:"S",isEmbedded:!0}),d?o(ro,{values:p,setValues:g,errorText:b,hasError:x}):null,po(v,w,T),o(Pe,{itemSize:"list-s",__html:s}),ho(u,N,f),y?o(fr,{blur:!1}):null]})})})),ho=(e,t,n)=>e?o(oo,{isDisabled:t,onClick:n,text:e}):null,po=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-primary-main",children:["Получить новый код можно через",o(ao,{className:"text-primary-main ml-1",time:e,setTime:t})]}):o(ye,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),go=()=>{const{open:e,close:t}=de();return{open:(n,a)=>e(o(uo,{onClose:t,close:n,...a})),close:t}},fo={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},xo={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},bo=d((function({handleSubmit:e=Ut,onClose:t=Ut}){const[n,l]=a(""),[r,s]=a(!1),{open:d,close:m}=de(),u=Ce(),h=i((()=>{m(),e(n)}),[n]),p=i((e=>{l(e),"REFUSE"===e&&s(!0)}),[]),g=r?xo:fo;return o(pl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:t,children:c("div",{className:"flex flex-col gap-xl items-center",children:[o("div",{role:"button",onClick:()=>gl(d,vo,u),children:o(N,{className:"text-center text-balance",headingType:"h2",title:g.title})}),o(w,{align:"text-center",children:g.description}),o(vl,{className:"whitespace-normal",orientation:"horizontal",items:yo,value:n,onChange:p}),o(jr,{disabled:!n,type:"button",onClick:h,children:"Продолжить"})]})})})),yo=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],vo=2,No=e=>{const{open:t,close:n}=de(),a=go(),l=(t,l)=>async i=>{n(),"SIGNED"===i&&t?a.open((t=>async n=>{t&&await Hs({profile:{id:t,consentBkiFlg:!0,smsConsentBki:n}}),e()})(l),wo(t)):e()};return{open:(n,a)=>t(o(bo,{handleSubmit:l(n,a),onClose:e}))}},wo=e=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:bt(e),textButton:"Отправить",__html:"<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>\n <ul><li>согласие на запрос информации в БКИ</li></ul>"}),Co=d((function({handleClose:e}){const t=i((async()=>{const e=await(t={redirectUri:globalThis.location.href},cl("/esia/getLink","POST",t));var t;e&&(globalThis.location.href=e.link)}),[]);return o(pl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex items-center justify-around w-full",children:[c("ul",{className:"list-disc",children:[o("li",{children:"Вероятность одобрения выше"}),o("li",{children:"Без справок о доходах и трудоустройстве"}),o("li",{children:"С защитой Ваших данных"})]}),o(ne,{image:{icon:"GosUslugiIcon",iconVersion:"normal"},height:"70"})]}),c("div",{className:"flex items-center justify-between w-full m-0",children:[o(jr,{type:"button",onClick:t,children:"Заполнить через Госуслуги"}),o(jr,{type:"button",version:"secondary",onClick:e,children:"Пропустить"})]})]})})})),ko={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},So={addressRegistration:"REGISTRATION",addressFact:"RESIDENTAL",organizationAddress:"WORK"},To={mandatoryIncome:"INCOME_AVERAGE",otherPayments:"MANDATORY_PAYMENTS"},Io=e=>Object.entries(e).reduce(((e,[t,n])=>t in ko?[...e,{contactTypeCd:{key:ko[t]},value:n}]:e),[]),Bo=e=>Object.entries(e).reduce(((e,[t,n])=>t in So?[...e,{addressType:{key:So[t]},...n}]:e),[]),Ro=e=>Object.entries(e).reduce(((e,[t,n])=>t in To?[...e,{incomeTypeCd:{key:To[t]},value:n}]:e),[]),Po=({inputs:e,programId:t,nextStepLink:n,saveForm:l})=>{const[r,s]=a(""),[,c]=Vs("taskId"),[,d]=Vs("profileId"),[,m]=Vs("participantId"),u=(e=>{const{open:t,close:n}=de(),a=i((()=>{n(),globalThis.location.href=e}),[]);return{open:(e={})=>t(o(Co,{handleClose:a}),e),close:n}})(n),h=No(u.open),p=go(),g=i(((e,t,n)=>{m(e),c(t),d(n)}),[]);return{handleSubmit:i((async n=>{const a=Is(Dn(e));if(!pn(a(n)))return console.warn("validation fail");try{const{profile:{id:e}}=await(i={profile:{phone:bt(n.phone)}},cl("/public-data/createUserProfile","POST",i));if(e&&n?.phone){const a=async()=>{try{await Do({programId:t,profileId:e,formData:n,saveUserData:g,saveForm:l}),p.close(),h.open(n.phone,e)}catch{s("Fail")}},i=Object.keys(ol).filter((e=>n[e])).map((e=>ol[e]?.text));p.open(a,Mo(n?.phone,i))}}catch{s("Fail")}var i}),[]),responseStatus:r}},Do=async({programId:e,profileId:t,formData:n,saveUserData:a,saveForm:l})=>{const i=Ao(n);await Hs(((e,t)=>{const{name:n="",surname:a="",middleName:l="",birthday:i="",phone:r="",email:s="",processPersonalDataFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:a,midname:l,birthDate:i&&xt(i,!0),email:s,phone:bt(r),processPersonalDataFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(t,i));const{taskId:r,participantId:s}=await(o={profileId:t,programId:e},cl("/user-data/createDraftTask","POST",o));var o;await Ys((({participantId:e,taskId:t,profileId:n,formData:a})=>{const{name:l,surname:i,middleName:r,birthday:s,phone:o,email:c}=a;return{sendToBank:!0,taskKind:"SHORT",task:{taskSource:globalThis.location.origin,id:t,participants:[{birthDate:s&&xt(s,!0),id:e,midname:r,name:l,surname:i,profile:{id:n},participantContacts:Io({phone:o&&bt(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}]}}})({participantId:s,taskId:r,profileId:t,formData:i})),a(s,r,t),l(n)},Mo=(e,t)=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:bt(e),textButton:"Оформить",__html:`<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${_o(t)}`}),_o=e=>`<ul>${e?.map((e=>"<li>"+e+"</li>")).join("")}</ul>`,Ao=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},zo=e=>{const{profile:t,addInfo:n,document:a,addressRegistration:l,addressFact:i}=e;return{name:t?.name,surname:t?.surname,middleName:t?.midname,birthday:t?.birthDate,phone:Ti(t?.phone),email:t?.email,dulIssueDateField:a?.dulIssueDate,dulIssuedBy:a?.dulIssuedBy,dulNumber:a?.dulNumber,dulSerie:a?.dulSerie,dulSubdivisionCode:a?.dulSubdivisionCode,snils:n?.snils,birthPlace:n?.birthPlace,addressRegistration:Fo(l),addressFact:Fo(i),esiaAccountTypeCd:t?.esiaAccountType}},Fo=e=>{const{postcode:t,region:n,regionCode:a,locality:l,city:i,street:r,house:s,building:o,block:c,apartment:d}=e,m=[t,n,l||i,r?`ул ${r}`:void 0,s?`д ${s}`:void 0,c?`к ${c}`:void 0,o?`стр ${o}`:void 0,d?`кв ${d}`:void 0].reduce(((e,t)=>t?e?`${e}, ${t}`:t:e),"");return{...e,regionCode:a?.key,fullAddress:m}},Eo=e=>{const[t,n]=a(!1),[r]=Vs("profileId"),[s,o]=Vs("leadForm"),c=new URLSearchParams(decodeURIComponent(globalThis.location?.search)),d=c.get("code"),m=c.get("state"),u=i((async()=>{if(r&&d&&m){const n=await(t={profileId:r,code:d,state:m,redirectUri:globalThis.location?.href},cl("/esia/updateProfileEsia","POST",t));o({...s,...zo(n)}),globalThis.location.href=e}var t}),[]);return l((()=>{d?(n(!0),u()):(sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken"))}),[]),{isLoading:t}},Vo=d((({className:e,title:t,programId:n="",nextStepLink:i="/credit-lead",sections:r=[],button:s,...d})=>{const m=r?.flatMap((e=>e?.inputs))||[],[h,p]=a(""),{isLoading:g}=Eo(i),[f,x]=Vs("leadForm"),b=Us(m,f),{handleSubmit:y,responseStatus:v}=Po({inputs:m,programId:n,nextStepLink:i,saveForm:x});if(v){Ts({responseType:v}).open()}const[,{field:N,onSubmit:w,reset:C}]=Ft(b,{onSubmit:y});return l((()=>{"OK"===h&&(p(""),C())}),[h]),o(Vt,{className:u("container space-y-m",e),title:t,...d,children:c("form",{onSubmit:w,className:"space-y-m relative",children:[g?o(fr,{blur:!1}):null,r.map(((e,t)=>c("div",{className:u(Cs(e.columns),"grid gap-x-m"),children:[ks(e.title),js({field:N,inputs:e?.inputs,isRetailForm:!0})]},`section-${t}`))),Ws(s)]})})})),Oo=d((({__html:e,icon:t="InfoCircleIcon",iconVersion:n="black",link:a})=>c("div",{className:"flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m",children:[o("div",{className:"rounded-full bg-white p-xs",children:o(W,{name:t,width:"24",height:"24",iconVersion:n})}),c("div",{className:"",children:[o(Pe,{__html:e}),a?.text?o(ye,{className:"text-primary-main",children:a.text}):null]})]}))),Lo=d((({interval:e=0,title:t,__html:n})=>{const[l,i]=a(e),r=100-(e-l)/e*100;return c("div",{children:[t?o(k,{title:t,headlineVersion:"S"}):null,c("div",{className:"flex justify-center items-center flex-col",children:[c("div",{className:u("relative flex items-center justify-center w-24 h-24 rounded-full bg-gray text-transparent mb-5"),children:[o("div",{className:"absolute inset-0 rounded-full",style:{background:`conic-gradient(rgb(66, 171, 68) ${r}%, rgb(125, 126, 127) 0deg)`}}),o("div",{className:"z-10 flex items-center justify-center px-4 py-2 rounded-full w-20 h-20 bg-white text-primary-text text-m",children:o(ao,{interval:e,time:l,setTime:i})})]}),n?o(Pe,{__html:n}):null]})]})})),jo=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:l,sectionAdditionalTitle:i,sectionInfoAdditional:r,buttonText:s,interval:d,...m})=>c(g,{...m,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Lo,{interval:d}):null]}),o($o,{title:a,items:l}),o($o,{title:i,items:r,countColumns:!0}),n?.__html?o(Oo,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(jr,{className:"w-full mt-lg",children:s}):null]}))),$o=({title:e,items:t,countColumns:n=!1})=>{const a=Ce();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Me,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Cs(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:qo(e)},t)))}):null]})]}):null},qo=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Me,{color:"text-secondary-text",size:"text-l",children:e}),o(Me,{color:"text-primary-text",size:"text-xl",children:t})]}),Uo=d((({title:e,description:t})=>{const n=Ce();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(k,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Wo=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Ho=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Yo(e,{sensitivity:t,rootRef:n}={}){const a=s(null),i=r((()=>({threshold:Ko(t),root:n?.current})),[t,n?.current]);return l((()=>{if(!a.current)return;const t=new IntersectionObserver(e,i);return t.observe(a.current),()=>{t.disconnect()}}),[e,i]),a}function Ko(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const Go=d((({className:e,style:t,idx:n,activeIndex:a,observerOptions:l,children:r,onIntersection:s})=>{const c=Yo(i((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),l);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===a),ref:c,role:"listitem",children:r})})),Xo=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Jo=d((({className:e,itemClassName:t,containerRef:n,activeIndex:a,visibleItemCount:l=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(Qo(n))}),[g,f]),v=l>0?r*Number(l)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?Zo(c,v):{},...N?Ho(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:C,ref:n,role:"list",children:(k=(e,n)=>o(Go,{className:u(m,l?Xo[l-1]:"",{"h-full":N},t),style:w?Zo(c/4):{},activeIndex:a,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(k):k(e,0))(p)});var k})),Zo=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Qo=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ec={"horizontal-list":"w-6","vertical-list":"h-6"},tc=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(a,l)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",l===e?ec[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(l)},String(l)),nc=({activeIndex:e,onClick:t})=>(n,a)=>{const l=a===e,i=l?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=l?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=l?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"aria-label":n?.title,className:u("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:u("text-secondary-text font-light",s),children:n?.description})]},String(a))},ac=e=>e,lc=(e=ac)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),ic=lc(),rc=(e=ac)=>lc((t=>-e(t))),sc=rc(),oc=e=>t=>e.scrollWidth/t,cc=e=>(t,n)=>{e.scrollBy({left:n*oc(e)(t),behavior:"smooth"})},dc=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[l,r]=a([]),o=i((e=>{r((t=>{return(n=t)===(a=e)||Boolean(n&&a&&n?.length===a?.length&&n.every(((e,t)=>e===a[t])))?t:e;var n,a})),t&&t(e)}),[t]),[c,d]=l.length?[rc()(l),lc()(l)]:[-1,-1],m=c>0,u=d<e-1,h=i((()=>{var t;n.current&&(m?cc(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(u?cc(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:h,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:u,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},mc={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},uc=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:a="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=Ce(),[h,p]=dc({itemCount:s.length}),g=hc(Boolean(s?.length));l((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Jo,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(nc({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",mc[a],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(tc({activeIndex:t,onClick:f,listType:a}))}):null})),hc=(e=!1)=>({behavior:e?"auto":"smooth"}),pc=d((({className:e,disabled:t,...n})=>o(ye,{rounded:!0,className:u("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e),disabled:t,...n,children:o(ne,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),gc=d((e=>o(pc,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),fc=d((e=>o(pc,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),xc="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",bc=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:a,isBottom:l})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=a&&!l;return c("div",{className:e,children:[n?yc(t):null,i?o(gc,{className:u(vc(l),m?"left-1":"left-0"),onClick:s}):null,r?o(fc,{className:u(vc(l),m?"right-1":"right-0"),onClick:d}):null]})})),yc=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(xc,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(xc,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),vc=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),Nc=d((({className:e,version:t,gap:n=14,padding:a=16,visibleItemCount:l=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=dc({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===i?"relative h-full":""),children:[o(Jo,{containerRef:y,activeIndex:N,visibleItemCount:l,gap:n,padding:a,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(bc,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(uc,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),wc=({blocksToRender:e,...t})=>o(Nc,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:R(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Wo(!0)),children:I(e,t)},String(n))})}),Cc=e=>e%2!=0,kc=d((({textNode:e,iconNode:t,tag:n,onClick:a,justifyContent:l="between",className:i,role:r,...s})=>c(n,{tag:n,className:u("flex items-center w-full gap-1","between"===l?"justify-between":"justify-center",i),onClick:a,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Sc=d((({className:e="",label:t,icon:n,dataTheme:a="pc",disabled:l=!1,onClick:i})=>o(kc,{tag:"button",onClick:i,disabled:l,"data-theme":a,justifyContent:"center",role:"button",className:u("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",l?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Me,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Tc=({isUnfolded:e,onToggle:t})=>o(Sc,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Ic=["ArrowDownIcon","ArrowUpIcon"],Bc="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Rc=({topItemsCount:e=0,label:t="",block:n,blocksToRender:a=[],...l})=>{const[i,r]=e>0?[a.slice(0,e),a.slice(e)]:[a,[]];return c("div",{className:u("space-y-2xs",{hidden:!a.length}),children:[c("div",{className:u(Bc),children:[R(i,{...l.options,parent:n}),Cc(i.length)?o(gt,{className:"col-span-6",...l}):null]}),o(Ei,{renderFoldableSection:({isUnfolded:e})=>c(Vi,{className:u(Bc),isUnfolded:e,children:[R(r,{...l.options,parent:n}),Cc(r.length)?o(gt,{className:"col-span-6",...l}):null]}),renderFoldButton:({isUnfolded:n,onToggle:a})=>o(Sc,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:Ic[Number(n)],dataTheme:l.options?.page?.colorPalette,onClick:a})})]})},Pc=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...a})=>{switch(e?.view){case"grid":return c("div",{children:[Dc(n,t),Rc({...e,...a,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[Dc(n,t),wc({...a,blocksToRender:t})]});default:return null}})),Dc=(e,t)=>e&&!t.length?o(Uo,{...e}):null,Mc=e=>t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:`sep-${a}`},n):[n]),[]),_c=d((({value:e,onChange:t,items:n=[],multiple:a})=>n.map((n=>o(ci,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const l=e?.includes(n);t(a?l?(e||[]).filter((e=>e!==n)):[...e||[],n]:l?[]:[n])})(n.value),type:a?"checkbox":"radio"},n.value))))),Ac=d((({children:e,filtrationSchema:t,resetButton:n,field:a,reset:l})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,Mc(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(zc(a)).filter(Boolean))]}),n?o("div",{children:o(jr,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:l,children:n?.text})}):null]}))),zc=e=>([t,n])=>{const a=n?.type;return"array"===a?Fc(t,e)(n):null},Fc=(e,t)=>n=>{const a=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Me,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(_c,{items:a,multiple:!n?.single,...t(e)})]},e)};function Ec(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Vc=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Oc=(e,t)=>Object.entries(e).map((([n,a])=>"number"==typeof a?Array.isArray(t[n])?((e,t)=>n=>Vc(t[e])||Vc(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Vc(t[e])||Vc(n[e])||Lc(t[e])<=Lc(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>Vc(t[e])||Vc(n[e])||Lc(t[e]?.min)>=Lc(n[e]?.min)&&Lc(t[e]?.min)<=Lc(n[e]?.max))(n,e):Array.isArray(a)?((e,t)=>n=>Vc(t[e])||Vc(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Vc(t[e])||Vc(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Lc=e=>Number(e||0),jc=(e,{block:t,page:n,normalize:a=zt})=>{const l=t?.blocks||[],[i,{field:s,reset:o,update:c}]=Ft(e),d=r((()=>Ec(l,l.map((e=>mt(e.content,n?.fallback))))),[l,n?.fallback]),m=i===e?l:((e,t)=>(n=zt)=>e?.filter((([,e])=>Oc(t,n(e)||{}))).map((([e])=>e)))(d,i)(a);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},$c={},qc={},Uc=ht((({className:e,filtrationSchema:t=$c,consumerField:n={},resetButton:a,...l})=>{const[,{blocksToRender:i},{field:r,reset:s}]=jc(qc,{block:l.block,page:l.options?.page}),d=o(cn,{className:"w-64",label:n?.title,options:Wc(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Wc(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...l,children:[o(Ac,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(jr,{type:"reset",className:"mt-lg w-64",onClick:s,version:a?.version,children:a?.text})})]})}),o(Pc,{blocksToRender:i,...l})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Wc=e=>Ec(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Hc=(e=!1)=>e?"text-left":"text-center",Yc={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Kc=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:a,icon:l,...i})=>{const r=String(a?.width||t);return l?o("div",{style:{width:`${r}px`,height:`${r}px`},className:u("rounded-icon object-fit flex justify-center items-center",Yc[n],e),children:o(W,{...i,width:"54%",height:"54%",name:l})}):null})),Gc=d((({className:e="",title:t,benefitList:n,...a})=>{const l=Ce();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(N,{headingType:"h3",as:"h2",className:Hc(l),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Xc)}):null]})})),Xc=({label:e,description:t,__html:n,icon:a,isDotted:l=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[a?.icon?o(Kc,{className:"shrink-0",iconBgVersion:i,...a}):null,a?.src?o(ne,{className:"shrink-0",image:a}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Me,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Pe,{__html:n,isDotted:l,itemSize:"list-s"}):null]}):null]},String(r)),Jc=e=>({icon:t,title:n,description:a},l)=>c("div",{className:u("flex flex-col gap-1","items-center",{"justify-center":!a&&!n}),children:[n?o(Me,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,a?o(Me,{size:"text-h6",font:"font-normal",align:e,children:a}):null]},String(l)),Zc=(e,t,n)=>o("div",{className:`grid gap-2xs ${Qc(t)}`,children:e.map(Jc(n))}),Qc=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},ed=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:a="4",subtitle:l,title:i,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(k,{defaultPadding:"",title:i,description:l,headlineVersion:"M"}),e?.length?Zc(e,a,t):null]}))),td={start:"justify-start",center:"justify-center",end:"justify-end"},nd=d((({buttons:e,className:t="",align:n,...a})=>{const l=n&&u("flex",td[n]);return o(g,{className:u("!bg-transparent",l,t),defaultPadding:"p-0",...a,children:Le(e)})})),ad=d((({className:e,title:t,children:n,...a})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...a,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),ld="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",id="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",rd="flex flex-col gap-y-xl min-w-52",sd=d((({value:e,fractionDigits:t,fixed:n,prefix:a,postfix:l})=>o(Me,{size:"text-h3",children:"number"==typeof e?[a,Ue(t,{fixed:n})(e),l].filter(Boolean).join(" "):e}))),od=d((({className:e,title:t,value:n,color:a="text-secondary-text",...l})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Me,{size:"text-l",font:"font-light",color:a,children:t}):null,n?o(sd,{value:n,...l}):o(Me,{size:"text-h3",children:"-"})]}))),cd=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,dd=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:a=2,depositeName:l,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Me,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ue(a,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),l&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:l}):null]})]}))),md=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),ud=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:a=2,color:l="text-secondary-text",children:i,...r})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o(dd,{title:e,rate:t,unit:n,fractionDigits:a,color:l,...r})}),o(od,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:a,fixed:!0,color:l,...r}),i]}):o(md,{title:e,...r}),hd=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...a})=>o(ha,{items:e?[`От ${Ue(1)(a.min||0)} ${n}`,`До ${Ue(1)(a.max||0)} ${n}`]:[],step:t,...a}),pd={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},gd={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},fd=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,[l,i]=((e,t,n)=>{const{maxBonus:a=5e3,prefMonthsNum:l=pd.prefMonthsNum,prefTravelBonusRate:i=pd.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),a);return[c,c*l+Math.min(Math.round(s*t)+Math.round(o*n),a)*(12-l)]})(t||gd,n,a);return{...t,...e,monthBonus:l,yearBonus:i}},xd=ht((({className:e="",title:t,calcSource:n,buttons:a,footnote:l,...i})=>{const[r,{field:s}]=Ft({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=fd(r,n);return o(ad,{className:e,title:t,...i,children:c("section",{className:u(ld,e),children:[c("div",{className:id,children:[hd({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),hd({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?ud({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:rd,children:[f>=0?o(od,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,Le(a,{isVertical:!0}),cd(l)]})]})})})),bd=Math.round(29.5),yd=(e,t=0)=>e?.sum?e.sum:t,vd=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Nd=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,wd=({items:e,title:t,mobileTitle:n=t,orientation:a="horizontal",value:l,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Me,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Me,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(vl,{orientation:a,items:e,value:e[l?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),Cd=e=>wd({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),kd=" (c капитализацией)",Sd=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:l=[],isCapitalization:i=!1})=>c("div",{className:rd,children:[o(od,{title:`Доход в конце срока${i?kd:""}`,value:e,postfix:n,prefix:"+"}),o(od,{title:`Сумма в конце срока${i?kd:""}`,value:t,postfix:n}),Le(a,{isVertical:!0}),l?.map(cd)]}),Td=([e,t],n,a=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Id([e,t],a),Id=([e,t],n=[])=>({[e]:n.length?sc(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?ic(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Bd=(e,[t,n],a)=>e>=a[t]&&e<=a[n],Rd={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Pd={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Dd=(e,t)=>{const{daysValue:n,moneyValue:a,isPartialWithdrawal:l,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||l,o=n<90||n>730,c=function(e){const t=e?.rateType?Rd[e?.rateType]:"",{data:n}=jn(t?`/api/v1/depositrates/${t}`:null,st);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&Md(s,e)&&Bd(a,["minSum","maxSum"],e)&&Bd(n,["minDays","maxDays"],e)))||Pd,{rate:m}=d,u=_d(m,e),h=a+u,p=c||[Pd];return{...d,...Id(["minSum","maxSum"],p),...Id(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},Md=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,_d=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,daysValue:l}=t;return n?Math.round(a*Math.pow((1200+e)/1200,l/30)-a):Math.round(a*e*l/365/100)},Ad=ht((({className:e="",title:t,buttons:n,footnote:a,bottomFootnote:l,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=Ft({moneyValue:yd(r,1e5),daysValue:vd(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=Dd(m,s),{income:g,finalSum:f,rate:x,depositeName:b}=p;return o(ad,{className:e,title:t,...d,children:c("section",{className:u(ld,e),children:[c("div",{className:id,children:[hd({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(ha,{items:[`От ${Nd(y.min||0)}`,`До ${Nd(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[zd(p,h),Cd({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),ud({rate:x,depositeName:b,isShowDepositeName:i}),Sd({income:g,finalSum:f,buttons:n,footnotes:[a,l]})]})});var y})),zd=(e,t)=>c("div",{className:"space-y-s",children:[o(Me,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(ea,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(ea,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Fd=(e=[],t=!1)=>Ed([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Ed=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Vd=({min:e=0,max:t=0,availableMonths:n,...a})=>o(ha,{items:[`От ${Od(e)}`,`До ${Od(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...a}),Od=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Ld=e=>wd({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),jd=({field:e,defParams:t,calcParams:n,map:a,monthsValue:l="maxMonths"})=>{Object.entries(a).forEach((([n,a])=>{e?.(n)?.onChange?.(t?.[a])})),e?.("monthsValue")?.onChange?.(oa(t?.[l],n.minMonths,n.maxMonths))},$d=(e,t)=>{const{isAnnuity:n,moneyValue:a,monthsValue:l,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(a+i)*(t+t/(Math.pow(1+t,l)-1)):a*(t+t/(Math.pow(1+t,l)-1))}return Math.round(a/l)+a*(e/1200)},qd={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Ud=e=>Wd({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Wd({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Wd({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Wd({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Wd=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:l})=>!!n&&!n[l]||t[a]===e[a],Hd=(e,t,n)=>{const{moneyValue:a,monthsValue:l}=e,i=t?.rateRows||[qd],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Ud({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=Td(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=Td(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:l})=>e?.find((e=>Ud({row:e,userInputParams:t,paramsViewSettings:n})&&Bd(a,["minSum","maxSum"],e)&&Bd(l,["minMonths","maxMonths"],e)))||qd)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:l}),{rate:u}=m,h=$d(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:a,monthsValue:l,monthlyPayment:h}},Yd=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Kd={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Gd=ht((({className:e,title:t,calcSource:n,buttons:a,footnote:i,paramsViewSettings:r,defaultParams:s,registerSubmit:d,...m})=>{const h=(p=n?.rateRows,Ed([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:f,onSubmit:x}]=Ft({moneyValue:yd(s,2e5),monthsValue:vd(s,bd),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)});d?.(x);const b=Hd(g,n,r),y=Ld({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:v}=f("moneyValue"),{onChange:N}=f("monthsValue");return l((()=>{v&&v(oa(g.moneyValue,b.minSum,b.maxSum))}),[b.minSum,b.maxSum]),l((()=>{N&&N(oa(g.monthsValue,b.minMonths,b.maxMonths))}),[b.minMonths,b.maxMonths]),l((()=>{!Yd(s)&&h&&jd({field:f,defParams:h,calcParams:b,map:Kd,monthsValue:"minMonths"})}),[n,s]),o(ad,{className:e,title:t,...m,children:c("section",{className:u(ld,e),children:[c("div",{className:id,children:[hd({title:"Сумма кредита, ₽",step:500,min:b.minSum,max:b.maxSum,...f("moneyValue"),value:b.moneyValue}),Vd({title:"Срок кредита, месяцев",min:b.minMonths,max:b.maxMonths,...f("monthsValue"),value:b.monthsValue}),Xd({...b,...r},f),o("div",{className:"sm:hidden",children:y})]}),c("div",{className:u(rd,"@4xl:w-1/2"),children:[o(od,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(od,{title:"Ставка",value:b?.rate,fractionDigits:2,postfix:"%"}),o(od,{title:"Ежемесячный платёж",value:b.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:y}),Le(a,{isVertical:!0}),cd(i)]})]})})})),Xd=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(ea,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(ea,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(ea,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(ea,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Jd=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,a]=t[n-1],[l,i]=t[n];a>=l?t.splice(n-1,2,[e,Math.max(a,i)]):n++}return t},Zd={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Qd=(e,t,n)=>{const{moneyValue:a,monthsValue:l}=e,i=t?.[0]?nm(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[tm({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),tm({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),tm({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),tm({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,Bd(a,["minSum","maxSum"],t),Bd(l||i,["minMonths","maxMonths"],t)].every(Boolean)))||Zd,{rate:u}=m,h=em(u,e),p=a+h,g=t||[Zd];return{...m,...Id(["minSum","maxSum"],g),...Id(["minMonths","maxMonths"],g),availableMonths:Jd(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((a,l)=>t>=e?e+l*n:e-l*n)))(e,t))),...e,defaultMonth:i,income:h,finalSum:p}},em=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,monthsValue:l}=t;return n?Math.round(a*Math.pow((1200+e)/1200,l)-a):Math.round(a*e*30*l/365/100)},tm=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],nm=(e,t)=>e+Math.round((t-e)/2),am=(e="rub")=>"rub"===e,lm=(e,t)=>{const{minMonths:n,maxMonths:a}=Id(["minMonths","maxMonths"],om(t,e?.currency)),l=e.monthsValue||Math.round((n+a)/2);return{monthsValue:oa(l,n,a)}},im=(e,t)=>{const{minSum:n,maxSum:a}=Id(["minSum","maxSum"],om(t,e?.currency)),l=e.moneyValue||n;return{moneyValue:oa(l,n,a)}},rm=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),sm=e=>{const t=am(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},om=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},cm=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?wd({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?wd({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),dm(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Cd({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(a={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},wd({...a,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),dm(e.isShowNewClient),e.isShowNewClient?o(ea,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},dm=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,mm={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},um={text:"₽",key:"rub"},hm=ht((({className:e,title:t,calcSource:n,buttons:a=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[um],g=i((e=>t=>e?{...t,...sm(t),...im(t,e),...lm(t,e),...rm(t,e)}:t)(h),[h]),[f,{field:x}]=Ft({moneyValue:yd(d,2e4),monthsValue:vd(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:um},{normalize:g}),b=x?.("currency")?.value??um,y=x?.("isNewClient")?.value,v=om(h,b),N=Qd(f,v,s),{rate:w,income:C,finalSum:k,type:S=""}=N,T=i((()=>{jd({field:x,defParams:Fd(v,y),calcParams:N,monthsValue:"minMonths",map:mm})}),[x,h]);l((()=>{!Yd(d)&&v&&T()}),[d,h]);const I=w===Fd(v,y)?.rate;return o(ad,{className:e,title:t,...m,children:c("section",{className:u(ld,e),children:[c("div",{className:id,children:[c("div",{className:"flex gap-m",children:[hd({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:pm(b?.key)}),h&&h?.length>1?o(hn,{label:"Валюта",options:p,...x("currency")}):null]}),Vd({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),cm({...N,...s},x)]}),ud({rate:w,children:fm(T,I)}),Sd({income:C,finalSum:k,buttons:[...a,gm(n?.buttons,S)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),pm=(e="")=>am(e)?1e3:100,gm=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},fm=(e,t=!1)=>t?null:o(jr,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),xm=e=>bm({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&bm({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),bm=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:l})=>!!n&&!n[l]||t[a]===e[a],ym={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},vm=(e,t,n)=>{const{moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[ym],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>xm({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=Td(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=Td(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>xm({row:e,userInputParams:t,paramsViewSettings:n})&&Bd(a+r,["minSum","maxSum"],e)&&Bd(i,["minSumOld","maxSumOld"],e)&&Bd(r,["minSumExtra","maxSumExtra"],e)&&Bd(l,["minMonths","maxMonths"],e)))||ym)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=h,g=$d(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:f}},Nm=ht((({className:e="",title:t,calcSource:n,buttons:a,footnote:l,paramsViewSettings:i,...r})=>{const[s,{field:d}]=Ft({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=vm(s,n,i),h=Ld({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(ad,{className:e,title:t,...r,children:c("section",{className:u(ld,e),children:[c("div",{className:id,children:[hd({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),hd({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Vd({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),wm({...m,...i},d),m.isExtraMoney?hd({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:h})]}),c("div",{className:u(rd,"@4xl:w-1/2"),children:[o(od,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(od,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(od,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(od,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),Le(a,{isVertical:!0}),cd(l)]})]})})})),wm=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(ea,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(ea,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(ea,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Cm=d((e=>{const{onChange:t,min:n,max:a,defaultValue:l="0",fractionDigits:r=0,...s}=e,c=sa(e,{normalize:(e=l)=>n&&a?String(oa(Number(km(e)),n,a)):km(e),format:Ue(r)}),d=i((e=>t&&t(km(e))),[t]);return o(Yt,{onChange:d,...s,...c})})),km=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Sm=d((e=>o(Cm,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Me,{size:"text-xl",font:"font-light",children:"₽"})})}))),Tm={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Im={amount:1500},Bm=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=Ft(Im),[h,p]=a(!1);return l((()=>{p(d<=0)}),[d]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Tm[r],children:[o(Sm,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(jr,{className:"w-full mt-lg",type:"submit",disabled:h,children:i.text}):null]})]})})),Rm=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Pm="relative h-full",Dm={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Mm=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...a})=>{const{blocks:l}=a.block||{},i=l?.some(zm),r=n?{defaultPadding:"p-6xl pb-m"}:{};return P({...a,renderProps:(n,a,l)=>c("div",{className:_m(n,{someCardsHighlighted:i}),children:[I(n,a,{className:Am(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:l}),zm(n)?Rm({className:"absolute top-0 -right-4 z-40"}):null]},String(l))})},_m=(e,{someCardsHighlighted:t})=>u(Pm,t&&(zm(e)?"pt-3xl":"pt-3xl sm:pt-16")),Am=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u(Pm,"min-w-80",Dm[a],t&&(zm(e)?"pt-3xl sm:pt-16":"pt-3xl"),Wo(n),n&&"h-full"),zm=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Fm=ht((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:a=!0,isGap:l=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(Nc,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:l?16:0,padding:0,arrowsPadded:a,navButtons:r?Em(s?.block?.blocks):[],hasBlur:!0,children:Mm({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Em=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Vm="z-10 border border-solid w-full h-full",Om=u(Vm,"absolute hidden @xl:block border-transparent"),Lm=d((({className:e,title:t,description:n,button:a,...l})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...l,children:c("div",{className:"relative h-full",children:[o("div",{className:u(Om,"top-9 right-12 bg-green-dark")}),o("div",{className:u(Om,"top-6 right-8 bg-green")}),o("div",{className:u(Om,"top-3 right-4 bg-green-light")}),c("div",{className:u(Vm,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(k,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Le([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),jm={black:"bg-black",white:"bg-white"},$m=d((({className:e="",title:t,description:n,image:a,price:l,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:u("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Te,{className:"h-full",padding:d,title:o(k,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:a?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:a}):null,buttons:Le([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Me,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(qm)]}):null,l?c(Me,{size:"text-h3",align:"text-left",children:[l," ₽"]}):null]})}))),qm=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${jm[e]}`},String(t)),Um=d((({icon:e,...t})=>{const n=ue(),{text:a,href:l,target:i,onClick:r}=n(t);return a?o("div",{className:u("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:l,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:a}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:a})]})})}):null})),Wm=d((({className:e,additionalDescription:t,description:n,links:a,title:l,...i})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(k,{isEmbedded:!0,title:l,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(k,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),a?.length?Hm(a):null]})}))),Hm=e=>o("div",{className:u("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(Um,{...e},String(t))))}),Ym=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Km=d((({className:e="",href:t,target:n,onClick:a,data:l,children:i})=>{const r=ue()({href:t,target:n,onClick:a});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...pe(l),children:i})})),Gm=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],Xm=d((({className:e="",media:t,showButtonText:n,stretched:l,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=a(),m=t?.map((e=>{const{href:t,icon:a,text:l}=e,{iconMapped:r}=(e=>Gm.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Oe(a)?a:r,c=n?{text:l}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&l&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),h=u("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},Jm(l));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:Le(m,{className:Zm(s??!1,l??!1,n),buttonClassName:h})}),r?o(Me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Jm=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",Zm=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),Qm=d((({className:e,padding:t,description:n,additionalDescription:a,href:l,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:u("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(Km,{href:l,target:m,className:"h-full",data:Ym(v),children:c(Te,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(k,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Je(Oe(i)?o(ne,{image:i}):null,x),buttons:d.length?o(Xm,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Ve,{benefits:f}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,eu(a,p)]})})}))),eu=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,tu=(e,t)=>{const{title:n,description:a,buttons:l}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Me,{size:"text-m",color:"text-secondary-text",children:n})}):null,a?o("div",{className:"mt-2xs",children:o(Me,{size:"text-xl",color:"text-primary-text",children:a})}):null,l?.length?o("div",{className:"text-primary-main",children:Le(l)}):null]},String(t))},nu=d((({className:e="",title:t,align:n="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:h,...p})=>{const f=d.map(tu),[x,b]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[y,v]=a(!1);return l((()=>ce.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[Oe(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(N,{className:u("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(ye,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(Ei,{renderFoldableSection:()=>c("div",{children:[x,o(Vi,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?au(m?.parent,h,y):null}):o("div",{children:x})]})})),au=(e,t,n=!1)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==e&&ce.fire("fold",{type:"fold",isUnfolded:!n,parent:e})},type:"button",...n?pe(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),lu=d((({className:e,contacts:t,info:n,version:a="secondary",...l})=>c(g,{className:u("flex",e),defaultPadding:"p-6xl",version:a,...l,children:[n?.length?iu(n):null,t?.length?iu(t):null]}))),iu=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>ru({column:e,i:t})))}),ru=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:a},l)=>c("div",{children:[o(k,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:u({"mt-xl":Boolean(a?.text)}),children:Le([a])})]},String(l))))},`col-${String(t)}`):null,su=d((({step:e=10,description:t,showPercentage:n=!0})=>c("div",{children:[o("div",{className:"h-4 w-full bg-gray relative",children:o("div",{className:"h-4 bg-green",style:{width:`${e}%`}})}),c("div",{className:"relative",children:[n?c("div",{className:"absolute left-2/4 text-green",children:[e,"%"]}):null,t?o("div",{className:"text-right mr-4 text-gray",children:t}):null]})]}))),ou=d((({step:e=1,totalSteps:t=6,stepsTitles:n=[]})=>{const a=r((()=>(e+1)/t*100),[e,t]);return o("div",{className:"py-lg px-5xl bg-white col-span-12",children:c("div",{children:[c("span",{className:"font-bold mr-s",children:["Шаг ",e+1," из ",t,"."]}),n[e]||null,o(su,{step:a,showPercentage:!1})]})})}));var cu;!function(e){e.process="IN_PROCESS",e.ok="OK",e.fail="FAILED",e.rework="REWORK"}(cu||(cu={}));const du=e=>cl("/user-data/getTaskStatus","POST",e),mu=e=>cl("/user-data/sendSignalToProcess","POST",e),uu=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:l,sectionAdditionalTitle:i,sectionInfoAdditional:r,buttonText:s,interval:d,...m})=>c(g,{...m,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Lo,{interval:d}):null]}),o(hu,{title:a,items:l}),o(hu,{title:i,items:r,countColumns:!0}),n?.__html?o(Oo,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(ye,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),hu=({title:e,items:t,countColumns:n=!1})=>{const a=Ce();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Me,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Cs(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:pu(e)},t)))}):null]})]}):null},pu=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Me,{color:"text-secondary-text",size:"text-l",children:e}),o(Me,{color:"text-primary-text",size:"text-xl",children:t})]}),gu=d((()=>o(uu,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),fu=d((()=>{const[e]=Vs("leadForm");return o(uu,{interval:300,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Цель кредита",description:"На любые цели"},{label:"Сумма",description:e?.moneyValue?.toLocaleString()+" ₽"},{label:"Срок кредита",description:e?.monthsValue+" мес"},{label:"Тип платежа",description:e?.isAnnuity?"Аннуитетный":"Дифференцированный"}]})})),xu=d((()=>{const[e]=Vs("leadForm");return o(uu,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail?.text},{label:"Адрес",description:e?.addressRetail?.text}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),bu=d((()=>{const[e]=Vs("leadForm");return o(uu,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.monthsValue+" мес"},{label:"Тип платежа",description:e?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),yu=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],vu=d((()=>{const[e,t]=a(cu.process),[n]=Vs("taskId");return l((()=>{for(const e of yu)mu({signalType:e,taskId:n});const e=setInterval((()=>du({taskId:n}).then((n=>{n.statusCd&&n.statusCd!==cu.process&&(clearInterval(e),t(n.statusCd))}))),3e4)}),[]),Nu(e)})),Nu=e=>({IN_PROCESS:o(fu,{}),FAILED:o(gu,{}),OK:o(bu,{}),REWORK:o(xu,{})}[e]||null),wu={0:{paymentSystem:bi[0].id,currency:"rub",codeWord:""},1:{surname:"",name:"",middleName:"",sex:"",birthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:"",methodObtain:"office",addressCourier:{fullAddress:"",fiasCode:""}},2:{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:"",inn:void 0,jobsNumber:"",lastJobExperience:"",legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},3:{familyStatus:{key:"",text:""},dependents:void 0,familyMembers:void 0,mandatoryIncome:void 0,otherPayments:void 0,snils:"",armyIdFlg:!1},4:{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},5:{regionRetail:"",addressRetail:{fullAddress:"",fiasCode:""},bankEmployeeCode:"",addressCoutier:{fullAddress:"",fiasCode:""},methodObtain:"office",deliveryDate:void 0}},Cu=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e,name:t},n)=>o(Oo,{__html:e},`${t}_${n}`))):null},ku=({field:e,inputs:t})=>(t||[])?.map(ws(e,"")),Su=({sections:e,field:t,isLastStep:n,methodObtain:a})=>n?(({sections:e,field:t,methodObtain:n})=>e?.filter((({type:e})=>e===n||!e)).map((({inputs:e,columns:n,title:a},l)=>c("div",{className:u(Cs(n),"grid gap-x-m"),children:[Cu(e),ks(a),ku({field:t,inputs:e})]},`section-${l}`))))({sections:e,field:t,methodObtain:a}):e?.map((({inputs:e,columns:n,title:a},l)=>c("div",{className:u(Cs(n),"grid gap-x-m"),children:[Cu(e),ks(a),ku({field:t,inputs:e})]},`section-${l}`))),Tu=d((({step:e,onPrevStep:t})=>{const n=0===e;return c("div",{className:"flex justify-between gap-m",children:[o(jr,{onClick:t,className:u("w-full @xl:w-auto"),type:"button",version:"secondary",disabled:n,children:"Назад"}),o(jr,{className:"w-full @xl:w-auto",type:"submit",children:"Далее"})]})})),Iu=(e,t)=>{switch(e){case 0:return(e=>{const{currency:t,paymentSystem:n,cardCategory:a,codeWord:l}=e;return{currencyCode:t,paymentSystemTypeCd:n,classCard:a,codeWord:l}})(t);case 1:return(e=>{const{name:t,surname:n,middleName:a,birthday:l="",phone:i="",email:r,sex:s,birthPlace:o,dulIssueDateField:c="",dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,education:p,participantDateRegistration:g="",housing:f,addressRegistration:x,addressFact:b}=e;return{birthDate:xt(l,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:xt(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:xt(g,!0),houseTypeCd:f,participantContacts:Io({phone:bt(i),email:r}),participantAddresses:Bo({addressRegistration:x,addressFact:b}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}})(t);case 2:return(e=>{const{employment:t,organizationName:n,inn:a,legalForm:l,organization:i,amountWorkers:r,employerActivities:s,employerOrganization:o,generalSeniority:c,lastJobExperience:d,experience5Years:m,jobsNumber:u,organizationPhone:h,organizationAddress:p,positionOrganization:g}=e;return{employmentTypeCd:t,organizationName:n,organizationInn:a,organizationActivityTypeCd:s,organizationTypeCd:i,organizationKindCd:o,employeesNumberCd:r,opf:l,seniority:c,generalSeniority:m,jobsNumber:u,lastWorkDuration:d,positionCd:g,participantContacts:Io({organizationPhone:h&&bt(h)}),participantAddresses:Bo({organizationAddress:p})}})(t);case 3:return(e=>{const{familyStatus:t,dependents:n,familyMembers:a,mandatoryIncome:l,otherPayments:i,snils:r,armyIdFlg:s}=e;return{maritalStatusCd:t,totalDependents:a,otherDependents:n,participantIncomes:Ro({mandatoryIncome:l,otherPayments:i}),snils:r?.replaceAll(" ",""),armyIdFlg:s}})(t);case 4:return(e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:l}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:l}})(t);default:return{}}},Bu=({step:e,inputs:t,onNextStep:n,saveStep:a,finishForm:l})=>{const[r]=Vs("taskId"),[s]=Vs("profileId"),[o]=Vs("participantId"),c=i((async i=>{const c=Is(Dn(Ru(i,t,e)));if(!pn(c(i)))return console.warn("validation fail");a(i);try{r&&s&&o&&await Ys((({participantId:e,taskId:t,profileId:n,formData:a,step:l=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:globalThis.location.origin,id:t,authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Iu(l,a)}]}}))({participantId:o,taskId:r,profileId:s,step:e,formData:i}))}catch(e){return"Fail"}return n(),5===e&&l?.(!0),"OK"}),[]);return{handleSubmit:c}},Ru=(e,t,n)=>2===n&&"employment"in e&&"RETIREE"===e?.employment?.key?[]:t,Pu=d((({step:e,sections:t,onPrevStep:n,onNextStep:a,inputs:l,isFormFinished:r,finishForm:d})=>{const[m,u]=Vs("leadForm"),h=((e,t)=>(t&&(t.birthday=t.birthday?new Date(t.birthday):void 0,t.dulIssueDateField=t.dulIssueDateField?new Date(t.dulIssueDateField):void 0,t.participantDateRegistration=t.participantDateRegistration?new Date(t.participantDateRegistration):void 0,t.beginDate=t?.beginDate?new Date(t.beginDate):void 0),{...wu[e],...t}))(e,m),p=s(void 0),g=i((e=>{p.current=e}),[]),{handleSubmit:f}=Bu({step:e,inputs:l,onNextStep:a,saveStep:u,finishForm:d}),[x,{field:b,onSubmit:y}]=Ft(h,{onSubmit:(e,t)=>{f({...e,...p.current?.(t)})}}),v="methodObtain"in x?x.methodObtain:void 0;return r?o(vu,{}):c("form",{onSubmit:y,className:"space-y-m",children:[Su({sections:t,field:b,registerSubmit:g,methodObtain:v,isLastStep:5===e}),o(Tu,{step:e,onPrevStep:n})]})})),Du=[[{title:"Параметры карты",inputs:[]},{inputs:[{fieldType:"common",name:"currency",required:!0},{fieldType:"common",name:"paymentSystem",required:!0},{fieldType:"common",name:"cardCategory",required:!0},{fieldType:"common",name:"codeWord",required:!0}]}],[{title:"Персональные данные",columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"name",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"middleName",dadata:!0,filledByEsia:!0},{fieldType:"common",name:"sex",required:!0},{fieldType:"common",name:"birthday",required:!0,filledByEsia:!0},{fieldType:"common",name:"birthPlace",required:!0},{fieldType:"common",name:"phone",required:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{fieldType:"common",name:"dulSerie",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulNumber",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulIssueDateField",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{fieldType:"common",name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"addressMatch"}]},{columns:2,inputs:[{fieldType:"common",name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{fieldType:"common",name:"housing",required:!0}]},{inputs:[{fieldType:"common",name:"addressFact",required:!0,dadata:!0}]}],[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{fieldType:"info",text:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{fieldType:"common",name:"employment"},{fieldType:"common",name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{fieldType:"common",name:"inn",required:!0,dadata:!0},{fieldType:"common",name:"legalForm",required:!0}]},{inputs:[{fieldType:"common",name:"organization",required:!1},{fieldType:"common",name:"amountWorkers",required:!1}]},{columns:2,inputs:[{fieldType:"common",name:"employerActivities",required:!1},{fieldType:"common",name:"employerOrganization",required:!1},{fieldType:"common",name:"generalSeniority",required:!0},{fieldType:"common",name:"lastJobExperience",required:!0},{fieldType:"common",name:"experience5Years",required:!0},{fieldType:"common",name:"jobsNumber",required:!0}]},{inputs:[{fieldType:"common",name:"organizationPhone",label:"Телефон работодателя",required:!0},{fieldType:"common",name:"beginDate",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"positionOrganization",required:!1},{fieldType:"common",name:"partInBusiness",required:!0}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{fieldType:"common",name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{fieldType:"common",name:"familyStatus",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"dependents",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{fieldType:"info",text:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{fieldType:"common",name:"mandatoryIncome",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"otherPayments",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"snils",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"conscription",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"armyIdFlg"}]}],[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"disablePeopleFlg"}]},{inputs:[{fieldType:"common",name:"bankruptcyFlg"}]},{inputs:[{fieldType:"common",name:"shareholderFlg"}]},{inputs:[{fieldType:"common",name:"legalEntityName"}]},{inputs:[{fieldType:"common",name:"creditInRshbCd"}]}],[{title:"Способ получения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"methodObtain"}]},{type:"courier",title:"Адрес",columns:1,inputs:[]},{type:"courier",inputs:[{fieldType:"common",name:"addressCourier",dadata:!0}]},{type:"courier",inputs:[{fieldType:"common",name:"deliveryDate"}]},{type:"courier",inputs:[{fieldType:"common",name:"comment"}]},{type:"office",title:"Отделение Банка",columns:1,inputs:[]},{type:"office",inputs:[{fieldType:"common",name:"regionRetail",required:!0}]},{type:"office",inputs:[{fieldType:"common",name:"addressRetail",required:!0}]},{type:"office",title:"Код представителя Банка",columns:1,inputs:[]},{type:"office",inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{type:"office",inputs:[{fieldType:"common",name:"bankEmployeeCode"}]}]],Mu=["Параметры карты","Персональные данные","Данные о трудоустройстве","Данные о доходах и расходах","Дополнительные сведения","Выбор способа получения"],_u=d((({className:e,...t})=>{const[n,l]=a(0),s=i((()=>{l((e=>Math.min(e+1,6)))}),[]),d=i((()=>{l((e=>Math.max(e-1,0)))}),[]),m=r((()=>Du[n]),[n]),h=m?.flatMap((e=>e?.inputs))||[],[p,f]=a(!1);return o(g,{className:u("bg-transparent",e),defaultPadding:"p-0",...t,children:c("div",{className:"container grid grid-cols-12",children:[p?null:o(ou,{stepsTitles:Mu,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(Pu,{step:n,inputs:h,sections:m,onNextStep:s,onPrevStep:d,isFormFinished:p,finishForm:f},String(n))})]})})})),Au=()=>{const e=globalThis.sessionStorage?.getItem("refreshToken"),t=globalThis.sessionStorage?.getItem("accessToken"),n=globalThis.localStorage.getItem("taskId");if(!t||!e||!n)return globalThis.location.href="/",()=>null;const a=async()=>{const n=await cl("/auth/refresh","POST",{refresh_token:e,access_token:t});n instanceof Response?zu(n.status):(globalThis.sessionStorage.setItem("refreshToken",n.refresh_token),globalThis.sessionStorage.setItem("accessToken",n.access_token))};a();const l=setInterval(a,24e4);return()=>clearInterval(l)},zu=e=>{401==e&&(globalThis.location.href="/")},Fu=d((({step:e=1,totalSteps:t=5,stepsTitles:n=[]})=>{const a=r((()=>e/t*100),[e,t]);return o("div",{className:"py-lg px-5xl bg-white col-span-12",children:c("div",{children:[c("span",{className:"font-bold mr-s",children:["Шаг ",e," из ",t,"."]}),n[e]||null,o(su,{step:a,showPercentage:!1})]})})})),Eu=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:l,sectionAdditionalTitle:i,sectionInfoAdditional:r,buttonText:s,interval:d,...m})=>c(g,{...m,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Lo,{interval:d}):null]}),o(Vu,{title:a,items:l}),o(Vu,{title:i,items:r,countColumns:!0}),n?.__html?o(Oo,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(ye,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),Vu=({title:e,items:t,countColumns:n=!1})=>{const a=Ce();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Me,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Cs(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:Ou(e)},t)))}):null]})]}):null},Ou=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Me,{color:"text-secondary-text",size:"text-l",children:e}),o(Me,{color:"text-primary-text",size:"text-xl",children:t})]}),Lu=d((()=>o(Eu,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),ju=d((()=>{const[e]=Vs("leadForm");return o(Eu,{interval:300,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Цель кредита",description:"На любые цели"},{label:"Сумма",description:e?.moneyValue?.toLocaleString()+" ₽"},{label:"Срок кредита",description:e?.monthsValue+" мес"},{label:"Тип платежа",description:e?.isAnnuity?"Аннуитетный":"Дифференцированный"}]})})),$u=d((()=>{const[e]=Vs("leadForm");return o(Eu,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail?.text},{label:"Адрес",description:e?.addressRetail?.text}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),qu=d((()=>{const[e]=Vs("leadForm");return o(Eu,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.monthsValue+" мес"},{label:"Тип платежа",description:e?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),Uu=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Wu=d((()=>{const[e,t]=a(cu.process),[n]=Vs("taskId");return l((()=>{for(const e of Uu)mu({signalType:e,taskId:n});const e=setInterval((()=>n&&du({taskId:n}).then((n=>{n.statusCd&&n.statusCd!==cu.process&&(clearInterval(e),t(n.statusCd))}))),3e4);return()=>clearInterval(e)}),[]),Hu(e)})),Hu=e=>({IN_PROCESS:o(ju,{}),FAILED:o(Lu,{}),OK:o(qu,{}),REWORK:o($u,{})}[e]||null),Yu={0:{moneyValue:0,monthsValue:0,isAnnuity:!1,isInsurance:!1,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1},1:{surname:"",name:"",middleName:"",sex:"",birthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:""},2:{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:"",inn:void 0,jobsNumber:"",lastJobExperience:"",legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},3:{familyStatus:{key:"",text:""},dependents:void 0,familyMembers:void 0,confirmationIncome:{key:"",text:""},mandatoryIncome:void 0,otherPayments:void 0,snils:"",armyIdFlg:!1},4:{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},5:{regionRetail:"",addressRetail:"",bankEmployeeCode:""}},Ku=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e,name:t},n)=>o(Oo,{__html:e},`${t}_${n}`))):null},Gu=({field:e,inputs:t})=>(t||[])?.map(ws(e,"")),Xu=({sections:e,field:t})=>e?.map((({inputs:e,columns:n,title:a},l)=>c("div",{className:u(Cs(n),"grid gap-x-m"),children:[Ku(e),ks(a),Gu({field:t,inputs:e})]},`section-${l}`))),Ju=d((({step:e,onPrevStep:t})=>{const n=0===e;return c("div",{className:"flex justify-between",children:[o(jr,{onClick:t,className:u("w-full @xl:w-auto"),type:"button",version:"secondary",disabled:n,children:"Назад"}),o(jr,{className:u("w-full @xl:w-auto"),type:"submit",children:"Далее"})]})})),Zu={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},Qu=(e,t)=>{switch(e){case 0:return(e=>{const{moneyValue:t,monthsValue:n,isAnnuity:a}=e;return{loanAmount:t,creditPeriod:n,paymentTypeCd:Zu[a?"annuity":"differential"]}})(t);case 1:return(e=>{const{name:t,surname:n,middleName:a,birthday:l="",phone:i="",email:r,sex:s,birthPlace:o,dulIssueDateField:c="",dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,education:p,participantDateRegistration:g="",housing:f,addressRegistration:x,addressFact:b}=e;return{birthDate:xt(l,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:xt(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:xt(g,!0),houseTypeCd:f,participantContacts:Io({phone:bt(i),email:r}),participantAddresses:Bo({addressRegistration:x,addressFact:b}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}})(t);case 2:return(e=>{const{employment:t,organizationName:n,inn:a,legalForm:l,organization:i,amountWorkers:r,employerActivities:s,employerOrganization:o,generalSeniority:c,lastJobExperience:d,experience5Years:m,jobsNumber:u,organizationPhone:h,organizationAddress:p,positionOrganization:g}=e;return{employmentTypeCd:t,organizationName:n,organizationInn:a,organizationActivityTypeCd:s,organizationTypeCd:i,organizationKindCd:o,employeesNumberCd:r,opf:l,seniority:c,generalSeniority:m,jobsNumber:u,lastWorkDuration:d,positionCd:g,participantContacts:Io({organizationPhone:h&&bt(h)}),participantAddresses:Bo({organizationAddress:p})}})(t);case 3:return(e=>{const{familyStatus:t,dependents:n,familyMembers:a,confirmationIncome:l,mandatoryIncome:i,otherPayments:r,snils:s,armyIdFlg:o}=e;return{maritalStatusCd:t,totalDependents:a,incomeCertificateCd:l,otherDependents:n,participantIncomes:Ro({mandatoryIncome:i,otherPayments:r}),snils:s?.replaceAll(" ",""),armyIdFlg:o}})(t);case 4:return(e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:l}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:l}})(t);default:return{}}},eh=({step:e,inputs:t,onNextStep:n,saveStep:a,finishForm:l})=>{const[r]=Vs("taskId"),[s]=Vs("profileId"),[o]=Vs("participantId"),c=i((async i=>{const c=Is(Dn(th(i,t,e)));if(!pn(c(i)))return console.warn("validation fail");a(i);try{r&&s&&o&&await Ys((({participantId:e,taskId:t,profileId:n,formData:a,step:l=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:globalThis.location.origin,id:t,authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Qu(l,a)}],esiaAccountTypeCd:{key:a?.esiaAccountTypeCd?.key}}}))({participantId:o,taskId:r,profileId:s,step:e,formData:i}))}catch(e){return"Fail"}return n(),5===e&&l?.(!0),"OK"}),[]);return{handleSubmit:c}},th=(e,t,n)=>"BUSINESS_OWNER"!==e.positionOrganization?.key?t.map((e=>"partInBusiness"===e?.name?{...e,required:!1}:e)):e.consentPfrFlg?2===n&&"RETIREE"===e.employment?.key?[]:t:t.map((e=>"snils"===e?.name?{...e,required:!1}:e)),nh=d((({step:e,sections:t,onPrevStep:n,onNextStep:a,inputs:l,renderStep:r=Xu,isFormFinished:d,finishForm:m})=>{const[u,h]=Vs("leadForm"),p=((e,t)=>(t&&(t.birthday=t.birthday?new Date(t.birthday):void 0,t.dulIssueDateField=t.dulIssueDateField?new Date(t.dulIssueDateField):void 0,t.participantDateRegistration=t.participantDateRegistration?new Date(t.participantDateRegistration):void 0,t.beginDate=t?.beginDate?new Date(t.beginDate):void 0),{...Yu[e],...t}))(e,u),g=s(void 0),f=i((e=>{g.current=e}),[]),{handleSubmit:x}=eh({step:e,inputs:l,onNextStep:a,saveStep:h,finishForm:m}),[,{field:b,onSubmit:y}]=Ft(p,{onSubmit:(e,t)=>{x({...e,...g.current?.(t)})}});return d?o(Wu,{}):c("form",{onSubmit:y,className:"space-y-m",children:[r({sections:t,field:b,registerSubmit:f}),o(Ju,{step:e,onPrevStep:n})]})})),ah=[[],[{title:"Персональные данные",columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"name",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"middleName",dadata:!0,filledByEsia:!0},{fieldType:"common",name:"sex",required:!0},{fieldType:"common",name:"birthday",required:!0,filledByEsia:!0},{fieldType:"common",name:"birthPlace",required:!0},{fieldType:"common",name:"phone",required:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{fieldType:"common",name:"dulSerie",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulNumber",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulIssueDateField",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{fieldType:"common",name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"addressMatch"}]},{columns:2,inputs:[{fieldType:"common",name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{fieldType:"common",name:"housing",required:!0}]},{inputs:[{fieldType:"common",name:"addressFact",required:!0,dadata:!0}]}],[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{fieldType:"info",text:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{fieldType:"common",name:"employment"},{fieldType:"common",name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{fieldType:"common",name:"inn",required:!0,dadata:!0},{fieldType:"common",name:"legalForm",required:!0}]},{inputs:[{fieldType:"common",name:"organization",required:!1},{fieldType:"common",name:"amountWorkers",required:!1}]},{columns:2,inputs:[{fieldType:"common",name:"employerActivities",required:!1},{fieldType:"common",name:"employerOrganization",required:!1},{fieldType:"common",name:"generalSeniority",required:!0},{fieldType:"common",name:"lastJobExperience",required:!0},{fieldType:"common",name:"experience5Years",required:!0},{fieldType:"common",name:"jobsNumber",required:!0}]},{inputs:[{fieldType:"common",name:"organizationPhone",label:"Телефон работодателя",required:!0},{fieldType:"common",name:"beginDate",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"positionOrganization",required:!1},{fieldType:"common",name:"partInBusiness",required:!0}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{fieldType:"common",name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{fieldType:"common",name:"familyStatus",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"dependents",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{fieldType:"info",text:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{fieldType:"common",name:"confirmationIncome",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"mandatoryIncome",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"otherPayments",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"snils",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"conscription",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"armyIdFlg"}]}],[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"disablePeopleFlg"}]},{inputs:[{fieldType:"common",name:"bankruptcyFlg"}]},{inputs:[{fieldType:"common",name:"shareholderFlg"}]},{inputs:[{fieldType:"common",name:"legalEntityName"}]},{inputs:[{fieldType:"common",name:"creditInRshbCd"}]}],[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"regionRetail",required:!0}]},{inputs:[{fieldType:"common",name:"addressRetail",required:!0}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{fieldType:"common",name:"bankEmployeeCode"}]}]],lh=["","Персональные данные","Данные о трудоустройстве","Данные о доходах и расходах","Дополнительные сведения","Отделение Банка"],ih=d((({className:e,...t})=>{const[n,s]=a(0);l(Au,[]);const d=i((()=>{s((e=>Math.min(e+1,5)))}),[]),m=i((()=>{s((e=>Math.max(e-1,0)))}),[]),h=r((()=>ah[n]),[n]),p=h?.flatMap((e=>e?.inputs))||[],f=0===n,[x,b]=a(!1);return o(g,{className:u("bg-transparent",e),defaultPadding:"p-0",...t,children:c("div",{className:"container grid grid-cols-12",children:[f||x?null:o(Fu,{stepsTitles:lh,step:n,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(nh,{step:n,inputs:p,sections:h,onNextStep:d,onPrevStep:m,isFormFinished:x,finishForm:b,renderStep:f?({registerSubmit:e,field:t})=>o(Gd,{defaultParams:{sum:t("moneyValue").value,period:t("monthsValue").value,isAnnuity:t("isAnnuity").value},title:"Калькулятор кредита",footnote:"Расчёт является предварительным. Точные условия будут предоставлены в отделении Банка.",calcSource:{$ref:"/wcms-resources/credit-calculator-data.json"},registerSubmit:e}):void 0},String(n))})]})})})),rh=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,sh=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),oh=1e9,ch={sum:{min:1e4,max:oh},period:3},dh=ht((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:l,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=jc(ch,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:mh(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=uh(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Ac,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Sm,{label:a?.title,min:500,max:oh,...d("sum",{parse:e=>({min:Number(e),max:oh}),format:({min:e})=>String(e)})}),o(ha,{title:l?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(Pc,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),mh=e=>ot((e?.paramsSource?.rateRows||[]).filter(rh).flatMap((e=>sh(e.minMonths,e.maxMonths)))),uh=e=>ot(e.flatMap((e=>e||[])).filter(rh).flatMap((e=>sh(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],hh=[{key:"10"},{key:"50"},{key:"100"}],ph=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(cn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:hh,iconVersion:"black"})]})},gh="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",fh=(e,t)=>{const{currentPage:n,onPageChange:a,totalPages:l}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==l&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,l)?o("div",{onClick:()=>a(i),className:gh,"aria-label":`Страница ${i}`,children:i},String(t)):null},xh={width:"24",height:"24"},bh=({currentPage:e,onPageChange:t,totalPages:n})=>{const a=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),l=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:l,children:o(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:yh(1===e),...xh})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:gh,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,a.map(fh),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:gh,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:yh(e===n),...xh})})]})},yh=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",vh=({currentPage:e,onPageChange:t,totalPages:n,itemCount:a,onItemCountChange:l})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(bh,{currentPage:e,onPageChange:t,totalPages:n}),a&&l?o(ph,{itemCount:a,onItemCountChange:l}):null]}),Nh=d((({className:e,value:t,autoFocus:n,onChange:a,onFocus:l,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{a&&a(e.target?.value||"")}),[a]);return c("div",{className:u("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:u("h-14 w-full px-10 text-l text-black box-border rounded-md",Wt),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:l})]})})),wh=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Nh,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Ga,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Ga,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(jr,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Ch=({title:e,timestamp:t,publicId:n})=>{const a=ue(),{href:l}=a({href:`/api/v1/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[null,c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Me,{size:"text-m","font-weight":"font-light",children:xt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:l,download:!0,"aria-label":"Скачать",children:e})]})]},n)},kh="/api/v1/depository",Sh={startDate:void 0,endDate:void 0,query:""},Th=ht((({className:e,...t})=>{const[n,l]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=Ft(Sh),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:a,endDate:l})=>{const i=a?xt(a,!0):"",r=l?xt(l,!0):"",s=new URLSearchParams(kh);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=jn(kh+o,st);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=i((e=>l(e-1)),[]),b=i((e=>{r!==e?(s(e),l(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(wh,{filtrationState:d,field:m,onClearFilter:h}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Me,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Me,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(Ch,{...e},String(e.publicId)))):o(Uo,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(vh,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),Ih=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Bh=d((({className:e="",title:t,description:n,error:a,button:l,...i})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Ih(a)}),o(k,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),l?.text?o(ye,{version:l?.version,text:l?.text,...l}):null]}))),Rh="location";function Ph(e="Москва"){const[t,n]=((e,t,n)=>{const[r,s]=a(n||null);return l((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((n=>e.fire(t,n)),[e,t])]})(ce,"location",Mh()??{name:e}),r=i((e=>{_h(e),n(e)}),[]),{data:s}=jn(Dh()?null:"/api/v1/region",st);return l((()=>{s&&!Dh()&&n(s)}),[s]),[t??{name:e},r]}const Dh=()=>Boolean(globalThis.localStorage?.getItem(Rh)),Mh=()=>{try{const e=globalThis.localStorage?.getItem(Rh);return e&&JSON.parse(e)}catch(e){return null}},_h=e=>{try{globalThis.localStorage?.setItem(Rh,JSON.stringify(e))}catch(e){}};var Ah;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Ah||(Ah={}));const zh=new Intl.NumberFormat("ru",{style:"currency",currency:Ah.RUB}),Fh=e=>e?zh.format(e):"",Eh="text-m font-light text-secondary-text ",Vh=`${Eh} text-left`,Oh=`${Eh} pl-5xl text-center`,Lh=`${Eh} pl-5xl text-right`,jh={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},$h=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Vh,children:o(Me,{size:"text-m",children:"Валюта"})}),o("th",{className:Oh,children:o(Me,{size:"text-m",children:"Купить"})}),o("th",{className:Lh,children:o(Me,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(qh)})]}))),qh=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:jh[t]},width:"24",height:"24"}):null,o(Me,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Me,{size:"text-h6",children:Fh(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Me,{size:"text-h6",children:Fh(e?.buyExchangeRate)})})]},t)},Uh={icon:"GpsIcon"},Wh=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Kc,{...Uh,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Hh=(e,t,n)=>{const a=Number(Yh(e))*Math.pow(t,n?-1:1);return Number.isInteger(a)?a:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(a)},Yh=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Kh=e=>Rt([[e=>e.value!==Ah.RUB&&e.oppositeValue!==Ah.RUB,()=>e.handleConvert(e.value,Ah.RUB)],[e=>e.value===Ah.RUB&&e.oppositeValue===Ah.RUB,()=>e.handleConvert(e.value,Ah.USD)],[e=>e.value===Ah.RUB&&e.oppositeValue===Ah.RUB,()=>e.handleConvert(e.value,Ah.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Gh(e){const{placeholder:t,rates:n,selected:a,value:l,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:a,text:a};return c("div",{className:"relative flex",children:[o(Yt,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:l,onChange:i}),s.length?o(cn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Xh=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:l})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Ah.RUB,selectBuy:n?.[0]?.currency?.currency||Ah.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[Gh({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Jh(r,d,n),value:r.inputSell,setValue:e=>Qh(d,n)(e,r.selectSell,r.selectBuy)}),Gh({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Zh(r,d,t),value:r.inputBuy,setValue:e=>ep(d,t)(e,r.selectBuy,r.selectSell)})]}):null,l?.text?o(ye,{text:l.text,version:l?.version,...l}):null]})})),Jh=(e,t,n)=>a=>{t({selectSell:a}),Kh({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,l=e.selectBuy)=>{Qh(t,n)(e.inputSell,a,l)}})},Zh=(e,t,n)=>a=>{t({selectBuy:a}),Kh({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,l=e.selectSell)=>ep(t,n)(e.inputBuy,a,l)})},Qh=(e,t)=>(n,a,l)=>{e({inputSell:Yh(n),selectBuy:l});const i=t.find((e=>e.currency?.currency===l))?.buyExchangeRate||t.find((e=>e.currency?.currency===a))?.buyExchangeRate;i&&e({inputBuy:String(Hh(n,i,a===Ah.RUB)||"")})},ep=(e,t)=>(n,a,l)=>{e({inputBuy:Yh(n),selectSell:l});const i=t.find((e=>e.currency?.currency===l))?.saleExchangeRate||t.find((e=>e.currency?.currency===a))?.saleExchangeRate;i&&e({inputSell:String(Hh(n,i,a===Ah.RUB)||"")})};const tp=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const[l]=Ph(),i=function(e){const t=e?.code||"000",{data:n}=jn(`/api/v1/exchangerates?regionCode=${t}`,st);return n||{}}(l),r=np(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Ah.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:Ah.RUB}}),o(g,{className:u("box-border min-h-80",e),...a,children:o(Te,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o($h,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Wh,{address:i?.address})]}),o(Xh,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:n})]})})})})),np=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],ap=d((({className:e="",items:t})=>{const n=ue();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(lp(n))})})),lp=e=>({dataFooter:t,...n},a)=>{const{text:l,href:i,target:r,onClick:s}=e(n);return l?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...pe(t),children:l||null})},String(a)):null},ip=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),rp=["all","footer"],sp=d((({className:e,navigationItems:t})=>{const n=ue();return o("div",{role:"menu",className:u("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(ip(rp)).map(n).map(op)})})),op=(e,t)=>{const{text:n,items:a=[],href:l,target:i="_self",onClick:r,dataFooter:s}=e,d=a.filter(ip(rp));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:l,target:i,onClick:r,...pe(s),children:n}),d?o(ap,{items:d}):null]},String(t))},cp=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(dp)}):null)),dp=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Me,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(mp)})]},String(t)),mp=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:up(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),up=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${hp(t)}`,children:o(Me,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},hp=e=>e.replaceAll(/\D/g,""),pp=d((({className:e="",index:t,text:n,...a})=>{const l=ue(),{href:i,target:r,onClick:s}=l(a);return o("a",{className:u("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),gp=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Me,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(pp,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),fp="w-full lg:w-52";function xp(e,t,n=300){l((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const bp=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:a,s2Matches:l}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),a=Array.from({length:e.length}),l=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)a[r]||l[n]||e[r]!==t[n]||(i++,a[r]=!0,l[n]=!0)}return{m:i,s1Matches:a,s2Matches:l}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:a}){let l=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(a[s]){r=s+1;break}e[i]!==t[s]&&l++}return l}(e,t,{s1Matches:a,s2Matches:l}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const yp=(e,t)=>(n,a)=>{for(const[l,i]of a)n.set(l,e(n.get(l)||t,i));return n},vp=(e=[])=>e.reduce(((e,t)=>e+t),0),Np=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),wp=e=>t=>e.map((([e,n])=>[bp(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>kp(t,e))).reduce(yp(Math.max,0),new Map),Cp=e=>t=>{return Ec(t,t.map((({title:e})=>e)).map((e=>t=>{const n=Np(t||"");return n.length?vp(e.map((e=>ic(n.map(bp(e)))))):0})(e))).sort((a=([,e])=>e,n=(e,t)=>a(e)-a(t),(e,t)=>-n(e,t))).map((([e])=>e));var n,a},kp=(e,t)=>new Map(e.map((e=>[e,t]))),Sp=({basePathList:e,initialQuery:t=""})=>{const[n,i]=a(t||"");l((()=>{null!=t&&i(t)}),[t]);const{data:r}=jn(e?.length?e:null,Tp),[s,o]=a(null);return xp((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:a}=t||{};if(!(e&&n?.length&&a&&Object.keys(a).length))return[];const l=Np(e);if(!l.length)return[];const i=Object.entries(a),r=[...l.map(wp(i)).reduce(yp(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*l.length)).map((([e])=>n[e]));return Cp(l)(r)})(n)))}),[r,n]),[s,{value:n,onChange:i}]},Tp=async(...e)=>(await Promise.allSettled(e.map((e=>rt(V(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Ip=d((({initialQuery:e,navigationItems:t})=>{const n=r((()=>t?.map((e=>e.href||"/"))),[t]),[a,l]=Sp({basePathList:n,initialQuery:e}),i=r((()=>Bp(t)(a)),[t,a]);return o(pl,{head:o(Nh,{autoFocus:!0,...l}),children:o(sp,{navigationItems:i})})})),Bp=e=>t=>e?.length&&t?.length?Ec(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:V("/",t)})))}))):[],Rp=(e={})=>{const{open:t,close:n}=de();return{open:(n={},a={})=>t(o(Ip,{...e,...n}),a),close:n}},Pp=d((({className:e,search:t,...n})=>{const[l,r]=a(""),s=i((()=>r("")),[]),d=Rp(n),m=i((e=>{r(e),Dp(e)&&d.open({initialQuery:e},{onClose:s})}),[s,d]);return c("div",{className:u("relative",e),role:"search",children:[o(Nh,{value:l,placeholder:t?.placeholder,onChange:m}),o(hl,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),Dp=e=>e&&e.length>=3,Mp=(e,t)=>{const{logo:n}=e??{},{dataHeader:a,dataFooter:l,...i}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(Qs,{className:fp,logo:i,data:l,showTitle:!1}),o(Pp,{className:"grow",navigationItems:t,...e})]})},_p=d((({className:e="",index:t,...n})=>{const a=ue(),{href:l,target:i,text:r,onClick:s}=a(n);return o("a",{className:u("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:l,target:i,onClick:s,children:r||`Документ ${t}`})})),Ap=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Me,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(_p,{index:t,...e},String(t))))}):null]}))),zp=ht((({className:e,footer:t,...n})=>{const{navigationItems:a}=n.options?.page?.navigation??{},l=n.options?.page?.common??{},{documents:i,relatedEnterprises:r,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:h,license:p,otherLinks:f=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[Mp(l,a),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(sp,{navigationItems:a}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u(fp,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(cp,{items:s}),h?o(ye,{className:"w-full",version:"primary",...h}):null,d.map(((e,t)=>o(Xm,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),f.map(((e,t)=>o(ye,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(gp,{title:m,links:r}),o(Ap,{links:i,license:p})]})})),Fp=d((({className:e="",title:t,description:n,calendar:a,...l})=>c(g,{className:u("space-y-m",e),defaultPadding:"p-6xl",...l,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),a?Ep(a):null]}))),Ep=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>Vp(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:Op(e)}),c("div",{className:"text-s",children:[o(Me,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Me,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Vp=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),Op=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ne,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Lp=ht((({className:e,title:t,button:n,regionSource:l,data:i,...r})=>{const[s,d]=a({key:""}),m=l?.regions??[],h=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(hn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(ye,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:Ym(i,s?.key),children:f})}):null]})})}));function jp(e=[]){const t=D(),n=Array.from(e.entries()).filter((([,e])=>$p(t)(e)));return n.find((([,e])=>$p(t,!0)(e)))??n[n.length-1]??[]}const $p=(e,t=!1)=>({href:n})=>{if(!n)return!1;const a=E(qp(e)(n));return t?a===E(n):a.startsWith(E(n))},qp=e=>t=>{const n=X(G.SITE_URL);return A(t)?e.href:V(n,e.pathname)},Up=d((({className:e="",items:t,activeItem:n,ariaLabel:a="Меню"})=>{const[r,{setFalse:d,toggle:m}]=Lt(!1),h=$t(d),p=s(null),g=i((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),a=t.current.getBoundingClientRect(),l=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${l}px`:a.left>e.left&&(l>a.left?n.current.style.left="":n.current.style.left=`${l}px`)}}),[r]);return jt(globalThis,"resize",(()=>g({isOpened:r,buttonRef:h,menuRef:p}))),l((()=>{g({isOpened:r,buttonRef:h,menuRef:p})}),[r]),c("div",{className:u(r?"rounded-md shadow-blue-gray":"",e),ref:h,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":a,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:u("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!r}),"aria-hidden":!r,children:Hp(t,n)})]})})),Wp=d((({isActive:e,...t})=>{const n=ue(),{text:a,href:l,target:i,onClick:r}=n(t);return o("a",{className:u("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:l,target:i,onClick:r,role:"link",...pe(t?.data),children:a})})),Hp=(e,t)=>e?.map(((e,n)=>o(Wp,{isActive:e===t,...e},e?.text??String(n)))),Yp={default:"w-6 h-6",large:"w-12 h-12"},Kp=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:a=!1,disabled:l,ariaLabel:i="Меню второго уровня",image:r,data:s,onClick:c,version:d})=>o("button",{className:u("group/btn border-0 flex shrink-0 items-center",a?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":a&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Yp[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:l,"aria-label":i,onClick:c,...pe(s),children:o(ne,{image:r,className:u("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Gp="chatbot",Xp="text-page__btn-chat",Jp={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Zp=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:a="Чат",version:i})=>{const r=(e=>{l((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=Jp[e??""];return n=>{if(t)if("personal"!==e)Tr(Gp,t);else{const e=n.target;e?.classList.contains(Xp)||e?.classList.add(Xp),document.getElementById("webchat-js-container:webchat_rshb")||Tr(Gp,t)}}})(e);return o(Kp,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:a,onClick:r,buttonSize:"large",isGrayBg:!0,version:i})})),Qp=d((({className:e="",active:t,dataItemName:n,children:a,data:l,...i})=>{const r=ue(),{href:s,target:d,text:m,onClick:h}=r(i);return c("a",{className:u("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:h,...pe(l),children:[o("span",{className:eg(t),children:m||a}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),eg=(e=!1)=>u("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),tg=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...l})=>{const r=Yo(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(Qp,{...l,children:n})})})),ng={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},ag=d((({version:e,text:t,mobileText:n,...a})=>{const l=Ce()?n:t;return l?o(ye,{className:u("py-s px-lg font-light whitespace-nowrap",ng["transparent"===e?"transparent":"default"]),...a,children:l}):null})),lg=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:l,chatBotAriaLabel:i})=>{const d="transparent"===t?"white":"black",[,m]=jp(e),[u,h]=a(e.length),p=e.slice(u),g=s(null),f={rootRef:g},x=r((()=>e.map(((e,t)=>e=>{h(e?ig(t):rg(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(tg,{className:u-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:x[t],data:e.dataHeader,...e},String(t))))}),p.length?o(Up,{items:p,activeItem:m,ariaLabel:l}):null,_.CHAT_BOT?o(Zp,{version:t,iconVersion:d,chat:_.CHAT_BOT,ariaLabel:i}):null,o(ag,{version:t,...n})]})})),ig=e=>t=>Math.max(t,e+1),rg=e=>t=>Math.min(t,e),sg=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Me,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(og,{...e},String(t))))})]}):null,og=d((({icon:e,...t})=>{const n=ue(),{text:a,target:l,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,a?o("a",{className:"hover:text-primary-hover",href:i,target:l,onClick:r,children:o(Me,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})}):null]})})),cg=(e,t)=>n=>n.name?o(Km,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Ym(e,n.name),children:o(Me,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,dg=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:u(Wt,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),mg=d((({foreignOffices:e,branches:t})=>{const[n,l]=Ph(t?.default),r=ue(),{href:s}=r({href:`/branches/${n.slug}`}),[d,m]=a(""),u=hg(Ai()).sort(((e,t)=>e.name.localeCompare(t.name))),h=((e,t)=>{const n=new Map;for(const a of e){const e=t(a),l=n.get(e)||[];n.set(e,[...l,a])}return n})(u,ug),{close:p}=de(),g=i((e=>{l(e),p()}),[]);return c(pl,{className:"pb-20",head:c("div",{children:[o(Me,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Km,{href:s,className:"inline mx-2xs text-primary-main",children:n.name})]})}):null,o(dg,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:u.filter((({name:e})=>e&&bp(e.toLowerCase())(d.toLowerCase())>=.8)).map(cg(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(h.entries()).map((f=g,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Me,{size:"text-h6",children:e})}),t.map(cg(x,f))]},e)))}),sg(e)]});var f,x})),ug=e=>e.name?.charAt(0)||"",hg=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),pg=d((({className:e="",active:t,flat:n,children:a,data:l,...i})=>{const r=ue(),{href:s,target:c,text:d,onClick:m}=r(i);return o("a",{className:u(gg(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...pe(l),children:o("span",{suppressHydrationWarning:!0,className:fg(t,n),children:d||a})})})),gg=(e=!1,t=!1)=>u("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),fg=(e=!1,t=!1)=>u("font-sans text-s font-light",e?"text-primary-main":u(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),xg=d((({className:e,version:t,...n})=>{const a="transparent"===t?"white":"black",[l]=Ph(n?.branches?.default),r=Rp(n),s=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(mg,{...e}),n),close:n}})(n),d=i((()=>r.open()),[r]),m=i((()=>s.open()),[s]);return c("div",{className:u("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(pg,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:l?.name,data:Ym(n?.branches?.dataClick,l?.name??""),onClick:m}):null,n?.officesAtms?.href?o(pg,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(Kp,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),bg=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...l})=>{const r=Yo(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(pg,{...l,children:n})})})),yg=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:l,headerData:i,search:d,bgColor:m,logo:u})=>{const[h,p]=a(e.length),g=e.slice(h),f=s(null),x={rootRef:f},b=r((()=>e.map(((e,t)=>e=>{p(e?vg(t):Ng(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=u??{};return c("div",{className:"flex items-center justify-between",children:[o(Qs,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:f,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(bg,{className:h-1<n?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(Up,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(xg,{version:l,className:"ml-auto",search:d,navigationItems:e,...i})]})})),vg=e=>t=>Math.max(t,e+1),Ng=e=>t=>Math.min(t,e),wg={"bg-white":"primary",transparent:"transparent"},Cg=["all","header"],kg=ht((({className:e,bgColor:t="bg-white",logo:n={},version:a=wg[t],portal:l,header:i={},...r})=>{const{common:s,navigation:d}=Tg(r?.options?.page),{navigationItems:m}=d,{logo:h={}}=s,[,p]=jp(m),{internetBankButton:f}=l||{},x=n.image?.icon||n.image?.src||n?.title?n:h;return o(g,{tag:"header",className:u("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:a,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(yg,{activeTopItem:p,navigationItems:m?.filter(ip(Cg)),version:a,headerData:{...i,...d},search:s.search,bgColor:t,logo:x})}),o("div",{className:u("mt-s h-px bg-main-divider",Sg(a))}),p?.items?.length&&o(lg,{subItems:p?.items?.filter(ip(Cg)),version:a,internetBankButton:f})]})})})),Sg=e=>"transparent"===e?"opacity-30":"",Tg=e=>({navigation:e?.navigation??{},common:e?.common??{}}),Ig=(e=!1)=>e?{}:{padding:"p-0"},Bg={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Rg=ht((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:a=!0,version:l="transparent",isTheme:i=!1,isCardBorder:r,...s})=>o(g,{className:u("relative","grid grid-cols-12",Bg[n],e),padding:t,version:l,isTheme:i,...s,children:P({...s,extraProps:{...Ig(a),className:Wo(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),Pg=d((e=>{const{className:t,align:n,image:a,...l}=e,i=n?u("flex",td[n]):"";return o(g,{className:u(i,t),defaultPadding:"p-0",...l,children:o(ne,{image:a})})})),Dg=(e,t=0)=>{const{itemCount:n,visibleItemCount:l}=e,[r,s]=a(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=l?n>l&&r<n-l:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};function Mg({dec:e,inc:t,canDec:n,canInc:a,btnClass:l,className:i=""}){return n||a?c("div",{children:[n?o(pc,{className:u("absolute z-40",l[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,a?o(pc,{className:u("absolute z-40 rotate-180",l[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const _g=d((({className:e="",cards:t=[],button:n})=>{const[l,r]=a(0),s=i((e=>r(e)),[]),d=t.length,[m,u]=Dg({itemCount:d,visibleItemCount:2}),{canDec:h,canInc:p}=u,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?Ag({activeIndex:m,cards:t,selectedCardIndex:l,onClick:s}):null,Mg({...u,btnClass:["left-12","right-12"],className:"top-16"}),h?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(ye,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function Ag({activeIndex:e,cards:t,selectedCardIndex:n,onClick:a}){const l=460*e,i=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${l}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:a}){return c("button",{type:"button",onClick:a,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ne,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?zg("страховая сумма",e.sum):null,e?.fee?zg("страховой взнос",e.fee):null]}),Fg(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})})}function zg(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Me,{size:"text-h6",children:[Ue(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Me,{size:"text-l",color:"text-secondary-text",children:e})})]})}function Fg(e){return e?o(ne,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const Eg=d((({className:e="",title:t,insuranceTabs:n=[],button:l,...r})=>{const[s,d]=a(0),m=i((e=>d(e)),[]);return c(g,{className:u("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:a}){return o("button",{type:"button",onClick:a,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Vg({insuranceTabs:n,button:l})})]})})),Vg=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(_g,{button:t,cards:e},String(n)))):null};const Og={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Lg={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},jg=d((e=>{const{className:t="",__html:n,isDotted:a,investmentZeroColumn:l,investmentColumns:i,...r}=e,s=i?[...i]:[];return l&&s.unshift(l),o(g,{className:t,defaultPadding:"p-4xl",...r,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[Mc(o("div",{className:"w-px h-4 bg-gray"}))(s.map($g)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Wg)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(Pe,{__html:n,isDotted:a,itemSize:"list-s"})}):null]})})})),$g=(e,t,n)=>{const a=1===t,l=t===n.length-1,i=e.cells?.reverse()||[];return o("div",{className:`${qg(a,l,e.cells)}`,children:i.length?o("div",{className:"w-full "+(l?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:i.map(Ug)}):null},`column_${t}`)},qg=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),Ug=(e,t)=>{const n=e.cellSize||"XS",a=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${Lg[n]} ${Og[a]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Me,{align:"text-center",children:e.text})},`cell_${t}`):null},Wg=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,Hg=["байт","Кб","Мб","Гб","Тб","Пб"],Yg=d((({icon:e,text:t,href:n,target:a,fileFormat:l,data:i,fileSize:r})=>{const s=r&&l?",":"",d=r??"",m=l?String(l):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:a,...pe(i),children:[e,t?c(Me,{size:"text-l",font:"font-light",children:[t," ",Kg(d,m),o(Me,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Kg=(e,t)=>e||t?o("span",{children:", "}):"",Gg=(e,t)=>(n,a)=>{const l=q(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Hg[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Jg(l):n?.fileFormat;return c("div",{role:"listitem",children:[o(Yg,{text:n?.text,target:n?.target,href:l,fileFormat:r,fileSize:i,icon:Xg(t),data:n?.data}),o(Pe,{__html:n?.__html})]},String(a))},Xg=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,Jg=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),a=-1!==t?e.substring(t+1):"";return a.includes("/")?a.replace(n,""):a},Zg=d((({href:e,__html:t,target:n})=>{const{close:a}=de(),l=D(),r=q(l)(e),s=i((()=>{a()}),[]);return c(pl,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Pe,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(ye,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o(jr,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Qg=d((({text:e,href:t,target:n,__html:a,icon:l})=>{if(!e&&!a)return null;const r=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Zg,{...e}),n),close:n}})({__html:a,href:t,target:n}),s=i((()=>r.open()),[r]);return c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[Xg(l),o(Me,{font:"font-light",children:e})]})})),ef={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},tf=ht((({className:e="",title:t,description:n,align:a="text-center",documents:l,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=D();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(k,{title:t,description:n,align:a,headlineVersion:"M",as:"h2",isEmbedded:!0}),l?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",ef[r]),role:"list",children:l.map(nf(d,i))}):null]})})),nf=(e,t)=>(n,a)=>{const l=n?.docType;return""===l?null:"reportSource"in n&&n?.reportSource?.__html?af(t)(n,a):Gg(e,t)(n,a)},af=e=>(t,n)=>{const a={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(Qg,{...a,icon:e,href:lf(t)?t?.href:t?.attachment?.src}),o(Pe,{__html:t?.__html})]},String(n)):null},lf=e=>"href"in e,rf=ht((({className:e,padding:t,align:n="text-left",buttons:a=[],description:l,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:p="primary",...f})=>{const x="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Te,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:Le(a,{className:"flex-wrap"}),children:[l?o(Me,{size:"text-xl","font-weight":"font-light",children:l}):null,c("div",{className:u("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Pe,{__html:r,itemSize:"list-m"}):null,o(Me,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:u("flex justify-center bg-white rounded-md @xl:-order-1",x),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),sf=(e=[],t={})=>e.filter((({content:e={}})=>Oc(t,e))).length,of=(e,t)=>e===t;const cf=(df=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(of,((e=of)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,n])=>df(n,t[e])))));var df;const mf=[],uf={},hf={primary:"bg-white/30",secondary:"bg-main-divider"},pf={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},gf=d((({count:e,version:t="secondary"})=>{const n=Ce(),a=n?"bg-main-divider":hf[t],l=pf[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",a),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Me,{size:"text-xs",color:l,children:e})})})),ff=({text:e,description:t,icon:n,isActive:a,type:l})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(a);return c("div",{className:u("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:u("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===l?i.text:i.oldText,children:e}),o("div",{className:"animated"===l?i.desc:i.oldDesc,children:t})]})]})},xf={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},bf={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},yf={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},vf={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Nf=d((({tag:e="div",item:t={},isActive:n=!1,type:a="default",onClick:l})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:h,...p}=t;return o(i,{className:u("h-12","block flex-1","cursor-pointer",xf[a],n?vf[a]:yf[a]),role:"tablist","aria-label":"Список табов",onClick:l,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?bf[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[ff({text:r,description:s,icon:d,isActive:n,type:a}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(gf,{count:m,version:$r(n,a)})}):null]})})})),wf=d((e=>o(e?.item?.href?Cf:kf,{...e}))),Cf=d((e=>{const t=ue(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:a,...l}=t({...e.item,onClick:n});return o(Nf,{...e,tag:"a",item:l,onClick:a})})),kf=d((({item:e={},onClick:t,...n})=>{const a=i((()=>{t&&t(e)}),[t,e]);return o(Nf,{item:e,onClick:a,...n})})),Sf=(e,t,n)=>(a,l)=>o(wf,{isActive:a===e,onClick:t,type:n,item:a},String(l)),Tf=d((({className:e,tabsType:t="default",items:n=[],activeItem:a,onChange:l})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(Sf(a,l,t))}))),If={categories:[],extraOptions:[],propertyType:[],stage:[]},Bf=ht((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...l})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=jc(If,{block:l.block,page:l.options?.page}),f=i(((e=If)=>p(e)),[]),x=(({hotFilters:e=mf,filtrationState:t=uf,blocks:n=mf,onFiltrationStateChange:a})=>{const l=r((()=>Math.max(0,e.findIndex((e=>cf(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:sf(n,t.filter),version:$r(t===e[l])})))),[e,n,l]),o=i((t=>{a(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[l],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:l.block?.blocks,onFiltrationStateChange:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...l,children:[o(Tf,{...x}),o(Ac,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(Pc,{blocksToRender:d,...l})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Rf=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:l,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Mf(a)},{label:"Модуль приема наличных",value:l?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Me,{size:"text-h4",children:Mf(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(er,{color:"green",children:Mf(s)})})]}),o("div",{className:"hidden sm:block",children:o(qi,{className:"flex-wrap",children:m?.map(Df)})}),o(Ei,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Vi,{isUnfolded:e,children:o(qi,{className:"flex-wrap",children:m?.map(Df)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>sr({isUnfolded:e,onToggle:t})})]},String(d))},Pf=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Mf(t)} №${n}`,body:e.toUpperCase()}),Df=(e,t)=>o(Oi,{...e},String(t)),Mf=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",_f=[];const Af=async e=>{const t=await rt(e,{method:"GET"});return Array.isArray(t)?t:_f},zf={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Ff={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},Ef=d((({descriptionData:e,className:t})=>{const[n]=Ph(),a=n?.code??"000",{data:l,isLoad:i}=function(e){const{data:t,error:n}=jn(`/api/v1/atms?regionCode=${e}`,Af);return{data:t||_f,isLoad:!t&&!n}}(a);return o(Zr,{className:t,filterItems:Vf,data:l,isLoad:i,initFilterState:zf,renderCard:Rf,getBalloon:Pf,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Vf=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),a=n.filter((e=>e.startsWith("terminalType"))),l=n.filter((e=>!a.includes(e)));return e.filter((e=>{const t=l.every((t=>Ff[t](e))),n=!a.length||a.some((t=>Ff[t](e)));return t&&n}))},Of=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Me,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Lf({workScheduleDescription:t})}),o(Ei,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Vi,{isUnfolded:e,children:Lf({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>sr({isUnfolded:e,onToggle:t})})]},String(n)):null,Lf=({workScheduleDescription:e})=>c("div",{children:[c(qi,{className:"flex",children:[o(Oi,{label:"Операции для физических лиц",children:o(Me,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Oi,{label:"Операции для физических лиц",children:o(Me,{children:"Оформление и обслуживание банковских карт"})}),o(Oi,{label:"Операции для физических лиц",children:o(Me,{children:"Инвестиционное и накопительное страхование"})}),o(Oi,{label:"Операции для физических лиц",children:o(Me,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Oi,{label:"Режим работы",className:"max-w-none",children:o(Me,{children:e})})]}),jf=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),$f={branches:[],remoteWorkplaces:[]};const qf=async e=>await rt(e,{method:"GET"})||$f,Uf=d((({className:e})=>{const[t]=Ph(),n=t?.code??"000",{data:a,isLoad:l}=function(e="000"){const{data:t,error:n}=jn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,qf);return{data:t||$f,isLoad:!t&&!n}}(n);return o(Zr,{className:e,data:a?.branches,isLoad:l,remoteWorkplaces:a?.remoteWorkplaces,renderCard:mr,renderRemoteWorkplaceCard:Of,getBalloon:hr,getBalloonRemoteWorkplaces:jf,title:`Офисы филиала ${t?.name}`})})),Wf=d((({data:e,className:t,...n})=>{const a=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===a?o(Uf,{}):o(Ef,{descriptionData:e})})})),Hf=d((({className:e,title:t,description:n="Блок в разработке...",...a})=>c(g,{className:u("box-border",e),...a,children:[o(k,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),Yf="hidden sm:flex absolute z-40 top-10",Kf=ht((({className:e="",padding:t,slides:n=[],...l})=>{const[i,r]=a(0),[s,d]=dc({itemCount:n?.length||0});return c(g,{className:u("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...l,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(Xe,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...l})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(Jo,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(Gf({activeSlideIndex:i,onClick:r}))}),d.canScrollLeft?o(gc,{className:u("left-6",Yf),onClick:d.scrollLeft}):null,d.canScrollRight?o(fc,{className:u("right-6",Yf),onClick:d.scrollRight}):null]})]})})),Gf=({activeSlideIndex:e,onClick:t})=>({nav:n},a)=>{const l=a===e,i=l?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=l?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=l?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"aria-label":n?.title,className:u("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(a))},Xf=d((({address:e,email:t,telephone:n,button:a,className:l="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",l),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Oe(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Jf({__html:i,richVersion:r}):null,Zf({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Zf({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Zf({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?Le([a]):null]})]}))),Jf=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),Zf=({label:e,data:t,iconName:n,dataColor:a=""})=>t?c("div",{className:"flex gap-s",children:[o(W,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Me,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Me,{size:"text-xl",color:a,children:t})]})]}):null,Qf=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Pe,{__html:t,richVersion:n})})})),ex=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:a,labelIcon:l})=>o(kc,{tag:"button",className:u("border-none bg-transparent items-center group/button",l?.icon?"py-xs":"py-lg"),onClick:a,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?o(Me,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),tx=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",nx=(e=!1)=>e?"MinusIcon":"PlusIcon",ax=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",lx=ht((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:a="Развернуть",labelIcon:l,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=Ce();return o(g,{className:u("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(Ei,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Vi,{className:u("gap-lg",tx(m)),isUnfolded:e,children:P({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ix({foldButtonVersion:r,label:a,labelIcon:l,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),ix=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:a,isUnfolded:l,onToggle:i,isMobile:r=!1})=>{const s=t||(l?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?ax(e):nx(e))(l,r);return"accordion"===e?o(ex,{label:s,labelIcon:n,labelIconBgVersion:a,icon:c,onToggle:i}):o(Sc,{label:s,icon:l?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},rx=d((({name:e,text:t,value:n,checked:a,onChange:l,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:u(Wt.split(" ").filter((e=>"rounded"!==e)),Zn,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:a,onChange:e=>l?.(e.target.value),role:"radio"}),t?o(Me,{color:"text-primary-text",children:t}):null]})}))),sx=d((({className:e=""})=>{const[t,n]=a("option2"),l=i((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(rx,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:l}),o(rx,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:l})]})})),ox=d((({data:e,fieldLabel:t,fieldValue:n,selected:a,placeholder:l="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===a));return o(cn,{options:s,label:r,placeholder:l||a,onChange:e=>i(e.key),value:c})})),cx=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:a=[],selectedBranch:l,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(ox,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(ox,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:l,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),dx=["От 1 дня","До 365 дней"],mx=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Me,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(ha,{min:1,max:365,value:e,items:dx,onChange:t})]}))),ux=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:a=[],selectedBoxSize:l,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(ox,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(ox,{data:a,fieldLabel:"safeBoxCasesSize",selected:l,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),hx=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:a,days:l,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(cx,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:px(m)}),o(mx,{days:l,setDays:e=>m({days:e})}),o(ux,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:gx(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(sx,{}),o(ye,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),px=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},gx=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},fx=d((({days:e,tariffs:t=[]})=>{const n=bx(e,t),a="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[xx("Аренда за",e),xx("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:a})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:a})})]})]})})),xx=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),bx=(e,t)=>{const n=yx(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},yx=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},vx=(e,t)=>e.find((e=>e.branchCode===t)),Nx=d((e=>{const{regions:t,data:n,branches:a,onChange:i,onClick:r}=e;l((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=vx(a,n.selectedBranch),d=wx(s?.safeBoxCaseVolumes),m=Cx(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=kx(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(hx,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:i}),o(fx,{days:n.days,tariffs:u})]})})),wx=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Cx=(e,t)=>e?.find((e=>e.volume===t)),kx=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Sx=[];const Tx=async e=>await rt(e,{method:"GET"})||Sx,Ix=d((({title:e,footnote:t,className:n="",...l})=>{const[r,s]=a(!1),d=i((()=>s((e=>!e))),[]),[m,u]=a({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=Ai(),p=Bx(m.selectedRegion,h),f=function(e){const{data:t}=jn(e?`/api/v1/safeboxes?regionCode=${e}`:null,Tx);return t||Sx}(p),x=i((e=>u((t=>({...t,...e})))),[u]),b=(y=vx(f,m.selectedBranch)||f,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...l,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Nx,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Dr,{points:b,className:"h-[640px]"}):null]})})),Bx=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Rx=e=>e<4?"w-72":"w-52",Px={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"},Dx=d((({buttons:e,className:t="",description:n,showLines:a=!0,steps:l=[],stepVersion:i="gray",title:r,version:s="primary",...d})=>{const m=l.length>3,h=Px,p=(e=>e?"":"opacity-0")(a),f=Ce();return c(g,{className:u("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(k,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:Hc(f)}),l?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:u("flex items-center",m?"px-16":"px-24"),children:Mc(o("div",{className:u("h-0.5 w-full bg-secondary-light flex-1",p)}))(l.map(Mx(h,m,i)))}),o("div",{className:u("flex justify-between",m?"gap-x-s":"gap-x-20"),children:l.map((x={styleMap:h,version:s},(e,t,n)=>{const{styleMap:a,version:l}=x,{label:i,description:r,button:s,isDotted:d}=e;return c("div",{className:u("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",Rx(n.length)),children:[c("div",{className:"space-y-xs",children:[i?o(Me,{size:"text-h6",align:"text-center",children:i}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:a.description,children:r}):null,o(Pe,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(ye,{className:"box-border py-s w-full max-w-60 mt-auto",version:l,...s,children:s?.text}):null]},String(t))}))})]}):null,Le(e)]});var x})),Mx=(e,t,n)=>({icon:a},l)=>{const i="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${_x(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:Oe(a)?o(ne,{image:{...a,iconVersion:a?.iconVersion||i},width:"48",height:"48"}):o("span",{className:u("text-h4","transparent"===n?e.iconText:(r=n,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:l+1})},String(l));var r},_x=e=>e?"h-16 w-16":"h-24 w-24",Ax=d((()=>o("div",{className:"hidden",role:"none"}))),zx="hidden sm:flex absolute z-40",Fx={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Ex=d((({className:e,items:t=[],activeItem:n,onChange:a,tabsType:i="default"})=>{const[r,s]=dc({itemCount:t?.length||0});return l((()=>Vx(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(Jo,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Fx[i].item,gap:Fx[i].gap,children:t.map(Sf(n,a,i))}),s.canScrollLeft?o(gc,{className:u("left-6",zx,Fx[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(fc,{className:u("right-6",zx,Fx[i].buttonTop),onClick:s.scrollRight}):null]})})),Vx=(e,t,n)=>{const a=t.findIndex((e=>e===n));e&&a>0&&e.scrollTo({left:e?.children[a]?.offsetLeft,behavior:"smooth"})},Ox={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},Lx=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(Ox[t].wrapper,e),children:o(Ex,{className:Ox[t].component,tabsType:t,...n})}):null,jx=ht((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=$x(n??{}),p=D(),f=t.every((e=>"link"===e?.type)),x=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=a(Wx(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));l((()=>{const e=p.query[h]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[h])):w;v(-1===e?0:e)}),[b,w,h]);const C=Ux(x[y],y),k=i((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(h,e?.tabName??String(t)):n.delete(h),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:u({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[Lx({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:qx(t,x),activeItem:N,tabsType:r,onChange:k}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>R(t,{...m?.options,slotName:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Ux)?.filter(Boolean)||[]}),$x=({__id:e,anchor:t})=>t??e??"tabs",qx=(e,t)=>t?.length?t:e,Ux=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Wx=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Hx={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Yx=d((({children:e,activeIndex:t,columnWidth:n,version:a="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Hx[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Kx=d((({className:e="",isOpen:t,onClick:n})=>o(ye,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),Gx={Buttons:({buttons:e})=>Le(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Pe,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Me,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Me,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:a,isOpen:l})=>e?o(Kx,{className:"w-fit",isOpen:l,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},Xx=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=a(!0);l((()=>{i===o&&s||m(!0)}),[s,o]);return Jx({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Jx=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in Gx))return null;return o(Gx[n],{...t,...a})},Zx=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:l,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Xx,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:l,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Qx=(e,t)=>140*vp(e.slice(0,t).map((e=>e?.cols?.length??1))),eb=(e,t)=>e?.length>0?o("div",{className:u("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Me,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,tb=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,a]=Dg({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((l=n,(e,t)=>{if(!e?.length)return null;const[n,...a]=e,i=u("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Me,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${Qx(a,l)}px)`},children:a?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Me,{size:"text-xl",children:e.data}):null,e?.cols?eb(e.cols,l):null]},`row${t}`)))})})]},String(t))})),Mg({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var l})),nb=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const a=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Me,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(tb,{rows:t.rowsData})})})]},a)}))}))),ab=(e=!1)=>""+(e?"text-white":"text-secondary-text"),lb=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:a})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:u("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>a(t),children:o(Me,{size:"text-xl",font:"font-light",color:ab(t===n),children:e||t+1})},e)))}):null,t?o(ye,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),ib=ht((({tableSource:e,pdfUrl:t,onClick:n})=>{const l=e?.tableData,[r,s]=a(0),d=i((e=>s(e)),[]),m=l?.[r]?.items??[],u=l?.map((e=>e.currency??""));return c("div",l?{className:"bg-white z-10",children:[o(lb,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(nb,{activeTabIndex:r,items:m}),o(Kx,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Me,{size:"text-h6",children:"Данных нет"}),o(Kx,{onClick:n,isOpen:!0})]})})),rb=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:u("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(ib,{...t,onClick:n})}):null]}))),sb=d((({row:{header:e,data:t},activeIndex:n,rowIdx:l,...r})=>{const[s,d]=a(void 0),m=i((e=>d(e)),[]),[h,p]=a(void 0),g=i((e=>p(e)),[]);return c(rb,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:u("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Me,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Yx,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Zx,{cells:e,rowIdx:l,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),ob=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,Mg({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),cb=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:l,hiddenRowsNum:i=0,...r})=>{const s=l?.map((({data:e})=>e))||[],d=a?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,p]=Dg({itemCount:m,visibleItemCount:2}),f=(d||[]).map(((e,t)=>o(sb,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,b]=i>0?[f.slice(0,-i),f.slice(-i)]:[f,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:i>0?o(Ei,{renderFoldableSection:({isUnfolded:e})=>c(ob,{controls:p,children:[x,o(Vi,{isUnfolded:e,children:b})]}),renderFoldButton:Tc}):o(ob,{controls:p,children:f})})]})})),db=d((({className:e="",title:t,description:n,iconVersion:a,__html:l,richVersion:i,...r})=>c(g,{className:u("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===a?mb():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Me,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?ub(n):null,l?o(Pe,{richVersion:i,__html:l}):null]})]}))),mb=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),ub=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),hb=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Me,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Me,{size:"text-h2",children:n})}):null]}))),pb=d((e=>{const{prefix:t,unit:n,suffix:a,...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(hb,{prefix:t,unit:n,suffix:a})})})),gb=ht((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:a=!0,version:l="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=D();return o(g,{className:u("relative flex flex-col",Bg[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:l,isTheme:i,...c,children:P({...c,extraProps:{className:u("w-full",Wo(r)),...Ig(a)}})})}),{childrenTypes:[]}),fb=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",xb=d((({className:e,title:t,url:n,previewImg:a,...l})=>{const i=D();return c(g,{className:e,defaultPadding:fb(e),...l,children:[o(k,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:q(i)(a?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:q(i)(n)})}):null]})})),bb={AdTile:gt,ApplicationForm:Fs,ApplicationLeadForm:Vo,ApplicationStatus:jo,BankAccountFiltration:Uc,BenefitsBlock:Gc,BonusBenefitsBlock:ed,ButtonsBlock:nd,CalculatorBonus:xd,CalculatorBusinessDeposit:Ad,CalculatorCredit:Gd,CalculatorDeposit:hm,CalculatorRefinancing:Nm,CardTransfer:Bm,Carousel:Fm,CarouselCard:Lm,CarouselCatalogCard:$m,CarouselLinks:Wm,CarouselRecommendationCard:Qm,CarouselTariffsCard:nu,ContactsBlock:lu,CreditCardForm:_u,CreditForm:ih,DepositFiltration:dh,Depository:Th,ErrorBlock:Bh,ExchangeRateTile:tp,Footer:zp,GracePeriod:Fp,GrantSupport:Lp,Header:kg,Headline:k,HorizontalLayout:Rg,ImgBlock:Pg,InsuranceAmountBlock:Eg,InvestmentInfo:jg,LinkDocs:tf,MobileAppTile:rf,MortgageFiltration:Bf,OfficesAtmsMap:Wf,Placeholder:Hf,ProductBlock:pt,ProductGallery:Kf,RepresentativeOfficeInfo:Xf,RichTextBlock:Qf,RollupItem:lx,SafeDepositRental:Ix,StepsBlock:Dx,StickyBottomMenu:Ax,TabsLayout:jx,TariffsTable:cb,TextBlock:db,UnitBlock:pb,VerticalLayout:gb,Video:xb},yb=me((()=>{l((()=>{Tt()}),[]);const e=At();jt(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const a=JSON.parse(n?.dataset?.aspects??"[]");kt({aspectsAttributes:a,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),vb="cookie",Nb=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=Lt();xp((()=>{globalThis.localStorage?.getItem(vb)||n()}),[],3e3);const l=i((()=>{globalThis.localStorage?.setItem(vb,"true"),a()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Pe,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(hl,{className:"bg-main-gray rounded-md w-11 h-11",onClose:l})})]})}):null}));function wb(e){throw new Error(e)}const Cb=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=a(e),l=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:l,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(n),o()}),[n,e]),d=i((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return l((()=>ce.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:wb(e)}}))),[c,d]),n},kb=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=Cb({onCloseAll:e,onClose:t}),{close:a}=de(),r=i((({key:e})=>{"Escape"===e&&a()}),[]);return jt(globalThis.document,"keydown",r),l((()=>{n.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[n]),n.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},a)=>o("div",{className:u("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:a!==n.length-1}),children:e},String(t||a))))}):null})),Sb=d((()=>{const[e,t]=a(null),n=i((()=>{t(null)}),[]);l((()=>ce.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:wb(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return jt(globalThis.document,"keydown",r),e?o("div",{className:u("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Tb="header",Ib="footer",Bb="sticky-footer",Rb={},Pb=d((({className:e,data:t=Rb,blocksRegistry:n,blockDecorator:a})=>{const{slots:l,blocks:i,fallback:r,...s}=t,d=ut(s,r);yb();const m={key:"",page:{slots:l,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:a,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:u("@container relative",t.style,e),children:[l?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:R(l?.header,{...m,slotName:Tb})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[P({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),R(l?.footer,{...m,slotName:Ib})]})]}),l?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:R(l?.["sticky-footer"],{...m,slotName:Bb})}):null,o(kb,{}),o(Sb,{}),o(Nb,{__html:d?.cookieContent?.__html})]})}));Object.assign(Pb,{childrenTypes:[],slots:()=>[Tb,Ib,Bb]});e.Blocks=bb,e.ContentPage=Pb,e.handlerDecorator=me,e.joinList=Mc,e.packageVersion="0.14.654",e.projectSettings=_,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=D,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),a=n("useState"),l=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:a,...l}=t||{},i=n?.slots?.default,r=a||i&&i();return e(Object.assign(l,r&&{children:r}),n)}return t.inheritAttrs=!1,t},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:a="p-xl",padding:l,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:u("@container font-sans",{group:m},p[t],l||a,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:a,children:l})=>o(n,{role:"heading",className:u("font-sans m-0",v[t],e),children:a||l}))),w=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),C={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},k=d((({className:e,version:t="",headlineVersion:n="XL",title:a,description:l,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=C[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[a?o(N,{className:u("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:a}):null,l?o(w,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...p,children:l}):null]})})),S=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),T=[];function I(e,t,{className:n,...a}={}){const{key:l,blockDecorator:i=S,blocksRegistry:r={},ancestors:s=T}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...a},l):null}},l)}const B=[],R=(e,{key:t,ancestors:n=B,slotName:a=null,extraProps:l,renderProps:i=I,...r})=>{const s=l?(e,t)=>I(e,t,l):i;return(e||[]).map(((e,l)=>s(e,{...r,key:`${t||e.type}-${l}`,ancestors:r.parent?[...n||B,[r.parent,a]]:n},l)))};function P({block:e,options:t,children:n,extraProps:a,renderProps:l}){return n||(e&&t?R(e.blocks,{...t,parent:e,extraProps:a,renderProps:l}):null)}function D(){return D._impl()}D._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),D.setup=e=>{D._impl=e};const M=["CDN","BASE_PATH"],_=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return M.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),A=e=>Boolean(e?.includes(":")),z=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),F=e=>Boolean(e?.startsWith("#")),E=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),V=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),O=(e,t)=>!(!e||!t)&&(!!e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var L=Object.freeze({__proto__:null,isURL:A,isLocalURL:z,isHash:F,withoutQuery:E,joinPath:V,hasPrefix:O});const j="/api/",$=`${j}v1/storage`,q=e=>(t,n)=>{if([!t,A(t),F(t),[_.CDN,j].some((e=>O(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${$}/${t}/attachment`;const a=t?.startsWith("/");return V(O(t,n)?"":n,a?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},U={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:a=`Иконка ${n}`,title:l=a,iconVersion:i="color",width:r,height:s})=>{const d=D(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,h=q(d)(V(_.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:a,title:l,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(K,{className:e,children:c("svg",{className:u(Y(r),U[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[l?o("title",{children:l}):null,a?o("desc",{children:a}):null,o("use",{href:h,xlinkHref:h})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},Y=e=>e?"":"w-full h-full",K=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),G=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function X(e=""){try{return new URL(e).pathname}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":X(G.SITE_URL);return t&&!A(t)?q(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const a=D();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:l},i)=>o("source",{srcSet:J(a)(e),type:te(n),media:l?`(max-width: ${l}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(a)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:u("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),te=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:n="",...a})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...a}):o(Q,{className:e,imageClassName:n,image:t}):null)),ae={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},le="bg-main-divider text-main-disabled",ie={primary:le,secondary:le,white:le,link:"",transparent:"",gray:le,"":""},re="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?ae[n]:"",t?"rounded-full":"rounded-md",e].join(" ");const ce=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}},de=()=>({open:(e,t={})=>ce.fire("dialog",{type:"open",dialog:e,...t}),close:()=>ce.fire("dialog",{type:"close"}),closeAll:()=>ce.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function ue(){const e=X(G.SITE_URL),t=D(),{closeAll:n}=de();return e=>{const n=q(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:me(a({...e,href:n}))}};function a({href:a,target:l,onClick:i}){return r=>{i?.(r),he(a,l,e)||(n(),r?.preventDefault(),t.push(((e,t="")=>e?.replace(t,"")||"/")(a,e)))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const he=(e,t,n)=>{if(!z(e,t))return!0;const a=G.SUB_PORTALS?.split(",");return!!a?.some((t=>O(e,t)))||!O(e,n||"/")},pe=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},ge=d((e=>{const{text:t,aboveText:n,appendLeft:a,appendRight:l,version:i="primary"}=e,r=xe(e)&&"hidden lg:block";return c("div",{className:u(fe(e),"flex gap-xs"),children:[a?o("div",{className:u(r,se[i]),children:a}):null,xe(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,l?o("div",{className:u(r,se[i]),children:l}):null]})})),fe=e=>{const{version:t,aboveText:n,rounded:a}=e;if("link"===t)return"";const l=""+(n?"py-2.5 px-9":"py-4 px-9");return u("group/btn items-center justify-center",xe(e)?l:"h-12 w-12 m-auto",{"rounded-full":a})},xe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),be=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ye=d((({disabled:e,children:t,method:n="LINK",href:a,...l})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:a,pathname:l,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[a,l].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:a}),s=ue()({onClick:r,href:a,...l}),c=t??o(ge,{...s});return o(e?Ne:ve,{...s,children:c})})),ve=d((({className:e="",href:t,rel:n,target:a,ariaLabel:l,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:u})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:a,"aria-label":l||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...pe(d),children:m}))),Ne=d((({className:e,ariaLabel:t,version:n,rounded:a,children:l})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:be({className:e,rounded:a,version:n}),children:l})));function we({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:a=!1}){if(!n)return null;const l="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(a?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:u(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),o(ye,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const Ce=()=>{const[e,t]=a(false);return l((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",n)}}),[]),e},ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Se=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Te=d((({className:e,version:t="primary",defaultPadding:n,padding:a="",title:l,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=Ce(),v=D(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,C=f&&!y;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",a||n,e),children:[C&&we({version:t,handleClick:N,text:w}),l?o("div",{className:"relative h-full",children:l}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Se(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[h,x]}),Be(P({...b,extraProps:{className:"@container-normal"}})),Se(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Ie(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Ie=e=>u(e?"row-span-2":"@xl:row-span-2"),Be=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Re=(e,t="normal")=>e?.icon||e?.src?o("div",{className:u("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pe=d((e=>{const{__html:t="",richVersion:n="",itemSize:a="list-m",isDotted:l=!0}=e,i=l?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(n,a,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),De=(e,t)=>e?o(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Me=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),_e=(e,t)=>e?o(Me,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ae=(e,t)=>["label"in e?_e(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:De(e.description,t)},String(t)):null,"__html"in e?o(Pe,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:u("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Re(n.icon,t):null,o("div",{children:Ae(n)})]}))),Fe=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:u("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(ze,{benefitsVersion:t,...e},String(n))))}):null)),Ee=d((({className:e,benefits:t})=>t?.length?o("div",{className:u("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Ae)}):null)),Ve=d((({isTabularBenefits:e,...t})=>o(e?Ee:Fe,{...t}))),Oe=e=>Boolean(e?.src||e?.icon),Le=(e,{className:t,buttonClassName:n,isVertical:a}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",a?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(je(n))}):null,je=(e="")=>(t,n)=>{const{text:a,icon:l,iconRight:i,version:r,...s}=t||{},c=$e(l,r),d=$e(i,r);return a||l?.icon?o(ye,{className:u("basis-full @lg:basis-auto",e),appendLeft:qe({...l,iconVersion:c}),appendRight:qe({...i,iconVersion:d}),version:r,text:a,...s},n?String(n):""):null},$e=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},qe=e=>Oe(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ue=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),We=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(He)}):null)),He=({label:e,amount:t,unit:n},a)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Me,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ue(2)(t)," ",n||"₽"]}):null]},String(a)),Ye=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ke)}):null)),Ke=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Me,{size:"text-m",font:"font-light",children:e})},String(t)),Ge={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Xe=d((({className:e,padding:t,defaultPadding:n,title:a,description:l,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:C=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(ne,{image:y}):null,R=o(k,{title:a,description:l,headlineVersion:i,align:r,isEmbedded:!0}),P=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Te,{className:e,padding:t,defaultPadding:n,...g?{title:R}:{insetTitle:R},...Je(B,N),isImageSecondary:C,imageAlign:v,isImageAlwaysOnRight:w,buttons:Le(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(Ve,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,h?o(Pe,{richVersion:p,__html:h,isDotted:m,itemSize:Ge[i]}):null,T,f?.length?o(We,{priceList:f}):null,Ze(x)]})})})),Je=(e,t)=>t?{rightImage:e}:{leftImage:e},Ze=e=>e?.length?o(Ye,{tags:e}):null,Qe=e=>Boolean(e&&Array.isArray(e)),et=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),tt=(e,t)=>{return n=e,Boolean(et(n)&&"string"==typeof n.$ref)?t.ref(e):et(e)?t.record(e):Qe(e)?t.array(e):t.scalar?t.scalar(e):e;var n},nt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(at,e),at=(e,t)=>e&&t?et(e)?e[t]:Qe(e)?e[parseInt(t,10)]:e:e,lt=(e,t)=>tt(e,{ref:({$ref:e,...n})=>lt(e?nt(t(e),e):n,t),record:e=>Object.entries(e).map((([e,n])=>({[e]:lt(n,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>lt(e,t)))}),it=(e,t,n=[])=>{tt(e,{ref:e=>t(e.$ref,n),record:e=>{for(const a in e)it(e[a],t,[...n,a])},array:e=>{for(let a=0;a<e.length;a++)it(e[a],t,[...n,a])}})};async function rt(e,t){try{return e?await st(e,t):null}catch(e){console.error(e)}return null}const st=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),ot=e=>[...new Set(e)],ct={},dt=["/portal-resources"],mt=(e,t)=>lt(e,(e=>t?.[e])),ut=(e,t)=>{const n=(e=>{const t=[];return it(e,(e=>t.push(e))),t})(e),[i,r]=a({});return l((()=>{n.length&&(async e=>Object.fromEntries((await Promise.allSettled(ot(e).filter((e=>!dt.some((t=>e.startsWith(t))))).map((async e=>[e,ct[e]||=await st(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(n).then(r)}),[n.join()]),n.length?mt(e,{...t,...i}):e};function ht(e,t={}){const n=d((t=>{const n=ut((({block:e,options:t,className:n,defaultPadding:a,padding:l,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const pt=ht((({className:e,padding:t,defaultPadding:n,...a})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...a,children:o(Xe,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...a})})),{childrenTypes:["UnitBlock"]}),gt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>ft(0,t?.length)),[t]),a=t?.[n];return a?o(pt,{suppressHydrationWarning:!0,...a,...e}):o(g,{...e,children:o(f,{})})})),ft=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),xt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),a=String(e.getMonth()+1).padStart(2,"0"),l=String(e.getFullYear());return t?`${l}-${a}-${n}`:`${n}.${a}.${l}`}},bt=e=>e?.replace(/[^+\d]/g,"");const yt=e=>e?{phone:bt(e)}:{},vt=(e,t="birthday")=>e?{[t]:xt(e)}:{},Nt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),wt=(e,t=!0)=>({[t?"email":"mail"]:e}),Ct=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:bt(e)}:{},kt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:a,params:l}of e)t[a??""]?.(n,l)},St="rshb-query-params";function Tt(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(St)||"";return e&&globalThis.sessionStorage?.setItem(St,e),e}function It(e){if(!e)throw new Error("Value should be fulfilled");return e}const Bt=e=>t=>{const[,n]=It(e.find((([e])=>e(t))));return n(t)},Rt=e=>Bt(e.map((([e,t])=>[e,()=>t])));Rt.if=e=>new Pt(void 0,e);class Pt{parent;predicate;unit;get entry(){return[It(this.predicate),It(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Pt(this,e)}then(e){return new Pt(this.parent,this.predicate,e)}else(e){return Bt([...Dt(this),[()=>!0,e]])}}const Dt=e=>[...e?.parent?Dt(e.parent):[],e.entry],Mt=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=Tt();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,a]of new URLSearchParams(t))n.searchParams.set(e,a);return n.toString()})(t?.href)||t?.href;if(n){_t(t?.target)?.(n)}}},_t=Rt([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function At(){return At._impl()}At._impl=()=>({forwardQuery:Mt}),At.setup=e=>{At._impl=e};const zt=e=>e,Ft=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=a(e),c=i(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return Et(t,n)?t:n}:r(e)):o,[r]);l((()=>{r&&o(r)}),[r]);const[d,m]=a(!1),[u,h]=a({}),p=i(((e,t)=>{const{parse:n=zt,format:a=zt}=t||{};return{value:a(s[e]),isDirty:d||u[e],onChange:t=>{c((a=>({...a,[e]:n(t)}))),h((t=>({...t,[e]:!0})))}}}),[c,d,u]),g=i((e=>{c(e),h(e)}),[]),f=i((()=>{c(e),m(!1),h({})}),[e]),x=i((e=>(e.preventDefault(),t?f():m(!0),n&&n(s,e),s)),[n,s]);return[s,{isDirty:d||Object.values(u).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},Et=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),Vt=d((e=>{const{className:t,title:n,children:a,...l}=e;return o(g,{className:t,defaultPadding:"p-6xl",...l,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,a]})})})),Ot=e=>"OUTSERVICE"===e?"/api/v1/outservice/outserviceregions":void 0;function Lt(e=!1){const[t,n]=a(e),l=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:l,setFalse:r,toggle:s}]}function jt(e,t,n,a){l((()=>{if(e&&n)return e.addEventListener(t,n,a),()=>{e.removeEventListener(t,n,a)}}),[e,t,n])}function $t(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return jt(globalThis.document,"click",n),t}const qt=({label:e,errors:t})=>e&&t?`${e}*`:e,Ut=()=>{},Wt="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",Ht=e=>e?o(Me,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Yt=d((({key:e,className:t="",id:n,name:a,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1,disabled:w=!1})=>{const C=s(null),k=i((e=>{const t=(e.target?.value||"").trimStart();f&&f(t)}),[f]);l((()=>{v&&C.current?.focus()}),[v,C]);const S=g?"pr-3xl":"",T=Kt(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[Ht(d),N?o("textarea",{className:u("block resize-y min-h-24",Gt,T),id:u("textarea",n),name:a||n,placeholder:m,value:h,onChange:k,onFocus:x,onBlur:b,disabled:w},e):o("input",{type:r,className:u("h-14",Gt,S,T),ref:C,id:n,name:a||n,placeholder:m,value:h,onChange:k,onFocus:x,onBlur:b,pattern:y,disabled:w},e)]}),g]})})),Kt=e=>e?Wt:"border-error",Gt="w-full border rounded-md text-primary-text outline-none p-m",Xt=e=>o("div",{className:"h-6",children:e?o(Me,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Jt=e=>e?.value||"",Zt={url:"suggest/address"},Qt={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"},dulSubdivisionCode:{url:"suggest/fms_unit",responseItemHandler:e=>e?.data?.code?.replace("-","")||""},dulIssuedBy:{url:"suggest/fms_unit"},organizationName:{url:"suggest/party"},inn:{url:"suggest/party",responseItemHandler:e=>e?.data?.inn||""},addressRegistration:Zt,addressFact:Zt,organizationAddress:Zt,addressCourier:Zt},en=()=>({open:(e,t)=>ce.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>ce.fire("popup",{type:"update",popup:e,...t}),close:()=>ce.fire("popup",{type:"close"})}),tn=d((({options:e,onChange:t})=>o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,n)=>o("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem",onMouseDown:()=>t(e),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function nn({isOpen:e,value:t,name:n,onChange:c,onDaDataChange:d,daDataQueryPrefix:m}){const u=s(t),h=s(t),[p,g]=a([]),f=en(),x=Qt[n],b=i((()=>{h.current=t,f.close()}),[t]),y=i((e=>{b(),h.current=e.processedValue,c&&c(e.processedValue),d&&d(e)}),[b,c]),v=s(null),N=r((()=>async e=>{if(!x)return;const t=await(e=>{const{url:t,query:n,queryPrefix:a,requestData:l={},responseItemHandler:i=Jt}=e,r=(s=i,e=>(e?.suggestions||[]).map((e=>{const t=s(e);return{...e,processedValue:t}})));var s;const o=`${a?`${a}, `:""}${n}`;return fetch(`/api/v1/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...l,query:o})}).then((e=>e.json())).then(r)})({url:x.url,responseItemHandler:x.responseItemHandler,requestData:{...x?.requestData},query:e,queryPrefix:m});t?.length&&g(t)}),[m]),w=r((()=>((e,t=600)=>{let n;const a=(...l)=>{a.dispose(),n=setTimeout((()=>{e(...l)}),t)};return a.dispose=()=>{n&&clearTimeout(n)},a})(N,300)),[N]);return l((()=>{if(!e||!v.current||h.current===t)return void b();const n=v.current,{top:a,left:l,width:i,height:r}=n.getBoundingClientRect();t&&u.current!==t&&(w(t),u.current=t),f.update(o(tn,{options:p,value:t,onChange:y}),{top:a+globalThis.scrollY+r,left:l,width:i})}),[e,p,t,y]),v}const an=d((({className:e,label:t,value:n="",placeholder:a,error:l,errors:r,onChange:s=Ut,onDaDataChange:d,onBlur:m,isTextarea:h,type:p,name:g="",daDataQueryPrefix:f,maxtLength:x,dadata:b=!1,disabled:y=!1})=>{const[v,{setFalse:N,setTrue:w}]=Lt(),C=$t(N),k=i((e=>x?e.length<=x&&s(e):s(e)),[s]),S=nn({isOpen:v&&b,name:g,value:n,daDataQueryPrefix:f,onChange:s,onDaDataChange:d});return c("div",{className:u("shrink-0 w-full",e),ref:C,onBlur:N,onFocus:w,children:[o("div",{ref:S,children:o(Yt,{disabled:y,type:p||"text","aria-label":t,label:qt({label:t,errors:r}),valid:Boolean(!l),value:n,onChange:k,onBlur:m,isTextarea:h,placeholder:ln(a,r,t)})}),Xt(l)]})})),ln=(e,t,n)=>t&&!n?`${e}*`:e,rn=e=>e?.text||e?.key||"",sn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,on=d((({popupRef:e,options:t,value:n,query:a,onChange:l,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:sn(t,a).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),l&&l(e)},children:[o("span",{className:"min-h-6",children:rn(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const cn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:h="",isSearch:p=!1,iconVersion:g="black",onChange:f,disabled:x=!1})=>{const[b,{setFalse:y,setTrue:v}]=Lt(),[N,w]=a(""),C=un(x,n.length),k=b&&!C,S=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:a,onChange:r,onClose:c,iconVersion:d}){const m=en(),u=i((()=>{m.close(),c&&c()}),[c]),h=i((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=$t(u);return l((()=>{if(!e||!p.current)return;const l=p.current,{top:i,left:r,width:s,height:c}=l.getBoundingClientRect();m.update(o(on,{popupRef:g,options:t,value:n,query:a,onChange:h,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,a,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:S,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[Ht(t),c("div",{className:u("relative",k?"z-20":"z-10"),ref:T,children:[c("div",{className:u("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",mn(m,d,C)),onClick:k?S:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:rn(r)||h}),dn(k,g)]}),p&&k?o("div",{className:u("absolute top-0 w-full z-20"),children:o(Yt,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),dn=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),mn=(e,t,n)=>u(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),un=(e,t)=>e||0===t,hn=d((({className:e="",label:t,error:n,errors:a,...l})=>c("div",{className:e,children:[o(cn,{...l,valid:!n,label:qt({label:t,errors:a})}),Xt(n)]}))),pn=e=>!e?.length,gn=e=>t=>n=>e(n)?[]:[t],fn=gn((e=>null!=e&&""!==e)),xn="Некорректно заполненное поле",bn=e=>fn(e??xn),yn=e=>gn((e=>e?.key&&""!==e?.key))(e??xn),vn=e=>gn((e=>"string"==typeof e&&e.length>0&&e.length<=2))(e??xn),Nn=e=>gn((e=>"string"==typeof e&&e.length>1))(e??xn),wn=(e,t)=>gn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(t??xn),Cn=e=>gn((e=>"string"==typeof e&&6===e.length))(e),kn=e=>{return(t=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,gn((e=>"string"==typeof e&&t.test(e))))(e);var t},Sn=gn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Tn=e=>{const t=String(e).replace(/[^0-9]+/g,"");if(11===t.length){let e=0;for(let n=0;n<9;n++)e+=parseInt(t.charAt(n))*(9-n);return e>101&&(e%=101),100!==e&&101!==e||(e=0),e===parseInt(t.substr(9))}return!1},In=e=>Boolean("0"===e.qc&&"0"===e.qcComplete&&"2"===e.qcHouse),Bn=()=>gn(In)("Укажите регион, город/населенный пункт, улицу, дом, квартиру"),Rn={typeForm:bn(),surname:Nn("Укажите свою фамилию"),name:Nn("Укажите своё имя"),middleName:Nn("Укажите своё отчество"),region:yn(),addressBranch:yn(),phone:kn("Укажите номер телефона"),secondaryPhone:kn("Укажите номер телефона"),organizationPhone:kn("Укажите номер телефона"),birthday:bn("Укажите дату рождения"),birthPlace:bn("Укажите место рождения"),education:bn("Выберите ваше образование"),housing:bn("Выберите тип жилья"),employment:bn("Выберите информацию о трудоустройстве"),organization:bn("Выберите тип организации"),amountWorkers:bn("Выберите информацию о количестве сотрудников"),employerActivities:bn("Выберите вид деятельности организации"),employerOrganization:bn("Выберите вид организации"),positionOrganization:bn("Выберите вашу должность"),dulSerie:(Pn="Укажите серию паспорта",gn((e=>"string"==typeof e&&4===e.length))(Pn)),dulNumber:Cn("Укажите номер паспорта"),dulIssueDateField:bn("Укажите дату выдачи паспорта"),dulSubdivisionCode:Cn("Укажите код подразделения"),dulIssuedBy:bn("Укажите организацию, выдавшую паспорт"),email:(e=>gn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(e))("Укажите электронную почту"),fullName:Nn(),inn:(e=>gn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),legalForm:bn("Укажите ОПФ"),organizationName:bn("Укажите наименование организации"),generalSeniority:vn("Укажите количество лет стажа"),lastJobExperience:vn("Укажите стаж на последнем месте работы"),experience5Years:vn("Укажите общий стаж за последние 5 лет"),jobsNumber:vn("Укажите количество мест работы за последние 5 лет"),beginDate:bn("Укажите дату заключения трудового договора"),addressFact:Bn(),partnerComments:bn(),collectionCount:bn(),comment:bn(),acquiringType:yn(),feedbackMethod:yn(),serviceType:yn(),serviceDirection:yn(),meetingDay:bn(),product:bn(),localities:bn(),consentDataProcessing:Sn,annualRevenue:bn(),consentToReceiveMaterials:Sn,processPersonalDataFlg:Sn,consentProviderFlg:Sn,consentPfrFlg:Sn,consentOthersFlg:Sn,consentInformFlg:Sn,familyStatus:bn("Выберите семейное положение"),children:wn(2,"Укажите количество детей"),familyMembers:wn(2,"Укажите количество членов семьи"),dependents:wn(2,"Укажите количество иждивенцев"),totalIncome:wn(19,"Укажите среднемесячный доход от основной зарплаты"),expenses:wn(10,"Укажите сумму обязательных выплат"),snils:(e=>gn(Tn)(e))("Некорректный номер СНИЛС"),conscription:bn(),armyIdFlg:Sn,sex:bn("Укажите свой пол"),addressRegistration:Bn(),organizationAddress:Bn(),deliveryDate:bn("Укажите дату доставки"),addressCourier:Bn(),participantDateRegistration:bn("Укажите дату регистрации"),retirementIncome:bn(),otherIncome:bn(),mandatoryIncome:bn(),otherPayments:bn(),disablePeopleFlg:bn(),bankruptcyFlg:bn(),shareholderFlg:bn(),legalEntityName:bn(),bankEmployeeCode:bn(),partInBusiness:bn(),regionRetail:yn("Выберите филиал банка"),addressRetail:yn("Выберите адрес банка"),addressMatch:bn(),codeWord:(e=>gn((e=>"string"==typeof e&&e.length>=3&&e.length<=21&&/^[\u0400-\u04FF\d]+$/u.test(e)))(e??xn))("Необходимо ввести кодовое слово латиницей"),currency:bn(),paymentSystem:bn(),cardCategory:yn(),confirmationIncome:bn()};var Pn;const Dn=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>Boolean(e?.required))));return Object.fromEntries(t.map((e=>[e,Rn?.[e||""]])))},Mn=(e,t)=>{const{value:n,isDirty:a}=e,l=a?t(n):[];return{...e,errors:l,error:l[0]}},_n=(e,t,n=!1)=>n?Mn(e,t):e,An=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],zn=d((({field:e,input:t})=>o(hn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:An,..._n(e("acquiringType"),Rn.acquiringType,t?.required)}))),Fn=(e="")=>Boolean("trade"===e||"all"===e),En=e=>null!=e,Vn=new Map,On=e=>Boolean(e?.every((e=>Array.isArray(e)?On(e):!e||"string"==typeof e))),Ln=e=>On(e)?e.toString():"";function jn(e,t,{fallback:n,cache:i}={}){const s=r((()=>$n(e)),[e]),[o,c]=a(void 0),[d,m]=a(void 0);l((()=>{if(!s.some(En))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=Vn)=>n=>{const a=Ln(n),l=t.get(a);if(a&&En(l))return l;const i=e(...n);return a&&En(i)&&t.set(a,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function $n(e){return Array.isArray(e)?e:e instanceof Function?$n(e()):[e]}const qn=[];const Un=async e=>await rt(e,{method:"GET"})||qn;function Wn(e=!1){const{data:t}=jn("/api/v1"+(e?"/premiumBranchesByRegions":"/branchesByRegions"),st);return Array.isArray(t)?t:[]}const Hn=d((({field:e,input:t,isPremium:n=!1})=>{const a=e("region"),i=a?.value?.key,r=a?.value?.text,s=n?Wn(n)?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=jn(e?`/api/v1/branches?regionCode=${e}`:null,Un);return t||qn}(i)?.filter((e=>e?.address));return l((()=>{""!==a?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[a?.value]),o(hn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),..._n(e("addressBranch"),Rn.addressBranch,t?.required),isSearch:!0})})),Yn=d((({field:e,input:t})=>{const n="addressFact",a=e(n).value,{value:r}=e("addressMatch");l((()=>{r&&e("addressFact")?.onChange?.(e("addressRegistration").value)}),[r]);const s=i((t=>{e?.(n)?.onChange?.({apartment:t?.data?.flat,city:t?.data?.city,district:t?.data?.area_with_type,fullAddress:t?.value,fiasCode:t?.data?.fias_id,house:t?.data?.house,locality:t?.data?.settlement_with_type,okatoRegionCode:t?.data?.okato,postcode:t?.data?.postal_code,region:t?.data?.region,regionCode:t?.data?.region_kladr_id?t?.data?.region_kladr_id.substring(0,2):"",street:t?.data?.house})}),[]),c=i((t=>{e?.(n)?.onChange?.({...e(n).value,fullAddress:t})}),[]);return o(an,{label:"Адрес",disabled:r,..._n(e(n),Rn[n],t?.required),value:a.fullAddress,onChange:c,...t,onDaDataChange:s})})),Kn=(e,t)=>"RETIREE"!==e?.("employment")?.value?.key&&t,Gn=e=>Boolean(e("esiaAccountTypeCd")?.value?.key),Xn=d((({field:e,input:t})=>{const n=t?.name||"addressRegistration",a=e(n).value,l=i((t=>{e?.(n)?.onChange?.({apartment:t?.data?.flat,city:t?.data?.city,district:t?.data?.area_with_type,fullAddress:t?.value,fiasCode:t?.data?.fias_id,house:t?.data?.house,locality:t?.data?.settlement_with_type,okatoRegionCode:t?.data?.okato,postcode:t?.data?.postal_code,region:t?.data?.region,regionCode:t?.data?.region_kladr_id?t?.data?.region_kladr_id.substring(0,2):"",street:t?.data?.house,qc:t?.data?.qc,qcComplete:t?.data?.qc_complete,qcHouse:t?.data?.qc_house})}),[]),r=i((t=>{e?.(n)?.onChange?.({...e(n).value,fullAddress:t})}),[]),s=["addressRegistration"===n,t?.filledByEsia,Gn(e)].every(Boolean);return o(an,{disabled:s,label:"Адрес",..._n(e(n),Rn[n],"organizationAddress"===t?.name?Kn(e,t?.required):t?.required),value:a.fullAddress,onChange:r,...t,onDaDataChange:l})})),Jn=d((({className:e,viewBox:t,fill:n="none",width:a,height:l,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:a,height:l,children:i.map((({d:e,fill:t,...n},a)=>{const l={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:l.stroke,strokeLinecap:l.strokeLinecap,strokeLinejoin:l.strokeLinejoin,strokeWidth:l.strokeWidth,strokeMiterlimit:l.strokeMiterlimit},a)}))}))),Zn="appearance-none w-5 h-5 border-solid flex-none",Qn=[{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"}],ea=d((({className:e,value:t,text:n,disabled:a,isRadio:l,onChange:r})=>{const s=i((e=>{a||(e.preventDefault(),r&&r(!t))}),[r,a,t]),d=l?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Jn,{paths:Qn,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:u("flex items-center relative group/box",na(a)),onClick:s,children:[o("div",{className:u(Zn,"m-0",l?"rounded-full border-2":la(t),!a&&t?"border-primary-main":"border-gray",a?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:aa(l),"aria-checked":Boolean(t),"aria-disabled":Boolean(a),"aria-label":n}),t?d:null,ta(n)]})})})),ta=e=>e?o("div",{className:"ml-s",children:o(Me,{size:"text-l",font:"font-light",children:e})}):null,na=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",aa=(e=!1)=>e?"radio":"checkbox",la=(e=!1)=>u("rounded border",{"bg-primary-main":e}),ia=d((({className:e,text:t,value:n,key:a,disabled:l,error:i,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(ea,{text:t,value:n,disabled:l,onChange:r},a),Xt(i)]}))),ra=d((({field:e})=>o(ia,{text:"Адрес фактического места жительства совпадает с адресом регистрации",..._n(e("addressMatch"),Rn.addressMatch)}))),sa=(e,{normalize:t,format:n})=>{const{value:l,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=a(!1),m=i((e=>{d(!0),r&&r(e)}),[]),u=i((()=>{d(!1),o&&o(t(l)),s&&s()}),[o,l]);return{value:c||!n?l:n(l),onFocus:m,onBlur:u}},oa=(e,t,n)=>Math.max(t,Math.min(e,n));function ca(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function da({list:e=[],min:t,max:n,step:a,value:l=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(l):l,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:u("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:a,value:s,disabled:i,onChange:t=>{const n=ca(t.target?.value),a=e.length?e[n]:n;r&&r(a||0)}})})]})}const ma=1,ua=100,ha=d((e=>{const{className:t,title:n,items:a=[],list:l=[],min:r=(l.length?0:ma),max:s=(l.length?l.length-1:ua),step:d=1,value:m=l[0]||r,disabled:h=!1,onChange:p}=e,g=sa(e,{normalize:(e=0)=>l.length?pa(l)(e):oa(e,r,s),format:Ue()}),f=i((e=>{p&&p(ca(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Me,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:u("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",Wt,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),da({list:l,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),ga(a)]})})),pa=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),ga=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),fa=["От 1 000 ₽","До 1 000 000 000 ₽"],xa=d((({field:e})=>o(ha,{title:"Сумма, ₽",items:fa,min:1e3,max:1e9,...e("amount")}))),ba=e=>{const{data:t,error:n}=jn(`/api/v1/dictionary?dictionaryType=${encodeURIComponent(e)}`,ya);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},ya=async e=>await rt(e,{method:"POST"})||[],va=ht((({field:e,source:t,label:n,fieldName:a,input:l})=>{const i=t&&t?.map((e=>({key:e.key||"",text:e.value})))||[];return o(hn,{placeholder:"Выберите из списка",label:n,options:i,..._n(e(a),Rn[a],l?.required)})})),Na=d((({field:e,input:t})=>{const{data:n}=ba("EMPLOYEES_NUMBER");return o(va,{field:e,source:n,label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),wa=d((({field:e,input:t})=>o(an,{label:"Годовая выручка, ₽",..._n(e("annualRevenue"),Rn.annualRevenue,t?.required)}))),Ca=d((({field:e})=>o(ia,{text:"Наличие военного билета",..._n(e("armyIdFlg"),Rn.armyIdFlg)}))),ka=d((({field:e,input:t})=>o(an,{label:"Код представителя Банка",placeholder:"Введите код",type:"number",..._n(e("bankEmployeeCode"),Rn.bankEmployeeCode,t?.required),...t}))),Sa=d((({field:e})=>o(an,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),Ta=d((({field:e})=>o(ia,{text:"В отношении меня ведётся производство по делу о банкротстве",..._n(e("bankruptcyFlg"),Rn.bankruptcyFlg)}))),Ia=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:a,currentYear:l,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const u=[];for(let c=0;c<7;c++)if(0===m&&c<t)u.push(o("td",{},`empty-${c}`));else if(d>n)u.push(o("td",{},`empty-${c}`));else{const t=new Date(l,a,d),n=Ba(t,e),c=Ra(t,i,r);u.push(o("td",{children:o("div",{className:Pa(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},Ba=(e,t)=>t&&e.toDateString()===t.toDateString(),Ra=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),Pa=(e=!1,t=!1)=>u("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),Da=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Ma=d((({today:e,currentMonth:t,currentYear:n,min:a,max:l,onDateSelect:s=Ut,setValue:d=Ut})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:u,totalDays:h}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Da.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Ia({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:a,max:l,onDateClick:m})})]})})),_a=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];function Aa(e,t){const n=e.replace(/\D/g,"");if(""===n||e?.length===t.length)return e;const a=[...t],l=a.findIndex(za),i=a.map(((e,t)=>Ea(e)?a.slice(0,t).filter(Ea).length:-1)),r=a.map(((e,t)=>Fa(e)?e:n.charAt(i[t])||e)),s=i.indexOf(n.length-1)+1;return r.slice(0,Math.max(l,s)).join("")}const za=e=>"_"===e,Fa=e=>/\d/.test(e),Ea=e=>za(e)||Fa(e),Va=1940,Oa={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},La=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:i,disabled:r,onChange:d,onClick:m})=>{const h=s(null),[p,g]=a(i||"");return l((()=>{g(i||"")}),[i]),c("div",{onClick:()=>{null!==h.current&&h.current.focus(),m?.()},className:u("relative",n),children:[o("input",{ref:h,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(Aa(t,"__.__.____"))},onBlur:()=>{if(ja(p)){const[n,a,l]=p.split(".");d?.(new Date(Number(l),Number(a)-1,Number(n))),e(Number(a)-1),t(Number(l))}else g(i||"")},disabled:r}),r?null:o(W,{className:"mr-s",...Oa})]})})),ja=e=>{const[t,n,a]=e.split(".");if((e=>Number(e)>=Va&&Number(e)<=(new Date).getFullYear())(a)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(a),Number(n)-1,1);let l=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),l++;if(Number(t)>0&&Number(t)<=l)return!0}return!1},$a=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:a,setSelectedMonth:l,setSelectedYear:i,disabled:r=!1})=>o(La,{onChange:a,disabled:r,onClick:e,value:t&&xt(t),setSelectedMonth:l,setSelectedYear:i,className:u("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),qa=_a.map((e=>({key:e}))),Ua=Array.from({length:(new Date).getFullYear()-Va+1},((e,t)=>Va+t)).reverse().map((e=>({key:String(e)}))),Wa=(e,t)=>{const n=new Date(e,t,1);let a=0;for(;n.getMonth()===t;)a++,n.setDate(n.getDate()+1);return a},Ha=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:a,onChange:l})=>{a&&l?.(new Date(t,n,Math.min(e,a.getDate())))},Ya={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Ka={className:"min-w-32",iconVersion:"black",isBorder:!1},Ga=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:h})=>{const[p,{setValue:g}]=Lt(!1),[f,x]=a(n?.getMonth()||(new Date).getMonth()),[b,y]=a(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:v,handleNextMonth:N,handleSelectMonth:w,handleSelectYear:C,monthsOptions:k,yearsOptions:S,handleChangeVisibleCalendar:T,ref:I}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:a,onYearSelect:l,selectedYear:r,onChange:s,value:o})=>{const c=$t(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?a(n+1):(a(0),l(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?a(n-1):(a(11),l(r-1))}),[n]),handleSelectMonth:i((({key:e})=>{a(_a.indexOf(e));const t=Wa(r,_a.indexOf(e));Ha({maxDateOfMonth:t,selectedYear:r,selectedMonth:_a.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:i((({key:e})=>{l(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:qa,yearsOptions:Ua,ref:c}})({onYearSelect:y,onMonthSelect:x,onShowCalendar:g,selectedYear:b,selectedMonth:f,showCalendar:p,onChange:h,value:n}),B=((e,t)=>{const[n,i]=a(!1);return l((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();i(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(I,370);return c("div",{className:u("space-y-xs",e),ref:I,children:[Ht(t),c("div",{className:"relative",children:[$a({handleChangeVisibleCalendar:T,value:n,valid:r,onChange:h,disabled:m,setSelectedMonth:x,setSelectedYear:y}),p&&!m?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":B}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:v,children:o(W,{...Ya,className:"-rotate-90 cursor-pointer"})}),o(cn,{onChange:w,value:{key:_a[f]},options:k,...Ka}),o(cn,{onChange:C,value:{key:String(b)},options:S,...Ka}),o("div",{className:"my-auto",onClick:N,children:o(W,{...Ya,className:"rotate-90 cursor-pointer"})})]}),o(Ma,{today:n,currentMonth:f,currentYear:b,onDateSelect:h,min:s,max:d,setValue:g})]}):null]})]})})),Xa=d((({className:e,label:t,error:n,errors:a,...l})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ga,{label:qt({label:t,errors:a}),valid:Boolean(!n),...l}),Xt(n)]}))),Ja=d((({field:e,input:t})=>o(Xa,{label:"Дата начала работы на текущем месте",..._n(e("beginDate"),Rn.beginDate,Kn(e,t?.required)),...t}))),Za=d((({field:e,input:t,isRetailForm:n=!1})=>{const{value:a}=e("birthday");return o(Xa,{label:"Дата рождения",..._n(e("birthday"),Rn.birthday,t?.required),error:n&&a&&!Qa(a)?"Допустимый возраст заёмщика - от 23 до 75 лет":""})})),Qa=e=>{const t=new Date,n=new Date(t.getFullYear()-23,t.getMonth(),t.getDate()),a=new Date(t.getFullYear()-75,t.getMonth(),t.getDate());return!(!e||e>n||e<a)},el=d((({field:e,input:t})=>o(an,{label:"Место рождения",..._n(e("birthPlace"),Rn.birthPlace,t?.required),...t}))),tl=d((({field:e,input:t})=>{const{data:n}=ba("CARD_TYPE");return o(va,{field:e,source:n,label:"Категория карты",fieldName:"cardCategory",input:t})})),nl=d((({field:e,input:t})=>o(an,{label:"Количество детей до 18 лет",placeholder:"Введите значение",type:"number",..._n(e("children"),Rn.children,t?.required),...t}))),al=d((({field:e,input:t})=>o(an,{label:"Кодовое слово",..._n(e("codeWord"),Rn.codeWord,t?.required),...t}))),ll=d((({field:e,input:t})=>o(an,{label:"Количество объектов инкассации",type:"number",..._n(e("collectionCount"),Rn.collectionCount,t?.required)}))),il=d((({field:e,input:t})=>o(an,{className:"col-span-2",..._n(e("comment"),Rn.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),rl=d((({field:e,input:t})=>{const{data:n}=ba("INCOME_CERT_UNITED");return o(va,{field:e,source:n,label:"Способ подтверждения дохода",fieldName:"confirmationIncome",input:t})})),sl=d((({field:e,input:t})=>{const{data:n}=ba("MILITARY_STATUS");return o(va,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),ol={processPersonalDataFlg:{text:"Согласие на обработку персональных данных",docId:4},consentInformFlg:{text:"Согласие на информирование о продуктах и услугах Банка",docId:14},consentProviderFlg:{text:"Согласие об использовании простой электронной подписи",docId:5},consentOthersFlg:{text:"Прочие согласия",docId:1},consentPfrFlg:{text:"Согласие на запрос в ПФР",docId:3},consentToReceiveMaterials:{text:"Согласен на получение информационных и аналитических материалов по электронной почте"}};async function cl(e,t,n){const a=await fetch(`/api/v1${e}`,{method:t,headers:{"Content-Type":"application/json",...ml()},credentials:"include",body:n?JSON.stringify(n):null});return dl(a)?a.json():a}const dl=e=>"application/json"===e.headers.get("Content-Type"),ml=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},ul=async(e,t=!1)=>{const n=await(async(e,t=!1)=>{const n=await cl(`/feedback/file?id=${encodeURIComponent(e)}&convertToPngFlg=${t}`,"GET");return await n.blob()})(e,t);return URL.createObjectURL(n)},hl=d((({className:e,onClose:t})=>o("button",{className:u("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(W,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),pl=d((({className:e,head:t,children:n,onClose:a,onClick:l})=>{const{close:r}=de(),s=i((()=>{r(),a&&a()}),[a]);return c("div",{onClick:l,className:u("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(hl,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),gl=async(e,t,n=!1)=>{const a=await ul(t,n);e(o(pl,{className:"my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0",children:n?o("img",{src:a}):o("iframe",{src:`${a}#toolbar=0`,className:"w-full h-[80vh]",id:"iframe-dialog"})}))},fl=d((({className:e,error:t,docId:n,...a})=>{const{open:l}=de(),i=Ce();return c("div",{className:e,children:[c("div",{className:"flex flex-wrap gap-x-m",children:[o(ea,{...a}),n?o(ye,{className:"text-primary-main",onClick:()=>gl(l,n,i),children:o(Me,{children:"Ознакомиться"})}):null]}),Xt(t)]})})),xl=d((({field:e,input:t})=>t&&t.name?o(fl,{text:ol[t.name]?.text,docId:ol[t.name]?.docId,..._n(e(t.name),Rn[t.name],t?.required)}):null)),bl=d((({field:e,input:t})=>{const{data:n}=ba("CREDIT_IN_RSHB");return o(va,{field:e,source:n,label:"Имеет ли юридическое лицо, акционером / участником / членом / пайщиком / \n вкладчиком с долей участия более 20% уставного капитала руководителем, \n которого Вы являетесь, кредит в АО «Россельхозбанк»",fieldName:"creditInRshbCd",input:t})})),yl={horizontal:"@lg:flex-row",vertical:""},vl=d((({label:e,items:t,value:n,className:a,onChange:l,disabled:i=!1,orientation:r="horizontal"})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Me,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:u("flex flex-col gap-s",yl[r],a),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(ea,{isRadio:!0,text:t,value:n===e,onChange:()=>l&&l(e),disabled:i},String(e))))})]}))),Nl=d((({className:e,label:t,onChange:n,error:a,...l})=>c("div",{className:u("shrink-0 w-full",e),children:[o(vl,{label:qt({label:t,errors:l?.errors}),onChange:e=>n&&n(e),...l}),Xt(a)]}))),wl=[{id:"rub",text:"Рубль"}],Cl=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("currency");return o(Nl,{label:"Валюта",orientation:"horizontal",items:wl,value:n,onChange:e=>a?.(e),..._n(e("currency"),Rn.currency,t?.required)})})),kl=d((({field:e,input:t})=>o(Xa,{label:"Дата доставки",..._n(e("deliveryDate"),Rn.deliveryDate,t?.required)}))),Sl=d((({field:e,input:t})=>o(an,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",type:"number",maxtLength:2,..._n(e("dependents"),Rn.dependents,t?.required),...t}))),Tl=d((({field:e,input:t})=>o(Xa,{label:"Желаемая дата встречи",..._n(e("desiredMeetingDate"),Rn.meetingDay,t?.required)}))),Il=d((({field:e})=>o(ia,{text:"Являюсь инвалидом",..._n(e("disablePeopleFlg"),Rn.disablePeopleFlg)}))),Bl=d((({field:e,input:t})=>o(Xa,{label:"Дата выдачи",..._n(e("dulIssueDateField"),Rn.dulIssueDateField,t?.required),disabled:t?.filledByEsia&&Gn(e)}))),Rl=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("dulSubdivisionCode"),l=i((e=>{a?.(e?.data?.code?.replace("-",""))}),[]);return o(an,{disabled:t?.filledByEsia&&Gn(e),label:"Кем выдан",...t,..._n(e("dulIssuedBy"),Rn.dulIssuedBy,t?.required),onDaDataChange:l,daDataQueryPrefix:n})})),Pl=d((({field:e,input:t})=>o(an,{disabled:t?.filledByEsia&&Gn(e),label:"Номер документа",type:"number",maxtLength:6,..._n(e("dulNumber"),Rn.dulNumber,t?.required)}))),Dl=d((({field:e,input:t})=>o(an,{disabled:t?.filledByEsia&&Gn(e),label:"Серия документа",type:"number",maxtLength:4,..._n(e("dulSerie"),Rn.dulSerie,t?.required)}))),Ml=d((({field:e,input:t})=>{const n=i((t=>{e?.("dulIssuedBy")?.onChange?.(t?.data?.name)}),[]);return o(an,{disabled:t?.filledByEsia&&Gn(e),label:"Код подразделения",type:"number",maxtLength:6,...t,..._n(e("dulSubdivisionCode"),Rn.dulSubdivisionCode,t?.required),onDaDataChange:n})})),_l=d((({field:e,input:t})=>{const{data:n}=ba("EDUCATION_LEVEL");return o(va,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),Al=d((({field:e,input:t})=>{const{required:n,...a}=t;return o(an,{label:"Электронная почта",..._n(e("email"),Rn.email,n),...a})})),zl=d((({field:e,input:t})=>{const{data:n}=ba("ORGANIZATION_ACTIVITY_TYPE");return o(va,{field:e,source:n,label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),Fl=d((({field:e,input:t})=>{const{data:n}=ba("ORGANIZATION_KIND");return o(va,{field:e,source:n,label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),El=d((({field:e,input:t})=>{const{data:n}=ba("EMPLOYMENT_INFO_UNITED");return o(va,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),Vl=d((({field:e,input:t})=>o(an,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",type:"number",..._n(e("expenses"),Rn.expenses,t?.required),...t}))),Ol=d((({field:e,input:t})=>o(an,{label:"Стаж",placeholder:"За последние 5 лет",type:"number",maxtLength:2,..._n(e("experience5Years"),Rn.experience5Years,Kn(e,t?.required)),...t}))),Ll=d((({field:e})=>{const{value:t,onChange:n}=e("familyMembers"),a=e("familyStatus")?.value?.key,i="MARRIED"===a?2:1,r=Number(e("children")?.value),s=Number(e("dependents")?.value),c=i+r+s;return l((()=>{e?.("familyMembers")?.onChange?.(c)}),[a,r,s]),o(an,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",disabled:!0,value:t,onChange:e=>n?.(e)})})),jl=d((({field:e,input:t})=>{const{data:n}=ba("MARITAL_STATUS");return o(va,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),$l=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],ql=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Ul=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Wl=d((({field:e,input:t})=>o(hn,{label:"Способ получения ответа",options:Ul,..._n(e("feedbackMethod"),Rn.feedbackMethod,t?.required)}))),Hl=d((({field:e,input:t})=>o(an,{label:"ФИО",..._n(e("fullName"),Rn.fullName,t?.required),...t}))),Yl=d((({field:e,input:t})=>o(an,{label:"Общий стаж",type:"number",maxtLength:2,placeholder:"Количество лет",..._n(e("generalSeniority"),Rn.generalSeniority,Kn(e,t?.required)),...t}))),Kl=d((({field:e,input:t})=>{const{data:n}=ba("HOUSE_TYPE");return o(va,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),Gl=d((({field:e,input:t})=>{const n=i((t=>{e?.("organizationName")?.onChange?.(t.data?.name?.short_with_opf),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(an,{label:"ИНН",type:"number",maxtLength:12,...t,..._n(e("inn"),Rn.inn,Kn(e,t?.required)),onDaDataChange:n})})),Xl=d((({field:e})=>o(ia,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Jl=d((({field:e,input:t})=>o(an,{label:"Количество мест работы за последние 5 лет",placeholder:"Количество мест",type:"number",maxtLength:2,..._n(e("jobsNumber"),Rn.jobsNumber,Kn(e,t?.required)),...t}))),Zl=d((({field:e,input:t})=>o(an,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",type:"number",maxtLength:2,..._n(e("lastJobExperience"),Rn.lastJobExperience,Kn(e,t?.required)),...t}))),Ql=d((({field:e,input:t})=>o(an,{label:"Наименование юридического лица",...t,..._n(e("legalEntityName"),Rn.legalEntityName,t?.required)}))),ei=d((({field:e,input:t})=>o(an,{label:"ОПФ",placeholder:"ООО, ПАО и др.",..._n(e("legalForm"),Rn.legalForm,Kn(e,t?.required)),...t}))),ti=[];async function ni(){const e=await rt("/api/v1/outservice/outserviceregions");return e&&Array.isArray(e)?e:ti}const ai=d((({field:e,input:t})=>{const n=e("region")?.value?.key,{data:a}=jn("outServiceRegions",ni),i=a?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return l((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(hn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:i,..._n(e("localities"),Rn.localities,t?.required),isSearch:!0})})),li=d((({field:e,input:t})=>o(an,{label:"Совокупный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",..._n(e("mandatoryIncome"),Rn.mandatoryIncome,t?.required),...t}))),ii=[{id:"office",text:"В отделении Банка"},{id:"courier",text:"Курьерская доставка"}],ri=d((({field:e,input:t})=>o(Nl,{orientation:"horizontal",items:ii,..._n(e("methodObtain"),Rn.methodObtain,t?.required)}))),si=d((({field:e,input:t})=>o(an,{label:"Отчество (Обязательно, при наличии)",maxtLength:60,disabled:t?.filledByEsia&&Gn(e),..._n(e("middleName"),Rn.middleName),...t}))),oi=d((({field:e,input:t})=>o(an,{label:"Имя",maxtLength:60,disabled:t?.filledByEsia&&Gn(e),..._n(e("name"),Rn.name,t?.required),...t}))),ci=d((({value:e=!1,text:t,type:n="checkbox",onChange:a})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>a&&a(!e),children:[o("div",{className:u("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:u("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Me,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),di=d((({field:e})=>Fn(e("acquiringType")?.value?.key)?o(ci,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),mi=d((({field:e,input:t})=>{const{data:n}=ba("ORGANIZATION_TYPE");return o(va,{field:e,source:n,label:"Тип организации",fieldName:"organization",input:t})})),ui=d((({field:e,input:t})=>{const n=i((t=>{e?.("inn")?.onChange?.(t.data?.inn),e?.("legalForm")?.onChange?.(t.data?.opf?.short)}),[]);return o(an,{label:"Наименование организации",...t,..._n(e("organizationName"),Rn.organizationName,Kn(e,t?.required)),onDaDataChange:n})})),hi=d((({field:e,input:t})=>o(an,{label:"Иные доходы",placeholder:"Введите значение",type:"number",..._n(e("otherIncome"),Rn.otherIncome,t?.required),...t}))),pi=d((({field:e,input:t})=>o(an,{label:"Обязательные выплаты",placeholder:"Введите значение",type:"number",..._n(e("otherPayments"),Rn.otherPayments,t?.required),...t}))),gi=d((({field:e,input:t})=>o(Xa,{label:"Дата регистрации по месту жительства",..._n(e("participantDateRegistration"),Rn.participantDateRegistration,t?.required)}))),fi=d((({field:e,input:t})=>{const n="BUSINESS_OWNER"===e("positionOrganization")?.value?.key,a={..._n(e("partInBusiness"),Rn.partInBusiness,Kn(e,n&&t?.required))};return o(an,{label:"Доля участия в бизнесе",placeholder:"в %",type:"number",maxtLength:3,...a,...t,onChange:e=>a?.onChange&&a?.onChange(String(Number(e)>100?100:Number(e)||"")),value:n?a?.value:"",disabled:!n})})),xi=d((({field:e,input:t})=>{const{required:n,...a}=t;return o(an,{..._n(e("partnerComments"),Rn.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...a})})),bi=[{id:"mir",text:"Карта МИР"},{id:"union_pay",text:"UnionPay"},{id:"payment_system_j",text:"Платежная система (Дж)"},{id:"payment_system_b",text:"Платежная система (B) "},{id:"free_card",text:"Бесплатная карта"}],yi=d((({field:e,input:t})=>{const{value:n,onChange:a}=e("paymentSystem");return o(Nl,{label:"Платежная система",orientation:"horizontal",items:bi,value:n,onChange:e=>a?.(e),..._n(e("paymentSystem"),Rn.paymentSystem,t?.required)})})),vi=e=>"_"===e,Ni=e=>/\d/.test(e),wi=e=>vi(e)||Ni(e),Ci=[..."+7 (___) ___-__-__"],ki=Ci.findIndex(vi),Si=Ci.map(((e,t)=>wi(e)?Ci.slice(0,t).filter(wi).length:-1));function Ti(e){const t=e.replace(/\D/g,""),n=Ci.map(((e,n)=>Ni(e)?e:t.charAt(Si[n])||e)),a=Si.indexOf(t.length-1)+1;return(a?n.slice(0,Math.max(ki,a)):n).join("")}const Ii=d((({children:e,onChange:t,...n})=>{const a=i((e=>t&&t(Ti(e))),[t]),l=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(Yt,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>l(e?.target?.value||""),children:e})})),Bi=d((({className:e,label:t,error:n,...a})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ii,{"aria-label":t,label:qt({label:t,errors:a?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...a}),Xt(n)]}))),Ri=d((({field:e,input:t})=>o(Bi,{label:"Телефон",..._n(e(t?.name||"phone"),Rn.phone,"organizationPhone"===t?.name?Kn(e,t?.required):t?.required),...t}))),Pi=d((({field:e,input:t})=>{const{data:n}=ba("POSITION");return o(va,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),Di=d((({field:e})=>Fn(e("acquiringType")?.value?.key)?o(ci,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Mi=ht((({field:e,source:t})=>o(hn,{placeholder:"Выберите продукт",label:"Продукт",options:_i(t?.productList),...Mn(e("product"),Rn.product)}))),_i=e=>(e??[]).map((e=>({key:e,value:e})));function Ai(e="/api/v1/regions"){const{data:t}=jn(e,st);return Array.isArray(t)?t:[]}const zi=d((({field:e,input:t,url:n})=>{const a=Ai(n);return o(hn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>a?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[a]),..._n(e("region"),Rn.region,t?.required)})})),Fi=d((({field:e,input:t})=>{const n=Wn(!0),a=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(hn,{label:"Регион",placeholder:"Выберите регион",options:a,..._n(e("region"),Rn.region,t?.required)})})),Ei=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:l,renderFoldButton:r})=>{const[s,o]=a(n),d=i((()=>{o((e=>!e))}),[]),m=l({isUnfolded:s,onToggle:d}),u=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[u,m]}:{className:e,role:"group",children:[m,u]})}));const Vi=d((({className:e="",isUnfolded:t,children:n})=>{const a=s(null),i=function(e,t){const n=s(null);return l((()=>{const t=n?.current;if(!t)return;const a=new ResizeObserver((n=>{e(t,n[0])}));return a.observe(t),()=>{a.disconnect()}}),[e,...t]),n}((e=>{a.current&&(a.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:a,className:`transition-max-h duration-300 overflow-hidden ${a.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),Oi=d((({value:e,subText:t,children:n,isPhone:a,...l})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:Li({textItems:i,subText:t,children:n,isPhone:a,...l})})),Li=({label:e,labelSize:t="text-m",textItems:n,subColor:a,subText:l,className:i,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Me,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||ji(n,s),l?o(Me,{color:a,size:"text-m",children:l}):null]}),ji=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Me,{size:"text-l",children:t?o("a",{href:`tel:${$i(e)}`,children:e.trim()}):e.trim()},String(n)))),$i=e=>e.replace(/\D/g,""),qi=d((({className:e,children:t})=>o("div",{className:u("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Ui=e=>{const t=Hi(e);return o(Oi,{label:"Режим работы",value:t,className:"max-w-none"})},Wi=({workTime:e="",lunchHour:t="",daysOff:n=""},a=!1)=>e?[`${a?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Hi=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),a=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Wi({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":a}),Wi({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:a},!0)].filter(Boolean)},Yi=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Ki=e=>Yi.map((([t,n,a])=>({key:t,title:a,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Gi=e=>{if(!e)return null;const t=Xi(e);return c(qi,{className:"border-none",children:[o(Oi,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Ji)})}),o(Oi,{label:"Режим работы",className:"max-w-none",children:o(Me,{children:e})})]})},Xi=e=>{const t=Yi.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],a=n[n.length-1]?.toLowerCase();return a?.includes("выходной")?t.map((e=>({...e,status:!a?.includes(e.short.toLowerCase())}))):t},Ji=({short:e,status:t},n)=>o("div",{className:u("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Me,{size:"text-xs",children:e})},String(n)),Zi=({currency:e,buyExchangeRate:t,saleExchangeRate:n},a)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Oi,{label:"Валюта",value:e.currency}):null,t?o(Oi,{label:"Купить",value:String(t)}):null,n?o(Oi,{label:"Продать",value:String(n)}):null]},String(a)),Qi={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},er=d((({className:e,children:t,color:n="gray"})=>c("div",{className:u("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Qi[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Me,{size:"text-m",color:Qi[n].text,children:t})]}))),tr=(new Date).getDay(),nr=e=>{const[t]=e?.slice(tr-1)??[];if(!t)return null;const{lunchHour:n,status:a,workTime:l,hasLunch:i}=t;return a?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[l?o(er,{color:"green",children:l}):null,n&&i?o(er,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(er,{color:"red",children:"Выходной"})},ar=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",lr=({title:e,status:t,workTime:n,lunchHour:a,hasLunch:l},i)=>o(Oi,{label:e,value:t&&n?n:"",subText:ar({lunchHour:a,hasLunch:l,status:t}),subColor:!t||l?"text-error":"text-green-dark"},String(i)),ir=["ArrowDownIcon","ArrowUpIcon"],rr=["Подробнее","Скрыть"],sr=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:rr[Number(e)]}),o(W,{className:"text-primary-text",name:ir[Number(e)],width:"16",height:"16"})]}),or=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,cr=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,dr=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,mr=({name:e,address:t,phone:n,fax:a,phoneBusiness:l,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=Ki(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Me,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:t})]}):null]}),nr(h)]}),o("div",{className:"hidden sm:block",children:ur({phone:n,fax:a,phoneBusiness:l,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Ei,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Vi,{isUnfolded:e,children:ur({phone:n,fax:a,phoneBusiness:l,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>sr({isUnfolded:e,onToggle:t})})]},String(u))},ur=({phone:e,fax:t,phoneBusiness:n,phoneNatural:a,phoneCallCentre:l,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Ki(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(qi,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Oi,{label:"Факс",value:t,isPhone:!0}),o(Oi,{label:"Телефон филиала",value:e,isPhone:!0}),o(Oi,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Oi,{label:"Обслуживание физических лиц",value:a,isPhone:!0}),o(Oi,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Oi,{label:"Контакт-центр",value:l,isPhone:!0})]}),r?.isMatchesPattern?o(qi,{children:o(Oi,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(lr)})})}):c(qi,{children:[o(Oi,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Ji)})}),Ui(d)]}),r?.businessScheduleVisibleTag?Gi(r?.businessScheduleDescription):null,s?.currencies?.length?o(qi,{className:"flex-wrap",children:s?.currencies?.map(Zi)}):null]})},hr=({name:e="",address:t="",workSchedule:n})=>{const a=(l=e)?`${l?.charAt(0)?.toUpperCase()}${l?.slice(1)}`:"";var l;const i=`${t} ${(e=>{const t=Ki(e),n=e?Hi(t):"",a=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?or(n):dr(n,a):cr(n):null})(n)}`;return{header:a,body:i}},pr=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),gr=d((({children:e})=>pr?e:null)),fr=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:u("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:u("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),xr="/icons/MapMarkerClusterIcon.svg",br="/icons/MapMarkerClusterYellowIcon.svg";function yr({yandexMaps:e,map:t,points:n,isLoad:a}){if(a||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const l=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=vr("offices",e,l);if(n.length&&n.every((e=>"type"in e))){const a=vr("workplaces",e,l),r=Nr(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=Nr(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),a.add(r),t.geoObjects.add(a),t.geoObjects.add(i)}else{const a=Nr(n,"offices",e);i.add(a),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const vr=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?xr:br,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),Nr=(e,t,n)=>e.map((({coords:e,content:a})=>new n.Placemark(e,{balloonContentHeader:a?.header,balloonContentBody:a?.body,balloonContentFooter:a?.footer,hintContent:a?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?xr:br,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),wr={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},Cr={...wr,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},kr=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Cr).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(W,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Sr=e=>globalThis[e],Tr=(e,t)=>{const n=document.getElementById(t);if(n){const t=Sr(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(Sr(e))}))}))}return new Promise(((n,a)=>{const l=document.createElement("script");l.src=t,l.async=!0,l.id=t,l.addEventListener("load",(()=>{n(Sr(e))})),l.addEventListener("error",(e=>{a(e)})),document.head.appendChild(l)}))};const Ir=()=>function(e,t,n=!0){const[i,r]=a(void 0);return l((()=>{let a=!0;return Tr(e,t).then((e=>{a&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(a=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${_.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),Br={...wr,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Rr=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),a="in"===t?n+1:n-1;e.current.setZoom(a,{checkZoomRange:!0})},className:`${Object.values(Br).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),Pr=[55.753995,37.614069],Dr=d((({points:e,className:t="",zoom:n=5,isLoad:a,selectedAddress:i})=>{const r=s(null),d=Ir();if(l((()=>{r.current?yr({yandexMaps:d,map:r.current,points:e,isLoad:a}):d?.ready((()=>{r.current||(r.current=new d.Map("map",{center:Mr(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),yr({yandexMaps:d,map:r.current,points:e,isLoad:a})}))}),[d,e,n,a,i]),l((()=>{r.current&&i&&d?.geocode(i).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();r.current.setCenter(t),r.current.setZoom(18)}))}),[i]),!d)return null;const m="z-10";return c("div",{id:"map",className:u("relative","w-full",t),children:[a?o(fr,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",m),children:[o(Rr,{yandexMaps:r}),o(Rr,{yandexMaps:r,direction:"out"})]}),kr(r,d,u("right-2 top-80",m))]})})),Mr=e=>{const t=[Ar(_r(e,0)),Ar(_r(e,1))];return t.every((e=>e))?t:Pr},_r=(e,t)=>e.map((e=>e.coords?.[t])),Ar=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,zr={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Fr={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Er={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)};function Vr({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const Or={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"},Lr={primary:u("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:u("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},jr=d((({children:e,...t})=>{const n=e=>({...e,onClick:me(Vr(e))}),{className:a,version:l="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=n(t);return o("button",{className:u("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":u(Or[l],Lr[l]),a),type:s,role:d,onClick:m,children:e})})),$r=(e,t)=>e&&"underlined"!==t?"primary":"secondary",qr=(e,t,n)=>{const a=$r("all"===t),l=$r("business"===t),i=(e,t,a)=>{const l=e.currentTarget===e.target&&"business"===t?r(a):a;return n(t),l},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(jr,{"data-id":"all",onClick:t=>i(t,"all",e),version:a,children:"Для физических лиц"}),o(jr,{"data-id":"business",onClick:t=>i(t,"business",e),version:l,children:"Для юридических лиц"})]})},Ur=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Pe,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Me,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Wr="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Hr=({filters:e,field:{field:t,reset:n},onlyOffice:a,labels:l})=>{const i=a?5:6,r=(e||[]).map((e=>o(ea,{text:l[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(Ei,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Wr,children:s}),o(Vi,{className:Wr,isUnfolded:e,children:d})]}),renderFoldButton:Yr(n,a)})}):null})},Yr=(e,t=!1)=>({isUnfolded:n,onToggle:a})=>c("div",{className:"flex space-x-lg",children:[t?o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:a}):null,o(ye,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:Kr()})]}),Kr=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),Gr=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Me,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Xr=()=>{},Jr=e=>"all"===e?"block":"hidden",Zr=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:l=[],renderCard:i=Xr,renderRemoteWorkplaceCard:r=Xr,getBalloon:s=Xr,getBalloonRemoteWorkplaces:d=Xr,descriptionData:m,title:h})=>{const p=h?.includes("Офис"),[g,{field:f,reset:x}]=Ft(zr),{filteredItems:b,points:y,filteredRemoteWorkplaces:v,lengthItems:N}=ns({data:t,remoteWorkplaces:l,filtrationState:g,getBalloon:s,getBalloonRemoteWorkplaces:d}),[w,C]=a("all"),k={filters:es([...t,...l]),field:{field:f,reset:x},onlyOffice:p,labels:Fr};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Gr(h,N),m?Ur(m):null,p&&qr(t,w,C),o("div",{className:u("pb-3xl",Jr(w)),children:Hr(k)})]}),o("div",{className:"h-[600px]",children:o(gr,{children:o(Dr,{points:y,isLoad:n,className:"h-full"})})})]}),c(gr,{children:[b.map(i),v.map(r)]})]})})),Qr=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Er[t](e)))))},es=e=>Object.keys(zr).filter((t=>e.filter((e=>Er[t](e))).length)),ts=()=>{},ns=({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:a=ts,getBalloonRemoteWorkplaces:l=ts})=>{const[i,s,o,c]=r((()=>{const i=Qr(e,n),r=Qr(t,n),s=[...i.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a(e)}))),...r.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:l({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[i,s,r,i.length+r?.length]}),[e,t,n,a,l]);return{filteredItems:i,points:s,filteredRemoteWorkplaces:o,lengthItems:c}},as=d((({field:e,input:t})=>{const n=e("regionRetail"),a=e("addressRetail"),i=Wn(),r=n?.value?.key,s=i.find((({region:e})=>e===r)),d=!i,m=n?.value?.text,u=Wn()?.find((e=>e?.region===m))?.branches;l((()=>{""!==n?.value?.key&&e?.("addressRetail")?.onChange?.("")}),[n?.value]);const{points:h}=ns({data:s?.branches||[],filtrationState:{},getBalloon:hr}),p=Boolean(n?.value?.key);return c("div",{children:[o(hn,{label:"Адрес отделения",placeholder:"Выберите отделение",options:(u||[]).map((({address:e=""})=>({key:e,text:e}))),..._n(e("addressRetail"),Rn.addressRetail,t?.required&&p),isSearch:!0}),o("div",{className:"h-[600px]",children:o(gr,{children:o(Dr,{points:h,isLoad:d,className:"h-full",selectedAddress:a?.value?.text})})})]})})),ls=d((({field:e,input:t})=>{const n=Wn();return o(hn,{label:"Регион",placeholder:"Выберите регион",isSearch:!0,options:r((()=>n?.map((({region:e=""})=>({key:e,text:e})))),[n]),..._n(e("regionRetail"),Rn.regionRetail,t?.required)})})),is=d((({field:e,input:t})=>o(an,{label:"Пенсионные доходы",placeholder:"Введите значение",type:"number",..._n(e("retirementIncome"),Rn.retirementIncome,t?.required),...t}))),rs=d((({field:e})=>{const t=e("secondaryPhone");return o(Bi,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Mn(t,Rn.secondaryPhone):t})})),ss=d((({field:e,input:t})=>o(hn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:ql,..._n(e("serviceDirection"),Rn.serviceDirection,t?.required)}))),os=[{id:"male",text:"Мужской"},{id:"female",text:"Женский"}],cs=d((({field:e,input:t})=>o(Nl,{label:"Пол",orientation:"horizontal",items:os,..._n(e("sex"),Rn.sex,t?.required)}))),ds=d((({field:e})=>o(ia,{text:"Я являюсь акционером / участником / членом / пайщиком / вкладчиком с долей участия более 20% уставного капитала юридического лица",..._n(e("shareholderFlg"),Rn.shareholderFlg)}))),ms=d((({children:e,onChange:t,...n})=>{const a=i((e=>t&&t(Aa(e,"___-___-___ __"))),[t]),l=i((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(Yt,{...n,onChange:a,onFocus:e=>a(e?.target?.value||""),onBlur:e=>l(e?.target?.value||""),children:e})})),us=d((({className:e,label:t,value:n,error:a,onChange:l,onBlur:i,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(ms,{"aria-label":t,label:qt({label:t,errors:r?.errors}),valid:Boolean(!a),value:n,onChange:l,onBlur:i,placeholder:"___-___-___ __"}),Xt(a)]}))),hs=d((({field:e,input:t})=>{const n=e("consentPfrFlg")?.value;return o(us,{label:"СНИЛС",..._n(e("snils"),Rn.snils,!!n&&t?.required),...t})})),ps=d((({field:e,input:t})=>o(an,{label:"Фамилия",maxtLength:60,disabled:t?.filledByEsia&&Gn(e),..._n(e("surname"),Rn.surname,t?.required),...t}))),gs=["От 1 мес","До 15 лет"],fs=d((({field:e})=>o(ha,{title:"Срок, месяцев",items:gs,min:1,max:180,...e("term")}))),xs=d((({field:e,input:t})=>o(an,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",..._n(e("totalIncome"),Rn.totalIncome,t?.required),...t}))),bs=d((({field:e,input:t})=>o(hn,{label:"Тип обслуживания",options:$l,..._n(e("serviceType"),Rn.serviceType,t?.required)}))),ys=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],vs=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return l((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(vl,{className:"whitespace-normal",orientation:"horizontal",items:ys,value:t,onChange:e=>n&&n(e)})})}));const Ns={$ref:"/wcms-resources/outservice-productlist.json"},ws=(e,t,n=!1)=>(a,l)=>{const i="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,r={surname:o(ps,{field:e,input:a}),name:o(oi,{field:e,input:a}),middleName:o(si,{field:e,input:a}),phone:o(Ri,{field:e,input:a}),organizationPhone:o(Ri,{field:e,input:a}),email:o(Al,{field:e,input:a}),fullName:o(Hl,{field:e,input:a}),inn:o(Gl,{field:e,input:a}),legalForm:o(ei,{field:e,input:a}),organizationName:o(ui,{field:e,input:a}),generalSeniority:o(Yl,{field:e,input:a}),lastJobExperience:o(Zl,{field:e,input:a}),experience5Years:o(Ol,{field:e,input:a}),jobsNumber:o(Jl,{field:e,input:a}),beginDate:o(Ja,{field:e,input:a}),addressFact:o(Yn,{field:e,input:a}),organizationAddress:o(Xn,{field:e,input:a}),comment:o(il,{field:e,input:a}),addressBranch:o(Hn,{field:e,input:a,isPremium:i}),sex:o(cs,{field:e,input:a}),birthday:o(Za,{field:e,input:a,isRetailForm:n}),birthPlace:o(el,{field:e,input:a}),desiredMeetingDate:o(Tl,{field:e,input:a}),product:o(Mi,{field:e,source:Ns}),localities:o(ai,{field:e,input:a}),isClient:o(Xl,{field:e}),partnerComments:o(xi,{field:e,input:a}),collectionCount:o(ll,{field:e,input:a}),acquiringType:o(zn,{field:e,input:a}),onlineCheckout:o(di,{field:e}),posTerminal:o(Di,{field:e}),serviceType:o(bs,{field:e,input:a}),term:o(fs,{field:e}),amount:o(xa,{field:e}),annualRevenue:o(wa,{field:e,input:a}),vedTypes:o(vs,{field:e}),feedbackMethod:o(Wl,{field:e,input:a}),serviceDirection:o(ss,{field:e,input:a}),bankEmpolee:o(Sa,{field:e}),secondaryPhone:o(rs,{field:e}),consentToReceiveMaterials:o(xl,{field:e,input:a}),processPersonalDataFlg:o(xl,{field:e,input:a}),consentProviderFlg:o(xl,{field:e,input:a}),consentOthersFlg:o(xl,{field:e,input:a}),consentInformFlg:o(xl,{field:e,input:a}),consentPfrFlg:o(xl,{field:e,input:a}),applicationDate:o(an,{label:"Дата и время обращения в Банк",...e("applicationDate")}),region:i?o(Fi,{field:e}):o(zi,{field:e,input:a,url:Ot(t)}),education:o(_l,{field:e,input:a}),housing:o(Kl,{field:e,input:a}),employment:o(El,{field:e,input:a}),organization:o(mi,{field:e,input:a}),amountWorkers:o(Na,{field:e,input:a}),employerActivities:o(zl,{field:e,input:a}),employerOrganization:o(Fl,{field:e,input:a}),positionOrganization:o(Pi,{field:e,input:a}),familyStatus:o(jl,{field:e,input:a}),children:o(nl,{field:e,input:a}),familyMembers:o(Ll,{field:e,input:a}),dependents:o(Sl,{field:e,input:a}),totalIncome:o(xs,{field:e,input:a}),expenses:o(Vl,{field:e,input:a}),snils:o(hs,{field:e,input:a}),conscription:o(sl,{field:e,input:a}),armyIdFlg:o(Ca,{field:e,input:a}),dulSerie:o(Dl,{field:e,input:a}),dulNumber:o(Pl,{field:e,input:a}),dulIssueDateField:o(Bl,{field:e,input:a}),dulSubdivisionCode:o(Ml,{field:e,input:a}),dulIssuedBy:o(Rl,{field:e,input:a}),addressRegistration:o(Xn,{field:e,input:a}),addressCourier:o(Xn,{field:e,input:a}),participantDateRegistration:o(gi,{field:e,input:a}),retirementIncome:o(is,{field:e,input:a}),otherIncome:o(hi,{field:e,input:a}),mandatoryIncome:o(li,{field:e,input:a}),otherPayments:o(pi,{field:e,input:a}),disablePeopleFlg:o(Il,{field:e,input:a}),bankruptcyFlg:o(Ta,{field:e,input:a}),shareholderFlg:o(ds,{field:e,input:a}),legalEntityName:o(Ql,{field:e,input:a}),creditInRshbCd:o(bl,{field:e,input:a}),bankEmployeeCode:o(ka,{field:e,input:a}),partInBusiness:o(fi,{field:e,input:a}),regionRetail:o(ls,{field:e,input:a}),addressRetail:o(as,{field:e,input:a}),addressMatch:o(ra,{field:e,input:a}),paymentSystem:o(yi,{field:e,input:a}),currency:o(Cl,{field:e,input:a}),cardCategory:o(tl,{field:e,input:a}),codeWord:o(al,{field:e,input:a}),confirmationIncome:o(rl,{field:e,input:a}),methodObtain:o(ri,{field:e,input:a}),deliveryDate:o(kl,{field:e,input:a})};return function({input:e,field:t}){const{condition:n}=e,{value:a}=t(n?.name||"");return!n||n?.values?.find((e=>e===(a?.key??a)))}({input:a,field:e})?o("div",{children:r[a?.name||""]},String(l)):null},Cs=e=>2===e?"@xl:grid-cols-2":"",ks=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Me,{size:"text-h6",children:e})}):null,Ss=d((function({responseType:e,typeForm:t}){const n="OK"===e,a=n?"ResponseOKIcon":"ResponseFailIcon",{close:l}=de(),r=i((()=>{l()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(pl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:a,iconVersion:"normal"},width:"136",height:"136"}),o(k,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(jr,{type:"button",onClick:r,children:"Хорошо"})]})})})),Ts=e=>{const{open:t,close:n}=de();return{open:(n,a={})=>t(o(Ss,{...e,...n}),a),close:n}},Is=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Bs=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:a,amount:l,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:a=!1,term:l,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Fn(t?.key)?`/Онлайн касса=${n}/POS-терминал=${a}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${l}/Выручка=${r}`})(e):null,u={...d,...Ps(o),...Rs(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},Rs=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Ps=e=>e?{vedTypes:Object.fromEntries(ys.map((({id:t})=>[t,t===e])))}:{},Ds={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:An[0],serviceType:$l[0],feedbackMethod:Ul[0],serviceDirection:ql[0],vedTypes:ys[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Ms=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Me,{children:e}):null,t?o(ye,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Me,{children:t.text})}):null]}))),_s=(e,t)=>o(jr,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),As=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(ea,{...e}),o(Ms,{link:t})]}),Xt(Mn(e,Sn).error)]}):o(Ms,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),_s(n)]}),zs={send:async function(e,t=!1){const{typeForm:n,region:a,phone:l="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f="/api/v1"+(g?"/lead":"/sendcorporatelead"),x={typeForm:n,...Nt(a,g),...wt(i,g),...yt(l),...vt(s,"desiredMeetingDate"),...g?vt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...Ct(d)},...p};try{const e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},Fs=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:p,data:g,...f})=>{const x=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Ds[e.name||""]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=$l[1]),{...n,typeForm:{key:t,text:""}}})(x,n),[y,v]=a(""),w=Ts({typeForm:n}),C=i((async(e,t)=>{const n=Es(x,e),a=Is(Dn(n));if(!pn(a(e)))return console.warn("validation fail");const l=Bs({...e,...h}),i=await zs.send(l,"lead"===m)?"OK":"Fail";if(v(i),i&&w.open({responseType:i}),"OK"===i&&g){const e=At();kt({aspectsAttributes:g,aspects:e,ev:t})}return i}),[]),[,{field:k,onSubmit:S,reset:T}]=Ft(b,{onSubmit:C}),I=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return l((()=>{"OK"===y&&(v(""),T())}),[y]),c(Vt,{className:u("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:u(Cs(e.columns),"grid gap-x-m"),children:[ks(e.title),(e?.inputs||[])?.map(ws(k,n))]},`section-${t}`))),As(I?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),Es=(e,t)=>e.filter((e=>"secondaryPhone"===e?.name?Boolean(t.secondaryPhone):e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const a=t?.[e?.condition?.name??""];return n===(a?.key??a)}))));function Vs(e){const[t,n]=a(JSON.parse(globalThis.localStorage?.getItem(e)||"null"));return[t,i((t=>{globalThis.localStorage?.setItem(e,JSON.stringify(t)),n(t)}),[e,globalThis.localStorage])]}const Os=d((({inputs:e=[],typeForm:t="",field:n,key:a})=>{const l=e.every((e=>Boolean(n(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(Mn(n(e?.name),Rn[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(Ei,{isFoldButtonOnTop:!0,unfoldedByDefault:!0,renderFoldableSection:({isUnfolded:a})=>o(Vi,{isUnfolded:a,className:"flex flex-col pl-2xl",children:e.map(ws(n,t))}),renderFoldButton:Ls(c("div",{children:[o(ea,{value:l,onChange:t=>{for(const a of e){const e=n(a.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},a),Xt(i?"Отметьте все обязательные соглашения":"")]}))})})})),Ls=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",type:"button",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),js=({field:e,typeForm:t="",inputs:n,isRetailForm:a=!1})=>{const{consentInputs:l,restInputs:i}=$s(n||[]);return l.length>2?c("div",{children:[i.map(ws(e,t,a)),o(Os,{inputs:l,field:e})]}):(n||[])?.map(ws(e,t,a))},$s=e=>({consentInputs:e?.filter((e=>Object.keys(ol).includes(e.name||"")))||[],restInputs:e?.filter((e=>!Object.keys(ol).includes(e.name||"")))||[]}),qs={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",organizationPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:An[0],serviceType:$l[0],feedbackMethod:Ul[0],serviceDirection:ql[0],vedTypes:ys[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataFlg:!1,consentProviderFlg:!1,consentOthersFlg:!1,consentInformFlg:!1,addressRegistration:"",participantDateRegistration:void 0,currency:"",paymentSystem:"",cardCategory:{key:"",text:""},codeWord:""},Us=(e,t,n="")=>{if(t){const e={...t};return e.birthday=new Date(e?.birthday||0),e}return{...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||qs[e.name||""]]))),typeForm:{key:n,text:""}}},Ws=(e,t)=>o(jr,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Hs=e=>cl("/user-data/updateUserProfile","PUT",e),Ys=e=>cl("/user-data/updateUserTask","PUT",e),Ks={width:"118",height:"24"},Gs={"bg-white":"color",transparent:"white"},Xs={"bg-white":"text-primary-main",transparent:"text-white"},Js=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Gs[e]},className:Xs[e],width:n?.width,height:n?.height}),Zs={"bg-white":"text-primary-text",transparent:"text-white"},Qs=d((({className:e,href:t="/",logo:n,children:a,targetBlank:l,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:u("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:l?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...pe(s),children:[Js(i,n?.image,Ks),r?a??o("div",{className:"ml-s",children:o(Me,{font:"font-medium",color:Zs[i],size:"",children:n?.title??"Россельхозбанк"})}):null]}))),eo=async({code:e,setHasError:t,close:n,sendCode:a=Ut})=>{const l=await(i={captchaText:e},cl("/sms/checkCaptcha","POST",i));var i;"ERROR"===await l.text()?t(!0):(a(),n?.())},to=async(e,t)=>{const n=await(e=>cl(`/sms/createCaptcha?phoneNumber=${encodeURIComponent(e)}`,"GET"))(t);e(URL.createObjectURL(await n.blob()))},no=d((({phoneNumber:e,close:t,sendCode:n,onClose:i})=>{const[r,s]=a(""),[d,m]=a(""),[u,h]=a(!1);return l((()=>{to(s,e)}),[]),o(pl,{head:o(Qs,{}),onClose:i,className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex h-36 w-72",children:[o("img",{className:"grow",src:r}),o("div",{onClick:()=>to(s,e),className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(Yt,{className:"w-[300px]",onChange:m,value:d,placeholder:"Введите код с картинки"}),u?o("div",{className:"text-error",children:"Неверный код"}):null,c("div",{className:"flex w-[310px] justify-between",children:[o(jr,{onClick:t,version:"secondary",children:"Вернуться"}),o(jr,{type:"submit",disabled:!d,onClick:()=>eo({code:d,setHasError:h,close:t,sendCode:n}),version:"secondary",children:"Отправить"})]})]})})})),ao=d((({time:e,setTime:t,className:n})=>(l((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:lo(e)})))),lo=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,io=async({phoneNumber:e,captchaDialog:t,setTimeNextReq:n,setIsTimerStarted:a,setAttemps:l})=>{try{await(i={phoneNumber:e,smsCodesSetName:{key:"AUTHENTICATION"}},cl("/sms/sendCode","POST",i)).then((t=>{if("string"!=typeof t&&t.errorMessage&&t.errorMessage.startsWith(`Too many request for phoneNumber [${e}]`))throw t})),l(0),n(180),a(!0)}catch(e){t.open()}var i},ro=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=a(0),u=s([]);l((()=>{u.current?.[d]?.focus()}),[d]);const h=i((n=>a=>{const{value:l}=a.currentTarget,i=l.slice(0,1);t(e.map(((e,t)=>t===n?i:e))),m(n+1)}),[e]),p=i((n=>a=>{const{key:l}=a;if("Backspace"===l&&!e[n]){const a=n>0?n-1:e.length-1,l=e.map(((e,t)=>t===a?"":e));t(l),m(a)}}),[e]),g=i((n=>{n.preventDefault();const a=n.clipboardData.getData("text"),l=e.map(((e,t)=>t<a.length?a[t]:e));t(l),m(l.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,a)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(a),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[a]=e},onFocus:e=>e.target.select(),onKeyDown:p(a),className:so(a,e,n)},a)))}),n?o("div",{className:"text-error",children:r}):null]})})),so=(e,t,n=!1)=>{const a=!t[e];return`w-16 h-20 text-3xl text-center p-2 m-2 border ${n&&a?"border-error":"border-gray"} rounded-md caret-transparent outline-none`},oo=d((({isDisabled:e,onClick:t,text:n})=>o(jr,{type:"button",onClick:t,disabled:e,children:o(Me,{font:"font-medium",children:n})}))),co=e=>{globalThis.sessionStorage.setItem("accessToken",e.access_token),globalThis.sessionStorage.setItem("refreshToken",e.refresh_token)},mo=({close:e,values:t})=>{const[n,s]=a(!1),[o,c]=a(""),[d,m]=a(!1),[u,h]=a(0),[p,g]=a(!1),[f,x]=a(0),b=i((()=>{s(!1),c("")}),[]),y=r((()=>0===u&&p),[u,p]),v=r((()=>f>2||!t.every(Boolean)||y),[t]),N=i((async()=>{try{g(!1),h(0),x(f+1),m(!0),await(async e=>cl("/sms/checkCode","POST",e).then(co))({smsText:t.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),b(),e&&e(t.join(""))}catch{m(!1),c(f>1?"Исчерпан лимит ввода смс-кода":"Неверный код"),s(!0)}}),[t,f]);return l((()=>{y?(s(!0),c("Код просрочен")):s(!1)}),[y]),{handleSubmit:N,hasError:n,errorText:o,isLoading:d,timeNextReq:u,isSubmitButtonDisabled:v,setTimeNextReq:h,setIsTimerStarted:g,setAttemps:x}},uo=d((({close:e=Ut,onClose:t=Ut,title:n,description:r,__html:s,code:d=!0,codeLength:m=4,textButton:u="",phoneNumber:h="+79999999999"})=>{const[p,g]=a(Array(m).fill("")),{handleSubmit:f,hasError:x,errorText:b,isLoading:y,timeNextReq:v,isSubmitButtonDisabled:N,setTimeNextReq:w,setIsTimerStarted:C,setAttemps:S}=mo({values:p,close:e}),T=i((()=>{io({phoneNumber:h,captchaDialog:I,setTimeNextReq:w,setIsTimerStarted:C,setAttemps:S})}),[]),I=((e,t)=>{const{open:n,close:a,closeAll:l}=de();return{open:()=>n(o(no,{close:a,onClose:t,...e})),close:a,closeAll:l}})({phoneNumber:h,sendCode:T},t);return l((()=>{T()}),[]),o(pl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[o(k,{className:"w-full",title:n,description:r,headlineVersion:"S",isEmbedded:!0}),d?o(ro,{values:p,setValues:g,errorText:b,hasError:x}):null,po(v,w,T),o(Pe,{itemSize:"list-s",__html:s}),ho(u,N,f),y?o(fr,{blur:!1}):null]})})})),ho=(e,t,n)=>e?o(oo,{isDisabled:t,onClick:n,text:e}):null,po=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-primary-main",children:["Получить новый код можно через",o(ao,{className:"text-primary-main ml-1",time:e,setTime:t})]}):o(ye,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),go=()=>{const{open:e,close:t}=de();return{open:(n,a)=>e(o(uo,{onClose:t,close:n,...a})),close:t}},fo={title:"Подпишите согласие на запрос в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) ускорит решение по кредиту"},xo={title:"Вы уверены, что хотите отказаться от запроса в БКИ",description:"Согласие на запрос в Бюро кредитных историй (БКИ) повысит вероятность одобрения"},bo=d((function({handleSubmit:e=Ut,onClose:t=Ut}){const[n,l]=a(""),[r,s]=a(!1),{open:d,close:m}=de(),u=Ce(),h=i((()=>{m(),e(n)}),[n]),p=i((e=>{l(e),"REFUSE"===e&&s(!0)}),[]),g=r?xo:fo;return o(pl,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl",onClose:t,children:c("div",{className:"flex flex-col gap-xl items-center",children:[o("div",{role:"button",onClick:()=>gl(d,vo,u),children:o(N,{className:"text-center text-balance",headingType:"h2",title:g.title})}),o(w,{align:"text-center",children:g.description}),o(vl,{className:"whitespace-normal",orientation:"horizontal",items:yo,value:n,onChange:p}),o(jr,{disabled:!n,type:"button",onClick:h,children:"Продолжить"})]})})})),yo=[{id:"SIGNED",text:"Подписать"},{id:"REFUSE",text:"Отказаться"}],vo=2,No=e=>{const{open:t,close:n}=de(),a=go(),l=(t,l)=>async i=>{n(),"SIGNED"===i&&t?a.open((t=>async n=>{t&&await Hs({profile:{id:t,consentBkiFlg:!0,smsConsentBki:n}}),e()})(l),wo(t)):e()};return{open:(n,a)=>t(o(bo,{handleSubmit:l(n,a),onClose:e}))}},wo=e=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:bt(e),textButton:"Отправить",__html:"<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>\n <ul><li>согласие на запрос информации в БКИ</li></ul>"}),Co=d((function({handleClose:e}){const t=i((async()=>{const e=await(t={redirectUri:globalThis.location.href},cl("/esia/getLink","POST",t));var t;e&&(globalThis.location.href=e.link)}),[]);return o(pl,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex items-center justify-around w-full",children:[c("ul",{className:"list-disc",children:[o("li",{children:"Вероятность одобрения выше"}),o("li",{children:"Без справок о доходах и трудоустройстве"}),o("li",{children:"С защитой Ваших данных"})]}),o(ne,{image:{icon:"GosUslugiIcon",iconVersion:"normal"},height:"70"})]}),c("div",{className:"flex items-center justify-between w-full m-0",children:[o(jr,{type:"button",onClick:t,children:"Заполнить через Госуслуги"}),o(jr,{type:"button",version:"secondary",onClick:e,children:"Пропустить"})]})]})})})),ko={email:"EMAIL",phone:"MAIN_PHONE",organizationPhone:"ORGANIZATION_PHONE"},So={addressRegistration:"REGISTRATION",addressFact:"RESIDENTAL",organizationAddress:"WORK"},To={mandatoryIncome:"INCOME_AVERAGE",otherPayments:"MANDATORY_PAYMENTS"},Io=e=>Object.entries(e).reduce(((e,[t,n])=>t in ko?[...e,{contactTypeCd:{key:ko[t]},value:n}]:e),[]),Bo=e=>Object.entries(e).reduce(((e,[t,n])=>t in So?[...e,{addressType:{key:So[t]},...n}]:e),[]),Ro=e=>Object.entries(e).reduce(((e,[t,n])=>t in To?[...e,{incomeTypeCd:{key:To[t]},value:n}]:e),[]),Po=({inputs:e,programId:t,nextStepLink:n,saveForm:l})=>{const[r,s]=a(""),[,c]=Vs("taskId"),[,d]=Vs("profileId"),[,m]=Vs("participantId"),u=(e=>{const{open:t,close:n}=de(),a=i((()=>{n(),globalThis.location.href=e}),[]);return{open:(e={})=>t(o(Co,{handleClose:a}),e),close:n}})(n),h=No(u.open),p=go(),g=i(((e,t,n)=>{m(e),c(t),d(n)}),[]);return{handleSubmit:i((async n=>{const a=Is(Dn(e));if(!pn(a(n)))return console.warn("validation fail");try{const{profile:{id:e}}=await(i={profile:{phone:bt(n.phone)}},cl("/public-data/createUserProfile","POST",i));if(e&&n?.phone){const a=async()=>{try{await Do({programId:t,profileId:e,formData:n,saveUserData:g,saveForm:l}),p.close(),h.open(n.phone,e)}catch{s("Fail")}},i=Object.keys(ol).filter((e=>n[e])).map((e=>ol[e]?.text));p.open(a,Mo(n?.phone,i))}}catch{s("Fail")}var i}),[]),responseStatus:r}},Do=async({programId:e,profileId:t,formData:n,saveUserData:a,saveForm:l})=>{const i=Ao(n);await Hs(((e,t)=>{const{name:n="",surname:a="",middleName:l="",birthday:i="",phone:r="",email:s="",processPersonalDataFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:a,midname:l,birthDate:i&&xt(i,!0),email:s,phone:bt(r),processPersonalDataFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(t,i));const{taskId:r,participantId:s}=await(o={profileId:t,programId:e},cl("/user-data/createDraftTask","POST",o));var o;await Ys((({participantId:e,taskId:t,profileId:n,formData:a})=>{const{name:l,surname:i,middleName:r,birthday:s,phone:o,email:c}=a;return{sendToBank:!0,taskKind:"SHORT",task:{taskSource:globalThis.location.origin,id:t,participants:[{birthDate:s&&xt(s,!0),id:e,midname:r,name:l,surname:i,profile:{id:n},participantContacts:Io({phone:o&&bt(o),email:c}),roleCd:{key:"BORROWER",value:"Заемщик"}}]}}})({participantId:s,taskId:r,profileId:t,formData:i})),a(s,r,t),l(n)},Mo=(e,t)=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:bt(e),textButton:"Оформить",__html:`<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${_o(t)}`}),_o=e=>`<ul>${e?.map((e=>"<li>"+e+"</li>")).join("")}</ul>`,Ao=e=>{const{consentOthersFlg:t,...n}=e;return{...n,consentCollectionFlg:t,consentAssignmentClaimsFlg:t,consentPhotoFlg:t}},zo=e=>{const{profile:t,addInfo:n,document:a,addressRegistration:l,addressFact:i}=e;return{name:t?.name,surname:t?.surname,middleName:t?.midname,birthday:t?.birthDate,phone:Ti(t?.phone),email:t?.email,dulIssueDateField:a?.dulIssueDate,dulIssuedBy:a?.dulIssuedBy,dulNumber:a?.dulNumber,dulSerie:a?.dulSerie,dulSubdivisionCode:a?.dulSubdivisionCode,snils:n?.snils,birthPlace:n?.birthPlace,addressRegistration:Fo(l),addressFact:Fo(i),esiaAccountTypeCd:t?.esiaAccountType}},Fo=e=>{const{postcode:t,region:n,regionCode:a,locality:l,city:i,street:r,house:s,building:o,block:c,apartment:d}=e,m=[t,n,l||i,r?`ул ${r}`:void 0,s?`д ${s}`:void 0,c?`к ${c}`:void 0,o?`стр ${o}`:void 0,d?`кв ${d}`:void 0].reduce(((e,t)=>t?e?`${e}, ${t}`:t:e),"");return{...e,regionCode:a?.key,fullAddress:m}},Eo=e=>{const[t,n]=a(!1),[r]=Vs("profileId"),[s,o]=Vs("leadForm"),c=new URLSearchParams(decodeURIComponent(globalThis.location?.search)),d=c.get("code"),m=c.get("state"),u=i((async()=>{if(r&&d&&m){const n=await(t={profileId:r,code:d,state:m,redirectUri:globalThis.location?.href},cl("/esia/updateProfileEsia","POST",t));o({...s,...zo(n)}),globalThis.location.href=e}var t}),[]);return l((()=>{d?(n(!0),u()):(sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken"))}),[]),{isLoading:t}},Vo=d((({className:e,title:t,programId:n="",nextStepLink:i="/credit-lead",sections:r=[],button:s,...d})=>{const m=r?.flatMap((e=>e?.inputs))||[],[h,p]=a(""),{isLoading:g}=Eo(i),[f,x]=Vs("leadForm"),b=Us(m,f),{handleSubmit:y,responseStatus:v}=Po({inputs:m,programId:n,nextStepLink:i,saveForm:x});if(v){Ts({responseType:v}).open()}const[,{field:N,onSubmit:w,reset:C}]=Ft(b,{onSubmit:y});return l((()=>{"OK"===h&&(p(""),C())}),[h]),o(Vt,{className:u("container space-y-m",e),title:t,...d,children:c("form",{onSubmit:w,className:"space-y-m relative",children:[g?o(fr,{blur:!1}):null,r.map(((e,t)=>c("div",{className:u(Cs(e.columns),"grid gap-x-m"),children:[ks(e.title),js({field:N,inputs:e?.inputs,isRetailForm:!0})]},`section-${t}`))),Ws(s)]})})})),Oo=d((({__html:e,icon:t="InfoCircleIcon",iconVersion:n="black",link:a})=>c("div",{className:"flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m",children:[o("div",{className:"rounded-full bg-white p-xs",children:o(W,{name:t,width:"24",height:"24",iconVersion:n})}),c("div",{className:"",children:[o(Pe,{__html:e}),a?.text?o(ye,{className:"text-primary-main",children:a.text}):null]})]}))),Lo=d((({interval:e=0,title:t,__html:n})=>{const[l,i]=a(e),r=100-(e-l)/e*100;return c("div",{children:[t?o(k,{title:t,headlineVersion:"S"}):null,c("div",{className:"flex justify-center items-center flex-col",children:[c("div",{className:u("relative flex items-center justify-center w-24 h-24 rounded-full bg-gray text-transparent mb-5"),children:[o("div",{className:"absolute inset-0 rounded-full",style:{background:`conic-gradient(rgb(66, 171, 68) ${r}%, rgb(125, 126, 127) 0deg)`}}),o("div",{className:"z-10 flex items-center justify-center px-4 py-2 rounded-full w-20 h-20 bg-white text-primary-text text-m",children:o(ao,{interval:e,time:l,setTime:i})})]}),n?o(Pe,{__html:n}):null]})]})})),jo=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:l,sectionAdditionalTitle:i,sectionInfoAdditional:r,buttonText:s,interval:d,...m})=>c(g,{...m,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Lo,{interval:d}):null]}),o($o,{title:a,items:l}),o($o,{title:i,items:r,countColumns:!0}),n?.__html?o(Oo,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(jr,{className:"w-full mt-lg",children:s}):null]}))),$o=({title:e,items:t,countColumns:n=!1})=>{const a=Ce();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Me,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Cs(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:qo(e)},t)))}):null]})]}):null},qo=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Me,{color:"text-secondary-text",size:"text-l",children:e}),o(Me,{color:"text-primary-text",size:"text-xl",children:t})]}),Uo=d((({title:e,description:t})=>{const n=Ce();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(k,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Wo=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Ho=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function Yo(e,{sensitivity:t,rootRef:n}={}){const a=s(null),i=r((()=>({threshold:Ko(t),root:n?.current})),[t,n?.current]);return l((()=>{if(!a.current)return;const t=new IntersectionObserver(e,i);return t.observe(a.current),()=>{t.disconnect()}}),[e,i]),a}function Ko(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const Go=d((({className:e,style:t,idx:n,activeIndex:a,observerOptions:l,children:r,onIntersection:s})=>{const c=Yo(i((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),l);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===a),ref:c,role:"listitem",children:r})})),Xo=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Jo=d((({className:e,itemClassName:t,containerRef:n,activeIndex:a,visibleItemCount:l=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(Qo(n))}),[g,f]),v=l>0?r*Number(l)-1:0,N="vertical-list"===d,w="horizontal-list"===d,C={...w?Zo(c,v):{},...N?Ho(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:C,ref:n,role:"list",children:(k=(e,n)=>o(Go,{className:u(m,l?Xo[l-1]:"",{"h-full":N},t),style:w?Zo(c/4):{},activeIndex:a,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(k):k(e,0))(p)});var k})),Zo=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Qo=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ec={"horizontal-list":"w-6","vertical-list":"h-6"},tc=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(a,l)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",l===e?ec[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(l)},String(l)),nc=({activeIndex:e,onClick:t})=>(n,a)=>{const l=a===e,i=l?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=l?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=l?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"aria-label":n?.title,className:u("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:u("text-secondary-text font-light",s),children:n?.description})]},String(a))},ac=e=>e,lc=(e=ac)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),ic=lc(),rc=(e=ac)=>lc((t=>-e(t))),sc=rc(),oc=e=>t=>e.scrollWidth/t,cc=e=>(t,n)=>{e.scrollBy({left:n*oc(e)(t),behavior:"smooth"})},dc=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[l,r]=a([]),o=i((e=>{r((t=>{return(n=t)===(a=e)||Boolean(n&&a&&n?.length===a?.length&&n.every(((e,t)=>e===a[t])))?t:e;var n,a})),t&&t(e)}),[t]),[c,d]=l.length?[rc()(l),lc()(l)]:[-1,-1],m=c>0,u=d<e-1,h=i((()=>{var t;n.current&&(m?cc(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(u?cc(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:h,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:u,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},mc={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},uc=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:a="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=Ce(),[h,p]=dc({itemCount:s.length}),g=hc(Boolean(s?.length));l((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Jo,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(nc({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",mc[a],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(tc({activeIndex:t,onClick:f,listType:a}))}):null})),hc=(e=!1)=>({behavior:e?"auto":"smooth"}),pc=d((({className:e,disabled:t,...n})=>o(ye,{rounded:!0,className:u("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e),disabled:t,...n,children:o(ne,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),gc=d((e=>o(pc,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),fc=d((e=>o(pc,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),xc="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",bc=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:a,isBottom:l})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=a&&!l;return c("div",{className:e,children:[n?yc(t):null,i?o(gc,{className:u(vc(l),m?"left-1":"left-0"),onClick:s}):null,r?o(fc,{className:u(vc(l),m?"right-1":"right-0"),onClick:d}):null]})})),yc=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(xc,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(xc,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),vc=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),Nc=d((({className:e,version:t,gap:n=14,padding:a=16,visibleItemCount:l=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=dc({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===i?"relative h-full":""),children:[o(Jo,{containerRef:y,activeIndex:N,visibleItemCount:l,gap:n,padding:a,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(bc,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(uc,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),wc=({blocksToRender:e,...t})=>o(Nc,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:R(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",Wo(!0)),children:I(e,t)},String(n))})}),Cc=e=>e%2!=0,kc=d((({textNode:e,iconNode:t,tag:n,onClick:a,justifyContent:l="between",className:i,role:r,...s})=>c(n,{tag:n,className:u("flex items-center w-full gap-1","between"===l?"justify-between":"justify-center",i),onClick:a,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Sc=d((({className:e="",label:t,icon:n,dataTheme:a="pc",disabled:l=!1,onClick:i})=>o(kc,{tag:"button",onClick:i,disabled:l,"data-theme":a,justifyContent:"center",role:"button",className:u("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",l?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Me,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Tc=({isUnfolded:e,onToggle:t})=>o(Sc,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Ic=["ArrowDownIcon","ArrowUpIcon"],Bc="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Rc=({topItemsCount:e=0,label:t="",block:n,blocksToRender:a=[],...l})=>{const[i,r]=e>0?[a.slice(0,e),a.slice(e)]:[a,[]];return c("div",{className:u("space-y-2xs",{hidden:!a.length}),children:[c("div",{className:u(Bc),children:[R(i,{...l.options,parent:n}),Cc(i.length)?o(gt,{className:"col-span-6",...l}):null]}),o(Ei,{renderFoldableSection:({isUnfolded:e})=>c(Vi,{className:u(Bc),isUnfolded:e,children:[R(r,{...l.options,parent:n}),Cc(r.length)?o(gt,{className:"col-span-6",...l}):null]}),renderFoldButton:({isUnfolded:n,onToggle:a})=>o(Sc,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:Ic[Number(n)],dataTheme:l.options?.page?.colorPalette,onClick:a})})]})},Pc=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...a})=>{switch(e?.view){case"grid":return c("div",{children:[Dc(n,t),Rc({...e,...a,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[Dc(n,t),wc({...a,blocksToRender:t})]});default:return null}})),Dc=(e,t)=>e&&!t.length?o(Uo,{...e}):null,Mc=e=>t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:`sep-${a}`},n):[n]),[]),_c=d((({value:e,onChange:t,items:n=[],multiple:a})=>n.map((n=>o(ci,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const l=e?.includes(n);t(a?l?(e||[]).filter((e=>e!==n)):[...e||[],n]:l?[]:[n])})(n.value),type:a?"checkbox":"radio"},n.value))))),Ac=d((({children:e,filtrationSchema:t,resetButton:n,field:a,reset:l})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,Mc(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(zc(a)).filter(Boolean))]}),n?o("div",{children:o(jr,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:l,children:n?.text})}):null]}))),zc=e=>([t,n])=>{const a=n?.type;return"array"===a?Fc(t,e)(n):null},Fc=(e,t)=>n=>{const a=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Me,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(_c,{items:a,multiple:!n?.single,...t(e)})]},e)};function Ec(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Vc=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Oc=(e,t)=>Object.entries(e).map((([n,a])=>"number"==typeof a?Array.isArray(t[n])?((e,t)=>n=>Vc(t[e])||Vc(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Vc(t[e])||Vc(n[e])||Lc(t[e])<=Lc(n[e]))(n,e):"object"==typeof a&&"min"in a&&"max"in a?((e,t)=>n=>Vc(t[e])||Vc(n[e])||Lc(t[e]?.min)>=Lc(n[e]?.min)&&Lc(t[e]?.min)<=Lc(n[e]?.max))(n,e):Array.isArray(a)?((e,t)=>n=>Vc(t[e])||Vc(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Vc(t[e])||Vc(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Lc=e=>Number(e||0),jc=(e,{block:t,page:n,normalize:a=zt})=>{const l=t?.blocks||[],[i,{field:s,reset:o,update:c}]=Ft(e),d=r((()=>Ec(l,l.map((e=>mt(e.content,n?.fallback))))),[l,n?.fallback]),m=i===e?l:((e,t)=>(n=zt)=>e?.filter((([,e])=>Oc(t,n(e)||{}))).map((([e])=>e)))(d,i)(a);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},$c={},qc={},Uc=ht((({className:e,filtrationSchema:t=$c,consumerField:n={},resetButton:a,...l})=>{const[,{blocksToRender:i},{field:r,reset:s}]=jc(qc,{block:l.block,page:l.options?.page}),d=o(cn,{className:"w-64",label:n?.title,options:Wc(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Wc(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...l,children:[o(Ac,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(jr,{type:"reset",className:"mt-lg w-64",onClick:s,version:a?.version,children:a?.text})})]})}),o(Pc,{blocksToRender:i,...l})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Wc=e=>Ec(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Hc=(e=!1)=>e?"text-left":"text-center",Yc={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Kc=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:a,icon:l,...i})=>{const r=String(a?.width||t);return l?o("div",{style:{width:`${r}px`,height:`${r}px`},className:u("rounded-icon object-fit flex justify-center items-center",Yc[n],e),children:o(W,{...i,width:"54%",height:"54%",name:l})}):null})),Gc=d((({className:e="",title:t,benefitList:n,...a})=>{const l=Ce();return c(g,{className:e,defaultPadding:"p-6xl",...a,children:[t?o(N,{headingType:"h3",as:"h2",className:Hc(l),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Xc)}):null]})})),Xc=({label:e,description:t,__html:n,icon:a,isDotted:l=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[a?.icon?o(Kc,{className:"shrink-0",iconBgVersion:i,...a}):null,a?.src?o(ne,{className:"shrink-0",image:a}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o(Me,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Pe,{__html:n,isDotted:l,itemSize:"list-s"}):null]}):null]},String(r)),Jc=e=>({icon:t,title:n,description:a},l)=>c("div",{className:u("flex flex-col gap-1","items-center",{"justify-center":!a&&!n}),children:[n?o(Me,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ne,{image:t,height:"180",className:"w-auto mx-auto"}):null,a?o(Me,{size:"text-h6",font:"font-normal",align:e,children:a}):null]},String(l)),Zc=(e,t,n)=>o("div",{className:`grid gap-2xs ${Qc(t)}`,children:e.map(Jc(n))}),Qc=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},ed=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:a="4",subtitle:l,title:i,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(k,{defaultPadding:"",title:i,description:l,headlineVersion:"M"}),e?.length?Zc(e,a,t):null]}))),td={start:"justify-start",center:"justify-center",end:"justify-end"},nd=d((({buttons:e,className:t="",align:n,...a})=>{const l=n&&u("flex",td[n]);return o(g,{className:u("!bg-transparent",l,t),defaultPadding:"p-0",...a,children:Le(e)})})),ad=d((({className:e,title:t,children:n,...a})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...a,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),ld="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",id="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",rd="flex flex-col gap-y-xl min-w-52",sd=d((({value:e,fractionDigits:t,fixed:n,prefix:a,postfix:l})=>o(Me,{size:"text-h3",children:"number"==typeof e?[a,Ue(t,{fixed:n})(e),l].filter(Boolean).join(" "):e}))),od=d((({className:e,title:t,value:n,color:a="text-secondary-text",...l})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Me,{size:"text-l",font:"font-light",color:a,children:t}):null,n?o(sd,{value:n,...l}):o(Me,{size:"text-h3",children:"-"})]}))),cd=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,dd=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:a=2,depositeName:l,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Me,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ue(a,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),l&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:l}):null]})]}))),md=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),ud=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:a=2,color:l="text-secondary-text",children:i,...r})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o(dd,{title:e,rate:t,unit:n,fractionDigits:a,color:l,...r})}),o(od,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:a,fixed:!0,color:l,...r}),i]}):o(md,{title:e,...r}),hd=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...a})=>o(ha,{items:e?[`От ${Ue(1)(a.min||0)} ${n}`,`До ${Ue(1)(a.max||0)} ${n}`]:[],step:t,...a}),pd={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},gd={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},fd=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,[l,i]=((e,t,n)=>{const{maxBonus:a=5e3,prefMonthsNum:l=pd.prefMonthsNum,prefTravelBonusRate:i=pd.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),a);return[c,c*l+Math.min(Math.round(s*t)+Math.round(o*n),a)*(12-l)]})(t||gd,n,a);return{...t,...e,monthBonus:l,yearBonus:i}},xd=ht((({className:e="",title:t,calcSource:n,buttons:a,footnote:l,...i})=>{const[r,{field:s}]=Ft({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=fd(r,n);return o(ad,{className:e,title:t,...i,children:c("section",{className:u(ld,e),children:[c("div",{className:id,children:[hd({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),hd({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?ud({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:rd,children:[f>=0?o(od,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,Le(a,{isVertical:!0}),cd(l)]})]})})})),bd=Math.round(29.5),yd=(e,t=0)=>e?.sum?e.sum:t,vd=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Nd=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,wd=({items:e,title:t,mobileTitle:n=t,orientation:a="horizontal",value:l,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Me,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Me,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(vl,{orientation:a,items:e,value:e[l?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),Cd=e=>wd({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),kd=" (c капитализацией)",Sd=({income:e,finalSum:t,postfix:n="₽",buttons:a=[],footnotes:l=[],isCapitalization:i=!1})=>c("div",{className:rd,children:[o(od,{title:`Доход в конце срока${i?kd:""}`,value:e,postfix:n,prefix:"+"}),o(od,{title:`Сумма в конце срока${i?kd:""}`,value:t,postfix:n}),Le(a,{isVertical:!0}),l?.map(cd)]}),Td=([e,t],n,a=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Id([e,t],a),Id=([e,t],n=[])=>({[e]:n.length?sc(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?ic(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Bd=(e,[t,n],a)=>e>=a[t]&&e<=a[n],Rd={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Pd={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Dd=(e,t)=>{const{daysValue:n,moneyValue:a,isPartialWithdrawal:l,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||l,o=n<90||n>730,c=function(e){const t=e?.rateType?Rd[e?.rateType]:"",{data:n}=jn(t?`/api/v1/depositrates/${t}`:null,st);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&Md(s,e)&&Bd(a,["minSum","maxSum"],e)&&Bd(n,["minDays","maxDays"],e)))||Pd,{rate:m}=d,u=_d(m,e),h=a+u,p=c||[Pd];return{...d,...Id(["minSum","maxSum"],p),...Id(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},Md=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,_d=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,daysValue:l}=t;return n?Math.round(a*Math.pow((1200+e)/1200,l/30)-a):Math.round(a*e*l/365/100)},Ad=ht((({className:e="",title:t,buttons:n,footnote:a,bottomFootnote:l,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=Ft({moneyValue:yd(r,1e5),daysValue:vd(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=Dd(m,s),{income:g,finalSum:f,rate:x,depositeName:b}=p;return o(ad,{className:e,title:t,...d,children:c("section",{className:u(ld,e),children:[c("div",{className:id,children:[hd({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(ha,{items:[`От ${Nd(y.min||0)}`,`До ${Nd(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[zd(p,h),Cd({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),ud({rate:x,depositeName:b,isShowDepositeName:i}),Sd({income:g,finalSum:f,buttons:n,footnotes:[a,l]})]})});var y})),zd=(e,t)=>c("div",{className:"space-y-s",children:[o(Me,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(ea,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(ea,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Fd=(e=[],t=!1)=>Ed([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Ed=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Vd=({min:e=0,max:t=0,availableMonths:n,...a})=>o(ha,{items:[`От ${Od(e)}`,`До ${Od(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...a}),Od=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Ld=e=>wd({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),jd=({field:e,defParams:t,calcParams:n,map:a,monthsValue:l="maxMonths"})=>{Object.entries(a).forEach((([n,a])=>{e?.(n)?.onChange?.(t?.[a])})),e?.("monthsValue")?.onChange?.(oa(t?.[l],n.minMonths,n.maxMonths))},$d=(e,t)=>{const{isAnnuity:n,moneyValue:a,monthsValue:l,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(a+i)*(t+t/(Math.pow(1+t,l)-1)):a*(t+t/(Math.pow(1+t,l)-1))}return Math.round(a/l)+a*(e/1200)},qd={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Ud=e=>Wd({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Wd({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Wd({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Wd({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Wd=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:l})=>!!n&&!n[l]||t[a]===e[a],Hd=(e,t,n)=>{const{moneyValue:a,monthsValue:l}=e,i=t?.rateRows||[qd],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Ud({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=Td(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=Td(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:l})=>e?.find((e=>Ud({row:e,userInputParams:t,paramsViewSettings:n})&&Bd(a,["minSum","maxSum"],e)&&Bd(l,["minMonths","maxMonths"],e)))||qd)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:l}),{rate:u}=m,h=$d(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:a,monthsValue:l,monthlyPayment:h}},Yd=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Kd={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Gd=ht((({className:e,title:t,calcSource:n,buttons:a,footnote:i,paramsViewSettings:r,defaultParams:s,registerSubmit:d,...m})=>{const h=(p=n?.rateRows,Ed([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:f,onSubmit:x}]=Ft({moneyValue:yd(s,2e5),monthsValue:vd(s,bd),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)});d?.(x);const b=Hd(g,n,r),y=Ld({title:"Тип платежа",orientation:"vertical",...f("isAnnuity")}),{onChange:v}=f("moneyValue"),{onChange:N}=f("monthsValue");return l((()=>{v&&v(oa(g.moneyValue,b.minSum,b.maxSum))}),[b.minSum,b.maxSum]),l((()=>{N&&N(oa(g.monthsValue,b.minMonths,b.maxMonths))}),[b.minMonths,b.maxMonths]),l((()=>{!Yd(s)&&h&&jd({field:f,defParams:h,calcParams:b,map:Kd,monthsValue:"minMonths"})}),[n,s]),o(ad,{className:e,title:t,...m,children:c("section",{className:u(ld,e),children:[c("div",{className:id,children:[hd({title:"Сумма кредита, ₽",step:500,min:b.minSum,max:b.maxSum,...f("moneyValue"),value:b.moneyValue}),Vd({title:"Срок кредита, месяцев",min:b.minMonths,max:b.maxMonths,...f("monthsValue"),value:b.monthsValue}),Xd({...b,...r},f),o("div",{className:"sm:hidden",children:y})]}),c("div",{className:u(rd,"@4xl:w-1/2"),children:[o(od,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(od,{title:"Ставка",value:b?.rate,fractionDigits:2,postfix:"%"}),o(od,{title:"Ежемесячный платёж",value:b.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:y}),Le(a,{isVertical:!0}),cd(i)]})]})})})),Xd=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(ea,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(ea,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(ea,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(ea,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Jd=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,a]=t[n-1],[l,i]=t[n];a>=l?t.splice(n-1,2,[e,Math.max(a,i)]):n++}return t},Zd={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Qd=(e,t,n)=>{const{moneyValue:a,monthsValue:l}=e,i=t?.[0]?nm(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[tm({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),tm({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),tm({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),tm({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,Bd(a,["minSum","maxSum"],t),Bd(l||i,["minMonths","maxMonths"],t)].every(Boolean)))||Zd,{rate:u}=m,h=em(u,e),p=a+h,g=t||[Zd];return{...m,...Id(["minSum","maxSum"],g),...Id(["minMonths","maxMonths"],g),availableMonths:Jd(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((a,l)=>t>=e?e+l*n:e-l*n)))(e,t))),...e,defaultMonth:i,income:h,finalSum:p}},em=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:a,monthsValue:l}=t;return n?Math.round(a*Math.pow((1200+e)/1200,l)-a):Math.round(a*e*30*l/365/100)},tm=({row:e,userInputParams:t,paramKey:n,isExclude:a})=>a||t[n]===e[n],nm=(e,t)=>e+Math.round((t-e)/2),am=(e="rub")=>"rub"===e,lm=(e,t)=>{const{minMonths:n,maxMonths:a}=Id(["minMonths","maxMonths"],om(t,e?.currency)),l=e.monthsValue||Math.round((n+a)/2);return{monthsValue:oa(l,n,a)}},im=(e,t)=>{const{minSum:n,maxSum:a}=Id(["minSum","maxSum"],om(t,e?.currency)),l=e.moneyValue||n;return{moneyValue:oa(l,n,a)}},rm=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),sm=e=>{const t=am(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},om=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},cm=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?wd({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?wd({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),dm(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Cd({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(a={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},wd({...a,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),dm(e.isShowNewClient),e.isShowNewClient?o(ea,{text:"Новый вкладчик",...t("isNewClient")}):null]});var a},dm=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,mm={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},um={text:"₽",key:"rub"},hm=ht((({className:e,title:t,calcSource:n,buttons:a=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[um],g=i((e=>t=>e?{...t,...sm(t),...im(t,e),...lm(t,e),...rm(t,e)}:t)(h),[h]),[f,{field:x}]=Ft({moneyValue:yd(d,2e4),monthsValue:vd(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:um},{normalize:g}),b=x?.("currency")?.value??um,y=x?.("isNewClient")?.value,v=om(h,b),N=Qd(f,v,s),{rate:w,income:C,finalSum:k,type:S=""}=N,T=i((()=>{jd({field:x,defParams:Fd(v,y),calcParams:N,monthsValue:"minMonths",map:mm})}),[x,h]);l((()=>{!Yd(d)&&v&&T()}),[d,h]);const I=w===Fd(v,y)?.rate;return o(ad,{className:e,title:t,...m,children:c("section",{className:u(ld,e),children:[c("div",{className:id,children:[c("div",{className:"flex gap-m",children:[hd({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:pm(b?.key)}),h&&h?.length>1?o(hn,{label:"Валюта",options:p,...x("currency")}):null]}),Vd({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),cm({...N,...s},x)]}),ud({rate:w,children:fm(T,I)}),Sd({income:C,finalSum:k,buttons:[...a,gm(n?.buttons,S)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),pm=(e="")=>am(e)?1e3:100,gm=(e=[],t="")=>{const{type:n,...a}=e.find((e=>e.type===t))??{};return a},fm=(e,t=!1)=>t?null:o(jr,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),xm=e=>bm({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&bm({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),bm=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:a,viewSettingFieldKey:l})=>!!n&&!n[l]||t[a]===e[a],ym={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},vm=(e,t,n)=>{const{moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[ym],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>xm({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=Td(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=Td(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>xm({row:e,userInputParams:t,paramsViewSettings:n})&&Bd(a+r,["minSum","maxSum"],e)&&Bd(i,["minSumOld","maxSumOld"],e)&&Bd(r,["minSumExtra","maxSumExtra"],e)&&Bd(l,["minMonths","maxMonths"],e)))||ym)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=h,g=$d(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:a,monthsValue:l,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:f}},Nm=ht((({className:e="",title:t,calcSource:n,buttons:a,footnote:l,paramsViewSettings:i,...r})=>{const[s,{field:d}]=Ft({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=vm(s,n,i),h=Ld({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(ad,{className:e,title:t,...r,children:c("section",{className:u(ld,e),children:[c("div",{className:id,children:[hd({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),hd({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Vd({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),wm({...m,...i},d),m.isExtraMoney?hd({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:h})]}),c("div",{className:u(rd,"@4xl:w-1/2"),children:[o(od,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(od,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(od,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(od,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),Le(a,{isVertical:!0}),cd(l)]})]})})})),wm=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(ea,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(ea,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(ea,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Cm=d((e=>{const{onChange:t,min:n,max:a,defaultValue:l="0",fractionDigits:r=0,...s}=e,c=sa(e,{normalize:(e=l)=>n&&a?String(oa(Number(km(e)),n,a)):km(e),format:Ue(r)}),d=i((e=>t&&t(km(e))),[t]);return o(Yt,{onChange:d,...s,...c})})),km=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Sm=d((e=>o(Cm,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Me,{size:"text-xl",font:"font-light",children:"₽"})})}))),Tm={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Im={amount:1500},Bm=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=Ft(Im),[h,p]=a(!1);return l((()=>{p(d<=0)}),[d]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Tm[r],children:[o(Sm,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(jr,{className:"w-full mt-lg",type:"submit",disabled:h,children:i.text}):null]})]})})),Rm=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Pm="relative h-full",Dm={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Mm=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...a})=>{const{blocks:l}=a.block||{},i=l?.some(zm),r=n?{defaultPadding:"p-6xl pb-m"}:{};return P({...a,renderProps:(n,a,l)=>c("div",{className:_m(n,{someCardsHighlighted:i}),children:[I(n,a,{className:Am(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:l}),zm(n)?Rm({className:"absolute top-0 -right-4 z-40"}):null]},String(l))})},_m=(e,{someCardsHighlighted:t})=>u(Pm,t&&(zm(e)?"pt-3xl":"pt-3xl sm:pt-16")),Am=(e,{someCardsHighlighted:t,showBorder:n,cardSize:a="normal"})=>u(Pm,"min-w-80",Dm[a],t&&(zm(e)?"pt-3xl sm:pt-16":"pt-3xl"),Wo(n),n&&"h-full"),zm=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Fm=ht((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:a=!0,isGap:l=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(Nc,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:l?16:0,padding:0,arrowsPadded:a,navButtons:r?Em(s?.block?.blocks):[],hasBlur:!0,children:Mm({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Em=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Vm="z-10 border border-solid w-full h-full",Om=u(Vm,"absolute hidden @xl:block border-transparent"),Lm=d((({className:e,title:t,description:n,button:a,...l})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...l,children:c("div",{className:"relative h-full",children:[o("div",{className:u(Om,"top-9 right-12 bg-green-dark")}),o("div",{className:u(Om,"top-6 right-8 bg-green")}),o("div",{className:u(Om,"top-3 right-4 bg-green-light")}),c("div",{className:u(Vm,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(k,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Le([a],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),jm={black:"bg-black",white:"bg-white"},$m=d((({className:e="",title:t,description:n,image:a,price:l,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:u("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Te,{className:"h-full",padding:d,title:o(k,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:a?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:a}):null,buttons:Le([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Me,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(qm)]}):null,l?c(Me,{size:"text-h3",align:"text-left",children:[l," ₽"]}):null]})}))),qm=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${jm[e]}`},String(t)),Um=d((({icon:e,...t})=>{const n=ue(),{text:a,href:l,target:i,onClick:r}=n(t);return a?o("div",{className:u("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:l,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:a}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:a})]})})}):null})),Wm=d((({className:e,additionalDescription:t,description:n,links:a,title:l,...i})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(k,{isEmbedded:!0,title:l,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(k,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),a?.length?Hm(a):null]})}))),Hm=e=>o("div",{className:u("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(Um,{...e},String(t))))}),Ym=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Km=d((({className:e="",href:t,target:n,onClick:a,data:l,children:i})=>{const r=ue()({href:t,target:n,onClick:a});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...pe(l),children:i})})),Gm=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],Xm=d((({className:e="",media:t,showButtonText:n,stretched:l,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=a(),m=t?.map((e=>{const{href:t,icon:a,text:l}=e,{iconMapped:r}=(e=>Gm.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Oe(a)?a:r,c=n?{text:l}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&l&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),h=u("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},Jm(l));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:Le(m,{className:Zm(s??!1,l??!1,n),buttonClassName:h})}),r?o(Me,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Jm=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",Zm=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),Qm=d((({className:e,padding:t,description:n,additionalDescription:a,href:l,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:u("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(Km,{href:l,target:m,className:"h-full",data:Ym(v),children:c(Te,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(k,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Je(Oe(i)?o(ne,{image:i}):null,x),buttons:d.length?o(Xm,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Ve,{benefits:f}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,eu(a,p)]})})}))),eu=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,tu=(e,t)=>{const{title:n,description:a,buttons:l}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Me,{size:"text-m",color:"text-secondary-text",children:n})}):null,a?o("div",{className:"mt-2xs",children:o(Me,{size:"text-xl",color:"text-primary-text",children:a})}):null,l?.length?o("div",{className:"text-primary-main",children:Le(l)}):null]},String(t))},nu=d((({className:e="",title:t,align:n="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:h,...p})=>{const f=d.map(tu),[x,b]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[y,v]=a(!1);return l((()=>ce.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[Oe(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(N,{className:u("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(ye,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(Ei,{renderFoldableSection:()=>c("div",{children:[x,o(Vi,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?au(m?.parent,h,y):null}):o("div",{children:x})]})})),au=(e,t,n=!1)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==e&&ce.fire("fold",{type:"fold",isUnfolded:!n,parent:e})},type:"button",...n?pe(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),lu=d((({className:e,contacts:t,info:n,version:a="secondary",...l})=>c(g,{className:u("flex",e),defaultPadding:"p-6xl",version:a,...l,children:[n?.length?iu(n):null,t?.length?iu(t):null]}))),iu=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>ru({column:e,i:t})))}),ru=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:a},l)=>c("div",{children:[o(k,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:u({"mt-xl":Boolean(a?.text)}),children:Le([a])})]},String(l))))},`col-${String(t)}`):null,su=d((({step:e=10,description:t,showPercentage:n=!0})=>c("div",{children:[o("div",{className:"h-4 w-full bg-gray relative",children:o("div",{className:"h-4 bg-green",style:{width:`${e}%`}})}),c("div",{className:"relative",children:[n?c("div",{className:"absolute left-2/4 text-green",children:[e,"%"]}):null,t?o("div",{className:"text-right mr-4 text-gray",children:t}):null]})]}))),ou=d((({step:e=1,totalSteps:t=6,stepsTitles:n=[]})=>{const a=r((()=>(e+1)/t*100),[e,t]);return o("div",{className:"py-lg px-5xl bg-white col-span-12",children:c("div",{children:[c("span",{className:"font-bold mr-s",children:["Шаг ",e+1," из ",t,"."]}),n[e]||null,o(su,{step:a,showPercentage:!1})]})})}));var cu;!function(e){e.process="IN_PROCESS",e.ok="OK",e.fail="FAILED",e.rework="REWORK"}(cu||(cu={}));const du=e=>cl("/user-data/getTaskStatus","POST",e),mu=e=>cl("/user-data/sendSignalToProcess","POST",e),uu=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:l,sectionAdditionalTitle:i,sectionInfoAdditional:r,buttonText:s,interval:d,...m})=>c(g,{...m,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Lo,{interval:d}):null]}),o(hu,{title:a,items:l}),o(hu,{title:i,items:r,countColumns:!0}),n?.__html?o(Oo,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(ye,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),hu=({title:e,items:t,countColumns:n=!1})=>{const a=Ce();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Me,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Cs(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:pu(e)},t)))}):null]})]}):null},pu=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Me,{color:"text-secondary-text",size:"text-l",children:e}),o(Me,{color:"text-primary-text",size:"text-xl",children:t})]}),gu=d((()=>o(uu,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),fu=d((()=>{const[e]=Vs("leadForm");return o(uu,{interval:300,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Цель кредита",description:"На любые цели"},{label:"Сумма",description:e?.moneyValue?.toLocaleString()+" ₽"},{label:"Срок кредита",description:e?.monthsValue+" мес"},{label:"Тип платежа",description:e?.isAnnuity?"Аннуитетный":"Дифференцированный"}]})})),xu=d((()=>{const[e]=Vs("leadForm");return o(uu,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail?.text},{label:"Адрес",description:e?.addressRetail?.text}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),bu=d((()=>{const[e]=Vs("leadForm");return o(uu,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.monthsValue+" мес"},{label:"Тип платежа",description:e?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),yu=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],vu=d((()=>{const[e,t]=a(cu.process),[n]=Vs("taskId");return l((()=>{for(const e of yu)mu({signalType:e,taskId:n});const e=setInterval((()=>du({taskId:n}).then((n=>{n.statusCd&&n.statusCd!==cu.process&&(clearInterval(e),t(n.statusCd))}))),3e4)}),[]),Nu(e)})),Nu=e=>({IN_PROCESS:o(fu,{}),FAILED:o(gu,{}),OK:o(bu,{}),REWORK:o(xu,{})}[e]||null),wu={0:{paymentSystem:bi[0].id,currency:"rub",codeWord:""},1:{surname:"",name:"",middleName:"",sex:"",birthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:""},2:{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:"",inn:void 0,jobsNumber:"",lastJobExperience:"",legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},3:{familyStatus:{key:"",text:""},dependents:void 0,familyMembers:void 0,confirmationIncome:{key:"",text:""},mandatoryIncome:void 0,otherPayments:void 0,snils:"",armyIdFlg:!1},4:{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},5:{regionRetail:"",addressRetail:{fullAddress:"",fiasCode:""},addressCourier:{fullAddress:"",fiasCode:""},bankEmployeeCode:"",methodObtain:"office",deliveryDate:void 0}},Cu=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const a=t?.[e?.condition?.name??""];return n===(a?.key??a)})))),ku=(e,t=[])=>{const n=t.filter((e=>"info"===e.fieldType)),a=Cu(n,e);return a.length?a.map((({text:e,name:t},n)=>o(Oo,{__html:e},`${t}_${n}`))):null},Su=({field:e,inputs:t})=>(t||[])?.map(ws(e,"")),Tu=({sections:e,field:t,userInputParams:n})=>e?.map((({inputs:e,columns:a,title:l},i)=>c("div",{className:u(Cs(a),"grid gap-x-m"),children:[ku(n,e),ks(l),Su({field:t,inputs:e})]},`section-${i}`))),Iu=d((({step:e,onPrevStep:t})=>{const n=0===e;return c("div",{className:"flex justify-between gap-m",children:[o(jr,{onClick:t,className:u("w-full @xl:w-auto"),type:"button",version:"secondary",disabled:n,children:"Назад"}),o(jr,{className:"w-full @xl:w-auto",type:"submit",children:"Далее"})]})})),Bu=(e,t)=>{switch(e){case 0:return(e=>{const{currency:t,paymentSystem:n,cardCategory:a,codeWord:l}=e;return{currencyCode:t,paymentSystemTypeCd:n,classCard:a,codeWord:l}})(t);case 1:return(e=>{const{name:t,surname:n,middleName:a,birthday:l="",phone:i="",email:r,sex:s,birthPlace:o,dulIssueDateField:c="",dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,education:p,participantDateRegistration:g="",housing:f,addressRegistration:x,addressFact:b}=e;return{birthDate:xt(l,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:xt(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:xt(g,!0),houseTypeCd:f,participantContacts:Io({phone:bt(i),email:r}),participantAddresses:Bo({addressRegistration:x,addressFact:b}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}})(t);case 2:return(e=>{const{employment:t,organizationName:n,inn:a,legalForm:l,organization:i,amountWorkers:r,employerActivities:s,employerOrganization:o,generalSeniority:c,lastJobExperience:d,experience5Years:m,jobsNumber:u,organizationPhone:h,organizationAddress:p,positionOrganization:g}=e;return{employmentTypeCd:t,organizationName:n,organizationInn:a,organizationActivityTypeCd:s,organizationTypeCd:i,organizationKindCd:o,employeesNumberCd:r,opf:l,seniority:c,generalSeniority:m,jobsNumber:u,lastWorkDuration:d,positionCd:g,participantContacts:Io({organizationPhone:h&&bt(h)}),participantAddresses:Bo({organizationAddress:p})}})(t);case 3:return(e=>{const{familyStatus:t,dependents:n,familyMembers:a,mandatoryIncome:l,otherPayments:i,snils:r,armyIdFlg:s}=e;return{maritalStatusCd:t,totalDependents:a,otherDependents:n,participantIncomes:Ro({mandatoryIncome:l,otherPayments:i}),snils:r?.replaceAll(" ",""),armyIdFlg:s}})(t);case 4:return(e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:l}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:l}})(t);default:return{}}},Ru=({step:e,inputs:t,onNextStep:n,saveStep:a,finishForm:l})=>{const[r]=Vs("taskId"),[s]=Vs("profileId"),[o]=Vs("participantId"),c=i((async i=>{const c=Cu(t,i),d=Is(Dn(Pu(i,c,e)));if(!pn(d(i)))return console.warn("validation fail");a(i);try{r&&s&&o&&await Ys((({participantId:e,taskId:t,profileId:n,formData:a,step:l=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:globalThis.location.origin,id:t,authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...Bu(l,a)}]}}))({participantId:o,taskId:r,profileId:s,step:e,formData:i}))}catch(e){return"Fail"}return n(),5===e&&l?.(!0),"OK"}),[]);return{handleSubmit:c}},Pu=(e,t,n)=>2===n&&"employment"in e&&"RETIREE"===e?.employment?.key?[]:t,Du=d((({step:e,sections:t,onPrevStep:n,onNextStep:a,inputs:l,isFormFinished:r,finishForm:d})=>{const[m,u]=Vs("leadForm"),h=((e,t)=>(t&&(t.birthday=t.birthday?new Date(t.birthday):void 0,t.dulIssueDateField=t.dulIssueDateField?new Date(t.dulIssueDateField):void 0,t.participantDateRegistration=t.participantDateRegistration?new Date(t.participantDateRegistration):void 0,t.beginDate=t?.beginDate?new Date(t.beginDate):void 0,t.deliveryDate=t?.deliveryDate?new Date(t.deliveryDate):void 0),{...wu[e],...t}))(e,m),p=s(void 0),g=i((e=>{p.current=e}),[]),{handleSubmit:f}=Ru({step:e,inputs:l,onNextStep:a,saveStep:u,finishForm:d}),[x,{field:b,onSubmit:y}]=Ft(h,{onSubmit:(e,t)=>{f({...e,...p.current?.(t)})}});return r?o(vu,{}):c("form",{onSubmit:y,className:"space-y-m",children:[Tu({sections:t,field:b,registerSubmit:g,userInputParams:x}),o(Iu,{step:e,onPrevStep:n})]})})),Mu=[[{title:"Параметры карты",inputs:[]},{inputs:[{fieldType:"common",name:"currency",required:!0},{fieldType:"common",name:"paymentSystem",required:!0},{fieldType:"common",name:"cardCategory",required:!0},{fieldType:"common",name:"codeWord",required:!0}]}],[{title:"Персональные данные",columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"name",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"middleName",dadata:!0,filledByEsia:!0},{fieldType:"common",name:"sex",required:!0},{fieldType:"common",name:"birthday",required:!0,filledByEsia:!0},{fieldType:"common",name:"birthPlace",required:!0},{fieldType:"common",name:"phone",required:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{fieldType:"common",name:"dulSerie",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulNumber",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulIssueDateField",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{fieldType:"common",name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"addressMatch"}]},{columns:2,inputs:[{fieldType:"common",name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{fieldType:"common",name:"housing",required:!0}]},{inputs:[{fieldType:"common",name:"addressFact",required:!0,dadata:!0}]}],[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{fieldType:"info",text:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{fieldType:"common",name:"employment"},{fieldType:"common",name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{fieldType:"common",name:"inn",required:!0,dadata:!0},{fieldType:"common",name:"legalForm",required:!0}]},{inputs:[{fieldType:"common",name:"organization",required:!1},{fieldType:"common",name:"amountWorkers",required:!1}]},{columns:2,inputs:[{fieldType:"common",name:"employerActivities",required:!1},{fieldType:"common",name:"employerOrganization",required:!1},{fieldType:"common",name:"generalSeniority",required:!0},{fieldType:"common",name:"lastJobExperience",required:!0},{fieldType:"common",name:"experience5Years",required:!0},{fieldType:"common",name:"jobsNumber",required:!0}]},{inputs:[{fieldType:"common",name:"organizationPhone",label:"Телефон работодателя",required:!0},{fieldType:"common",name:"beginDate",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"positionOrganization",required:!1},{fieldType:"common",name:"partInBusiness",required:!0}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{fieldType:"common",name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{fieldType:"common",name:"familyStatus",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"dependents",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{fieldType:"info",text:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{fieldType:"common",name:"mandatoryIncome",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"otherPayments",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"snils",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"conscription",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"armyIdFlg"}]}],[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"disablePeopleFlg"}]},{inputs:[{fieldType:"common",name:"bankruptcyFlg"}]},{inputs:[{fieldType:"common",name:"shareholderFlg"}]},{inputs:[{fieldType:"common",name:"legalEntityName"}]},{inputs:[{fieldType:"common",name:"creditInRshbCd"}]}],[{title:"Способ получения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"methodObtain"}]},{title:"Адрес",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressCourier",dadata:!0,condition:{name:"methodObtain",values:["courier"]},required:!0},{fieldType:"common",name:"deliveryDate",condition:{name:"methodObtain",values:["courier"]},required:!0},{fieldType:"common",name:"comment",condition:{name:"methodObtain",values:["courier"]}}]},{inputs:[{fieldType:"common",name:"regionRetail",required:!0,condition:{name:"methodObtain",values:["office"]}},{fieldType:"common",name:"addressRetail",required:!0,condition:{name:"methodObtain",values:["office"]}}]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код",condition:{name:"methodObtain",values:["office"]}},{fieldType:"common",name:"bankEmployeeCode",condition:{name:"methodObtain",values:["office"]}}]}]],_u=["Параметры карты","Персональные данные","Данные о трудоустройстве","Данные о доходах и расходах","Дополнительные сведения","Выбор способа получения"],Au=d((({className:e,...t})=>{const[n,l]=a(0),s=i((()=>{l((e=>Math.min(e+1,6)))}),[]),d=i((()=>{l((e=>Math.max(e-1,0)))}),[]),m=r((()=>Mu[n]),[n]),h=m?.flatMap((e=>e?.inputs))||[],[p,f]=a(!1);return o(g,{className:u("bg-transparent",e),defaultPadding:"p-0",...t,children:c("div",{className:"container grid grid-cols-12",children:[p?null:o(ou,{stepsTitles:_u,step:n,totalSteps:6}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(Du,{step:n,inputs:h,sections:m,onNextStep:s,onPrevStep:d,isFormFinished:p,finishForm:f},String(n))})]})})})),zu=()=>{const e=globalThis.sessionStorage?.getItem("refreshToken"),t=globalThis.sessionStorage?.getItem("accessToken"),n=globalThis.localStorage.getItem("taskId");if(!t||!e||!n)return globalThis.location.href="/",()=>null;const a=async()=>{const n=await cl("/auth/refresh","POST",{refresh_token:e,access_token:t});n instanceof Response?Fu(n.status):(globalThis.sessionStorage.setItem("refreshToken",n.refresh_token),globalThis.sessionStorage.setItem("accessToken",n.access_token))};a();const l=setInterval(a,24e4);return()=>clearInterval(l)},Fu=e=>{401==e&&(globalThis.location.href="/")},Eu=d((({step:e=1,totalSteps:t=5,stepsTitles:n=[]})=>{const a=r((()=>e/t*100),[e,t]);return o("div",{className:"py-lg px-5xl bg-white col-span-12",children:c("div",{children:[c("span",{className:"font-bold mr-s",children:["Шаг ",e," из ",t,"."]}),n[e]||null,o(su,{step:a,showPercentage:!1})]})})})),Vu=d((({title:e,description:t,infoCard:n,sectionInfoTitle:a,sectionInfo:l,sectionAdditionalTitle:i,sectionInfoAdditional:r,buttonText:s,interval:d,...m})=>c(g,{...m,children:[c("div",{className:"flex flex-col md:flex-row items-center",children:[o(k,{headlineVersion:"M",title:e,description:t,align:"text-left",padding:"p-xl",className:"w-full"}),d?o(Lo,{interval:d}):null]}),o(Ou,{title:a,items:l}),o(Ou,{title:i,items:r,countColumns:!0}),n?.__html?o(Oo,{__html:n?.__html,icon:n?.icon,link:{text:n?.link?.text}}):null,s?o(ye,{href:"/natural",text:s,version:"primary",className:"w-full mt-lg"}):null]}))),Ou=({title:e,items:t,countColumns:n=!1})=>{const a=Ce();return t?c("div",{children:[o("hr",{className:"w-full h-px bg-main-gray border-0"}),c("div",{className:"p-xl",children:[e?o(Me,{color:"text-primary-text",size:"text-h5",children:o("div",{className:u({"mb-m":Boolean(e)}),children:e})}):null,t?o("div",{className:u("grid grid-cols-1 gap-m",Cs(n||a?1:2)),children:t.map(((e,t)=>o("div",{children:Lu(e)},t)))}):null]})]}):null},Lu=({label:e,description:t})=>c("div",{className:"flex flex-col",children:[o(Me,{color:"text-secondary-text",size:"text-l",children:e}),o(Me,{color:"text-primary-text",size:"text-xl",children:t})]}),ju=d((()=>o(Vu,{title:"Благодарим Вас за ожидание",description:"В настоящий момент Банк не может одобрить Вашу заявку на кредит. Попробуйте подать заявку позже. Спасибо за обращение в АО «Россельхозбанк».",buttonText:"Вернуться на главную"}))),$u=d((()=>{const[e]=Vs("leadForm");return o(Vu,{interval:300,title:"Заявка успешно отправлена",description:"Не закрывайте окно, скоро сообщим результат",sectionInfoTitle:"Заявленные условия по кредиту",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Цель кредита",description:"На любые цели"},{label:"Сумма",description:e?.moneyValue?.toLocaleString()+" ₽"},{label:"Срок кредита",description:e?.monthsValue+" мес"},{label:"Тип платежа",description:e?.isAnnuity?"Аннуитетный":"Дифференцированный"}]})})),qu=d((()=>{const[e]=Vs("leadForm");return o(Vu,{title:"Благодарим вас за ожидание, но нам требуется больше времени для принятия решения",description:"Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.",sectionAdditionalTitle:"В отделении Банка",sectionInfoAdditional:[{label:"Регион",description:e?.regionRetail?.text},{label:"Адрес",description:e?.addressRetail?.text}],sectionInfo:[{label:"Основные документы:",description:"- Паспорт РФ"}],buttonText:"Вернуться на главную"})})),Uu=d((()=>{const[e]=Vs("leadForm");return o(Vu,{title:"Банк одобрил вам кредит",description:"Обратитесь в отделение банка, чтобы завершить оформление и получит ваш кредит",sectionInfo:[{label:"Название продукта",description:"Кредит на любые цели"},{label:"Ставка",description:"14,5%"},{label:"Ежемесячный платеж",description:"86 052 ₽"},{label:"Срок кредита",description:e?.monthsValue+" мес"},{label:"Тип платежа",description:e?.isAnnuity?"Аннуитетный":"Дифференцированный"}],buttonText:"Вернуться на главную"})})),Wu=["CREATE_APPLICATION_SHORT_SIGNAL","CREATE_APPLICATION_LOAN_V3_SIGNAL"],Hu=d((()=>{const[e,t]=a(cu.process),[n]=Vs("taskId");return l((()=>{for(const e of Wu)mu({signalType:e,taskId:n});const e=setInterval((()=>n&&du({taskId:n}).then((n=>{n.statusCd&&n.statusCd!==cu.process&&(clearInterval(e),t(n.statusCd))}))),3e4);return()=>clearInterval(e)}),[]),Yu(e)})),Yu=e=>({IN_PROCESS:o($u,{}),FAILED:o(ju,{}),OK:o(Uu,{}),REWORK:o(qu,{})}[e]||null),Ku={0:{moneyValue:0,monthsValue:0,isAnnuity:!1,isInsurance:!1,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1},1:{surname:"",name:"",middleName:"",sex:"",birthday:void 0,birthPlace:"",phone:"",email:"",dulSerie:void 0,dulNumber:void 0,dulIssueDateField:void 0,dulSubdivisionCode:"",dulIssuedBy:"",addressRegistration:{fullAddress:"",fiasCode:""},participantDateRegistration:void 0,addressFact:{fullAddress:"",fiasCode:""},housing:""},2:{amountWorkers:{key:"",text:""},beginDate:void 0,employerActivities:{key:"",text:""},employerOrganization:{key:"",text:""},employment:{key:"",text:""},experience5Years:"",inn:void 0,jobsNumber:"",lastJobExperience:"",legalForm:"",organization:{key:"",text:""},organizationAddress:{fullAddress:"",fiasCode:""},organizationName:"",organizationPhone:"",partInBusiness:void 0,positionOrganization:{key:"",text:""}},3:{familyStatus:{key:"",text:""},dependents:void 0,familyMembers:void 0,confirmationIncome:{key:"",text:""},mandatoryIncome:void 0,otherPayments:void 0,snils:"",armyIdFlg:!1},4:{disablePeopleFlg:!1,bankruptcyFlg:!1,shareholderFlg:!1,legalEntityName:"",creditInRshbCd:void 0},5:{regionRetail:"",addressRetail:"",bankEmployeeCode:""}},Gu=(e=[])=>{const t=e.filter((e=>"info"===e.fieldType));return t.length?t.map((({text:e,name:t},n)=>o(Oo,{__html:e},`${t}_${n}`))):null},Xu=({field:e,inputs:t})=>(t||[])?.map(ws(e,"")),Ju=({sections:e,field:t})=>e?.map((({inputs:e,columns:n,title:a},l)=>c("div",{className:u(Cs(n),"grid gap-x-m"),children:[Gu(e),ks(a),Xu({field:t,inputs:e})]},`section-${l}`))),Zu=d((({step:e,onPrevStep:t})=>{const n=0===e;return c("div",{className:"flex justify-between",children:[o(jr,{onClick:t,className:u("w-full @xl:w-auto"),type:"button",version:"secondary",disabled:n,children:"Назад"}),o(jr,{className:u("w-full @xl:w-auto"),type:"submit",children:"Далее"})]})})),Qu={annuity:{key:"ANNUITY",value:"Аннуитетный"},differential:{key:"DIFFERENTIAL",value:"Дифференцированный "}},eh=(e,t)=>{switch(e){case 0:return(e=>{const{moneyValue:t,monthsValue:n,isAnnuity:a}=e;return{loanAmount:t,creditPeriod:n,paymentTypeCd:Qu[a?"annuity":"differential"]}})(t);case 1:return(e=>{const{name:t,surname:n,middleName:a,birthday:l="",phone:i="",email:r,sex:s,birthPlace:o,dulIssueDateField:c="",dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,education:p,participantDateRegistration:g="",housing:f,addressRegistration:x,addressFact:b}=e;return{birthDate:xt(l,!0),midname:a,name:t,surname:n,birthPlace:o,dulIssueDate:xt(c,!0),dulIssuedBy:d,dulNumber:m,dulSerie:u,dulSubdivisionCode:h,educationLevelCd:p,registrationDate:xt(g,!0),houseTypeCd:f,participantContacts:Io({phone:bt(i),email:r}),participantAddresses:Bo({addressRegistration:x,addressFact:b}),genderCd:s?{key:"male"===s?"MAN":"WOMAN"}:void 0}})(t);case 2:return(e=>{const{employment:t,organizationName:n,inn:a,legalForm:l,organization:i,amountWorkers:r,employerActivities:s,employerOrganization:o,generalSeniority:c,lastJobExperience:d,experience5Years:m,jobsNumber:u,organizationPhone:h,organizationAddress:p,positionOrganization:g}=e;return{employmentTypeCd:t,organizationName:n,organizationInn:a,organizationActivityTypeCd:s,organizationTypeCd:i,organizationKindCd:o,employeesNumberCd:r,opf:l,seniority:c,generalSeniority:m,jobsNumber:u,lastWorkDuration:d,positionCd:g,participantContacts:Io({organizationPhone:h&&bt(h)}),participantAddresses:Bo({organizationAddress:p})}})(t);case 3:return(e=>{const{familyStatus:t,dependents:n,familyMembers:a,confirmationIncome:l,mandatoryIncome:i,otherPayments:r,snils:s,armyIdFlg:o}=e;return{maritalStatusCd:t,totalDependents:a,incomeCertificateCd:l,otherDependents:n,participantIncomes:Ro({mandatoryIncome:i,otherPayments:r}),snils:s?.replaceAll(" ",""),armyIdFlg:o}})(t);case 4:return(e=>{const{bankruptcyFlg:t,shareholderFlg:n,legalEntityName:a,creditInRshbCd:l}=e;return{bankruptcyFlg:t,shareholderFlg:n,nameLegalEntity:a,creditInRshbCd:l}})(t);default:return{}}},th=({step:e,inputs:t,onNextStep:n,saveStep:a,finishForm:l})=>{const[r]=Vs("taskId"),[s]=Vs("profileId"),[o]=Vs("participantId"),c=i((async i=>{const c=Is(Dn(nh(i,t,e)));if(!pn(c(i)))return console.warn("validation fail");a(i);try{r&&s&&o&&await Ys((({participantId:e,taskId:t,profileId:n,formData:a,step:l=0})=>({sendToBank:!0,taskKind:"UNITED",task:{taskSource:globalThis.location.origin,id:t,authorizedAgentId:a?.bankEmployeeCode,participants:[{id:e,profile:{id:n},roleCd:{key:"BORROWER",value:"Заемщик"},...eh(l,a)}],esiaAccountTypeCd:{key:a?.esiaAccountTypeCd?.key}}}))({participantId:o,taskId:r,profileId:s,step:e,formData:i}))}catch(e){return"Fail"}return n(),5===e&&l?.(!0),"OK"}),[]);return{handleSubmit:c}},nh=(e,t,n)=>"BUSINESS_OWNER"!==e.positionOrganization?.key?t.map((e=>"partInBusiness"===e?.name?{...e,required:!1}:e)):e.consentPfrFlg?2===n&&"RETIREE"===e.employment?.key?[]:t:t.map((e=>"snils"===e?.name?{...e,required:!1}:e)),ah=d((({step:e,sections:t,onPrevStep:n,onNextStep:a,inputs:l,renderStep:r=Ju,isFormFinished:d,finishForm:m})=>{const[u,h]=Vs("leadForm"),p=((e,t)=>(t&&(t.birthday=t.birthday?new Date(t.birthday):void 0,t.dulIssueDateField=t.dulIssueDateField?new Date(t.dulIssueDateField):void 0,t.participantDateRegistration=t.participantDateRegistration?new Date(t.participantDateRegistration):void 0,t.beginDate=t?.beginDate?new Date(t.beginDate):void 0),{...Ku[e],...t}))(e,u),g=s(void 0),f=i((e=>{g.current=e}),[]),{handleSubmit:x}=th({step:e,inputs:l,onNextStep:a,saveStep:h,finishForm:m}),[,{field:b,onSubmit:y}]=Ft(p,{onSubmit:(e,t)=>{x({...e,...g.current?.(t)})}});return d?o(Hu,{}):c("form",{onSubmit:y,className:"space-y-m",children:[r({sections:t,field:b,registerSubmit:f}),o(Zu,{step:e,onPrevStep:n})]})})),lh=[[],[{title:"Персональные данные",columns:2,inputs:[{fieldType:"common",name:"surname",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"name",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"middleName",dadata:!0,filledByEsia:!0},{fieldType:"common",name:"sex",required:!0},{fieldType:"common",name:"birthday",required:!0,filledByEsia:!0},{fieldType:"common",name:"birthPlace",required:!0},{fieldType:"common",name:"phone",required:!0},{fieldType:"common",name:"email",required:!0,dadata:!0}]},{title:"Паспортные данные",columns:2,inputs:[{fieldType:"common",name:"dulSerie",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulNumber",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulIssueDateField",required:!0,filledByEsia:!0},{fieldType:"common",name:"dulSubdivisionCode",required:!0,dadata:!0,filledByEsia:!0}]},{inputs:[{fieldType:"common",name:"dulIssuedBy",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"education",required:!0}]},{title:"Адрес регистрации по месту жительства",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"addressRegistration",required:!0,dadata:!0,filledByEsia:!0},{fieldType:"common",name:"addressMatch"}]},{columns:2,inputs:[{fieldType:"common",name:"participantDateRegistration",required:!0}]},{title:"Адрес фактического проживания (место пребывания РФ)",inputs:[]},{columns:2,inputs:[{fieldType:"common",name:"housing",required:!0}]},{inputs:[{fieldType:"common",name:"addressFact",required:!0,dadata:!0}]}],[{title:"Данные о трудоустройстве",inputs:[]},{inputs:[{fieldType:"info",text:"Клиент на момент оформления заявки на кредит должен быть: официально трудоустроен более 6 месяцев, если Клиент получает з/п на счет РСХБ, то трудоустроен более 3 месяцев, не должен находиться в декретном отпуске"}]},{inputs:[{fieldType:"common",name:"employment"},{fieldType:"common",name:"organizationName",required:!0,dadata:!0}]},{columns:2,inputs:[{fieldType:"common",name:"inn",required:!0,dadata:!0},{fieldType:"common",name:"legalForm",required:!0}]},{inputs:[{fieldType:"common",name:"organization",required:!1},{fieldType:"common",name:"amountWorkers",required:!1}]},{columns:2,inputs:[{fieldType:"common",name:"employerActivities",required:!1},{fieldType:"common",name:"employerOrganization",required:!1},{fieldType:"common",name:"generalSeniority",required:!0},{fieldType:"common",name:"lastJobExperience",required:!0},{fieldType:"common",name:"experience5Years",required:!0},{fieldType:"common",name:"jobsNumber",required:!0}]},{inputs:[{fieldType:"common",name:"organizationPhone",label:"Телефон работодателя",required:!0},{fieldType:"common",name:"beginDate",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"positionOrganization",required:!1},{fieldType:"common",name:"partInBusiness",required:!0}]},{title:"Адрес работодателя",inputs:[]},{inputs:[{fieldType:"common",name:"organizationAddress",required:!0,dadata:!0}]}],[{title:"Семейное положение"},{columns:1,inputs:[{fieldType:"common",name:"familyStatus",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"dependents",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"familyMembers"},{fieldType:"common",name:"children",required:!0}]},{title:"Совокупный доход"},{inputs:[{fieldType:"info",text:"Сумма основного и дополнительных доходов после вычета налога"}]},{columns:1,inputs:[{fieldType:"common",name:"confirmationIncome",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"mandatoryIncome",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"otherPayments",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"snils",required:!0}]},{columns:1,inputs:[{fieldType:"common",name:"conscription",required:!0}]},{columns:2,inputs:[{fieldType:"common",name:"armyIdFlg"}]}],[{title:"Дополнительные сведения",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"disablePeopleFlg"}]},{inputs:[{fieldType:"common",name:"bankruptcyFlg"}]},{inputs:[{fieldType:"common",name:"shareholderFlg"}]},{inputs:[{fieldType:"common",name:"legalEntityName"}]},{inputs:[{fieldType:"common",name:"creditInRshbCd"}]}],[{title:"Отделение Банка",columns:1,inputs:[]},{inputs:[{fieldType:"common",name:"regionRetail",required:!0}]},{inputs:[{fieldType:"common",name:"addressRetail",required:!0}]},{title:"Код представителя Банка",columns:1,inputs:[]},{inputs:[{fieldType:"info",text:"Если представитель Банка помогал Вам в заведении заявки, введите здесь его код"}]},{inputs:[{fieldType:"common",name:"bankEmployeeCode"}]}]],ih=["","Персональные данные","Данные о трудоустройстве","Данные о доходах и расходах","Дополнительные сведения","Отделение Банка"],rh=d((({className:e,...t})=>{const[n,s]=a(0);l(zu,[]);const d=i((()=>{s((e=>Math.min(e+1,5)))}),[]),m=i((()=>{s((e=>Math.max(e-1,0)))}),[]),h=r((()=>lh[n]),[n]),p=h?.flatMap((e=>e?.inputs))||[],f=0===n,[x,b]=a(!1);return o(g,{className:u("bg-transparent",e),defaultPadding:"p-0",...t,children:c("div",{className:"container grid grid-cols-12",children:[f||x?null:o(Eu,{stepsTitles:ih,step:n,totalSteps:5}),o("div",{className:"py-lg px-5xl mt-2xs bg-white col-span-12",children:o(ah,{step:n,inputs:p,sections:h,onNextStep:d,onPrevStep:m,isFormFinished:x,finishForm:b,renderStep:f?({registerSubmit:e,field:t})=>o(Gd,{defaultParams:{sum:t("moneyValue").value,period:t("monthsValue").value,isAnnuity:t("isAnnuity").value},title:"Калькулятор кредита",footnote:"Расчёт является предварительным. Точные условия будут предоставлены в отделении Банка.",calcSource:{$ref:"/wcms-resources/credit-calculator-data.json"},registerSubmit:e}):void 0},String(n))})]})})})),sh=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,oh=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),ch=1e9,dh={sum:{min:1e4,max:ch},period:3},mh=ht((({className:e,filtrationSchema:t={},resetButton:n,sumInput:a,periodInput:l,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=jc(dh,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:uh(e)})}),h=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=hh(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Ac,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Sm,{label:a?.title,min:500,max:ch,...d("sum",{parse:e=>({min:Number(e),max:ch}),format:({min:e})=>String(e)})}),o(ha,{title:l?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(Pc,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),uh=e=>ot((e?.paramsSource?.rateRows||[]).filter(sh).flatMap((e=>oh(e.minMonths,e.maxMonths)))),hh=e=>ot(e.flatMap((e=>e||[])).filter(sh).flatMap((e=>oh(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],ph=[{key:"10"},{key:"50"},{key:"100"}],gh=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(cn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:ph,iconVersion:"black"})]})},fh="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",xh=(e,t)=>{const{currentPage:n,onPageChange:a,totalPages:l}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==l&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,l)?o("div",{onClick:()=>a(i),className:fh,"aria-label":`Страница ${i}`,children:i},String(t)):null},bh={width:"24",height:"24"},yh=({currentPage:e,onPageChange:t,totalPages:n})=>{const a=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),l=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:l,children:o(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:vh(1===e),...bh})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:fh,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,a.map(xh),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:fh,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:vh(e===n),...bh})})]})},vh=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Nh=({currentPage:e,onPageChange:t,totalPages:n,itemCount:a,onItemCountChange:l})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(yh,{currentPage:e,onPageChange:t,totalPages:n}),a&&l?o(gh,{itemCount:a,onItemCountChange:l}):null]}),wh=d((({className:e,value:t,autoFocus:n,onChange:a,onFocus:l,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{a&&a(e.target?.value||"")}),[a]);return c("div",{className:u("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:u("h-14 w-full px-10 text-l text-black box-border rounded-md",Wt),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:l})]})})),Ch=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(wh,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Ga,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Ga,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(jr,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),kh=({title:e,timestamp:t,publicId:n})=>{const a=ue(),{href:l}=a({href:`/api/v1/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[null,c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Me,{size:"text-m","font-weight":"font-light",children:xt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:l,download:!0,"aria-label":"Скачать",children:e})]})]},n)},Sh="/api/v1/depository",Th={startDate:void 0,endDate:void 0,query:""},Ih=ht((({className:e,...t})=>{const[n,l]=a(0),[r,s]=a(10),[d,{field:m,reset:h}]=Ft(Th),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:a,endDate:l})=>{const i=a?xt(a,!0):"",r=l?xt(l,!0):"",s=new URLSearchParams(Sh);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=jn(Sh+o,st);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=i((e=>l(e-1)),[]),b=i((e=>{r!==e?(s(e),l(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(Ch,{filtrationState:d,field:m,onClearFilter:h}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Me,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Me,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(kh,{...e},String(e.publicId)))):o(Uo,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Nh,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),Bh=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Rh=d((({className:e="",title:t,description:n,error:a,button:l,...i})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Bh(a)}),o(k,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),l?.text?o(ye,{version:l?.version,text:l?.text,...l}):null]}))),Ph="location";function Dh(e="Москва"){const[t,n]=((e,t,n)=>{const[r,s]=a(n||null);return l((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((n=>e.fire(t,n)),[e,t])]})(ce,"location",_h()??{name:e}),r=i((e=>{Ah(e),n(e)}),[]),{data:s}=jn(Mh()?null:"/api/v1/region",st);return l((()=>{s&&!Mh()&&n(s)}),[s]),[t??{name:e},r]}const Mh=()=>Boolean(globalThis.localStorage?.getItem(Ph)),_h=()=>{try{const e=globalThis.localStorage?.getItem(Ph);return e&&JSON.parse(e)}catch(e){return null}},Ah=e=>{try{globalThis.localStorage?.setItem(Ph,JSON.stringify(e))}catch(e){}};var zh;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(zh||(zh={}));const Fh=new Intl.NumberFormat("ru",{style:"currency",currency:zh.RUB}),Eh=e=>e?Fh.format(e):"",Vh="text-m font-light text-secondary-text ",Oh=`${Vh} text-left`,Lh=`${Vh} pl-5xl text-center`,jh=`${Vh} pl-5xl text-right`,$h={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},qh=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Oh,children:o(Me,{size:"text-m",children:"Валюта"})}),o("th",{className:Lh,children:o(Me,{size:"text-m",children:"Купить"})}),o("th",{className:jh,children:o(Me,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Uh)})]}))),Uh=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:$h[t]},width:"24",height:"24"}):null,o(Me,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Me,{size:"text-h6",children:Eh(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Me,{size:"text-h6",children:Eh(e?.buyExchangeRate)})})]},t)},Wh={icon:"GpsIcon"},Hh=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Kc,{...Wh,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Yh=(e,t,n)=>{const a=Number(Kh(e))*Math.pow(t,n?-1:1);return Number.isInteger(a)?a:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(a)},Kh=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Gh=e=>Rt([[e=>e.value!==zh.RUB&&e.oppositeValue!==zh.RUB,()=>e.handleConvert(e.value,zh.RUB)],[e=>e.value===zh.RUB&&e.oppositeValue===zh.RUB,()=>e.handleConvert(e.value,zh.USD)],[e=>e.value===zh.RUB&&e.oppositeValue===zh.RUB,()=>e.handleConvert(e.value,zh.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Xh(e){const{placeholder:t,rates:n,selected:a,value:l,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:a,text:a};return c("div",{className:"relative flex",children:[o(Yt,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:l,onChange:i}),s.length?o(cn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Jh=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:l})=>{const[r,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||zh.RUB,selectBuy:n?.[0]?.currency?.currency||zh.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[Xh({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Zh(r,d,n),value:r.inputSell,setValue:e=>ep(d,n)(e,r.selectSell,r.selectBuy)}),Xh({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Qh(r,d,t),value:r.inputBuy,setValue:e=>tp(d,t)(e,r.selectBuy,r.selectSell)})]}):null,l?.text?o(ye,{text:l.text,version:l?.version,...l}):null]})})),Zh=(e,t,n)=>a=>{t({selectSell:a}),Gh({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,l=e.selectBuy)=>{ep(t,n)(e.inputSell,a,l)}})},Qh=(e,t,n)=>a=>{t({selectBuy:a}),Gh({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,l=e.selectSell)=>tp(t,n)(e.inputBuy,a,l)})},ep=(e,t)=>(n,a,l)=>{e({inputSell:Kh(n),selectBuy:l});const i=t.find((e=>e.currency?.currency===l))?.buyExchangeRate||t.find((e=>e.currency?.currency===a))?.buyExchangeRate;i&&e({inputBuy:String(Yh(n,i,a===zh.RUB)||"")})},tp=(e,t)=>(n,a,l)=>{e({inputBuy:Kh(n),selectSell:l});const i=t.find((e=>e.currency?.currency===l))?.saleExchangeRate||t.find((e=>e.currency?.currency===a))?.saleExchangeRate;i&&e({inputSell:String(Yh(n,i,a===zh.RUB)||"")})};const np=d((({className:e="",title:t="Курсы обмена валют",button:n,...a})=>{const[l]=Dh(),i=function(e){const t=e?.code||"000",{data:n}=jn(`/api/v1/exchangerates?regionCode=${t}`,st);return n||{}}(l),r=ap(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:zh.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:zh.RUB}}),o(g,{className:u("box-border min-h-80",e),...a,children:o(Te,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(qh,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Hh,{address:i?.address})]}),o(Jh,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:n})]})})})})),ap=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],lp=d((({className:e="",items:t})=>{const n=ue();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(ip(n))})})),ip=e=>({dataFooter:t,...n},a)=>{const{text:l,href:i,target:r,onClick:s}=e(n);return l?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...pe(t),children:l||null})},String(a)):null},rp=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),sp=["all","footer"],op=d((({className:e,navigationItems:t})=>{const n=ue();return o("div",{role:"menu",className:u("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(rp(sp)).map(n).map(cp)})})),cp=(e,t)=>{const{text:n,items:a=[],href:l,target:i="_self",onClick:r,dataFooter:s}=e,d=a.filter(rp(sp));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:l,target:i,onClick:r,...pe(s),children:n}),d?o(lp,{items:d}):null]},String(t))},dp=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(mp)}):null)),mp=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Me,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(up)})]},String(t)),up=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:hp(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),hp=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${pp(t)}`,children:o(Me,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},pp=e=>e.replaceAll(/\D/g,""),gp=d((({className:e="",index:t,text:n,...a})=>{const l=ue(),{href:i,target:r,onClick:s}=l(a);return o("a",{className:u("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),fp=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Me,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(gp,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),xp="w-full lg:w-52";function bp(e,t,n=300){l((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const yp=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:a,s2Matches:l}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),a=Array.from({length:e.length}),l=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)a[r]||l[n]||e[r]!==t[n]||(i++,a[r]=!0,l[n]=!0)}return{m:i,s1Matches:a,s2Matches:l}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:a}){let l=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(a[s]){r=s+1;break}e[i]!==t[s]&&l++}return l}(e,t,{s1Matches:a,s2Matches:l}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const vp=(e,t)=>(n,a)=>{for(const[l,i]of a)n.set(l,e(n.get(l)||t,i));return n},Np=(e=[])=>e.reduce(((e,t)=>e+t),0),wp=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Cp=e=>t=>e.map((([e,n])=>[yp(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>Sp(t,e))).reduce(vp(Math.max,0),new Map),kp=e=>t=>{return Ec(t,t.map((({title:e})=>e)).map((e=>t=>{const n=wp(t||"");return n.length?Np(e.map((e=>ic(n.map(yp(e)))))):0})(e))).sort((a=([,e])=>e,n=(e,t)=>a(e)-a(t),(e,t)=>-n(e,t))).map((([e])=>e));var n,a},Sp=(e,t)=>new Map(e.map((e=>[e,t]))),Tp=({basePathList:e,initialQuery:t=""})=>{const[n,i]=a(t||"");l((()=>{null!=t&&i(t)}),[t]);const{data:r}=jn(e?.length?e:null,Ip),[s,o]=a(null);return bp((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:a}=t||{};if(!(e&&n?.length&&a&&Object.keys(a).length))return[];const l=wp(e);if(!l.length)return[];const i=Object.entries(a),r=[...l.map(Cp(i)).reduce(vp(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*l.length)).map((([e])=>n[e]));return kp(l)(r)})(n)))}),[r,n]),[s,{value:n,onChange:i}]},Ip=async(...e)=>(await Promise.allSettled(e.map((e=>rt(V(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Bp=d((({initialQuery:e,navigationItems:t})=>{const n=r((()=>t?.map((e=>e.href||"/"))),[t]),[a,l]=Tp({basePathList:n,initialQuery:e}),i=r((()=>Rp(t)(a)),[t,a]);return o(pl,{head:o(wh,{autoFocus:!0,...l}),children:o(op,{navigationItems:i})})})),Rp=e=>t=>e?.length&&t?.length?Ec(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:V("/",t)})))}))):[],Pp=(e={})=>{const{open:t,close:n}=de();return{open:(n={},a={})=>t(o(Bp,{...e,...n}),a),close:n}},Dp=d((({className:e,search:t,...n})=>{const[l,r]=a(""),s=i((()=>r("")),[]),d=Pp(n),m=i((e=>{r(e),Mp(e)&&d.open({initialQuery:e},{onClose:s})}),[s,d]);return c("div",{className:u("relative",e),role:"search",children:[o(wh,{value:l,placeholder:t?.placeholder,onChange:m}),o(hl,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),Mp=e=>e&&e.length>=3,_p=(e,t)=>{const{logo:n}=e??{},{dataHeader:a,dataFooter:l,...i}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(Qs,{className:xp,logo:i,data:l,showTitle:!1}),o(Dp,{className:"grow",navigationItems:t,...e})]})},Ap=d((({className:e="",index:t,...n})=>{const a=ue(),{href:l,target:i,text:r,onClick:s}=a(n);return o("a",{className:u("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:l,target:i,onClick:s,children:r||`Документ ${t}`})})),zp=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Me,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(Ap,{index:t,...e},String(t))))}):null]}))),Fp=ht((({className:e,footer:t,...n})=>{const{navigationItems:a}=n.options?.page?.navigation??{},l=n.options?.page?.common??{},{documents:i,relatedEnterprises:r,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:h,license:p,otherLinks:f=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[_p(l,a),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(op,{navigationItems:a}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u(xp,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(dp,{items:s}),h?o(ye,{className:"w-full",version:"primary",...h}):null,d.map(((e,t)=>o(Xm,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),f.map(((e,t)=>o(ye,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(fp,{title:m,links:r}),o(zp,{links:i,license:p})]})})),Ep=d((({className:e="",title:t,description:n,calendar:a,...l})=>c(g,{className:u("space-y-m",e),defaultPadding:"p-6xl",...l,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),a?Vp(a):null]}))),Vp=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>Op(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:Lp(e)}),c("div",{className:"text-s",children:[o(Me,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o(Me,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Op=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),Lp=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ne,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),jp=ht((({className:e,title:t,button:n,regionSource:l,data:i,...r})=>{const[s,d]=a({key:""}),m=l?.regions??[],h=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(hn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(ye,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:Ym(i,s?.key),children:f})}):null]})})}));function $p(e=[]){const t=D(),n=Array.from(e.entries()).filter((([,e])=>qp(t)(e)));return n.find((([,e])=>qp(t,!0)(e)))??n[n.length-1]??[]}const qp=(e,t=!1)=>({href:n})=>{if(!n)return!1;const a=E(Up(e)(n));return t?a===E(n):a.startsWith(E(n))},Up=e=>t=>{const n=X(G.SITE_URL);return A(t)?e.href:V(n,e.pathname)},Wp=d((({className:e="",items:t,activeItem:n,ariaLabel:a="Меню"})=>{const[r,{setFalse:d,toggle:m}]=Lt(!1),h=$t(d),p=s(null),g=i((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),a=t.current.getBoundingClientRect(),l=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${l}px`:a.left>e.left&&(l>a.left?n.current.style.left="":n.current.style.left=`${l}px`)}}),[r]);return jt(globalThis,"resize",(()=>g({isOpened:r,buttonRef:h,menuRef:p}))),l((()=>{g({isOpened:r,buttonRef:h,menuRef:p})}),[r]),c("div",{className:u(r?"rounded-md shadow-blue-gray":"",e),ref:h,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":a,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:u("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!r}),"aria-hidden":!r,children:Yp(t,n)})]})})),Hp=d((({isActive:e,...t})=>{const n=ue(),{text:a,href:l,target:i,onClick:r}=n(t);return o("a",{className:u("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:l,target:i,onClick:r,role:"link",...pe(t?.data),children:a})})),Yp=(e,t)=>e?.map(((e,n)=>o(Hp,{isActive:e===t,...e},e?.text??String(n)))),Kp={default:"w-6 h-6",large:"w-12 h-12"},Gp=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:a=!1,disabled:l,ariaLabel:i="Меню второго уровня",image:r,data:s,onClick:c,version:d})=>o("button",{className:u("group/btn border-0 flex shrink-0 items-center",a?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":a&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Kp[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:l,"aria-label":i,onClick:c,...pe(s),children:o(ne,{image:r,className:u("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Xp="chatbot",Jp="text-page__btn-chat",Zp={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Qp=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:a="Чат",version:i})=>{const r=(e=>{l((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=Zp[e??""];return n=>{if(t)if("personal"!==e)Tr(Xp,t);else{const e=n.target;e?.classList.contains(Jp)||e?.classList.add(Jp),document.getElementById("webchat-js-container:webchat_rshb")||Tr(Xp,t)}}})(e);return o(Gp,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:a,onClick:r,buttonSize:"large",isGrayBg:!0,version:i})})),eg=d((({className:e="",active:t,dataItemName:n,children:a,data:l,...i})=>{const r=ue(),{href:s,target:d,text:m,onClick:h}=r(i);return c("a",{className:u("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:h,...pe(l),children:[o("span",{className:tg(t),children:m||a}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),tg=(e=!1)=>u("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),ng=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...l})=>{const r=Yo(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(eg,{...l,children:n})})})),ag={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},lg=d((({version:e,text:t,mobileText:n,...a})=>{const l=Ce()?n:t;return l?o(ye,{className:u("py-s px-lg font-light whitespace-nowrap",ag["transparent"===e?"transparent":"default"]),...a,children:l}):null})),ig=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:l,chatBotAriaLabel:i})=>{const d="transparent"===t?"white":"black",[,m]=$p(e),[u,h]=a(e.length),p=e.slice(u),g=s(null),f={rootRef:g},x=r((()=>e.map(((e,t)=>e=>{h(e?rg(t):sg(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(ng,{className:u-1<t?"invisible":"",active:e===m,observerOptions:f,onVisibilityChange:x[t],data:e.dataHeader,...e},String(t))))}),p.length?o(Wp,{items:p,activeItem:m,ariaLabel:l}):null,_.CHAT_BOT?o(Qp,{version:t,iconVersion:d,chat:_.CHAT_BOT,ariaLabel:i}):null,o(lg,{version:t,...n})]})})),rg=e=>t=>Math.max(t,e+1),sg=e=>t=>Math.min(t,e),og=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Me,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(cg,{...e},String(t))))})]}):null,cg=d((({icon:e,...t})=>{const n=ue(),{text:a,target:l,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,a?o("a",{className:"hover:text-primary-hover",href:i,target:l,onClick:r,children:o(Me,{size:"text-l",font:"font-light",color:"text-primary-text",children:a})}):null]})})),dg=(e,t)=>n=>n.name?o(Km,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Ym(e,n.name),children:o(Me,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,mg=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:u(Wt,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),ug=d((({foreignOffices:e,branches:t})=>{const[n,l]=Dh(t?.default),r=ue(),{href:s}=r({href:`/branches/${n.slug}`}),[d,m]=a(""),u=pg(Ai()).sort(((e,t)=>e.name.localeCompare(t.name))),h=((e,t)=>{const n=new Map;for(const a of e){const e=t(a),l=n.get(e)||[];n.set(e,[...l,a])}return n})(u,hg),{close:p}=de(),g=i((e=>{l(e),p()}),[]);return c(pl,{className:"pb-20",head:c("div",{children:[o(Me,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Km,{href:s,className:"inline mx-2xs text-primary-main",children:n.name})]})}):null,o(mg,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:u.filter((({name:e})=>e&&yp(e.toLowerCase())(d.toLowerCase())>=.8)).map(dg(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(h.entries()).map((f=g,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Me,{size:"text-h6",children:e})}),t.map(dg(x,f))]},e)))}),og(e)]});var f,x})),hg=e=>e.name?.charAt(0)||"",pg=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),gg=d((({className:e="",active:t,flat:n,children:a,data:l,...i})=>{const r=ue(),{href:s,target:c,text:d,onClick:m}=r(i);return o("a",{className:u(fg(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...pe(l),children:o("span",{suppressHydrationWarning:!0,className:xg(t,n),children:d||a})})})),fg=(e=!1,t=!1)=>u("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),xg=(e=!1,t=!1)=>u("font-sans text-s font-light",e?"text-primary-main":u(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),bg=d((({className:e,version:t,...n})=>{const a="transparent"===t?"white":"black",[l]=Dh(n?.branches?.default),r=Pp(n),s=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(ug,{...e}),n),close:n}})(n),d=i((()=>r.open()),[r]),m=i((()=>s.open()),[s]);return c("div",{className:u("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(gg,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:l?.name,data:Ym(n?.branches?.dataClick,l?.name??""),onClick:m}):null,n?.officesAtms?.href?o(gg,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(Gp,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),yg=d((({observerOptions:e,onVisibilityChange:t,children:n,className:a,...l})=>{const r=Yo(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:a,role:"menuitem",children:o(gg,{...l,children:n})})})),vg=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:l,headerData:i,search:d,bgColor:m,logo:u})=>{const[h,p]=a(e.length),g=e.slice(h),f=s(null),x={rootRef:f},b=r((()=>e.map(((e,t)=>e=>{p(e?Ng(t):wg(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=u??{};return c("div",{className:"flex items-center justify-between",children:[o(Qs,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:f,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(yg,{className:h-1<n?"invisible":"",active:e===t,observerOptions:x,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(Wp,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(bg,{version:l,className:"ml-auto",search:d,navigationItems:e,...i})]})})),Ng=e=>t=>Math.max(t,e+1),wg=e=>t=>Math.min(t,e),Cg={"bg-white":"primary",transparent:"transparent"},kg=["all","header"],Sg=ht((({className:e,bgColor:t="bg-white",logo:n={},version:a=Cg[t],portal:l,header:i={},...r})=>{const{common:s,navigation:d}=Ig(r?.options?.page),{navigationItems:m}=d,{logo:h={}}=s,[,p]=$p(m),{internetBankButton:f}=l||{},x=n.image?.icon||n.image?.src||n?.title?n:h;return o(g,{tag:"header",className:u("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:a,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(vg,{activeTopItem:p,navigationItems:m?.filter(rp(kg)),version:a,headerData:{...i,...d},search:s.search,bgColor:t,logo:x})}),o("div",{className:u("mt-s h-px bg-main-divider",Tg(a))}),p?.items?.length&&o(ig,{subItems:p?.items?.filter(rp(kg)),version:a,internetBankButton:f})]})})})),Tg=e=>"transparent"===e?"opacity-30":"",Ig=e=>({navigation:e?.navigation??{},common:e?.common??{}}),Bg=(e=!1)=>e?{}:{padding:"p-0"},Rg={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Pg=ht((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:a=!0,version:l="transparent",isTheme:i=!1,isCardBorder:r,...s})=>o(g,{className:u("relative","grid grid-cols-12",Rg[n],e),padding:t,version:l,isTheme:i,...s,children:P({...s,extraProps:{...Bg(a),className:Wo(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),Dg=d((e=>{const{className:t,align:n,image:a,...l}=e,i=n?u("flex",td[n]):"";return o(g,{className:u(i,t),defaultPadding:"p-0",...l,children:o(ne,{image:a})})})),Mg=(e,t=0)=>{const{itemCount:n,visibleItemCount:l}=e,[r,s]=a(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=l?n>l&&r<n-l:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};function _g({dec:e,inc:t,canDec:n,canInc:a,btnClass:l,className:i=""}){return n||a?c("div",{children:[n?o(pc,{className:u("absolute z-40",l[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,a?o(pc,{className:u("absolute z-40 rotate-180",l[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const Ag=d((({className:e="",cards:t=[],button:n})=>{const[l,r]=a(0),s=i((e=>r(e)),[]),d=t.length,[m,u]=Mg({itemCount:d,visibleItemCount:2}),{canDec:h,canInc:p}=u,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?zg({activeIndex:m,cards:t,selectedCardIndex:l,onClick:s}):null,_g({...u,btnClass:["left-12","right-12"],className:"top-16"}),h?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(ye,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function zg({activeIndex:e,cards:t,selectedCardIndex:n,onClick:a}){const l=460*e,i=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${l}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:a}){return c("button",{type:"button",onClick:a,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ne,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?Fg("страховая сумма",e.sum):null,e?.fee?Fg("страховой взнос",e.fee):null]}),Eg(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})})}function Fg(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c(Me,{size:"text-h6",children:[Ue(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o(Me,{size:"text-l",color:"text-secondary-text",children:e})})]})}function Eg(e){return e?o(ne,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const Vg=d((({className:e="",title:t,insuranceTabs:n=[],button:l,...r})=>{const[s,d]=a(0),m=i((e=>d(e)),[]);return c(g,{className:u("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:a}){return o("button",{type:"button",onClick:a,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Og({insuranceTabs:n,button:l})})]})})),Og=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(Ag,{button:t,cards:e},String(n)))):null};const Lg={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},jg={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},$g=d((e=>{const{className:t="",__html:n,isDotted:a,investmentZeroColumn:l,investmentColumns:i,...r}=e,s=i?[...i]:[];return l&&s.unshift(l),o(g,{className:t,defaultPadding:"p-4xl",...r,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[Mc(o("div",{className:"w-px h-4 bg-gray"}))(s.map(qg)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Hg)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(Pe,{__html:n,isDotted:a,itemSize:"list-s"})}):null]})})})),qg=(e,t,n)=>{const a=1===t,l=t===n.length-1,i=e.cells?.reverse()||[];return o("div",{className:`${Ug(a,l,e.cells)}`,children:i.length?o("div",{className:"w-full "+(l?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:i.map(Wg)}):null},`column_${t}`)},Ug=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),Wg=(e,t)=>{const n=e.cellSize||"XS",a=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${jg[n]} ${Lg[a]} ${"XS"===n?"px-s":"px-5xl"}`,children:o(Me,{align:"text-center",children:e.text})},`cell_${t}`):null},Hg=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,Yg=["байт","Кб","Мб","Гб","Тб","Пб"],Kg=d((({icon:e,text:t,href:n,target:a,fileFormat:l,data:i,fileSize:r})=>{const s=r&&l?",":"",d=r??"",m=l?String(l):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:a,...pe(i),children:[e,t?c(Me,{size:"text-l",font:"font-light",children:[t," ",Gg(d,m),o(Me,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Gg=(e,t)=>e||t?o("span",{children:", "}):"",Xg=(e,t)=>(n,a)=>{const l=q(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Yg[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Zg(l):n?.fileFormat;return c("div",{role:"listitem",children:[o(Kg,{text:n?.text,target:n?.target,href:l,fileFormat:r,fileSize:i,icon:Jg(t),data:n?.data}),o(Pe,{__html:n?.__html})]},String(a))},Jg=e=>e?o(ne,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,Zg=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),a=-1!==t?e.substring(t+1):"";return a.includes("/")?a.replace(n,""):a},Qg=d((({href:e,__html:t,target:n})=>{const{close:a}=de(),l=D(),r=q(l)(e),s=i((()=>{a()}),[]);return c(pl,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Pe,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(ye,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o(jr,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),ef=d((({text:e,href:t,target:n,__html:a,icon:l})=>{if(!e&&!a)return null;const r=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(Qg,{...e}),n),close:n}})({__html:a,href:t,target:n}),s=i((()=>r.open()),[r]);return c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[Jg(l),o(Me,{font:"font-light",children:e})]})})),tf={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},nf=ht((({className:e="",title:t,description:n,align:a="text-center",documents:l,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=D();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(k,{title:t,description:n,align:a,headlineVersion:"M",as:"h2",isEmbedded:!0}),l?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",tf[r]),role:"list",children:l.map(af(d,i))}):null]})})),af=(e,t)=>(n,a)=>{const l=n?.docType;return""===l?null:"reportSource"in n&&n?.reportSource?.__html?lf(t)(n,a):Xg(e,t)(n,a)},lf=e=>(t,n)=>{const a={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(ef,{...a,icon:e,href:rf(t)?t?.href:t?.attachment?.src}),o(Pe,{__html:t?.__html})]},String(n)):null},rf=e=>"href"in e,sf=ht((({className:e,padding:t,align:n="text-left",buttons:a=[],description:l,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:p="primary",...f})=>{const x="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Te,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:Le(a,{className:"flex-wrap"}),children:[l?o(Me,{size:"text-xl","font-weight":"font-light",children:l}):null,c("div",{className:u("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Pe,{__html:r,itemSize:"list-m"}):null,o(Me,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:u("flex justify-center bg-white rounded-md @xl:-order-1",x),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),of=(e=[],t={})=>e.filter((({content:e={}})=>Oc(t,e))).length,cf=(e,t)=>e===t;const df=(mf=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(cf,((e=cf)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,a)=>e(t,n[a])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,n])=>mf(n,t[e])))));var mf;const uf=[],hf={},pf={primary:"bg-white/30",secondary:"bg-main-divider"},gf={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},ff=d((({count:e,version:t="secondary"})=>{const n=Ce(),a=n?"bg-main-divider":pf[t],l=gf[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",a),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Me,{size:"text-xs",color:l,children:e})})})),xf=({text:e,description:t,icon:n,isActive:a,type:l})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(a);return c("div",{className:u("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:u("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===l?i.text:i.oldText,children:e}),o("div",{className:"animated"===l?i.desc:i.oldDesc,children:t})]})]})},bf={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},yf={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},vf={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Nf={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},wf=d((({tag:e="div",item:t={},isActive:n=!1,type:a="default",onClick:l})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:h,...p}=t;return o(i,{className:u("h-12","block flex-1","cursor-pointer",bf[a],n?Nf[a]:vf[a]),role:"tablist","aria-label":"Список табов",onClick:l,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?yf[a]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[xf({text:r,description:s,icon:d,isActive:n,type:a}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(ff,{count:m,version:$r(n,a)})}):null]})})})),Cf=d((e=>o(e?.item?.href?kf:Sf,{...e}))),kf=d((e=>{const t=ue(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:a,...l}=t({...e.item,onClick:n});return o(wf,{...e,tag:"a",item:l,onClick:a})})),Sf=d((({item:e={},onClick:t,...n})=>{const a=i((()=>{t&&t(e)}),[t,e]);return o(wf,{item:e,onClick:a,...n})})),Tf=(e,t,n)=>(a,l)=>o(Cf,{isActive:a===e,onClick:t,type:n,item:a},String(l)),If=d((({className:e,tabsType:t="default",items:n=[],activeItem:a,onChange:l})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(Tf(a,l,t))}))),Bf={categories:[],extraOptions:[],propertyType:[],stage:[]},Rf=ht((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:a,...l})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=jc(Bf,{block:l.block,page:l.options?.page}),f=i(((e=Bf)=>p(e)),[]),x=(({hotFilters:e=uf,filtrationState:t=hf,blocks:n=uf,onFiltrationStateChange:a})=>{const l=r((()=>Math.max(0,e.findIndex((e=>df(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:of(n,t.filter),version:$r(t===e[l])})))),[e,n,l]),o=i((t=>{a(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[l],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:l.block?.blocks,onFiltrationStateChange:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...l,children:[o(If,{...x}),o(Ac,{filtrationSchema:n,resetButton:a,field:m,reset:h}),o(Pc,{blocksToRender:d,...l})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Pf=({location:e,address:t,billAcceptorType:n,terminalType:a,billAcceptorEnable:l,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:_f(a)},{label:"Модуль приема наличных",value:l?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Me,{size:"text-h4",children:_f(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(er,{color:"green",children:_f(s)})})]}),o("div",{className:"hidden sm:block",children:o(qi,{className:"flex-wrap",children:m?.map(Mf)})}),o(Ei,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Vi,{isUnfolded:e,children:o(qi,{className:"flex-wrap",children:m?.map(Mf)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>sr({isUnfolded:e,onToggle:t})})]},String(d))},Df=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${_f(t)} №${n}`,body:e.toUpperCase()}),Mf=(e,t)=>o(Oi,{...e},String(t)),_f=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Af=[];const zf=async e=>{const t=await rt(e,{method:"GET"});return Array.isArray(t)?t:Af},Ff={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Ef={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},Vf=d((({descriptionData:e,className:t})=>{const[n]=Dh(),a=n?.code??"000",{data:l,isLoad:i}=function(e){const{data:t,error:n}=jn(`/api/v1/atms?regionCode=${e}`,zf);return{data:t||Af,isLoad:!t&&!n}}(a);return o(Zr,{className:t,filterItems:Of,data:l,isLoad:i,initFilterState:Ff,renderCard:Pf,getBalloon:Df,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Of=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),a=n.filter((e=>e.startsWith("terminalType"))),l=n.filter((e=>!a.includes(e)));return e.filter((e=>{const t=l.every((t=>Ef[t](e))),n=!a.length||a.some((t=>Ef[t](e)));return t&&n}))},Lf=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Me,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Me,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:jf({workScheduleDescription:t})}),o(Ei,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Vi,{isUnfolded:e,children:jf({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>sr({isUnfolded:e,onToggle:t})})]},String(n)):null,jf=({workScheduleDescription:e})=>c("div",{children:[c(qi,{className:"flex",children:[o(Oi,{label:"Операции для физических лиц",children:o(Me,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Oi,{label:"Операции для физических лиц",children:o(Me,{children:"Оформление и обслуживание банковских карт"})}),o(Oi,{label:"Операции для физических лиц",children:o(Me,{children:"Инвестиционное и накопительное страхование"})}),o(Oi,{label:"Операции для физических лиц",children:o(Me,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Oi,{label:"Режим работы",className:"max-w-none",children:o(Me,{children:e})})]}),$f=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),qf={branches:[],remoteWorkplaces:[]};const Uf=async e=>await rt(e,{method:"GET"})||qf,Wf=d((({className:e})=>{const[t]=Dh(),n=t?.code??"000",{data:a,isLoad:l}=function(e="000"){const{data:t,error:n}=jn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,Uf);return{data:t||qf,isLoad:!t&&!n}}(n);return o(Zr,{className:e,data:a?.branches,isLoad:l,remoteWorkplaces:a?.remoteWorkplaces,renderCard:mr,renderRemoteWorkplaceCard:Lf,getBalloon:hr,getBalloonRemoteWorkplaces:$f,title:`Офисы филиала ${t?.name}`})})),Hf=d((({data:e,className:t,...n})=>{const a=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===a?o(Wf,{}):o(Vf,{descriptionData:e})})})),Yf=d((({className:e,title:t,description:n="Блок в разработке...",...a})=>c(g,{className:u("box-border",e),...a,children:[o(k,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),Kf="hidden sm:flex absolute z-40 top-10",Gf=ht((({className:e="",padding:t,slides:n=[],...l})=>{const[i,r]=a(0),[s,d]=dc({itemCount:n?.length||0});return c(g,{className:u("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...l,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(Xe,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...l})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(Jo,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(Xf({activeSlideIndex:i,onClick:r}))}),d.canScrollLeft?o(gc,{className:u("left-6",Kf),onClick:d.scrollLeft}):null,d.canScrollRight?o(fc,{className:u("right-6",Kf),onClick:d.scrollRight}):null]})]})})),Xf=({activeSlideIndex:e,onClick:t})=>({nav:n},a)=>{const l=a===e,i=l?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=l?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=l?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(a),"aria-label":n?.title,className:u("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(a))},Jf=d((({address:e,email:t,telephone:n,button:a,className:l="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",l),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Oe(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Zf({__html:i,richVersion:r}):null,Qf({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Qf({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Qf({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),a?.text?Le([a]):null]})]}))),Zf=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),Qf=({label:e,data:t,iconName:n,dataColor:a=""})=>t?c("div",{className:"flex gap-s",children:[o(W,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Me,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Me,{size:"text-xl",color:a,children:t})]})]}):null,ex=d((e=>{const{__html:t,richVersion:n="",...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Pe,{__html:t,richVersion:n})})})),tx=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:a,labelIcon:l})=>o(kc,{tag:"button",className:u("border-none bg-transparent items-center group/button",l?.icon?"py-xs":"py-lg"),onClick:a,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?o(Me,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),nx=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",ax=(e=!1)=>e?"MinusIcon":"PlusIcon",lx=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",ix=ht((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:a="Развернуть",labelIcon:l,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=Ce();return o(g,{className:u("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(Ei,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Vi,{className:u("gap-lg",nx(m)),isUnfolded:e,children:P({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>rx({foldButtonVersion:r,label:a,labelIcon:l,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),rx=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:a,isUnfolded:l,onToggle:i,isMobile:r=!1})=>{const s=t||(l?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?lx(e):ax(e))(l,r);return"accordion"===e?o(tx,{label:s,labelIcon:n,labelIconBgVersion:a,icon:c,onToggle:i}):o(Sc,{label:s,icon:l?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},sx=d((({name:e,text:t,value:n,checked:a,onChange:l,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:u(Wt.split(" ").filter((e=>"rounded"!==e)),Zn,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:a,onChange:e=>l?.(e.target.value),role:"radio"}),t?o(Me,{color:"text-primary-text",children:t}):null]})}))),ox=d((({className:e=""})=>{const[t,n]=a("option2"),l=i((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(sx,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:l}),o(sx,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:l})]})})),cx=d((({data:e,fieldLabel:t,fieldValue:n,selected:a,placeholder:l="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===a));return o(cn,{options:s,label:r,placeholder:l||a,onChange:e=>i(e.key),value:c})})),dx=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:a=[],selectedBranch:l,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(cx,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(cx,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:l,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),mx=["От 1 дня","До 365 дней"],ux=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Me,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(ha,{min:1,max:365,value:e,items:mx,onChange:t})]}))),hx=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:a=[],selectedBoxSize:l,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(cx,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(cx,{data:a,fieldLabel:"safeBoxCasesSize",selected:l,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),px=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:a,days:l,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(dx,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:a,onSelectedBranch:gx(m)}),o(ux,{days:l,setDays:e=>m({days:e})}),o(hx,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:fx(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(ox,{}),o(ye,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),gx=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},fx=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},xx=d((({days:e,tariffs:t=[]})=>{const n=yx(e,t),a="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[bx("Аренда за",e),bx("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:a})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:a})})]})]})})),bx=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Me,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),yx=(e,t)=>{const n=vx(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},vx=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},Nx=(e,t)=>e.find((e=>e.branchCode===t)),wx=d((e=>{const{regions:t,data:n,branches:a,onChange:i,onClick:r}=e;l((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=Nx(a,n.selectedBranch),d=Cx(s?.safeBoxCaseVolumes),m=kx(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=Sx(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(px,{...n,regions:t,onClick:r,branches:a,caseVolumes:d,safeBoxCases:m,onChange:i}),o(xx,{days:n.days,tariffs:u})]})})),Cx=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],kx=(e,t)=>e?.find((e=>e.volume===t)),Sx=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Tx=[];const Ix=async e=>await rt(e,{method:"GET"})||Tx,Bx=d((({title:e,footnote:t,className:n="",...l})=>{const[r,s]=a(!1),d=i((()=>s((e=>!e))),[]),[m,u]=a({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=Ai(),p=Rx(m.selectedRegion,h),f=function(e){const{data:t}=jn(e?`/api/v1/safeboxes?regionCode=${e}`:null,Ix);return t||Tx}(p),x=i((e=>u((t=>({...t,...e})))),[u]),b=(y=Nx(f,m.selectedBranch)||f,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...l,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(wx,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Dr,{points:b,className:"h-[640px]"}):null]})})),Rx=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Px=e=>e<4?"w-72":"w-52",Dx={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"},Mx=d((({buttons:e,className:t="",description:n,showLines:a=!0,steps:l=[],stepVersion:i="gray",title:r,version:s="primary",...d})=>{const m=l.length>3,h=Dx,p=(e=>e?"":"opacity-0")(a),f=Ce();return c(g,{className:u("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(k,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:Hc(f)}),l?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:u("flex items-center",m?"px-16":"px-24"),children:Mc(o("div",{className:u("h-0.5 w-full bg-secondary-light flex-1",p)}))(l.map(_x(h,m,i)))}),o("div",{className:u("flex justify-between",m?"gap-x-s":"gap-x-20"),children:l.map((x={styleMap:h,version:s},(e,t,n)=>{const{styleMap:a,version:l}=x,{label:i,description:r,button:s,isDotted:d}=e;return c("div",{className:u("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",Px(n.length)),children:[c("div",{className:"space-y-xs",children:[i?o(Me,{size:"text-h6",align:"text-center",children:i}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:a.description,children:r}):null,o(Pe,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(ye,{className:"box-border py-s w-full max-w-60 mt-auto",version:l,...s,children:s?.text}):null]},String(t))}))})]}):null,Le(e)]});var x})),_x=(e,t,n)=>({icon:a},l)=>{const i="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${Ax(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:Oe(a)?o(ne,{image:{...a,iconVersion:a?.iconVersion||i},width:"48",height:"48"}):o("span",{className:u("text-h4","transparent"===n?e.iconText:(r=n,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:l+1})},String(l));var r},Ax=e=>e?"h-16 w-16":"h-24 w-24",zx=d((()=>o("div",{className:"hidden",role:"none"}))),Fx="hidden sm:flex absolute z-40",Ex={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Vx=d((({className:e,items:t=[],activeItem:n,onChange:a,tabsType:i="default"})=>{const[r,s]=dc({itemCount:t?.length||0});return l((()=>Ox(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(Jo,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Ex[i].item,gap:Ex[i].gap,children:t.map(Tf(n,a,i))}),s.canScrollLeft?o(gc,{className:u("left-6",Fx,Ex[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(fc,{className:u("right-6",Fx,Ex[i].buttonTop),onClick:s.scrollRight}):null]})})),Ox=(e,t,n)=>{const a=t.findIndex((e=>e===n));e&&a>0&&e.scrollTo({left:e?.children[a]?.offsetLeft,behavior:"smooth"})},Lx={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},jx=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(Lx[t].wrapper,e),children:o(Vx,{className:Lx[t].component,tabsType:t,...n})}):null,$x=ht((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=qx(n??{}),p=D(),f=t.every((e=>"link"===e?.type)),x=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=a(Hx(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));l((()=>{const e=p.query[h]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[h])):w;v(-1===e?0:e)}),[b,w,h]);const C=Wx(x[y],y),k=i((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(h,e?.tabName??String(t)):n.delete(h),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:u({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[jx({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Ux(t,x),activeItem:N,tabsType:r,onChange:k}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>R(t,{...m?.options,slotName:C,parent:n,extraProps:{className:e===C?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Wx)?.filter(Boolean)||[]}),qx=({__id:e,anchor:t})=>t??e??"tabs",Ux=(e,t)=>t?.length?t:e,Wx=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Hx=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Yx={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Kx=d((({children:e,activeIndex:t,columnWidth:n,version:a="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Yx[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Gx=d((({className:e="",isOpen:t,onClick:n})=>o(ye,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),Xx={Buttons:({buttons:e})=>Le(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Pe,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Me,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Me,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:a,isOpen:l})=>e?o(Gx,{className:"w-fit",isOpen:l,onClick:()=>{t({tableSource:n,pdfUrl:a})}}):null},Jx=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=a(!0);l((()=>{i===o&&s||m(!0)}),[s,o]);return Zx({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Zx=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...a}=e;if(!n||!(n in Xx))return null;return o(Xx[n],{...t,...a})},Qx=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:l,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Jx,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:a,tableInner:l,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),eb=(e,t)=>140*Np(e.slice(0,t).map((e=>e?.cols?.length??1))),tb=(e,t)=>e?.length>0?o("div",{className:u("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Me,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,nb=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,a]=Mg({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((l=n,(e,t)=>{if(!e?.length)return null;const[n,...a]=e,i=u("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Me,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${eb(a,l)}px)`},children:a?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Me,{size:"text-xl",children:e.data}):null,e?.cols?tb(e.cols,l):null]},`row${t}`)))})})]},String(t))})),_g({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var l})),ab=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const a=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Me,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(nb,{rows:t.rowsData})})})]},a)}))}))),lb=(e=!1)=>""+(e?"text-white":"text-secondary-text"),ib=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:a})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:u("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>a(t),children:o(Me,{size:"text-xl",font:"font-light",color:lb(t===n),children:e||t+1})},e)))}):null,t?o(ye,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),rb=ht((({tableSource:e,pdfUrl:t,onClick:n})=>{const l=e?.tableData,[r,s]=a(0),d=i((e=>s(e)),[]),m=l?.[r]?.items??[],u=l?.map((e=>e.currency??""));return c("div",l?{className:"bg-white z-10",children:[o(ib,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(ab,{activeTabIndex:r,items:m}),o(Gx,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Me,{size:"text-h6",children:"Данных нет"}),o(Gx,{onClick:n,isOpen:!0})]})})),sb=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:u("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(rb,{...t,onClick:n})}):null]}))),ob=d((({row:{header:e,data:t},activeIndex:n,rowIdx:l,...r})=>{const[s,d]=a(void 0),m=i((e=>d(e)),[]),[h,p]=a(void 0),g=i((e=>p(e)),[]);return c(sb,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:u("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Me,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Kx,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Qx,{cells:e,rowIdx:l,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),cb=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,_g({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),db=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:l,hiddenRowsNum:i=0,...r})=>{const s=l?.map((({data:e})=>e))||[],d=a?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[h,p]=Mg({itemCount:m,visibleItemCount:2}),f=(d||[]).map(((e,t)=>o(ob,{row:e,activeIndex:h,rowIdx:t,...r},String(t)))),[x,b]=i>0?[f.slice(0,-i),f.slice(-i)]:[f,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(k,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:i>0?o(Ei,{renderFoldableSection:({isUnfolded:e})=>c(cb,{controls:p,children:[x,o(Vi,{isUnfolded:e,children:b})]}),renderFoldButton:Tc}):o(cb,{controls:p,children:f})})]})})),mb=d((({className:e="",title:t,description:n,iconVersion:a,__html:l,richVersion:i,...r})=>c(g,{className:u("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===a?ub():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Me,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?hb(n):null,l?o(Pe,{richVersion:i,__html:l}):null]})]}))),ub=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),hb=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),pb=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Me,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Me,{size:"text-h2",children:n})}):null]}))),gb=d((e=>{const{prefix:t,unit:n,suffix:a,...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(pb,{prefix:t,unit:n,suffix:a})})})),fb=ht((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:a=!0,version:l="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=D();return o(g,{className:u("relative flex flex-col",Rg[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:l,isTheme:i,...c,children:P({...c,extraProps:{className:u("w-full",Wo(r)),...Bg(a)}})})}),{childrenTypes:[]}),xb=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",bb=d((({className:e,title:t,url:n,previewImg:a,...l})=>{const i=D();return c(g,{className:e,defaultPadding:xb(e),...l,children:[o(k,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:q(i)(a?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:q(i)(n)})}):null]})})),yb={AdTile:gt,ApplicationForm:Fs,ApplicationLeadForm:Vo,ApplicationStatus:jo,BankAccountFiltration:Uc,BenefitsBlock:Gc,BonusBenefitsBlock:ed,ButtonsBlock:nd,CalculatorBonus:xd,CalculatorBusinessDeposit:Ad,CalculatorCredit:Gd,CalculatorDeposit:hm,CalculatorRefinancing:Nm,CardTransfer:Bm,Carousel:Fm,CarouselCard:Lm,CarouselCatalogCard:$m,CarouselLinks:Wm,CarouselRecommendationCard:Qm,CarouselTariffsCard:nu,ContactsBlock:lu,CreditCardForm:Au,CreditForm:rh,DepositFiltration:mh,Depository:Ih,ErrorBlock:Rh,ExchangeRateTile:np,Footer:Fp,GracePeriod:Ep,GrantSupport:jp,Header:Sg,Headline:k,HorizontalLayout:Pg,ImgBlock:Dg,InsuranceAmountBlock:Vg,InvestmentInfo:$g,LinkDocs:nf,MobileAppTile:sf,MortgageFiltration:Rf,OfficesAtmsMap:Hf,Placeholder:Yf,ProductBlock:pt,ProductGallery:Gf,RepresentativeOfficeInfo:Jf,RichTextBlock:ex,RollupItem:ix,SafeDepositRental:Bx,StepsBlock:Mx,StickyBottomMenu:zx,TabsLayout:$x,TariffsTable:db,TextBlock:mb,UnitBlock:gb,VerticalLayout:fb,Video:bb},vb=me((()=>{l((()=>{Tt()}),[]);const e=At();jt(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const a=JSON.parse(n?.dataset?.aspects??"[]");kt({aspectsAttributes:a,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))})),Nb="cookie",wb=d((({__html:e})=>{const[t,{setTrue:n,setFalse:a}]=Lt();bp((()=>{globalThis.localStorage?.getItem(Nb)||n()}),[],3e3);const l=i((()=>{globalThis.localStorage?.setItem(Nb,"true"),a()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Pe,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(hl,{className:"bg-main-gray rounded-md w-11 h-11",onClose:l})})]})}):null}));function Cb(e){throw new Error(e)}const kb=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=a(e),l=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:l,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(n),o()}),[n,e]),d=i((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return l((()=>ce.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Cb(e)}}))),[c,d]),n},Sb=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=kb({onCloseAll:e,onClose:t}),{close:a}=de(),r=i((({key:e})=>{"Escape"===e&&a()}),[]);return jt(globalThis.document,"keydown",r),l((()=>{n.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[n]),n.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},a)=>o("div",{className:u("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:a!==n.length-1}),children:e},String(t||a))))}):null})),Tb=d((()=>{const[e,t]=a(null),n=i((()=>{t(null)}),[]);l((()=>ce.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:Cb(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return jt(globalThis.document,"keydown",r),e?o("div",{className:u("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Ib="header",Bb="footer",Rb="sticky-footer",Pb={},Db=d((({className:e,data:t=Pb,blocksRegistry:n,blockDecorator:a})=>{const{slots:l,blocks:i,fallback:r,...s}=t,d=ut(s,r);vb();const m={key:"",page:{slots:l,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:a,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:u("@container relative",t.style,e),children:[l?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:R(l?.header,{...m,slotName:Ib})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[P({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),R(l?.footer,{...m,slotName:Bb})]})]}),l?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:R(l?.["sticky-footer"],{...m,slotName:Rb})}):null,o(Sb,{}),o(Tb,{}),o(wb,{__html:d?.cookieContent?.__html})]})}));Object.assign(Db,{childrenTypes:[],slots:()=>[Ib,Bb,Rb]});e.Blocks=yb,e.ContentPage=Db,e.handlerDecorator=me,e.joinList=Mc,e.packageVersion="0.14.656",e.projectSettings=_,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=L,e.useRouter=D,Object.defineProperty(e,"__esModule",{value:!0})}));
|