@redneckz/wildless-cms-uni-blocks 0.14.63 → 0.14.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/migration-scripts/0.14.62.js +66 -0
- package/bin/migration-scripts/0.14.65.js +17 -0
- package/bin/utils.js +14 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +51 -56
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/BenefitsBlock/BenefitsBlockContent.d.ts +4 -32
- package/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +2 -3
- package/bundle/components/ProductBlock/ProductBlockContent.d.ts +0 -2
- package/bundle/components/TariffsTable/EmbeddableCellData.d.ts +1 -1
- package/bundle/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
- package/bundle/ui-kit/List/List.d.ts +6 -3
- package/bundle/ui-kit/List/ListContent.d.ts +11 -2
- package/bundle/ui-kit/List/ListItem.d.ts +1 -2
- package/bundle/ui-kit/RichText/RichTextProps.d.ts +3 -3
- package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -13
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +4 -32
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/InvestmentInfo/InvestmentInfo.js +2 -1
- package/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +3 -3
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +2 -3
- package/dist/components/ProductBlock/ProductBlock.js +1 -2
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +0 -2
- package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js +4 -2
- package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/dist/components/TariffsTable/EmbeddableCellData.d.ts +1 -1
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js +10 -2
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
- package/dist/ui-kit/BaseTile/BaseTile.js +1 -1
- package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/dist/ui-kit/List/List.d.ts +6 -3
- package/dist/ui-kit/List/List.js +21 -13
- package/dist/ui-kit/List/List.js.map +1 -1
- package/dist/ui-kit/List/ListContent.d.ts +11 -2
- package/dist/ui-kit/List/ListItem.d.ts +1 -2
- package/dist/ui-kit/List/ListItem.js +1 -7
- package/dist/ui-kit/List/ListItem.js.map +1 -1
- package/dist/ui-kit/RichText/RichTextProps.d.ts +3 -3
- package/lib/common.css +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +2 -14
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +4 -32
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/InvestmentInfo/InvestmentInfo.js +2 -1
- package/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +3 -3
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +2 -3
- package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +0 -2
- package/lib/components/ProductBlock/ProductBlock.js +1 -2
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +0 -2
- package/lib/components/RichTextBlock/RichTextBlock.fixture.d.ts +3 -2
- package/lib/components/RichTextBlock/RichTextBlock.fixture.mobile.d.ts +4 -2
- package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js +4 -2
- package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/lib/components/TariffsTable/EmbeddableCellData.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js +10 -2
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
- package/lib/ui-kit/BaseTile/BaseTile.js +1 -1
- package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/lib/ui-kit/List/List.d.ts +6 -3
- package/lib/ui-kit/List/List.js +20 -12
- package/lib/ui-kit/List/List.js.map +1 -1
- package/lib/ui-kit/List/ListContent.d.ts +11 -2
- package/lib/ui-kit/List/ListItem.d.ts +1 -2
- package/lib/ui-kit/List/ListItem.js +1 -7
- package/lib/ui-kit/List/ListItem.js.map +1 -1
- package/lib/ui-kit/RichText/RichTextProps.d.ts +3 -3
- package/mobile/bundle/bundle.umd.js +49 -54
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/BenefitsBlock/BenefitsBlockContent.d.ts +4 -32
- package/mobile/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +2 -3
- package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +0 -2
- package/mobile/bundle/components/TariffsTable/EmbeddableCellData.d.ts +1 -1
- package/mobile/bundle/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
- package/mobile/bundle/ui-kit/List/List.d.ts +6 -3
- package/mobile/bundle/ui-kit/List/ListContent.d.ts +11 -2
- package/mobile/bundle/ui-kit/List/ListItem.d.ts +1 -2
- package/mobile/bundle/ui-kit/RichText/RichTextProps.d.ts +3 -3
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -13
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +4 -32
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js +2 -1
- package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js +3 -3
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTileContent.d.ts +2 -3
- package/mobile/dist/components/ProductBlock/ProductBlock.js +1 -2
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +0 -2
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js +4 -2
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.d.ts +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +10 -2
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js +1 -1
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/ui-kit/List/List.d.ts +6 -3
- package/mobile/dist/ui-kit/List/List.js +21 -13
- package/mobile/dist/ui-kit/List/List.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListContent.d.ts +11 -2
- package/mobile/dist/ui-kit/List/ListItem.d.ts +1 -2
- package/mobile/dist/ui-kit/List/ListItem.js +1 -7
- package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/dist/ui-kit/RichText/RichTextProps.d.ts +3 -3
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +2 -14
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +4 -32
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js +2 -1
- package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js +3 -3
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTileContent.d.ts +2 -3
- package/mobile/lib/components/ProductBlock/ProductBlock.js +1 -2
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +0 -2
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js +4 -2
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.d.ts +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +10 -2
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -2
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js +1 -1
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/ui-kit/List/List.d.ts +6 -3
- package/mobile/lib/ui-kit/List/List.js +20 -12
- package/mobile/lib/ui-kit/List/List.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListContent.d.ts +11 -2
- package/mobile/lib/ui-kit/List/ListItem.d.ts +1 -2
- package/mobile/lib/ui-kit/List/ListItem.js +1 -7
- package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/lib/ui-kit/RichText/RichTextProps.d.ts +3 -3
- package/mobile/src/common.css +15 -11
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.example.json +3 -8
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +21 -62
- package/mobile/src/components/BenefitsBlock/BenefitsBlockContent.ts +6 -36
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -2
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +1 -2
- package/mobile/src/components/InvestmentInfo/InvestmentInfo.tsx +2 -1
- package/mobile/src/components/MobileAppTile/MobileAppTile.tsx +10 -12
- package/mobile/src/components/MobileAppTile/MobileAppTileContent.ts +4 -2
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +9 -16
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +0 -2
- package/mobile/src/components/RichTextBlock/RichTextBlock.example.json +2 -1
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +15 -7
- package/mobile/src/components/TariffsTable/EmbeddableCellData.tsx +1 -1
- package/mobile/src/components/TariffsTable/TariffsTableContent.ts +1 -1
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +12 -2
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +1 -2
- package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +1 -1
- package/mobile/src/ui-kit/List/List.tsx +32 -20
- package/mobile/src/ui-kit/List/ListContent.ts +14 -2
- package/mobile/src/ui-kit/List/ListItem.tsx +3 -11
- package/mobile/src/ui-kit/RichText/RichTextProps.ts +3 -3
- package/package.json +1 -1
- package/src/common.css +15 -11
- package/src/components/BenefitsBlock/BenefitsBlock.example.json +3 -8
- package/src/components/BenefitsBlock/BenefitsBlock.fixture.mobile.tsx +1 -4
- package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +33 -66
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +21 -62
- package/src/components/BenefitsBlock/BenefitsBlockContent.ts +6 -36
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -2
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +1 -2
- package/src/components/InvestmentInfo/InvestmentInfo.tsx +2 -1
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +0 -3
- package/src/components/MobileAppTile/MobileAppTile.tsx +10 -12
- package/src/components/MobileAppTile/MobileAppTileContent.ts +4 -2
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +0 -17
- package/src/components/ProductBlock/ProductBlock.tsx +9 -16
- package/src/components/ProductBlock/ProductBlockContent.ts +0 -2
- package/src/components/RichTextBlock/RichTextBlock.example.json +2 -1
- package/src/components/RichTextBlock/RichTextBlock.fixture.mobile.tsx +44 -18
- package/src/components/RichTextBlock/RichTextBlock.fixture.tsx +41 -30
- package/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +15 -7
- package/src/components/TariffsTable/EmbeddableCellData.tsx +1 -1
- package/src/components/TariffsTable/TariffsTableContent.ts +1 -1
- package/src/components/VerticalLayout/VerticalLayout.fixture.mobile.tsx +18 -2
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +2 -2
- package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +12 -2
- package/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +1 -2
- package/src/ui-kit/BaseTile/BaseTile.tsx +1 -1
- package/src/ui-kit/List/List.fixture.tsx +1 -1
- package/src/ui-kit/List/List.tsx +32 -20
- package/src/ui-kit/List/ListContent.ts +14 -2
- package/src/ui-kit/List/ListItem.tsx +3 -11
- package/src/ui-kit/RichText/RichTextProps.ts +3 -3
- package/bundle/components/MobileAppTile/renderList.d.ts +0 -3
- package/bundle/ui-kit/List/ListProps.d.ts +0 -11
- package/dist/components/MobileAppTile/renderList.d.ts +0 -3
- package/dist/components/MobileAppTile/renderList.js +0 -10
- package/dist/components/MobileAppTile/renderList.js.map +0 -1
- package/dist/ui-kit/List/ListProps.d.ts +0 -11
- package/dist/ui-kit/List/ListProps.js +0 -2
- package/dist/ui-kit/List/ListProps.js.map +0 -1
- package/lib/components/MobileAppTile/renderList.d.ts +0 -2
- package/lib/components/MobileAppTile/renderList.js +0 -7
- package/lib/components/MobileAppTile/renderList.js.map +0 -1
- package/lib/ui-kit/List/ListProps.d.ts +0 -11
- package/lib/ui-kit/List/ListProps.js +0 -2
- package/lib/ui-kit/List/ListProps.js.map +0 -1
- package/mobile/bundle/components/MobileAppTile/renderList.d.ts +0 -3
- package/mobile/bundle/ui-kit/List/ListProps.d.ts +0 -11
- package/mobile/dist/components/MobileAppTile/renderList.d.ts +0 -3
- package/mobile/dist/components/MobileAppTile/renderList.js +0 -10
- package/mobile/dist/components/MobileAppTile/renderList.js.map +0 -1
- package/mobile/dist/ui-kit/List/ListProps.d.ts +0 -11
- package/mobile/dist/ui-kit/List/ListProps.js +0 -2
- package/mobile/dist/ui-kit/List/ListProps.js.map +0 -1
- package/mobile/lib/components/MobileAppTile/renderList.d.ts +0 -3
- package/mobile/lib/components/MobileAppTile/renderList.js +0 -7
- package/mobile/lib/components/MobileAppTile/renderList.js.map +0 -1
- package/mobile/lib/ui-kit/List/ListProps.d.ts +0 -11
- package/mobile/lib/ui-kit/List/ListProps.js +0 -2
- package/mobile/lib/ui-kit/List/ListProps.js.map +0 -1
- package/mobile/src/components/MobileAppTile/renderList.tsx +0 -17
- package/mobile/src/ui-kit/List/ListProps.ts +0 -13
- package/src/components/MobileAppTile/renderList.tsx +0 -17
- package/src/ui-kit/List/ListProps.ts +0 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),x=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:g(e)),t._tmpl},g=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=x((({children:e})=>f?e:null));class y{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const v=new y;function N(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:w(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function w(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const k=new y;const S=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),C={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","":""},T=x((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return N(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];k.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[x,g]=n(!1);a((()=>v.subscribe("tab",(e=>{g(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:S("@container font-sans",f?"group":"",C[t],x?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),I={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},B={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},M=x((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=I[l]||"h3";return u(i,{className:S("font-sans m-0",B[t],e),children:n||a})})),R=x((({children:e,...t})=>u("p",{className:S("font-sans",Object.values(t)),children:e}))),P={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"}},V=x((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=P[l],m={marginTop:d.descriptionStyle};return p(T,{className:S(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(M,{className:S("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(R,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),A=()=>({open:(e,t={})=>v.fire("dialog",{type:"open",dialog:e,...t}),close:()=>v.fire("dialog",{type:"close"}),closeAll:()=>v.fire("dialog",{type:"close",all:!0})}),z=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!z(e)&&(!t||"_self"===t)),j=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),D=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var E=Object.freeze({__proto__:null,isURL:z,isLocalURL:_,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:j,joinPath:D});const O=e=>(t,l=d.BASE_PATH)=>{if(!t||z(t)||L(t,d.CDN))return t;const n=t.startsWith("/");return D(L(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},L=(e,t)=>t&&e&&e.startsWith(t),$=(e,t)=>$._impl(e,t);function F(){return F._impl()}function U(e={}){const{isRemote:t,basePath:l}=e,n=F(),{closeAll:a}=A();return e=>({...e,href:t&&!l?e.href:O(n)(e.href,l),"aria-label":e.text,onClick:$(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&_(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}$._impl=e=>e,$.setup=e=>{$._impl=e},F._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),F.setup=e=>{F._impl=e};const H={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","":""},W="bg-main-divider text-main-disabled",K={primary:W,secondary:W,white:W,link:"",transparent:"",gray:W,"":""},Y="text-center font-sans select-none",G={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","":""},X=x((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=J(e)?"hidden lg:block":"";return p("div",{className:S(q(e),"flex gap-xs"),children:[n?u("div",{className:S(r,G[i]),children:n}):null,J(e)?p("div",{className:"whitespace-pre",children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:S(r,G[i]),children:a}):null]})})),q=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return S("group/btn items-center justify-center",J(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},J=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),Z=({className:e,rounded:t,version:l})=>["inline-block",Y,l?K[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Q=({className:e,rounded:t,version:l})=>[Y,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?H[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ee=x((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=U()({onClick:r,href:n,...a}),o=t??u(X,{...s});return u(e?le:te,{...s,children:o})})),te=x((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:Q({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),le=x((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:Z({className:e,rounded:n,version:l}),children:a}))),ne={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},ae=x((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const o=F(),c=O(o)(D(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(se,{className:e,children:p("svg",{className:S(re(r),ne[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]})}):u("img",{className:e,src:c,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:ie(e,s)})})),ie=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},re=e=>e?"":"w-full h-full",se=x((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),oe=(e,t)=>e?.media&&t?.media?e.media-t.media:0,ce=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=F();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(oe).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:me(a,n)(e),type:he(l),media:i?`(max-width: ${i}px)`:"",width:t.size?.width,height:t.size?.height},`${r}_${e}`))):null,t?.src?de({...t,src:me(a,n)(t.src)},l):null]})})),de=(e,t="")=>u("img",{src:e.src,className:S("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}),me=(e,t)=>l=>l&&!z(l)?O(e)(D(t,l)):l,he=e=>e?`image/${String(e)}`:void 0,ue=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(ae,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(ce,{className:e,imageClassName:l,image:t,pathPrefix:n}):null));function pe(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"hidden sm:flex items-center gap-s",children:[u("div",{className:Q({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(ue,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(ee,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const xe={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},ge=x((({className:e,version:t="primary",defaultPadding:l,padding:n,title:a="",insetTitle:r="",buttons:s,leftImage:o,rightImage:c,imageAlign:d,isImageAlwaysOnRight:m=!1,isImageSecondary:h=!1,backwardButton:x,children:g})=>{const f=F(),b=i((e=>{e?.preventDefault(),f.back()}),[]);return p("div",{className:fe(n,l,e),children:[x?pe(t,b):null,a?u("div",{className:"relative",children:a}):null,p("div",{className:S("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[Ne(o,{imageAlign:d,className:"mx-auto"}),p("div",{className:S("grid gap-3xl h-full",c?"@xl:grid-cols-2":"",o?"":"grow"),children:[p("div",{className:"grow space-y-lg min-w-fit",children:[r,g]}),Ne(c,{className:S("@xl:justify-self-end @xl:col-start-2",s?be(m):"",ye(m),we(h)),imageAlign:d}),ve(s)]})]})]})})),fe=(e="",t="",l="")=>S("relative flex flex-col gap-3xl overflow-hidden",e||t,l),be=e=>e?"row-span-2":"@xl:row-span-2",ye=e=>e?"col-start-2 self-center":"",ve=e=>e?u("div",{className:"self-end",children:e}):null,Ne=(e,{className:t,imageAlign:l})=>e?u("div",{className:S("shrink-1/2 justify-self-center",l&&xe[l],t),children:e}):null,we=e=>e?"hidden @xl:block":"",ke=(e=[])=>e.reduce(((e,t)=>e+t),0),Se=(e=[])=>e?.length?ke(e)/e.length:0,Ce=(e,t="normal")=>e?u("div",{className:S("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:u(ue,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Te=x((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?u("div",{"data-component":"rich-text-container",children:u("div",{className:S(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Ie=(e,t)=>e?u(R,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Be=x((({children:e,...t})=>u("span",{className:S("font-sans",Object.values(t)),children:e}))),Me=(e,t)=>e?u(Be,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Re=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Te,{...e},`rte-${t}`):["label"in e?Me(e.label,t):null,"description"in e?u("span",{className:e.descriptionClassName,children:Ie(e.description,t)},String(t)):null],Pe=x((({className:e,benefitsVersion:t,...l})=>p("div",{className:S("flex gap-m min-w-56 items-center",e),children:["icon"in l?Ce(l.icon,t):null,u("div",{children:Re(l)})]}))),Ve=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Ae=e=>{return((t=e.map(Ve))?.length?Math.sqrt(Math.abs(Se(t.map((e=>e**2)))-Se(t)**2)):0)>16;var t},ze=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),_e=e=>!e.some(ze),je=x((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:S("flex gap-x-m gap-y-s",Ae(l)||_e(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Pe,{benefitsVersion:t,...e},String(l))))}):null)),De=x((({className:e,benefits:t})=>t?.length?u("div",{className:S("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Re)}):null)),Ee=x((({isTabularBenefits:e,...t})=>u(e?De:je,{...t}))),Oe=e=>Boolean(e?.src||e?.icon),Le=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:S("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map($e(l))}):null,$e=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o=Fe(a,r),c=Fe(i,r);return n||a?.icon?u(ee,{className:S("basis-full @lg:basis-auto",e),appendLeft:Ue({...a,iconVersion:o}),appendRight:Ue({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Fe=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Ue=e=>Oe(e)?u(ue,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,He={L:"w-1.5 h-1.5 mr-m",M:"w-1.5 h-1.5 mr-s",S:"w-1 h-1 mr-xs",XS:"w-1 h-1 mr-xs"},We=x((({className:e,isDotted:t,children:l,size:n="M"})=>p("div",{className:S("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:S("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",He[n])})}):null,u("span",{children:l})]}))),Ke={XS:"text-m font-light",S:"text-l font-light",M:"text-h6",L:"text-h5"},Ye={XS:"ml-2xs",S:"ml-xs",M:"ml-s",L:"ml-m"},Ge=x((({className:e,hasIndent:t,isDotted:l=!0,items:n=[],listItemSize:a="M"})=>n?.length?u("section",{className:S("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",Ke[a],t?Ye[a]:"",e),role:"list",children:n.map(((e,t)=>u(We,{isDotted:l,size:a,children:e},String(t))))}):null)),Xe=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0),qe=x((({priceList:e})=>e?.length?u("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:e.map(Je)}):null)),Je=({label:e,amount:t})=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",children:[u(Be,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?p("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Xe(2)(t)," ₽"]}):null]}),Ze=x((({className:e,tags:t})=>t?.length?u("div",{className:S("flex flex-wrap gap-xs",e),role:"list",children:t.map(Qe)}):null)),Qe=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(Be,{size:"text-m",font:"font-light",children:e})},String(t)),et=x((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m,items:h,isDotted:x=!0,priceList:g=[],listItemSize:f,tags:b=[],buttons:y,image:v,imageOptions:{imageAlign:N="center",directionRight:w=!0,isImageAlwaysOnRight:k,isImageSecondary:S=!1}={},backwardButton:C,children:T,...I})=>{const B=v?.src?u(ue,{image:v}):null,M=u(V,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),R=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(ge,{className:e,padding:t,defaultPadding:l,...m?{title:M}:{insetTitle:M},...tt(B,w),isImageSecondary:S,imageAlign:N,isImageAlwaysOnRight:k,buttons:Le(y),backwardButton:C,...I,children:p("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?u(Ee,{benefitsVersion:s,isTabularBenefits:o,benefits:R}):null,d?u(Te,{__html:d}):null,h?.length?u(Ge,{items:h,isDotted:x,listItemSize:f}):null,T,g?.length?u(qe,{priceList:g}):null,lt(b)]})})})),tt=(e,t)=>t?{rightImage:e}:{leftImage:e},lt=e=>e?.length?u(Ze,{tags:e}):null,nt=e=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",at=x((({className:e,padding:t,showBorder:l,...n})=>u(T,{className:S("overflow-hidden flex flex-col gap-3xl box-border",nt(l),e),padding:"p-0",...n,children:u(et,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...n})}))),it=e=>null!=e,rt=new Map;function st(e,t,{fallback:l,cache:i}={}){const s=r((()=>ot(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{if(!s.some(it))return;let e=!1;const l=(t,l)=>{e||(d(t),h(l))};return(async()=>{try{l(await(o?((e,t=rt)=>l=>{const n=t.get(l);if(it(n))return n;const a=e(l);return it(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s)))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0)}}function ot(e){return Array.isArray(e)?e:e instanceof Function?ot(e()):[e]}async function ct(e,t){try{return e?await dt(e,t):null}catch(e){console.error(e)}return null}async function dt(e,t){return(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json()}const mt={},ht="wcms-resources";function ut(e,t={}){const{fallback:l=mt,folderName:n=ht,setBasePath:a=!1}=t,i=D("/",a?d.BASE_PATH:"",n,`${e}.json`),{data:r}=st(e?i:null,dt,{fallback:l});return r||mt}const pt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),xt=x((e=>{const t=((e="reklamnaya-plitka")=>{const t=ut(e),l=r((()=>pt(0,t?.items?.length)),[t]);return t?.items?.[l]})(e.options?.page?.adSourceBook);return t?u(b,{children:u(at,{...t,...e})}):null}));const gt=e=>e,ft=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=gt,format:i=gt}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),x=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:x}]},bt=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],yt=e=>!e?.length,vt=e=>t=>l=>e(l)?[]:[t],Nt=[];function wt(){const{data:e}=st("/api/v1/regions",dt);return e||Nt}const kt=x((({text:e,link:t})=>p(R,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(Be,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?u(ee,{href:t.href,ariaLabel:"условия передачи данных",target:t.target,className:"text-primary-main",children:u(Be,{children:t.text})}):null]}))),St=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},Ct=x((({key:e,className:t="",inputClassName:l="",id:n,name:r,type:o="text",label:c,placeholder:d,value:m="",valid:h=!0,children:x,onChange:g,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1})=>{const N=s(null),w=i((e=>{g&&g(e.target?.value||"")}),[g]);a((()=>{v&&N.current?.focus()}),[v,N]);const k=x?"pr-3xl":"",C=h?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:S("relative",t),children:[p("label",{children:[c?u("div",{className:"mb-xs",children:u(Be,{size:"text-m",font:"font-light",children:c})}):null,u("input",{ref:N,className:S("w-full h-14 border rounded-md text-primary-text outline-none p-m",k,C,l),id:n,name:r||n,placeholder:d,type:o,value:m,onInput:w,onFocus:f,onBlur:b,pattern:y},e)]}),x]})})),Tt=x((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(Ct,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(Be,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),It=e=>"_"===e,Bt=e=>/\d/.test(e),Mt=e=>It(e)||Bt(e),Rt=[..."+7 (___) ___-__-__"],Pt=Rt.findIndex(It),Vt=Rt.map(((e,t)=>Mt(e)?Rt.slice(0,t).filter(Mt).length:-1));const At=x((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Rt.map(((e,l)=>Bt(e)?e:t.charAt(Vt[l])||e)),n=Vt.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Pt,n)):l).join("")}(e))),[t]);return u(Ct,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),zt=x((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(At,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(Be,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),_t="Некорректно заполненное поле",jt=vt((e=>null!=e&&""!==e))(_t),Dt=vt((e=>"string"==typeof e&&e.length>1))(_t),Et=vt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(_t),Ot=(Lt=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,vt((e=>"string"==typeof e&&Lt.test(e))))(_t);var Lt;const $t=e=>p("div",{className:"space-y-s",children:[u(Tt,{className:"shrink-0 w-full",label:"Наименование организации",...St(e("fullName"),jt)}),u(Tt,{className:"shrink-0 w-full",label:"ИНН",...St(e("inn"),Et)}),u(Tt,{className:"shrink-0 w-full",label:"Контактное лицо",...St(e("name"),Dt)}),u(zt,{className:"shrink-0 w-full",label:"Телефон",...St(e("phone"),Ot)})]}),Ft=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function Ut(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const Ht=e=>e?.text||e?.key||"";function Wt(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function Kt(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return Wt(globalThis.document,"click",l),t}const Yt=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Gt=x((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:Yt(t,n).map((e=>p("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[u("span",{className:"min-h-6",children:Ht(e)}),u(ae,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:S("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function Xt({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:o,iconVersion:c}){const d={open:(e,t)=>v.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>v.fire("popup",{type:"update",popup:e,...t}),close:()=>v.fire("popup",{type:"close"})},m=i((()=>{d.close(),o&&o()}),[o]),h=i((e=>{m(),r&&r(e)}),[m,r]),p=s(null),x=Kt(m);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:o}=a.getBoundingClientRect();d.update(u(Gt,{popupRef:x,options:t,value:l,query:n,onChange:h,iconVersion:c}),{top:i+window.scrollY+o,left:r,width:s})}),[e,t,l,n,h]),p}const qt=x((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:o="",isSearch:c=!1,iconVersion:d,onChange:m})=>{const[h,{setFalse:x,setTrue:g}]=Ut(),[f,b]=n(""),y=i((()=>{b(""),x()}),[]),v=Xt({isOpen:h,options:l,value:a,query:f,onChange:m,onClose:y,iconVersion:d});return p("div",{className:e,children:[Jt(t),p("div",{className:S("relative",h?"z-20":"z-10"),ref:v,children:[p("div",{className:S("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",Qt(s,r)),onClick:h?y:g,children:[u("p",{className:"p-m pr-3xl flex items-center overflow-hidden text-ellipsis whitespace-nowrap",children:Ht(a)||o}),Zt(h,d)]}),c&&h?u("div",{className:S("absolute top-0 w-full z-20"),children:u(Ct,{type:"text",autoFocus:!0,value:f,onChange:b})}):null]})]})})),Jt=e=>e?u("div",{className:"mb-xs",children:u(Be,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,Zt=(e,t)=>u(ae,{className:S("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Qt=(e,t)=>S(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),el=x((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(qt,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(Be,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),tl=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg ",children:[u("div",{className:"@xl:w-1/2",children:u(el,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Ft.map((({name:e=""})=>({key:e,text:e}))),...St(t("acquiringType"),jt)})}),u("div",{className:"@xl:w-1/2",children:u(el,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...St(t("region"),jt)})})]}),ll=x((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:S("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:S("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(Be,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),nl=e=>p("div",{children:[u(ll,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(ll,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),al=(e,t)=>{const l=Q({className:"text-white",version:e?.version});return u("button",{type:"submit",className:S("p-m w-full @xl:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},il={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},rl=bt({acquiringType:jt,region:jt,fullName:jt,inn:Et,name:Dt,phone:Ot}),sl=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;yt(rl(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=ft(il,a),o=wt();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(M,{headingType:"h6",title:"Вид эквайринга и регион",className:"@xl:text-center"}),tl({regions:o,field:r}),u(M,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),$t(r),nl(r),al(t),u(kt,{link:l})]})})),ol=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Tt,{className:"shrink-0 w-full",label:"Контактное лицо",...St(e("name"),Dt)}),u(Tt,{className:"shrink-0 w-full",label:"ИНН",...St(e("inn"),Et)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(zt,{className:"shrink-0 w-full",label:"Телефон",...St(e("phone"),Ot)}),u(Tt,{className:"shrink-0 w-full",label:"Электронная почта",...St(e("mail"),jt)})]})]}),cl=({regions:e,field:t})=>u(el,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...St(t("region"),jt)}),dl={name:"",phone:"",inn:"",mail:""},ml=bt({region:jt,name:Dt,phone:Ot,inn:Et,mail:jt}),hl=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;yt(ml(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,inn:i,mail:r,phone:a.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=ft(dl,a),o=wt();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[cl({regions:o,field:r}),ol(r),al(t),u(kt,{link:l})]})})),ul=[];const pl=async e=>await ct(e,{method:"GET"})||ul,xl=["От 1 000 ₽","До 1 000 000 000 ₽"],gl=["От 1 мес","До 15 лет"],fl=e=>u("div",{className:"pb-2xs border-b border-b-main-divider",children:p("div",{className:"space-y-s",children:[u(Tt,{className:"shrink-0 w-full",label:"Наименование организации",...St(e("fullName"),jt)}),u(Tt,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...St(e("annualRevenue"),jt)}),u(Tt,{className:"shrink-0 w-full",label:"Контактное лицо",...St(e("name"),Dt)}),u(zt,{className:"shrink-0 w-full",label:"Телефон",...St(e("phone"),Ot)}),u(Tt,{className:"shrink-0 w-full",label:"ИНН",...St(e("inn"),Et)}),u(Tt,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})}),bl=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},yl=(e,t,l)=>Math.max(t,Math.min(e,l));function vl(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function Nl({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:S("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=vl(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const wl=1,kl=100,Sl=x((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:wl),max:s=(a.length?a.length-1:kl),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=bl(e,{normalize:(e=0)=>a.length?Cl(a)(e):yl(e,r,s),format:Xe()}),x=i((e=>{m&&m(vl(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(Be,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:S("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:x,...h}),Nl({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),Tl(n)]})})),Cl=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),Tl=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(Be,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Il=e=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg",children:[p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(Be,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(Sl,{items:xl,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(Be,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(Sl,{items:gl,min:1,max:180,...e("term")})]})]}),Bl=({regions:e,branches:t,field:l})=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg @xl:mb-2xl @xl:border-none @xl:pb-0",children:[u("div",{className:"@xl:w-1/2",children:u(el,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...St(l("region"),jt)})}),u("div",{className:"@xl:w-1/2",children:u(el,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...St(l("department"),jt)})})]}),Ml={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},Rl=bt({fullName:jt,annualRevenue:jt,inn:Et,name:Dt,phone:Ot,region:jt,department:jt}),Pl=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;yt(Rl(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,""),mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=ft(Ml,n),o=wt(),c=function(e){const{data:t}=st(e?`/api/v1/branches?regionCode=${e}`:null,pl);return t||ul}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(M,{headingType:"h6",title:"Параметры",className:"@xl:text-center"}),Il(r),u(M,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),fl(r),u(M,{headingType:"h6",title:"Офис банка",className:"@xl:text-center"}),Bl({regions:o,branches:c,field:r}),al(e),u(kt,{link:t})]})})),Vl={name:"",phone:""},Al=bt({name:Dt,phone:Ot}),zl=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{name:t,phone:n}=e;yt(Al(e))&&l({typeForm:"dpst",name:t,phone:n.replace(/[^+\d]/g,"")})}),[l]),[,{field:a,...r}]=ft(Vl,n);return p("form",{className:"container",onSubmit:r.onSubmit,children:[u(M,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"@xl:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(Tt,{className:"shrink-0 w-full",label:"Имя",...St(a("name"),Dt)}),u(zt,{className:"shrink-0 w-full",label:"Телефон",...St(a("phone"),Ot)})]}),p("div",{className:"flex justify-between flex-col-reverse @xl:items-center @xl:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(kt,{link:t})}),al(e)]})]})})),_l=x((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=ut(l||"regions-grant-support"),[i,r]=n({key:""}),s=Q({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s @xl:space-y-lg",children:[a?u(el,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:a.map((({name:e=""})=>({key:e,text:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(ee,{href:o,target:"_blank",className:S("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),jl=x((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return u("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),Dl=[{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"}],El=x((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(jl,{paths:Dl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:S("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Ol(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(Be,{size:"text-l",font:"font-light",children:l})}):null]})})})),Ol=e=>S("rounded border",e?"bg-primary-main":""),Ll=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},$l=()=>{},Fl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const o=[];let c=1;for(let d=0;d<6;d++){const m=[];for(let o=0;o<7;o++)if(0===d&&o<t)m.push(u("td",{},`empty-${o}`));else if(c>l)m.push(u("td",{},`empty-${o}`));else{const t=new Date(a,n,c),l=Ul(t,e),o=Hl(t,i,r);m.push(u("td",{children:u("div",{className:Wl(l,o),onClick:()=>!o&&s(t),children:c})},`day-${c}`)),c++}o.push(u("tr",{children:m},`row-${d}`))}return o},Ul=(e,t)=>t&&e.toDateString()===t.toDateString(),Hl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Wl=(e,t)=>S("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Kl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Yl=x((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=$l})=>{const o=i((e=>s(e)),[]),{firstDayOfWeek:c,totalDays:d}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return p("table",{className:"mx-auto",children:[u("thead",{className:"text-gray font-light",children:u("tr",{children:Kl.map(((e,t)=>u("th",{className:"p-s",children:e},String(t))))})}),u("tbody",{children:Fl({firstDayOfWeek:c,today:e,totalDays:d,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:o})})]})})),Gl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Xl=Gl.map((e=>({key:e}))),ql=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Jl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Zl={className:"min-w-32",iconVersion:"black",isBorder:!1},Ql=x((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:o})=>{const[c,{setValue:d}]=Ut(!1),[m,h]=n(l?.getMonth()||(new Date).getMonth()),[x,g]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:f,handleNextMonth:b,handleSelectMonth:y,handleSelectYear:v,monthsOptions:N,yearsOptions:w,handleChangeVisibleCalendar:k,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=Kt(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Gl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Xl,yearsOptions:ql,ref:s}})({onYearSelect:g,onMonthSelect:h,onShowCalendar:d,selectedYear:x,selectedMonth:m,showCalendar:c});return p("div",{className:S(e,"relative"),ref:C,children:[u(Be,{size:"text-m","font-weight":"font-light",children:t}),en(k,l,a),c?p("div",{className:"absolute bg-white z-10 select-none",children:[p("div",{className:"flex gap-s",children:[u("div",{className:"my-auto",onClick:f,children:u(ae,{...Jl,className:"-rotate-90 cursor-pointer"})}),u(qt,{onChange:y,value:{key:Gl[m]},options:N,...Zl}),u(qt,{onChange:v,value:{key:String(x)},options:w,...Zl}),u("div",{className:"my-auto",onClick:b,children:u(ae,{...Jl,className:"rotate-90 cursor-pointer"})})]}),u(Yl,{today:l,currentMonth:m,currentYear:x,onDateSelect:o,min:r,max:s})]}):null]})})),en=(e,t,l)=>p("div",{onClick:e,className:S("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[u(R,{children:t&&Ll(t)}),u(ae,{...Jl,name:"CalendarIcon"})]}),tn=x((({className:e,label:t,value:l,error:n,onChange:a})=>p("div",{className:e,children:[t?u("div",{className:"mb-xs",children:u(Be,{size:"text-m",font:"font-light",children:t})}):null,u(Ql,{value:l,onChange:a,valid:Boolean(!n)}),u("div",{className:"h-2",children:n?u(Be,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),ln=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Tt,{className:"shrink-0 w-full",label:"Фамилия",...St(e("surname"),Dt)}),u(Tt,{className:"shrink-0 w-full",label:"Отчество",...St(e("middleName"),Dt)}),u(zt,{className:"shrink-0 w-full",label:"Телефон",...St(e("phone"),Ot)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Tt,{className:"shrink-0 w-full",label:"Имя",...St(e("name"),Dt)}),u(tn,{className:"shrink-0 w-full",label:"Дата рождения",...St(e("date"),jt)}),u(Tt,{className:"shrink-0 w-full",label:"Электронная почта",...St(e("mail"),jt)})]})]}),nn={surname:"",name:"",middleName:"",phone:"",mail:"",date:void 0,consentDataProcessing:!0},an=bt({surname:Dt,name:Dt,middleName:Dt,phone:Ot,mail:jt,date:jt}),rn=x((e=>{const{button:t,link:l,product:n,onSubmit:a}=e,r=i((e=>{const{surname:t,name:l,middleName:i,phone:r,mail:s,date:o,consentDataProcessing:c}=e;yt(an(e))&&a({typeForm:"dpst",surname:t,name:l,middleName:i,mail:s,consentDataProcessing:c,phone:r.replace(/[^+\d]/g,""),date:o?.toISOString().slice(0,10)||"",product:n||""},!0)}),[a]),[,{field:s,...o}]=ft(nn,r);return p("form",{className:"container space-y-s",onSubmit:o.onSubmit,children:[ln(s),p("div",{className:"@xl:flex justify-between items-center",children:[p("div",{className:"@xl:mb-0 mb-2 flex items-center gap-3",children:[u(El,{...St(s("consentDataProcessing"),jt)}),u(kt,{text:"Согласен с ",link:l})]}),al(t)]})]})})),sn=x((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u(Be,{color:"text-primary-text",children:t}):null]})}))),on=e=>{const{value:t,onChange:l}=e("vedTypes");return u("div",{className:"space-y-m",children:p("div",{className:"@xl:flex @xl:items-center @xl:gap-xl",children:[u(sn,{className:"mb-xs",name:"vedTypes",text:"Валютный котроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),u(sn,{className:"mb-xs",name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),u(sn,{className:"mb-xs",name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),u(sn,{className:"mb-xs",name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},cn=(e,t)=>{const l="currencyControl"===e("vedTypes").value;return p("div",{children:[l?u(el,{className:"mb-s",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...St(e("region"),jt)}):null,p("div",{className:"@xl:grid @xl:grid-cols-2 @xl:gap-x-lg",children:[l?u(Tt,{className:"w-full mb-s",label:"ИНН",...St(e("inn"),Et)}):null,u(Tt,{className:"w-full mb-s",label:"Наименование организации",...St(e("fullName"),jt)}),u(Tt,{className:"w-full mb-s",label:"ФИО",...St(e("name"),Dt)}),u(zt,{className:"w-full mb-s",label:"Телефон",...St(e("phone"),Ot)}),l?null:u(Tt,{className:"w-full mb-s",label:"Электронная почта",...St(e("mail"),jt)})]})]})},dn=e=>{const t=e("text");return p("label",{htmlFor:"textarea",children:[u("div",{className:"mb-xs",children:u(Be,{size:"text-m",font:"font-light",children:"Обращение"})}),u("textarea",{id:"textarea",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:S("block w-full resize-y min-h-24 p-m outline-none border rounded-md border-gray","hover:border-primary-hover active:focus:border-primary-text focus:border-primary-text"),value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},mn={fullName:"",name:"",phone:"",inn:"",vedTypes:"currencyControl",text:""},hn={fullName:jt,name:Dt,phone:Ot},un=bt({...hn,mail:jt}),pn=bt({...hn,inn:Et,region:jt}),xn=e=>"currencyControl"===e,gn=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),fn={ApplicationFormBusinessCard:hl,ApplicationFormWed:x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,inn:r,region:s,vedTypes:o,text:c}=e,d={typeForm:"KVED",fullName:t,name:l,phone:a.replace(/[^+\d]/g,""),text:c,vedTypes:gn(o),PartnerComments:c,...xn(o)?{inn:r,region:s?.text||""}:{mail:i}};yt((e=>xn(e)?pn:un)(o)(e))&&n(d)}),[n]),[,{field:r,...s}]=ft(mn,a),o=wt();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[on(r),u(M,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),cn(r,o),dn(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg @xl:items-center @xl:flex-row @xl:pb-4xl",children:[al(t),u(kt,{link:l})]}),u(M,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),p("div",{className:"flex gap-xl",children:[p("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(ue,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(ue,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:zl,ApplicationFormCredit:Pl,ApplicationFormAcquiring:sl,ApplicationFormGrantSupport:_l,ApplicationFormIndividuals:rn},bn=x((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(ue,t?{image:{icon:"ResponseOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponseFailIcon"},width:"37",height:"34"}),p("div",{children:[u(M,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(Be,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),yn={send:async function(e,t){const l=t?"/api/v1/lead":"/api/v1/sendcorporatelead";try{const t=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return t?.ok?await t.json():null}catch(e){return null}}},vn=x((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async(e,t)=>{const l=await yn.send(e,t)?"OK":"Fail";return s(l),l}),[]);return u(T,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(M,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?Nn(l,o):null,r?u(bn,{responseType:r}):null]})})})),Nn=(e,t)=>{const l=e?.formType;if(!l||!(l in fn))return null;return u(fn[l],{...e,onSubmit:t})},wn="text-left",kn={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Sn=x((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:S("rounded-icon object-fit flex justify-center items-center",kn[l],e),children:u(ae,{...i,width:"54%",height:"54%",name:a})}):null})),Cn=x((({className:e="",title:t,benefitList:l,...n})=>p(T,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(M,{headingType:"h3",as:"h2",className:wn,title:t}):null,l?.length?u("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(Tn)}):null]}))),Tn=(e,t)=>p("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[e?.icon?.icon?u(Sn,{className:"shrink-0",defaultIconSize:56,iconBgVersion:e?.iconBgVersion||"",...e?.icon}):null,e?.icon?.src?u(ue,{className:"shrink-0",image:e.icon}):null,e?.label?p("div",{className:"@sm:h-full",children:[u(M,{headingType:"h6",children:e.label}),In(e.description)]}):null]},String(t)),In=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?Mn(e):Bn(e)}):null},Bn=e=>e?.name?u(Be,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:e.name}):null,Mn=e=>{const t=e?.bullets?"list-disc pl-3xl":"";return e?.items&&e.items.length>0?u("ul",{className:S(t,e.listItemSize?Ke[e.listItemSize]:""),children:e.items.map(((e,t)=>u("li",{children:u(Be,{color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:e})},`benefitListItem-${t}`)))}):null},Rn=x((({className:e="",title:t,description:l,bonusItems:n=[],align:a="text-left",...i})=>u(T,{className:e,defaultPadding:"p-6xl",...i,children:p("div",{className:"container",children:[u(V,{className:"mb-xl",isEmbedded:!0,title:t,description:l,headlineVersion:"M",align:a}),u("div",{className:"flex flex-wrap gap-3xl gap-x-m w-full",children:n.length>0?n.map(((e,t)=>p("div",{className:"w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow p-xl sm:p-m border border-gray",children:[u("div",{className:"grow",children:u(V,{title:e?.title,description:e?.description,headlineVersion:"S",isEmbedded:!0,align:"text-left"})}),p("div",{className:"flex justify-center sm:justify-between sm:items-end",children:[u("div",{className:"hidden sm:block",children:Le(e?.buttons)}),e.bonusItemContent?.bonusType?Pn(e.bonusItemContent):null]})]},String(t)))):null})]})}))),Pn=e=>"count"===e.bonusType?Vn(e):An(e),Vn=e=>p("div",{className:"w-full pt-default @xl:mt-s @xl:mb-4 flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(Be,{size:"text-h2",children:e.bonusName})}):null]}),An=e=>e.image?u(ue,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,zn=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),_n=x((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=N(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),jn=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],Dn=x((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const x={sensitivity:1,rootRef:t},g=s([]),f=i(((e,t)=>{const l=[...g.current||[]];l[e]=t,g.current=l,h&&h(l),p&&p(On(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?En(r,b):{},...y?zn(d):{},gap:`${a}px`};return u("div",{className:S("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(w=(e,t)=>u(_n,{className:S(c,n?jn[n-1]:"",y?"h-full":""),style:v?En(r/4):{},activeIndex:l,idx:t,observerOptions:x,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(w):w(e,0))(m)});var w})),En=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),On=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Ln={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},$n={"horizontal-list":"w-6","vertical-list":"h-6"},Fn=x((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?u("div",{className:S("flex gap-xs",Ln[a],i?"group":"",e),"data-ver":i,children:new Array(n).fill(null).map(((e,n)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?$n[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Un=e=>e,Hn=(e=Un)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Wn=Hn(),Kn=(e=Un)=>Hn((t=>-e(t))),Yn=Kn(),Gn=e=>t=>e.scrollWidth/t,Xn=e=>(t,l)=>{e.scrollBy({left:l*Gn(e)(t),behavior:"smooth"})},qn=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[Kn()(a),Hn()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Xn(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Xn(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),x=i((e=>{l?.current&&l.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:x,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Jn=x((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=true,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=qn({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:S(e,"vertical-list"===o?"relative h-full":""),children:[u(Dn,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(Fn,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Zn=(e,t,l)=>{return u(Jn,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>p("div",{className:S("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(Be,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?u(ue,{image:e,height:"180",className:"w-auto"}):null,l?u(Be,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},Qn=x((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(T,{className:l,defaultPadding:"p-6xl",...r,children:[u(V,{title:i,description:a,headlineVersion:"M"}),e?.length?Zn(e,0,t):null]}))),ea={start:"justify-start",center:"justify-center",end:"justify-end"},ta=x((({buttons:e,className:t="",align:l,...n})=>{const a=l?S("flex",ea[l]):"";return u(T,{className:S("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Le(e)})})),la=x((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})}));const na=x((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:u("div",{className:e,ref:i,children:l})})})),aa=x((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:S("flex justify-between @xl:flex-col",a),children:[e?u(Be,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(Be,{size:"text-h3",children:[n," ",Xe(2)(Math.round(t))," ",l]})}:{children:u(Be,{size:"text-h3",children:"-"})})]}))),ia=1e4,ra=5e6,sa=Math.round(23.5),oa={minSum:ia,maxSum:ra,minMonths:13,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},ca={minSum:ia,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},da={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ma={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},ha={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},ua=e=>e?u(R,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,pa=x((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,fractionDigits:i=2})=>p("div",{children:[u(Be,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:String(e.toFixed(i)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:n}):null]})]}))),xa=x((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{className:"space-y-s",children:[u(Be,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u(ae,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),u("div",{className:"w-64",children:t?p(R,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(R,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),ga=({rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,title:a,unit:i})=>u(pa,{rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,unit:i,title:a}),fa=({rate:e,title:t,unit:l})=>u(aa,{title:t,value:e,postfix:l}),ba=({isUnknownRateShown:e=!0,isUnavailableByTerm:t=!1,title:l="Ставка",unit:n="%",rate:a=0,...i})=>e&&0===a?u(xa,{isUnavailableByTerm:t,title:l}):p("div",{children:[u("div",{className:"hidden @xl:block",children:ga({title:l,unit:n,rate:a,...i})}),u("div",{className:"@xl:hidden",children:fa({title:l,unit:n,rate:a,...i})})]});function ya({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${Xe(2)(l.min||0)} ₽`,`До ${Xe(2)(l.max||0)} ₽`];return u(Sl,{items:e?n:[],step:t,...l})}function va(e){const{data:t}=st(`/wcms-resources/${e}.json`,dt);return t}const Na=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=va(t||"bonus-calculator-data")||da,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},wa=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=ft({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=Na(a,t);return p("section",{className:S("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[p("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[ya({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),ya({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?ba({title:"Баллов за месяц",rate:d,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,p("div",{className:"flex flex-col gap-y-4xl @xl:w-96",children:[m>=0?u(aa,{title:"Баллов за год",value:m}):null,Le(l,{isVertical:!0}),ua(n)]})]})})),ka=(e,t=0)=>e?.sum&&e.sum>=ia&&e.sum<=ra?e.sum:t,Sa=(e,t=0)=>e?.period&&e.period>=13&&e.period<=60?e.period:t,Ca=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Ta={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Ia=x((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:S(`flex ${Ta[a]}`,l),children:e?.map((({id:e,text:l})=>u(El,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Ba=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>p("div",{className:"space-y-s",children:[t?u("div",{className:"hidden @5xl:block",children:u(Be,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?u("div",{className:"@5xl:hidden",children:u(Be,{color:"text-secondary-text",font:"font-light",children:l})}):null,u(Ia,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:S("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),Ma=e=>Ba({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Ra=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},Pa=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Va([e,t],n),Va=([e,t],l=[])=>({[e]:l.length?Yn(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Wn(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Aa=(e,[t,l],n)=>e>=n[t]&&e<=n[l],za=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,_a=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},ja=x((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r})=>{const[s,{field:o}]=ft({moneyValue:ka(r,1e5),daysValue:Sa(r,90),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),c=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=va(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...ha,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&za(o,e)&&Aa(n,["minSum","maxSum"],e)&&Aa(l,["minDays","maxDays"],e)))||ha,{rate:m}=d,h=_a(m,e),u=n+h,p=s?.rateRows||[ha];return{...d,...Va(["minSum","maxSum"],p),...Va(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(s,t?.rateType&&t.sourceBookDir),{income:d,finalSum:m,rate:h,isUnavailableByTerm:x,depositeName:g}=c;return p("section",{className:S("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ya({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),(f={title:"Срок, дней",min:c.minDays,max:c.maxDays,...o("daysValue"),value:c.daysValue},u(Sl,{items:[`От ${Ca(f.min||0)}`,`До ${Ca(f.max||0)}`],step:1,...f})),p("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[Da(c,o),Ma({title:"Выплата процентов",orientation:"vertical",...o("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),u("div",{className:"border-b border-main-divider md:hidden"}),ba({rate:h,depositeName:g,isShowDepositeName:i,isUnavailableByTerm:x}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[Ea(m,d),Le(l,{isVertical:!0}),ua(n),ua(a)]})]});var f})),Da=(e,t)=>p("div",{className:"space-y-s",children:[u(Be,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(El,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(El,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Ea=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(aa,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(aa,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),Oa=({min:e=0,max:t=0,availableMonths:l,...n})=>u(Sl,{items:[`От ${La(e)}`,`До ${La(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),La=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,$a=e=>Ba({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Fa=e=>Ua({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Ua({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Ua({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Ua({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Ua=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Ha=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},Wa=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=va(t||"credit-calculator-data"),s=i?.rateRows||[oa],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Fa({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Pa(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Pa(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>Fa({row:e,userInputParams:t,paramsViewSettings:l})&&Aa(n,["minSum","maxSum"],e)&&Aa(a,["minMonths","maxMonths"],e)))||oa)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,x=Ha(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:x})),[e,i])},Ka=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=ft({moneyValue:ka(i,2e5),monthsValue:Sa(i,sa),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),o=Wa(r,t,a),c=$a({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return p("section",{className:S("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ya({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Oa({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),Ya({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),ba({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(aa,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),Le(l,{isVertical:!0}),ua(n)]})]})})),Ya=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(El,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(El,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(El,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(El,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Ga=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=va(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?Ja(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>qa({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&qa({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Aa(n,["minSum","maxSum"],t)&&Aa(a||r,["minMonths","maxMonths"],t)))||ma,{rate:d}=c,m=Xa(d,e),h=n+m,u=i?.rateRows||[ma];return{...c,...Va(["minSum","maxSum"],u),...Va(["minMonths","maxMonths"],u),availableMonths:Ra(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},Xa=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},qa=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Ja=(e,t)=>e+Math.round((t-e)/2),Za=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:o}]=ft({moneyValue:ka(r,2e4),monthsValue:Sa(r,0),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(r?.isRemoteRegistration)}),c=Ga(s,t,i),{defaultMonth:d,rate:m,income:h,finalSum:x}=c,{onChange:g}=o("monthsValue");return a((()=>{g&&g(d)}),[d]),p("section",{className:S("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ya({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),Oa({title:"Срок, месяцев",min:c.minMonths,max:c.maxMonths,availableMonths:c.availableMonths,...o("monthsValue"),value:c.monthsValue}),Qa({...c,...i},o)]}),u("div",{className:"border-b border-main-divider md:hidden"}),ba({rate:m}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(aa,{title:"Доход в конце срока",value:h,postfix:"₽",prefix:"+"}),u(aa,{title:"Сумма в конце срока",value:x,postfix:"₽"}),Le(l,{isVertical:!0}),ua(n)]})]})})),Qa=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?Ma({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Ba({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},ei=e=>ti({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ti({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ti=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],li=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=va(t||"refinancing-calculator-data"),c=o?.rateRows||[ca],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>ei({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=Pa(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=Pa(["minMonths","maxMonths"],d,c),x=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>ei({row:e,userInputParams:t,paramsViewSettings:l})&&Aa(n+r,["minSum","maxSum"],e)&&Aa(i,["minSumOld","maxSumOld"],e)&&Aa(r,["minSumExtra","maxSumExtra"],e)&&Aa(a,["minMonths","maxMonths"],e)))||ca)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:g}=x,f=Ha(g,e),b=e.oldMonthlyPayment-f;return r((()=>({...x,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},ni=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=ft({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=li(i,t,a),o=$a({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return p("section",{className:S("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ya({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),ya({title:"Ежемесячный платеж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),Oa({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),ai({...s,...a},r),s.isExtraMoney?ya({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,u("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:o})]}),ba({rate:s.rate,fractionDigits:1}),p("div",{className:"flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0",children:[u(aa,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(aa,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,u("div",{className:"hidden sm:block",children:o}),Le(l,{isVertical:!0}),ua(n)]})]})})),ai=(e,t)=>p("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?u(El,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(El,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u(El,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),ii={CreditCalculatorForm:Ka,DepositCalculatorForm:Za,BusinessDepositCalculatorForm:ja,BonusCalculatorForm:wa,RefinancingCalculatorForm:ni},ri=x((({className:e,calculatorTabs:t=[],...l})=>u(T,{className:e,defaultPadding:"p-0",...l,children:oi(t)}))),si=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in ii))return null;const l=ii[t];return p("div",{className:"p-xl",children:[e?.calculatorBlock?.title?u(M,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,u(l,{...e.calculatorBlock,isMobile:!0})]})},oi=e=>{if(!e||!e.length)return null;return 1===e.length?si(e[0]):e.map(((e,t)=>u(la,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(na,{isUnfolded:t,children:si(e)}),renderFoldButton:ci(e)},t.toString())))},ci=e=>({isUnfolded:t,onToggle:l})=>{const n=e.nav?.align||"text-left";return p("button",{onClick:l,className:"w-full p-xl bg-primary-main flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(ae,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(Be,{align:n,color:"text-white",children:e.nav?.title}),u(Be,{align:n,size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(ae,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]})},di=x((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=bl(e,{normalize:(e=a)=>l&&n?String(yl(Number(mi(e)),l,n)):mi(e),format:Xe(r)}),c=i((e=>t&&t(mi(e))),[t]);return u(Ct,{onChange:c,...s,...o})})),mi=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),hi=x((e=>u(di,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(Be,{size:"text-xl",font:"font-light",children:"₽"})})}))),ui={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},pi={amount:1500},xi=x((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...o})=>{const[{amount:c},{field:d}]=ft(pi),[m,h]=n(!1);a((()=>{h(c<=0)}),[c]);const x=m?Z({version:r?.version}):Q({className:"text-white",version:r?.version}),g=U(),{onClick:f}=g(r||{});return p(T,{className:S("flex flex-col items-center",e),defaultPadding:"p-6xl",...o,children:[t?u(M,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:ui[s],children:[u(hi,{valid:!m,placeholder:i,label:l,...d("amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:c}),r?.text?u("button",{type:"submit",className:S("w-full p-m mt-lg",x),disabled:m,onClick:f,children:r.text}):null]})]})})),gi=(e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},fi=x((({className:e,disabled:t,...l})=>u(ee,{rounded:!0,className:S("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:u(ue,{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"})}))),bi=x((e=>u(fi,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),yi=x((e=>u(fi,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),vi="absolute top-[calc(50%-24px)] z-40",Ni="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",wi=x((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,x=a?t<l-1:c,g=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[ki(e),h?u(bi,{className:S(vi,n?"left-1 @lg:left-8":"left-0"),onClick:g}):null,x?u(yi,{className:S(vi,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),ki=e=>p("div",{children:[e.canScrollLeft?u("div",{className:S(Ni,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:S(Ni,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Si=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),Ci=[];function Ti(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=Si,blocksRegistry:r={},ancestors:s=Ci}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:S(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const Ii=[],Bi=(e,{key:t,ancestors:l=Ii,slotName:n=null,extraProps:a,renderProps:i=Ti,...r})=>{const s=a?(e,t)=>Ti(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||Ii,[r.parent,n]]:l},a)))};function Mi({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?Bi(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const Ri=({className:e,text:t="ХИТ"}={})=>p("div",{className:S("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[u(ae,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(R,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Pi="relative h-full",Vi={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},Ai=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(ji);return Mi({...n,renderProps:(n,a,r)=>p("div",{className:zi(n,{someCardsHighlighted:i}),children:[Ti(n,a,{className:_i(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),ji(n)?Ri({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},zi=(e,{someCardsHighlighted:t})=>S(Pi,t&&(ji(e)?"pt-3xl":"pt-3xl sm:pt-16")),_i=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>S(Pi,"min-w-80",Vi[n],t&&(ji(e)?"pt-3xl sm:pt-16":"pt-3xl"),nt(l),l&&"h-full"),ji=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Di=x((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...o})=>{const{blocks:c=[]}=o.block||{},d=t||c?.length,[m,{inc:h,dec:x}]=gi({itemCount:d,visibleItemCount:l},Math.floor(l/2)),[g,f]=qn({itemCount:d}),[b]=f.visibleIndicesRange,y=c&&"CarouselBankHistoryCard"===c[0]?.type;return p(T,{className:e,defaultPadding:"p-6xl",...o,children:[p("div",{className:S(a?"flex justify-center":"","relative max-w-full"),children:[u(Dn,{containerRef:g,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:Ai({noCardBorder:n,activeIndex:m,cardSize:s,...o})}),u(wi,{scroll:f,arrowsPadded:i,onScrollLeft:x,onScrollRight:h,hasEdgeBlocks:y,activeIndex:m,itemCount:d})]}),u(Fn,{className:"@5xl:hidden",containerRef:g,activeIndex:b,dotCount:d,listType:"horizontal-list"})]})}));Di.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselInvestmentCard","RichTextBlock","ProductBlock"],Di.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const Ei=x((({title:e,description:t,className:l})=>u(T,{className:l,defaultPadding:"p-6xl",children:u(V,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),Oi="z-10 border border-solid w-full h-full",Li=S(Oi,"absolute hidden @xl:block border-transparent"),$i=x((({className:e,title:t,description:l,button:n,...a})=>u(T,{className:S("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative h-full",children:[u("div",{className:S(Li,"top-9 right-12 bg-green-dark")}),u("div",{className:S(Li,"top-6 right-8 bg-green")}),u("div",{className:S(Li,"top-3 right-4 bg-green-light")}),p("div",{className:S(Oi,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[u(V,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Le([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Fi={black:"bg-black",white:"bg-white"},Ui=x((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:o,...c})=>u(T,{className:S("flex flex-col justify-left",e),defaultPadding:"p-2xl",...c,children:p(ge,{className:"h-full",padding:o,title:u(V,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?u(ue,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Le([i],{buttonClassName:"w-full self-end"}),children:[r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(Be,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Hi)]}):null,a?p(Be,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Hi=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Fi[e]}`},String(t)),Wi="hidden xl:block absolute w-full h-full border border-white",Ki=x((({className:e="",...t})=>{const l=U(),{text:n,href:a,target:i,onClick:r}=l(t);return n?u("div",{className:S("flex relative group/link pl-s pb-s min-w-[16rem] xl:min-w-[20rem]",e),children:p("div",{className:"relative min-h-16 w-full",children:[p("a",{className:S("absolute border\n bg-white flex justify-between group-hover/link:text-primary-main","sm:rounded-md rounded-none w-full px-xl py-lg whitespace-nowrap z-10"),role:"link",href:a,target:i,onClick:r,children:[u(Be,{size:"text-l",font:"font-light",color:"text-primary-text",children:n}),u(ue,{className:"group-hover/link:brightness-100 hidden xl:block ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main hidden xl:block",width:"24",height:"24"})]}),u("div",{className:S(Wi,"-bottom-1.5 -left-1.5")}),u("div",{className:S(Wi,"-bottom-3 -left-3")})]})}):null})),Yi=x((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>u(T,{className:S("overflow-hidden",e),...i,children:p("div",{className:"flex flex-col @6xl:flex-row gap-m",children:[p("div",{children:[u(V,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),u(V,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?Gi(n,"@6xl:min-w-[672px] p-0 justify-self-end"):null]})}))),Gi=(e,t="")=>{const l=Math.ceil(e.length/3);return u(Di,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",children:new Array(l).fill(null).map(((t,l)=>u("div",{className:S("flex flex-wrap gap-2xs self-start xl:justify-center @5xl:grid @5xl:grid-cols-2"),children:e.slice(3*l,3*(l+1)).map(((e,t)=>u(Ki,{...e},String(t))))},String(l))))})},Xi=x((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=U({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:S("block",e),...t?i:{},children:a})})),qi=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Ji=e=>qi.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},Zi=x((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,o]=n(),c=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=Ji(t),c=Oe(n)?n:r,d=l?{text:a}:{text:""};return!s&&a&&o(!0),{...e,...d,icon:{...c,iconVersion:"color"},version:e?.version??i}})),d=S("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",a?"flex-1 justify-center":"");return p("div",{className:S("flex flex-col gap-xs",e),children:[u("div",{className:"flex gap-xs",children:Le(c,{className:S(a||s?"basis-full":""),buttonClassName:d})}),r?u(Be,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Qi=x((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,listItemSize:o="S",socialMedia:c=[],target:d,title:m,align:h="text-left",benefits:x,imageOptions:{directionRight:g=!0,isImageAlwaysOnRight:f=false,isImageSecondary:b=!1}={},...y})=>u(T,{className:S("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...y,children:u(Xi,{href:a,target:d,className:"h-full",children:p(ge,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:u(V,{title:m,description:l,headlineVersion:"XS",isEmbedded:!0,align:h}),...tt(Oe(i)?u(ue,{image:i}):null,g),buttons:c.length?u(Zi,{media:c,showButtonText:!0,version:y?.version}):null,isImageAlwaysOnRight:f,isImageSecondary:b,imageAlign:"center",children:[u(Ee,{benefits:x}),u(Ge,{items:r,listItemSize:o,isDotted:s}),er(n,h)]})})}))),er=(e,t)=>e?u(R,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,tr=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(Be,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(Be,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:Le(a)}):null]},String(t))},lr=x((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(tr),o=s.slice(0,1),c=s.slice(1);return p(T,{className:S("flex flex-col",e),defaultPadding:"p-2xl",...r,children:[Oe(n)?u("div",{className:"self-center",children:u(ue,{image:n})}):null,t?u(M,{className:S("pt-xs",l),headingType:"h5",title:t}):null,a?u(ee,{className:"w-full mt-m mb-lg",...a}):null,i.length?u(la,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(na,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?nr:null}):null]})})),nr=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(ae,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),ar=(e=!1)=>e?"text-white":"",ir=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),rr=x((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(ue,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(ue,{image:t})}),l?u(M,{headingType:"h4",className:ar(a),title:l}):null,n?u("div",{className:ir(a),children:n}):null]}))),sr=x((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:S("h-full","border-main-divider border-b"),children:e?e.map(or(l,t)):null})}))),or=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:S("text-right",e?"text-white":""),children:l}):null,n?u("div",{className:S("text-right",e?"text-white/80":"text-secondary-text"),children:n}):null]})]},String(a)),cr=x((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:S("border border-gray rounded-md p-m mb-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),role:"row",children:[u(rr,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(sr,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(ee,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,dr({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),dr=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:l?"Скрыть":"Показать описание"})}),mr=x((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(M,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(hr,{...e})})]})})),hr=x((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(cr,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(Jn,{onVisibleIndicesChange:m,children:h}):h})),ur=e=>e%2!=0,pr=x((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>p(l,{tag:l,className:S("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?u("div",{children:e}):null,t?u("div",{children:t}):null]}))),xr=x((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>u(pr,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:S("py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:u("span",{className:"text-h4 pr-s",children:t}),iconNode:l?u(ue,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),gr=({isUnfolded:e,onToggle:t})=>u(xr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),fr=x((({title:e,description:t})=>p("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[u(ue,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),u(V,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:wn})]}))),br=["ArrowDownIcon","ArrowUpIcon"],yr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",vr=x((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return p("div",{children:[u("div",{className:S(t.length?"hidden":"block"),children:a?u(fr,{...a}):null}),p("div",{className:S("space-y-2xs",t.length?"":"hidden"),children:[p("div",{className:S(yr),children:[Bi(r,{...i.options,parent:n}),ur(r.length)?u(xt,{className:"col-span-6"}):null]}),u(la,{renderFoldableSection:({isUnfolded:e})=>p(na,{className:S(yr),isUnfolded:e,children:[Bi(s,{...i.options,parent:n}),ur(s.length)?u(xt,{className:"col-span-6"}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(xr,{className:S(l<1?"hidden":""),disabled:!s?.length,label:e,icon:br[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),Nr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,wr=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>Nr(t[e])||Nr(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>Nr(t[e])||Nr(l[e])||kr(t[e])<=kr(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>Nr(t[e])||Nr(l[e])||kr(t[e]?.min)>=kr(l[e]?.min)&&kr(t[e]?.min)<=kr(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>Nr(t[e])||Nr(l[e])||t[e]?.some((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>Nr(t[e])||Nr(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),kr=e=>Number(e||0),Sr=(e,t)=>(l=gt)=>e&&e.filter((e=>wr(t,l(e.content||{})))),Cr=x((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(ll,{text:l.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(t)if(n){const n=e?.includes(l);t(n?(e||[]).filter((e=>e!==l)):[...e||[],l])}else t(e===l?"":l)})(l.value),type:n?"checkbox":"radio"},l.value))))),Tr=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(Ir(e))]}),n?u("div",{children:u(ee,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,...n})}):null]}),Ir=e=>([t,l])=>{const n=l?.type;return"array"===n?Br(t,e)(l):null},Br=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(Be,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(Cr,{items:n,multiple:!0,...t(e)})]},e)},Mr=(e,t)=>e[t?.sourceBook]?.rateRows.map((e=>e.minMonths)).filter((e=>void 0!==e));async function Rr(...e){const t=e.map((e=>ct(e)));return Promise.all(t)}function Pr(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const Vr=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function Ar(e){const{dirs:t=[],source:l=[]}=r((()=>{const t=(e=>e?.filter(Vr).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=st(t,Rr);return{source:Object.fromEntries(Pr(l,n).filter((([,e])=>Boolean(e)))),months:(a=n.flatMap((e=>e?.rateRows||[])).filter((e=>"number"==typeof e.minMonths&&e.minMonths===e.maxMonths)).map((e=>e.minMonths)),[...new Set(a)]).sort(((e,t)=>e-t))||[]};var a}const zr=1e9,_r={sum:{min:1e4,max:zr},period:3},jr=x((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=Ar(i.block?.blocks),[o,{field:c,reset:d}]=ft(_r),m=Sr(i.block?.blocks,o)((e=>({...e,period:Mr(r,e||{})||[]}))),h=p("div",{children:[u(hi,{label:n?.title,min:500,max:zr,...c("sum",{parse:e=>({min:Number(e),max:zr}),format:({min:e})=>String(e)})}),u(Sl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...c("period")})]});return p(T,{className:S("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[Tr({field:c,reset:d,filtrationSchema:t,resetButton:l,children:h}),u(vr,{blocksToRender:m,...i})]})})),Dr={type:"string",title:"Адрес справочника"};jr.childrenTypes=["ProductTile"],jr.childSchema=e=>({...e?.filtrationSchema||{},sourceBook:Dr});const Er=e=>"Image"===e?.contentType&&e?.image?u(ue,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Or=x((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(T,{className:S("flex flex-col justify-center items-center",e),defaultPadding:S("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:Er(n)}),u(V,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?u(ee,{version:a?.version,text:a?.text,...a}):null]}))),Lr="location";function $r(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(v,"location",Ur()??{name:e}),r=i((e=>{Hr(e),l(e)}),[]),{data:s}=st("/api/v1/region",dt);return a((()=>{s&&!Fr()&&l(s)}),[s]),[t??{name:e},r]}const Fr=()=>Boolean(globalThis.localStorage?.getItem(Lr)),Ur=()=>{try{const e=globalThis.localStorage?.getItem(Lr);return e&&JSON.parse(e)}catch(e){return null}},Hr=e=>{try{globalThis.localStorage?.setItem(Lr,JSON.stringify(e))}catch(e){}};var Wr;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(Wr||(Wr={}));const Kr=new Intl.NumberFormat("ru",{style:"currency",currency:Wr.RUB}),Yr=e=>e?Kr.format(e):"",Gr="text-left text-m font-light text-secondary-text",Xr=`${Gr} pl-5xl`,qr={USD:"DollarIcon",EUR:"EuroIcon"},Jr=x((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Gr,children:u(Be,{size:"text-m",children:"Валюта"})}),u("th",{className:Xr,children:u(Be,{size:"text-m",children:"Купить"})}),u("th",{className:Xr,children:u(Be,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Zr)})]}))),Zr=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(ue,{image:{icon:qr[t]},width:"24",height:"24"}):null,u(Be,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(Be,{size:"text-h6",children:Yr(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(Be,{size:"text-h6",children:Yr(e?.buyExchangeRate)})})]},t)},Qr={icon:"GpsIcon"},es=x((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Sn,{...Qr,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),ts=(e,t,l)=>{const n=Number(ls(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},ls=e=>e.replace(/[^\d.,]/g,"").replace(",","."),ns=e=>{return(t=[[e=>e.value!==Wr.RUB&&e.oppositeValue!==Wr.RUB,()=>e.handleConvert(e.value,Wr.RUB)],[e=>e.value===Wr.RUB&&e.oppositeValue===Wr.RUB,()=>e.handleConvert(e.value,Wr.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function as(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(Ct,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(qt,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const is=x((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Wr.RUB,selectBuy:l?.[0]?.currency?.currency||Wr.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[as({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:rs(r,o,l),value:r.inputSell,setValue:e=>os(o,l)(e,r.selectSell,r.selectBuy)}),as({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:ss(r,o,t),value:r.inputBuy,setValue:e=>cs(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(ee,{text:a.text,version:a?.version,...a}):null]})})),rs=(e,t,l)=>n=>{t({selectSell:n}),ns({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{os(t,l)(e.inputSell,n,a)}})},ss=(e,t,l)=>n=>{t({selectBuy:n}),ns({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>cs(t,l)(e.inputBuy,n,a)})},os=(e,t)=>(l,n,a)=>{e({inputSell:ls(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(ts(l,i,n===Wr.RUB)||"")})},cs=(e,t)=>(l,n,a)=>{e({inputBuy:ls(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(ts(l,i,n===Wr.RUB)||"")})};const ds=x((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=$r(),i=function(e){const t=e?.code||"000",{data:l}=st(`/api/v1/exchangerates?regionCode=${t}`,dt);return l||{}}(a),r=ms(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Wr.RUB}});const o=r.filter((e=>e.saleExchangeRate));return o.push({currency:{currency:Wr.RUB}}),u(T,{className:S("box-border min-h-80",e),...n,children:u(ge,{className:"h-full",title:u(M,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[r?u(Jr,{className:"mb-xl",exchangeCurrencyItems:r}):null,u(es,{address:i?.address})]}),r.length&&s.length&&o.length?u(is,{className:"grow",currencyRatesBuy:s,currencyRatesSell:o,button:l}):null]})})})})),ms=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],hs=e=>ut(d.SITEMAP||"sitemap",{fallback:e}),us=()=>{const e=globalThis.document?.cookie.split(";")??[];for(const t of e){const[e]=t.split("=");globalThis.document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}},ps=(e,t)=>u(Sn,{...e,iconBgVersion:t,className:"shrink-0"}),xs=x((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>u(pr,{tag:"button",className:S("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[ps(a,t),e?u(Be,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?u(ae,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),gs=x((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,...o})=>u(T,{className:S("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...o,children:u(la,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(na,{className:S("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:Mi({...o,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>fs({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));gs.childrenTypes={exclude:["RollupItem"]};const fs=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=(e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"accordion"===e?u(xs,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):u(xr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},bs=x((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(ys):null,u(ee,{version:"primary",className:"w-full",href:"https://old.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),ys=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(Be,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(vs)})]},String(t)),vs=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:Ns(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),Ns=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${ws(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},ws=e=>e.replaceAll(/\D/g,""),ks=x((({className:e="",index:t,text:l,...n})=>{const a=U(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:S("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),Ss=x((({title:e,links:t,className:l=""})=>p("div",{className:S("flex flex-col gap-4",l),children:[u(Be,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>u(ks,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),Cs=x((({className:e="",items:t,basePath:l})=>t?.length?u("ul",{className:S("flex flex-col",e),children:t.map(Ts(l))}):null)),Ts=e=>(t,l)=>{const{text:n,...a}=t,i=U({isRemote:!(!d.BASE_PATH||!e)&&!d.BASE_PATH.startsWith(e),basePath:e}),{href:r,target:s,onClick:o}=i(a);return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",href:r,target:s||"_self",onClick:o,children:n||null})},`list_item_${String(l)}`)},Is=x((({className:e="",index:t,...l})=>{const n=U({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),Bs=x((({className:e="",links:t})=>p("div",{className:S("@container",e),children:[u("div",{className:"pt-lg",children:u(Be,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(Is,{index:t,...e},String(t))))}):null]}))),Ms=x((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=hs(l),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:c,documents:m}=ut(d.FOOTER||"footer",{fallback:l});return p(T,{tag:"footer",className:e,defaultPadding:"p-4xl pb-24",...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(gs,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,children:u(Cs,{items:e.items,basePath:o(e.href)})},String(t))))}),u(bs,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(Zi,{className:"mb-xl",media:r,stretched:!0,children:"Соцсети"}),p("div",{className:"mb-xl",children:[u("div",{className:"flex flex-col gap-4 mb-xs",children:s?.map(Rs)}),u(Be,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),u("div",{className:"py-lg border-t border-main-divider",children:u(ks,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:us})}),u(Ss,{className:"py-lg border-y border-main-divider",title:c,links:a}),u(Bs,{links:m})]})})),Rs=({href:e="/",text:t},l)=>{const{label:n}=Ji(e);return u(ee,{className:"w-full",text:t||n,version:"secondary",href:e,target:"_blank"},String(l))},Ps={width:"34",height:"34"},Vs={"bg-white":"color",transparent:"white"},As={"bg-white":"text-primary-main",transparent:"text-white"},zs=(e,t,l)=>u(ue,t?.src?{image:t,className:As[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Vs[e]},className:As[e],width:l?.width,height:l?.height}),_s={"bg-white":"text-primary-text",transparent:"text-white"},js=x((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:S("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[zs(i,l?.image,Ps),r?n??u("div",{className:"ml-s",children:u(Be,{font:"font-medium",color:_s[i],size:"text-s",children:l?.title||"Россельхозбанк"})}):null]}))),Ds={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Es=x((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=F(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u("div",{children:u(js,{className:"my-2xs",bgColor:e,logo:t})}):Os(s),l?u("div",{children:u(ee,{href:l,ariaLabel:"Войти",target:"_blank",className:S("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",Ds["transparent"===n?"transparent":"default"]),children:"Войти"})}):null]})})),Os=e=>u("div",{children:p("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(ue,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),Ls={"bg-white":"primary",transparent:"transparent"},$s=x((({bgColor:e="bg-white",version:t=Ls[e],...l})=>{const{logo:n}=hs(l.options?.page?.fallback),{internetBankUrl:a}=ut(d.PORTAL_DATA||"portal-data",{folderName:"portal-resources",setBasePath:!0});return u(T,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(Es,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),Fs={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Us=x((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isInnerBorder:r=!1,...s})=>u(T,{className:S("relative flex flex-col",Fs[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...s,children:Mi({...s,extraProps:{className:S("w-full",nt(r)),padding:n?"":"p-0"}})})));Us.childrenTypes=[];const Hs=x((e=>u(Us,{...e})));Hs.childrenTypes=[];const Ws=x((e=>{const{className:t,image:l,...n}=e;return u(T,{className:t,defaultPadding:"p-0",...n,children:u(ue,{image:l})})})),Ks=["байт","Кб","Мб","Гб","Тб","Пб"],Ys=x((({icon:e,text:t,href:l,target:n,fileFormat:a,fileSize:i})=>{const r=a||i?",":"",s=i??"",o=a?String(a):"";return p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",href:l,target:n,children:[e,t?p(Be,{size:"text-l",font:"font-light",children:[t,u(Be,{color:"text-secondary-text",children:l&&`${s} ${r} ${o}`})]}):null]})})),Gs={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Xs=x((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=F();return p(T,{className:S("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(V,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:S("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Gs[r]),role:"list",children:a.map(qs(o,i))}):null]})})),qs=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a="Attachment"===l?.docType?O(e)(l?.attachment?.src):l?.href,i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Ks[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"!==l?.docType?l?.fileFormat:"";return u("div",{role:"listitem",children:u(Ys,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?u(ue,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:t,width:"24",height:"24"}):null})},String(n))},Js=(e,t,l)=>e?.length?u(Ge,{items:e,listItemSize:t,className:"text-l font-light"}):u(Be,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:l}),Zs=x((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,headingType:i="h4",image:r,items:s,listItemSize:o,qr:c,additionalDescription:d="",title:m="Мобильное приложение",version:h="primary",...x})=>{const g="secondary"===h?"p-m min-w-32":"min-w-24",f=r?.src?u(ue,{className:"hidden lg:block",image:r}):null;return u(T,{className:S("min-h-80",e),padding:"p-0",version:h,...x,children:p(ge,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:m?u(M,{headingType:i,title:m,className:S("whitespace-pre-wrap",l)}):null,rightImage:f,buttons:Le(n,{className:"flex-wrap"}),children:[a?u(Be,{size:"text-xl","font-weight":"font-light",children:a}):null,p("div",{className:S("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[Js(s,o,d),c?.src?u("div",{className:S("flex justify-center bg-white rounded-md @xl:-order-1",g),children:u(ue,{className:"w-fit",image:c})}):null,r?.src?u(ue,{className:"lg:hidden",image:r}):null]})]})})})),Qs={primary:"bg-white/30",secondary:"bg-main-divider"},eo={primary:"text-white",secondary:"text-secondary-text"},to=x((({count:e,version:t="secondary"})=>u("div",{className:S("w-6 h-6 rounded-full flex items-center justify-center",Qs[t]),children:u(Be,{size:"text-xs",color:eo[t],children:e})}))),lo=(e=[],t={})=>e.filter((({content:e={}})=>wr(t,e))).length,no=(e,t)=>e===t;const ao=(io=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(no,((e=no)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>io(l,t[e])))));var io;const ro=[],so={},oo={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},co={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},mo={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},ho={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},uo=x((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:S("h-12","block flex-1","cursor-pointer",oo[n],l?ho[n]:mo[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:S("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?co[n]:"text-secondary-text hover:text-primary-main"),children:[u(Be,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),po=x((e=>u(e?.item?.href?xo:go,{...e}))),xo=x((e=>{const t=U(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(uo,{...e,tag:"a",item:a,onClick:n})})),go=x((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(uo,{item:e,onClick:n,...l})})),fo=(e,t,l)=>(n,a)=>u(po,{isActive:n===e,onClick:t,type:l,item:n},String(a)),bo=x((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:S("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(fo(n,a,t))}))),yo={categories:[],extraOptions:[],propertyType:[],stage:[]},vo=x((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:o,reset:c,update:d}]=ft(yo),m=Sr(a.block?.blocks,s)(),h=i(((e=yo)=>d(e)),[]),x=(({hotFilters:e=ro,filtrationState:t=so,blocks:l=ro,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>ao(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:u(to,{version:t===e[a]?"primary":"secondary",count:lo(l,t.filter)})})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:h});return p(T,{className:S("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(bo,{...x}),Tr({field:o,reset:c,filtrationSchema:l,resetButton:n}),u(vr,{blocksToRender:m,...a})]})}));function No(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}vo.childrenTypes=["ProductTile"],vo.childSchema=e=>e?.filtrationSchema||{};const wo={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},ko=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(wo).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),So={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},Co=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(So).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(ae,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),To=e=>globalThis[e];const Io=()=>function(e,t){const[l,r]=n(),s=i((()=>r(To(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!To(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),Bo={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},Mo=x((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(Bo).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(ae,{name:l,width:"20",height:"16"})})})),Ro={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},Po=[55.753995,37.614069],Vo=x((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=Io(),[o,c]=n(),d=e?Ao(e):Po;if(a((()=>{i?.current||r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:d,zoom:l,controls:[],suppressMapOpenBlock:!0}),No(r,i.current,e))})),i.current&&r&&(No(r,i.current,e),e?.length||i.current.setCenter(Po))}),[r,i,e,d,l]),!r)return null;const m=o?"z-[100000]":"z-10";return p("div",{id:"map",className:S(!o&&"relative","w-full",t),children:[u("div",{className:S("absolute flex left-2 top-4 w-1/2",m),children:ko(d)}),u("div",{className:S(Object.values(Ro),m,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;o?e.exitFullscreen():e.enterFullscreen(),c(e.isFullscreen())},children:u(ae,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:S("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",m),children:[u(Mo,{yandexMaps:i}),u(Mo,{yandexMaps:i,direction:"out"})]}),Co(i.current,r,S("right-2 top-80",m))]})})),Ao=e=>[_o(zo(e,0)),_o(zo(e,1))],zo=(e,t)=>e.map((e=>e[t])),_o=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,jo={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},Do=(e,{field:t,reset:l})=>p("div",{className:"pb-2xl",children:[e?.length?u("div",{className:"flex flex-wrap gap-3xl pb-2xl",children:e.map((e=>u(El,{text:jo[e],...t(e)},e)))}):null,u(ee,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:u(ae,{name:"CloseIcon",width:"16",height:"16"})})]}),Eo=()=>null,Oo=()=>[],Lo=x((({className:e,data:t=[],renderCard:l=Eo,filterItems:n=Oo,initFilterState:a={},descriptionData:i,title:r})=>{const[s,{field:o,reset:c}]=ft(a),d=n(t,s),m=d.map((e=>[e.gpsLatitude,e.gpsLongitude].filter(Boolean))).filter((e=>e&&2===e.length)),h=d.length;return p("div",{className:S("space-y-1",e),children:[p("div",{className:"bg-white",children:[p("div",{className:"pt-6xl px-6xl",children:[p("div",{className:"flex gap-xs pb-2xl",children:[u(M,{headingType:"h2",children:r}),h?u(Be,{size:"text-h2",color:"text-secondary-text",children:`(${h})`}):null]}),i?$o(i):null,Do(Object.keys(a),{field:o,reset:c})]}),u("div",{className:"h-[600px]",children:u(b,{children:u(Vo,{points:m,className:"h-full"})})})]}),d.map(l)]})})),$o=({description:e,list:t})=>e||t?.length?p("div",{className:"p-xl mb-2xl border border-gray rounded-md",children:[e?u(R,{size:"text-l",font:"font-light",children:e}):null,t?.length?u("div",{className:"flex gap-2xl flex-wrap pt-xs",children:t.map(((e,t)=>p("div",{className:"flex gap-xs items-center",children:[e?.image?u(ue,{image:e.image}):null,e?.text?u(Be,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Fo={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"}},Uo=x((({className:e,children:t,color:l="gray"})=>u("div",{className:S("p-s border border-gray rounded-md flex items-center",Fo[l].border,e),children:u(Be,{size:"text-m",color:Fo[l].text,children:t})}))),Ho=x((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:Wo({textItems:a,subText:t,children:l,...n})})),Wo=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>p("div",{className:S("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?u(Be,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>u(Be,{size:"text-l",children:e.trim()},String(t)))),a?u(Be,{color:n,size:"text-m",children:a}):null]}),Ko=x((({className:e,children:t})=>u("div",{className:S("flex border-t border-solid border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Yo=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},o)=>{const c=[{label:"Устройство",value:Xo(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return p("div",{className:"bg-white col-span-12 p-3xl border-green border",children:[p("div",{className:"flex justify-between",children:[u(Be,{size:"text-h4",children:Xo(e)}),u(Uo,{color:"green",children:Xo(s)})]}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(ae,{name:"GeolocationIcon",width:"24",height:"24"}),u(Be,{size:"text-l",children:t})]}):null,u(Ko,{className:"flex-wrap",children:c?.map(Go)})]},String(o))},Go=(e,t)=>u(Ho,{...e},String(t)),Xo=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",qo=[];const Jo=async e=>await ct(e,{method:"GET"})||qo,Zo={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Qo={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},ec=x((({data:e,className:t})=>{const[l]=$r(),n=function(e){const{data:t=qo}=st(`/api/v1/atms?regionCode=${e}`,Jo);return t}(l?.code??"000");return u(Lo,{className:t,filterItems:tc,data:n,initFilterState:Zo,renderCard:Yo,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),tc=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Qo[t](e))),l=!n.length||n.some((t=>Qo[t](e)));return t&&l}))},lc=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", "),a=[nc({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),nc({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean);return u(Ho,{label:"Режим работы",value:a,className:"max-w-none"})},nc=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",ac=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],ic=e=>ac.map((([t,l,n])=>({key:t,title:n,short:l,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??"")}}))),rc=e=>{if(!e)return null;const t=sc(e);return p(Ko,{className:"border-none",children:[u(Ho,{label:"Для юридических лиц",labelSize:"text-l",children:u("div",{className:"flex gap-1",children:t.map(oc)})}),u(Ho,{label:"Режим работы",className:"max-w-none",children:u(Be,{children:e})})]})},sc=e=>{const t=ac.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},oc=({short:e,status:t},l)=>u("div",{className:S("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:u(Be,{size:"text-xs",children:e})},String(l)),cc=(new Date).getDay(),dc=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c},d)=>{if(!o)return null;const m=ic(o),h=o?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return p("div",{className:"bg-white col-span-12 p-3xl border-green border",children:[p("div",{className:"flex justify-between",children:[u(Be,{size:"text-h4",children:e}),hc(m)]}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(ae,{name:"GeolocationIcon",width:"24",height:"24"}),u(Be,{size:"text-l",children:t})]}):null,p(Ko,{className:"flex-wrap",children:[u(Ho,{label:"Факс",value:n}),u(Ho,{label:"Телефон филиала",value:l}),u(Ho,{label:"Для обращений юридических лиц",value:a}),u(Ho,{label:"Обслуживание физических лиц",value:i}),u(Ho,{label:"Для консультаций по валютному контролю",value:s}),u(Ho,{label:"Контакт-центр",value:r})]}),o.isMatchesPattern?u(Ko,{children:u(Ho,{label:h,labelSize:"text-l",className:"w-full max-w-none",children:u("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:m?.map(uc)})})}):p(Ko,{children:[u(Ho,{label:h,labelSize:"text-l",children:u("div",{className:"flex gap-1",children:m?.map(oc)})}),lc(m)]}),o?.businessScheduleVisibleTag?rc(o?.businessScheduleDescription):null,c?.currencies?.length?u(Ko,{className:"flex-wrap",children:c?.currencies?.map(mc)}):null]},String(d))},mc=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>p("div",{className:"flex gap-lg h-full",children:[e?.currency?u(Ho,{label:"Валюта",value:e.currency}):null,t?u(Ho,{label:"Купить",value:String(t)}):null,l?u(Ho,{label:"Продать",value:String(l)}):null]},String(n)),hc=e=>{const[t]=e?.slice(cc-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?p("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?u(Uo,{color:"green",children:a}):null,l&&i?u(Uo,{color:"yellow",children:`перерыв: ${l}`}):null]}):u(Uo,{color:"red",children:"Выходной"})},uc=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>u(Ho,{label:e,value:t&&l?l:"",subText:pc(n,a,t),subColor:!t||a?"text-error":"text-green-dark"},String(i)),pc=(e,t=!1,l=!1)=>l?e&&t?`Перерыв ${e}`:e:"Не работает",xc=[];const gc=async e=>await ct(e,{method:"GET"})||xc,fc={workingSaturday:!1},bc={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},yc=x((({className:e})=>{const[t]=$r(),l=function(e){const{data:t=xc}=st(`/api/v1/branches?regionCode=${e}`,gc);return t}(t?.code??"000");return u(Lo,{className:e,filterItems:vc,data:l,initFilterState:fc,renderCard:dc,title:`Офисы филиала ${t?.name}`})})),vc=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>bc[t](e)))))},Nc=x((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return u(T,{version:"transparent",className:S(t),defaultPadding:"p-0",...l,children:"offices"===n?u(yc,{}):u(ec,{data:e})})})),wc=x((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(T,{className:S("box-border",e),...n,children:[u(V,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:kc()})]}))),kc=(e=3)=>Cc(100,e).map((e=>Math.floor(e))).map(Sc),Sc=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),Cc=(e,t)=>[e].concat(t>0?Cc(e/1.618,t-1):[]),Tc=x((({className:e,padding:t,slides:l=[],...n})=>u(T,{className:S("overflow-hidden relative",e),padding:t,...n,children:u(Jn,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",children:u(et,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),Ic=x((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(T,{className:S("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[Oe(r)?u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:u(ue,{image:r})}):null,s?u(M,{headingType:"h3",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?Bc(i):null,Mc({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Mc({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Mc({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Le([n]):null]})]}))),Bc=e=>u("div",{className:"border-b border-main-divider pb-lg",children:u(Te,{__html:e})}),Mc=({label:e,data:t,iconName:l,dataColor:n=""})=>t?p("div",{className:"flex gap-s",children:[u(ae,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col gap-2xs",children:[u(Be,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),u(Be,{size:"text-xl",color:n,children:t})]})]}):null,Rc=x((e=>{const{__html:t,richVersion:l,...n}=e;return u(T,{defaultPadding:"p-0",...n,children:u(Te,{__html:t,richVersion:l})})})),Pc=x((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:S("order-4",e),children:[u(sn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(sn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Vc=x((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(qt,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),Ac=x((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Vc,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(Vc,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),zc=["От 1 дня","До 365 дней"],_c=x((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(Be,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(Sl,{min:1,max:365,value:e,items:zc,onChange:t})]}))),jc=x((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Vc,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(Vc,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Dc=x((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents @xl:block flex-1 space-y-xl",children:[u(Ac,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Ec(c)}),u(_c,{days:a,setDays:e=>c({days:e})}),u(jc,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:Oc(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(Be,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents @md:flex justify-between items-center gap-m",children:[u(Pc,{}),u(ee,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),Ec=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Oc=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Lc=x((({days:e,tariffs:t=[]})=>{const l=Fc(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[p("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[$c("Аренда за",e),$c("Цена",l+" ₽")]}),u("span",{className:"@xl:hidden order-3 mb-xs text-s font-light text-secondary-text",children:n}),p("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[u(ue,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),u("span",{className:"hidden @xl:inline text-s font-light text-white opacity-80 whitespace-pre-line",children:n})]})]})})),$c=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[u("div",{className:"text-l font-light text-secondary-text",children:e}),u("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Fc=(e,t)=>{const l=Uc(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Uc=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},Hc=(e,t)=>e.find((e=>e.branchCode===t)),Wc=x((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Hc(n,l.selectedBranch),o=Kc(s?.safeBoxCaseVolumes),c=Yc(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Gc(c,l.selectedBoxSize);return p("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[u(Dc,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(Lc,{days:l.days,tariffs:d})]})})),Kc=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Yc=(e,t)=>e?.find((e=>e.volume===t)),Gc=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Xc=[];const qc=async e=>await ct(e,{method:"GET"})||Xc,Jc=x((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=wt(),h=Zc(c.selectedRegion,m),x=function(e){const{data:t}=st(e?`/api/v1/safeboxes?regionCode=${e}`:null,qc);return t||Xc}(h),g=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Hc(x,c.selectedBranch)||x,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(T,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(M,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Wc,{regions:m,branches:x,data:{...c,selectedRegion:h},onClick:o,onChange:g}),t?u(R,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(Vo,{points:f,className:"h-[640px]"}):null]})})),Zc=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Qc(e){throw new Error(e)}const ed={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},td={normal:"",small:"min-h-6xl"},ld={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"},nd=x((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",version:r="primary",...s})=>p(T,{className:S("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[u(V,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(ad(i,r))})}):null,Le(a,{isVertical:!0})]}))),ad=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return id(e,t)(l,n);case"rte":return u(Te,{__html:l.__html});default:Qc(l)}},id=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:rd(e,t)(l,n)}),p("div",{className:S("flex flex-col justify-center h-fit",td[e]),children:[l.label?u("div",{className:"text-l text-left",children:l.label}):null,l.description?u("div",{className:S("text-s font-light text-left",ld.description),children:l.description}):null]})]})},String(n)),rd=(e,t)=>(l,n)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",r=Boolean(l?.icon?.src),s=ed[e][r?"image":"icon"];return u("div",{className:S(s,r?"":`rounded-md ${ld.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex max-w-full max-h-full self-center text-h4 text-secondary-text group-data-secondary:text-white",children:Oe(l?.icon)?u(ue,{image:{...l.icon,iconVersion:l.icon?.iconVersion||i},imageClassName:"max-w-full max-h-full",width:a,height:a}):u("span",{children:n+1})})})},sd=e=>({href:t})=>!!t&&j(z(t)?e.href:e.pathname).startsWith(j(t));function od(e=[]){const t=F(),l=e.findIndex((e=>sd(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(t));return[l,e[l]]}const cd=x((({isActive:e,item:t,onClick:l})=>{const n=U({isRemote:!d?.BASE_PATH||!t.href?.startsWith(d?.BASE_PATH)}),{href:a,target:i,onClick:r}=n({href:t.href,target:"_self"}),s="BurgerIcon"===t?.icon?.icon?t.isActive:e,o=s?"color":"black";return p("a",{className:S(s?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:()=>"BurgerIcon"===t?.icon?.icon&&l?l():r(),href:a,target:i,children:[u(ue,{className:"w-6 h-6",image:{icon:t?.icon?.icon,iconVersion:o}}),t.title]})})),dd=x((({menuItems:e,onClick:t})=>{const[l]=od(e);return u("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:e.map(((e,n)=>u(cd,{isActive:n===l,item:e,onClick:t},String(n))))})}));const md=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>v.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Qc(e)}}))),[c,d]),l},hd=x((({className:e,onClose:t})=>u("button",{className:S("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(ue,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),ud=x((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=A(),r=i((()=>{a(),n&&n()}),[n]);return p("div",{className:S("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(hd,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})}));const pd=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=new Array(e.length),a=new Array(t.length);let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const xd=e=>e?.length?p("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(Be,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>u(gd,{...e},String(t))))})]}):null,gd=x((({icon:e,...t})=>{const l=U(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s items-center",children:[e?u(ue,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:u(Be,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),fd=e=>t=>u("div",{className:"mb-xs sm:mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:u(Be,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),bd=x((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),yd=x((()=>{const{defaultLocation:e,foreignOffices:t}=hs(),[l,a]=$r(e),[r,s]=n(""),o=Nd(function(){const{data:e}=st("/api/v1/regions",dt);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(o,vd),{close:d}=A(),m=i((e=>{a(e),d()}),[]);return p(ud,{className:"pb-20",head:p("div",{children:[u(Be,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?p("div",{className:"mb-s",children:[u(Be,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(l),children:u(Be,{color:"text-primary-main",children:l.name})})]}):null,u(bd,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&pd(e.toLowerCase())(r.toLowerCase())>=.8)).map(fd(m))}):u("div",{className:"columns-1 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(Be,{size:"text-h6",children:e})}),t.map(fd(h))]},e)))}),xd(t)]});var h})),vd=e=>e.name?.charAt(0)||"",Nd=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),wd=x((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:S("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(ue,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:S("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})}));function kd(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const Sd=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},Cd=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Td=e=>t=>e.map((([e,l])=>[pd(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>Bd(t,e))).reduce(Sd(Math.max,0),new Map),Id=e=>t=>{return Pr(t,t.map((({title:e})=>e)).map((e=>t=>{const l=Cd(t||"");return l.length?ke(e.map((e=>Wn(l.map(pd(e)))))):0})(e))).sort((e=>(t,l)=>-e(t,l))((l=([,e])=>e,(e,t)=>l(e)-l(t)))).map((([e])=>e));var l},Bd=(e,t)=>new Map(e.map((e=>[e,t]))),Md=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=st(e?.length?e:null,Rd),[s,o]=n(null);return kd((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=Cd(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(Td(i)).reduce(Sd(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return Id(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},Rd=async(...e)=>(await Promise.allSettled(e.map((e=>ct(D(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Pd=x((({className:e,topItems:t})=>{const l=U({isRemote:!0});return u("div",{className:S("flex items-start justify-between",e),children:t?.map(l).map(Ad)})})),Vd=["all","footer"],Ad=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||Vd.includes(e.displayArea.toLowerCase())));return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>u(zd,{...e,basePath:o(a),index:t},String(t))))]},String(t))},zd=x((({text:e,index:t,basePath:l,...n})=>{const a=U({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:S("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),_d=x((({initialQuery:e})=>{const{topItems:t}=hs(),l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,i]=Md({basePathList:l,initialQuery:e}),s=r((()=>jd(t)(n)),[t,n]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(ud,{head:u(wd,{autoFocus:!0,...i}),children:u(Pd,{topItems:s})})})),jd=e=>t=>e?.length&&t?.length?Pr(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:D("/",t)})))}))):[];const Dd=x((({className:e})=>{const[t,l]=n(""),a=i((()=>l("")),[]),{open:r}=(()=>{const{open:e,close:t}=A();return{open:(t={},l={})=>e(u(_d,{...t}),l),close:t}})(),s=i((e=>{l(e),Ed(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:S("relative",e),children:[u(wd,{value:t,onChange:s}),u(hd,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),Ed=e=>e&&e.length>=3,Od=x((({item:e,basePath:t})=>{const l=U({isRemote:!(!d.BASE_PATH||!t)&&!d.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=F(),s=sd(r)({href:n});return p("a",{className:S(s?"text-primary-main":"text-primary-text","py-3 text-h5 font-light flex justify-between cursor-pointer"),href:n,target:a,onClick:i,children:[e.text,u(ue,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]})})),Ld=x((({activeMenuSubItems:e,basePath:t})=>e?u("div",{className:"mb-5",children:e.map(((e,l)=>u(Od,{item:e,basePath:t},String(l))))}):null)),$d=({item:e,isActive:t,onClick:l})=>p("button",{type:"button",className:"relative",onClick:l,children:[u("span",{className:S("whitespace-nowrap",t?"text-primary-main":""),children:e.text}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]}),Fd=x((e=>{const{topItems:t,officesLink:l,defaultLocation:s}=hs(e.options?.page?.fallback),[o]=$r(s),c=(()=>{const{open:e,close:t}=A();return{open:(t={})=>e(u(yd,{}),t),close:t}})(),d=i((()=>c.open()),[]),[m,h]=qn({itemCount:t?.length??0}),[x]=od(t),[g,f]=n(x),b=r((()=>t?.[g]),[t,g]),y=b?.items||[];a((()=>{f(x)}),[x]),a((()=>{g>0&&h.scrollTo(g)}),[g,h]);const v=i((e=>f(e)),[]);return u(ud,{head:u("div",{className:"flex items-center",children:u(M,{as:"h4",title:"Меню"})}),children:p("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[u("div",{className:"w-full mb-3",children:u(Dn,{containerRef:m,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>u($d,{item:e,isActive:g===t,onClick:()=>v(t)},String(t))))})}),p("div",{className:"relative grow overflow-auto",children:[u(Ld,{activeMenuSubItems:y,basePath:b?.href}),u(Dd,{className:"grow mb-5"}),Ud(l),p("div",{className:"flex items-center text-s cursor-pointer",onClick:d,children:[u(ue,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),p("div",{className:"flex flex-col items-start",children:[u(Be,{size:"text-h5",children:o.name}),u(Be,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]})]})]})})})),Ud=e=>e?p("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[u(ue,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),u("span",{children:"Офисы и банкоматы"})]}):null,Hd="burgerMenuDialog",Wd=x((({...e})=>{const{menuItems:t=[]}=ut(d.STICKY_MOBILE_MENU||"sticky-mobile-menu",{fallback:e.options?.page?.fallback,folderName:"portal-resources",setBasePath:!0}),[l,{toggle:n}]=(()=>{const{open:e,closeAll:t,close:l}=A(),n=md(),a=((e,t)=>t.find((t=>t.id===e),e))(Hd,n),r=i((()=>e(u(Fd,{}),{id:Hd})),[]),s=i((()=>{a?t():r()}),[a]);return[Boolean(a),{open:r,close:l,toggle:s}]})(),a={title:"Меню",icon:{icon:"BurgerIcon",iconVersion:l?"color":"black"},isActive:l},s=Math.floor(t.length/2),o=r((()=>[...t.slice(0,s),a,...t.slice(s)]),[t,s,a]);return u("div",{className:"w-full mb-5","data-component":"sticky-bottom-menu-container",children:u(T,{className:"@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]",padding:"p-0",children:u(dd,{menuItems:o,onClick:n})})})})),Kd="hidden sm:flex absolute z-40 top-0",Yd=x((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=qn({itemCount:t?.length||0});return p("div",{className:S("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(Dn,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(fo(l,n,a))}),r.canScrollLeft?u(bi,{className:S("left-6",Kd),onClick:r.scrollLeft}):null,r.canScrollRight?u(yi,{className:S("right-6",Kd),onClick:r.scrollRight}):null]})})),Gd=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(bo,{...t});case"centered":return u("div",{className:"flex",children:u(bo,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Yd,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Xd="tab",qd=x((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=F(),{isReady:d}=c,m=r((()=>l.map(Zd)),[l]),[h,p]=n(0);a((()=>{if(!l||!l[0])return;const e=c.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===c.query.tab))||0,t=l[e]||l[0];p(e),Jd(t)}),[d]),a((()=>{const e=l[h];"group"===e?.type&&v.subject("tab",{type:e.type,label:e.ref})}),[l,h]);const x=i((e=>{const t=m.indexOf(e),n=l[t];p(t),Jd(n),"group"===n.type&&(e=>{const t=new URLSearchParams(c.query);e.name?t.set(Xd,e.name):t.delete(Xd),c.replace(`${c.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,m]);return u(T,{className:S(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:Gd({items:m,value:m[h],tabsMode:s,onChange:x})})})),Jd=e=>{"group"===e.type&&v.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&v.fire("tab",{type:e.type,label:e.href})},Zd=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,Qd={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},em=x((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:Qd[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),tm=x((({className:e="",isOpen:t,onClick:l})=>u(ee,{className:e,appendRight:u(ue,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),lm={Buttons:({buttons:e})=>Le(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?u(ue,{image:e}):null,List:({isDotted:e,...t})=>u(Ge,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{className:"space-y-2xs",children:[e?u("div",{children:e}):null,t?u("div",{children:u(Be,{size:"text-s",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(tm,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},nm=x((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return am({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),am=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in lm))return null;return u(lm[l],{...t,...n})},im=x((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>u("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>u(nm,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),rm=(e,t)=>140*ke(e.slice(0,t).map((e=>e?.cols?.length??1))),sm=(e,t)=>e?.length>0?u("div",{className:S("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>u("div",{className:"w-20 text-h6 mx-lg",children:e},String(t))))}):null,om=x((({rows:e})=>{return u(Dn,{visibleItemCount:0,snapAlign:"snap-start",children:u("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=S("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return p("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?u("div",{className:"text-xl font-light w-56 min-w-56 py-lg",children:n.data}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${rm(a,t)}px)`},children:a?.map(((e,l)=>p("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?u("div",{className:"text-xl font-light",children:e.data}):null,e?.cols?sm(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),cm=x((({activeTabIndex:e,items:t})=>u("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return p("div",{className:"w-full @container",children:[u("div",{className:"flex p-m bg-white @4xl:bg-gray text-center justify-center relative",children:u(Be,{size:"text-xl",font:"font-light",children:t.title})}),u("div",{className:"w-full pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:u("div",{className:"relative",children:u(om,{rows:t.rowsData})})})]},n)}))}))),dm=x((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>u("div",{className:"rounded-md text-xl font-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>n(t),children:e||t+1},e)))}):null,t?u(ee,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:u(ae,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function mm(e){const t=await fetch(e);return await t.json()}const hm=x((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=st(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),mm);return t||{}}(e),[r,s]=n(0),o=i((e=>s(e)),[]),c=a?.[r]?.items??[],d=a?.map((e=>e.currency??""));return p("div",a?{className:"bg-white z-10",children:[u(dm,{currencies:d,activeTabIndex:r,setActiveTabIndex:o,linkToPDF:t}),u(cm,{activeTabIndex:r,items:c}),u(tm,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-h6 text-center",children:[u("p",{children:"Данных нет"}),u(tm,{onClick:l,isOpen:!0})]})})),um=x((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:S("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?u("div",{className:"origin-top animate-expansion",children:u(hm,{...t,onClick:l})}):null]}))),pm=x((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,o]=n(void 0),c=i((e=>o(e)),[]),[d,m]=n(void 0),h=i((e=>m(e)),[]);return p(um,{onHideContentClick:()=>o(void 0),tableInner:s,...r,children:[u("div",{className:S("text-s","w-80 flex-shrink-0"),children:p("div",{className:"flex gap-m items-center text-primary-text",role:"cell",children:[e?.icon?u(ue,{className:"hidden @4xl:block max-w-6",image:e.icon,width:"24",height:"24"}):null,e?.title?u("div",{className:"text-m font-light",children:e?.title}):null]})}),t?.length?u(em,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(im,{cells:e,rowIdx:a,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...r},String(t))))}):null]})}));function xm({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?p("div",{children:[l?u(fi,{className:`absolute z-40 ${a[0]} ${i}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u(fi,{className:`absolute z-40 rotate-180 ${a[1]} ${i}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const gm=x((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative space-y-xs",children:[e,xm({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),fm=x((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=gi({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(pm,{row:e,activeIndex:d,rowIdx:t,...r},String(t)))),[x,g]=i>0?[h.slice(0,-i),h.slice(-i)]:[h,[]];return p(T,{className:S("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[u(V,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),u("div",{className:"space-y-m",children:i>0?u(la,{renderFoldableSection:({isUnfolded:e})=>p(gm,{controls:m,children:[x,u(na,{isUnfolded:e,children:g})]}),renderFoldButton:gr}):u(gm,{controls:m,children:h})})]})})),bm=x((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(T,{className:S("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?ym():null,"big"===n?vm(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(Be,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Nm(l):null,r?.length?wm(r,!0):null,i?u(Te,{__html:i}):null]})]}))),ym=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),vm=e=>e?.src?u(ue,{className:"h-fit flex-shrink-0",image:e}):null,Nm=e=>u(R,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),wm=(e,t)=>u("ul",{className:S("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(Be,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),km={AdTile:xt,ApplicationForm:vn,BenefitsBlock:Cn,Bonus:Rn,BonusBenefitsBlock:Qn,ButtonsBlock:ta,Calculator:ri,CardTransfer:xi,Carousel:Di,CarouselBankHistoryCard:Ei,CarouselCard:$i,CarouselCatalogCard:Ui,CarouselLinks:Yi,CarouselRecommendationCard:Qi,CarouselTariffsCard:lr,ComparisonTable:mr,DepositFiltration:jr,ErrorBlock:Or,ExchangeRateTile:ds,Footer:Ms,Header:$s,Headline:V,HorizontalLayout:Hs,ImgBlock:Ws,LinkDocs:Xs,MobileAppTile:Zs,MortgageFiltration:vo,OfficesAtmsMap:Nc,Placeholder:wc,ProductBlock:at,ProductGallery:Tc,RepresentativeOfficeInfo:Ic,RichTextBlock:Rc,RollupItem:gs,SafeDepositRental:Jc,StepsBlock:nd,StickyBottomMenu:Wd,Tabs:qd,TariffsTable:fm,TextBlock:bm,VerticalLayout:Us};const Sm=["Header","Footer"],Cm=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Tm(e=globalThis){const t=s(new Map);a((()=>k.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!Sm.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?Kn(Cm)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const Im="cookie",Bm=x((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=Ut();kd((()=>{globalThis.localStorage?.getItem(Im)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Im,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[u("div",{className:"sm:flex-1",children:p(R,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(Xi,{isRemote:!0,className:Mm(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(Xi,{isRemote:!0,className:Mm(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(hd,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),Mm=e=>S("inline mx-2xs",e?"text-green-dark":""),Rm=x((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=md({onCloseAll:e,onClose:t}),{close:n}=A(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return Wt(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:S("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Pm=x((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>v.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Qc(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return Wt(globalThis.document,"keydown",r),e?u("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Vm=h();const Am=x((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:zm()}))),zm=()=>p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[_m("M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"),_m("M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z")]}),_m=e=>u("path",{stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",strokeMiterlimit:"10",d:e}),jm=x((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Vm.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Vm.like(e))}),[e]),dislike:i((async()=>{l(await Vm.dislike(e))}),[e])}}(F().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(Am,{onClick:$(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(Am,{onClick:$(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),Dm=x((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return Tm(),p("div",{"data-theme":s,children:[p("section",{className:S("@container relative",a,e),children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:Bi(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[Mi({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),Bi(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(jm,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Wd,{}),u(Rm,{}),u(Pm,{}),u(Bm,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Dm.childrenTypes=[],Dm.slots=()=>["header","footer","StickyBottomMenu"];e.Blocks=km,e.ContentPage=Dm,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=$,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.14.62",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=E,e.useRouter=F,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),x=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:g(e)),t._tmpl},g=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=x((({children:e})=>f?e:null));class y{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const v=new y;function N(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:w(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function w(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const k=new y;const S=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),C={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","":""},T=x((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return N(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];k.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[x,g]=n(!1);a((()=>v.subscribe("tab",(e=>{g(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:S("@container font-sans",f?"group":"",C[t],x?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),I={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},B={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},M=x((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=I[l]||"h3";return u(i,{className:S("font-sans m-0",B[t],e),children:n||a})})),R=x((({children:e,...t})=>u("p",{className:S("font-sans",Object.values(t)),children:e}))),P={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"}},V=x((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=P[l],m={marginTop:d.descriptionStyle};return p(T,{className:S(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(M,{className:S("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(R,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})})),A=()=>({open:(e,t={})=>v.fire("dialog",{type:"open",dialog:e,...t}),close:()=>v.fire("dialog",{type:"close"}),closeAll:()=>v.fire("dialog",{type:"close",all:!0})}),z=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!z(e)&&(!t||"_self"===t)),j=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),D=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var E=Object.freeze({__proto__:null,isURL:z,isLocalURL:_,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:j,joinPath:D});const O=e=>(t,l=d.BASE_PATH)=>{if(!t||z(t)||L(t,d.CDN))return t;const n=t.startsWith("/");return D(L(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},L=(e,t)=>t&&e&&e.startsWith(t),$=(e,t)=>$._impl(e,t);function F(){return F._impl()}function U(e={}){const{isRemote:t,basePath:l}=e,n=F(),{closeAll:a}=A();return e=>({...e,href:t&&!l?e.href:O(n)(e.href,l),"aria-label":e.text,onClick:$(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&_(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}$._impl=e=>e,$.setup=e=>{$._impl=e},F._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),F.setup=e=>{F._impl=e};const H={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","":""},W="bg-main-divider text-main-disabled",K={primary:W,secondary:W,white:W,link:"",transparent:"",gray:W,"":""},Y="text-center font-sans select-none",G={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","":""},X=x((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=J(e)?"hidden lg:block":"";return p("div",{className:S(q(e),"flex gap-xs"),children:[n?u("div",{className:S(r,G[i]),children:n}):null,J(e)?p("div",{className:"whitespace-pre",children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:S(r,G[i]),children:a}):null]})})),q=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return S("group/btn items-center justify-center",J(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},J=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),Z=({className:e,rounded:t,version:l})=>["inline-block",Y,l?K[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Q=({className:e,rounded:t,version:l})=>[Y,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?H[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ee=x((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=U()({onClick:r,href:n,...a}),o=t??u(X,{...s});return u(e?le:te,{...s,children:o})})),te=x((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:Q({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),le=x((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:Z({className:e,rounded:n,version:l}),children:a}))),ne={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},ae=x((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const o=F(),c=O(o)(D(d.CDN,"/icons",`${l}.svg`));return"normal"!==i?u(se,{className:e,children:p("svg",{className:S(re(r),ne[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]})}):u("img",{className:e,src:c,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:ie(e,s)})})),ie=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},re=e=>e?"":"w-full h-full",se=x((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),oe=(e,t)=>e?.media&&t?.media?e.media-t.media:0,ce=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=F();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(oe).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:me(a,n)(e),type:he(l),media:i?`(max-width: ${i}px)`:"",width:t.size?.width,height:t.size?.height},`${r}_${e}`))):null,t?.src?de({...t,src:me(a,n)(t.src)},l):null]})})),de=(e,t="")=>u("img",{src:e.src,className:S("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}),me=(e,t)=>l=>l&&!z(l)?O(e)(D(t,l)):l,he=e=>e?`image/${String(e)}`:void 0,ue=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(ae,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(ce,{className:e,imageClassName:l,image:t,pathPrefix:n}):null));function pe(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"hidden sm:flex items-center gap-s",children:[u("div",{className:Q({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(ue,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(ee,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const xe={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},ge=x((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:r="",buttons:s,leftImage:o,rightImage:c,imageAlign:d,isImageAlwaysOnRight:m=!1,isImageSecondary:h=!1,backwardButton:x,children:g})=>{const f=F(),b=i((e=>{e?.preventDefault(),f.back()}),[]);return p("div",{className:fe(n,l,e),children:[x?pe(t,b):null,a?u("div",{className:"relative",children:a}):null,p("div",{className:S("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[Ne(o,{imageAlign:d,className:"mx-auto"}),p("div",{className:S("grid gap-3xl h-full",c?"@xl:grid-cols-2":"",o?"":"grow"),children:[p("div",{className:"grow space-y-lg min-w-fit",children:[r,g]}),Ne(c,{className:S("@xl:justify-self-end @xl:col-start-2",s?be(m):"",ye(m),we(h)),imageAlign:d}),ve(s)]})]})]})})),fe=(e="",t="",l="")=>S("relative flex flex-col gap-3xl overflow-hidden",e||t,l),be=e=>e?"row-span-2":"@xl:row-span-2",ye=e=>e?"col-start-2 self-center":"",ve=e=>e?u("div",{className:"self-end",children:e}):null,Ne=(e,{className:t,imageAlign:l})=>e?u("div",{className:S("shrink-1/2 justify-self-center",l&&xe[l],t),children:e}):null,we=e=>e?"hidden @xl:block":"",ke=(e=[])=>e.reduce(((e,t)=>e+t),0),Se=(e=[])=>e?.length?ke(e)/e.length:0,Ce=(e,t="normal")=>e?u("div",{className:S("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:u(ue,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Te=x((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?u("div",{"data-component":"rich-text-container",children:u("div",{className:S(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Ie=(e,t)=>e?u(R,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Be=x((({children:e,...t})=>u("span",{className:S("font-sans",Object.values(t)),children:e}))),Me=(e,t)=>e?u(Be,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Re=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Te,{...e},`rte-${t}`):["label"in e?Me(e.label,t):null,"description"in e?u("span",{className:e.descriptionClassName,children:Ie(e.description,t)},String(t)):null],Pe=x((({className:e,benefitsVersion:t,...l})=>p("div",{className:S("flex gap-m min-w-56 items-center",e),children:["icon"in l?Ce(l.icon,t):null,u("div",{children:Re(l)})]}))),Ve=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Ae=e=>{return((t=e.map(Ve))?.length?Math.sqrt(Math.abs(Se(t.map((e=>e**2)))-Se(t)**2)):0)>16;var t},ze=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),_e=e=>!e.some(ze),je=x((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:S("flex gap-x-m gap-y-s",Ae(l)||_e(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Pe,{benefitsVersion:t,...e},String(l))))}):null)),De=x((({className:e,benefits:t})=>t?.length?u("div",{className:S("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Re)}):null)),Ee=x((({isTabularBenefits:e,...t})=>u(e?De:je,{...t}))),Oe=e=>Boolean(e?.src||e?.icon),Le=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:S("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map($e(l))}):null,$e=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o=Fe(a,r),c=Fe(i,r);return n||a?.icon?u(ee,{className:S("basis-full @lg:basis-auto",e),appendLeft:Ue({...a,iconVersion:o}),appendRight:Ue({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Fe=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Ue=e=>Oe(e)?u(ue,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,He=x((({className:e,isDotted:t,dotClassName:l,children:n})=>p("div",{className:S("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:S("align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white",l)})}):null,u("span",{children:n})]}))),We={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},Ke=x((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M"})=>{const a=We[n];return l?.length?u("section",{className:S("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",a.textSize,e),role:"list",children:l.map(((e,l)=>u(He,{isDotted:t,dotClassName:a.dotStyle,children:e},String(l))))}):null})),Ye=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0),Ge=x((({priceList:e})=>e?.length?u("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:e.map(Xe)}):null)),Xe=({label:e,amount:t})=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",children:[u(Be,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?p("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ye(2)(t)," ₽"]}):null]}),qe=x((({className:e,tags:t})=>t?.length?u("div",{className:S("flex flex-wrap gap-xs",e),role:"list",children:t.map(Je)}):null)),Je=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(Be,{size:"text-m",font:"font-light",children:e})},String(t)),Ze={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},Qe=x((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m,items:h,isDotted:x=!0,priceList:g=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:C,...T})=>{const I=y?.src?u(ue,{image:y}):null,B=u(V,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(ge,{className:e,padding:t,defaultPadding:l,...m?{title:B}:{insetTitle:B},...et(I,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Le(b),backwardButton:S,...T,children:p("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?u(Ee,{benefitsVersion:s,isTabularBenefits:o,benefits:M}):null,d?u(Te,{__html:d}):null,h?.length?u(Ke,{items:h,isDotted:x,listItemSize:Ze[i]}):null,C,g?.length?u(Ge,{priceList:g}):null,tt(f)]})})})),et=(e,t)=>t?{rightImage:e}:{leftImage:e},tt=e=>e?.length?u(qe,{tags:e}):null,lt=x((({className:e,padding:t,...l})=>u(T,{className:S("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:u(Qe,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})}))),nt=e=>null!=e,at=new Map;function it(e,t,{fallback:l,cache:i}={}){const s=r((()=>rt(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{if(!s.some(nt))return;let e=!1;const l=(t,l)=>{e||(d(t),h(l))};return(async()=>{try{l(await(o?((e,t=at)=>l=>{const n=t.get(l);if(nt(n))return n;const a=e(l);return nt(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s)))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0)}}function rt(e){return Array.isArray(e)?e:e instanceof Function?rt(e()):[e]}async function st(e,t){try{return e?await ot(e,t):null}catch(e){console.error(e)}return null}async function ot(e,t){return(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json()}const ct={},dt="wcms-resources";function mt(e,t={}){const{fallback:l=ct,folderName:n=dt,setBasePath:a=!1}=t,i=D("/",a?d.BASE_PATH:"",n,`${e}.json`),{data:r}=it(e?i:null,ot,{fallback:l});return r||ct}const ht=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),ut=x((e=>{const t=((e="reklamnaya-plitka")=>{const t=mt(e),l=r((()=>ht(0,t?.items?.length)),[t]);return t?.items?.[l]})(e.options?.page?.adSourceBook);return t?u(b,{children:u(lt,{...t,...e})}):null}));const pt=e=>e,xt=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=pt,format:i=pt}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),x=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:x}]},gt=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],ft=e=>!e?.length,bt=e=>t=>l=>e(l)?[]:[t],yt=[];function vt(){const{data:e}=it("/api/v1/regions",ot);return e||yt}const Nt=x((({text:e,link:t})=>p(R,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(Be,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?u(ee,{href:t.href,ariaLabel:"условия передачи данных",target:t.target,className:"text-primary-main",children:u(Be,{children:t.text})}):null]}))),wt=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},kt=x((({key:e,className:t="",inputClassName:l="",id:n,name:r,type:o="text",label:c,placeholder:d,value:m="",valid:h=!0,children:x,onChange:g,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1})=>{const N=s(null),w=i((e=>{g&&g(e.target?.value||"")}),[g]);a((()=>{v&&N.current?.focus()}),[v,N]);const k=x?"pr-3xl":"",C=h?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:S("relative",t),children:[p("label",{children:[c?u("div",{className:"mb-xs",children:u(Be,{size:"text-m",font:"font-light",children:c})}):null,u("input",{ref:N,className:S("w-full h-14 border rounded-md text-primary-text outline-none p-m",k,C,l),id:n,name:r||n,placeholder:d,type:o,value:m,onInput:w,onFocus:f,onBlur:b,pattern:y},e)]}),x]})})),St=x((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(kt,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(Be,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),Ct=e=>"_"===e,Tt=e=>/\d/.test(e),It=e=>Ct(e)||Tt(e),Bt=[..."+7 (___) ___-__-__"],Mt=Bt.findIndex(Ct),Rt=Bt.map(((e,t)=>It(e)?Bt.slice(0,t).filter(It).length:-1));const Pt=x((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Bt.map(((e,l)=>Tt(e)?e:t.charAt(Rt[l])||e)),n=Rt.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Mt,n)):l).join("")}(e))),[t]);return u(kt,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Vt=x((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(Pt,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(Be,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),At="Некорректно заполненное поле",zt=bt((e=>null!=e&&""!==e))(At),_t=bt((e=>"string"==typeof e&&e.length>1))(At),jt=bt((e=>"string"==typeof e&&(10===e.length||12===e.length)))(At),Dt=(Et=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,bt((e=>"string"==typeof e&&Et.test(e))))(At);var Et;const Ot=e=>p("div",{className:"space-y-s",children:[u(St,{className:"shrink-0 w-full",label:"Наименование организации",...wt(e("fullName"),zt)}),u(St,{className:"shrink-0 w-full",label:"ИНН",...wt(e("inn"),jt)}),u(St,{className:"shrink-0 w-full",label:"Контактное лицо",...wt(e("name"),_t)}),u(Vt,{className:"shrink-0 w-full",label:"Телефон",...wt(e("phone"),Dt)})]}),Lt=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function $t(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const Ft=e=>e?.text||e?.key||"";function Ut(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function Ht(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return Ut(globalThis.document,"click",l),t}const Wt=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Kt=x((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:Wt(t,n).map((e=>p("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[u("span",{className:"min-h-6",children:Ft(e)}),u(ae,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:S("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function Yt({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:o,iconVersion:c}){const d={open:(e,t)=>v.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>v.fire("popup",{type:"update",popup:e,...t}),close:()=>v.fire("popup",{type:"close"})},m=i((()=>{d.close(),o&&o()}),[o]),h=i((e=>{m(),r&&r(e)}),[m,r]),p=s(null),x=Ht(m);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:o}=a.getBoundingClientRect();d.update(u(Kt,{popupRef:x,options:t,value:l,query:n,onChange:h,iconVersion:c}),{top:i+window.scrollY+o,left:r,width:s})}),[e,t,l,n,h]),p}const Gt=x((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:o="",isSearch:c=!1,iconVersion:d,onChange:m})=>{const[h,{setFalse:x,setTrue:g}]=$t(),[f,b]=n(""),y=i((()=>{b(""),x()}),[]),v=Yt({isOpen:h,options:l,value:a,query:f,onChange:m,onClose:y,iconVersion:d});return p("div",{className:e,children:[Xt(t),p("div",{className:S("relative",h?"z-20":"z-10"),ref:v,children:[p("div",{className:S("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",Jt(s,r)),onClick:h?y:g,children:[u("p",{className:"p-m pr-3xl flex items-center overflow-hidden text-ellipsis whitespace-nowrap",children:Ft(a)||o}),qt(h,d)]}),c&&h?u("div",{className:S("absolute top-0 w-full z-20"),children:u(kt,{type:"text",autoFocus:!0,value:f,onChange:b})}):null]})]})})),Xt=e=>e?u("div",{className:"mb-xs",children:u(Be,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,qt=(e,t)=>u(ae,{className:S("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Jt=(e,t)=>S(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Zt=x((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(Gt,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(Be,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),Qt=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg ",children:[u("div",{className:"@xl:w-1/2",children:u(Zt,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Lt.map((({name:e=""})=>({key:e,text:e}))),...wt(t("acquiringType"),zt)})}),u("div",{className:"@xl:w-1/2",children:u(Zt,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...wt(t("region"),zt)})})]}),el=x((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:S("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:S("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),u(Be,{size:"text-l",font:"font-light",color:"text-primary-text",children:t})]}))),tl=e=>p("div",{children:[u(el,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(el,{text:"Хочу купить POS-терминал",...e("posTerminal")})]}),ll=(e,t)=>{const l=Q({className:"text-white",version:e?.version});return u("button",{type:"submit",className:S("p-m w-full @xl:w-auto",l,t),children:e?.text?e.text:"Отправить заявку"})},nl={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},al=gt({acquiringType:zt,region:zt,fullName:zt,inn:jt,name:_t,phone:Dt}),il=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;ft(al(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=xt(nl,a),o=vt();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(M,{headingType:"h6",title:"Вид эквайринга и регион",className:"@xl:text-center"}),Qt({regions:o,field:r}),u(M,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),Ot(r),tl(r),ll(t),u(Nt,{link:l})]})})),rl=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(St,{className:"shrink-0 w-full",label:"Контактное лицо",...wt(e("name"),_t)}),u(St,{className:"shrink-0 w-full",label:"ИНН",...wt(e("inn"),jt)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Vt,{className:"shrink-0 w-full",label:"Телефон",...wt(e("phone"),Dt)}),u(St,{className:"shrink-0 w-full",label:"Электронная почта",...wt(e("mail"),zt)})]})]}),sl=({regions:e,field:t})=>u(Zt,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...wt(t("region"),zt)}),ol={name:"",phone:"",inn:"",mail:""},cl=gt({region:zt,name:_t,phone:Dt,inn:jt,mail:zt}),dl=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;ft(cl(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,inn:i,mail:r,phone:a.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=xt(ol,a),o=vt();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[sl({regions:o,field:r}),rl(r),ll(t),u(Nt,{link:l})]})})),ml=[];const hl=async e=>await st(e,{method:"GET"})||ml,ul=["От 1 000 ₽","До 1 000 000 000 ₽"],pl=["От 1 мес","До 15 лет"],xl=e=>u("div",{className:"pb-2xs border-b border-b-main-divider",children:p("div",{className:"space-y-s",children:[u(St,{className:"shrink-0 w-full",label:"Наименование организации",...wt(e("fullName"),zt)}),u(St,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...wt(e("annualRevenue"),zt)}),u(St,{className:"shrink-0 w-full",label:"Контактное лицо",...wt(e("name"),_t)}),u(Vt,{className:"shrink-0 w-full",label:"Телефон",...wt(e("phone"),Dt)}),u(St,{className:"shrink-0 w-full",label:"ИНН",...wt(e("inn"),jt)}),u(St,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})}),gl=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},fl=(e,t,l)=>Math.max(t,Math.min(e,l));function bl(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function yl({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:S("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=bl(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const vl=1,Nl=100,wl=x((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:vl),max:s=(a.length?a.length-1:Nl),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=gl(e,{normalize:(e=0)=>a.length?kl(a)(e):fl(e,r,s),format:Ye()}),x=i((e=>{m&&m(bl(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(Be,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:S("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:x,...h}),yl({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),Sl(n)]})})),kl=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),Sl=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(Be,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Cl=e=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg",children:[p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(Be,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(wl,{items:ul,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(Be,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(wl,{items:pl,min:1,max:180,...e("term")})]})]}),Tl=({regions:e,branches:t,field:l})=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg @xl:mb-2xl @xl:border-none @xl:pb-0",children:[u("div",{className:"@xl:w-1/2",children:u(Zt,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...wt(l("region"),zt)})}),u("div",{className:"@xl:w-1/2",children:u(Zt,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...wt(l("department"),zt)})})]}),Il={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},Bl=gt({fullName:zt,annualRevenue:zt,inn:jt,name:_t,phone:Dt,region:zt,department:zt}),Ml=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;ft(Bl(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,""),mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=xt(Il,n),o=vt(),c=function(e){const{data:t}=it(e?`/api/v1/branches?regionCode=${e}`:null,hl);return t||ml}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(M,{headingType:"h6",title:"Параметры",className:"@xl:text-center"}),Cl(r),u(M,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),xl(r),u(M,{headingType:"h6",title:"Офис банка",className:"@xl:text-center"}),Tl({regions:o,branches:c,field:r}),ll(e),u(Nt,{link:t})]})})),Rl={name:"",phone:""},Pl=gt({name:_t,phone:Dt}),Vl=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{name:t,phone:n}=e;ft(Pl(e))&&l({typeForm:"dpst",name:t,phone:n.replace(/[^+\d]/g,"")})}),[l]),[,{field:a,...r}]=xt(Rl,n);return p("form",{className:"container",onSubmit:r.onSubmit,children:[u(M,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"@xl:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(St,{className:"shrink-0 w-full",label:"Имя",...wt(a("name"),_t)}),u(Vt,{className:"shrink-0 w-full",label:"Телефон",...wt(a("phone"),Dt)})]}),p("div",{className:"flex justify-between flex-col-reverse @xl:items-center @xl:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(Nt,{link:t})}),ll(e)]})]})})),Al=x((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=mt(l||"regions-grant-support"),[i,r]=n({key:""}),s=Q({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s @xl:space-y-lg",children:[a?u(Zt,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:a.map((({name:e=""})=>({key:e,text:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(ee,{href:o,target:"_blank",className:S("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),zl=x((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return u("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),_l=[{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"}],jl=x((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(zl,{paths:_l,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:S("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Dl(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(Be,{size:"text-l",font:"font-light",children:l})}):null]})})})),Dl=e=>S("rounded border",e?"bg-primary-main":""),El=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Ol=()=>{},Ll=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const o=[];let c=1;for(let d=0;d<6;d++){const m=[];for(let o=0;o<7;o++)if(0===d&&o<t)m.push(u("td",{},`empty-${o}`));else if(c>l)m.push(u("td",{},`empty-${o}`));else{const t=new Date(a,n,c),l=$l(t,e),o=Fl(t,i,r);m.push(u("td",{children:u("div",{className:Ul(l,o),onClick:()=>!o&&s(t),children:c})},`day-${c}`)),c++}o.push(u("tr",{children:m},`row-${d}`))}return o},$l=(e,t)=>t&&e.toDateString()===t.toDateString(),Fl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Ul=(e,t)=>S("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Hl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Wl=x((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=Ol})=>{const o=i((e=>s(e)),[]),{firstDayOfWeek:c,totalDays:d}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return p("table",{className:"mx-auto",children:[u("thead",{className:"text-gray font-light",children:u("tr",{children:Hl.map(((e,t)=>u("th",{className:"p-s",children:e},String(t))))})}),u("tbody",{children:Ll({firstDayOfWeek:c,today:e,totalDays:d,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:o})})]})})),Kl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Yl=Kl.map((e=>({key:e}))),Gl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Xl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},ql={className:"min-w-32",iconVersion:"black",isBorder:!1},Jl=x((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:o})=>{const[c,{setValue:d}]=$t(!1),[m,h]=n(l?.getMonth()||(new Date).getMonth()),[x,g]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:f,handleNextMonth:b,handleSelectMonth:y,handleSelectYear:v,monthsOptions:N,yearsOptions:w,handleChangeVisibleCalendar:k,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=Ht(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Kl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Yl,yearsOptions:Gl,ref:s}})({onYearSelect:g,onMonthSelect:h,onShowCalendar:d,selectedYear:x,selectedMonth:m,showCalendar:c});return p("div",{className:S(e,"relative"),ref:C,children:[u(Be,{size:"text-m","font-weight":"font-light",children:t}),Zl(k,l,a),c?p("div",{className:"absolute bg-white z-10 select-none",children:[p("div",{className:"flex gap-s",children:[u("div",{className:"my-auto",onClick:f,children:u(ae,{...Xl,className:"-rotate-90 cursor-pointer"})}),u(Gt,{onChange:y,value:{key:Kl[m]},options:N,...ql}),u(Gt,{onChange:v,value:{key:String(x)},options:w,...ql}),u("div",{className:"my-auto",onClick:b,children:u(ae,{...Xl,className:"rotate-90 cursor-pointer"})})]}),u(Wl,{today:l,currentMonth:m,currentYear:x,onDateSelect:o,min:r,max:s})]}):null]})})),Zl=(e,t,l)=>p("div",{onClick:e,className:S("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[u(R,{children:t&&El(t)}),u(ae,{...Xl,name:"CalendarIcon"})]}),Ql=x((({className:e,label:t,value:l,error:n,onChange:a})=>p("div",{className:e,children:[t?u("div",{className:"mb-xs",children:u(Be,{size:"text-m",font:"font-light",children:t})}):null,u(Jl,{value:l,onChange:a,valid:Boolean(!n)}),u("div",{className:"h-2",children:n?u(Be,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),en=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(St,{className:"shrink-0 w-full",label:"Фамилия",...wt(e("surname"),_t)}),u(St,{className:"shrink-0 w-full",label:"Отчество",...wt(e("middleName"),_t)}),u(Vt,{className:"shrink-0 w-full",label:"Телефон",...wt(e("phone"),Dt)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(St,{className:"shrink-0 w-full",label:"Имя",...wt(e("name"),_t)}),u(Ql,{className:"shrink-0 w-full",label:"Дата рождения",...wt(e("date"),zt)}),u(St,{className:"shrink-0 w-full",label:"Электронная почта",...wt(e("mail"),zt)})]})]}),tn={surname:"",name:"",middleName:"",phone:"",mail:"",date:void 0,consentDataProcessing:!0},ln=gt({surname:_t,name:_t,middleName:_t,phone:Dt,mail:zt,date:zt}),nn=x((e=>{const{button:t,link:l,product:n,onSubmit:a}=e,r=i((e=>{const{surname:t,name:l,middleName:i,phone:r,mail:s,date:o,consentDataProcessing:c}=e;ft(ln(e))&&a({typeForm:"dpst",surname:t,name:l,middleName:i,mail:s,consentDataProcessing:c,phone:r.replace(/[^+\d]/g,""),date:o?.toISOString().slice(0,10)||"",product:n||""},!0)}),[a]),[,{field:s,...o}]=xt(tn,r);return p("form",{className:"container space-y-s",onSubmit:o.onSubmit,children:[en(s),p("div",{className:"@xl:flex justify-between items-center",children:[p("div",{className:"@xl:mb-0 mb-2 flex items-center gap-3",children:[u(jl,{...wt(s("consentDataProcessing"),zt)}),u(Nt,{text:"Согласен с ",link:l})]}),ll(t)]})]})})),an=x((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u(Be,{color:"text-primary-text",children:t}):null]})}))),rn=e=>{const{value:t,onChange:l}=e("vedTypes");return u("div",{className:"space-y-m",children:p("div",{className:"@xl:flex @xl:items-center @xl:gap-xl",children:[u(an,{className:"mb-xs",name:"vedTypes",text:"Валютный котроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),u(an,{className:"mb-xs",name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),u(an,{className:"mb-xs",name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),u(an,{className:"mb-xs",name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},sn=(e,t)=>{const l="currencyControl"===e("vedTypes").value;return p("div",{children:[l?u(Zt,{className:"mb-s",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...wt(e("region"),zt)}):null,p("div",{className:"@xl:grid @xl:grid-cols-2 @xl:gap-x-lg",children:[l?u(St,{className:"w-full mb-s",label:"ИНН",...wt(e("inn"),jt)}):null,u(St,{className:"w-full mb-s",label:"Наименование организации",...wt(e("fullName"),zt)}),u(St,{className:"w-full mb-s",label:"ФИО",...wt(e("name"),_t)}),u(Vt,{className:"w-full mb-s",label:"Телефон",...wt(e("phone"),Dt)}),l?null:u(St,{className:"w-full mb-s",label:"Электронная почта",...wt(e("mail"),zt)})]})]})},on=e=>{const t=e("text");return p("label",{htmlFor:"textarea",children:[u("div",{className:"mb-xs",children:u(Be,{size:"text-m",font:"font-light",children:"Обращение"})}),u("textarea",{id:"textarea",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:S("block w-full resize-y min-h-24 p-m outline-none border rounded-md border-gray","hover:border-primary-hover active:focus:border-primary-text focus:border-primary-text"),value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},cn={fullName:"",name:"",phone:"",inn:"",vedTypes:"currencyControl",text:""},dn={fullName:zt,name:_t,phone:Dt},mn=gt({...dn,mail:zt}),hn=gt({...dn,inn:jt,region:zt}),un=e=>"currencyControl"===e,pn=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),xn={ApplicationFormBusinessCard:dl,ApplicationFormWed:x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,inn:r,region:s,vedTypes:o,text:c}=e,d={typeForm:"KVED",fullName:t,name:l,phone:a.replace(/[^+\d]/g,""),text:c,vedTypes:pn(o),PartnerComments:c,...un(o)?{inn:r,region:s?.text||""}:{mail:i}};ft((e=>un(e)?hn:mn)(o)(e))&&n(d)}),[n]),[,{field:r,...s}]=xt(cn,a),o=vt();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[rn(r),u(M,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),sn(r,o),on(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg @xl:items-center @xl:flex-row @xl:pb-4xl",children:[ll(t),u(Nt,{link:l})]}),u(M,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),p("div",{className:"flex gap-xl",children:[p("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(ue,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(ue,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Vl,ApplicationFormCredit:Ml,ApplicationFormAcquiring:il,ApplicationFormGrantSupport:Al,ApplicationFormIndividuals:nn},gn=x((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(ue,t?{image:{icon:"ResponseOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponseFailIcon"},width:"37",height:"34"}),p("div",{children:[u(M,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(Be,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),fn={send:async function(e,t){const l=t?"/api/v1/lead":"/api/v1/sendcorporatelead";try{const t=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return t?.ok?await t.json():null}catch(e){return null}}},bn=x((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async(e,t)=>{const l=await fn.send(e,t)?"OK":"Fail";return s(l),l}),[]);return u(T,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(M,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?yn(l,o):null,r?u(gn,{responseType:r}):null]})})})),yn=(e,t)=>{const l=e?.formType;if(!l||!(l in xn))return null;return u(xn[l],{...e,onSubmit:t})},vn="text-left",Nn={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},wn=x((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:S("rounded-icon object-fit flex justify-center items-center",Nn[l],e),children:u(ae,{...i,width:"54%",height:"54%",name:a})}):null})),kn=x((({className:e="",title:t,benefitList:l,...n})=>p(T,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(M,{headingType:"h3",as:"h2",className:vn,title:t}):null,l?.length?u("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(Sn)}):null]}))),Sn=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>p("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?u(wn,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?u(ue,{className:"shrink-0",image:n}):null,e?p("div",{className:"@sm:h-full space-y-xs",children:[u(M,{headingType:"h6",children:e}),u(Be,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),u(Ke,{className:"text-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Cn=x((({className:e="",title:t,description:l,bonusItems:n=[],align:a="text-left",...i})=>u(T,{className:e,defaultPadding:"p-6xl",...i,children:p("div",{className:"container",children:[u(V,{className:"mb-xl",isEmbedded:!0,title:t,description:l,headlineVersion:"M",align:a}),u("div",{className:"flex flex-wrap gap-3xl gap-x-m w-full",children:n.length>0?n.map(((e,t)=>p("div",{className:"w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow p-xl sm:p-m border border-gray",children:[u("div",{className:"grow",children:u(V,{title:e?.title,description:e?.description,headlineVersion:"S",isEmbedded:!0,align:"text-left"})}),p("div",{className:"flex justify-center sm:justify-between sm:items-end",children:[u("div",{className:"hidden sm:block",children:Le(e?.buttons)}),e.bonusItemContent?.bonusType?Tn(e.bonusItemContent):null]})]},String(t)))):null})]})}))),Tn=e=>"count"===e.bonusType?In(e):Bn(e),In=e=>p("div",{className:"w-full pt-default @xl:mt-s @xl:mb-4 flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(Be,{size:"text-h2",children:e.bonusName})}):null]}),Bn=e=>e.image?u(ue,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,Mn=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Rn=x((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=N(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),Pn=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],Vn=x((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const x={sensitivity:1,rootRef:t},g=s([]),f=i(((e,t)=>{const l=[...g.current||[]];l[e]=t,g.current=l,h&&h(l),p&&p(zn(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?An(r,b):{},...y?Mn(d):{},gap:`${a}px`};return u("div",{className:S("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(w=(e,t)=>u(Rn,{className:S(c,n?Pn[n-1]:"",y?"h-full":""),style:v?An(r/4):{},activeIndex:l,idx:t,observerOptions:x,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(w):w(e,0))(m)});var w})),An=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),zn=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),_n={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},jn={"horizontal-list":"w-6","vertical-list":"h-6"},Dn=x((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?u("div",{className:S("flex gap-xs",_n[a],i?"group":"",e),"data-ver":i,children:new Array(n).fill(null).map(((e,n)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?jn[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),En=e=>e,On=(e=En)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Ln=On(),$n=(e=En)=>On((t=>-e(t))),Fn=$n(),Un=e=>t=>e.scrollWidth/t,Hn=e=>(t,l)=>{e.scrollBy({left:l*Un(e)(t),behavior:"smooth"})},Wn=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[$n()(a),On()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Hn(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Hn(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),x=i((e=>{l?.current&&l.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:x,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Kn=x((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=true,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=Wn({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:S(e,"vertical-list"===o?"relative h-full":""),children:[u(Vn,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(Dn,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Yn=(e,t,l)=>{return u(Kn,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>p("div",{className:S("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?u(Be,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?u(ue,{image:e,height:"180",className:"w-auto"}):null,l?u(Be,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},Gn=x((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(T,{className:l,defaultPadding:"p-6xl",...r,children:[u(V,{title:i,description:a,headlineVersion:"M"}),e?.length?Yn(e,0,t):null]}))),Xn={start:"justify-start",center:"justify-center",end:"justify-end"},qn=x((({buttons:e,className:t="",align:l,...n})=>{const a=l?S("flex",Xn[l]):"";return u(T,{className:S("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Le(e)})})),Jn=x((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})}));const Zn=x((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:u("div",{className:e,ref:i,children:l})})})),Qn=x((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:S("flex justify-between @xl:flex-col",a),children:[e?u(Be,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(Be,{size:"text-h3",children:[n," ",Ye(2)(Math.round(t))," ",l]})}:{children:u(Be,{size:"text-h3",children:"-"})})]}))),ea=1e4,ta=5e6,la=Math.round(23.5),na={minSum:ea,maxSum:ta,minMonths:13,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},aa={minSum:ea,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},ia={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ra={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},sa={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},oa=e=>e?u(R,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,ca=x((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,fractionDigits:i=2})=>p("div",{children:[u(Be,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:String(e.toFixed(i)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:n}):null]})]}))),da=x((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{className:"space-y-s",children:[u(Be,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u(ae,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),u("div",{className:"w-64",children:t?p(R,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(R,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),ma=({rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,title:a,unit:i})=>u(ca,{rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,unit:i,title:a}),ha=({rate:e,title:t,unit:l})=>u(Qn,{title:t,value:e,postfix:l}),ua=({isUnknownRateShown:e=!0,isUnavailableByTerm:t=!1,title:l="Ставка",unit:n="%",rate:a=0,...i})=>e&&0===a?u(da,{isUnavailableByTerm:t,title:l}):p("div",{children:[u("div",{className:"hidden @xl:block",children:ma({title:l,unit:n,rate:a,...i})}),u("div",{className:"@xl:hidden",children:ha({title:l,unit:n,rate:a,...i})})]});function pa({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${Ye(2)(l.min||0)} ₽`,`До ${Ye(2)(l.max||0)} ₽`];return u(wl,{items:e?n:[],step:t,...l})}function xa(e){const{data:t}=it(`/wcms-resources/${e}.json`,ot);return t}const ga=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=xa(t||"bonus-calculator-data")||ia,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},fa=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=xt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=ga(a,t);return p("section",{className:S("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[p("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[pa({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),pa({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?ua({title:"Баллов за месяц",rate:d,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,p("div",{className:"flex flex-col gap-y-4xl @xl:w-96",children:[m>=0?u(Qn,{title:"Баллов за год",value:m}):null,Le(l,{isVertical:!0}),oa(n)]})]})})),ba=(e,t=0)=>e?.sum&&e.sum>=ea&&e.sum<=ta?e.sum:t,ya=(e,t=0)=>e?.period&&e.period>=13&&e.period<=60?e.period:t,va=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Na={horizontal:"gap-5xl",vertical:"flex-col gap-s"},wa=x((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:S(`flex ${Na[a]}`,l),children:e?.map((({id:e,text:l})=>u(jl,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),ka=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>p("div",{className:"space-y-s",children:[t?u("div",{className:"hidden @5xl:block",children:u(Be,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?u("div",{className:"@5xl:hidden",children:u(Be,{color:"text-secondary-text",font:"font-light",children:l})}):null,u(wa,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:S("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),Sa=e=>ka({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Ca=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},Ta=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Ia([e,t],n),Ia=([e,t],l=[])=>({[e]:l.length?Fn(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Ln(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Ba=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Ma=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ra=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},Pa=x((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r})=>{const[s,{field:o}]=xt({moneyValue:ba(r,1e5),daysValue:ya(r,90),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),c=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=xa(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...sa,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&Ma(o,e)&&Ba(n,["minSum","maxSum"],e)&&Ba(l,["minDays","maxDays"],e)))||sa,{rate:m}=d,h=Ra(m,e),u=n+h,p=s?.rateRows||[sa];return{...d,...Ia(["minSum","maxSum"],p),...Ia(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(s,t?.rateType&&t.sourceBookDir),{income:d,finalSum:m,rate:h,isUnavailableByTerm:x,depositeName:g}=c;return p("section",{className:S("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[pa({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),(f={title:"Срок, дней",min:c.minDays,max:c.maxDays,...o("daysValue"),value:c.daysValue},u(wl,{items:[`От ${va(f.min||0)}`,`До ${va(f.max||0)}`],step:1,...f})),p("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[Va(c,o),Sa({title:"Выплата процентов",orientation:"vertical",...o("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),u("div",{className:"border-b border-main-divider md:hidden"}),ua({rate:h,depositeName:g,isShowDepositeName:i,isUnavailableByTerm:x}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[Aa(m,d),Le(l,{isVertical:!0}),oa(n),oa(a)]})]});var f})),Va=(e,t)=>p("div",{className:"space-y-s",children:[u(Be,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(jl,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(jl,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Aa=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Qn,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Qn,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),za=({min:e=0,max:t=0,availableMonths:l,...n})=>u(wl,{items:[`От ${_a(e)}`,`До ${_a(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),_a=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,ja=e=>ka({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Da=e=>Ea({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Ea({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Ea({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Ea({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Ea=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Oa=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},La=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=xa(t||"credit-calculator-data"),s=i?.rateRows||[na],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Da({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Ta(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Ta(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>Da({row:e,userInputParams:t,paramsViewSettings:l})&&Ba(n,["minSum","maxSum"],e)&&Ba(a,["minMonths","maxMonths"],e)))||na)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,x=Oa(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:x})),[e,i])},$a=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=xt({moneyValue:ba(i,2e5),monthsValue:ya(i,la),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),o=La(r,t,a),c=ja({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return p("section",{className:S("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[pa({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),za({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),Fa({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),ua({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Qn,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),Le(l,{isVertical:!0}),oa(n)]})]})})),Fa=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(jl,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(jl,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(jl,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(jl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Ua=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=xa(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?Ka(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>Wa({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&Wa({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&Ba(n,["minSum","maxSum"],t)&&Ba(a||r,["minMonths","maxMonths"],t)))||ra,{rate:d}=c,m=Ha(d,e),h=n+m,u=i?.rateRows||[ra];return{...c,...Ia(["minSum","maxSum"],u),...Ia(["minMonths","maxMonths"],u),availableMonths:Ca(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},Ha=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},Wa=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Ka=(e,t)=>e+Math.round((t-e)/2),Ya=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:o}]=xt({moneyValue:ba(r,2e4),monthsValue:ya(r,0),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(r?.isRemoteRegistration)}),c=Ua(s,t,i),{defaultMonth:d,rate:m,income:h,finalSum:x}=c,{onChange:g}=o("monthsValue");return a((()=>{g&&g(d)}),[d]),p("section",{className:S("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[pa({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),za({title:"Срок, месяцев",min:c.minMonths,max:c.maxMonths,availableMonths:c.availableMonths,...o("monthsValue"),value:c.monthsValue}),Ga({...c,...i},o)]}),u("div",{className:"border-b border-main-divider md:hidden"}),ua({rate:m}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Qn,{title:"Доход в конце срока",value:h,postfix:"₽",prefix:"+"}),u(Qn,{title:"Сумма в конце срока",value:x,postfix:"₽"}),Le(l,{isVertical:!0}),oa(n)]})]})})),Ga=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?Sa({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},ka({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Xa=e=>qa({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&qa({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),qa=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Ja=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=xa(t||"refinancing-calculator-data"),c=o?.rateRows||[aa],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Xa({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=Ta(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=Ta(["minMonths","maxMonths"],d,c),x=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Xa({row:e,userInputParams:t,paramsViewSettings:l})&&Ba(n+r,["minSum","maxSum"],e)&&Ba(i,["minSumOld","maxSumOld"],e)&&Ba(r,["minSumExtra","maxSumExtra"],e)&&Ba(a,["minMonths","maxMonths"],e)))||aa)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:g}=x,f=Oa(g,e),b=e.oldMonthlyPayment-f;return r((()=>({...x,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},Za=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=xt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Ja(i,t,a),o=ja({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return p("section",{className:S("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[pa({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),pa({title:"Ежемесячный платеж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),za({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Qa({...s,...a},r),s.isExtraMoney?pa({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,u("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:o})]}),ua({rate:s.rate,fractionDigits:1}),p("div",{className:"flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0",children:[u(Qn,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Qn,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,u("div",{className:"hidden sm:block",children:o}),Le(l,{isVertical:!0}),oa(n)]})]})})),Qa=(e,t)=>p("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?u(jl,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(jl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u(jl,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),ei={CreditCalculatorForm:$a,DepositCalculatorForm:Ya,BusinessDepositCalculatorForm:Pa,BonusCalculatorForm:fa,RefinancingCalculatorForm:Za},ti=x((({className:e,calculatorTabs:t=[],...l})=>u(T,{className:e,defaultPadding:"p-0",...l,children:ni(t)}))),li=e=>{const t=e.calculatorBlock?.calcType;if(!t||!(t in ei))return null;const l=ei[t];return p("div",{className:"p-xl",children:[e?.calculatorBlock?.title?u(M,{className:"mb-lg",title:e?.calculatorBlock?.title}):null,u(l,{...e.calculatorBlock,isMobile:!0})]})},ni=e=>{if(!e||!e.length)return null;return 1===e.length?li(e[0]):e.map(((e,t)=>u(Jn,{isFoldButtonOnTop:!0,unfoldedByDefault:0===t,renderFoldableSection:({isUnfolded:t})=>u(Zn,{isUnfolded:t,children:li(e)}),renderFoldButton:ai(e)},t.toString())))},ai=e=>({isUnfolded:t,onToggle:l})=>{const n=e.nav?.align||"text-left";return p("button",{onClick:l,className:"w-full p-xl bg-primary-main flex items-center border-b border-white",children:[u("div",{className:"w-11 h-11 bg-white rounded-md flex justify-center items-center",children:u(ae,{name:e.nav?.icon?.icon,iconVersion:"color",width:"24",height:"24"})}),p("div",{className:"flex-1 flex flex-col pl-s",children:[u(Be,{align:n,color:"text-white",children:e.nav?.title}),u(Be,{align:n,size:"text-s",color:"text-white",font:"font-light",children:e.nav?.description})]}),u(ae,{name:t?"ArrowUpIcon":"ArrowDownIcon",iconVersion:"white",width:"24",height:"24"})]})},ii=x((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=gl(e,{normalize:(e=a)=>l&&n?String(fl(Number(ri(e)),l,n)):ri(e),format:Ye(r)}),c=i((e=>t&&t(ri(e))),[t]);return u(kt,{onChange:c,...s,...o})})),ri=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),si=x((e=>u(ii,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(Be,{size:"text-xl",font:"font-light",children:"₽"})})}))),oi={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},ci={amount:1500},di=x((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...o})=>{const[{amount:c},{field:d}]=xt(ci),[m,h]=n(!1);a((()=>{h(c<=0)}),[c]);const x=m?Z({version:r?.version}):Q({className:"text-white",version:r?.version}),g=U(),{onClick:f}=g(r||{});return p(T,{className:S("flex flex-col items-center",e),defaultPadding:"p-6xl",...o,children:[t?u(M,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:oi[s],children:[u(si,{valid:!m,placeholder:i,label:l,...d("amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:c}),r?.text?u("button",{type:"submit",className:S("w-full p-m mt-lg",x),disabled:m,onClick:f,children:r.text}):null]})]})})),mi=(e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},hi=x((({className:e,disabled:t,...l})=>u(ee,{rounded:!0,className:S("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:u(ue,{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"})}))),ui=x((e=>u(hi,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),pi=x((e=>u(hi,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),xi="absolute top-[calc(50%-24px)] z-40",gi="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",fi=x((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,x=a?t<l-1:c,g=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[bi(e),h?u(ui,{className:S(xi,n?"left-1 @lg:left-8":"left-0"),onClick:g}):null,x?u(pi,{className:S(xi,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),bi=e=>p("div",{children:[e.canScrollLeft?u("div",{className:S(gi,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:S(gi,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),yi=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),vi=[];function Ni(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=yi,blocksRegistry:r={},ancestors:s=vi}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:S(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const wi=[],ki=(e,{key:t,ancestors:l=wi,slotName:n=null,extraProps:a,renderProps:i=Ni,...r})=>{const s=a?(e,t)=>Ni(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||wi,[r.parent,n]]:l},a)))};function Si({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?ki(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const Ci=e=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Ti=({className:e,text:t="ХИТ"}={})=>p("div",{className:S("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[u(ae,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(R,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Ii="relative h-full",Bi={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},Mi=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(Vi);return Si({...n,renderProps:(n,a,r)=>p("div",{className:Ri(n,{someCardsHighlighted:i}),children:[Ni(n,a,{className:Pi(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Vi(n)?Ti({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},Ri=(e,{someCardsHighlighted:t})=>S(Ii,t&&(Vi(e)?"pt-3xl":"pt-3xl sm:pt-16")),Pi=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>S(Ii,"min-w-80",Bi[n],t&&(Vi(e)?"pt-3xl sm:pt-16":"pt-3xl"),Ci(l),l&&"h-full"),Vi=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Ai=x((({className:e,itemCount:t,visibleItemCount:l=0,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...o})=>{const{blocks:c=[]}=o.block||{},d=t||c?.length,[m,{inc:h,dec:x}]=mi({itemCount:d,visibleItemCount:l},Math.floor(l/2)),[g,f]=Wn({itemCount:d}),[b]=f.visibleIndicesRange,y=c&&"CarouselBankHistoryCard"===c[0]?.type;return p(T,{className:e,defaultPadding:"p-6xl",...o,children:[p("div",{className:S(a?"flex justify-center":"","relative max-w-full"),children:[u(Vn,{containerRef:g,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:Mi({noCardBorder:n,activeIndex:m,cardSize:s,...o})}),u(fi,{scroll:f,arrowsPadded:i,onScrollLeft:x,onScrollRight:h,hasEdgeBlocks:y,activeIndex:m,itemCount:d})]}),u(Dn,{className:"@5xl:hidden",containerRef:g,activeIndex:b,dotCount:d,listType:"horizontal-list"})]})}));Ai.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselInvestmentCard","RichTextBlock","ProductBlock"],Ai.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const zi=x((({title:e,description:t,className:l})=>u(T,{className:l,defaultPadding:"p-6xl",children:u(V,{headlineVersion:"XS",title:e,description:t,align:"text-left",className:"text-primary-text",isEmbedded:!0})}))),_i="z-10 border border-solid w-full h-full",ji=S(_i,"absolute hidden @xl:block border-transparent"),Di=x((({className:e,title:t,description:l,button:n,...a})=>u(T,{className:S("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative h-full",children:[u("div",{className:S(ji,"top-9 right-12 bg-green-dark")}),u("div",{className:S(ji,"top-6 right-8 bg-green")}),u("div",{className:S(ji,"top-3 right-4 bg-green-light")}),p("div",{className:S(_i,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[u(V,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Le([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Ei={black:"bg-black",white:"bg-white"},Oi=x((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:o,...c})=>u(T,{className:S("flex flex-col justify-left",e),defaultPadding:"p-2xl",...c,children:p(ge,{className:"h-full",padding:o,title:u(V,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?u(ue,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Le([i],{buttonClassName:"w-full self-end"}),children:[r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(Be,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Li)]}):null,a?p(Be,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Li=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Ei[e]}`},String(t)),$i="hidden xl:block absolute w-full h-full border border-white",Fi=x((({className:e="",...t})=>{const l=U(),{text:n,href:a,target:i,onClick:r}=l(t);return n?u("div",{className:S("flex relative group/link pl-s pb-s min-w-[16rem] xl:min-w-[20rem]",e),children:p("div",{className:"relative min-h-16 w-full",children:[p("a",{className:S("absolute border\n bg-white flex justify-between group-hover/link:text-primary-main","sm:rounded-md rounded-none w-full px-xl py-lg whitespace-nowrap z-10"),role:"link",href:a,target:i,onClick:r,children:[u(Be,{size:"text-l",font:"font-light",color:"text-primary-text",children:n}),u(ue,{className:"group-hover/link:brightness-100 hidden xl:block ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main hidden xl:block",width:"24",height:"24"})]}),u("div",{className:S($i,"-bottom-1.5 -left-1.5")}),u("div",{className:S($i,"-bottom-3 -left-3")})]})}):null})),Ui=x((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>u(T,{className:S("overflow-hidden",e),...i,children:p("div",{className:"flex flex-col @6xl:flex-row gap-m",children:[p("div",{children:[u(V,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),u(V,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?Hi(n,"@6xl:min-w-[672px] p-0 justify-self-end"):null]})}))),Hi=(e,t="")=>{const l=Math.ceil(e.length/3);return u(Ai,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",children:new Array(l).fill(null).map(((t,l)=>u("div",{className:S("flex flex-wrap gap-2xs self-start xl:justify-center @5xl:grid @5xl:grid-cols-2"),children:e.slice(3*l,3*(l+1)).map(((e,t)=>u(Fi,{...e},String(t))))},String(l))))})},Wi=x((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=U({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:S("block",e),...t?i:{},children:a})})),Ki=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Yi=e=>Ki.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{},Gi=x((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,o]=n(),c=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=Yi(t),c=Oe(n)?n:r,d=l?{text:a}:{text:""};return!s&&a&&o(!0),{...e,...d,icon:{...c,iconVersion:"color"},version:e?.version??i}})),d=S("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",a?"flex-1 justify-center":"");return p("div",{className:S("flex flex-col gap-xs",e),children:[u("div",{className:"flex gap-xs",children:Le(c,{className:S(a||s?"basis-full":""),buttonClassName:d})}),r?u(Be,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Xi=x((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:o=[],target:c,title:d,align:m="text-left",benefits:h,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:g=false,isImageSecondary:f=!1}={},...b})=>u(T,{className:S("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...b,children:u(Wi,{href:a,target:c,className:"h-full",children:p(ge,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:u(V,{title:d,description:l,headlineVersion:"XS",isEmbedded:!0,align:m}),...et(Oe(i)?u(ue,{image:i}):null,x),buttons:o.length?u(Gi,{media:o,showButtonText:!0,version:b?.version}):null,isImageAlwaysOnRight:g,isImageSecondary:f,imageAlign:"center",children:[u(Ee,{benefits:h}),u(Ke,{items:r,isDotted:s,listItemSize:"S"}),qi(n,m)]})})}))),qi=(e,t)=>e?u(R,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Ji=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(Be,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(Be,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:Le(a)}):null]},String(t))},Zi=x((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(Ji),o=s.slice(0,1),c=s.slice(1);return p(T,{className:S("flex flex-col",e),defaultPadding:"p-2xl",...r,children:[Oe(n)?u("div",{className:"self-center",children:u(ue,{image:n})}):null,t?u(M,{className:S("pt-xs",l),headingType:"h5",title:t}):null,a?u(ee,{className:"w-full mt-m mb-lg",...a}):null,i.length?u(Jn,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(Zn,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?Qi:null}):null]})})),Qi=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(ae,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),er=(e=!1)=>e?"text-white":"",tr=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),lr=x((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>p("div",{className:"space-y-4",role:"columnheader",children:[e?u(ue,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&u("div",{children:u(ue,{image:t})}),l?u(M,{headingType:"h4",className:er(a),title:l}):null,n?u("div",{className:tr(a),children:n}):null]}))),nr=x((({cell:e,rowHeader:t,isFillGradient:l=!1})=>u("div",{className:"box-border flex flex-col",role:"cell",children:u("div",{className:S("h-full","border-main-divider border-b"),children:e?e.map(ar(l,t)):null})}))),ar=(e,t)=>({label:l,description:n},a)=>p("div",{className:"flex justify-between text-s py-s",children:[u("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),p("div",{className:"basis-1/2",children:[l?u("div",{className:S("text-right",e?"text-white":""),children:l}):null,n?u("div",{className:S("text-right",e?"text-white/80":"text-secondary-text"),children:n}):null]})]},String(a)),ir=x((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return p("div",{className:S("border border-gray rounded-md p-m mb-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),role:"row",children:[u(lr,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>u(nr,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?u(ee,{href:e.link.href,target:e.link.target,version:s,className:"text-s font-medium mt-m py-s",children:e.link.text}):null,rr({onToggleColumn:i,isFillGradient:n,showRow:a})]})})),rr=({onToggleColumn:e,isFillGradient:t,showRow:l})=>u("div",{className:"mt-lg",role:"cell",children:u("a",{role:"link",onClick:e,className:"text-s font-medium cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:l?"Скрыть":"Показать описание"})}),sr=x((e=>{const{className:t,title:l}=e;return p("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?u(M,{headingType:"h3",className:"font-medium text-center",title:l}):null,u("div",{role:"table",children:u(or,{...e})})]})})),or=x((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[o,c]=n(new Array(e.length).fill(!a)),d=i((e=>{const t=(t,l)=>l===e?!t:t;c((e=>e.map(t)))}),[]),m=i((()=>c((e=>new Array(e.length).fill(!1)))),[]),h=e?.map((({data:e,header:n},i)=>{return u(ir,{visibleRowLength:a,showRow:o[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>d(i),...s},String(i));var r}));return"horizontal"===r?u(Kn,{onVisibleIndicesChange:m,children:h}):h})),cr=e=>e%2!=0,dr=x((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>p(l,{tag:l,className:S("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?u("div",{children:e}):null,t?u("div",{children:t}):null]}))),mr=x((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>u(dr,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:S("py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:u("span",{className:"text-h4 pr-s",children:t}),iconNode:l?u(ue,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),hr=({isUnfolded:e,onToggle:t})=>u(mr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),ur=x((({title:e,description:t})=>p("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[u(ue,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),u(V,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:vn})]}))),pr=["ArrowDownIcon","ArrowUpIcon"],xr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",gr=x((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return p("div",{children:[u("div",{className:S(t.length?"hidden":"block"),children:a?u(ur,{...a}):null}),p("div",{className:S("space-y-2xs",t.length?"":"hidden"),children:[p("div",{className:S(xr),children:[ki(r,{...i.options,parent:n}),cr(r.length)?u(ut,{className:"col-span-6"}):null]}),u(Jn,{renderFoldableSection:({isUnfolded:e})=>p(Zn,{className:S(xr),isUnfolded:e,children:[ki(s,{...i.options,parent:n}),cr(s.length)?u(ut,{className:"col-span-6"}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(mr,{className:S(l<1?"hidden":""),disabled:!s?.length,label:e,icon:pr[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),fr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,br=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>fr(t[e])||fr(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>fr(t[e])||fr(l[e])||yr(t[e])<=yr(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>fr(t[e])||fr(l[e])||yr(t[e]?.min)>=yr(l[e]?.min)&&yr(t[e]?.min)<=yr(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>fr(t[e])||fr(l[e])||t[e]?.some((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>fr(t[e])||fr(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),yr=e=>Number(e||0),vr=(e,t)=>(l=pt)=>e&&e.filter((e=>br(t,l(e.content||{})))),Nr=x((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(el,{text:l.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(t)if(n){const n=e?.includes(l);t(n?(e||[]).filter((e=>e!==l)):[...e||[],l])}else t(e===l?"":l)})(l.value),type:n?"checkbox":"radio"},l.value))))),wr=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(kr(e))]}),n?u("div",{children:u(ee,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,...n})}):null]}),kr=e=>([t,l])=>{const n=l?.type;return"array"===n?Sr(t,e)(l):null},Sr=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(Be,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(Nr,{items:n,multiple:!0,...t(e)})]},e)},Cr=(e,t)=>e[t?.sourceBook]?.rateRows.map((e=>e.minMonths)).filter((e=>void 0!==e));async function Tr(...e){const t=e.map((e=>st(e)));return Promise.all(t)}function Ir(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const Br=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function Mr(e){const{dirs:t=[],source:l=[]}=r((()=>{const t=(e=>e?.filter(Br).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=it(t,Tr);return{source:Object.fromEntries(Ir(l,n).filter((([,e])=>Boolean(e)))),months:(a=n.flatMap((e=>e?.rateRows||[])).filter((e=>"number"==typeof e.minMonths&&e.minMonths===e.maxMonths)).map((e=>e.minMonths)),[...new Set(a)]).sort(((e,t)=>e-t))||[]};var a}const Rr=1e9,Pr={sum:{min:1e4,max:Rr},period:3},Vr=x((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=Mr(i.block?.blocks),[o,{field:c,reset:d}]=xt(Pr),m=vr(i.block?.blocks,o)((e=>({...e,period:Cr(r,e||{})||[]}))),h=p("div",{children:[u(si,{label:n?.title,min:500,max:Rr,...c("sum",{parse:e=>({min:Number(e),max:Rr}),format:({min:e})=>String(e)})}),u(wl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...c("period")})]});return p(T,{className:S("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[wr({field:c,reset:d,filtrationSchema:t,resetButton:l,children:h}),u(gr,{blocksToRender:m,...i})]})})),Ar={type:"string",title:"Адрес справочника"};Vr.childrenTypes=["ProductTile"],Vr.childSchema=e=>({...e?.filtrationSchema||{},sourceBook:Ar});const zr=e=>"Image"===e?.contentType&&e?.image?u(ue,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,_r=x((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(T,{className:S("flex flex-col justify-center items-center",e),defaultPadding:S("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:zr(n)}),u(V,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?u(ee,{version:a?.version,text:a?.text,...a}):null]}))),jr="location";function Dr(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(v,"location",Or()??{name:e}),r=i((e=>{Lr(e),l(e)}),[]),{data:s}=it("/api/v1/region",ot);return a((()=>{s&&!Er()&&l(s)}),[s]),[t??{name:e},r]}const Er=()=>Boolean(globalThis.localStorage?.getItem(jr)),Or=()=>{try{const e=globalThis.localStorage?.getItem(jr);return e&&JSON.parse(e)}catch(e){return null}},Lr=e=>{try{globalThis.localStorage?.setItem(jr,JSON.stringify(e))}catch(e){}};var $r;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}($r||($r={}));const Fr=new Intl.NumberFormat("ru",{style:"currency",currency:$r.RUB}),Ur=e=>e?Fr.format(e):"",Hr="text-left text-m font-light text-secondary-text",Wr=`${Hr} pl-5xl`,Kr={USD:"DollarIcon",EUR:"EuroIcon"},Yr=x((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Hr,children:u(Be,{size:"text-m",children:"Валюта"})}),u("th",{className:Wr,children:u(Be,{size:"text-m",children:"Купить"})}),u("th",{className:Wr,children:u(Be,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Gr)})]}))),Gr=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(ue,{image:{icon:Kr[t]},width:"24",height:"24"}):null,u(Be,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(Be,{size:"text-h6",children:Ur(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(Be,{size:"text-h6",children:Ur(e?.buyExchangeRate)})})]},t)},Xr={icon:"GpsIcon"},qr=x((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(wn,{...Xr,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),Jr=(e,t,l)=>{const n=Number(Zr(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Zr=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Qr=e=>{return(t=[[e=>e.value!==$r.RUB&&e.oppositeValue!==$r.RUB,()=>e.handleConvert(e.value,$r.RUB)],[e=>e.value===$r.RUB&&e.oppositeValue===$r.RUB,()=>e.handleConvert(e.value,$r.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function es(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(kt,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(Gt,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const ts=x((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||$r.RUB,selectBuy:l?.[0]?.currency?.currency||$r.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[es({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:ls(r,o,l),value:r.inputSell,setValue:e=>as(o,l)(e,r.selectSell,r.selectBuy)}),es({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:ns(r,o,t),value:r.inputBuy,setValue:e=>is(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(ee,{text:a.text,version:a?.version,...a}):null]})})),ls=(e,t,l)=>n=>{t({selectSell:n}),Qr({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{as(t,l)(e.inputSell,n,a)}})},ns=(e,t,l)=>n=>{t({selectBuy:n}),Qr({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>is(t,l)(e.inputBuy,n,a)})},as=(e,t)=>(l,n,a)=>{e({inputSell:Zr(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Jr(l,i,n===$r.RUB)||"")})},is=(e,t)=>(l,n,a)=>{e({inputBuy:Zr(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Jr(l,i,n===$r.RUB)||"")})};const rs=x((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=Dr(),i=function(e){const t=e?.code||"000",{data:l}=it(`/api/v1/exchangerates?regionCode=${t}`,ot);return l||{}}(a),r=ss(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:$r.RUB}});const o=r.filter((e=>e.saleExchangeRate));return o.push({currency:{currency:$r.RUB}}),u(T,{className:S("box-border min-h-80",e),...n,children:u(ge,{className:"h-full",title:u(M,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[r?u(Yr,{className:"mb-xl",exchangeCurrencyItems:r}):null,u(qr,{address:i?.address})]}),r.length&&s.length&&o.length?u(ts,{className:"grow",currencyRatesBuy:s,currencyRatesSell:o,button:l}):null]})})})})),ss=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],os=e=>mt(d.SITEMAP||"sitemap",{fallback:e}),cs=()=>{const e=globalThis.document?.cookie.split(";")??[];for(const t of e){const[e]=t.split("=");globalThis.document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}},ds=(e,t)=>u(wn,{...e,iconBgVersion:t,className:"shrink-0"}),ms=x((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>u(dr,{tag:"button",className:S("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[ds(a,t),e?u(Be,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?u(ae,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),hs=x((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,...o})=>u(T,{className:S("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",...o,children:u(Jn,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(Zn,{className:S("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:Si({...o,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>us({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));hs.childrenTypes={exclude:["RollupItem"]};const us=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=(e=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"accordion"===e?u(ms,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):u(mr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},ps=x((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(xs):null,u(ee,{version:"primary",className:"w-full",href:"https://old.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),xs=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(Be,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(gs)})]},String(t)),gs=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:fs(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),fs=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${bs(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},bs=e=>e.replaceAll(/\D/g,""),ys=x((({className:e="",index:t,text:l,...n})=>{const a=U(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:S("",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),vs=x((({title:e,links:t,className:l=""})=>p("div",{className:S("flex flex-col gap-4",l),children:[u(Be,{size:"text-l",font:"font-normal",children:e}),t?.length?u("div",{className:"flex flex-col gap-lg",children:t.map(((e,t)=>u(ys,{className:"text-l font-light",index:t,...e},String(t))))}):null]}))),Ns=x((({className:e="",items:t,basePath:l})=>t?.length?u("ul",{className:S("flex flex-col",e),children:t.map(ws(l))}):null)),ws=e=>(t,l)=>{const{text:n,...a}=t,i=U({isRemote:!(!d.BASE_PATH||!e)&&!d.BASE_PATH.startsWith(e),basePath:e}),{href:r,target:s,onClick:o}=i(a);return u("li",{className:"list-none my-xs",children:u("a",{className:"hover:text-primary-main font-light",role:"link",href:r,target:s||"_self",onClick:o,children:n||null})},`list_item_${String(l)}`)},ks=x((({className:e="",index:t,...l})=>{const n=U({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),Ss=x((({className:e="",links:t})=>p("div",{className:S("@container",e),children:[u("div",{className:"pt-lg",children:u(Be,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(ks,{index:t,...e},String(t))))}):null]}))),Cs=x((({className:e,...t})=>{const l=t.options?.page?.fallback,{topItems:n}=os(l),{relatedEnterprises:a,contacts:i,socialMedia:r,mobileApps:s,horizontalNavigationTitle:c,documents:m}=mt(d.FOOTER||"footer",{fallback:l});return p(T,{tag:"footer",className:e,defaultPadding:"p-4xl pb-24",...t,children:[u("div",{className:"mb-lg pb-xs border-b border-main-divider",children:n?.map(((e,t)=>u(hs,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,children:u(Ns,{items:e.items,basePath:o(e.href)})},String(t))))}),u(ps,{className:"overflow-hidden",items:i}),p("div",{className:"mt-xl",children:[u(Gi,{className:"mb-xl",media:r,stretched:!0,children:"Соцсети"}),p("div",{className:"mb-xl",children:[u("div",{className:"flex flex-col gap-4 mb-xs",children:s?.map(Ts)}),u(Be,{size:"text-s",font:"font-light",color:"text-secondary-text",children:"Мобильное приложение"})]})]}),u("div",{className:"py-lg border-t border-main-divider",children:u(ys,{text:"Вернуться на прежнюю версию сайта",className:"text-l font-light max-w-[292px]",href:"https://old.rshb.ru",onClick:cs})}),u(vs,{className:"py-lg border-y border-main-divider",title:c,links:a}),u(Ss,{links:m})]})})),Ts=({href:e="/",text:t},l)=>{const{label:n}=Yi(e);return u(ee,{className:"w-full",text:t||n,version:"secondary",href:e,target:"_blank"},String(l))},Is={width:"34",height:"34"},Bs={"bg-white":"color",transparent:"white"},Ms={"bg-white":"text-primary-main",transparent:"text-white"},Rs=(e,t,l)=>u(ue,t?.src?{image:t,className:Ms[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Bs[e]},className:Ms[e],width:l?.width,height:l?.height}),Ps={"bg-white":"text-primary-text",transparent:"text-white"},Vs=x((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:S("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[Rs(i,l?.image,Is),r?n??u("div",{className:"ml-s",children:u(Be,{font:"font-medium",color:Ps[i],size:"text-s",children:l?.title||"Россельхозбанк"})}):null]}))),As={default:"px-5 bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},zs=x((({bgColor:e,logo:t,internetBankUrl:l,version:n})=>{const a=F(),r=d.BASE_PATH?.startsWith(a.pathname),s=i((e=>{e.preventDefault(),a.back()}),[]);return p("div",{className:"flex items-center justify-between w-full",children:[r?u("div",{children:u(Vs,{className:"my-2xs",bgColor:e,logo:t})}):_s(s),l?u("div",{children:u(ee,{href:l,ariaLabel:"Войти",target:"_blank",className:S("p-s text-s whitespace-nowrap text-primary-main hover:text-primary-hover",As["transparent"===n?"transparent":"default"]),children:"Войти"})}):null]})})),_s=e=>u("div",{children:p("button",{className:"flex items-center text-l my-2xs","aria-label":"Вернуться назад",onClick:e,children:[u(ue,{className:"w-6 h-6",image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24"}),"Вернуться назад"]})}),js={"bg-white":"primary",transparent:"transparent"},Ds=x((({bgColor:e="bg-white",version:t=js[e],...l})=>{const{logo:n}=os(l.options?.page?.fallback),{internetBankUrl:a}=mt(d.PORTAL_DATA||"portal-data",{folderName:"portal-resources",setBasePath:!0});return u(T,{tag:"header",defaultPadding:"",version:t,...l,children:u("div",{className:"container px-lg py-2xs box-border",children:u(zs,{bgColor:e,logo:n,internetBankUrl:a,version:t,...l})})})})),Es={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Os=x((({className:e="",gap:t="",isPadding:l=!1,isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isInnerBorder:r=!1,...s})=>u(T,{className:S("relative flex flex-col",Es[t],e),defaultPadding:l?"p-6xl":"",version:a,isTheme:i,...s,children:Si({...s,extraProps:{className:S("w-full",Ci(r)),padding:n?"":"p-0"}})})));Os.childrenTypes=[];const Ls=x((e=>u(Os,{...e})));Ls.childrenTypes=[];const $s=x((e=>{const{className:t,image:l,...n}=e;return u(T,{className:t,defaultPadding:"p-0",...n,children:u(ue,{image:l})})})),Fs=["байт","Кб","Мб","Гб","Тб","Пб"],Us=x((({icon:e,text:t,href:l,target:n,fileFormat:a,fileSize:i})=>{const r=a||i?",":"",s=i??"",o=a?String(a):"";return p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",href:l,target:n,children:[e,t?p(Be,{size:"text-l",font:"font-light",children:[t,u(Be,{color:"text-secondary-text",children:l&&`${s} ${r} ${o}`})]}):null]})})),Hs={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Ws=x((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=F();return p(T,{className:S("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(V,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:S("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Hs[r]),role:"list",children:a.map(Ks(o,i))}):null]})})),Ks=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a="Attachment"===l?.docType?O(e)(l?.attachment?.src):l?.href,i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Fs[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"!==l?.docType?l?.fileFormat:"";return u("div",{role:"listitem",children:u(Us,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?u(ue,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:t,width:"24",height:"24"}):null})},String(n))},Ys=x((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,additionalDescription:o="",title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24",x=i?.src?u(ue,{className:"hidden lg:block",image:i}):null;return u(T,{className:S("min-h-80",e),padding:"p-0",version:d,...m,children:p(ge,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:u(M,{headingType:"h3",title:c,className:S("whitespace-pre-wrap",l)}),rightImage:x,buttons:Le(n,{className:"flex-wrap"}),children:[a?u(Be,{size:"text-xl","font-weight":"font-light",children:a}):null,p("div",{className:S("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[u(Ke,{items:r,listItemSize:"M"}),u(Be,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:o}),s?.src?u("div",{className:S("flex justify-center bg-white rounded-md @xl:-order-1",h),children:u(ue,{className:"w-fit",image:s})}):null,i?.src?u(ue,{className:"lg:hidden",image:i}):null]})]})})})),Gs={primary:"bg-white/30",secondary:"bg-main-divider"},Xs={primary:"text-white",secondary:"text-secondary-text"},qs=x((({count:e,version:t="secondary"})=>u("div",{className:S("w-6 h-6 rounded-full flex items-center justify-center",Gs[t]),children:u(Be,{size:"text-xs",color:Xs[t],children:e})}))),Js=(e=[],t={})=>e.filter((({content:e={}})=>br(t,e))).length,Zs=(e,t)=>e===t;const Qs=(eo=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(Zs,((e=Zs)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>eo(l,t[e])))));var eo;const to=[],lo={},no={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},ao={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},io={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},ro={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},so=x((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:S("h-12","block flex-1","cursor-pointer",no[n],l?ro[n]:io[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:S("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?ao[n]:"text-secondary-text hover:text-primary-main"),children:[u(Be,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),oo=x((e=>u(e?.item?.href?co:mo,{...e}))),co=x((e=>{const t=U(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(so,{...e,tag:"a",item:a,onClick:n})})),mo=x((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(so,{item:e,onClick:n,...l})})),ho=(e,t,l)=>(n,a)=>u(oo,{isActive:n===e,onClick:t,type:l,item:n},String(a)),uo=x((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:S("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(ho(n,a,t))}))),po={categories:[],extraOptions:[],propertyType:[],stage:[]},xo=x((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:o,reset:c,update:d}]=xt(po),m=vr(a.block?.blocks,s)(),h=i(((e=po)=>d(e)),[]),x=(({hotFilters:e=to,filtrationState:t=lo,blocks:l=to,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Qs(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:u(qs,{version:t===e[a]?"primary":"secondary",count:Js(l,t.filter)})})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:h});return p(T,{className:S("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(uo,{...x}),wr({field:o,reset:c,filtrationSchema:l,resetButton:n}),u(gr,{blocksToRender:m,...a})]})}));function go(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}xo.childrenTypes=["ProductTile"],xo.childSchema=e=>e?.filtrationSchema||{};const fo={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},bo=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(fo).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),yo={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},vo=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(yo).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(ae,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),No=e=>globalThis[e];const wo=()=>function(e,t){const[l,r]=n(),s=i((()=>r(No(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!No(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),ko={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},So=x((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(ko).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(ae,{name:l,width:"20",height:"16"})})})),Co={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},To=[55.753995,37.614069],Io=x((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=wo(),[o,c]=n(),d=e?Bo(e):To;if(a((()=>{i?.current||r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:d,zoom:l,controls:[],suppressMapOpenBlock:!0}),go(r,i.current,e))})),i.current&&r&&(go(r,i.current,e),e?.length||i.current.setCenter(To))}),[r,i,e,d,l]),!r)return null;const m=o?"z-[100000]":"z-10";return p("div",{id:"map",className:S(!o&&"relative","w-full",t),children:[u("div",{className:S("absolute flex left-2 top-4 w-1/2",m),children:bo(d)}),u("div",{className:S(Object.values(Co),m,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;o?e.exitFullscreen():e.enterFullscreen(),c(e.isFullscreen())},children:u(ae,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:S("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",m),children:[u(So,{yandexMaps:i}),u(So,{yandexMaps:i,direction:"out"})]}),vo(i.current,r,S("right-2 top-80",m))]})})),Bo=e=>[Ro(Mo(e,0)),Ro(Mo(e,1))],Mo=(e,t)=>e.map((e=>e[t])),Ro=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Po={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},Vo=(e,{field:t,reset:l})=>p("div",{className:"pb-2xl",children:[e?.length?u("div",{className:"flex flex-wrap gap-3xl pb-2xl",children:e.map((e=>u(jl,{text:Po[e],...t(e)},e)))}):null,u(ee,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:u(ae,{name:"CloseIcon",width:"16",height:"16"})})]}),Ao=()=>null,zo=()=>[],_o=x((({className:e,data:t=[],renderCard:l=Ao,filterItems:n=zo,initFilterState:a={},descriptionData:i,title:r})=>{const[s,{field:o,reset:c}]=xt(a),d=n(t,s),m=d.map((e=>[e.gpsLatitude,e.gpsLongitude].filter(Boolean))).filter((e=>e&&2===e.length)),h=d.length;return p("div",{className:S("space-y-1",e),children:[p("div",{className:"bg-white",children:[p("div",{className:"pt-6xl px-6xl",children:[p("div",{className:"flex gap-xs pb-2xl",children:[u(M,{headingType:"h2",children:r}),h?u(Be,{size:"text-h2",color:"text-secondary-text",children:`(${h})`}):null]}),i?jo(i):null,Vo(Object.keys(a),{field:o,reset:c})]}),u("div",{className:"h-[600px]",children:u(b,{children:u(Io,{points:m,className:"h-full"})})})]}),d.map(l)]})})),jo=({description:e,list:t})=>e||t?.length?p("div",{className:"p-xl mb-2xl border border-gray rounded-md",children:[e?u(R,{size:"text-l",font:"font-light",children:e}):null,t?.length?u("div",{className:"flex gap-2xl flex-wrap pt-xs",children:t.map(((e,t)=>p("div",{className:"flex gap-xs items-center",children:[e?.image?u(ue,{image:e.image}):null,e?.text?u(Be,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Do={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"}},Eo=x((({className:e,children:t,color:l="gray"})=>u("div",{className:S("p-s border border-gray rounded-md flex items-center",Do[l].border,e),children:u(Be,{size:"text-m",color:Do[l].text,children:t})}))),Oo=x((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:Lo({textItems:a,subText:t,children:l,...n})})),Lo=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>p("div",{className:S("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?u(Be,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>u(Be,{size:"text-l",children:e.trim()},String(t)))),a?u(Be,{color:n,size:"text-m",children:a}):null]}),$o=x((({className:e,children:t})=>u("div",{className:S("flex border-t border-solid border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Fo=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},o)=>{const c=[{label:"Устройство",value:Ho(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return p("div",{className:"bg-white col-span-12 p-3xl border-green border",children:[p("div",{className:"flex justify-between",children:[u(Be,{size:"text-h4",children:Ho(e)}),u(Eo,{color:"green",children:Ho(s)})]}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(ae,{name:"GeolocationIcon",width:"24",height:"24"}),u(Be,{size:"text-l",children:t})]}):null,u($o,{className:"flex-wrap",children:c?.map(Uo)})]},String(o))},Uo=(e,t)=>u(Oo,{...e},String(t)),Ho=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Wo=[];const Ko=async e=>await st(e,{method:"GET"})||Wo,Yo={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Go={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Xo=x((({data:e,className:t})=>{const[l]=Dr(),n=function(e){const{data:t=Wo}=it(`/api/v1/atms?regionCode=${e}`,Ko);return t}(l?.code??"000");return u(_o,{className:t,filterItems:qo,data:n,initFilterState:Yo,renderCard:Fo,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),qo=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>Go[t](e))),l=!n.length||n.some((t=>Go[t](e)));return t&&l}))},Jo=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", "),a=[Zo({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Zo({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean);return u(Oo,{label:"Режим работы",value:a,className:"max-w-none"})},Zo=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",Qo=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],ec=e=>Qo.map((([t,l,n])=>({key:t,title:n,short:l,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??"")}}))),tc=e=>{if(!e)return null;const t=lc(e);return p($o,{className:"border-none",children:[u(Oo,{label:"Для юридических лиц",labelSize:"text-l",children:u("div",{className:"flex gap-1",children:t.map(nc)})}),u(Oo,{label:"Режим работы",className:"max-w-none",children:u(Be,{children:e})})]})},lc=e=>{const t=Qo.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},nc=({short:e,status:t},l)=>u("div",{className:S("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:u(Be,{size:"text-xs",children:e})},String(l)),ac=(new Date).getDay(),ic=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c},d)=>{if(!o)return null;const m=ec(o),h=o?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return p("div",{className:"bg-white col-span-12 p-3xl border-green border",children:[p("div",{className:"flex justify-between",children:[u(Be,{size:"text-h4",children:e}),sc(m)]}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(ae,{name:"GeolocationIcon",width:"24",height:"24"}),u(Be,{size:"text-l",children:t})]}):null,p($o,{className:"flex-wrap",children:[u(Oo,{label:"Факс",value:n}),u(Oo,{label:"Телефон филиала",value:l}),u(Oo,{label:"Для обращений юридических лиц",value:a}),u(Oo,{label:"Обслуживание физических лиц",value:i}),u(Oo,{label:"Для консультаций по валютному контролю",value:s}),u(Oo,{label:"Контакт-центр",value:r})]}),o.isMatchesPattern?u($o,{children:u(Oo,{label:h,labelSize:"text-l",className:"w-full max-w-none",children:u("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:m?.map(oc)})})}):p($o,{children:[u(Oo,{label:h,labelSize:"text-l",children:u("div",{className:"flex gap-1",children:m?.map(nc)})}),Jo(m)]}),o?.businessScheduleVisibleTag?tc(o?.businessScheduleDescription):null,c?.currencies?.length?u($o,{className:"flex-wrap",children:c?.currencies?.map(rc)}):null]},String(d))},rc=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>p("div",{className:"flex gap-lg h-full",children:[e?.currency?u(Oo,{label:"Валюта",value:e.currency}):null,t?u(Oo,{label:"Купить",value:String(t)}):null,l?u(Oo,{label:"Продать",value:String(l)}):null]},String(n)),sc=e=>{const[t]=e?.slice(ac-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?p("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?u(Eo,{color:"green",children:a}):null,l&&i?u(Eo,{color:"yellow",children:`перерыв: ${l}`}):null]}):u(Eo,{color:"red",children:"Выходной"})},oc=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>u(Oo,{label:e,value:t&&l?l:"",subText:cc(n,a,t),subColor:!t||a?"text-error":"text-green-dark"},String(i)),cc=(e,t=!1,l=!1)=>l?e&&t?`Перерыв ${e}`:e:"Не работает",dc=[];const mc=async e=>await st(e,{method:"GET"})||dc,hc={workingSaturday:!1},uc={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},pc=x((({className:e})=>{const[t]=Dr(),l=function(e){const{data:t=dc}=it(`/api/v1/branches?regionCode=${e}`,mc);return t}(t?.code??"000");return u(_o,{className:e,filterItems:xc,data:l,initFilterState:hc,renderCard:ic,title:`Офисы филиала ${t?.name}`})})),xc=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>uc[t](e)))))},gc=x((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return u(T,{version:"transparent",className:S(t),defaultPadding:"p-0",...l,children:"offices"===n?u(pc,{}):u(Xo,{data:e})})})),fc=x((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(T,{className:S("box-border",e),...n,children:[u(V,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:bc()})]}))),bc=(e=3)=>vc(100,e).map((e=>Math.floor(e))).map(yc),yc=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),vc=(e,t)=>[e].concat(t>0?vc(e/1.618,t-1):[]),Nc=x((({className:e,padding:t,slides:l=[],...n})=>u(T,{className:S("overflow-hidden relative",e),padding:t,...n,children:u(Kn,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>u("div",{className:"box-border h-full",children:u(Qe,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),wc=x((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(T,{className:S("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[Oe(r)?u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:u(ue,{image:r})}):null,s?u(M,{headingType:"h3",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?kc(i):null,Sc({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Sc({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Sc({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Le([n]):null]})]}))),kc=e=>u("div",{className:"border-b border-main-divider pb-lg",children:u(Te,{__html:e})}),Sc=({label:e,data:t,iconName:l,dataColor:n=""})=>t?p("div",{className:"flex gap-s",children:[u(ae,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col gap-2xs",children:[u(Be,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),u(Be,{size:"text-xl",color:n,children:t})]})]}):null,Cc=x((e=>{const{__html:t,richVersion:l,...n}=e;return u(T,{defaultPadding:"p-0",...n,children:u(Te,{__html:t,richVersion:l})})})),Tc=x((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:S("order-4",e),children:[u(an,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(an,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Ic=x((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(Gt,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),Bc=x((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Ic,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(Ic,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Mc=["От 1 дня","До 365 дней"],Rc=x((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(Be,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(wl,{min:1,max:365,value:e,items:Mc,onChange:t})]}))),Pc=x((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(Ic,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(Ic,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Vc=x((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents @xl:block flex-1 space-y-xl",children:[u(Bc,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Ac(c)}),u(Rc,{days:a,setDays:e=>c({days:e})}),u(Pc,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:zc(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(Be,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents @md:flex justify-between items-center gap-m",children:[u(Tc,{}),u(ee,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),Ac=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},zc=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},_c=x((({days:e,tariffs:t=[]})=>{const l=Dc(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[p("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[jc("Аренда за",e),jc("Цена",l+" ₽")]}),u("div",{className:"@xl:hidden order-3 mb-xs",children:u(R,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),p("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[u(ue,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),u("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:u(R,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),jc=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[u(Be,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Dc=(e,t)=>{const l=Ec(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Ec=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},Oc=(e,t)=>e.find((e=>e.branchCode===t)),Lc=x((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Oc(n,l.selectedBranch),o=$c(s?.safeBoxCaseVolumes),c=Fc(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Uc(c,l.selectedBoxSize);return p("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[u(Vc,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(_c,{days:l.days,tariffs:d})]})})),$c=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Fc=(e,t)=>e?.find((e=>e.volume===t)),Uc=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Hc=[];const Wc=async e=>await st(e,{method:"GET"})||Hc,Kc=x((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=vt(),h=Yc(c.selectedRegion,m),x=function(e){const{data:t}=it(e?`/api/v1/safeboxes?regionCode=${e}`:null,Wc);return t||Hc}(h),g=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Oc(x,c.selectedBranch)||x,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(T,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(M,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Lc,{regions:m,branches:x,data:{...c,selectedRegion:h},onClick:o,onChange:g}),t?u(R,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(Io,{points:f,className:"h-[640px]"}):null]})})),Yc=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Gc(e){throw new Error(e)}const Xc={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},qc={normal:"",small:"min-h-6xl"},Jc={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"},Zc=x((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",version:r="primary",...s})=>p(T,{className:S("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[u(V,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?u("div",{className:"box-border",children:u("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(Qc(i,r))})}):null,Le(a,{isVertical:!0})]}))),Qc=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return ed(e,t)(l,n);case"rte":return u(Te,{__html:l.__html});default:Gc(l)}},ed=(e,t)=>(l,n)=>u("div",{className:"contents",children:p("div",{className:"flex flex-row text-center relative",children:[u("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:td(e,t)(l,n)}),p("div",{className:S("flex flex-col justify-center h-fit",qc[e]),children:[l.label?u("div",{className:"text-l text-left",children:l.label}):null,l.description?u("div",{className:S("text-s font-light text-left",Jc.description),children:l.description}):null]})]})},String(n)),td=(e,t)=>(l,n)=>{const a="normal"===e?"38":"24",i="secondary"===t?"white":"color",r=Boolean(l?.icon?.src),s=Xc[e][r?"image":"icon"];return u("div",{className:S(s,r?"":`rounded-md ${Jc.iconBackground}`,"z-10 mr-s flex justify-center content-center"),children:u("span",{className:"flex max-w-full max-h-full self-center text-h4 text-secondary-text group-data-secondary:text-white",children:Oe(l?.icon)?u(ue,{image:{...l.icon,iconVersion:l.icon?.iconVersion||i},imageClassName:"max-w-full max-h-full",width:a,height:a}):u("span",{children:n+1})})})},ld=e=>({href:t})=>!!t&&j(z(t)?e.href:e.pathname).startsWith(j(t));function nd(e=[]){const t=F(),l=e.findIndex((e=>ld(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(t));return[l,e[l]]}const ad=x((({isActive:e,item:t,onClick:l})=>{const n=U({isRemote:!d?.BASE_PATH||!t.href?.startsWith(d?.BASE_PATH)}),{href:a,target:i,onClick:r}=n({href:t.href,target:"_self"}),s="BurgerIcon"===t?.icon?.icon?t.isActive:e,o=s?"color":"black";return p("a",{className:S(s?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),onClick:()=>"BurgerIcon"===t?.icon?.icon&&l?l():r(),href:a,target:i,children:[u(ue,{className:"w-6 h-6",image:{icon:t?.icon?.icon,iconVersion:o}}),t.title]})})),id=x((({menuItems:e,onClick:t})=>{const[l]=nd(e);return u("div",{className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:e.map(((e,n)=>u(ad,{isActive:n===l,item:e,onClick:t},String(n))))})}));const rd=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>v.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Gc(e)}}))),[c,d]),l},sd=x((({className:e,onClose:t})=>u("button",{className:S("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(ue,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),od=x((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=A(),r=i((()=>{a(),n&&n()}),[n]);return p("div",{className:S("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(sd,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})}));const cd=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=new Array(e.length),a=new Array(t.length);let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const dd=e=>e?.length?p("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(Be,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>u(md,{...e},String(t))))})]}):null,md=x((({icon:e,...t})=>{const l=U(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s items-center",children:[e?u(ue,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:u(Be,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),hd=e=>t=>u("div",{className:"mb-xs sm:mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:u(Be,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),ud=x((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),pd=x((()=>{const{defaultLocation:e,foreignOffices:t}=os(),[l,a]=Dr(e),[r,s]=n(""),o=gd(function(){const{data:e}=it("/api/v1/regions",ot);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(o,xd),{close:d}=A(),m=i((e=>{a(e),d()}),[]);return p(od,{className:"pb-20",head:p("div",{children:[u(Be,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?p("div",{className:"mb-s",children:[u(Be,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(l),children:u(Be,{color:"text-primary-main",children:l.name})})]}):null,u(ud,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&cd(e.toLowerCase())(r.toLowerCase())>=.8)).map(hd(m))}):u("div",{className:"columns-1 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(Be,{size:"text-h6",children:e})}),t.map(hd(h))]},e)))}),dd(t)]});var h})),xd=e=>e.name?.charAt(0)||"",gd=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),fd=x((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:S("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(ue,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:S("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})}));function bd(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const yd=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},vd=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Nd=e=>t=>e.map((([e,l])=>[cd(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>kd(t,e))).reduce(yd(Math.max,0),new Map),wd=e=>t=>{return Ir(t,t.map((({title:e})=>e)).map((e=>t=>{const l=vd(t||"");return l.length?ke(e.map((e=>Ln(l.map(cd(e)))))):0})(e))).sort((e=>(t,l)=>-e(t,l))((l=([,e])=>e,(e,t)=>l(e)-l(t)))).map((([e])=>e));var l},kd=(e,t)=>new Map(e.map((e=>[e,t]))),Sd=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=it(e?.length?e:null,Cd),[s,o]=n(null);return bd((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=vd(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(Nd(i)).reduce(yd(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return wd(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},Cd=async(...e)=>(await Promise.allSettled(e.map((e=>st(D(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Td=x((({className:e,topItems:t})=>{const l=U({isRemote:!0});return u("div",{className:S("flex items-start justify-between",e),children:t?.map(l).map(Bd)})})),Id=["all","footer"],Bd=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||Id.includes(e.displayArea.toLowerCase())));return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>u(Md,{...e,basePath:o(a),index:t},String(t))))]},String(t))},Md=x((({text:e,index:t,basePath:l,...n})=>{const a=U({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:S("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),Rd=x((({initialQuery:e})=>{const{topItems:t}=os(),l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,i]=Sd({basePathList:l,initialQuery:e}),s=r((()=>Pd(t)(n)),[t,n]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(od,{head:u(fd,{autoFocus:!0,...i}),children:u(Td,{topItems:s})})})),Pd=e=>t=>e?.length&&t?.length?Ir(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:D("/",t)})))}))):[];const Vd=x((({className:e})=>{const[t,l]=n(""),a=i((()=>l("")),[]),{open:r}=(()=>{const{open:e,close:t}=A();return{open:(t={},l={})=>e(u(Rd,{...t}),l),close:t}})(),s=i((e=>{l(e),Ad(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:S("relative",e),children:[u(fd,{value:t,onChange:s}),u(sd,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),Ad=e=>e&&e.length>=3,zd=x((({item:e,basePath:t})=>{const l=U({isRemote:!(!d.BASE_PATH||!t)&&!d.BASE_PATH.startsWith(t),basePath:t}),{href:n,target:a,onClick:i}=l(e),r=F(),s=ld(r)({href:n});return p("a",{className:S(s?"text-primary-main":"text-primary-text","py-3 text-h5 font-light flex justify-between cursor-pointer"),href:n,target:a,onClick:i,children:[e.text,u(ue,{image:{icon:"ChevronLeftIcon",iconVersion:"black"},width:"24",height:"24",className:"text-secondary-text rotate-180 opacity-30"})]})})),_d=x((({activeMenuSubItems:e,basePath:t})=>e?u("div",{className:"mb-5",children:e.map(((e,l)=>u(zd,{item:e,basePath:t},String(l))))}):null)),jd=({item:e,isActive:t,onClick:l})=>p("button",{type:"button",className:"relative",onClick:l,children:[u("span",{className:S("whitespace-nowrap",t?"text-primary-main":""),children:e.text}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]}),Dd=x((e=>{const{topItems:t,officesLink:l,defaultLocation:s}=os(e.options?.page?.fallback),[o]=Dr(s),c=(()=>{const{open:e,close:t}=A();return{open:(t={})=>e(u(pd,{}),t),close:t}})(),d=i((()=>c.open()),[]),[m,h]=Wn({itemCount:t?.length??0}),[x]=nd(t),[g,f]=n(x),b=r((()=>t?.[g]),[t,g]),y=b?.items||[];a((()=>{f(x)}),[x]),a((()=>{g>0&&h.scrollTo(g)}),[g,h]);const v=i((e=>f(e)),[]);return u(od,{head:u("div",{className:"flex items-center",children:u(M,{as:"h4",title:"Меню"})}),children:p("div",{className:"flex flex-col flex-nowrap relative w-full h-auto m-auto bg-white pb-24 box-border rounded-md",children:[u("div",{className:"w-full mb-3",children:u(Vn,{containerRef:m,visibleItemCount:0,gap:20,className:"pb-3",children:t?.map(((e,t)=>u(jd,{item:e,isActive:g===t,onClick:()=>v(t)},String(t))))})}),p("div",{className:"relative grow overflow-auto",children:[u(_d,{activeMenuSubItems:y,basePath:b?.href}),u(Vd,{className:"grow mb-5"}),Ed(l),p("div",{className:"flex items-center text-s cursor-pointer",onClick:d,children:[u(ue,{image:{icon:"GeolocationIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),p("div",{className:"flex flex-col items-start",children:[u(Be,{size:"text-h5",children:o.name}),u(Be,{color:"text-secondary-text",size:"text-s",children:"Ваша локация"})]})]})]})]})})})),Ed=e=>e?p("a",{className:"flex items-center mb-3",href:e,rel:"noopener noreferrer","aria-label":"Офисы и банкоматы",children:[u(ue,{image:{icon:"MapOpenedIcon",iconVersion:"black"},width:"24",height:"24",className:"text-primary-main box-border mr-xs bg-main-divider p-xs rounded-md"}),u("span",{children:"Офисы и банкоматы"})]}):null,Od="burgerMenuDialog",Ld=x((({...e})=>{const{menuItems:t=[]}=mt(d.STICKY_MOBILE_MENU||"sticky-mobile-menu",{fallback:e.options?.page?.fallback,folderName:"portal-resources",setBasePath:!0}),[l,{toggle:n}]=(()=>{const{open:e,closeAll:t,close:l}=A(),n=rd(),a=((e,t)=>t.find((t=>t.id===e),e))(Od,n),r=i((()=>e(u(Dd,{}),{id:Od})),[]),s=i((()=>{a?t():r()}),[a]);return[Boolean(a),{open:r,close:l,toggle:s}]})(),a={title:"Меню",icon:{icon:"BurgerIcon",iconVersion:l?"color":"black"},isActive:l},s=Math.floor(t.length/2),o=r((()=>[...t.slice(0,s),a,...t.slice(s)]),[t,s,a]);return u("div",{className:"w-full mb-5","data-component":"sticky-bottom-menu-container",children:u(T,{className:"@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]",padding:"p-0",children:u(id,{menuItems:o,onClick:n})})})})),$d="hidden sm:flex absolute z-40 top-0",Fd=x((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=Wn({itemCount:t?.length||0});return p("div",{className:S("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(Vn,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(ho(l,n,a))}),r.canScrollLeft?u(ui,{className:S("left-6",$d),onClick:r.scrollLeft}):null,r.canScrollRight?u(pi,{className:S("right-6",$d),onClick:r.scrollRight}):null]})})),Ud=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(uo,{...t});case"centered":return u("div",{className:"flex",children:u(uo,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Fd,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Hd="tab",Wd=x((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=F(),{isReady:d}=c,m=r((()=>l.map(Yd)),[l]),[h,p]=n(0);a((()=>{if(!l||!l[0])return;const e=c.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===c.query.tab))||0,t=l[e]||l[0];p(e),Kd(t)}),[d]),a((()=>{const e=l[h];"group"===e?.type&&v.subject("tab",{type:e.type,label:e.ref})}),[l,h]);const x=i((e=>{const t=m.indexOf(e),n=l[t];p(t),Kd(n),"group"===n.type&&(e=>{const t=new URLSearchParams(c.query);e.name?t.set(Hd,e.name):t.delete(Hd),c.replace(`${c.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,m]);return u(T,{className:S(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:Ud({items:m,value:m[h],tabsMode:s,onChange:x})})})),Kd=e=>{"group"===e.type&&v.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&v.fire("tab",{type:e.type,label:e.href})},Yd=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,Gd={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Xd=x((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:Gd[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),qd=x((({className:e="",isOpen:t,onClick:l})=>u(ee,{className:e,appendRight:u(ue,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),Jd={Buttons:({buttons:e})=>Le(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?u(ue,{image:e}):null,List:({isDotted:e,...t})=>u(Ke,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{className:"space-y-2xs",children:[e?u("div",{children:e}):null,t?u("div",{children:u(Be,{size:"text-s",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(qd,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},Zd=x((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return Qd({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Qd=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in Jd))return null;return u(Jd[l],{...t,...n})},em=x((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>u("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>u(Zd,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),tm=(e,t)=>140*ke(e.slice(0,t).map((e=>e?.cols?.length??1))),lm=(e,t)=>e?.length>0?u("div",{className:S("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>u("div",{className:"w-20 text-h6 mx-lg",children:e},String(t))))}):null,nm=x((({rows:e})=>{return u(Vn,{visibleItemCount:0,snapAlign:"snap-start",children:u("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=S("flex duration-1000 text-center",0!==l?"font-normal":"font-light");return p("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?u("div",{className:"text-xl font-light w-56 min-w-56 py-lg",children:n.data}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${tm(a,t)}px)`},children:a?.map(((e,l)=>p("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?u("div",{className:"text-xl font-light",children:e.data}):null,e?.cols?lm(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),am=x((({activeTabIndex:e,items:t})=>u("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return p("div",{className:"w-full @container",children:[u("div",{className:"flex p-m bg-white @4xl:bg-gray text-center justify-center relative",children:u(Be,{size:"text-xl",font:"font-light",children:t.title})}),u("div",{className:"w-full pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:u("div",{className:"relative",children:u(nm,{rows:t.rowsData})})})]},n)}))}))),im=x((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>u("div",{className:"rounded-md text-xl font-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>n(t),children:e||t+1},e)))}):null,t?u(ee,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:u(ae,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function rm(e){const t=await fetch(e);return await t.json()}const sm=x((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=it(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),rm);return t||{}}(e),[r,s]=n(0),o=i((e=>s(e)),[]),c=a?.[r]?.items??[],d=a?.map((e=>e.currency??""));return p("div",a?{className:"bg-white z-10",children:[u(im,{currencies:d,activeTabIndex:r,setActiveTabIndex:o,linkToPDF:t}),u(am,{activeTabIndex:r,items:c}),u(qd,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-h6 text-center",children:[u("p",{children:"Данных нет"}),u(qd,{onClick:l,isOpen:!0})]})})),om=x((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:S("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?u("div",{className:"origin-top animate-expansion",children:u(sm,{...t,onClick:l})}):null]}))),cm=x((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,o]=n(void 0),c=i((e=>o(e)),[]),[d,m]=n(void 0),h=i((e=>m(e)),[]);return p(om,{onHideContentClick:()=>o(void 0),tableInner:s,...r,children:[u("div",{className:S("text-s","w-80 flex-shrink-0"),children:p("div",{className:"flex gap-m items-center text-primary-text",role:"cell",children:[e?.icon?u(ue,{className:"hidden @4xl:block max-w-6",image:e.icon,width:"24",height:"24"}):null,e?.title?u("div",{className:"text-m font-light",children:e?.title}):null]})}),t?.length?u(Xd,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(em,{cells:e,rowIdx:a,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...r},String(t))))}):null]})}));function dm({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?p("div",{children:[l?u(hi,{className:`absolute z-40 ${a[0]} ${i}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u(hi,{className:`absolute z-40 rotate-180 ${a[1]} ${i}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const mm=x((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative space-y-xs",children:[e,dm({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),hm=x((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=mi({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(cm,{row:e,activeIndex:d,rowIdx:t,...r},String(t)))),[x,g]=i>0?[h.slice(0,-i),h.slice(-i)]:[h,[]];return p(T,{className:S("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[u(V,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),u("div",{className:"space-y-m",children:i>0?u(Jn,{renderFoldableSection:({isUnfolded:e})=>p(mm,{controls:m,children:[x,u(Zn,{isUnfolded:e,children:g})]}),renderFoldButton:hr}):u(mm,{controls:m,children:h})})]})})),um=x((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(T,{className:S("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?pm():null,"big"===n?xm(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(Be,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?gm(l):null,r?.length?fm(r,!0):null,i?u(Te,{__html:i}):null]})]}))),pm=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),xm=e=>e?.src?u(ue,{className:"h-fit flex-shrink-0",image:e}):null,gm=e=>u(R,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),fm=(e,t)=>u("ul",{className:S("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(Be,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),bm={AdTile:ut,ApplicationForm:bn,BenefitsBlock:kn,Bonus:Cn,BonusBenefitsBlock:Gn,ButtonsBlock:qn,Calculator:ti,CardTransfer:di,Carousel:Ai,CarouselBankHistoryCard:zi,CarouselCard:Di,CarouselCatalogCard:Oi,CarouselLinks:Ui,CarouselRecommendationCard:Xi,CarouselTariffsCard:Zi,ComparisonTable:sr,DepositFiltration:Vr,ErrorBlock:_r,ExchangeRateTile:rs,Footer:Cs,Header:Ds,Headline:V,HorizontalLayout:Ls,ImgBlock:$s,LinkDocs:Ws,MobileAppTile:Ys,MortgageFiltration:xo,OfficesAtmsMap:gc,Placeholder:fc,ProductBlock:lt,ProductGallery:Nc,RepresentativeOfficeInfo:wc,RichTextBlock:Cc,RollupItem:hs,SafeDepositRental:Kc,StepsBlock:Zc,StickyBottomMenu:Ld,Tabs:Wd,TariffsTable:hm,TextBlock:um,VerticalLayout:Os};const ym=["Header","Footer"],vm=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Nm(e=globalThis){const t=s(new Map);a((()=>k.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!ym.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?$n(vm)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const wm="cookie",km=x((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=$t();bd((()=>{globalThis.localStorage?.getItem(wm)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(wm,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[u("div",{className:"sm:flex-1",children:p(R,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(Wi,{isRemote:!0,className:Sm(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(Wi,{isRemote:!0,className:Sm(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(sd,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),Sm=e=>S("inline mx-2xs",e?"text-green-dark":""),Cm=x((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=rd({onCloseAll:e,onClose:t}),{close:n}=A(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return Ut(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:S("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Tm=x((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>v.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Gc(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return Ut(globalThis.document,"keydown",r),e?u("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Im=h();const Bm=x((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:Mm()}))),Mm=()=>p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[Rm("M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"),Rm("M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z")]}),Rm=e=>u("path",{stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",strokeMiterlimit:"10",d:e}),Pm=x((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Im.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Im.like(e))}),[e]),dislike:i((async()=>{l(await Im.dislike(e))}),[e])}}(F().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(Bm,{onClick:$(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(Bm,{onClick:$(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),Vm=x((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return Nm(),p("div",{"data-theme":s,children:[p("section",{className:S("@container relative",a,e),children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:ki(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[Si({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),ki(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Pm,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Ld,{}),u(Cm,{}),u(Tm,{}),u(km,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Vm.childrenTypes=[],Vm.slots=()=>["header","footer","StickyBottomMenu"];e.Blocks=bm,e.ContentPage=Vm,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=h,e.handlerDecorator=$,e.joinList=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),e.packageVersion="0.14.64",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=E,e.useRouter=F,Object.defineProperty(e,"__esModule",{value:!0})}));
|