@redneckz/wildless-cms-uni-blocks 0.2.86 → 0.2.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +512 -449
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/AccordionBlocks.d.ts +3 -0
- package/dist/components/Accordion/AccordionBlocks.js +6 -0
- package/dist/components/Accordion/AccordionBlocks.js.map +1 -1
- package/dist/components/Accordion/AccordionContent.d.ts +14 -6
- package/dist/components/BaseTile/BaseTile.js +14 -6
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/BaseTile/BaseTileProps.d.ts +10 -0
- package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +1 -1
- package/dist/components/BlockContent.d.ts +3 -1
- package/dist/components/Blocks.d.ts +17 -14
- package/dist/components/Blocks.js +23 -17
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Headline/Headline.d.ts +5 -0
- package/dist/components/Headline/Headline.js +9 -0
- package/dist/components/Headline/Headline.js.map +1 -0
- package/dist/components/Headline/HeadlineContent.d.ts +15 -0
- package/dist/components/Headline/HeadlineContent.js +2 -0
- package/dist/components/Headline/HeadlineContent.js.map +1 -0
- package/dist/components/LinkDocs/LinkDocs.d.ts +5 -0
- package/dist/components/LinkDocs/LinkDocs.js +42 -0
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -0
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +23 -0
- package/dist/components/LinkDocs/LinkDocsContent.js +2 -0
- package/dist/components/LinkDocs/LinkDocsContent.js.map +1 -0
- package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +1 -3
- package/dist/components/MobileBlocks.d.ts +8 -6
- package/dist/components/MobileBlocks.js +10 -6
- package/dist/components/MobileBlocks.js.map +1 -1
- package/dist/components/PictureText/PictureText.d.ts +5 -0
- package/dist/components/PictureText/PictureText.js +14 -0
- package/dist/components/PictureText/PictureText.js.map +1 -0
- package/dist/components/PictureText/PictureTextContent.d.ts +11 -0
- package/dist/components/PictureText/PictureTextContent.js +2 -0
- package/dist/components/PictureText/PictureTextContent.js.map +1 -0
- package/dist/components/ProductGallery/ProductGalleryContent.d.ts +2 -2
- package/dist/ui-kit/Button/ButtonProps.d.ts +2 -1
- package/dist/ui-kit/Icon/IconProps.d.ts +22 -18
- package/dist/ui-kit/Icon/IconProps.js +20 -18
- package/dist/ui-kit/Icon/IconProps.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.fixture.d.ts +1 -0
- package/lib/components/Accordion/AccordionBlocks.d.ts +3 -0
- package/lib/components/Accordion/AccordionBlocks.js +6 -0
- package/lib/components/Accordion/AccordionBlocks.js.map +1 -1
- package/lib/components/Accordion/AccordionContent.d.ts +14 -6
- package/lib/components/BaseTile/BaseTile.js +14 -6
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/BaseTile/BaseTileProps.d.ts +10 -0
- package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +1 -1
- package/lib/components/BlockContent.d.ts +3 -1
- package/lib/components/Blocks.d.ts +17 -14
- package/lib/components/Blocks.js +23 -17
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Headline/Headline.d.ts +5 -0
- package/lib/components/Headline/Headline.fixture.d.ts +7 -0
- package/lib/components/Headline/Headline.js +7 -0
- package/lib/components/Headline/Headline.js.map +1 -0
- package/lib/components/Headline/HeadlineContent.d.ts +15 -0
- package/lib/components/Headline/HeadlineContent.js +2 -0
- package/lib/components/Headline/HeadlineContent.js.map +1 -0
- package/lib/components/LinkDocs/LinkDocs.d.ts +5 -0
- package/lib/components/LinkDocs/LinkDocs.fixture.d.ts +12 -0
- package/lib/components/LinkDocs/LinkDocs.js +40 -0
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -0
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +23 -0
- package/lib/components/LinkDocs/LinkDocsContent.js +2 -0
- package/lib/components/LinkDocs/LinkDocsContent.js.map +1 -0
- package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +1 -3
- package/lib/components/MobileBlocks.d.ts +8 -6
- package/lib/components/MobileBlocks.js +10 -6
- package/lib/components/MobileBlocks.js.map +1 -1
- package/lib/components/PictureText/PictureText.d.ts +5 -0
- package/lib/components/PictureText/PictureText.fixture.d.ts +4 -0
- package/lib/components/PictureText/PictureText.js +12 -0
- package/lib/components/PictureText/PictureText.js.map +1 -0
- package/lib/components/PictureText/PictureTextContent.d.ts +11 -0
- package/lib/components/PictureText/PictureTextContent.js +2 -0
- package/lib/components/PictureText/PictureTextContent.js.map +1 -0
- package/lib/components/ProductGallery/ProductGalleryContent.d.ts +2 -2
- package/lib/ui-kit/Button/ButtonProps.d.ts +2 -1
- package/lib/ui-kit/Icon/IconProps.d.ts +22 -18
- package/lib/ui-kit/Icon/IconProps.js +20 -18
- package/lib/ui-kit/Icon/IconProps.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.fixture.tsx +104 -3
- package/src/components/Accordion/AccordionBlocks.tsx +6 -0
- package/src/components/Accordion/AccordionContent.ts +18 -6
- package/src/components/BaseTile/BaseTile.tsx +24 -15
- package/src/components/BaseTile/BaseTileProps.ts +11 -0
- package/src/components/BenefitsBlock/BenefitsBlockContent.ts +1 -1
- package/src/components/BlockContent.ts +15 -11
- package/src/components/Blocks.ts +23 -17
- package/src/components/ContentPage/ContentPage.page.json +88 -2
- package/src/components/Headline/Headline.example.json +6 -0
- package/src/components/Headline/Headline.fixture.tsx +42 -0
- package/src/components/Headline/Headline.tsx +15 -0
- package/src/components/Headline/HeadlineContent.ts +18 -0
- package/src/components/LinkDocs/LinkDocs.fixture.tsx +51 -0
- package/src/components/LinkDocs/LinkDocs.tsx +81 -0
- package/src/components/LinkDocs/LinkDocsContent.ts +26 -0
- package/src/components/MobileAppTile/MobileAppTileContent.ts +1 -3
- package/src/components/MobileBlocks.ts +10 -6
- package/src/components/PictureText/PictureText.example.json +20 -0
- package/src/components/PictureText/PictureText.fixture.tsx +36 -0
- package/src/components/PictureText/PictureText.tsx +45 -0
- package/src/components/PictureText/PictureTextContent.ts +13 -0
- package/src/components/ProductGallery/ProductGalleryContent.ts +2 -2
- package/src/icons/DiscountShape.svg +7 -0
- package/src/icons/DocIcon.svg +1 -1
- package/src/icons/DocumentText.svg +6 -0
- package/src/ui-kit/Button/ButtonProps.ts +2 -1
- package/src/ui-kit/Icon/IconProps.ts +4 -0
- package/src/icons/MinusIcon.svg +0 -1
- package/src/icons/PlusIcon.svg +0 -1
package/bundle/bundle.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";const t=(e,n)=>{t._jsx=e,t._jsxs=n||e};t.vue=e=>{t(((t,{children:n,dangerouslySetInnerHTML:r,...a}={})=>{const i=Object.assign({},a,r?{innerHTML:r.__html}:{});return e(t,i,"string"!=typeof t?()=>n:n)}))};const n=(...e)=>t._jsx(...e),r=(...e)=>t._jsxs(...e),a=e=>(e._tmpl||(e._tmpl=function(t,n){const{children:r,...a}=t||{},i=n?.slots?.default,l=r||i&&i();return e(Object.assign(a,l&&{children:l}),n)},e._tmpl.inheritAttrs=!1),e._tmpl);const i="likesToken";const l=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};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}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ENABLE_ASSIST(){return this._.ENABLE_ASSIST}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}},s=a((({className:e,name:t,alt:a=`Icon ${t}`,title:i=a,asSVG:s,...c})=>{const o=`${l.CDN||""}icons/${t}.svg`;return s?r("svg",{className:e,...c,"aria-hidden":"true",children:[i?n("title",{children:i}):null,a?n("desc",{children:a}):null,n("use",{href:`${o}#icon`,xlinkHref:`${o}#icon`})]}):n("img",{className:e,src:o,alt:a,title:i,...c,"aria-hidden":"true"})}));var c;!function(e){e.XL="text-title-lg",e.L="text-title",e.M="text-title-sm",e.S="text-title-xs"}(c||(c={}));const o=a((({size:e="L",className:t,children:r,...a})=>n("XL"===e?"h1":"h2",{className:m(c[e],t),...a,children:r}))),m=(...e)=>e.filter(Boolean).join(" "),d=a((({className:e,title:t,benefits:a})=>r("section",{className:`font-sans text-primary-text bg-white p-12 pb-2 flex flex-col items-center ${e||""}`,children:[t?n(o,{className:"font-medium m-0 max-w-[47rem] text-center",children:t}):null,a?.length?n("div",{className:"grid grid-cols-2 gap-5 mt-9",children:a.map(h)}):null]}))),h=(e,t)=>r("div",{className:"flex items-center p-10 gap-5 max-w-[580px]",children:[e.icon&&n(s,{className:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",name:e.icon,width:"70",height:"70"}),r("div",{children:[n("h3",{className:"font-medium text-xl m-0",children:e.label}),e.description&&n("div",{className:"font-normal text-sm mt-2",children:e.description})]})]},String(t)),x="/mobile",u=e=>e?.includes("//"),p=(e,t,n=((e,t)=>e===t))=>n(f(e),b(f(u(e)?t.href:t.pathname))),f=e=>(e||"").replace(/\/?\?.*/,""),b=e=>(e||"").replace(x,""),g=e=>{if(!u(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t},N=(e,t)=>{if(!e)return e;const n=v(e,t),r=t?.pathname.startsWith(x);return r&&!u(n)?`/mobile${n}`:n},v=(e,t)=>{if(!e)return e;const n=g(t?.href);return n?e.replace(n,"")||"/":e};var y=Object.freeze({__proto__:null,MOBILE_URL_PATH:x,isURL:u,isHrefActive:p,withoutQuery:f,withoutMobilePath:b,getOrigin:g,adjustHref:N,toRelativeHref:v});const w=(e,t)=>e;function k({router:e,handlerDecorator:t=w},n){const r=N(n.href,e);return{...n,href:r,ariaLabel:n.text,onClick:t((t=>{const a=r&&!u(r),i=!n.target||"_self"===n.target;a&&i&&(t.preventDefault(),e.push(r))}),n)}}const $={primary:"bg-primary-main",secondary:"bg-white"},S={primary:"text-primary-text",secondary:"text-white"},C=a((({className:e,text:t,children:a,version:i="primary"})=>r("div",{className:`inline-block flex ${e||""}`,role:"listitem",children:[n("div",{className:`inline-block w-[8px] h-[8px] min-w-[8px] min-h-[8px] rounded-full mt-2 ${$[i]}`}),n("span",{className:`text-base font-normal font-sans mx-3 ${S[i]}`,children:t||a})]}))),_={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active"},j={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text"},L="inline-block text-center font-sans select-none",D=a((({className:e,text:t,aboveText:r,appendLeft:a,href:i,target:l,onClick:s,children:c,disabled:o,rounded:m,version:d="none",ariaLabel:h,...x})=>{const u=c??n(R,{text:t,aboveText:r,appendLeft:a,rounded:m});return o?n("div",{role:"button","aria-disabled":"true","aria-label":h,tabIndex:"-1",className:`${L} ${j[d]||""} ${m?"rounded-full":"rounded-md"} ${e||""}`,children:u}):n("a",{className:`${L} cursor-pointer no-underline ${_[d]||""} ${m?"rounded-full":"rounded-md"} ${e||""}`,href:i,target:l,onClick:s,"aria-label":h,role:i?"link":"button",...x,children:u})})),R=a((({text:e,aboveText:t,appendLeft:a,rounded:i})=>{const l=!e&&!t&&Boolean(a);return r("div",{className:`flex items-center justify-center ${l?"h-12 w-12 min-h-12 min-w-12":"px-8 gap-2 "+(t?"py-2":"py-[13px]")} ${i?"rounded-full":""}`,children:[a||null,l?null:r("div",{children:[n("div",{className:"text-xxs text-left",children:t}),n("div",{className:"text-sm font-medium text-left",children:e})]})]})})),T=a((({className:e,image:t})=>r("picture",{className:`${e||""}`,children:[t.sources?.length?t.sources.map((({src:e,format:t},r)=>n("source",{srcSet:e,type:I(t)},`${r}_${e}`))):null,n("img",{src:t.src,alt:t.alt||t.title,title:t.title,...t?.size})]})));function I(e){return e?`image/${String(e)}`:void 0}const M=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12},A=a((({className:e,context:t,title:a,titleSize:i,description:l,children:c,buttons:m,image:d,items:h,version:x="primary"})=>{const u=t.useRouter(),{handlerDecorator:p}=t;return r("div",{className:"font-sans flex flex-col grow h-full",children:[a&&n(o,{size:i||P(e),className:"font-medium m-0 mb-4 whitespace-pre-wrap max-w-[600px]",children:a}),r("div",{className:"flex grow justify-between",children:[r("div",{className:"flex flex-col justify-between items-start",children:[r("div",{children:[l?n("div",{className:"font-normal text-base max-w-[600px] mb-5",children:l}):null,c,h?.length?B(h,x):null]}),m?.length?n("div",{className:"flex mt-9 gap-3",children:m.map(((e,t)=>function({icon:e,...t},r){if(!t?.text)return;return n(D,e?{appendLeft:n(s,{name:e,width:"24",height:"24"}),...t}:{...t},String(r))}(k({router:u,handlerDecorator:p},e),t)))}):null]}),d?.src&&n(T,{className:"mt-auto ml-7",image:d})]})]})}));function P(e=""){const t=M(e);return t<=4?"S":t<=8?"M":"L"}function B(e=[],t){return n("section",{className:"max-w-[600px]",role:"list",children:e.map(((e,r)=>n(C,{className:r?"mt-2.5":"",text:e,version:t},String(r))))})}const O={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},V=a((e=>{const{children:t,className:r,version:a="primary"}=e;return n("section",{className:`font-sans p-9 min-h-[320px] box-border ${r||""} ${O[a]} ${H(r)} `,children:n(A,{...e,children:t})})}));function H(e=""){const t=M(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Z="https://www.cbr-xml-daily.ru/daily_json.js",F=["USD","EUR"],z={USD:"DollarIcon",EUR:"EuroIcon"},E=[{text:"Все показатели",href:"https://cbr.ru/currency_base/daily/",version:"secondary"}],G=a((({className:e,context:t,title:a})=>{const{data:i}=t.useAsyncData(Z,J);return n(V,{className:e,context:t,title:a||"Курсы обмена валют",buttons:E,children:r("table",{children:[n("thead",{children:r("tr",{children:[n(U,{children:"Валюта"}),n(U,{className:"pl-11",children:"Курс"})]})}),n("tbody",{children:F.map((e=>{const t=(i?.Valute||{})[e]?.Value;return r("tr",{children:[n(W,{className:"pt-4",children:r("div",{className:"flex items-center",children:[n(s,{name:z[e],width:"24",height:"24"}),n("span",{className:"ml-2",children:e})]})}),n(W,{className:"pt-4 pl-11",children:Q(t)})]},e)}))})]})})})),U=a((({className:e="",children:t})=>n("th",{className:`text-left font-normal text-sm text-secondary-text ${e}`,children:t}))),W=a((({className:e="",children:t})=>n("td",{className:`text-left font-normal text-base text-primary-text ${e}`,children:t})));async function J(){const e=await fetch(Z);return await e.json()}const X=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),Q=e=>e?X.format(e):"",q=a((({className:e,viewBox:t,fill:r="none",width:a,height:i,paths:l,...s})=>n("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:r,width:a,height:i,children:l.map((({d:e,fill:t,...r},a)=>n("path",{d:e,fill:t||"currentColor",...s,...r},a)))}))),K=["m13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z","M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z","M33.93 35.53c.3-.41.6-.85.87-1.3v-2.66h-.87v3.96Zm2.54-4.92c.12-.4.24-.78.34-1.16h-2.88v.7h.43c.77-.02 1.63-.03 2.11.46Zm-19.19-1.27h-.78v7.91h.78v-7.9Z","M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z","M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z"],Y=a((({className:e,href:t,children:a,targetBlank:i})=>r("a",{className:`inline-flex items-center font-sans no-underline ${e||""}`,href:t||"https://rshb.ru/",target:i?"_blank":"_self",children:[n(q,{className:"text-primary-main w-10",viewBox:"0 0 40 45",paths:K.map((e=>({d:e})))}),n("span",{className:"text-black text-base font-medium ml-2.5",children:a||"Россельхозбанк"})]}))),ee=a((({className:e,context:t})=>{const{term:a,setTerm:i}=t.useSearch();return r("form",{className:`relative ${e||""}`,children:[r("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[n("div",{className:"w-[24px] h-[24px]",children:n(s,{name:"LoupeIcon",width:"24",height:"24"})}),!a&&n("span",{className:"font-sans font-normal text-base text-secondary-text",children:"Поиск по сайту"})]}),n("input",{className:"pl-12 w-full font-sans font-normal text-base text-black border border-solid border-main-divider rounded h-full box-border outline-none pr-[6%]",value:a,onChange:e=>i(e.target.value),type:"text",name:"s"}),a&&n("button",{type:"submit",className:"absolute font-sans font-normal text-sm cursor-pointer bg-transparent hover:bg-primary-hover active:bg-primary-active text-primary-main hover:text-white border-none px-5 py-2 rounded top-1 right-1 outline-none",onClick:e=>{e.preventDefault(),console.log("click")},children:"Найти"})]})})),te=a((({className:e,items:t,hasButton:a,context:i})=>{const l=i.useRouter(),{handlerDecorator:s}=i;return r("div",{className:`flex flex-col ${e||""}`,children:[t?.length?t.map(ne):null,a?n(D,{version:"primary",className:"my-4",...k({router:l,handlerDecorator:s},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),ne=(e,t)=>{const{type:a,text:i,description:l}=e;return r("div",{className:"mb-4",children:[n("div",{children:re(a,i)}),n("div",{className:"font-sans text-sm text-secondary-text",children:l})]},String(t))},re=(e,t="")=>{switch(e){case"tel":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`tel:${ae(t)}`,children:t});case"email":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return n("span",{children:t})}},ae=e=>e.replaceAll(/(\-|\s|\(|\)|\D+)/g,""),ie=a((({className:e,links:t,context:r})=>{const a=r.useRouter(),{handlerDecorator:i}=r;return n("div",{className:`${e||""}`,children:t?.length?n("div",{className:"flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider",children:t.map(((e,t)=>n(le,{index:t,...k({router:a,handlerDecorator:i},e)},String(t))))}):null})})),le=a((({className:e,index:t,text:r,href:a,target:i,onClick:l})=>n("a",{className:`font-sans font-normal text-sm text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:a,target:i,onClick:l,children:r||`Документ ${t}`})));function se(e){const{data:t}=e(oe(),ce);return t||{}}async function ce(){const e=await fetch(oe());return await e.json()}function oe(){return`/wcms-resources/${l.SITEMAP||"sitemap"}.json`}const me=e=>t=>e?.href===t?.href;function de(e,t){return(r=e,a=t,(r||[]).map((e=>a?.find(me(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(me(e))))));var n,r,a}const he=a((({className:e,items:t,context:r})=>{const a=de(se(r.useAsyncData).topItems,t),i={router:r.useRouter(),handlerDecorator:r.handlerDecorator};return n("div",{className:`flex items-start justify-start gap-11 xl:gap-5 ${e||""}`,children:a?.map(((e,t)=>xe(e,t,i)))})})),xe=(e,t,{router:a,handlerDecorator:i})=>{const{text:l,href:s,items:c,target:o}=e;return r("div",{className:"flex flex-col w-[235px] gap-[14px]",children:[n("a",{className:"block font-sans font-medium text-base text-primary-text no-underline",href:s,target:o||"_self",children:l||`Раздел ${t}`}),c?.map(((e,t)=>n(ue,{...k({router:a,handlerDecorator:i},e)},String(t))))]},String(t))},ue=a((({text:e,href:t,target:r,index:a})=>n("a",{className:"block font-sans font-normal text-base text-secondary-text hover:text-primary-main no-underline",href:t,target:r||"_self",children:e||`Раздел ${a}`}))),pe=[{origins:["t.me","telegram.org"],icon:"TelegramIcon",label:"Телеграм",width:"20px",height:"16px"},{origins:["vk.com"],icon:"VKIcon",label:"ВКонтакте",width:"24px",height:"12px"},{origins:["ok.ru"],icon:"OkIcon",label:"Одноклассники",width:"12px",height:"20px"}],fe=a((({className:e,media:t,context:r})=>{const a=r.useRouter(),{handlerDecorator:i}=r;return n("div",{className:`flex items-end justify-end gap-2 pt-[30px] pb-7 ${e||""}`,children:t?.map(((e,t)=>n(be,{...k({router:a,handlerDecorator:i},e)},String(t))))})})),be=a((({href:e})=>{const{icon:t,label:r,width:a,height:i}=pe.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};return t?n(D,{rounded:!0,href:e,target:"_blank",rel:"noopener noreferrer","aria-label":r,className:"border-solid border border-main-divider w-9 h-9 flex items-center justify-center hover:fill-primary-main",appendLeft:n(s,{name:t,width:a,height:i,asSVG:!0})}):null})),ge=a((({className:e,links:t,context:a})=>{const i=a.useRouter(),{handlerDecorator:l}=a;return r("div",{className:`${e||""}`,children:[n("div",{className:"pt-5 pb-[5px]",children:n("span",{className:"font-sans font-normal text-xs text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?n("div",{className:"flex justify-start items-start gap-5 pt-[5px]",children:t.map(((e,t)=>n(Ne,{index:t,...k({router:i,handlerDecorator:l},e)},String(t))))}):null]})})),Ne=a((({className:e,index:t,text:r,href:a,target:i,onClick:l})=>n("a",{className:`font-sans font-normal text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:a,target:i,onClick:l,children:r||`Документ ${t}`}))),ve=a((({className:e,documents:t,relatedEnterprises:a,contacts:i,socialMedia:l,topItems:s,context:c})=>r("footer",{className:`${e} px-9 py-10 bg-white`,children:[r("div",{className:"flex items-stretch gap-32 pb-8 xl:gap-8",children:[n(Y,{className:"w-[280px] xl:w-[220px]"}),n(ee,{context:c,className:"grow"})]}),r("div",{className:"flex items-stretch gap-32 xl:gap-8",children:[n(te,{className:"w-[280px] shrink-0 overflow-hidden xl:w-[220px]",items:i,context:c,hasButton:!0}),n(he,{className:"pt-[3px]",context:c,items:s})]}),n(fe,{media:l,context:c}),n(ie,{links:a,context:c}),n(ge,{links:t,context:c})]}))),ye=[{d:"m9 12 4-4-4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",fill:"none"},{d:"M2 9a1 1 0 0 1 0-2v2Zm6-2a1 1 0 0 1 0 2V7ZM2 7h6v2H2V7Z"}],we=a((({className:e,disabled:t,...r})=>n(D,{rounded:!0,className:`shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...r,children:n(q,{paths:ye,viewBox:"0 0 16 16",fill:"none",width:"16",height:"16"})}))),ke={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},$e={normal:380,mini:276},Se={normal:3,mini:4},Ce=a((({title:e,description:t,context:a,cards:i=[],className:l,version:s="normal"})=>{const[c,m]=a.useState(0);const d=i?.length>Se[s],h=d&&i?.length-c>Se[s],x=d&&c>0;return r("section",{className:`relative font-sans text-primary-text bg-white p-12 overflow-hidden ${l}`,children:[r("div",{className:"flex flex-col items-center mb-8",children:[e?n(o,{className:"font-medium m-0 text-center",children:e}):null,t?n("div",{className:"font-normal text-base max-w-[600px] mt-3",children:t}):null]}),n("div",{className:`flex ${i?.length<=Se[s]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${c*$e[s]}px)`},role:"list",children:i?.map(((e,t)=>function(e,t,a){return r("div",{className:`box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between items-stretch ${ke[a]} w-full`,role:"listitem",children:[r("div",{children:[e.image?.src?n("div",{className:"flex justify-center",children:n(T,{className:"mb-6",image:e.image})}):null,e.title?n("h4",{className:"font-medium text-xl m-0 "+(e.description||e.items?.length?"":"text-center"),children:e.title}):null,e.description?n("div",{className:"font-normal text-sm text-secondary-text mt-2",children:e.description}):null,e.items?.length?n("section",{className:"max-w-[308px] mt-2",role:"list",children:e.items.map(_e)}):null]}),e.href?n(D,{className:"mt-6",text:"Подробнее",version:"secondary",href:e.href}):null]},String(t))}(e,t,s)))}),x&&n(we,{className:"absolute top-1/2 left-8 rotate-180",onClick:function(){m(c-1)},ariaLabel:"Пролистать влево"}),h&&n(we,{className:"absolute top-1/2 right-1 z-10",onClick:function(){m(c+1)},ariaLabel:"Пролистать вправо"}),n("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"})]})}));function _e(e,t){return n(C,{children:n("span",{className:"text-sm text-secondary-text",children:e})},String(t))}const je=a((e=>n(Ce,{...e,version:"normal"}))),Le=a((({className:e,text:t,href:a,target:i,active:l,onClick:s,children:c})=>r("a",{className:`relative inline-block bg-transparent text-center no-underline ${e||""}`,href:a,target:i,onClick:s,children:[n("span",{className:`font-sans font-normal text-base ${l?"text-primary-main":"text-primary-text hover:text-primary-main"}`,children:t||c}),l?n("div",{className:"absolute left-0 -bottom-2 w-full h-[2px] bg-primary-main"}):null]}))),De=a((({className:e,text:t,href:r,target:a,active:i,flat:l,onClick:s,children:c,ariaLabel:o})=>n("a",{className:`inline-block border border-solid bg-transparent text-center no-underline ${l?"":"px-4 py-2"} ${i?"border-primary-main rounded-md":"border-transparent"} ${e||""}`,href:r,target:a,onClick:s,rel:"noopener noreferrer","aria-label":o,children:n("span",{className:`font-sans font-normal text-sm ${i?"text-primary-main":(l?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"}`,children:t||c})}))),Re=a((({className:e,children:t,ariaLabel:r})=>n("button",{type:"button",className:`border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${e||""}`,disabled:!0,"aria-label":r,children:t}))),Te=a((({context:e,className:t,defaultLocation:a=""})=>{const[i,l]=e.useGeolocation(a);return r("div",{className:`flex items-center ${t||""}`,children:[n(De,{className:"mr-5",flat:!0,href:"#",text:i,ariaLabel:"Местоположение",onClick:l}),n(De,{className:"mr-7",flat:!0,href:"#",text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов"}),n(Re,{className:"mr-5 text-primary-text hover:text-primary-main",ariaLabel:"Поиск по сайту",children:n(s,{name:"LoupeIcon","aria-hidden":"true",className:"h-full",asSVG:!0})}),n(Re,{className:"mr-5 text-primary-text hover:text-primary-main",ariaLabel:"Профиль",children:n(s,{name:"ProfileIcon","aria-hidden":"true",className:"h-full",asSVG:!0})}),n(Re,{className:"min-w-[32px] min-h-[32px] fill-secondary-light hover:fill-secondary-hover",ariaLabel:"Дополнительные ссылки",children:n(s,{name:"GridIcon","aria-hidden":"true",className:"h-full",asSVG:!0})})]})}));const Ie=a((({className:e,defaultLocation:t,context:a,topItems:i})=>{const l=a.useRouter(),s=se(a.useAsyncData),{handlerDecorator:c}=a,o=de(s.topItems,i),m=o.find(function(e){return t=>p(t.href,e,((e,t)=>t.startsWith(e)))}(l)),d=m?.items,h=d?.find(function(e){return t=>p(t.href,e)}(l)),x=o.map(((e,t)=>n(De,{active:e===m,...k({router:l,handlerDecorator:c},e),ariaLabel:e.text},String(t)))),u=d?.map((e=>n(Le,{className:"mr-8",active:e===h,...k({router:l,handlerDecorator:c},e)},e.href)));return r("header",{className:`pt-5 pb-8 px-20 bg-white ${e||""}`,children:[r("div",{className:"flex items-center",children:[n(Y,{className:"mr-8"}),x,n(Te,{context:a,className:"ml-auto",defaultLocation:t})]}),n("div",{className:"mt-5 h-[1px] bg-main-divider"}),n("nav",{className:"mt-5",children:u})]})})),Me=a((e=>n(Ce,{...e,version:"mini"}))),Ae=a((({className:e,context:t,title:a="Мобильное приложение",qr:i,buttons:l=[]})=>n(V,{className:e,context:t,title:a,buttons:l,children:r("div",{className:"flex items-center",children:[i?.src&&i?.href&&n("a",{href:i.href,target:"_blank",children:n("img",{src:i.src,alt:a,title:a,width:"164",height:"164",className:"w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light"})}),n("span",{className:"font-normal text-sm text-secondary-text ml-4",children:"Наведите камеру телефона на QR-код и скачайте приложение"})]})}))),Pe=a((({className:e,context:t,title:r})=>n(V,{className:e,context:t,title:r,description:"Блок в разработке...",children:n("figure",{className:"m-0 min-w-[600px]",children:Be()})}))),Be=(e=3)=>Ve(100,e).map((e=>Math.floor(e))).map(Oe),Oe=(e=100,t)=>n("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Ve=(e,t)=>[e].concat(t>0?Ve(e/1.618,t-1):[]),He=a((({className:e,context:t,title:a,titleSize:i,description:l,benefits:s,buttons:c,image:m,items:d})=>r("div",{className:`flex grow justify-between items-stretch ${e||""}`,children:[r("div",{className:"flex flex-col",children:[a&&n(o,{size:i||"XL",className:"font-medium m-0 mb-4 whitespace-pre-wrap max-w-[600px] text-primary-text",children:a}),n(A,{context:t,description:l,items:d,buttons:c,children:s?.length?n("div",{className:"flex gap-6 mt-6 mb-3.5",children:s.map(Ze)}):null})]}),m?.src&&n(T,{className:"mt-auto",image:m})]})));function Ze(e,t){return r("div",{className:"flex gap-4 items-center",children:[e.icon&&n(s,{className:"w-[50px] h-[50px] min-w-[50px] min-h-[50px] bg-main rounded-full p-[10px] box-border",name:e.icon,width:"24",height:"24"}),r("div",{className:"flex gap-1 flex-col h-full",children:[n("h4",{className:"font-medium text-primary-text text-xl m-0",children:e.label}),e.description&&n("div",{className:"font-normal text-sm text-secondary-text",children:e.description})]})]},String(t))}const Fe=a((({text:e,href:t,target:r,onClick:a,className:i,children:l})=>t?n("a",{className:`no-underline ${i||""}`,href:t,target:r,onClick:a,children:n("span",{className:`${i||""}`,children:e||l})}):n("span",{className:`${i||""}`,children:e||l})));function ze(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])}const Ee=a((e=>{const{context:t,className:a,breadcrumbs:i}=e,l=t.useRouter(),{handlerDecorator:s}=t;return r("section",{className:`font-sans bg-white pt-10 pl-[50px] pb-[50px] pr-[7.5rem] ${a||""}`,children:[i?.length?n("div",{className:"text-xs mb-6",children:ze(n("span",{className:"text-secondary-text mx-2",children:"/"}))(i.map(((e,t)=>n(Fe,{...k({router:l,handlerDecorator:s},{className:"text-secondary-text",...e})},String(t)))))}):null,n(He,{...e})]})})),Ge=a((({className:e,context:t,duration:a=0,slides:i=[]})=>{const l=i.map((e=>e.nav)),s=i.map((e=>e.productBlock)),[c,o]=t.useState(0);return r("section",{className:`font-sans bg-white overflow-hidden w-100 ${e||""}`,children:[n("div",{className:"flex duration-1000",style:{transform:`translateX(-${c}00%)`},role:"list",children:s.map(((e,r)=>function(e,t,r){return n("section",{className:"flex grow-0 shrink-0 basis-full",role:"listitem",children:n("div",{className:"p-10 flex grow",children:n(He,{className:"pl-2.5 pt-2.5 pb-1.5 pr-[6.25rem]",context:r,...e})})},String(t))}(e,r,t)))}),n("div",{className:"border-t border-solid border-main-divider flex",children:l.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:a,onClick:i,duration:l}){const s=t===a,c=s?"animate-slide":"";return r("button",{type:"button",onClick:i,className:"group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 py-4 grow basis-0",children:[r("div",{className:"border-0 border-r border-solid border-main-divider px-6",children:[n("div",{className:"text-sm font-medium group-hover:text-primary-text "+(s?"text-primary-text":"text-secondary-text"),children:e?.title}),n("div",{className:"text-xs text-secondary-text",children:e.desc})]}),n("div",{className:`absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${c}`,style:{animationDuration:`${l}s`}})]},String(t))}({slide:e,i:t,activeSlideIndex:c,onClick:()=>o(t),duration:a})))})]})}));const Ue=a((e=>{const{benefits:t,version:a}=e;return n(V,{...e,children:r("div",{className:"flex mt-5 mb-1",children:[t?.length?n("div",{className:"mr-8",children:t.map(We)}):null,t?.length?n("div",{className:"pt-1",children:t.map(((e,t)=>function(e,t,r="primary"){return n("div",{className:`text-sm ${t?"mt-4":""} ${{primary:"text-secondary-text",secondary:"text-white"}[r]}`,children:e.label},String(t))}(e,t,a)))}):null]})})}));function We(e,t){return n("div",{className:"text-xl font-medium "+(t?"mt-2.5":""),children:e.description},String(t))}const Je=a((({className:e,context:t,title:a="Акции и спецпредложения",date:i,description:l,buttons:s=[],version:c})=>n(V,{className:e,context:t,title:a,buttons:s,version:c,children:r("div",{children:[i&&n("div",{className:"text-sm mb-2",children:Xe(i)}),n("div",{className:"text-base",children:l})]})})));function Xe(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const Qe=a((({className:e,title:t,steps:a})=>r("section",{className:`font-sans text-primary-text bg-white px-12 py-12 flex flex-col items-center ${e||""}`,children:[n(o,{className:"font-medium m-0 max-w-[47rem] text-center",children:t}),a?.length?r("div",{children:[n("div",{className:"flex mt-9 items-center px-[88px]",children:ze(n("div",{className:"h-0.5 w-full bg-secondary-light"}))(a.map(((e,t)=>qe(e,t))))}),n("div",{className:"flex mt-9 justify-between gap-x-24",children:a.map(Ke)})]}):null]}))),qe=(e,t)=>n("div",{className:"flex flex-col items-center text-center relative",children:n("div",{className:"h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10",children:e.icon&&n(s,{name:e.icon,width:"48",height:"48"})||n("span",{className:"font-medium text-title-sm text-secondary-text",children:t+1})})},String(t)),Ke=(e,t)=>n("div",{className:"flex flex-col items-center text-center relative w-[276px]",children:r("div",{className:"max-w-min",children:[n("h5",{className:"font-medium text-xl m-0 mt-4 whitespace-nowrap px-3",children:e.label}),e.description&&n("div",{className:"font-normal text-sm text-secondary-text mt-2",children:e.description})]})},String(t)),Ye={primary:{background:"bg-white",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"},secondary:{background:"bg-primary-main",icon:"bg-white text-primary-main",title:"text-white",description:"text-white"},"secondary-light":{background:"bg-primary-main/10",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"}},et=a((({title:e,description:t,blockVersion:a="primary",iconVersion:i,image:l,className:s})=>{const c=Ye[a];return r("section",{className:`font-sans px-9 py-4 flex ${c.background} ${s||""}`,children:[i&&"small"===i?tt(c.icon):null,i&&"big"===i?nt(l):null,r("div",{className:"py-0.5",children:[e&&n("div",{className:`font-medium text-base mb-1 ${c.title}`,children:e}),t&&n("div",{className:`text-sm ${c.description}`,children:t})]})]})}));function tt(e){return n("div",{className:"pt-1.5 pr-4",children:n("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function nt(e){return e?.src?n(T,{className:"pt-0.5 pr-3",image:e}):null}const rt=a((({children:e})=>n("div",{className:"self-start flex flex-col",role:"row",children:n("div",{className:"flex",children:e})}))),at="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",it="border-main-stroke border-solid border",lt="border-main-divider border border-t-0 border-x-0",st="w-[200px] mr-6",ct=a((({children:e,activeCardIndex:t})=>n("div",{className:"flex flex-1 overflow-hidden",children:n("div",{className:"flex gap-4 duration-1000",style:{transform:`translateX(-${336*t}px)`},children:e})}))),ot=a((({icon:e,image:t,title:a,link:i})=>r("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-12 ${it} ${at}`,role:"columnheader",scope:"col",children:[e&&!t?.src&&n(s,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",name:e,width:"63",height:"63"}),t?.src&&n(T,{className:"mb-4",image:t}),a&&n(o,{size:"S",className:"font-medium m-0 text-center text-white",children:a}),i?.text&&n("div",{className:"mt-auto w-full",children:n(D,{href:i.href,target:i.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:n("div",{className:"text-xs py-[11px]",children:i.text})})})]}))),mt=a((({cell:e,isFirstRow:t,isLastRow:r,isFillGradient:a})=>n("div",{className:`w-80 box-border flex flex-col ${it} ${r?"border-t-0 rounded-b-md":"border-y-0"} ${a?at:""}`,role:"cell",children:n("div",{className:`mx-7 h-full ${lt} ${a&&t?"border-t":""} ${r?"":"border-solid"}`,children:e.map(((e,t)=>dt(e,t,a)))})}))),dt=({label:e,description:t},a,i)=>r("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e&&n("h5",{className:"text-xl font-medium m-0 "+(i?"text-white":""),children:e}),t&&n("div",{className:"text-sm opacity-80 "+(i?"text-white":"text-secondary-text"),children:t})]},String(a)),ht=a((({row:{header:e,data:t},activeCardIndex:a,isColoredFirstColumn:i,isFirstRow:l,isLastRow:s})=>r(rt,{children:[e?.title?n("div",{className:`text-sm py-7 ${lt} w-[200px] mr-6 ${s?"":"border-solid"}`,children:e.title}):null,t?.length?n(ct,{activeCardIndex:a,children:t.map(((e,t)=>n(mt,{cell:e,isFirstRow:l,isLastRow:s,isFillGradient:i&&0===t},String(t))))}):null]}))),xt=a((({className:e,context:t,title:a,rowHeaders:i,columns:l,visibleRowLength:s=0,isColoredFirstColumn:c=!1})=>{const m=t.useRouter(),{handlerDecorator:d}=t,[h,x]=t.useState(0),[u,p]=t.useState(!s),f=l?.map((({header:e})=>e||{})),b=l?.map((({data:e})=>e))||[],g=i?.map(((e,t)=>({header:e,data:b.map((e=>e?.[t]||[{}]))}))).slice(0,u?i.length:s),N=b?.length&&b.length>2,v=N&&b?.length-h>2,y=N&&h>0;return r("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,children:[n(o,{className:"font-medium m-0 max-w-[47rem] text-center mb-9 mx-auto",children:a}),r("div",{role:"table",children:[f?.length?r(rt,{children:[n("div",{className:st,role:"columnheader",scope:"col"}),n(ct,{activeCardIndex:h,children:f.map(((e,t)=>n(ot,{...e,link:e.link&&k({router:m,handlerDecorator:d},e.link)},String(t))))})]}):null,g?.length?r("div",{className:"relative",children:[g.map(((e,t,{length:r})=>n(ht,{row:e,isFirstRow:0===t,isLastRow:t+1===r,activeCardIndex:h,isColoredFirstColumn:c},String(t)))),N?n("div",{children:r("div",{className:"absolute top-7 right-7 z-10",children:[n(we,{onClick:()=>x(h+1),disabled:!v,ariaLabel:"Пролистать вправо"}),n(we,{className:"mt-4 rotate-180",onClick:()=>x(h-1),disabled:!y,ariaLabel:"Пролистать влево"})]})}):null]}):null]}),N?n("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null,s?n("div",{className:"pr-[50px]",children:r("div",{className:"flex w-full",children:[n("div",{className:st}),n("button",{onClick:()=>p(!u),className:"mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:n("div",{className:"font-sans font-medium text-xs py-[11px]",children:u?"Скрыть":"Показать все параметры"})})]})}):null]})})),ut={TextBlock:et},pt=a((({label:e,blocks:t,context:a})=>{const[i,l]=a.useState(!1),c=t?.length,o=i?"MinusIcon":"PlusIcon";return r("li",{className:"border-0 border-b border-solid border-main-divider last:border-b-0",children:[r("button",{className:"border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans text-primary-text\n "+(c?"group cursor-pointer":""),onClick:e=>{if(!c)return null;l(!i);const t=bt(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`},children:[n("span",{className:"m-0 text-xl pr-2.5 font-medium "+(c?"group-hover:text-primary-main":""),children:e}),c?n(s,{name:o,width:"24",height:"24"}):null]}),c?n("div",{className:(i?"pb-5":"")+" text-sm transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0 ",children:t?.length?t.map(((e,t)=>ft(e,t,a))):null}):null]})})),ft=(e,t,r)=>{if(!e.type||!e.data||!ut.hasOwnProperty(e.type))return null;const a=ut[e.type];return n("div",{className:"mb-5 last:mb-0",children:n(a,{context:r,...e.data})},`block_${t}`)},bt=e=>"BUTTON"===e.target.tagName?e.target.nextSibling:e.target.parentNode.nextSibling,gt=a((({title:e,accordionItems:t,context:a,className:i})=>r("section",{className:`p-[50px] font-sans bg-white text-primary-text ${i||""}`,children:[e?n(o,{className:"m-0 mb-2.5",children:e}):null,t?.length?n("ul",{className:"list-none m-0 p-0",children:t.map(((e,t)=>n(pt,{...e,context:a},`AccordionItem${t}`)))}):null]})));function Nt(e,t){const{data:n}=e(vt(t),(()=>async function(e){const t=await fetch(vt(e));return await t.json()}(t)));return n||{}}function vt(e){return`/wcms-resources/${e||"credit-calculator-data"}.json`}const yt=[{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"}],wt=a((({text:e,checked:t,onChange:a,className:i})=>n("div",{className:i,children:r("label",{className:"flex items-center cursor-pointer relative",children:[n("input",{className:"peer appearance-none w-5 h-5 border-solid border rounded border-black checked:bg-primary-main checked:border-primary-main",type:"checkbox",onChange:e=>{a(e.target.checked)},checked:t}),n(q,{paths:yt,className:"hidden absolute left-2 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),e?n("span",{className:"font-sans ml-2 text-sm cursor-pointer",children:e}):null]})}))),kt=e=>new Intl.NumberFormat("ru-RU",{maximumSignificantDigits:3}).format(e),$t=a((({className:e,title:t,items:a=[],min:i=1,max:l=100,step:s=1,value:c=i,onChange:o})=>{const m=e=>{if(!o)return;const t=Number(e.replace(/\D/g,""));o(t)},d={backgroundSize:`${(100*(c-i)/(l-i)).toFixed(2)}% 100%`};return r("div",{className:e,children:[r("div",{className:"relative",children:[t?n("span",{className:"absolute text-xs text-secondary-text top-1 mt-0.5 pl-4 ml-0.5",children:t}):null,n("input",{className:"m-0 font-sans text-sm w-full h-12 border-2 border-solid border-main-divider rounded-md outline-none p-0 pl-4 m-0 box-border text-primary-text "+(t?"pt-4":""),value:kt(c),onChange:e=>m(e.target.value),onBlur:()=>{o&&(c<i&&o(i),c>l&&o(l))}}),n("div",{className:"absolute inset-x-0 mt-0.5 top-8 px-4",children:n("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:i,max:l,step:s,value:c,onChange:e=>m(e.target.value),style:d})})]}),n("div",{className:"flex justify-between mt-3 mb-4",children:a.map(((e,t)=>n("span",{className:"text-xs text-secondary-text pl-4",children:e},String(t))))})]})})),St=(e,t,n)=>Math.max(t,Math.min(e,n)),Ct=3e4,_t=3e6,jt=Math.round(41.5),Lt=a((({context:e,className:t,directoryName:a})=>{const[i,l]=e.useState(void 0),[s,c]=e.useState(void 0),[o,m]=e.useState(!0),[d,h]=e.useState(!0),x=(e=>{const{tableRows:t,isAnnuity:n=!1}=e;return t&&t.find((e=>e.isAnnuity===n))||{}})({tableRows:Nt(e.useAsyncData,a).rows,isAnnuity:o}),u=x.maxSum&&x.minSum?(x.maxSum-x.minSum)/2:1485e3,p=x.maxMonths&&x.minMonths?Math.round((x.maxMonths-x.minMonths)/2):jt,f=x?.minSum||Ct,b=x?.maxSum||_t,g=x?.minMonths||1,N=x?.maxMonths||84,v=(e=>{const{calculatorParams:t,isInsurance:n}=e;return t?n?t?.rateWithInsurance||5:t?.rateWithoutInsurance||5:5})({calculatorParams:x,isInsurance:d}),y=(e=>{const{calculatorParams:t,paymentType:n,rate:r,sum:a,months:i}=e;if(!t)return 0;const l=St(a,t.minSum||Ct,t.maxSum||_t);if("annuity"===n){const e=Number(r)/1200;return l*(e+e/(Math.pow(1+e,i)-1))}return l/i+l*(Number(r)/12)})({calculatorParams:x,paymentType:"annuity",rate:v,sum:i||u,months:s||p}),w=((e,t)=>{const n=Math.ceil((t-e)/12),r=Math.floor(e/12)+1,a=new Array(Math.min(n-1,5)).fill(0).map(((e,t)=>r+t)),i=n+r-1;return a.concat(i)})(g,N);function k(e){c(St(12*e,g,N))}return n("section",{className:`font-sans text-primary-text bg-white p-4 ${t}`,children:r("div",{className:"box-border p-12 flex flex-col justify-between border-solid border-3 border-primary-main rounded-md",children:[r("div",{className:"flex justify-between",children:[r("div",{className:"grow mr-11",children:[n($t,{title:"Желаемая сумма кредита, ₽",items:[`От ${kt(f)} рублей`,`До ${kt(b)} рублей`],min:f,max:b,step:1e3,value:i||u,onChange:l}),n($t,{title:"Срок кредита, месяцев",items:["Или выберите из предложенных вариантов ниже"],min:g,max:N,step:1,value:s||p,onChange:c}),n("div",{className:"flex mb-7",children:w.map(((e,t)=>function(e,t,a){return n("button",{className:"bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none",onClick:()=>a(e),children:r("span",{className:"font-semibold text-sm",children:[e," ",1===e?"год":e>4?"лет":"года"]})},String(t))}(e,t,k)))}),n(wt,{text:"Получаю пенсию на карту Россельхозбанка",checked:o,onChange:m}),n(wt,{className:"mb-4",text:"Комплексная страховая защита",checked:d,onChange:h})]}),r("div",{className:"p-9 bg-primary-main rounded-md text-white",children:[n("div",{className:"text-base mb-5",children:"Наше предложение"}),n("div",{className:"text-sm opacity-60",children:"Ежемесячный платёж"}),r("div",{className:"text-lg mb-3",children:[kt(Math.round(y))," ₽"]}),n("div",{className:"text-sm opacity-60",children:"Ставка"}),r("div",{className:"text-lg",children:[v," %"]})]})]}),r("div",{className:"flex items-center",children:[n(D,{className:"mr-3",text:"Отправить заявку",version:"primary",href:"#"}),n("div",{className:"w-80 text-xxs leading-4 text-secondary-text","aria-label":"Соглашение на обработку персональных данных",children:"Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно требованиям ФЗ «О персональных данных»"})]})]})})}));const Dt={Header:Ie,Footer:ve,Placeholder:Pe,Tile:V,PromoTile:Je,TextBlock:et,ProductTile:Ue,ProductBlock:Ee,StepsBlock:Qe,BenefitsBlock:d,ProductGallery:Ge,ExchangeRateTile:G,MobileAppTile:Ae,Gallery:je,MiniGallery:Me,ComparisonTable:xt,Accordion:gt,CreditCalculator:Lt},Rt=a((({className:e,onClick:t,ariaLabel:r})=>n("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":r,children:Tt()}))),Tt=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[n("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),n("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},It=a((({className:e,context:t})=>{const a=t.useLikeService();return r("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,children:[n(Rt,{onClick:a.like,ariaLabel:"Поставить отметку «лайк»"}),n(Rt,{onClick:a.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),n("span",{className:"select-none",children:a.likeCount})]})})),Mt=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),At=a((({className:e,context:t,blocksRegistry:a,data:{style:i,blocks:l,likeControl:s,colorPalette:c="pc"},blockDecorator:o=Mt})=>r("section",{className:"relative","data-theme":c,children:[n("div",{className:`grid grid-cols-12 gap-1 ${Pt(i)} ${e||""}`,children:l?.length?l.map((function e(r,i){const{type:l}=r;l in a||console.warn(`No block with "${l}" is registered`);const s=a[l]||Pe;return o({blockClassName:Pt(r.style),block:r,render:r=>{const{version:a,content:c,blocks:o}=r.block;return n(s,{className:r.blockClassName,version:a,context:t,...c,children:o?.length?o.map(e):null},`${l}-${i}`)}},`block-${i}`)})):null}),s&&n("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:n(It,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t})})]})));function Pt(e){return e?e.join(" "):""}const Bt=a((({HeadComponent:e,data:t,children:a})=>{const{title:i,description:l,keywords:s,robots:c,og:o}=t;return r(e,{children:[n("title",{children:i}),n("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),l&&n("meta",{name:"description",content:l}),s&&n("meta",{name:"keywords",content:s.join(",")}),c&&n("meta",{name:"robots",content:c.join(",")}),o?Object.entries(o).map((([e,t])=>n("meta",{name:`og:${e}`,content:t},e))):null,a]})}));function Ot(e){const{mobile:t}=e;return t?{...e,style:t.style?.length?t.style:e.style}:e}const Vt=a((({className:e,context:t})=>n("footer",{className:`${e} px-9 py-2 bg-white rounded-bl-3xl rounded-br-3xl`,children:n(ge,{context:t})}))),Ht=a((({title:e,description:t,cards:a=[],className:i})=>r("section",{className:`relative font-sans text-primary-text bg-white p-4 overflow-hidden ${i}`,children:[r("div",{className:"flex flex-col items-center mb-8",children:[n(o,{className:"font-medium m-0 text-centers",children:e}),t?n("div",{className:"font-normal text-base max-w-[600px] mt-3",children:t}):null]}),n("div",{className:"horizontal-list no-scrollbar",role:"list",children:a?.map(Zt)})]})));function Zt(e,t){return r("div",{className:"box-border horizontal-list-item border-solid border rounded-md border-main-divider p-4 mx-1 flex flex-col justify-between items-stretch",role:"listitem",children:[r("div",{children:[e.image?.src?n("div",{className:"flex justify-center",children:n(T,{className:"mb-6",image:e.image})}):null,e.title?n("h4",{className:"font-medium text-xl m-0 "+(e.description||e.items?.length?"":"text-center"),children:e.title}):null,e.description?n("div",{className:"font-normal text-sm text-secondary-text mt-2",children:e.description}):null,e.items?.length?Ft(e.items):null]}),e.href?n(D,{className:"mt-6",text:"Подробнее",version:"secondary",href:e.href}):null]},t)}function Ft(e=[]){return n("section",{className:"max-w-[308px] mt-2",role:"list",children:e.map(((e,t)=>n(C,{children:n("span",{className:"text-sm text-secondary-text",children:e})},String(t))))})}const zt=a((({titleSize:e,image:t,benefits:r,...a})=>{const{className:i}=a;return n("section",{className:`font-sans bg-white pt-10 pl-[50px] pb-[50px] pr-[7.5rem] ${i||""}`,children:n(He,{...a,titleSize:"L"})})})),Et={Header:Ie,Footer:Vt,Placeholder:Pe,Tile:V,ProductTile:Ue,ProductBlock:zt,TextBlock:et,ExchangeRateTile:G,MobileAppTile:Ae,Gallery:Ht};e.Blocks=Dt,e.ContentPage=At,e.ContentPageHead=Bt,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))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=function(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(i)||"");if(e?.token)return e}catch(e){}try{const e=await fetch(`${t}/assist/v1/public/auth`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:n,name:r}=await e.json();return globalThis.localStorage.setItem(i,JSON.stringify({token:n,name:r})),{token:n,name:r}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...r){if(!r.length)return[];const{token:a}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a},body:JSON.stringify({node_ids:r})}),{likes:i}=await n.json();return i||[]}catch(e){return console.error(e),[]}},like:async function(r){if(!r)return 0;const{token:a,name:i}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a,UserID:i},body:JSON.stringify({node_id:r,user_name:i})}),{likes:l}=await n.json();return l||0}catch(e){return console.error(e),0}},dislike:async function(r){if(!r)return 0;const{token:a,name:i}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a,UserID:i},body:JSON.stringify({node_id:r,user_name:i})}),{likes:l}=await n.json();return l||0}catch(e){return console.error(e),0}}}},e.MobileBlocks=Et,e.joinList=ze,e.projectSettings=l,e.setup=t,e.toMobilePage=function(e){const t=e.blocks?.filter((({mobile:e})=>!e?.hidden)).map(Ot);return{...e,blocks:t}},e.url=y,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";const t=(e,n)=>{t._jsx=e,t._jsxs=n||e};t.vue=e=>{t(((t,{children:n,dangerouslySetInnerHTML:r,...a}={})=>{const i=Object.assign({},a,r?{innerHTML:r.__html}:{});return e(t,i,"string"!=typeof t?()=>n:n)}))};const n=(...e)=>t._jsx(...e),r=(...e)=>t._jsxs(...e),a=e=>(e._tmpl||(e._tmpl=function(t,n){const{children:r,...a}=t||{},i=n?.slots?.default,l=r||i&&i();return e(Object.assign(a,l&&{children:l}),n)},e._tmpl.inheritAttrs=!1),e._tmpl);const i="likesToken";var l;!function(e){e.XL="text-title-lg",e.L="text-title",e.M="text-title-sm",e.S="text-title-xs"}(l||(l={}));const s=a((({size:e="L",className:t,children:r,...a})=>n("XL"===e?"h1":"h2",{className:c(l[e],t),...a,children:r}))),c=(...e)=>e.filter(Boolean).join(" "),o=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};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}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ENABLE_ASSIST(){return this._.ENABLE_ASSIST}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}},m=a((({className:e,name:t,alt:a=`Icon ${t}`,title:i=a,asSVG:l,...s})=>{const c=`${o.CDN||""}icons/${t}.svg`;return l?r("svg",{className:e,...s,"aria-hidden":"true",children:[i?n("title",{children:i}):null,a?n("desc",{children:a}):null,n("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]}):n("img",{className:e,src:c,alt:a,title:i,...s,"aria-hidden":"true"})})),d="/mobile",h=e=>e?.includes("//"),x=(e,t,n=((e,t)=>e===t))=>n(u(e),p(u(h(e)?t.href:t.pathname))),u=e=>(e||"").replace(/\/?\?.*/,""),p=e=>(e||"").replace(d,""),f=e=>{if(!h(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t},b=(e,t)=>{if(!e)return e;const n=g(e,t),r=t?.pathname.startsWith(d);return r&&!h(n)?`/mobile${n}`:n},g=(e,t)=>{if(!e)return e;const n=f(t?.href);return n?e.replace(n,"")||"/":e};var N=Object.freeze({__proto__:null,MOBILE_URL_PATH:d,isURL:h,isHrefActive:x,withoutQuery:u,withoutMobilePath:p,getOrigin:f,adjustHref:b,toRelativeHref:g});const v=(e,t)=>e;function y({router:e,handlerDecorator:t=v},n){const r=b(n.href,e);return{...n,href:r,ariaLabel:n.text,onClick:t((t=>{const a=r&&!h(r),i=!n.target||"_self"===n.target;a&&i&&(t.preventDefault(),e.push(r))}),n)}}const w={primary:"bg-primary-main",secondary:"bg-white"},k={primary:"text-primary-text",secondary:"text-white"},$=a((({className:e,text:t,children:a,version:i="primary"})=>r("div",{className:`inline-block flex ${e||""}`,role:"listitem",children:[n("div",{className:`inline-block w-[8px] h-[8px] min-w-[8px] min-h-[8px] rounded-full mt-2 ${w[i]}`}),n("span",{className:`text-base font-normal font-sans mx-3 ${k[i]}`,children:t||a})]}))),S={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active"},C={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text"},L="inline-block text-center font-sans select-none",_=a((({className:e,text:t,aboveText:r,appendLeft:a,href:i,target:l,onClick:s,children:c,disabled:o,rounded:m,version:d="none",ariaLabel:h,...x})=>{const u=c??n(j,{text:t,aboveText:r,appendLeft:a,rounded:m});return o?n("div",{role:"button","aria-disabled":"true","aria-label":h,tabIndex:"-1",className:`${L} ${C[d]||""} ${m?"rounded-full":"rounded-md"} ${e||""}`,children:u}):n("a",{className:`${L} cursor-pointer no-underline ${S[d]||""} ${m?"rounded-full":"rounded-md"} ${e||""}`,href:i,target:l,onClick:s,"aria-label":h,role:i?"link":"button",...x,children:u})})),j=a((({text:e,aboveText:t,appendLeft:a,rounded:i})=>{const l=!e&&!t&&Boolean(a);return r("div",{className:`flex items-center justify-center ${l?"h-12 w-12 min-h-12 min-w-12":"px-8 gap-2 "+(t?"py-2":"py-[13px]")} ${i?"rounded-full":""}`,children:[a||null,l?null:r("div",{children:[n("div",{className:"text-xxs text-left",children:t}),n("div",{className:"text-sm font-medium text-left",children:e})]})]})})),D=a((({className:e,image:t})=>r("picture",{className:`${e||""}`,children:[t.sources?.length?t.sources.map((({src:e,format:t},r)=>n("source",{srcSet:e,type:T(t)},`${r}_${e}`))):null,n("img",{src:t.src,alt:t.alt||t.title,title:t.title,...t?.size})]})));function T(e){return e?`image/${String(e)}`:void 0}const R=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12},M={left:"items-start",center:"items-center",right:"items-end"},I={left:"text-left",center:"text-center",right:"text-right"},A=a((({className:e,context:t,title:a,titleSize:i,description:l,children:c,buttons:o,image:d,items:h,version:x="primary",align:u="left"})=>{const p=t.useRouter(),{handlerDecorator:f}=t;return r("div",{className:`font-sans flex flex-col grow h-full ${M[u]}`,children:[a&&n(s,{size:i||P(e),className:"font-medium m-0 mb-4 whitespace-pre-wrap max-w-[600px]",children:a}),r("div",{className:"flex grow justify-between",children:[r("div",{className:`flex flex-col justify-between ${M[u]}`,children:[r("div",{children:[l?n("div",{className:`font-normal text-base max-w-[600px] ${I[u]}`,children:l}):null,c,h?.length?B(h,x):null]}),o?.length?n("div",{className:"flex mt-9 gap-3",children:o.map(((e,t)=>function({icon:e,...t},r){if(!t?.text)return;return n(_,e?{appendLeft:n(m,{name:e,width:"24",height:"24"}),...t}:{...t},String(r))}(y({router:p,handlerDecorator:f},e),t)))}):null]}),d?.src&&n(D,{className:"mt-auto ml-7",image:d})]})]})}));function P(e=""){const t=R(e);return t<=4?"S":t<=8?"M":"L"}function B(e=[],t){return n("section",{className:"max-w-[600px] mt-5",role:"list",children:e.map(((e,r)=>n($,{className:r?"mt-2.5":"",text:e,version:t},String(r))))})}const O=a((({bgColor:e="bg-white",className:t,...r})=>n("section",{className:`p-10 ${e} ${t||""} `,children:n(A,{...r})}))),H={left:"text-left",center:"text-center",right:"text-right"},V={double:"mb-8",single:""},Z={double:"gap-x-5 gap-y-[26px] flex-wrap",single:"gap-3.5 flex-col"},F=a((({className:e,title:t,align:a,documents:i,icon:l,columnsMode:c="double"})=>{const o=Z[c];return r("section",{className:`font-sans p-[50px] bg-white ${e}`,children:[t&&n(s,{className:`font-medium m-0 ${V[c]} ${H[a??"center"]}`,children:t}),n("div",{className:`flex ${o}`,role:"list",children:i?.length?i.map((({text:e,fileSize:t,...a})=>r("a",{className:"group flex items-center text-sm\n text-sm font-sans align-middle items-center text-primary-text no-underline group hover:text-primary-main\n "+("double"===c?"basis-[calc(50%-20px)]":""),role:"listitem",...a,children:[l&&n(m,{className:"mr-3.5",name:l,width:"24px",height:"24px"}),r("span",{children:[e,n("span",{className:"text-secondary-text group-hover:text-primary-main",children:a?.href&&E(z(a.href),t)})]})]}))):null})]})})),z=e=>{if(!e)return"";const t=e.split(".").pop();return!t||t.includes("/")?"":t},E=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),G=a((({className:e,title:t,image:a,benefits:i})=>r("section",{className:`relative font-sans text-primary-text bg-white p-14 ${e}`,children:[n(s,{className:"font-medium m-0 text-center",children:t}),r("div",{className:"flex justify-center mt-9",children:[a?.src&&n(D,{className:"mr-6",image:a}),i?.length?n("div",{className:"flex flex-col",children:i.map(U)}):null]})]})));function U(e,t){return r("div",{className:"flex flex-row mb-8",children:[e.icon&&n(m,{className:"w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]",name:e.icon,width:"48",height:"48"}),r("div",{className:"flex gap-1 flex-col h-full ml-5 max-w-[490px]",children:[n("div",{className:"font-medium text-primary-text text-xl m-0",children:e.label}),e.description&&n("div",{className:"font-normal text-sm text-secondary-text",children:e.description})]})]},String(t))}const W={primary:{background:"bg-white",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"},secondary:{background:"bg-primary-main",icon:"bg-white text-primary-main",title:"text-white",description:"text-white"},"secondary-light":{background:"bg-primary-main/10",icon:"bg-primary-main text-white",title:"text-primary-text",description:"text-secondary-text"}},J=a((({title:e,description:t,blockVersion:a="primary",iconVersion:i,image:l,className:s})=>{const c=W[a];return r("section",{className:`font-sans px-9 py-4 flex ${c.background} ${s||""}`,children:[i&&"small"===i?X(c.icon):null,i&&"big"===i?Q(l):null,r("div",{className:"py-0.5",children:[e&&n("div",{className:`font-medium text-base mb-1 ${c.title}`,children:e}),t&&n("div",{className:`text-sm ${c.description}`,children:t})]})]})}));function X(e){return n("div",{className:"pt-1.5 pr-4",children:n("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function Q(e){return e?.src?n(D,{className:"pt-0.5 pr-3",image:e}):null}const q={Headline:O,LinkDocs:F,TextBlock:J,PictureText:G},K=a((({label:e,blocks:t,context:a})=>{const[i,l]=a.useState(!1),s=t?.length,c=i?"MinusIcon":"PlusIcon";return r("li",{className:"border-0 border-b border-solid border-main-divider last:border-b-0",children:[r("button",{className:"border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans text-primary-text\n "+(s?"group cursor-pointer":""),onClick:e=>{if(!s)return null;l(!i);const t=ee(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`},children:[n("span",{className:"m-0 text-xl pr-2.5 font-medium "+(s?"group-hover:text-primary-main":""),children:e}),s?n(m,{name:c,width:"24",height:"24"}):null]}),s?n("div",{className:(i?"pb-5":"")+" text-sm transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0 ",children:t?.length?t.map(((e,t)=>Y(e,t,a))):null}):null]})})),Y=(e,t,r)=>{if(!e.type||!e.data||!q.hasOwnProperty(e.type))return null;const a=q[e.type];return n("div",{className:"mb-5 last:mb-0",children:n(a,{context:r,...e.data})},`block_${t}`)},ee=e=>"BUTTON"===e.target.tagName?e.target.nextSibling:e.target.parentNode.nextSibling,te=a((({title:e,accordionItems:t,context:a,className:i})=>r("section",{className:`p-[50px] font-sans bg-white text-primary-text ${i||""}`,children:[e?n(s,{className:"m-0 mb-2.5",children:e}):null,t?.length?n("ul",{className:"list-none m-0 p-0",children:t.map(((e,t)=>n(K,{...e,context:a},`AccordionItem${t}`)))}):null]}))),ne=a((({className:e,title:t,benefits:a})=>r("section",{className:`font-sans text-primary-text bg-white p-12 pb-2 flex flex-col items-center ${e||""}`,children:[t?n(s,{className:"font-medium m-0 max-w-[47rem] text-center",children:t}):null,a?.length?n("div",{className:"grid grid-cols-2 gap-5 mt-9",children:a.map(re)}):null]}))),re=(e,t)=>r("div",{className:"flex items-center p-10 gap-5 max-w-[580px]",children:[e.icon&&n(m,{className:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",name:e.icon,width:"70",height:"70"}),r("div",{children:[n("h3",{className:"font-medium text-xl m-0",children:e.label}),e.description&&n("div",{className:"font-normal text-sm mt-2",children:e.description})]})]},String(t)),ae=a((({className:e,viewBox:t,fill:r="none",width:a,height:i,paths:l,...s})=>n("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:r,width:a,height:i,children:l.map((({d:e,fill:t,...r},a)=>n("path",{d:e,fill:t||"currentColor",...s,...r},a)))}))),ie=[{d:"m9 12 4-4-4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",fill:"none"},{d:"M2 9a1 1 0 0 1 0-2v2Zm6-2a1 1 0 0 1 0 2V7ZM2 7h6v2H2V7Z"}],le=a((({className:e,disabled:t,...r})=>n(_,{rounded:!0,className:`shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...r,children:n(ae,{paths:ie,viewBox:"0 0 16 16",fill:"none",width:"16",height:"16"})}))),se=a((({children:e})=>n("div",{className:"self-start flex flex-col",role:"row",children:n("div",{className:"flex",children:e})}))),ce="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",oe="border-main-stroke border-solid border",me="border-main-divider border border-t-0 border-x-0",de="w-[200px] mr-6",he=a((({children:e,activeCardIndex:t})=>n("div",{className:"flex flex-1 overflow-hidden",children:n("div",{className:"flex gap-4 duration-1000",style:{transform:`translateX(-${336*t}px)`},children:e})}))),xe=a((({icon:e,image:t,title:a,link:i})=>r("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-12 ${oe} ${ce}`,role:"columnheader",scope:"col",children:[e&&!t?.src&&n(m,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",name:e,width:"63",height:"63"}),t?.src&&n(D,{className:"mb-4",image:t}),a&&n(s,{size:"S",className:"font-medium m-0 text-center text-white",children:a}),i?.text&&n("div",{className:"mt-auto w-full",children:n(_,{href:i.href,target:i.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:n("div",{className:"text-xs py-[11px]",children:i.text})})})]}))),ue=a((({cell:e,isFirstRow:t,isLastRow:r,isFillGradient:a})=>n("div",{className:`w-80 box-border flex flex-col ${oe} ${r?"border-t-0 rounded-b-md":"border-y-0"} ${a?ce:""}`,role:"cell",children:n("div",{className:`mx-7 h-full ${me} ${a&&t?"border-t":""} ${r?"":"border-solid"}`,children:e.map(((e,t)=>pe(e,t,a)))})}))),pe=({label:e,description:t},a,i)=>r("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e&&n("h5",{className:"text-xl font-medium m-0 "+(i?"text-white":""),children:e}),t&&n("div",{className:"text-sm opacity-80 "+(i?"text-white":"text-secondary-text"),children:t})]},String(a)),fe=a((({row:{header:e,data:t},activeCardIndex:a,isColoredFirstColumn:i,isFirstRow:l,isLastRow:s})=>r(se,{children:[e?.title?n("div",{className:`text-sm py-7 ${me} w-[200px] mr-6 ${s?"":"border-solid"}`,children:e.title}):null,t?.length?n(he,{activeCardIndex:a,children:t.map(((e,t)=>n(ue,{cell:e,isFirstRow:l,isLastRow:s,isFillGradient:i&&0===t},String(t))))}):null]}))),be=a((({className:e,context:t,title:a,rowHeaders:i,columns:l,visibleRowLength:c=0,isColoredFirstColumn:o=!1})=>{const m=t.useRouter(),{handlerDecorator:d}=t,[h,x]=t.useState(0),[u,p]=t.useState(!c),f=l?.map((({header:e})=>e||{})),b=l?.map((({data:e})=>e))||[],g=i?.map(((e,t)=>({header:e,data:b.map((e=>e?.[t]||[{}]))}))).slice(0,u?i.length:c),N=b?.length&&b.length>2,v=N&&b?.length-h>2,w=N&&h>0;return r("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,children:[n(s,{className:"font-medium m-0 max-w-[47rem] text-center mb-9 mx-auto",children:a}),r("div",{role:"table",children:[f?.length?r(se,{children:[n("div",{className:de,role:"columnheader",scope:"col"}),n(he,{activeCardIndex:h,children:f.map(((e,t)=>n(xe,{...e,link:e.link&&y({router:m,handlerDecorator:d},e.link)},String(t))))})]}):null,g?.length?r("div",{className:"relative",children:[g.map(((e,t,{length:r})=>n(fe,{row:e,isFirstRow:0===t,isLastRow:t+1===r,activeCardIndex:h,isColoredFirstColumn:o},String(t)))),N?n("div",{children:r("div",{className:"absolute top-7 right-7 z-10",children:[n(le,{onClick:()=>x(h+1),disabled:!v,ariaLabel:"Пролистать вправо"}),n(le,{className:"mt-4 rotate-180",onClick:()=>x(h-1),disabled:!w,ariaLabel:"Пролистать влево"})]})}):null]}):null]}),N?n("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null,c?n("div",{className:"pr-[50px]",children:r("div",{className:"flex w-full",children:[n("div",{className:de}),n("button",{onClick:()=>p(!u),className:"mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:n("div",{className:"font-sans font-medium text-xs py-[11px]",children:u?"Скрыть":"Показать все параметры"})})]})}):null]})}));function ge(e,t){const{data:n}=e(Ne(t),(()=>async function(e){const t=await fetch(Ne(e));return await t.json()}(t)));return n||{}}function Ne(e){return`/wcms-resources/${e||"credit-calculator-data"}.json`}const ve=[{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"}],ye=a((({text:e,checked:t,onChange:a,className:i})=>n("div",{className:i,children:r("label",{className:"flex items-center cursor-pointer relative",children:[n("input",{className:"peer appearance-none w-5 h-5 border-solid border rounded border-black checked:bg-primary-main checked:border-primary-main",type:"checkbox",onChange:e=>{a(e.target.checked)},checked:t}),n(ae,{paths:ve,className:"hidden absolute left-2 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),e?n("span",{className:"font-sans ml-2 text-sm cursor-pointer",children:e}):null]})}))),we=e=>new Intl.NumberFormat("ru-RU",{maximumSignificantDigits:3}).format(e),ke=a((({className:e,title:t,items:a=[],min:i=1,max:l=100,step:s=1,value:c=i,onChange:o})=>{const m=e=>{if(!o)return;const t=Number(e.replace(/\D/g,""));o(t)},d={backgroundSize:`${(100*(c-i)/(l-i)).toFixed(2)}% 100%`};return r("div",{className:e,children:[r("div",{className:"relative",children:[t?n("span",{className:"absolute text-xs text-secondary-text top-1 mt-0.5 pl-4 ml-0.5",children:t}):null,n("input",{className:"m-0 font-sans text-sm w-full h-12 border-2 border-solid border-main-divider rounded-md outline-none p-0 pl-4 m-0 box-border text-primary-text "+(t?"pt-4":""),value:we(c),onChange:e=>m(e.target.value),onBlur:()=>{o&&(c<i&&o(i),c>l&&o(l))}}),n("div",{className:"absolute inset-x-0 mt-0.5 top-8 px-4",children:n("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:i,max:l,step:s,value:c,onChange:e=>m(e.target.value),style:d})})]}),n("div",{className:"flex justify-between mt-3 mb-4",children:a.map(((e,t)=>n("span",{className:"text-xs text-secondary-text pl-4",children:e},String(t))))})]})})),$e=(e,t,n)=>Math.max(t,Math.min(e,n)),Se=3e4,Ce=3e6,Le=Math.round(41.5),_e=a((({context:e,className:t,directoryName:a})=>{const[i,l]=e.useState(void 0),[s,c]=e.useState(void 0),[o,m]=e.useState(!0),[d,h]=e.useState(!0),x=(e=>{const{tableRows:t,isAnnuity:n=!1}=e;return t&&t.find((e=>e.isAnnuity===n))||{}})({tableRows:ge(e.useAsyncData,a).rows,isAnnuity:o}),u=x.maxSum&&x.minSum?(x.maxSum-x.minSum)/2:1485e3,p=x.maxMonths&&x.minMonths?Math.round((x.maxMonths-x.minMonths)/2):Le,f=x?.minSum||Se,b=x?.maxSum||Ce,g=x?.minMonths||1,N=x?.maxMonths||84,v=(e=>{const{calculatorParams:t,isInsurance:n}=e;return t?n?t?.rateWithInsurance||5:t?.rateWithoutInsurance||5:5})({calculatorParams:x,isInsurance:d}),y=(e=>{const{calculatorParams:t,paymentType:n,rate:r,sum:a,months:i}=e;if(!t)return 0;const l=$e(a,t.minSum||Se,t.maxSum||Ce);if("annuity"===n){const e=Number(r)/1200;return l*(e+e/(Math.pow(1+e,i)-1))}return l/i+l*(Number(r)/12)})({calculatorParams:x,paymentType:"annuity",rate:v,sum:i||u,months:s||p}),w=((e,t)=>{const n=Math.ceil((t-e)/12),r=Math.floor(e/12)+1,a=new Array(Math.min(n-1,5)).fill(0).map(((e,t)=>r+t)),i=n+r-1;return a.concat(i)})(g,N);function k(e){c($e(12*e,g,N))}return n("section",{className:`font-sans text-primary-text bg-white p-4 ${t}`,children:r("div",{className:"box-border p-12 flex flex-col justify-between border-solid border-3 border-primary-main rounded-md",children:[r("div",{className:"flex justify-between",children:[r("div",{className:"grow mr-11",children:[n(ke,{title:"Желаемая сумма кредита, ₽",items:[`От ${we(f)} рублей`,`До ${we(b)} рублей`],min:f,max:b,step:1e3,value:i||u,onChange:l}),n(ke,{title:"Срок кредита, месяцев",items:["Или выберите из предложенных вариантов ниже"],min:g,max:N,step:1,value:s||p,onChange:c}),n("div",{className:"flex mb-7",children:w.map(((e,t)=>function(e,t,a){return n("button",{className:"bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none",onClick:()=>a(e),children:r("span",{className:"font-semibold text-sm",children:[e," ",1===e?"год":e>4?"лет":"года"]})},String(t))}(e,t,k)))}),n(ye,{text:"Получаю пенсию на карту Россельхозбанка",checked:o,onChange:m}),n(ye,{className:"mb-4",text:"Комплексная страховая защита",checked:d,onChange:h})]}),r("div",{className:"p-9 bg-primary-main rounded-md text-white",children:[n("div",{className:"text-base mb-5",children:"Наше предложение"}),n("div",{className:"text-sm opacity-60",children:"Ежемесячный платёж"}),r("div",{className:"text-lg mb-3",children:[we(Math.round(y))," ₽"]}),n("div",{className:"text-sm opacity-60",children:"Ставка"}),r("div",{className:"text-lg",children:[v," %"]})]})]}),r("div",{className:"flex items-center",children:[n(_,{className:"mr-3",text:"Отправить заявку",version:"primary",href:"#"}),n("div",{className:"w-80 text-xxs leading-4 text-secondary-text","aria-label":"Соглашение на обработку персональных данных",children:"Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно требованиям ФЗ «О персональных данных»"})]})]})})}));const je={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},De=a((e=>{const{children:t,className:r,version:a="primary"}=e;return n("section",{className:`font-sans p-9 min-h-[320px] box-border ${r||""} ${je[a]} ${Te(r)} `,children:n(A,{...e,children:t})})}));function Te(e=""){const t=R(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Re="https://www.cbr-xml-daily.ru/daily_json.js",Me=["USD","EUR"],Ie={USD:"DollarIcon",EUR:"EuroIcon"},Ae=[{text:"Все показатели",href:"https://cbr.ru/currency_base/daily/",version:"secondary"}],Pe=a((({className:e,context:t,title:a})=>{const{data:i}=t.useAsyncData(Re,He);return n(De,{className:e,context:t,title:a||"Курсы обмена валют",buttons:Ae,children:r("table",{children:[n("thead",{children:r("tr",{children:[n(Be,{children:"Валюта"}),n(Be,{className:"pl-11",children:"Курс"})]})}),n("tbody",{children:Me.map((e=>{const t=(i?.Valute||{})[e]?.Value;return r("tr",{children:[n(Oe,{className:"pt-4",children:r("div",{className:"flex items-center",children:[n(m,{name:Ie[e],width:"24",height:"24"}),n("span",{className:"ml-2",children:e})]})}),n(Oe,{className:"pt-4 pl-11",children:Ze(t)})]},e)}))})]})})})),Be=a((({className:e="",children:t})=>n("th",{className:`text-left font-normal text-sm text-secondary-text ${e}`,children:t}))),Oe=a((({className:e="",children:t})=>n("td",{className:`text-left font-normal text-base text-primary-text ${e}`,children:t})));async function He(){const e=await fetch(Re);return await e.json()}const Ve=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),Ze=e=>e?Ve.format(e):"",Fe=["m13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z","M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z","M33.93 35.53c.3-.41.6-.85.87-1.3v-2.66h-.87v3.96Zm2.54-4.92c.12-.4.24-.78.34-1.16h-2.88v.7h.43c.77-.02 1.63-.03 2.11.46Zm-19.19-1.27h-.78v7.91h.78v-7.9Z","M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z","M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z"],ze=a((({className:e,href:t,children:a,targetBlank:i})=>r("a",{className:`inline-flex items-center font-sans no-underline ${e||""}`,href:t||"https://rshb.ru/",target:i?"_blank":"_self",children:[n(ae,{className:"text-primary-main w-10",viewBox:"0 0 40 45",paths:Fe.map((e=>({d:e})))}),n("span",{className:"text-black text-base font-medium ml-2.5",children:a||"Россельхозбанк"})]}))),Ee=a((({className:e,context:t})=>{const{term:a,setTerm:i}=t.useSearch();return r("form",{className:`relative ${e||""}`,children:[r("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[n("div",{className:"w-[24px] h-[24px]",children:n(m,{name:"LoupeIcon",width:"24",height:"24"})}),!a&&n("span",{className:"font-sans font-normal text-base text-secondary-text",children:"Поиск по сайту"})]}),n("input",{className:"pl-12 w-full font-sans font-normal text-base text-black border border-solid border-main-divider rounded h-full box-border outline-none pr-[6%]",value:a,onChange:e=>i(e.target.value),type:"text",name:"s"}),a&&n("button",{type:"submit",className:"absolute font-sans font-normal text-sm cursor-pointer bg-transparent hover:bg-primary-hover active:bg-primary-active text-primary-main hover:text-white border-none px-5 py-2 rounded top-1 right-1 outline-none",onClick:e=>{e.preventDefault(),console.log("click")},children:"Найти"})]})})),Ge=a((({className:e,items:t,hasButton:a,context:i})=>{const l=i.useRouter(),{handlerDecorator:s}=i;return r("div",{className:`flex flex-col ${e||""}`,children:[t?.length?t.map(Ue):null,a?n(_,{version:"primary",className:"my-4",...y({router:l,handlerDecorator:s},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),Ue=(e,t)=>{const{type:a,text:i,description:l}=e;return r("div",{className:"mb-4",children:[n("div",{children:We(a,i)}),n("div",{className:"font-sans text-sm text-secondary-text",children:l})]},String(t))},We=(e,t="")=>{switch(e){case"tel":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`tel:${Je(t)}`,children:t});case"email":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return n("span",{children:t})}},Je=e=>e.replaceAll(/(\-|\s|\(|\)|\D+)/g,""),Xe=a((({className:e,links:t,context:r})=>{const a=r.useRouter(),{handlerDecorator:i}=r;return n("div",{className:`${e||""}`,children:t?.length?n("div",{className:"flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider",children:t.map(((e,t)=>n(Qe,{index:t,...y({router:a,handlerDecorator:i},e)},String(t))))}):null})})),Qe=a((({className:e,index:t,text:r,href:a,target:i,onClick:l})=>n("a",{className:`font-sans font-normal text-sm text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:a,target:i,onClick:l,children:r||`Документ ${t}`})));function qe(e){const{data:t}=e(Ye(),Ke);return t||{}}async function Ke(){const e=await fetch(Ye());return await e.json()}function Ye(){return`/wcms-resources/${o.SITEMAP||"sitemap"}.json`}const et=e=>t=>e?.href===t?.href;function tt(e,t){return(r=e,a=t,(r||[]).map((e=>a?.find(et(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(et(e))))));var n,r,a}const nt=a((({className:e,items:t,context:r})=>{const a=tt(qe(r.useAsyncData).topItems,t),i={router:r.useRouter(),handlerDecorator:r.handlerDecorator};return n("div",{className:`flex items-start justify-start gap-11 xl:gap-5 ${e||""}`,children:a?.map(((e,t)=>rt(e,t,i)))})})),rt=(e,t,{router:a,handlerDecorator:i})=>{const{text:l,href:s,items:c,target:o}=e;return r("div",{className:"flex flex-col w-[235px] gap-[14px]",children:[n("a",{className:"block font-sans font-medium text-base text-primary-text no-underline",href:s,target:o||"_self",children:l||`Раздел ${t}`}),c?.map(((e,t)=>n(at,{...y({router:a,handlerDecorator:i},e)},String(t))))]},String(t))},at=a((({text:e,href:t,target:r,index:a})=>n("a",{className:"block font-sans font-normal text-base text-secondary-text hover:text-primary-main no-underline",href:t,target:r||"_self",children:e||`Раздел ${a}`}))),it=[{origins:["t.me","telegram.org"],icon:"TelegramIcon",label:"Телеграм",width:"20px",height:"16px"},{origins:["vk.com"],icon:"VKIcon",label:"ВКонтакте",width:"24px",height:"12px"},{origins:["ok.ru"],icon:"OkIcon",label:"Одноклассники",width:"12px",height:"20px"}],lt=a((({className:e,media:t,context:r})=>{const a=r.useRouter(),{handlerDecorator:i}=r;return n("div",{className:`flex items-end justify-end gap-2 pt-[30px] pb-7 ${e||""}`,children:t?.map(((e,t)=>n(st,{...y({router:a,handlerDecorator:i},e)},String(t))))})})),st=a((({href:e})=>{const{icon:t,label:r,width:a,height:i}=it.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};return t?n(_,{rounded:!0,href:e,target:"_blank",rel:"noopener noreferrer","aria-label":r,className:"border-solid border border-main-divider w-9 h-9 flex items-center justify-center hover:fill-primary-main",appendLeft:n(m,{name:t,width:a,height:i,asSVG:!0})}):null})),ct=a((({className:e,links:t,context:a})=>{const i=a.useRouter(),{handlerDecorator:l}=a;return r("div",{className:`${e||""}`,children:[n("div",{className:"pt-5 pb-[5px]",children:n("span",{className:"font-sans font-normal text-xs text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?n("div",{className:"flex justify-start items-start gap-5 pt-[5px]",children:t.map(((e,t)=>n(ot,{index:t,...y({router:i,handlerDecorator:l},e)},String(t))))}):null]})})),ot=a((({className:e,index:t,text:r,href:a,target:i,onClick:l})=>n("a",{className:`font-sans font-normal text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:a,target:i,onClick:l,children:r||`Документ ${t}`}))),mt=a((({className:e,documents:t,relatedEnterprises:a,contacts:i,socialMedia:l,topItems:s,context:c})=>r("footer",{className:`${e} px-9 py-10 bg-white`,children:[r("div",{className:"flex items-stretch gap-32 pb-8 xl:gap-8",children:[n(ze,{className:"w-[280px] xl:w-[220px]"}),n(Ee,{context:c,className:"grow"})]}),r("div",{className:"flex items-stretch gap-32 xl:gap-8",children:[n(Ge,{className:"w-[280px] shrink-0 overflow-hidden xl:w-[220px]",items:i,context:c,hasButton:!0}),n(nt,{className:"pt-[3px]",context:c,items:s})]}),n(lt,{media:l,context:c}),n(Xe,{links:a,context:c}),n(ct,{links:t,context:c})]}))),dt={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},ht={normal:380,mini:276},xt={normal:3,mini:4},ut=a((({title:e,description:t,context:a,cards:i=[],className:l,version:c="normal"})=>{const[o,m]=a.useState(0);const d=i?.length>xt[c],h=d&&i?.length-o>xt[c],x=d&&o>0;return r("section",{className:`relative font-sans text-primary-text bg-white p-12 overflow-hidden ${l}`,children:[r("div",{className:"flex flex-col items-center mb-8",children:[e?n(s,{className:"font-medium m-0 text-center",children:e}):null,t?n("div",{className:"font-normal text-base max-w-[600px] mt-3",children:t}):null]}),n("div",{className:`flex ${i?.length<=xt[c]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${o*ht[c]}px)`},role:"list",children:i?.map(((e,t)=>function(e,t,a){return r("div",{className:`box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between items-stretch ${dt[a]} w-full`,role:"listitem",children:[r("div",{children:[e.image?.src?n("div",{className:"flex justify-center",children:n(D,{className:"mb-6",image:e.image})}):null,e.title?n("h4",{className:"font-medium text-xl m-0 "+(e.description||e.items?.length?"":"text-center"),children:e.title}):null,e.description?n("div",{className:"font-normal text-sm text-secondary-text mt-2",children:e.description}):null,e.items?.length?n("section",{className:"max-w-[308px] mt-2",role:"list",children:e.items.map(pt)}):null]}),e.href?n(_,{className:"mt-6",text:"Подробнее",version:"secondary",href:e.href}):null]},String(t))}(e,t,c)))}),x&&n(le,{className:"absolute top-1/2 left-8 rotate-180",onClick:function(){m(o-1)},ariaLabel:"Пролистать влево"}),h&&n(le,{className:"absolute top-1/2 right-1 z-10",onClick:function(){m(o+1)},ariaLabel:"Пролистать вправо"}),n("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"})]})}));function pt(e,t){return n($,{children:n("span",{className:"text-sm text-secondary-text",children:e})},String(t))}const ft=a((e=>n(ut,{...e,version:"normal"}))),bt=a((({className:e,text:t,href:a,target:i,active:l,onClick:s,children:c})=>r("a",{className:`relative inline-block bg-transparent text-center no-underline ${e||""}`,href:a,target:i,onClick:s,children:[n("span",{className:`font-sans font-normal text-base ${l?"text-primary-main":"text-primary-text hover:text-primary-main"}`,children:t||c}),l?n("div",{className:"absolute left-0 -bottom-2 w-full h-[2px] bg-primary-main"}):null]}))),gt=a((({className:e,text:t,href:r,target:a,active:i,flat:l,onClick:s,children:c,ariaLabel:o})=>n("a",{className:`inline-block border border-solid bg-transparent text-center no-underline ${l?"":"px-4 py-2"} ${i?"border-primary-main rounded-md":"border-transparent"} ${e||""}`,href:r,target:a,onClick:s,rel:"noopener noreferrer","aria-label":o,children:n("span",{className:`font-sans font-normal text-sm ${i?"text-primary-main":(l?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"}`,children:t||c})}))),Nt=a((({className:e,children:t,ariaLabel:r})=>n("button",{type:"button",className:`border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${e||""}`,disabled:!0,"aria-label":r,children:t}))),vt=a((({context:e,className:t,defaultLocation:a=""})=>{const[i,l]=e.useGeolocation(a);return r("div",{className:`flex items-center ${t||""}`,children:[n(gt,{className:"mr-5",flat:!0,href:"#",text:i,ariaLabel:"Местоположение",onClick:l}),n(gt,{className:"mr-7",flat:!0,href:"#",text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов"}),n(Nt,{className:"mr-5 text-primary-text hover:text-primary-main",ariaLabel:"Поиск по сайту",children:n(m,{name:"LoupeIcon","aria-hidden":"true",className:"h-full",asSVG:!0})}),n(Nt,{className:"mr-5 text-primary-text hover:text-primary-main",ariaLabel:"Профиль",children:n(m,{name:"ProfileIcon","aria-hidden":"true",className:"h-full",asSVG:!0})}),n(Nt,{className:"min-w-[32px] min-h-[32px] fill-secondary-light hover:fill-secondary-hover",ariaLabel:"Дополнительные ссылки",children:n(m,{name:"GridIcon","aria-hidden":"true",className:"h-full",asSVG:!0})})]})}));const yt=a((({className:e,defaultLocation:t,context:a,topItems:i})=>{const l=a.useRouter(),s=qe(a.useAsyncData),{handlerDecorator:c}=a,o=tt(s.topItems,i),m=o.find(function(e){return t=>x(t.href,e,((e,t)=>t.startsWith(e)))}(l)),d=m?.items,h=d?.find(function(e){return t=>x(t.href,e)}(l)),u=o.map(((e,t)=>n(gt,{active:e===m,...y({router:l,handlerDecorator:c},e),ariaLabel:e.text},String(t)))),p=d?.map((e=>n(bt,{className:"mr-8",active:e===h,...y({router:l,handlerDecorator:c},e)},e.href)));return r("header",{className:`pt-5 pb-8 px-20 bg-white ${e||""}`,children:[r("div",{className:"flex items-center",children:[n(ze,{className:"mr-8"}),u,n(vt,{context:a,className:"ml-auto",defaultLocation:t})]}),n("div",{className:"mt-5 h-[1px] bg-main-divider"}),n("nav",{className:"mt-5",children:p})]})})),wt=a((e=>n(ut,{...e,version:"mini"}))),kt=a((({className:e,context:t,title:a="Мобильное приложение",qr:i,buttons:l=[]})=>n(De,{className:e,context:t,title:a,buttons:l,children:r("div",{className:"flex items-center",children:[i?.src&&i?.href&&n("a",{href:i.href,target:"_blank",children:n("img",{src:i.src,alt:a,title:a,width:"164",height:"164",className:"w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light"})}),n("span",{className:"font-normal text-sm text-secondary-text ml-4",children:"Наведите камеру телефона на QR-код и скачайте приложение"})]})}))),$t=a((({className:e,context:t,title:r})=>n(De,{className:e,context:t,title:r,description:"Блок в разработке...",children:n("figure",{className:"m-0 min-w-[600px]",children:St()})}))),St=(e=3)=>Lt(100,e).map((e=>Math.floor(e))).map(Ct),Ct=(e=100,t)=>n("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Lt=(e,t)=>[e].concat(t>0?Lt(e/1.618,t-1):[]),_t=a((({className:e,context:t,title:a,titleSize:i,description:l,benefits:c,buttons:o,image:m,items:d})=>r("div",{className:`flex grow justify-between items-stretch ${e||""}`,children:[r("div",{className:"flex flex-col",children:[a&&n(s,{size:i||"XL",className:"font-medium m-0 mb-4 whitespace-pre-wrap max-w-[600px] text-primary-text",children:a}),n(A,{context:t,description:l,items:d,buttons:o,children:c?.length?n("div",{className:"flex gap-6 mt-6 mb-3.5",children:c.map(jt)}):null})]}),m?.src&&n(D,{className:"mt-auto",image:m})]})));function jt(e,t){return r("div",{className:"flex gap-4 items-center",children:[e.icon&&n(m,{className:"w-[50px] h-[50px] min-w-[50px] min-h-[50px] bg-main rounded-full p-[10px] box-border",name:e.icon,width:"24",height:"24"}),r("div",{className:"flex gap-1 flex-col h-full",children:[n("h4",{className:"font-medium text-primary-text text-xl m-0",children:e.label}),e.description&&n("div",{className:"font-normal text-sm text-secondary-text",children:e.description})]})]},String(t))}const Dt=a((({text:e,href:t,target:r,onClick:a,className:i,children:l})=>t?n("a",{className:`no-underline ${i||""}`,href:t,target:r,onClick:a,children:n("span",{className:`${i||""}`,children:e||l})}):n("span",{className:`${i||""}`,children:e||l})));function Tt(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])}const Rt=a((e=>{const{context:t,className:a,breadcrumbs:i}=e,l=t.useRouter(),{handlerDecorator:s}=t;return r("section",{className:`font-sans bg-white pt-10 pl-[50px] pb-[50px] pr-[7.5rem] ${a||""}`,children:[i?.length?n("div",{className:"text-xs mb-6",children:Tt(n("span",{className:"text-secondary-text mx-2",children:"/"}))(i.map(((e,t)=>n(Dt,{...y({router:l,handlerDecorator:s},{className:"text-secondary-text",...e})},String(t)))))}):null,n(_t,{...e})]})})),Mt=a((({className:e,context:t,duration:a=0,slides:i=[]})=>{const l=i.map((e=>e.nav)),s=i.map((e=>e.productBlock)),[c,o]=t.useState(0);return r("section",{className:`font-sans bg-white overflow-hidden w-100 ${e||""}`,children:[n("div",{className:"flex duration-1000",style:{transform:`translateX(-${c}00%)`},role:"list",children:s.map(((e,r)=>function(e,t,r){return n("section",{className:"flex grow-0 shrink-0 basis-full",role:"listitem",children:n("div",{className:"p-10 flex grow",children:n(_t,{className:"pl-2.5 pt-2.5 pb-1.5 pr-[6.25rem]",context:r,...e})})},String(t))}(e,r,t)))}),n("div",{className:"border-t border-solid border-main-divider flex",children:l.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:a,onClick:i,duration:l}){const s=t===a,c=s?"animate-slide":"";return r("button",{type:"button",onClick:i,className:"group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 py-4 grow basis-0",children:[r("div",{className:"border-0 border-r border-solid border-main-divider px-6",children:[n("div",{className:"text-sm font-medium group-hover:text-primary-text "+(s?"text-primary-text":"text-secondary-text"),children:e?.title}),n("div",{className:"text-xs text-secondary-text",children:e.desc})]}),n("div",{className:`absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${c}`,style:{animationDuration:`${l}s`}})]},String(t))}({slide:e,i:t,activeSlideIndex:c,onClick:()=>o(t),duration:a})))})]})}));const It=a((e=>{const{benefits:t,version:a}=e;return n(De,{...e,children:r("div",{className:"flex mt-5 mb-1",children:[t?.length?n("div",{className:"mr-8",children:t.map(At)}):null,t?.length?n("div",{className:"pt-1",children:t.map(((e,t)=>function(e,t,r="primary"){return n("div",{className:`text-sm ${t?"mt-4":""} ${{primary:"text-secondary-text",secondary:"text-white"}[r]}`,children:e.label},String(t))}(e,t,a)))}):null]})})}));function At(e,t){return n("div",{className:"text-xl font-medium "+(t?"mt-2.5":""),children:e.description},String(t))}const Pt=a((({className:e,context:t,title:a="Акции и спецпредложения",date:i,description:l,buttons:s=[],version:c})=>n(De,{className:e,context:t,title:a,buttons:s,version:c,children:r("div",{children:[i&&n("div",{className:"text-sm mb-2",children:Bt(i)}),n("div",{className:"text-base",children:l})]})})));function Bt(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const Ot=a((({className:e,title:t,steps:a})=>r("section",{className:`font-sans text-primary-text bg-white px-12 py-12 flex flex-col items-center ${e||""}`,children:[n(s,{className:"font-medium m-0 max-w-[47rem] text-center",children:t}),a?.length?r("div",{children:[n("div",{className:"flex mt-9 items-center px-[88px]",children:Tt(n("div",{className:"h-0.5 w-full bg-secondary-light"}))(a.map(((e,t)=>Ht(e,t))))}),n("div",{className:"flex mt-9 justify-between gap-x-24",children:a.map(Vt)})]}):null]}))),Ht=(e,t)=>n("div",{className:"flex flex-col items-center text-center relative",children:n("div",{className:"h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10",children:e.icon&&n(m,{name:e.icon,width:"48",height:"48"})||n("span",{className:"font-medium text-title-sm text-secondary-text",children:t+1})})},String(t)),Vt=(e,t)=>n("div",{className:"flex flex-col items-center text-center relative w-[276px]",children:r("div",{className:"max-w-min",children:[n("h5",{className:"font-medium text-xl m-0 mt-4 whitespace-nowrap px-3",children:e.label}),e.description&&n("div",{className:"font-normal text-sm text-secondary-text mt-2",children:e.description})]})},String(t)),Zt={Accordion:te,BenefitsBlock:ne,ComparisonTable:be,CreditCalculator:_e,ExchangeRateTile:Pe,Footer:mt,Gallery:ft,Header:yt,Headline:O,LinkDocs:F,MiniGallery:wt,MobileAppTile:kt,PictureText:G,Placeholder:$t,ProductBlock:Rt,ProductGallery:Mt,ProductTile:It,PromoTile:Pt,StepsBlock:Ot,TextBlock:J,Tile:De},Ft=a((({className:e,onClick:t,ariaLabel:r})=>n("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":r,children:zt()}))),zt=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[n("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),n("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},Et=a((({className:e,context:t})=>{const a=t.useLikeService();return r("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,children:[n(Ft,{onClick:a.like,ariaLabel:"Поставить отметку «лайк»"}),n(Ft,{onClick:a.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),n("span",{className:"select-none",children:a.likeCount})]})})),Gt=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),Ut=a((({className:e,context:t,blocksRegistry:a,data:{style:i,blocks:l,likeControl:s,colorPalette:c="pc"},blockDecorator:o=Gt})=>r("section",{className:"relative","data-theme":c,children:[n("div",{className:`grid grid-cols-12 gap-1 ${Wt(i)} ${e||""}`,children:l?.length?l.map((function e(r,i){const{type:l}=r;l in a||console.warn(`No block with "${l}" is registered`);const s=a[l]||$t;return o({blockClassName:Wt(r.style),block:r,render:r=>{const{version:a,content:c,blocks:o}=r.block;return n(s,{className:r.blockClassName,version:a,context:t,...c,children:o?.length?o.map(e):null},`${l}-${i}`)}},`block-${i}`)})):null}),s&&n("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:n(Et,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t})})]})));function Wt(e){return e?e.join(" "):""}const Jt=a((({HeadComponent:e,data:t,children:a})=>{const{title:i,description:l,keywords:s,robots:c,og:o}=t;return r(e,{children:[n("title",{children:i}),n("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),l&&n("meta",{name:"description",content:l}),s&&n("meta",{name:"keywords",content:s.join(",")}),c&&n("meta",{name:"robots",content:c.join(",")}),o?Object.entries(o).map((([e,t])=>n("meta",{name:`og:${e}`,content:t},e))):null,a]})}));function Xt(e){const{mobile:t}=e;return t?{...e,style:t.style?.length?t.style:e.style}:e}const Qt=a((({className:e,context:t})=>n("footer",{className:`${e} px-9 py-2 bg-white rounded-bl-3xl rounded-br-3xl`,children:n(ct,{context:t})}))),qt=a((({title:e,description:t,cards:a=[],className:i})=>r("section",{className:`relative font-sans text-primary-text bg-white p-4 overflow-hidden ${i}`,children:[r("div",{className:"flex flex-col items-center mb-8",children:[n(s,{className:"font-medium m-0 text-centers",children:e}),t?n("div",{className:"font-normal text-base max-w-[600px] mt-3",children:t}):null]}),n("div",{className:"horizontal-list no-scrollbar",role:"list",children:a?.map(Kt)})]})));function Kt(e,t){return r("div",{className:"box-border horizontal-list-item border-solid border rounded-md border-main-divider p-4 mx-1 flex flex-col justify-between items-stretch",role:"listitem",children:[r("div",{children:[e.image?.src?n("div",{className:"flex justify-center",children:n(D,{className:"mb-6",image:e.image})}):null,e.title?n("h4",{className:"font-medium text-xl m-0 "+(e.description||e.items?.length?"":"text-center"),children:e.title}):null,e.description?n("div",{className:"font-normal text-sm text-secondary-text mt-2",children:e.description}):null,e.items?.length?Yt(e.items):null]}),e.href?n(_,{className:"mt-6",text:"Подробнее",version:"secondary",href:e.href}):null]},t)}function Yt(e=[]){return n("section",{className:"max-w-[308px] mt-2",role:"list",children:e.map(((e,t)=>n($,{children:n("span",{className:"text-sm text-secondary-text",children:e})},String(t))))})}const en=a((({titleSize:e,image:t,benefits:r,...a})=>{const{className:i}=a;return n("section",{className:`font-sans bg-white pt-10 pl-[50px] pb-[50px] pr-[7.5rem] ${i||""}`,children:n(_t,{...a,titleSize:"L"})})})),tn={ExchangeRateTile:Pe,Footer:Qt,Gallery:qt,Header:yt,Headline:O,MobileAppTile:kt,PictureText:G,Placeholder:$t,ProductBlock:en,ProductTile:It,TextBlock:J,Tile:De};e.Blocks=Zt,e.ContentPage=Ut,e.ContentPageHead=Jt,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))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=function(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(i)||"");if(e?.token)return e}catch(e){}try{const e=await fetch(`${t}/assist/v1/public/auth`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:n,name:r}=await e.json();return globalThis.localStorage.setItem(i,JSON.stringify({token:n,name:r})),{token:n,name:r}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...r){if(!r.length)return[];const{token:a}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a},body:JSON.stringify({node_ids:r})}),{likes:i}=await n.json();return i||[]}catch(e){return console.error(e),[]}},like:async function(r){if(!r)return 0;const{token:a,name:i}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a,UserID:i},body:JSON.stringify({node_id:r,user_name:i})}),{likes:l}=await n.json();return l||0}catch(e){return console.error(e),0}},dislike:async function(r){if(!r)return 0;const{token:a,name:i}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a,UserID:i},body:JSON.stringify({node_id:r,user_name:i})}),{likes:l}=await n.json();return l||0}catch(e){return console.error(e),0}}}},e.MobileBlocks=tn,e.joinList=Tt,e.projectSettings=o,e.setup=t,e.toMobilePage=function(e){const t=e.blocks?.filter((({mobile:e})=>!e?.hidden)).map(Xt);return{...e,blocks:t}},e.url=N,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
declare const AccordionBlocks: {
|
|
2
|
+
Headline: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("../Headline/Headline").HeadlineProps, any>, context?: any) => any;
|
|
3
|
+
LinkDocs: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("../LinkDocs/LinkDocs").LinkDocsProps, any>, context?: any) => any;
|
|
2
4
|
TextBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("../TextBlock/TextBlock").TextBlockProps, any>, context?: any) => any;
|
|
5
|
+
PictureText: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("../PictureText/PictureText").PictureTextProps, any>, context?: any) => any;
|
|
3
6
|
};
|
|
4
7
|
export default AccordionBlocks;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
const Headline_1 = require("../Headline/Headline");
|
|
3
|
+
const LinkDocs_1 = require("../LinkDocs/LinkDocs");
|
|
4
|
+
const PictureText_1 = require("../PictureText/PictureText");
|
|
2
5
|
const TextBlock_1 = require("../TextBlock/TextBlock");
|
|
3
6
|
const AccordionBlocks = {
|
|
7
|
+
Headline: Headline_1.Headline,
|
|
8
|
+
LinkDocs: LinkDocs_1.LinkDocs,
|
|
4
9
|
TextBlock: TextBlock_1.TextBlock,
|
|
10
|
+
PictureText: PictureText_1.PictureText,
|
|
5
11
|
};
|
|
6
12
|
exports.default = AccordionBlocks;
|
|
7
13
|
//# sourceMappingURL=AccordionBlocks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionBlocks.js","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionBlocks.tsx"],"names":[],"mappings":";AAAA,sDAAmD;AAEnD,MAAM,eAAe,GAAG;IACtB,SAAS,EAAT,qBAAS;
|
|
1
|
+
{"version":3,"file":"AccordionBlocks.js","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionBlocks.tsx"],"names":[],"mappings":";AAAA,mDAAgD;AAChD,mDAAgD;AAChD,4DAAyD;AACzD,sDAAmD;AAEnD,MAAM,eAAe,GAAG;IACtB,QAAQ,EAAR,mBAAQ;IACR,QAAQ,EAAR,mBAAQ;IACR,SAAS,EAAT,qBAAS;IACT,WAAW,EAAX,yBAAW;CACZ,CAAC;AAEF,kBAAe,eAAe,CAAC"}
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
+
import type { HeadlineContent } from '../Headline/HeadlineContent';
|
|
2
|
+
import type { LinkDocsContent } from '../LinkDocs/LinkDocsContent';
|
|
3
|
+
import type { PictureTextContent } from '../PictureText/PictureTextContent';
|
|
1
4
|
import type { TextBlockContent } from '../TextBlock/TextBlockContent';
|
|
2
|
-
|
|
3
|
-
export declare type AccordionDataContent = TextBlockContent;
|
|
5
|
+
import AccordionBlocks from './AccordionBlocks';
|
|
4
6
|
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
* @title Содержимое блока
|
|
9
|
+
*/
|
|
10
|
+
export declare type AccordionData = HeadlineContent | LinkDocsContent | TextBlockContent | PictureTextContent;
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
5
13
|
* @title Тип блока
|
|
6
|
-
* @enumNames ["Текстовый блок"]
|
|
14
|
+
* @enumNames ["Заголовок", "Блок документов", Текстовый блок", "Картинка с текстом"]
|
|
7
15
|
*/
|
|
8
|
-
export declare type
|
|
16
|
+
export declare type AccordionTypeBlock = keyof typeof AccordionBlocks;
|
|
9
17
|
/**
|
|
10
18
|
* Блок
|
|
11
19
|
*/
|
|
12
20
|
export interface AccordionBlock {
|
|
13
|
-
type?:
|
|
14
|
-
data?:
|
|
21
|
+
type?: AccordionTypeBlock;
|
|
22
|
+
data?: AccordionData;
|
|
15
23
|
}
|
|
16
24
|
/**
|
|
17
25
|
* @title Элемент списка
|
|
@@ -9,11 +9,21 @@ const Icon_1 = require("../../ui-kit/Icon/Icon");
|
|
|
9
9
|
const Img_1 = require("../../ui-kit/Img");
|
|
10
10
|
const Title_1 = require("../../ui-kit/Title/Title");
|
|
11
11
|
const getColSpan_1 = require("../../utils/getColSpan");
|
|
12
|
+
const alignBlock = {
|
|
13
|
+
left: 'items-start',
|
|
14
|
+
center: 'items-center',
|
|
15
|
+
right: 'items-end',
|
|
16
|
+
};
|
|
17
|
+
const alignText = {
|
|
18
|
+
left: 'text-left',
|
|
19
|
+
center: 'text-center',
|
|
20
|
+
right: 'text-right',
|
|
21
|
+
};
|
|
12
22
|
const TITLE_CLASSES = 'font-medium m-0 mb-4 whitespace-pre-wrap max-w-[600px]';
|
|
13
|
-
exports.BaseTile = (0, uni_jsx_1.JSX)(({ className, context, title, titleSize, description, children, buttons, image, items, version = 'primary', }) => {
|
|
23
|
+
exports.BaseTile = (0, uni_jsx_1.JSX)(({ className, context, title, titleSize, description, children, buttons, image, items, version = 'primary', align = 'left', }) => {
|
|
14
24
|
const router = context.useRouter();
|
|
15
25
|
const { handlerDecorator } = context;
|
|
16
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `font-sans flex flex-col grow h-full`, children: [title && ((0, jsx_runtime_1.jsx)(Title_1.Title, { size: titleSize || getTitleSizeByClassName(className), className: TITLE_CLASSES, children: title })), (0, jsx_runtime_1.jsxs)("div", { className: "flex grow justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { className:
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `font-sans flex flex-col grow h-full ${alignBlock[align]}`, children: [title && ((0, jsx_runtime_1.jsx)(Title_1.Title, { size: titleSize || getTitleSizeByClassName(className), className: TITLE_CLASSES, children: title })), (0, jsx_runtime_1.jsxs)("div", { className: "flex grow justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { className: `flex flex-col justify-between ${alignBlock[align]}`, children: [(0, jsx_runtime_1.jsxs)("div", { children: [description ? ((0, jsx_runtime_1.jsx)("div", { className: `font-normal text-base max-w-[600px] ${alignText[align]}`, children: description })) : null, children, items?.length ? renderItems(items, version) : null] }), buttons?.length ? ((0, jsx_runtime_1.jsx)("div", { className: "flex mt-9 gap-3", children: buttons.map((button, index) => renderButton((0, useLink_1.useLink)({ router, handlerDecorator }, button), index)) })) : null] }), image?.src && (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "mt-auto ml-7", image: image })] })] }));
|
|
17
27
|
});
|
|
18
28
|
function getTitleSizeByClassName(className = '') {
|
|
19
29
|
const colSpan = (0, getColSpan_1.getColSpan)(className);
|
|
@@ -28,13 +38,11 @@ function getTitleSizeByClassName(className = '') {
|
|
|
28
38
|
}
|
|
29
39
|
}
|
|
30
40
|
function renderItems(items = [], version) {
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)("section", { className: "max-w-[600px]", role: "list", children: items.map((_, i) => ((0, jsx_runtime_1.jsx)(BlockItem_1.BlockItem, { className: i ? 'mt-2.5' : '', text: _, version: version }, String(i)))) }));
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)("section", { className: "max-w-[600px] mt-5", role: "list", children: items.map((_, i) => ((0, jsx_runtime_1.jsx)(BlockItem_1.BlockItem, { className: i ? 'mt-2.5' : '', text: _, version: version }, String(i)))) }));
|
|
32
42
|
}
|
|
33
43
|
function renderButton({ icon, ...button }, i) {
|
|
34
44
|
if (!button?.text)
|
|
35
45
|
return;
|
|
36
|
-
|
|
37
|
-
return ((0, jsx_runtime_1.jsx)(Button_1.Button, { appendLeft: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: icon, width: "24", height: "24" }), ...button }, String(i)));
|
|
38
|
-
return (0, jsx_runtime_1.jsx)(Button_1.Button, { ...button }, String(i));
|
|
46
|
+
return icon ? ((0, jsx_runtime_1.jsx)(Button_1.Button, { appendLeft: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: icon, width: "24", height: "24" }), ...button }, String(i))) : ((0, jsx_runtime_1.jsx)(Button_1.Button, { ...button }, String(i)));
|
|
39
47
|
}
|
|
40
48
|
//# sourceMappingURL=BaseTile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseTile.js","sourceRoot":"","sources":["../../../src/components/BaseTile/BaseTile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAG9C,gEAA6D;AAC7D,uDAAoD;AACpD,iDAA8C;AAC9C,0CAAuC;AACvC,oDAAiD;AACjD,uDAAoD;
|
|
1
|
+
{"version":3,"file":"BaseTile.js","sourceRoot":"","sources":["../../../src/components/BaseTile/BaseTile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAG9C,gEAA6D;AAC7D,uDAAoD;AACpD,iDAA8C;AAC9C,0CAAuC;AACvC,oDAAiD;AACjD,uDAAoD;AAGpD,MAAM,UAAU,GAA8B;IAC5C,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,WAAW;CACnB,CAAC;AACF,MAAM,SAAS,GAA8B;IAC3C,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,YAAY;CACpB,CAAC;AAIF,MAAM,aAAa,GAAG,wDAAwD,CAAC;AAElE,QAAA,QAAQ,GAAG,IAAA,aAAG,EACzB,CAAC,EACC,SAAS,EACT,OAAO,EACP,KAAK,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,KAAK,GAAG,MAAM,GACf,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IACnC,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;IACrC,OAAO,CACL,iCAAK,SAAS,EAAE,uCAAuC,UAAU,CAAC,KAAK,CAAC,EAAE,aACvE,KAAK,IAAI,CACR,uBAAC,aAAK,IAAC,IAAI,EAAE,SAAS,IAAI,uBAAuB,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,aAAa,YACnF,KAAK,GACA,CACT,EACD,iCAAK,SAAS,EAAC,2BAA2B,aACxC,iCAAK,SAAS,EAAE,iCAAiC,UAAU,CAAC,KAAK,CAAC,EAAE,aAClE,4CACG,WAAW,CAAC,CAAC,CAAC,CACb,gCAAK,SAAS,EAAE,uCAAuC,SAAS,CAAC,KAAK,CAAC,EAAE,YACtE,WAAW,GACR,CACP,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,EACR,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,IAC/C,EACL,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CACjB,gCAAK,SAAS,EAAC,iBAAiB,YAC7B,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAC7B,YAAY,CAAC,IAAA,iBAAO,EAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,CACnE,GACG,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,KAAK,EAAE,GAAG,IAAI,uBAAC,SAAG,IAAC,SAAS,EAAC,cAAc,EAAC,KAAK,EAAE,KAAK,GAAI,IACzD,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,uBAAuB,CAAC,YAAoB,EAAE;IACrD,MAAM,OAAO,GAAG,IAAA,uBAAU,EAAC,SAAS,CAAC,CAAC;IACtC,IAAI,OAAO,IAAI,CAAC,EAAE;QAChB,OAAO,GAAG,CAAC;KACZ;SAAM,IAAI,OAAO,IAAI,CAAC,EAAE;QACvB,OAAO,GAAG,CAAC;KACZ;SAAM;QACL,OAAO,GAAG,CAAC;KACZ;AACH,CAAC;AAED,SAAS,WAAW,CAAC,QAAkB,EAAE,EAAE,OAAsB;IAC/D,OAAO,CACL,oCAAS,SAAS,EAAC,oBAAoB,EAAC,IAAI,EAAC,MAAM,YAChD,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACnB,uBAAC,qBAAS,IAAiB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,IAAlE,MAAM,CAAC,CAAC,CAAC,CAA6D,CACvF,CAAC,GACM,CACX,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,IAAI,EAAE,GAAG,MAAM,EAAsB,EAAE,CAAS;IACtE,IAAI,CAAC,MAAM,EAAE,IAAI;QAAE,OAAO;IAE1B,OAAO,IAAI,CAAC,CAAC,CAAC,CACZ,uBAAC,eAAM,IAAiB,UAAU,EAAE,uBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,KAAM,MAAM,IAA9E,MAAM,CAAC,CAAC,CAAC,CAAyE,CAChG,CAAC,CAAC,CAAC,CACF,uBAAC,eAAM,OAAqB,MAAM,IAArB,MAAM,CAAC,CAAC,CAAC,CAAgB,CACvC,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,15 @@ import type { Picture } from '../../model/Picture';
|
|
|
3
3
|
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
4
4
|
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
5
5
|
import type { TitleSize } from '../../ui-kit/Title/TitleProps';
|
|
6
|
+
/**
|
|
7
|
+
* @title Выравнивание
|
|
8
|
+
* @enumNames [
|
|
9
|
+
* "По левому краю",
|
|
10
|
+
* "По центру",
|
|
11
|
+
* "По правому краю"
|
|
12
|
+
* ]
|
|
13
|
+
*/
|
|
14
|
+
export declare type AlignType = 'left' | 'center' | 'right';
|
|
6
15
|
export interface BaseTileIconButton extends ButtonWithIconProps {
|
|
7
16
|
icon?: IconName;
|
|
8
17
|
}
|
|
@@ -28,4 +37,5 @@ export interface BaseTileCommonProps {
|
|
|
28
37
|
*/
|
|
29
38
|
buttons?: BaseTileIconButton[];
|
|
30
39
|
version?: BlockVersion;
|
|
40
|
+
align?: AlignType;
|
|
31
41
|
}
|
|
@@ -4,7 +4,9 @@ import type { ExchangeRateTileContent } from './ExchangeRateTile/ExchangeRateTil
|
|
|
4
4
|
import type { FooterContent } from './Footer/FooterContent';
|
|
5
5
|
import type { GalleryContent } from './Gallery/GalleryContent';
|
|
6
6
|
import type { HeaderContent } from './Header/HeaderContent';
|
|
7
|
+
import type { LinkDocsContent } from './LinkDocs/LinkDocsContent';
|
|
7
8
|
import type { MobileAppTileContent } from './MobileAppTile/MobileAppTileContent';
|
|
9
|
+
import type { PictureTextContent } from './PictureText/PictureTextContent';
|
|
8
10
|
import type { PlaceholderContent } from './Placeholder/PlaceholderContent';
|
|
9
11
|
import type { ProductBlockContent } from './ProductBlock/ProductBlockContent';
|
|
10
12
|
import type { ProductGalleryContent } from './ProductGallery/ProductGalleryContent';
|
|
@@ -16,4 +18,4 @@ import type { TileContent } from './Tile/TileContent';
|
|
|
16
18
|
/**
|
|
17
19
|
* @hidden
|
|
18
20
|
*/
|
|
19
|
-
export declare type BlockContent =
|
|
21
|
+
export declare type BlockContent = BenefitsBlockContent | ComparisonTableContent | ExchangeRateTileContent | FooterContent | GalleryContent | HeaderContent | LinkDocsContent | MobileAppTileContent | PictureTextContent | PlaceholderContent | ProductBlockContent | ProductGalleryContent | ProductTileContent | PromoTileContent | StepsBlockContent | TextBlockContent | TileContent;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
export declare const Blocks: {
|
|
2
|
-
|
|
3
|
-
Footer: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Footer/Footer").FooterProps, any>, context?: any) => any;
|
|
4
|
-
Placeholder: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Placeholder/Placeholder").PlaceholderProps, any>, context?: any) => any;
|
|
5
|
-
Tile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Tile/Tile").TileProps, any>, context?: any) => any;
|
|
6
|
-
PromoTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./PromoTile/PromoTile").PromoTileProps, any>, context?: any) => any;
|
|
7
|
-
TextBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./TextBlock/TextBlock").TextBlockProps, any>, context?: any) => any;
|
|
8
|
-
ProductTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductTile/ProductTile").ProductTileProps, any>, context?: any) => any;
|
|
9
|
-
ProductBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductBlock/ProductBlock").ProductBlockProps, any>, context?: any) => any;
|
|
10
|
-
StepsBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./StepsBlock/StepsBlock").StepsBlockProps, any>, context?: any) => any;
|
|
2
|
+
Accordion: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Accordion/Accordion").AccordionProps, any>, context?: any) => any;
|
|
11
3
|
BenefitsBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./BenefitsBlock/BenefitsBlock").BenefitsBlockProps, any>, context?: any) => any;
|
|
12
|
-
|
|
4
|
+
ComparisonTable: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ComparisonTable/ComparisonTable").ComparisonTableProps, any>, context?: any) => any;
|
|
5
|
+
CreditCalculator: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./CreditCalculator/CreditCalculator").CreditCalculatorProps, any>, context?: any) => any;
|
|
13
6
|
ExchangeRateTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ExchangeRateTile/ExchangeRateTile").ExchangeRateTileProps, any>, context?: any) => any;
|
|
14
|
-
|
|
7
|
+
Footer: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Footer/Footer").FooterProps, any>, context?: any) => any;
|
|
15
8
|
Gallery: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Gallery/Gallery").GalleryProps, any>, context?: any) => any;
|
|
9
|
+
Header: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Header/Header").HeaderProps, any>, context?: any) => any;
|
|
10
|
+
Headline: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Headline/Headline").HeadlineProps, any>, context?: any) => any;
|
|
11
|
+
LinkDocs: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./LinkDocs/LinkDocs").LinkDocsProps, any>, context?: any) => any;
|
|
16
12
|
MiniGallery: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./MiniGallery/MiniGallery").MiniGalleryProps, any>, context?: any) => any;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
MobileAppTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./MobileAppTile/MobileAppTile").MobileAppTileProps, any>, context?: any) => any;
|
|
14
|
+
PictureText: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./PictureText/PictureText").PictureTextProps, any>, context?: any) => any;
|
|
15
|
+
Placeholder: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Placeholder/Placeholder").PlaceholderProps, any>, context?: any) => any;
|
|
16
|
+
ProductBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductBlock/ProductBlock").ProductBlockProps, any>, context?: any) => any;
|
|
17
|
+
ProductGallery: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductGallery/ProductGallery").ProductGalleryProps, any>, context?: any) => any;
|
|
18
|
+
ProductTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductTile/ProductTile").ProductTileProps, any>, context?: any) => any;
|
|
19
|
+
PromoTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./PromoTile/PromoTile").PromoTileProps, any>, context?: any) => any;
|
|
20
|
+
StepsBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./StepsBlock/StepsBlock").StepsBlockProps, any>, context?: any) => any;
|
|
21
|
+
TextBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./TextBlock/TextBlock").TextBlockProps, any>, context?: any) => any;
|
|
22
|
+
Tile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Tile/Tile").TileProps, any>, context?: any) => any;
|
|
20
23
|
};
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.Blocks = void 0;
|
|
3
|
+
const Accordion_1 = require("./Accordion/Accordion");
|
|
3
4
|
const BenefitsBlock_1 = require("./BenefitsBlock/BenefitsBlock");
|
|
5
|
+
const ComparisonTable_1 = require("./ComparisonTable/ComparisonTable");
|
|
6
|
+
const CreditCalculator_1 = require("./CreditCalculator/CreditCalculator");
|
|
4
7
|
const ExchangeRateTile_1 = require("./ExchangeRateTile/ExchangeRateTile");
|
|
5
8
|
const Footer_1 = require("./Footer/Footer");
|
|
6
9
|
const Gallery_1 = require("./Gallery/Gallery");
|
|
7
10
|
const Header_1 = require("./Header/Header");
|
|
11
|
+
const Headline_1 = require("./Headline/Headline");
|
|
12
|
+
const LinkDocs_1 = require("./LinkDocs/LinkDocs");
|
|
8
13
|
const MiniGallery_1 = require("./MiniGallery/MiniGallery");
|
|
9
14
|
const MobileAppTile_1 = require("./MobileAppTile/MobileAppTile");
|
|
15
|
+
const PictureText_1 = require("./PictureText/PictureText");
|
|
10
16
|
const Placeholder_1 = require("./Placeholder/Placeholder");
|
|
11
17
|
const ProductBlock_1 = require("./ProductBlock/ProductBlock");
|
|
12
18
|
const ProductGallery_1 = require("./ProductGallery/ProductGallery");
|
|
@@ -15,27 +21,27 @@ const PromoTile_1 = require("./PromoTile/PromoTile");
|
|
|
15
21
|
const StepsBlock_1 = require("./StepsBlock/StepsBlock");
|
|
16
22
|
const TextBlock_1 = require("./TextBlock/TextBlock");
|
|
17
23
|
const Tile_1 = require("./Tile/Tile");
|
|
18
|
-
const ComparisonTable_1 = require("./ComparisonTable/ComparisonTable");
|
|
19
|
-
const Accordion_1 = require("./Accordion/Accordion");
|
|
20
|
-
const CreditCalculator_1 = require("./CreditCalculator/CreditCalculator");
|
|
21
24
|
exports.Blocks = {
|
|
22
|
-
|
|
23
|
-
Footer: Footer_1.Footer,
|
|
24
|
-
Placeholder: Placeholder_1.Placeholder,
|
|
25
|
-
Tile: Tile_1.Tile,
|
|
26
|
-
PromoTile: PromoTile_1.PromoTile,
|
|
27
|
-
TextBlock: TextBlock_1.TextBlock,
|
|
28
|
-
ProductTile: ProductTile_1.ProductTile,
|
|
29
|
-
ProductBlock: ProductBlock_1.ProductBlock,
|
|
30
|
-
StepsBlock: StepsBlock_1.StepsBlock,
|
|
25
|
+
Accordion: Accordion_1.Accordion,
|
|
31
26
|
BenefitsBlock: BenefitsBlock_1.BenefitsBlock,
|
|
32
|
-
|
|
27
|
+
ComparisonTable: ComparisonTable_1.ComparisonTable,
|
|
28
|
+
CreditCalculator: CreditCalculator_1.CreditCalculator,
|
|
33
29
|
ExchangeRateTile: ExchangeRateTile_1.ExchangeRateTile,
|
|
34
|
-
|
|
30
|
+
Footer: Footer_1.Footer,
|
|
35
31
|
Gallery: Gallery_1.Gallery,
|
|
32
|
+
Header: Header_1.Header,
|
|
33
|
+
Headline: Headline_1.Headline,
|
|
34
|
+
LinkDocs: LinkDocs_1.LinkDocs,
|
|
36
35
|
MiniGallery: MiniGallery_1.MiniGallery,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
MobileAppTile: MobileAppTile_1.MobileAppTile,
|
|
37
|
+
PictureText: PictureText_1.PictureText,
|
|
38
|
+
Placeholder: Placeholder_1.Placeholder,
|
|
39
|
+
ProductBlock: ProductBlock_1.ProductBlock,
|
|
40
|
+
ProductGallery: ProductGallery_1.ProductGallery,
|
|
41
|
+
ProductTile: ProductTile_1.ProductTile,
|
|
42
|
+
PromoTile: PromoTile_1.PromoTile,
|
|
43
|
+
StepsBlock: StepsBlock_1.StepsBlock,
|
|
44
|
+
TextBlock: TextBlock_1.TextBlock,
|
|
45
|
+
Tile: Tile_1.Tile,
|
|
40
46
|
};
|
|
41
47
|
//# sourceMappingURL=Blocks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blocks.js","sourceRoot":"","sources":["../../src/components/Blocks.ts"],"names":[],"mappings":";;AAAA,iEAA8D;AAC9D,0EAAuE;AACvE,4CAAyC;AACzC,+CAA4C;AAC5C,4CAAyC;AACzC,2DAAwD;AACxD,iEAA8D;AAC9D,2DAAwD;AACxD,8DAA2D;AAC3D,oEAAiE;AACjE,2DAAwD;AACxD,qDAAkD;AAClD,wDAAqD;AACrD,qDAAkD;AAClD,sCAAmC;
|
|
1
|
+
{"version":3,"file":"Blocks.js","sourceRoot":"","sources":["../../src/components/Blocks.ts"],"names":[],"mappings":";;AAAA,qDAAkD;AAClD,iEAA8D;AAC9D,uEAAoE;AACpE,0EAAuE;AACvE,0EAAuE;AACvE,4CAAyC;AACzC,+CAA4C;AAC5C,4CAAyC;AACzC,kDAA+C;AAC/C,kDAA+C;AAC/C,2DAAwD;AACxD,iEAA8D;AAC9D,2DAAwD;AACxD,2DAAwD;AACxD,8DAA2D;AAC3D,oEAAiE;AACjE,2DAAwD;AACxD,qDAAkD;AAClD,wDAAqD;AACrD,qDAAkD;AAClD,sCAAmC;AAEtB,QAAA,MAAM,GAAG;IACpB,SAAS,EAAT,qBAAS;IACT,aAAa,EAAb,6BAAa;IACb,eAAe,EAAf,iCAAe;IACf,gBAAgB,EAAhB,mCAAgB;IAChB,gBAAgB,EAAhB,mCAAgB;IAChB,MAAM,EAAN,eAAM;IACN,OAAO,EAAP,iBAAO;IACP,MAAM,EAAN,eAAM;IACN,QAAQ,EAAR,mBAAQ;IACR,QAAQ,EAAR,mBAAQ;IACR,WAAW,EAAX,yBAAW;IACX,aAAa,EAAb,6BAAa;IACb,WAAW,EAAX,yBAAW;IACX,WAAW,EAAX,yBAAW;IACX,YAAY,EAAZ,2BAAY;IACZ,cAAc,EAAd,+BAAc;IACd,WAAW,EAAX,yBAAW;IACX,SAAS,EAAT,qBAAS;IACT,UAAU,EAAV,uBAAU;IACV,SAAS,EAAT,qBAAS;IACT,IAAI,EAAJ,WAAI;CACL,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UniBlockProps } from '../../types';
|
|
2
|
+
import type { HeadlineContent } from './HeadlineContent';
|
|
3
|
+
export interface HeadlineProps extends UniBlockProps, HeadlineContent {
|
|
4
|
+
}
|
|
5
|
+
export declare const Headline: (props: import("@redneckz/uni-jsx").PropsWithChildren<HeadlineProps, any>, context?: any) => any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.Headline = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const BaseTile_1 = require("../BaseTile/BaseTile");
|
|
6
|
+
exports.Headline = (0, uni_jsx_1.JSX)(({ bgColor = 'bg-white', className, ...props }) => {
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)("section", { className: `p-10 ${bgColor} ${className || ''} `, children: (0, jsx_runtime_1.jsx)(BaseTile_1.BaseTile, { ...props }) }));
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=Headline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Headline.js","sourceRoot":"","sources":["../../../src/components/Headline/Headline.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,mDAAgD;AAKnC,QAAA,QAAQ,GAAG,IAAA,aAAG,EAAgB,CAAC,EAAE,OAAO,GAAG,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC3F,OAAO,CACL,oCAAS,SAAS,EAAE,QAAQ,OAAO,IAAI,SAAS,IAAI,EAAE,GAAG,YACvD,uBAAC,mBAAQ,OAAK,KAAK,GAAa,GACxB,CACX,CAAC;AACJ,CAAC,CAAC,CAAC"}
|