@redneckz/wildless-cms-uni-blocks 0.3.50 → 0.3.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/bundle.umd.js +2 -0
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +2 -0
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/index.d.ts +2 -0
- package/mobile/dist/index.js +5 -1
- package/mobile/dist/index.js.map +1 -1
- package/mobile/lib/index.d.ts +2 -0
- package/mobile/lib/index.js +2 -0
- package/mobile/lib/index.js.map +1 -1
- package/mobile/src/index.ts +2 -0
- package/package.json +1 -1
- package/src/index.ts +2 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -2130,11 +2130,13 @@
|
|
|
2130
2130
|
}
|
|
2131
2131
|
|
|
2132
2132
|
exports.Blocks = Blocks;
|
|
2133
|
+
exports.Button = Button;
|
|
2133
2134
|
exports.ContentPage = ContentPage;
|
|
2134
2135
|
exports.ContentPageHead = ContentPageHead;
|
|
2135
2136
|
exports.DaDataAPI = DaDataAPI;
|
|
2136
2137
|
exports.Header = Header;
|
|
2137
2138
|
exports.Icon = Icon;
|
|
2139
|
+
exports.Image = Img;
|
|
2138
2140
|
exports.LikeAPI = LikeAPI;
|
|
2139
2141
|
exports.joinList = joinList;
|
|
2140
2142
|
exports.normalizePage = normalizePage;
|
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 l=Object.assign({},a,r?{innerHTML:r.__html}:{});return e(t,l,"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||{},l=n?.slots?.default,i=r||l&&l();return e(Object.assign(a,i&&{children:i}),n)},e._tmpl.inheritAttrs=!1),e._tmpl);const l="likesToken";const i={h1:"text-title-xl tracking-[-0.3px]",h2:"text-title-lg",h3:"text-title",h4:"text-title-sm",h5:"text-title-xs",h6:"text-title-2xs tracking-[0.2px]"},s=a((e=>{const{className:t="",headingType:r,title:a,as:l}=e;if(!r)return;return n(l||r,{className:`font-sans m-0 ${i[r]} ${t}`,children:a})}));var o,c;!function(e){e.ActualBalanceIcon="ActualBalanceIcon",e.AppleIcon="AppleIcon",e.ArrowDownIcon="ArrowDownIcon",e.ArrowLeftIcon="ArrowLeftIcon",e.ArrowsRewindRight="ArrowsRewindRight",e.ArrowUpIcon="ArrowUpIcon",e.AtmIcon="AtmIcon",e.BankIcon="BankIcon",e.BurgerIcon="BurgerIcon",e.BurgerIconWhite="BurgerIconWhite",e.Calendar2Icon="Calendar2Icon",e.CalendarCircleIcon="CalendarCircleIcon",e.CalendarIcon="CalendarIcon",e.CalendarTickIcon="CalendarTickIcon",e.CalendarWhiteIcon="CalendarWhiteIcon",e.CardIcon="CardIcon",e.CardPosIcon="CardPosIcon",e.CardTickIcon="CardTickIcon",e.CardWithGemIcon="CardWithGemIcon",e.ChartSquareIcon="ChartSquareIcon",e.ClockIcon="ClockIcon",e.CloseIcon="CloseIcon",e.ComfortableCompIcon="ComfortableCompIcon",e.CreditCardsIcon="CreditCardsIcon",e.DiscountShapeIcon="DiscountShapeIcon",e.DocIcon="DocIcon",e.DocIconMonoColor="DocIconMonoColor",e.DocumentTextIcon="DocumentTextIcon",e.DollarIcon="DollarIcon",e.EarthIcon="EarthIcon",e.EmptyWalletChangeIcon="EmptyWalletChangeIcon",e.EmptyWalletIcon="EmptyWalletIcon",e.EmptyWalletWhiteIcon="EmptyWalletWhiteIcon",e.EuroIcon="EuroIcon",e.GeolocationIcon="GeolocationIcon",e.GlassIcon="GlassIcon",e.GlobalIcon="GlobalIcon",e.GpsIcon="GpsIcon",e.GridIcon="GridIcon",e.GridIconWhite="GridIconWhite",e.InterestGrowthIcon="InterestGrowthIcon",e.InterestIcon="InterestIcon",e.JCBIcon="JCBIcon",e.LoupeIcon="LoupeIcon",e.MasterCardIcon="MasterCardIcon",e.MinusIcon="MinusIcon",e.MirIcon="MirIcon",e.MoneyIcon="MoneyIcon",e.MoneyInsuranceIcon="MoneyInsuranceIcon",e.MonitorMobileIcon="MonitorMobileIcon",e.NewDocIcon="NewDocIcon",e.OfficeIcon="OfficeIcon",e.OkIcon="OkIcon",e.PassSendIcon="PassSendIcon",e.PercentageRoundIcon="PercentageRoundIcon",e.PercentageSquareIcon="PercentageSquareIcon",e.PercentageSquareWhiteIcon="PercentageSquareWhiteIcon",e.PersonalCardIcon="PersonalCardIcon",e.PlayMarketIcon="PlayMarketIcon",e.PlusIcon="PlusIcon",e.Profile2UserIcon="Profile2UserIcon",e.ProfileIcon="ProfileIcon",e.RoundRubleIcon="RoundRubleIcon",e.SafeIcon="SafeIcon",e.ShieldTickIcon="ShieldTickIcon",e.SignDocsIcon="SignDocsIcon",e.SmallClockIcon="SmallClockIcon",e.TelegramIcon="TelegramIcon",e.UnionPayIcon="UnionPayIcon",e.UserTickIcon="UserTickIcon",e.VisaIcon="VisaIcon",e.VKIcon="VKIcon",e.WalletAdd2Icon="WalletAdd2Icon",e.WalletAddIcon="WalletAddIcon",e.WalletIcon="WalletIcon",e.WalletWithMoneyIcon="WalletWithMoneyIcon"}(o||(o={})),function(e){e.ActualBalanceIcon="Деньги",e.AppleIcon="Лого «Apple»",e.ArrowDownIcon="Стрелка 'Вниз'",e.ArrowLeftIcon="Стрелка",e.ArrowsRewindRight="ArrowsRewindRight",e.ArrowUpIcon="ArrowUpIcon",e.AtmIcon="Банкомат",e.BankIcon="Банк",e.BurgerIcon="Бургер",e.BurgerIconWhite="Бургер (белый)",e.Calendar2Icon="Календарь 2",e.CalendarCircleIcon="Скруглённый календарь",e.CalendarIcon="Календарь",e.CalendarTickIcon="Календарь с галочкой",e.CalendarWhiteIcon="Календарь белый",e.CardIcon="Кред. карта",e.CardPosIcon="Кред. карта под наклоном",e.CardTickIcon="Кред. карта с галочкой",e.CardWithGemIcon="Карта с драгоценностями",e.ChartSquareIcon="Деньги внутри кошелька",e.ClockIcon="Часы",e.CloseIcon="Крестик",e.ComfortableCompIcon="Кресло",e.CreditCardsIcon="Кредитные карты",e.DiscountShapeIcon="Скидка",e.DocIcon="Документ",e.DocIconMonoColor="Документ (одноцветный)",e.DocumentTextIcon="Документ с текстом",e.DollarIcon="Доллар",e.EarthIcon="Земля",e.EmptyWalletChangeIcon="Пустой кошелёк с возвратом",e.EmptyWalletIcon="Пустой кошелёк",e.EmptyWalletWhiteIcon="Пустой кошелёк (белый)",e.EuroIcon="Евро",e.GeolocationIcon="Геолокация",e.GlassIcon="Зеркало",e.GlobalIcon="Глобус",e.GpsIcon="Gps",e.GridIcon="Сетка",e.GridIconWhite="Сетка (белая)",e.InterestGrowthIcon="Диаграмма роста",e.InterestIcon="Скидка",e.JCBIcon="JCB",e.LoupeIcon="Лупа",e.MasterCardIcon="MasterCard",e.MinusIcon="Минус",e.MirIcon="МИР",e.MoneyIcon="Деньги",e.MoneyInsuranceIcon="Денежное страхование",e.MonitorMobileIcon="Монитор и мобильный",e.NewDocIcon="Новый документ",e.OfficeIcon="Офис",e.OkIcon="Лого «Одноклассники»",e.PassSendIcon="Бизнес",e.PercentageRoundIcon="Проценты (круг.)",e.PercentageSquareIcon="Проценты",e.PercentageSquareWhiteIcon="Проценты белые",e.PersonalCardIcon="Персональная карта",e.PlayMarketIcon="Лого «PlayMarket»",e.PlusIcon="Плюс",e.Profile2UserIcon="Профиль, 2 персоны",e.ProfileIcon="Профиль",e.RoundRubleIcon="Рубль (круг.)",e.SafeIcon="Сейф",e.ShieldTickIcon="Безопасность",e.SignDocsIcon="Подписанные документы",e.SmallClockIcon="Маленькие часы",e.TelegramIcon="Лого «Telegram»",e.UnionPayIcon="UnionPay",e.UserTickIcon="Пользователь",e.VisaIcon="Visa",e.VKIcon="Лого «VK»",e.WalletAdd2Icon="Пополнение карты",e.WalletAddIcon="Кошелёк с плюсом",e.WalletIcon="Кошелёк",e.WalletWithMoneyIcon="Кошелёк с деньгами"}(c||(c={}));const d=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=`Иконка ${c[t]||t}`,title:l=a,iconVersion:i,asSVG:s,...o})=>{const m=`${d.CDN||""}icons/${t}.svg`,h="white"===i?"text-black invert":"";return s?r("svg",{className:e,...o,"aria-hidden":"true",children:[l?n("title",{children:l}):null,a?n("desc",{children:a}):null,n("use",{className:h,href:`${m}#icon`,xlinkHref:`${m}#icon`})]}):n("img",{className:e,src:m,alt:a,title:l,...o,"aria-hidden":"true"})}));function h(e){return"string"==typeof e?"normal":e.iconVersion||"normal"}const x=a((({className:e="",image:t,imageClassName:r="",...a})=>{if(!t)return null;const l="string"==typeof t?t:t.icon;return l||""===l?l.length?n(m,{className:e,iconVersion:h(t),name:l,...a}):null:n(u,{className:e,imageClassName:r,image:t})})),u=a((({className:e="",image:t,imageClassName:a=""})=>t?r("picture",{className:`flex-none ${e}`,children:[t?.sources?.length?t.sources.map((({src:e,format:t},r)=>n("source",{srcSet:e,type:b(t)},`${r}_${e}`))):null,p(t,a)]}):null)),p=(e,t="")=>{const r={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},a=e.title||"",l=e.alt||e.title;return n("img",{src:e.src,className:t,alt:l,title:a,style:r,...e.size})};function b(e){return e?`image/${String(e)}`:void 0}const g={left:"text-left",center:"text-center",right:"text-right"},f={transparent:{background:"bg-transparent",text:"text-primary-text",description:"text-primary-text"},primary:{background:"bg-white",text:"text-primary-text",description:"text-primary-text"},secondary:{background:"bg-primary-main",text:"text-white",description:"text-white/80"}},N=a((({bgColorHeadline:e="transparent",align:t="left",className:a="",title:l,description:i,anchor:o=null})=>{const c=f[e];return r("section",{className:`p-[50px] ${c.background} ${a}`,id:o,children:[l&&n(s,{headingType:"h2",className:`text-primary-text ${c.text} ${g[t]}`,title:l}),i&&n("p",{className:`font-normal text-base mt-4 ${c.text} ${g[t]}`,children:i})]})})),v=a((({className:e,iconClassName:t,textClassName:a,suffixClassName:l,doc:i,icon:s})=>{const{text:o,fileSize:c,...d}=i;return r("a",{className:e,role:"link",...d,children:[s?n(x,{className:t,image:s,width:"24px",height:"24px",asSVG:!0}):null,o?r("span",{className:a,children:[o,n("span",{className:l,children:d?.href&&y(w(d.href),c)})]}):null]})})),y=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),w=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},I=a((({className:e="",doc:t,icon:r})=>n(v,{className:`flex h-full box-border ${e}`,iconClassName:"mr-2.5 min-w-6 min-h-6",textClassName:"self-center font-light",suffixClassName:"text-secondary-text group-hover:text-primary-main",doc:t,icon:r}))),k=a((({className:e,documents:t,columnsMode:r="double",icon:a})=>t?.length?n("div",{className:e,role:"list",children:t.map(((e,t)=>n("div",{className:"double"===r?"basis-[calc(50%-20px)]":"",role:"listitem",children:n(I,{className:"group flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:a})},String(t))))}):null)),C={left:"text-left",center:"text-center",right:"text-right"},$={double:"mb-8",single:"mb-[26px]"},S={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},T=a((({className:e="",title:t,subtitle:a,align:l,documents:i,icon:o={icon:"DocIcon"},columnsMode:c="double",anchor:d=null})=>r("section",{className:`font-sans text-primary-text p-[50px] bg-white ${e}`,id:d,children:[t?n(s,{headingType:"h2",className:`${a?"mb-2.5":$[c]} ${C[l??"center"]}`,title:t}):null,a?n("h3",{className:`text-base mt-0 font-normal ${$[c]} ${C[l??"center"]}`,children:a}):null,n(k,{className:S[c],columnsMode:c,documents:i,icon:o})]}))),D={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},A=a((({className:e="",title:t,image:a,benefits:l,version:i="primary",directionRight:o=!1,anchor:c=null})=>r("section",{className:`relative font-sans p-14 ${D[i]} ${e}`,id:c,children:[n(s,{headingType:"h2",className:"text-center",title:t}),r("div",{className:"flex justify-center mt-9",children:[a?.src&&n(x,{className:o?"order-2 ml-6":"mr-6",image:a}),l?.length?n("div",{className:"flex flex-col",children:l.map(((e,t)=>function(e,t,a){return r("div",{className:"flex flex-row mb-8",children:[e.icon?n(x,{className:"w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]",image:e.icon,width:"48",height:"48",asSVG:!0}):null,r("div",{className:"flex gap-1 flex-col h-full ml-5 max-w-[490px]",children:[e.label&&n("div",{className:"font-medium text-xl m-0 "+("primary"===a?"text-primary-text":""),children:e.label}),e.description&&n("div",{className:"font-normal text-sm "+("primary"===a?"text-secondary-text":""),children:e.description})]})]},String(t))}(e,t,i)))}):null]})]})));const R=e=>e?.includes("//"),M=e=>(e||"").replace(/\/?\?.*/,""),L=e=>{if(!e||!R(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t},P=e=>{if(!e||!R(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0};var j=Object.freeze({__proto__:null,isURL:R,withoutQuery:M,getOrigin:L,getHash:P});const B="/mobile",_=(e,t)=>{if(!e)return e;const n=L(t?.href);return n?e.replace(n,"")||"/":e},V=e=>e;function G({router:e,handlerDecorator:t=V},n){const r=((e,t)=>{if(!e)return e;const n=_(e,t)||"",r=t?.pathname.startsWith(B);return r&&!R(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:r,"aria-label":n.text,onClick:t((t=>{const a=r&&!R(r),l=!n.target||"_self"===n.target;a&&l&&(t.preventDefault(),e.push(r))}),n)}}const W=a((({text:e,href:t,target:r,onClick:a,className:l="",children:i})=>t?n("a",{className:`no-underline ${l}`,href:t,target:r,onClick:a,children:n("span",{className:l,children:e||i})}):n("span",{className:l,children:e||i})));function E(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])}const O=a((e=>{const{text:t,aboveText:a,appendLeft:l}=e;return r("div",{className:F(e),children:[l||null,H(e)?r("div",{children:[n("div",{className:"text-m-2xs font-light text-left",children:a}),n("div",{className:"text-button text-left",children:t})]}):null]})})),F=e=>{const{version:t,aboveText:n,rounded:r}=e;if("link"===t)return"";const a="px-8 gap-2 "+(n?"py-2":"py-[18px]");return["flex items-center justify-center",H(e)?a:"h-12 w-12",r?"rounded-full":""].join(" ")},H=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),U={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",link:""},Z={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},z="text-center font-sans select-none",q=a((e=>{const{text:t,aboveText:r,appendLeft:a,children:l,disabled:i,rounded:s,...o}=e,c=l??n(O,{text:t,aboveText:r,appendLeft:a,rounded:s});return n(i?K:J,{rounded:s,...o,children:c})})),J=a((({className:e="",ariaLabel:t,version:r="none",rounded:a,href:l,target:i,children:s,onClick:o,...c})=>n("a",{className:`${z} inline-block cursor-pointer no-underline ${U[r]||""} ${a?"rounded-full":"rounded-md"} ${e}`,href:l,target:i,onClick:o,"aria-label":t,role:l?"link":"button",...c,children:s}))),K=a((({className:e,children:t,ariaLabel:r,version:a="none",rounded:l})=>n("div",{role:"button","aria-disabled":"true","aria-label":r,tabIndex:"-1",className:`inline-block ${z} ${Z[a]||""} ${l?"rounded-full":"rounded-md"} ${e||""}`,children:t}))),X=a((({context:e,className:t="",buttons:r})=>{const{handlerDecorator:a}=e,l=e.useRouter();return r?.length?n("div",{className:`${t}`,children:r.map(((e,t)=>function({icon:e,...t},r){if(!t?.text)return;return n(q,e?{appendLeft:n(x,{image:e,width:"24",height:"24",asSVG:!0}),...t}:{...t},String(r))}(G({router:l,handlerDecorator:a},e),t)))}):null}));const Q=a((e=>{const{className:t="",description:r}=e;return n("div",{className:`font-normal text-base ${t}`,children:r})})),Y={primary:"rounded-full inline-block mr-3 mt-2",secondary:"rounded-full inline-block mr-3 mt-2",gray:"rounded-full inline-block mr-3 mt-2",tile:"rounded-full inline-block mr-4 mt-3","tile-white":"rounded-full inline-block mr-4 mt-3"},ee={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text",tile:"bg-black","tile-white":"bg-white"},te=a((({className:e="",isDotted:t=!0,children:a,version:l="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&n("div",{className:ne(l)}),n("span",{children:a})]}))),ne=e=>`${Y[e]} ${ee[e]} ${{primary:"w-2 h-2 min-w-2 min-h-2",secondary:"w-2 h-2 min-w-2 min-h-2",gray:"w-1.5 h-1.5 min-w-1.5 min-h-1.5",tile:"w-[7px] h-[7px] min-w-[7px] min-h-[7px]","tile-white":"w-[7px] h-[7px] min-w-[7px] min-h-[7px]"}[e]}`,re={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text",tile:"text-primary-text","tile-white":"text-white"},ae=a((e=>{const{className:t="",itemClassName:r,isDotted:a,items:l,version:i="primary"}=e;return n("section",{className:`${re[i]} ${t}`,role:"list",children:l?.length?l.map(((e,t)=>n(te,{className:r,isDotted:a,version:i,children:e},String(t)))):null})})),le=a((({className:e="",title:t,children:a,buttons:l,image:i,anchor:s=null})=>r("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,id:s,children:[t,r("div",{className:"flex grow w-full justify-between",children:[r("div",{className:"flex flex-col justify-between w-full",children:[n("div",{children:a}),l?n("div",{children:l}):null]}),i]})]}))),ie={primary:"text-primary-text",secondary:"text-white"},se={primary:"text-secondary-text",secondary:"text-white"};function oe(e,t){let n="bg-primary-main text-black";return"secondary"===e?n="bg-white/30 text-black":"normal"===t&&(n="bg-secondary-light text-primary-main"),`w-[50px] h-[50px] min-w-[50px] min-h-[50px] rounded-full p-[10px] box-border ${n}`}const ce=a((({className:e="",context:t,title:a,headingType:l="h2",description:i,benefits:s,benefitsVersion:o="normal",buttons:c,image:d,items:m,version:h="primary",isDotted:u=!0,textBlockClassName:p=""})=>{const b="secondary"===h?"text-white":"text-primary-text";return r("div",{className:`flex grow justify-between items-stretch ${e}`,children:[n("div",{className:`flex flex-col ${p}`,children:r(le,{context:t,title:de(a,l),buttons:me(t,c),children:[i&&n(Q,{className:`mt-4 max-w-[600px] text-md font-light ${b}`,description:i}),s?.filter((e=>e.label))?.length?n("div",{className:"flex gap-6 mt-6",children:s.map(((e,t)=>function({benefit:e,version:t="primary",benefitsVersion:a="normal"},l){const i="white"===a||"secondary"===t;return r("div",{className:"flex gap-4 items-center",children:[e.icon?n(x,{className:oe(t,a),image:{...e?.icon,iconVersion:i?"white":"normal"},width:"24",height:"24",asSVG:!0}):null,r("div",{className:"flex gap-0.5 flex-col h-full max-w-[149px] min-w-[149px]",children:[n("div",{className:`text-xl m-0 ${ie[t]}`,children:e.label}),e.description&&n("div",{className:`font-light text-m-md ${se[t]}`,children:e.description})]})]},String(l))}({benefit:e,version:h,benefitsVersion:o},t)))}):null,m?.length?n(ae,{className:"mt-5 text-title-2xs font-light",items:m,itemClassName:"mb-[7px]",version:h,isDotted:u}):null]})}),d?.src&&n(x,{className:"mt-auto",image:d})]})})),de=(e,t)=>e&&n(s,{headingType:t,title:e,className:"whitespace-pre-wrap max-w-[600px]"}),me=(e,t)=>t?.length?n(X,{context:e,buttons:t,className:"flex mt-9 gap-4"}):null;function he(e,t,a){return r("div",{className:`flex items-center ${a}`,children:[n(q,{version:t,rounded:!0,className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3",ariaLabel:e?.text,href:e?.href,children:n(x,{className:"w-4 h-4",image:e?.icon||{icon:"ArrowLeftIcon"},asSVG:!0})}),e?.text?n("span",{className:"text-m-md font-light",children:e.text}):null]})}const xe={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ue={primary:"text-secondary-text",secondary:"text-white/80"},pe=a((e=>{const{context:t,className:a="",breadcrumbs:l,backwardButton:i,version:s="primary",anchor:o=null,...c}=e,d=t.useRouter(),{handlerDecorator:m}=t;return r("section",{className:`font-sans overflow-hidden pt-[50px] pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${xe[s]} ${a}`,id:o,children:[i?.text?he(i,s,"mb-10 -mt-2.5"):null,l?.length?n("div",{className:"text-xs mb-6",children:E(n("span",{className:`mx-2 ${ue[s]}`,children:"/"}))(l.map(((e,t)=>n(W,{...G({router:d,handlerDecorator:m},{className:ue[s],...e})},String(t)))))}):null,n(ce,{context:t,version:s,...c})]})})),be={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"}},ge=a((({title:e,description:t,blockVersion:a="primary",iconVersion:l,image:i,className:s,anchor:o=null})=>{const c=be[a];return r("section",{className:`font-sans px-9 py-4 flex ${c.background} ${s||""}`,id:o,children:["small"===l?fe(c.icon):null,"big"===l?Ne(i):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 fe(e){return n("div",{className:"pt-1.5 pl-1 pr-4",children:n("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function Ne(e){return e?.src?n(x,{className:"pt-0.5 pr-3",image:e}):null}const ve=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function ye(e=""){const t=ve(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function we(e=""){const t=ve(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Ie={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ke=a((e=>{const{context:t,title:a,headingType:l="h3",description:i,items:o,children:c,buttons:d,image:m,className:h="",version:u="primary",role:p,anchor:b=null}=e;return n("section",{className:`overflow-hidden font-sans p-9 pr-3 box-border ${h} ${Ie[u]} ${we(h)} ${ye(h)} `,role:p,id:b,children:r(le,{context:t,title:a&&n(s,{headingType:l,as:"h3",title:a,className:`whitespace-pre-wrap max-w-[600px] ${a?"mb-3":""}\n ${"primary"===u?"text-primary-text":""}`}),buttons:d?.length?n(X,{context:t,buttons:d,className:"flex mt-9 gap-3"}):null,image:m?.src&&n(x,{className:"mt-auto ml-7",image:m}),children:[i&&n(Q,{className:"max-w-[600px] text-title-new-sm font-light",description:i}),c,Ce(o,u)]})})}));function Ce(e,t){return e?.length?n(ae,{items:e,itemClassName:"text-title-2xs font-light mt-2",version:"primary"===t?"tile":"tile-white"}):null}const $e={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Se=a((({context:e,className:t="",title:a,headingType:l="h3",description:i,benefits:o,buttons:c,image:d,version:m="primary",anchor:h=null})=>n("section",{className:`bg-white overflow-hidden text-primary-text font-sans p-9 box-border ${t} ${$e[m]} ${we(t)} ${ye(t)} `,id:h,children:r(le,{context:e,title:a&&n(s,{headingType:l,as:"h3",title:a,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:c?.length?n(X,{context:e,buttons:c,className:"flex mt-9 gap-3"}):null,image:d?.src&&n(x,{className:"mt-auto ml-7",image:d}),children:[i&&n(Q,{className:"mt-4 max-w-[600px]",description:i}),r("div",{className:"flex mt-5 mb-1",children:[o?.length?n("div",{className:"mr-8",children:o.map(Te)}):null,o?.length?n("div",{className:"pt-1",children:o.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.description},String(t))}(e,t,m)))}):null]})]})})));function Te(e,t){return n("div",{className:"text-xl font-medium "+(t?"mt-2.5":""),children:e.label},String(t))}const De=a((({className:e,disabled:t,...r})=>n(q,{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(x,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon"},width:"16",height:"16",asSVG:!0})}))),Ae={primary:"bg-white text-secondary-text",secondary:"bg-primary-main text-white"},Re={normal:3,mini:4},Me={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Le={normal:380,mini:276},Pe=a((({title:e,description:t,image:a,items:l,button:i,version:s})=>{const o=function(e){return`text-xl m-0\n ${"secondary"!==e?"text-primary-text":""}\n `}(s);return r("div",{className:"h-full flex flex-col justify-between text-center",children:[r("div",{children:[a?.src?n("div",{className:"flex justify-center",children:n(x,{className:"mb-6",image:a})}):null,e?Be(e,o):null,t?n("div",{className:"font-light text-m-md-new "+(e?"mt-2":""),children:t}):null,l?.length?_e(l,s):null]}),i?.text?je(i):null]})}));function je(e){return n(q,{className:"mt-6 w-full",appendLeft:e.icon&&n(x,{image:e.icon,width:"24px",height:"24px",asSVG:!0}),...e})}function Be(e,t){return n("div",{className:`text-xl m-0 ${t}`,children:e})}function _e(e,t="primary"){return n(ae,{className:"max-w-[308px] mt-2 text-sm "+("primary"===t?"!text-secondary-text":""),itemClassName:"mt-1 first:mt-0",items:e.filter((e=>e?.text)).map((e=>e.text)),version:t})}const Ve=a((({context:e,title:t,description:a,cards:l=[],version:i="normal",activeCardIndex:o})=>r("div",{children:[n("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent"}),r("div",{className:"flex flex-col items-center mb-8",children:[t?n(s,{headingType:"h2",className:"text-center",title:t}):null,a?n("div",{className:"font-light text-md max-w-[600px] mt-2.5",children:a}):null]}),n("div",{className:`flex ${l?.length<=Re[i]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${o*Le[i]}px)`},role:"list",children:l?.map(((t,r)=>function({card:e,version:t},r){return n("section",{className:`box-border border-solid border border-main-stroke p-6 mx-2 flex flex-col justify-between\n items-stretch ${Me[t]} ${Ae[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:n(Pe,{...e})},String(r))}({card:t,version:i,context:e},r)))})]})));const Ge=a((({context:e,cards:t=[],className:a="",version:l="normal",anchor:i=null,...s})=>{const[o,c]=e.useState(0),d=t?.length>Re[l],m=d&&t?.length-o>Re[l],h=d&&o>0;return r("section",{className:`relative font-sans text-primary-text bg-white p-[42px] overflow-hidden ${a}`,id:i,children:[n(Ve,{context:e,cards:t,version:l,activeCardIndex:o,...s}),h&&n(De,{className:"absolute top-1/2 left-8 z-10 mt-[25px]",onClick:()=>c(o-1),ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}),m&&n(De,{className:"absolute top-1/2 right-8 z-10 mt-[25px] rotate-180",onClick:()=>c(o+1),ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}),n("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white"}),n("div",{className:"absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white"})]})})),We=a((e=>n(Ge,{...e,version:"normal"}))),Ee=a((e=>n(Ge,{...e,version:"mini"}))),Oe=a((({className:e="",documents:t,anchor:r=null})=>n("section",{className:`font-sans bg-white mt-[10px] ${e}`,id:r,children:n("ul",{className:"flex flex-col text-sm text-secondary-text p-0",children:t?.length?Fe(t):null})}))),Fe=e=>e.map(((e,t)=>{const{text:r,...a}=e;return n("li",{className:"mb-4 list-none",children:n("a",{className:"hover:text-primary-main",role:"link",...a,children:r||null})},`list_item_${String(t)}`)})),He={Headline:N,LinkDocs:T,TextBlock:ge,PictureText:A,ProductBlock:pe,Tile:ke,ProductTile:Se,Gallery:We,MiniGallery:Ee,LinkList:Oe},Ue=({blocks:e,context:t,className:n,columns:r})=>e?.length?e.map(Ze({context:t,className:n,columns:r})):null,Ze=({context:e,columns:t,className:r})=>(a,l)=>{const i=a?.blockListType;if(!i||!(i in He))return null;return n("div",{className:`${r} ${2===t?"w-1/2":""}`,children:n(He[i],{context:e,...a,className:"!p-0"})},`block_${l}`)},ze=a((({blocks:e,context:t})=>n("div",{className:"transition-all duration-300 max-h-0 overflow-hidden",children:Ue({context:t,className:"mb-5 last:mb-0 pb-5",blocks:e})}))),qe=a((({label:e,isExpanded:t,blocks:a,context:l})=>{const{isActive:i,hasContent:s,icon:o,handleToggle:c}=(({context:e,blocks:t,initialState:n=!1})=>{const[r,a]=e.useState(n),l=t?.length;return{isActive:r,hasContent:l,icon:r?"MinusIcon":"PlusIcon",handleToggle:e=>{if(!l)return;a(!r);const t=(({currentTarget:e})=>e.nextSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:l,blocks:a,initialState:t});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\n ${s?"group cursor-pointer":""}\n `,onClick:c,children:[n("span",{className:"text-xl pr-2.5 font-medium",children:e}),s?n(x,{image:o,className:"text-primary-main",width:"24",height:"24",asSVG:!0}):null]}),s?n(ze,{isExpanded:i,blocks:a,context:l}):null]})})),Je=a((({title:e,description:t,accordionItems:a,context:l,className:i="",anchor:o=null})=>r("section",{className:`p-[50px] font-sans bg-white text-primary-text ${i}`,id:o,children:[e?n(s,{headingType:"h4",className:"mb-2.5",title:e}):null,t?n("div",{className:"mb-2.5 text-base",children:t}):null,a?.length?n("ul",{className:"list-none m-0 p-0",children:a.map(((e,t)=>n(qe,{...e,context:l},`AccordionItem${t}`)))}):null]}))),Ke=a((({className:e,title:t,benefits:a,anchor:l=null})=>r("section",{className:`font-sans text-primary-text bg-white p-12 flex flex-col items-center ${e||""}`,id:l,children:[t?n(s,{headingType:"h2",className:"max-w-[47rem] text-center",title:t}):null,a?.length?n("div",{className:"grid grid-cols-2 gap-8 mt-9",children:a.map(Xe)}):null]}))),Xe=(e,t)=>r("div",{className:"flex items-center gap-5 max-w-[500px]",children:[e.icon?n(x,{className:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",image:e.icon,width:"70",height:"70"}):null,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)),Qe=a((e=>{const{className:t="",title:a,description:l,bonusItems:i,anchor:o=null}=e;return n("section",{className:`font-sans bg-white p-[50px] pb-9 ${t}`,id:o,children:r("div",{className:"container",children:[a?n(s,{headingType:"h3",className:"text-center",title:a}):null,l?n("div",{className:"text-md font-light text-center mt-[10px]",children:l}):null,n("div",{className:"flex flex-wrap w-full mt-9",children:i?i.map(((e,t)=>n("div",{className:"flex-grow w-[49%] border border-gray pl-9 pt-9 pr-6 pb-6 mb-[14px] mx-[7px] even:mr-0 odd:ml-0 last:odd:mx-0",children:r("div",{className:"flex justify-between w-full",children:[r("div",{className:"mr-4",children:[n("div",{className:"text-title-sm",children:e.name}),n("div",{className:"text-md font-light mt-[14px] max-w-[488px]",children:e.description})]}),e.bonusCount?r("div",{className:"relative -bottom-3 h-auto flex items-end mt-14 shrink-0",children:[n("span",{className:"font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7",children:e.bonusCount}),n("span",{className:"text-[44px] bg-clip-text text-transparent bg-green-to-yellow",children:e.bonusName})]}):null]})},String(t)))):null})]})})})),Ye=a((({children:e})=>n("div",{className:"self-start flex flex-col",role:"row",children:n("div",{className:"flex",children:e})}))),et="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",tt="border-main-stroke border-solid border",nt="border-main-divider border border-t-0 border-x-0",rt="w-[200px] mr-6",at={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},lt=a((({children:e,activeCardIndex:t,columnWidth:r,version:a="comparison"})=>n("div",{className:"flex flex-1 overflow-hidden",children:n("div",{className:at[a],style:{transform:`translateX(-${t*r}px)`},children:e})}))),it=a((({icon:e,image:t,title:a,link:l})=>r("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${tt} ${et}`,role:"columnheader",scope:"col",children:[e&&!t?.src&&n(x,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}),t?.src&&n(x,{className:"mb-[18px]",image:t}),a&&n(s,{headingType:"h4",as:"h3",className:"text-center text-white",title:a}),l?.text&&n("div",{className:"mt-auto w-full",children:n(q,{href:l.href,target:l.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:n("div",{className:"font-medium text-xs py-[11px]",children:l.text})})})]}))),st=a((({colHeaders:e,activeCardIndex:t,router:a,handlerDecorator:l})=>r(Ye,{children:[n("div",{className:rt,role:"columnheader",scope:"col"}),n(lt,{activeCardIndex:t,columnWidth:336,children:e.map(((e,t)=>n(it,{...e,link:e.link&&G({router:a,handlerDecorator:l},e.link)},String(t))))})]}))),ot=a((({cell:e,isFirstRow:t,isLastRow:r,isFillGradient:a})=>n("div",{className:`w-80 box-border flex flex-col ${tt} ${r?"border-t-0 rounded-b-md":"border-y-0"} ${a?et:""}`,role:"cell",children:n("div",{className:`mx-7 h-full ${nt} ${a&&t?"border-t":""} ${r?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>ct(e,t,a)))})}))),ct=({label:e,description:t},a,l)=>r("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e&&n("h4",{className:"text-xl font-medium m-0 "+(l?"text-white":""),children:e}),t&&n("div",{className:"text-sm opacity-80 "+(l?"text-white":"text-secondary-text"),children:t})]},String(a)),dt=a((({row:{header:e,data:t},activeCardIndex:a,isColoredFirstColumn:l,isFirstRow:i,isLastRow:s})=>r(Ye,{children:[e?.title?n("div",{className:`text-sm py-7 ${nt} w-[200px] mr-6 ${s?"border-b-0":"border-solid"}`,children:e.title}):null,t?.length?n(lt,{activeCardIndex:a,columnWidth:336,children:t.map(((e,t)=>n(ot,{cell:e,isFirstRow:i,isLastRow:s,isFillGradient:l&&0===t},String(t))))}):null]}))),mt=a((({isScrollAvailable:e,onNextClick:t,onPrevClick:a,showNextButton:l,showPrevButton:i})=>e?n("div",{children:r("div",{className:"absolute top-7 right-7 z-10",children:[n(De,{className:"mt-4 rotate-180",onClick:t,disabled:!l,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}),n(De,{className:"mt-4",onClick:a,disabled:!i,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"})]})}):null)),ht=a((({rowData:e,activeCardIndex:t,isColoredFirstColumn:a,...l})=>r("div",{className:"relative",children:[e.map(((e,r,{length:l})=>n(dt,{row:e,isFirstRow:0===r,isLastRow:r+1===l,activeCardIndex:t,isColoredFirstColumn:a},String(r)))),n(mt,{...l})]}))),xt=({columnsLength:e,colsLengthForScroll:t,activeCardIndex:n,setActiveCardIndex:r})=>{const a=e>t;return{onNextClick:()=>r(n+1),onPrevClick:()=>r(n-1),isScrollAvailable:a,showNextButton:a&&e-n>t,showPrevButton:Boolean(a&&n>0)}},ut=a((({context:e,columns:t,rowHeaders:a,isShowAllRow:l,visibleRowLength:i,isColoredFirstColumn:s})=>{const o=e.useRouter(),{handlerDecorator:c}=e,d=t?.map((({header:e})=>e||{})),m=t?.map((({data:e})=>e))||[],h=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[{}]))}))).slice(0,l?a.length:i),[x,u]=e.useState(0),p=xt({columnsLength:m.length,colsLengthForScroll:2,activeCardIndex:x,setActiveCardIndex:u}),{isScrollAvailable:b}=p;return r("div",{children:[r("div",{role:"table",children:[d?.length?n(st,{colHeaders:d,activeCardIndex:x,router:o,handlerDecorator:c}):null,h?.length?n(ht,{rowData:h,activeCardIndex:x,isColoredFirstColumn:s,...p}):null]}),b?n("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),pt=a((({className:e,context:t,title:a,rowHeaders:l,columns:i,visibleRowLength:o=0,isColoredFirstColumn:c=!1,anchor:d=null})=>{const[m,h]=t.useState(!o);return r("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,id:d,children:[n(s,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:a}),n(ut,{context:t,columns:i,rowHeaders:l,isShowAllRow:m,isColoredFirstColumn:c,visibleRowLength:o}),o?bt({isShowAllRow:m,onClick:()=>h(!m)}):null]})})),bt=({isShowAllRow:e,onClick:t})=>n("div",{className:"pr-[50px]",children:r("div",{className:"flex w-full",children:[n("div",{className:rt}),n("button",{onClick:t,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:e?"Скрыть":"Показать все параметры"})})]})}),gt=a((({tabs:e,currentTabIndex:t,onTabClick:r})=>n("div",{className:"flex items-end border-b border-main-stroke",role:"tablist",children:e?.map(ft(t,r))}))),ft=(e,t)=>(a,l)=>{const i=e===l;return r("div",{className:"flex h-full flex-1 cursor-pointer mr-2 last:mr-0 box-content "+(i?"px-2 h-16 pt-4 pb-2 text-white bg-primary-main":"px-2 h-14 pb-2 pt-3 border border-b-0 border-main-stroke"),role:"tab",onClick:()=>t(l),"aria-selected":String(i),children:[a?.icon?Nt(a,i):null,r("div",{children:[a?.title?n("h3",{className:"font-medium m-0 text-base",children:a?.title}):null,a?.description?n("span",{className:"font-light text-xs "+(i?"":"text-secondary-text"),children:a?.description}):null]})]},String(l))},Nt=(e,t)=>n("div",{className:"h-full mt-1",children:n(x,{className:"w-5 h-5 mr-3 "+(t?"invert":""),image:e?.icon||"CardIcon",asSVG:!t})});function vt(e=""){const t=ve(e);return t<=4?"h4":t<=8?"h3":"h2"}async function yt(e){const t=await fetch(e);return await t.json()}const wt=a((({className:e,viewBox:t,fill:r="none",width:a,height:l,paths:i,...s})=>n("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:r,width:a,height:l,children:i.map((({d:e,fill:t,...r},a)=>n("path",{d:e,fill:t||"currentColor",...s,...r},a)))}))),It=[{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"}],kt=a((({text:e,checked:t,onChange:a,className:l})=>n("div",{className:l,children:r("label",{className:"flex items-center cursor-pointer relative",children:[n("input",{className:`peer appearance-none w-5 h-5 border-solid border ${t?"border-black":"border-main-stroke"} rounded checked:bg-primary-main checked:border-primary-main m-0`,type:"checkbox",onChange:e=>{a(e.target.checked)},checked:t}),n(wt,{paths:It,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),e?n("span",{className:"font-sans ml-3 text-sm leading-5 cursor-pointer",children:e}):null]})}))),Ct=(e,t,n)=>Math.max(t,Math.min(e,n)),$t=3e4,St=3e6,Tt=Math.round(41.5),Dt=(At=[[e=>1===e,"год"],[e=>e<=4,"года"],[()=>!0,"лет"]],e=>{const[,t]=At.find((([t])=>t(e)))||[];return t});var At;const Rt=e=>new Intl.NumberFormat("ru-RU",{maximumSignificantDigits:3}).format(e),Mt=a((({className:e,title:t,items:a=[],min:l=1,max:i=100,step:s=1,value:o=l,onChange:c})=>{const d=e=>{if(!c)return;const t=Number(e.replace(/\D/g,""));c(t)},m={backgroundSize:`${(100*(o-l)/(i-l)).toFixed(2)}% 100%`};return r("div",{className:e,children:[r("label",{className:"block 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 border-solid border-main-stroke rounded-md\n outline-none p-0 pl-4 m-0 box-border text-primary-text "+(t?"pt-4":""),value:Rt(o),onChange:e=>d(e.target.value),onBlur:()=>{c&&(o<l&&c(l),o>i&&c(i))}}),n("div",{className:"absolute inset-x-0 top-[35px] px-4 leading-[18px]",children:n("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:l,max:i,step:s,value:o,onChange:e=>d(e.target.value),style:m})})]}),n("div",{className:"flex justify-between my-3",children:a.map(((e,t)=>r("span",{className:"text-xs leading-[14px] text-secondary-text pl-4",children:[" ",e," "]},String(t))))})]})}));function Lt(e){const{minMonths:t,maxMonths:r,monthsValue:a,defaultMonths:l,setMonthsValue:i}=e;return n(Mt,{className:"mt-[23px]",title:"Срок кредита, месяцев",items:["Или выберите из предложенных вариантов ниже"],min:t,max:r,step:1,value:a||l,onChange:i})}function Pt(e,t){return r("div",{className:"box-border h-fit p-9 bg-primary-main rounded-md text-white",children:[n("div",{className:"text-base mb-[18px]",children:"Наше предложение"}),n("div",{className:"text-sm opacity-60",children:"Ежемесячный платёж"}),r("div",{className:"text-lg mb-3",children:[Rt(Math.round(e))," ₽"]}),n("div",{className:"text-sm opacity-60",children:"Ставка"}),r("div",{className:"text-lg",children:[t," %"]})]})}function jt(e){const{calculatorParams:t,moneyValue:r,defaultSum:a,setMoneyValue:l}=e,i=t?.minSum||$t,s=t?.maxSum||St;return n(Mt,{title:"Желаемая сумма кредита, ₽",items:[`От ${Rt(i)} рублей`,`До ${Rt(s)} рублей`],min:i,max:s,step:1e3,value:r||a,onChange:l})}const Bt=a((({context:e,directoryName:t})=>{const[a,l]=e.useState(void 0),[i,s]=e.useState(void 0),[o,c]=e.useState(!0),[d,m]=e.useState(!0),h=function(e,t){const{data:n}=e(function(e){return`/wcms-resources/${e||"credit-calculator-data"}.json`}(t),yt);return n||{}}(e.useAsyncData,t).rows,x=(e=>{const{tableRows:t,isAnnuity:n=!1}=e;return t&&t.find((e=>e.isAnnuity===n))||{}})({tableRows:h,isAnnuity:o}),u=(e=>e.maxSum&&e.minSum?(e.maxSum-e.minSum)/2:1485e3)(x),p=(e=>e.maxMonths&&e.minMonths?Math.round((e.maxMonths-e.minMonths)/2):Tt)(x),b=x?.minMonths||1,g=x?.maxMonths||84,f=(e=>{const{calculatorParams:t,isInsurance:n}=e;return t?n?t?.rateWithInsurance||5:t?.rateWithoutInsurance||5:5})({calculatorParams:x,isInsurance:d}),N=(e=>{const{calculatorParams:t,paymentType:n,rate:r,sum:a,months:l}=e;if(!t)return 0;const i=Ct(a,t.minSum||$t,t.maxSum||St);if("annuity"===n){const e=Number(r)/1200;return i*(e+e/(Math.pow(1+e,l)-1))}return i/l+i*(Number(r)/12)})({calculatorParams:x,paymentType:"annuity",rate:f,sum:a||u,months:i||p}),v=((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)),l=n+r-1;return a.concat(l)})(b,g);function y(e){s(Ct(12*e,b,g))}return n("section",{className:"mt-7",children:r("div",{className:"box-border p-[49px] pr-[56px] mx-auto w-max border-solid border-[3px] border-primary-main rounded-md",children:[r("div",{className:"flex justify-between",children:[r("div",{className:"mr-[42px]",children:[jt({calculatorParams:x,moneyValue:a,defaultSum:u,setMoneyValue:l}),Lt({minMonths:b,maxMonths:g,monthsValue:i,defaultMonths:p,setMonthsValue:s}),n("div",{className:"flex mb-7",children:v.map(((e,t)=>function(e,t,a){const l=Dt(e);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," ",l]})},String(t))}(e,t,y)))}),n(kt,{text:"Получаю пенсию на карту Россельхозбанка",checked:o,onChange:c}),n(kt,{className:"mt-3 mb-7",text:"Комплексная страховая защита",checked:d,onChange:m})]}),Pt(N,f)]}),r("div",{className:"flex items-center",children:[n(q,{className:"mr-3",text:"Отправить заявку",version:"primary",href:"#"}),n("div",{className:"w-80 text-2xs leading-4 text-secondary-text","aria-label":"Соглашение на обработку персональных данных",children:"Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно требованиям ФЗ «О персональных данных»"})]})]})})})),_t=[{title:"Кредит",description:"Ставка от 6% до 7 лет",directoryName:"credit-calculator-data",icon:{icon:"CardIcon"}},{title:"Кредит",description:"Ставка от 4% до 7 лет",directoryName:"credit-calculator-data1",icon:{icon:"ChartSquareIcon"}},{title:"Кредит",description:"Ставка от 3% до 6 лет",directoryName:"credit-calculator-data2",icon:{icon:"DiscountShapeIcon"}}],Vt=a((({className:e="",context:t,tabs:a=_t,anchor:l=null})=>{const[i,o]=t.useState(0);return r("section",{className:`font-sans text-primary-text py-10 bg-white ${e}`,id:l,children:[n(s,{className:"w-full text-center mb-8",headingType:vt(e),title:"Калькулятор"}),n(gt,{tabs:a,currentTabIndex:i,onTabClick:o}),n(Bt,{context:t,directoryName:a[i]?.directoryName})]})}));async function Gt(){try{const e=await fetch(Wt);return await e.json()}catch(e){console.error(e)}}const Wt="/api/v1/exchangerates.json",Et=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),Ot=e=>e?Et.format(e):"",Ft="font-light text-left font-normal text-sm text-secondary-text",Ht={USD:"DollarIcon",EUR:"EuroIcon"},Ut=a((({className:e,exchangeCurrencyItems:t})=>r("table",{className:`h-fit w-fit ${e}`,children:[n("thead",{children:r("tr",{children:[n("th",{className:Ft,children:"Валюта"}),n("th",{className:`${Ft} pl-11`,children:"Купить"}),n("th",{className:`${Ft} pl-11`,children:"Продать"})]})}),n("tbody",{children:t.map((e=>Zt(e)))})]}))),Zt=e=>{const t=e?.currency?.currency;return r("tr",{className:"pb-1",children:[n("td",{className:"pt-4",children:r("div",{className:"flex items-center",children:[t?n(x,{image:{icon:Ht[t]},width:"24",height:"24"}):null,n("span",{className:"text-m-title-md ml-2",children:t})]})}),n("td",{className:"pt-4 pl-11 m-title-md font-light",children:Ot(e.buyExchangeRate)}),n("td",{className:"pt-4 pl-11 m-title-md font-light",children:Ot(e.saleExchangeRate)})]},t)},zt=a((({className:e="",address:t,distance:a})=>r("div",{className:`flex text-sm ${e}`,children:[n(x,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),r("div",{className:"ml-3 font-light",children:[t?n("p",{className:"m-0 mb-[3px]",children:t}):null,a?r("p",{className:"text-secondary-text m-0",children:["Курс указан для ближайшего офиса - ",a]}):null]})]}))),qt=a((({className:e="",id:t,name:r,type:a="text",placeholder:l})=>n("input",{className:e,id:t,name:r||t,type:a,placeholder:l}))),Jt=a((({className:e="",id:t,name:r,children:a})=>n("select",{className:e,id:t,name:r||t,children:a}))),Kt=a((({className:e="",value:t,selected:r,children:a})=>n("option",{className:e,value:`${t}`,selected:r,children:a}))),Xt=a((({codes:e,className:t=""})=>r("div",{className:`grid gap-3.5 ${t}`,children:[Qt("Хочу продать",e),Qt("Получу",e,"USD"),n(q,{className:"box-border mt-3.5 py-3 h-12 w-full",version:"primary",href:"#",children:"Купить валюту"})]})));function Qt(e,t,a){return r("div",{className:"relative flex items-center",children:[n(qt,{className:"h-10 border pl-4 pt-[7px] pb-[7px] rounded-md text-m-sm w-full appearance-none -mr-12",type:"number",placeholder:`${e}`}),t.length?n(Jt,{className:"h-9 -translate-x-4",children:t.map(((e,t)=>n(Kt,{value:e,selected:e===a,children:e},String(t))))}):null]})}const Yt=["USD","EUR"],en=["RUB","USD","EUR"],tn=[{buyExchangeRate:90.6,saleExchangeRate:92.8,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:73.75,saleExchangeRate:75.95,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],nn={address:"Москва, ул.Ленина д.28",distance:"6км"},rn=a((({className:e="",context:t,title:a="Курсы обмена валют",anchor:l=null})=>{const i=function(e){const{data:t}=e(Wt,Gt);return t||{}}(t.useAsyncData)?.exchangeRate?.currencies?.filter((e=>-1!==Yt.indexOf(e?.currency?.currency||"")))||tn;return n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,id:l,children:n(le,{context:t,title:n(s,{headingType:vt(e),title:a,className:"whitespace-pre-wrap"}),children:r("div",{className:"flex",children:[r("div",{className:"mr-[43px] pt-4",children:[i?n(Ut,{className:"mb-[31px]",exchangeCurrencyItems:i}):null,n(zt,{...nn})]}),i?.length?n(Xt,{className:"grow",exchangeCurrencyItems:i,codes:en}):null]})})})})),an=["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"],ln={"bg-white":"text-primary-main",transparent:"text-white"},sn={"bg-white":"text-black",transparent:"text-white"},on=a((({className:e,href:t,children:a,targetBlank:l,bgColor:i="bg-white",hideTitle:s})=>r("a",{className:`inline-flex items-center font-sans no-underline ${e||""}`,href:t||"https://rshb.ru/",target:l?"_blank":"_self","aria-label":"Россельхозбанк",children:[n(wt,{className:`${ln[i]} w-10`,viewBox:"0 0 40 45",paths:an.map((e=>({d:e})))}),!s&&n("span",{className:`${sn[i]} font-medium ml-2.5`,children:a||"Россельхозбанк"})]}))),cn=a((({className:e,context:t})=>{const{term:a,setTerm:l}=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(x,{image:"LoupeIcon",width:"24",height:"24"})}),!a&&n("label",{htmlFor:"search-bar-input",className:"font-sans font-light text-base text-secondary-text",children:"Поиск по сайту"})]}),n("input",{id:"search-bar-input",className:"h-12 pl-12 w-full peer font-sans font-light text-base text-black border border-solid rounded h-full box-border outline-none pr-[6%] border-main-divider focus:border-primary-text",value:a,onChange:e=>l(e.target.value),type:"text",name:"search-bar-input"}),n(q,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-1 right-1",onClick:e=>{e.preventDefault(),console.log("click")},children:n("div",{className:"font-normal text-sm px-9 py-[9px]",children:"Найти"})})]})})),dn=a((({className:e="",items:t,hasButton:a,context:l})=>{const i=l.useRouter(),{handlerDecorator:s}=l;return r("div",{className:e,children:[t?.length?t.map(mn):null,a?n(q,{version:"primary",className:"mb-6 w-full",...G({router:i,handlerDecorator:s},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),mn=(e,t)=>{const{type:a,text:l,description:i}=e;return r("div",{className:"mb-4",children:[n("div",{children:hn(a,l)}),n("div",{className:"mt-1 font-sans font-light text-sm text-secondary-text",children:i})]},String(t))},hn=(e,t="")=>{switch(e){case"tel":return n("a",{className:"font-sans text-xl text-primary-text no-underline",href:`tel:${xn(t)}`,children:t});case"email":return n("a",{className:"font-sans text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return n("span",{children:t})}},xn=e=>e.replaceAll(/\D/g,""),un=a((({links:e,className:t="",context:r})=>{const a=r.useRouter(),{handlerDecorator:l}=r;return n("div",{className:t,children:e?.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:e.map(((e,t)=>n(pn,{index:t,...G({router:a,handlerDecorator:l},e)},String(t))))}):null})})),pn=a((({className:e="",index:t,text:r,href:a,target:l,onClick:i})=>n("a",{className:`font-sans font-light text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:l,onClick:i,children:r||`Документ ${t}`}))),bn=e=>t=>e?.href===t?.href,gn=(e,t)=>{return(r=e,a=t,(r||[]).map((e=>a?.find(bn(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(bn(e))))));var n,r,a};function fn(e){const{data:t}=e(vn(),Nn);return t||{}}async function Nn(){const e=await fetch(vn());return await e.json()}function vn(){return`/wcms-resources/${d.SITEMAP||"sitemap"}.json`}const yn=a((({className:e="",items:t,context:r})=>{const a=fn(r.useAsyncData),l=gn(a.topItems,t),i={router:r.useRouter(),handlerDecorator:r.handlerDecorator};return n("div",{className:`flex items-start justify-between gap-11 xl:gap-5 ${e}`,children:l?.map(((e,t)=>wn(e,t,i)))})})),wn=(e,t,{router:a,handlerDecorator:l})=>{const{text:i,href:s,items:o,target:c}=e;return r("div",{className:"flex flex-col w-1/5 last:w-1/4 gap-[14px]",children:[n("a",{className:"block font-sans leading-5 text-base text-primary-text no-underline",href:s,target:c||"_self",children:i||`Раздел ${t}`}),o?.map(((e,t)=>n(In,{...G({router:a,handlerDecorator:l},e),index:t},String(t))))]},String(t))},In=a((({text:e,href:t,target:r,index:a})=>n("a",{className:"block font-sans font-light text-base text-secondary-text hover:text-primary-main no-underline",href:t,target:r||"_self",children:e||`Раздел ${a}`}))),kn=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм",width:"20px",height:"16px"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте",width:"24px",height:"12px"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники",width:"12px",height:"20px"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store",width:"20px",height:"22px"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play",width:"21px",height:"21px"}],Cn=a((({href:e,version:t})=>{const{icon:r,width:a,height:l,label:i}=kn.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};if(!r)return null;return n("a",{className:` flex items-center justify-center border border-solid rounded-md border-main-divider no-underline outline-none w-14 h-14 box-border ${"secondary"===t?"text-white hover:text-primary-main hover:bg-white":"text-primary-main hover:text-white hover:bg-primary-main hover:border-primary-main"}`,href:e,"aria-label":i,target:"_blank",rel:"noopener noreferrer",children:r?n(x,{image:r,width:a,height:l,asSVG:!0,className:"block"}):null})})),$n=a((({className:e="",media:t,version:a,context:l,children:i})=>{const s=l.useRouter(),{handlerDecorator:o}=l;return r("div",{children:[n("div",{className:`flex gap-2.5 ${e}`,children:t?.map(((e,t)=>n(Cn,{version:a,...G({router:s,handlerDecorator:o},e)},String(t))))}),n("span",{className:"font-light text-sm text-secondary-text",children:i})]})})),Sn=a((({className:e,links:t,context:a})=>{const l=a.useRouter(),{handlerDecorator:i}=a;return r("div",{className:`${e||""}`,children:[n("div",{className:"pt-5 pb-[5px]",children:n("span",{className:"font-sans font-light 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(Tn,{index:t,...G({router:l,handlerDecorator:i},e)},String(t))))}):null]})})),Tn=a((({className:e,index:t,text:r,href:a,target:l,onClick:i})=>n("a",{className:`font-sans font-light text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:a,target:l,onClick:i,children:r||`Документ ${t}`}))),Dn="w-[204px]",An=a((({className:e,documents:t,relatedEnterprises:a,contacts:l,socialMedia:i,mobileApps:s,topItems:o,context:c,anchor:d=null})=>r("footer",{className:`px-9 pt-9 pb-10 bg-white ${e||""}`,id:d,children:[r("div",{className:"flex items-stretch gap-[54px] pb-[30px] xl:gap-8",children:[n(on,{className:Dn}),n(cn,{context:c,className:"grow"})]}),r("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[r("div",{className:"w-[204px] flex flex-col shrink-0 overflow-hidden",children:[n(dn,{items:l,context:c,hasButton:!0}),n($n,{media:i,context:c,children:"Соцсети"}),n($n,{className:"mt-6",media:s,context:c,children:"Мобильное приложение"})]}),n(yn,{className:"pt-[3px]",context:c,items:o})]}),n(un,{className:"mt-[98px]",links:a,context:c}),n(Sn,{links:t,context:c})]}))),Rn=a((({className:e="",title:t,description:a,calendar:l,anchor:i=null})=>r("section",{className:`font-sans bg-white p-[50px] ${e}`,id:i,children:[n(s,{headingType:"h3",className:"text-center",title:t}),n("div",{className:"font-light text-base-md text-center mt-3",children:a}),l?Mn(l):null]}))),Mn=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),a=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:e.month.length*t+"%"})));return r("div",{className:"w-full flex flex-col justify-center mt-[54px]",children:[n("div",{className:"flex w-full mb-3 font-light text-m-title-md text-center",children:a.map((e=>Ln(e,t)))}),n("div",{className:"flex w-full",children:a.map(((e,t)=>r("div",{className:"pr-[11px] mr-3 border-r border-main-divider last:border-r-0 last:pr-0 last:mr-0",style:{flexBasis:e.flexBasis},children:[n("div",{className:"flex",children:Pn(e)}),r("div",{className:"font-light text-sm text-primary-text mt-3",children:[n("span",{children:e.blackText})," ",n("span",{className:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Ln=(e,t)=>e.month.map((e=>n("div",{style:{flexBasis:`${t}%`},children:e.name},`monthName-${e.name}`))),Pn=e=>e.month.map((e=>e.image?.src?n("div",{className:"h-[207px] border-r-[1px] pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0",children:n(x,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),jn=(e,t,n=((e,t)=>t.startsWith(e)))=>n(M(e),(e=>(e||"").replace(B,""))(M(R(e)?t.href:t.pathname))),Bn=e=>t=>jn(t.href,e),_n=e=>t=>t.items?.some(Bn(e))||jn(t.href,e)||((e,t)=>L(e)===L(t.href))(t.href,e),Vn=a((({className:e="",text:t,href:r,target:a,active:l,flat:i,onClick:s,children:o,ariaLabel:c,bgColor:d="bg-white"})=>n("a",{className:`${Gn(d,l,i)} ${e}`,href:r,target:a,onClick:s,rel:"noopener noreferrer","aria-label":c,children:n("span",{className:Wn(d,l,i),children:t||o})}))),Gn=(e,t,n)=>{let r="border-transparent";return t&&(r="rounded-md "+("bg-white"===e?"border-primary-main":"border-white")),`${r} inline-block border border-solid bg-transparent text-center no-underline ${n?"":"px-4 py-2"}`},Wn=(e,t,n)=>{let r="text-white";return"bg-white"===e&&(r=t?"text-primary-main":(n?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"),`${r} font-sans font-light text-sm`},En=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}))),On={"bg-white":"text-primary-text hover:text-primary-main",transparent:"text-white"},Fn={"bg-white":"text-secondary-light hover:text-secondary-hover",transparent:"text-white"},Hn={"bg-white":"GridIcon",transparent:"GridIconWhite"},Un=a((({context:e,className:t,defaultLocation:a="",bgColor:l="bg-white"})=>{const[i,s]=e.useGeolocation(a);return r("div",{className:`flex items-center ${t||""}`,children:[n(Vn,{className:"mr-5",flat:!0,href:"#",text:i,ariaLabel:"Местоположение",onClick:s,bgColor:l}),n(Vn,{className:"mr-7",flat:!0,href:"#",text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов",bgColor:l}),n(En,{className:`mr-5 ${On[l]}`,ariaLabel:"Поиск по сайту",children:n(x,{image:"LoupeIcon",className:"h-full",asSVG:!0})}),n(En,{className:`${Fn[l]} min-w-[32px] min-h-[32px]`,ariaLabel:"Дополнительные ссылки",children:n(x,{image:Hn[l],className:"h-full",asSVG:!0})})]})})),Zn=e=>(t=[])=>{const n=t?.filter(Bn(e));var r;return n?.length?(r=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>r(e)>r(t)?e:t)))(n):null},zn="absolute left-0 -bottom-3 w-full h-[2px]",qn=a((({className:e="",text:t,href:a,target:l,active:i,onClick:s,children:o,bgColor:c="bg-white",dataItemName:d})=>r("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:a,target:l,onClick:s,"data-item-name":d,children:[n("span",{className:Jn(c,i),children:t||o}),i?n("div",{className:Kn(c,i)}):null]}))),Jn=(e,t)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-primary-text hover:text-primary-main"),`${n} font-sans font-light text-base`},Kn=(e,t)=>t?`${"bg-white"===e?"bg-primary-main":e} ${zn}`:zn,Xn=()=>!("undefined"!=typeof window&&window.document&&window.document.createElement),Qn=!Xn()?new IntersectionObserver((e=>{const t=window.document.querySelector("[data-header-submenu-visible=toggled]"),[n,r]=["[data-item-name=header-submenu]","[data-item-name=dots-header-submenu]"].map((e=>Array.from(window.document.querySelectorAll(e))));const a={};e.forEach((e=>{a[e.target.toString()]=e.isIntersecting}));const l=Yn(a,r,"hidden");Yn(a,n,"invisible"),t&&(l?t.classList.remove("hidden"):t.classList.add("hidden"))}),{root:window.document,threshold:1}):void 0,Yn=(e,t,n)=>{const r="hidden"!==n;return t.some((t=>{const a=t.toString(),l=r?!e[a]:e[a];return a in e&&t.classList.toggle(n,l),r?t.classList.contains("hidden"):!t.classList.contains("hidden")}))},er=a((({context:e,subItems:t,bgColor:a})=>{const[l,i]=e.useState(!1),s=e.useRouter(),{handlerDecorator:o}=e;setTimeout((()=>{if(Xn())return;globalThis.document.querySelectorAll("[data-item-name=header-submenu]").forEach((e=>{Qn?.observe(e)}))}),200);const c=Zn(s)(t),d=t?.map((e=>n(qn,{className:"mr-8",active:e===c,...G({router:s,handlerDecorator:o},e),dataItemName:"header-submenu",bgColor:a},e.href)));return r("nav",{className:"relative mt-5",children:[n("div",{className:"overflow-hidden whitespace-nowrap mr-52",children:d}),tr({subMenuIsShow:l,toggleSubMenu:()=>i(!l),subItems:t,router:s,handlerDecorator:o})]})})),tr=({subMenuIsShow:e,toggleSubMenu:t,subItems:a,router:l,handlerDecorator:i})=>r("div",{className:"absolute w-52 -top-4 right-0 pt-4 z-40 "+(e?"bg-white rounded-md shadow-blue-gray/24":""),"data-header-submenu-visible":"toggled",children:[n("button",{className:"flex justify-between items-center cursor-pointer h-6 ml-6",onClick:t,"aria-label":""+(e?"Скрыть другие разделы":"Показать другие разделы"),children:Array(3).fill(0).map(((e,t)=>rr(t)))}),n("div",{className:"flex flex-col rounded-md bg-white p-6 pb-2 "+(e?"":"hidden"),"aria-hidden":!e,children:nr(a,l,i)})]}),nr=(e,t,r)=>e?.map((e=>n("a",{...G({router:t,handlerDecorator:r},e),"data-item-name":"dots-header-submenu",className:"text-base font-light pb-4 hover:text-primary-main",children:e.text},e.href))),rr=e=>n("div",{className:"w-[3px] h-[3px] rounded bg-black mr-1"},String(e)),ar={"bg-white":"bg-main-divider",transparent:"bg-main-divider opacity-30"},lr=a((({className:e="",defaultLocation:t="Москва",bgColor:a="bg-white",context:l,topItems:i,anchor:s=null})=>{const o=l.useRouter(),c=fn(l.useAsyncData),{handlerDecorator:d}=l,m=gn(c.topItems,i),h=m.find(_n(o)),x=m.map(((e,t)=>n(Vn,{active:e===h,...G({router:o,handlerDecorator:d},e),"aria-label":e.text,bgColor:a},String(t))));return n("header",{className:`pt-6 pb-8 px-20 ${a} ${e}`,id:s,children:r("div",{className:"container",children:[r("div",{className:"flex items-center",children:[n(on,{className:"mr-8",bgColor:a}),x,n(Un,{context:l,className:"ml-auto",defaultLocation:t,bgColor:a})]}),n("div",{className:`mt-6 h-[1px] ${ar[a]}`}),n(er,{context:l,subItems:h?.items,bgColor:a})]})})})),ir=a((({className:e="",context:t,title:a="Мобильное приложение",qr:l,buttons:i=[],anchor:o=null})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${we(e)} ${ye(e)} `,id:o,children:n(le,{context:t,title:a&&n(s,{headingType:"h3",title:a,className:"whitespace-pre-wrap max-w-[600px] mb-[30px]"}),buttons:i?.length?n(X,{context:t,buttons:i,className:"flex mt-[30px] gap-4"}):null,children:r("div",{className:"flex items-center",children:[l?.src&&l?.href&&n("a",{href:l.href,target:"_blank","aria-label":a,children:n("img",{src:l.src,alt:a,title:a,width:"164",height:"164",className:"w-[92px] h-[92px] min-w-[92px] min-h-[92px] bg-secondary-light"})}),n("span",{className:"font-light text-secondary-text ml-4",children:"Наведите камеру телефона на QR-код и скачайте приложение"})]})})}))),sr=a((({className:e,text:t,onClick:r,href:a,target:l,isActive:i})=>n("a",{className:`bg-inherit no-underline px-4 py-2.5 cursor-pointer rounded text-sm border border-solid hover:text-primary-main ${e||""} ${i?"border-primary-main text-primary-main":"border-white text-secondary-text"}`,onClick:r,href:a,target:l,children:t}))),or=a((({className:e,context:t,title:a,buttons:l,anchor:i=null})=>{const s=t.useRouter(),{handlerDecorator:o}=t,c=Zn(s)(l);return r("section",{className:`font-sans text-primary-text rounded-[40px] flex items-center justify-between ${e||""}`,id:i,children:[n("h2",{className:"font-medium text-xl m-0",children:a}),l?.length?n("div",{className:"flex rounded-md overflow-hidden bg-white",children:l.filter((({text:e})=>e)).map(((e,t)=>n(sr,{className:"first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md",isActive:e===c,...G({router:s,handlerDecorator:o},e)},String(t))))}):null]})})),cr=a((({className:e="",text:t,active:r,children:a,onClick:l,href:i,target:s="_self"})=>n("a",{className:dr(e,r),target:s,href:i,onClick:l,children:n("span",{className:mr(r),children:t||a})}))),dr=(e,t)=>`${t?"bg-primary-main":"group bg-white"} flex-1 flex items-center justify-center cursor-pointer ${e}`,mr=e=>`${e?"text-white":"text-secondary-text group-hover:text-primary-main "} font-sans font-normal text-m-md`,hr=a((({className:e="",navigatorTabs:t,context:r,anchor:a=null})=>{const l=globalThis.location?.href;return n("section",{className:`sticky top-0 z-20 box-border flex gap-x-1 h-14 ${e}`,id:a,children:t?t.map(xr(r,l)):null})})),xr=(e,t)=>(r,a)=>{const{useRouter:l,handlerDecorator:i}=e,s=l(),o=P(t),c=o?r.href===o:0===a;return n(cr,{active:c,...G({router:s,handlerDecorator:i},r)},r.href)},ur=a((({blocks:e,columns:t=1,context:r})=>n("div",{className:"transition-all duration-300 max-h-0 overflow-hidden",children:n("div",{className:"box-border w-full p-9 "+(t>1?"flex flex-wrap":""),children:Ue({context:r,className:"box-border p-5",columns:t,blocks:e})})}))),pr=a((({label:e,isExpanded:t,blocks:a,columns:l,context:i})=>{const{hasContent:s,icon:o,handleToggle:c,isActive:d}=(({context:e,blocks:t,initialState:n=!1})=>{const[r,a]=e.useState(n),l=t?.length;return{isActive:r,hasContent:l,icon:r?"ArrowUpIcon":"ArrowDownIcon",handleToggle:e=>{if(!l)return;a(!r);const t=(({currentTarget:e})=>e.previousSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:i,blocks:a,initialState:t});return r("div",{className:"border-0 border-b border-solid border-main-divider",children:[s?n(ur,{isExpanded:d,columns:l,blocks:a,context:i}):null,r("button",{className:"border-none bg-primary-main px-0 py-[26px] mb-[1px] w-full font-sans text-white text-base flex justify-center cursor-pointer",onClick:c,children:[n("span",{className:"pr-3",children:d?"Скрыть":e}),s?n(m,{name:o,width:"20",height:"20",asSVG:!0}):null]})]})})),br=a((({blockItems:e,colorPalette:t,context:r,className:a=""})=>n("section",{"data-theme":t||null,className:`font-sans bg-white text-primary-text ${a}`,children:e?.length?n("div",{className:"list-none m-0 p-0",children:e.map(((e,t)=>n(pr,{...e,context:r},`BlockItem${t}`)))}):null}))),gr=a((({className:e,context:t,title:a,description:l="Блок в разработке...",anchor:i=null})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${we(e)} ${ye(e)} `,id:i,children:r(le,{context:t,title:a?n(s,{headingType:vt(e),title:a,className:"whitespace-pre-wrap max-w-[600px]"}):null,children:[l?n(Q,{className:"mt-4 max-w-[600px]",description:l}):null,n("figure",{className:"m-0 min-w-[600px]",children:fr()})]})}))),fr=(e=3)=>vr(100,e).map((e=>Math.floor(e))).map(Nr),Nr=(e=100,t)=>n("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),vr=(e,t)=>[e].concat(t>0?vr(e/1.618,t-1):[]),yr={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},wr=a((({block:e,headingType:t,context:r,className:a=""})=>n("section",{className:`flex grow-0 shrink-0 basis-full ${yr[e?.version??"primary"]} ${a}`,role:"listitem",children:n("div",{className:"p-10 flex grow",children:n(ce,{className:"pl-2.5 pt-2.5 pb-1.5 pr-[6.25rem]",context:r,headingType:t||"h2",...e})})}))),Ir=a((({className:e,context:t,duration:a=0,slides:l=[],anchor:i=null})=>{const s=l.map((e=>e.nav)),o=l.map((e=>e.productBlock)),[c,d]=t.useState(0);return r("section",{className:`font-sans bg-white overflow-hidden w-100 ${e||""}`,id:i,children:[n("div",{className:"flex duration-1000",style:{transform:`translateX(-${c}00%)`},role:"list",children:o.map(((e,r)=>n(wr,{context:t,block:e},String(r))))}),n("div",{className:"flex",children:s.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:a,onClick:l,duration:i}){const s=t===a,o=s?"animate-slide":"",c=s?"text-primary-text":"text-secondary-text";return r("button",{type:"button",onClick:l,"aria-label":e?.title,className:"font-sans group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 pt-4 pb-[23px] 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 pb-[3px] group-hover:text-primary-text ${c}`,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 ${o}`,style:{animationDuration:`${i}s`,animationFillMode:"forwards"}})]},String(t))}({slide:e,i:t,activeSlideIndex:c,onClick:()=>d(t),duration:a})))})]})}));const kr={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Cr={primary:{title:"text-secondary-text",text:"text-secondary-text"},secondary:{title:"text-white",text:"text-white/80"}},$r={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Sr=a((({className:e="",context:t,slides:a=[],version:l="primary",duration:i=0,anchor:s=null})=>{const o=a.map((e=>e.nav)),c=a.map((e=>e.productBlock)),[d,m]=t.useState(0);return r("section",{id:s,className:`box-border pt-[50px] overflow-hidden relative font-sans w-100 ${e}\n ${kr[l]}`,children:[n("div",{className:"flex duration-1000 pb-14",style:{transform:`translateX(-${d}00%)`},role:"list",children:c.map(((e,r)=>function(e,t,r){const{version:a}=e,l=a?Cr[a].title:"";return n("section",{className:"box-border relative flex grow-0 shrink-0 basis-full",role:"listitem",children:n("div",{className:"flex grow",children:n(ce,{className:`pl-[50px] pr-2 z-[1] ${l}`,context:r,textBlockClassName:"mb-[154px]",...e})})},String(t))}({...e,version:l},r,t)))}),n("div",{className:"flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border",children:o.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:a,onClick:l,version:i,duration:s}){const o=t===a,c=o?"bg-white shadow-dark-blue/42 h-[102px] w-[354px] min-w-[354px] max-w-[354px] p-0 border-none":`min-w-[277px] px-0 pt-4 pb-[23px] hover:py-[26px] hover:py-[26px] ease-in duration-300\n ${$r[i]}`,d=o?"text-primary-text text-title-2xs":`text-base ${Cr[i].title}`,m=o?"text-secondary-text text-m-title-xs mt-2.5":`text-m-md mt-1.5 ${Cr[i].text}`,h="secondary"===i?"border-white/50":"",x=o?"animate-slide":"";return r("button",{type:"button",onClick:l,"aria-label":e?.title,className:`box-border font-sans group relative overflow-hidden border-[1px] cursor-pointer text-left mx-1 grow basis-0 backdrop-blur-sm\n ${c} ${h}\n `,children:[r("div",{className:"border-0 px-6",children:[n("div",{className:`font-medium ${d}`,children:e?.title}),n("div",{className:`text-secondary-text ${m}`,children:e.description})]}),n("div",{className:`absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${x}`,style:{animationDuration:`${s}s`,animationFillMode:"forwards"}})]},String(t))}({slide:e,i:t,activeSlideIndex:d,onClick:()=>m(t),version:l,duration:i})))})]})}));const Tr={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Dr=a((({className:e="",context:t,title:a="Акции и спецпредложения",date:l,description:i,buttons:o=[],version:c="primary",anchor:d=null})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${Tr[c]} ${we(e)} ${ye(e)} `,id:d,children:n(le,{context:t,title:a?n(s,{headingType:vt(e),title:a,className:"whitespace-pre-wrap max-w-[600px]"}):null,buttons:o?.length?n(X,{context:t,buttons:o,className:"flex mt-9 gap-3"}):null,children:r("div",{className:"mt-1.5",children:[l?n("div",{className:"text-sm mb-2",children:Ar(l)}):null,n("div",{className:"text-base",children:i})]})})})));function Ar(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const Rr=a((({context:e,className:t="",title:a,description:l,items:i,image:o,version:c,socialMedia:d})=>n("section",{className:`border border-solid box-border p-[30px] w-[524px] ${t}`,role:"listitem",children:r(le,{context:e,className:"flex justify-between",title:a?n(s,{headingType:"h4",as:"h3",className:"font-normal mb-3.5",title:a}):null,image:o?.src&&n(x,{className:"mt-auto ml-7",image:o}),children:[l?n(Q,{className:"text-left",description:l}):null,i?.length?n(ae,{className:"text-md text-left font-light flex flex-col flex-1 gap-2",items:i,version:c}):null,n($n,{className:"pt-[42px] pb-0",media:d,version:c,context:e})]})}))),Mr="absolute top-0 bottom-0 w-[84px]",Lr=a((({context:e,recommendations:t=[],className:a="",title:l,version:i,anchor:o=null})=>{const[c,d]=e.useState(0),m="secondary"===i?"border-white/50":"border-main-stroke";return r("section",{className:`relative font-sans p-9 overflow-hidden text-center ${"secondary"===i?"bg-primary-main text-white":"bg-white text-primary-text"} ${a}`,id:o,children:[l?n(s,{headingType:"h2",className:"mb-6",title:l}):null,n("div",{className:"flex duration-1000 gap-3.5",style:{transform:`translateX(-${525*c}px)`},role:"list",children:t?.length?t.map(Pr({context:e,version:i,className:m})):null}),jr({cardsCount:t.length,activeCardIndex:c,setActiveCardIndex:d}),n("div",{className:`${Mr} left-0 ${"secondary"===i?"bg-opacity-from-main":"bg-opacity-from-white"}`}),n("div",{className:`${Mr} right-0 ${"secondary"===i?"bg-opacity-to-main":"bg-opacity-to-white"}`})]})})),Pr=({context:e,version:t,className:r})=>(a,l)=>n(Rr,{context:e,...a,version:t,className:r},String(l)),jr=({cardsCount:e,activeCardIndex:t,setActiveCardIndex:a})=>{const l=e>2,i=l&&e-t>2;return r("div",{children:[l&&t>0&&n(De,{className:"absolute top-1/2 left-8 z-10 mt-6",onClick:()=>a(t-1),ariaLabel:"Пролистать влево"}),i&&n(De,{className:"absolute top-1/2 right-8 z-10 mt-6 rotate-180",onClick:()=>a(t+1),ariaLabel:"Пролистать вправо"})]})},Br=a((({className:e="",title:t,showLines:a=!0,steps:l=[],button:i,anchor:o=null})=>{const c=l.length>3;return r("section",{className:["box-border font-sans text-primary-text bg-white",c?"px-20":"px-[70px]","py-[50px] flex flex-col items-center",e].join(" "),id:o,children:[n(s,{headingType:"h2",className:"max-w-[47rem] text-center",title:t}),l?.length?r("div",{className:"box-border "+(t?"mt-9":""),children:[n("div",{className:"flex items-center px-[88px]",children:E(n("div",{className:"h-0.5 w-full bg-secondary-light "+(a?"":"opacity-0")}))(l.map(_r))}),n("div",{className:"flex justify-between "+(c?"gap-x-3":"gap-x-[101px]"),children:l.map(((e,t)=>Vr(e,t,Boolean(i?.text))))})]}):null,i?.text?n(q,{className:"box-border mt-8 py-3 h-12 w-full max-w-[240px]",version:"primary",href:"#",children:i.text}):null]})})),_r=(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?.icon&&n(x,{image:e.icon,width:"48",height:"48"})||n("span",{className:"font-normal text-title-sm text-secondary-text",children:t+1})})},String(t)),Vr=(e,t,a)=>r("div",{className:"flex flex-col items-center justify-between text-center relative w-[276px] whitespace-pre-line overflow-hidden",children:[r("div",{children:[e.label&&n("div",{className:"font-normal text-xl m-0 mt-4",children:e.label}),e.description&&n("div",{className:"font-light text-base text-secondary-text "+(e.label?"mt-2":"mt-4"),children:e.description})]}),e?.button?.text&&!a?n(q,{className:"box-border mt-8 py-3 h-12 w-full max-w-[240px]",version:"primary",href:"#",children:e.button.text}):null]},String(t)),Gr=e=>e?.alt||e?.title||c[e?.icon?e.icon:""],Wr=a((({cell:e,isLastRow:t})=>n("div",{className:"first:pl-0 pl-10 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0 "+(t?"border-t-0 rounded-b-md":""),role:"cell",children:n("div",{children:e.map(Er)})}))),Er=({label:e,description:t,list:a,image:l,buttons:i},s)=>r("div",{className:"first:pt-5 last:pb-5",children:[s>0&&n("div",{className:"border-main-divider border border-solid border-t-0 border-x-0 my-4"}),e?n("div",{className:"text-xl font-medium m-0",children:e}):null,t?n("div",{className:"text-sm text-secondary-text",children:t}):null,a?.items?.length?Or(a):null,l&&n(x,{image:l}),i?.length?Fr(i):null]},String(s)),Or=e=>n(ae,{className:"flex flex-col justify-between items-start text-sm",version:"gray",items:e.items,isDotted:e.isDotted??!0}),Fr=e=>n("div",{children:e.map((({icon:e,rounded:t,...r},a)=>n(q,{className:(a>0&&t?"ml-3":"")+" w-12 h-12",ariaLabel:Gr(e),rounded:t,appendLeft:e?n(x,{image:e,width:"24px",height:"24px",asSVG:!0}):null,...r},String(a))))}),Hr=a((({row:{header:e,data:t},activeCardIndex:a,isLastRow:l})=>r(Ye,{children:[n("div",{className:"text-sm py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0 "+(l?"":"border-solid"),children:r("div",{className:"flex items-center text-primary-text",children:[e?.icon?n(x,{className:"mr-[14px] max-w-6 max-h-6",image:e.icon,width:"24px",height:"24px",asSVG:!0}):null,e?.title]})}),t?.length?n(lt,{activeCardIndex:a,columnWidth:360,version:"tariff",children:t.map(((e,t)=>n(Wr,{cell:e,isLastRow:l},String(t))))}):null]}))),Ur=a((({className:e,context:t,title:a,description:l,rowHeaders:i,columns:o,anchor:c=null})=>{const[d,m]=t.useState(0),h=Zr(o),x=zr(i,h),u=xt({columnsLength:h.length,colsLengthForScroll:2,activeCardIndex:d,setActiveCardIndex:m}),{isScrollAvailable:p}=u;return r("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,id:c,children:[a?n(s,{headingType:"h2",className:"text-center "+(l?"mb-2.5":"mb-9"),title:a}):null,l?n("div",{className:"mb-9 text-center text-m-base",children:l}):null,x?.length?r("div",{role:"table",children:[r("div",{className:"relative",children:[x.map(((e,t,{length:r})=>n(Hr,{row:e,isLastRow:t+1===r,activeCardIndex:d},String(t)))),n(mt,{...u})]}),p?n("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]}):null]})})),Zr=e=>e?.map((({data:e})=>e))||[],zr=(e,t)=>e?.map(((e,n)=>({header:e,data:t.map((e=>e?.[n]||[{}]))}))),qr={Accordion:Je,BenefitsBlock:Ke,Bonus:Qe,ComparisonTable:pt,CreditCalculator:Vt,ExchangeRateTile:rn,Footer:An,Gallery:We,GracePeriod:Rn,Header:lr,Headline:N,LinkDocs:T,MiniGallery:Ee,MobileAppTile:ir,NavigatorTabs:hr,PictureText:A,ProductBlock:pe,ProductGallery:Ir,ProductGalleryGreen:Sr,ProductTile:Se,PromoTile:Dr,OtherProducts:br,Recommendation:Lr,StepsBlock:Br,TariffsTable:Ur,TextBlock:ge,Tile:ke,Navigation:or,Placeholder:gr},Jr=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:Kr()}))),Kr=()=>{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"})]})},Xr=a((({className:e,context:t,anchor:a=null})=>{const l=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||""}`,id:a,children:[n(Jr,{onClick:l.like,ariaLabel:"Поставить отметку «лайк»"}),n(Jr,{onClick:l.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),n("span",{className:"select-none",children:l.likeCount})]})})),Qr=!Xn(),Yr=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),ea=a((({className:e="",context:t,blocksRegistry:a,data:{style:l,blocks:i,slots:s={},likeControl:o,colorPalette:c="pc"},blockDecorator:d=Yr})=>{const{header:m}=s,h=t.useRouter();return Qr&&globalThis.addEventListener("load",(()=>{const e=globalThis.document.querySelectorAll("section[id]");globalThis.document.addEventListener("scroll",(()=>((e,t)=>{t?.forEach((t=>{const n=globalThis.location?.hash;if(n===`#${t?.id}`)return;const r=t?.getBoundingClientRect();r&&r.top>0&&r.top<150&&e.replace(`#${t?.id}`)}))})(h,e)))})),r("section",{className:`relative ${na(l)} ${e}`,"data-theme":c,children:[m?.blocks?.length?n("div",{className:`${na(m?.style)}`,children:m.blocks.map(((e,n)=>ta({block:e,blockDecorator:d,blocksRegistry:a,context:t},n)))}):null,i?.length?n("div",{className:"container grid grid-cols-12 gap-1",children:i.map(((e,n)=>ta({block:e,blockDecorator:d,blocksRegistry:a,context:t},n)))}):null,o&&n("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:n(Xr,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t},"LikeControl")})]})}));function ta({block:e,blockDecorator:t,blocksRegistry:r,context:a},l){const{type:i}=e;i&&i in r||console.warn(`No block with "${i}" is registered`);const s=r[i||"Placeholder"]||gr;return t({blockClassName:`scroll-mt-12 ${na(e.style)}`,block:e,render:e=>{const{version:t,content:r,anchor:o}=e.block;return n(s,{className:e.blockClassName,version:t,context:a,anchor:o,...r},`${i}-${l}`)}},`block-${l}`)}function na(e){return e?e.join(" "):""}const ra=a((({HeadComponent:e,data:t,children:a})=>{const{title:l,main:i,og:s,twitter:o,jsonLd:c}=t,{description:d,keywords:m,canonical:h,robots:x}=i||{};return r(e,{children:[n("title",{children:l}),n("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),d&&n("meta",{name:"description",content:d}),m&&n("meta",{name:"keywords",content:m.join(",")}),x&&n("meta",{name:"robots",content:x.join(",")}),aa(s),la(o),h&&n("link",{rel:"canonical",href:h}),c&&n("script",{type:"application/ld+json",children:c}),a]})}));function aa(e){return e?Object.entries(e).map((([e,t])=>n("meta",{property:`og:${e}`,content:t},e))):null}function la(e){return e?Object.entries(e).map((([e,t])=>n("meta",{name:`twitter:${e}`,content:t},e))):null}function ia(e){const{mobile:t,...n}=e;return n}function sa(e){return e?.filter((e=>{return t=e?.type,(t||"")in qr;var t})).map(ia)}e.Blocks=qr,e.ContentPage=ea,e.ContentPageHead=ra,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.Header=lr,e.Icon=m,e.LikeAPI=function(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(l)||"");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(l,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:l}=await n.json();return l||[]}catch(e){return console.error(e),[]}},like:async function(r){if(!r)return 0;const{token:a,name:l}=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:l},body:JSON.stringify({node_id:r,user_name:l})}),{likes:i}=await n.json();return i||0}catch(e){return console.error(e),0}},dislike:async function(r){if(!r)return 0;const{token:a,name:l}=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:l},body:JSON.stringify({node_id:r,user_name:l})}),{likes:i}=await n.json();return i||0}catch(e){return console.error(e),0}}}},e.joinList=E,e.normalizePage=function(e){if(!e)return;const{blocks:t,slots:n}=e;return{...e,blocks:sa(t),slots:n&&Object.keys(n).reduce(((e,t)=>({...e,[t]:{...n[t],blocks:sa(n[t].blocks)}})),{})}},e.projectSettings=d,e.setup=t,e.url=j,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).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:a,...r}={})=>{const l=Object.assign({},r,a?{innerHTML:a.__html}:{});return e(t,l,"string"!=typeof t?()=>n:n)}))};const n=(...e)=>t._jsx(...e),a=(...e)=>t._jsxs(...e),r=e=>(e._tmpl||(e._tmpl=function(t,n){const{children:a,...r}=t||{},l=n?.slots?.default,i=a||l&&l();return e(Object.assign(r,i&&{children:i}),n)},e._tmpl.inheritAttrs=!1),e._tmpl);const l="likesToken";const i={h1:"text-title-xl tracking-[-0.3px]",h2:"text-title-lg",h3:"text-title",h4:"text-title-sm",h5:"text-title-xs",h6:"text-title-2xs tracking-[0.2px]"},s=r((e=>{const{className:t="",headingType:a,title:r,as:l}=e;if(!a)return;return n(l||a,{className:`font-sans m-0 ${i[a]} ${t}`,children:r})}));var o,c;!function(e){e.ActualBalanceIcon="ActualBalanceIcon",e.AppleIcon="AppleIcon",e.ArrowDownIcon="ArrowDownIcon",e.ArrowLeftIcon="ArrowLeftIcon",e.ArrowsRewindRight="ArrowsRewindRight",e.ArrowUpIcon="ArrowUpIcon",e.AtmIcon="AtmIcon",e.BankIcon="BankIcon",e.BurgerIcon="BurgerIcon",e.BurgerIconWhite="BurgerIconWhite",e.Calendar2Icon="Calendar2Icon",e.CalendarCircleIcon="CalendarCircleIcon",e.CalendarIcon="CalendarIcon",e.CalendarTickIcon="CalendarTickIcon",e.CalendarWhiteIcon="CalendarWhiteIcon",e.CardIcon="CardIcon",e.CardPosIcon="CardPosIcon",e.CardTickIcon="CardTickIcon",e.CardWithGemIcon="CardWithGemIcon",e.ChartSquareIcon="ChartSquareIcon",e.ClockIcon="ClockIcon",e.CloseIcon="CloseIcon",e.ComfortableCompIcon="ComfortableCompIcon",e.CreditCardsIcon="CreditCardsIcon",e.DiscountShapeIcon="DiscountShapeIcon",e.DocIcon="DocIcon",e.DocIconMonoColor="DocIconMonoColor",e.DocumentTextIcon="DocumentTextIcon",e.DollarIcon="DollarIcon",e.EarthIcon="EarthIcon",e.EmptyWalletChangeIcon="EmptyWalletChangeIcon",e.EmptyWalletIcon="EmptyWalletIcon",e.EmptyWalletWhiteIcon="EmptyWalletWhiteIcon",e.EuroIcon="EuroIcon",e.GeolocationIcon="GeolocationIcon",e.GlassIcon="GlassIcon",e.GlobalIcon="GlobalIcon",e.GpsIcon="GpsIcon",e.GridIcon="GridIcon",e.GridIconWhite="GridIconWhite",e.InterestGrowthIcon="InterestGrowthIcon",e.InterestIcon="InterestIcon",e.JCBIcon="JCBIcon",e.LoupeIcon="LoupeIcon",e.MasterCardIcon="MasterCardIcon",e.MinusIcon="MinusIcon",e.MirIcon="MirIcon",e.MoneyIcon="MoneyIcon",e.MoneyInsuranceIcon="MoneyInsuranceIcon",e.MonitorMobileIcon="MonitorMobileIcon",e.NewDocIcon="NewDocIcon",e.OfficeIcon="OfficeIcon",e.OkIcon="OkIcon",e.PassSendIcon="PassSendIcon",e.PercentageRoundIcon="PercentageRoundIcon",e.PercentageSquareIcon="PercentageSquareIcon",e.PercentageSquareWhiteIcon="PercentageSquareWhiteIcon",e.PersonalCardIcon="PersonalCardIcon",e.PlayMarketIcon="PlayMarketIcon",e.PlusIcon="PlusIcon",e.Profile2UserIcon="Profile2UserIcon",e.ProfileIcon="ProfileIcon",e.RoundRubleIcon="RoundRubleIcon",e.SafeIcon="SafeIcon",e.ShieldTickIcon="ShieldTickIcon",e.SignDocsIcon="SignDocsIcon",e.SmallClockIcon="SmallClockIcon",e.TelegramIcon="TelegramIcon",e.UnionPayIcon="UnionPayIcon",e.UserTickIcon="UserTickIcon",e.VisaIcon="VisaIcon",e.VKIcon="VKIcon",e.WalletAdd2Icon="WalletAdd2Icon",e.WalletAddIcon="WalletAddIcon",e.WalletIcon="WalletIcon",e.WalletWithMoneyIcon="WalletWithMoneyIcon"}(o||(o={})),function(e){e.ActualBalanceIcon="Деньги",e.AppleIcon="Лого «Apple»",e.ArrowDownIcon="Стрелка 'Вниз'",e.ArrowLeftIcon="Стрелка",e.ArrowsRewindRight="ArrowsRewindRight",e.ArrowUpIcon="ArrowUpIcon",e.AtmIcon="Банкомат",e.BankIcon="Банк",e.BurgerIcon="Бургер",e.BurgerIconWhite="Бургер (белый)",e.Calendar2Icon="Календарь 2",e.CalendarCircleIcon="Скруглённый календарь",e.CalendarIcon="Календарь",e.CalendarTickIcon="Календарь с галочкой",e.CalendarWhiteIcon="Календарь белый",e.CardIcon="Кред. карта",e.CardPosIcon="Кред. карта под наклоном",e.CardTickIcon="Кред. карта с галочкой",e.CardWithGemIcon="Карта с драгоценностями",e.ChartSquareIcon="Деньги внутри кошелька",e.ClockIcon="Часы",e.CloseIcon="Крестик",e.ComfortableCompIcon="Кресло",e.CreditCardsIcon="Кредитные карты",e.DiscountShapeIcon="Скидка",e.DocIcon="Документ",e.DocIconMonoColor="Документ (одноцветный)",e.DocumentTextIcon="Документ с текстом",e.DollarIcon="Доллар",e.EarthIcon="Земля",e.EmptyWalletChangeIcon="Пустой кошелёк с возвратом",e.EmptyWalletIcon="Пустой кошелёк",e.EmptyWalletWhiteIcon="Пустой кошелёк (белый)",e.EuroIcon="Евро",e.GeolocationIcon="Геолокация",e.GlassIcon="Зеркало",e.GlobalIcon="Глобус",e.GpsIcon="Gps",e.GridIcon="Сетка",e.GridIconWhite="Сетка (белая)",e.InterestGrowthIcon="Диаграмма роста",e.InterestIcon="Скидка",e.JCBIcon="JCB",e.LoupeIcon="Лупа",e.MasterCardIcon="MasterCard",e.MinusIcon="Минус",e.MirIcon="МИР",e.MoneyIcon="Деньги",e.MoneyInsuranceIcon="Денежное страхование",e.MonitorMobileIcon="Монитор и мобильный",e.NewDocIcon="Новый документ",e.OfficeIcon="Офис",e.OkIcon="Лого «Одноклассники»",e.PassSendIcon="Бизнес",e.PercentageRoundIcon="Проценты (круг.)",e.PercentageSquareIcon="Проценты",e.PercentageSquareWhiteIcon="Проценты белые",e.PersonalCardIcon="Персональная карта",e.PlayMarketIcon="Лого «PlayMarket»",e.PlusIcon="Плюс",e.Profile2UserIcon="Профиль, 2 персоны",e.ProfileIcon="Профиль",e.RoundRubleIcon="Рубль (круг.)",e.SafeIcon="Сейф",e.ShieldTickIcon="Безопасность",e.SignDocsIcon="Подписанные документы",e.SmallClockIcon="Маленькие часы",e.TelegramIcon="Лого «Telegram»",e.UnionPayIcon="UnionPay",e.UserTickIcon="Пользователь",e.VisaIcon="Visa",e.VKIcon="Лого «VK»",e.WalletAdd2Icon="Пополнение карты",e.WalletAddIcon="Кошелёк с плюсом",e.WalletIcon="Кошелёк",e.WalletWithMoneyIcon="Кошелёк с деньгами"}(c||(c={}));const d=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=r((({className:e="",name:t="",alt:r=`Иконка ${c[t]||t}`,title:l=r,iconVersion:i,asSVG:s,...o})=>{const m=`${d.CDN||""}icons/${t}.svg`,h="white"===i?"text-black invert":"";return s?a("svg",{className:e,...o,"aria-hidden":"true",children:[l?n("title",{children:l}):null,r?n("desc",{children:r}):null,n("use",{className:h,href:`${m}#icon`,xlinkHref:`${m}#icon`})]}):n("img",{className:e,src:m,alt:r,title:l,...o,"aria-hidden":"true"})}));function h(e){return"string"==typeof e?"normal":e.iconVersion||"normal"}const x=r((({className:e="",image:t,imageClassName:a="",...r})=>{if(!t)return null;const l="string"==typeof t?t:t.icon;return l||""===l?l.length?n(m,{className:e,iconVersion:h(t),name:l,...r}):null:n(u,{className:e,imageClassName:a,image:t})})),u=r((({className:e="",image:t,imageClassName:r=""})=>t?a("picture",{className:`flex-none ${e}`,children:[t?.sources?.length?t.sources.map((({src:e,format:t},a)=>n("source",{srcSet:e,type:b(t)},`${a}_${e}`))):null,p(t,r)]}):null)),p=(e,t="")=>{const a={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},r=e.title||"",l=e.alt||e.title;return n("img",{src:e.src,className:t,alt:l,title:r,style:a,...e.size})};function b(e){return e?`image/${String(e)}`:void 0}const g={left:"text-left",center:"text-center",right:"text-right"},f={transparent:{background:"bg-transparent",text:"text-primary-text",description:"text-primary-text"},primary:{background:"bg-white",text:"text-primary-text",description:"text-primary-text"},secondary:{background:"bg-primary-main",text:"text-white",description:"text-white/80"}},N=r((({bgColorHeadline:e="transparent",align:t="left",className:r="",title:l,description:i,anchor:o=null})=>{const c=f[e];return a("section",{className:`p-[50px] ${c.background} ${r}`,id:o,children:[l&&n(s,{headingType:"h2",className:`text-primary-text ${c.text} ${g[t]}`,title:l}),i&&n("p",{className:`font-normal text-base mt-4 ${c.text} ${g[t]}`,children:i})]})})),v=r((({className:e,iconClassName:t,textClassName:r,suffixClassName:l,doc:i,icon:s})=>{const{text:o,fileSize:c,...d}=i;return a("a",{className:e,role:"link",...d,children:[s?n(x,{className:t,image:s,width:"24px",height:"24px",asSVG:!0}):null,o?a("span",{className:r,children:[o,n("span",{className:l,children:d?.href&&y(w(d.href),c)})]}):null]})})),y=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),w=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},I=r((({className:e="",doc:t,icon:a})=>n(v,{className:`flex h-full box-border ${e}`,iconClassName:"mr-2.5 min-w-6 min-h-6",textClassName:"self-center font-light",suffixClassName:"text-secondary-text group-hover:text-primary-main",doc:t,icon:a}))),k=r((({className:e,documents:t,columnsMode:a="double",icon:r})=>t?.length?n("div",{className:e,role:"list",children:t.map(((e,t)=>n("div",{className:"double"===a?"basis-[calc(50%-20px)]":"",role:"listitem",children:n(I,{className:"group flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:r})},String(t))))}):null)),C={left:"text-left",center:"text-center",right:"text-right"},$={double:"mb-8",single:"mb-[26px]"},S={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},T=r((({className:e="",title:t,subtitle:r,align:l,documents:i,icon:o={icon:"DocIcon"},columnsMode:c="double",anchor:d=null})=>a("section",{className:`font-sans text-primary-text p-[50px] bg-white ${e}`,id:d,children:[t?n(s,{headingType:"h2",className:`${r?"mb-2.5":$[c]} ${C[l??"center"]}`,title:t}):null,r?n("h3",{className:`text-base mt-0 font-normal ${$[c]} ${C[l??"center"]}`,children:r}):null,n(k,{className:S[c],columnsMode:c,documents:i,icon:o})]}))),D={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},A=r((({className:e="",title:t,image:r,benefits:l,version:i="primary",directionRight:o=!1,anchor:c=null})=>a("section",{className:`relative font-sans p-14 ${D[i]} ${e}`,id:c,children:[n(s,{headingType:"h2",className:"text-center",title:t}),a("div",{className:"flex justify-center mt-9",children:[r?.src&&n(x,{className:o?"order-2 ml-6":"mr-6",image:r}),l?.length?n("div",{className:"flex flex-col",children:l.map(((e,t)=>function(e,t,r){return a("div",{className:"flex flex-row mb-8",children:[e.icon?n(x,{className:"w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]",image:e.icon,width:"48",height:"48",asSVG:!0}):null,a("div",{className:"flex gap-1 flex-col h-full ml-5 max-w-[490px]",children:[e.label&&n("div",{className:"font-medium text-xl m-0 "+("primary"===r?"text-primary-text":""),children:e.label}),e.description&&n("div",{className:"font-normal text-sm "+("primary"===r?"text-secondary-text":""),children:e.description})]})]},String(t))}(e,t,i)))}):null]})]})));const R=e=>e?.includes("//"),M=e=>(e||"").replace(/\/?\?.*/,""),L=e=>{if(!e||!R(e))return;const t=e,n=t.indexOf("//"),a=t.indexOf("/",n+"//".length);return-1!==a?t.substring(0,a):t},P=e=>{if(!e||!R(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0};var j=Object.freeze({__proto__:null,isURL:R,withoutQuery:M,getOrigin:L,getHash:P});const B="/mobile",_=(e,t)=>{if(!e)return e;const n=L(t?.href);return n?e.replace(n,"")||"/":e},V=e=>e;function G({router:e,handlerDecorator:t=V},n){const a=((e,t)=>{if(!e)return e;const n=_(e,t)||"",a=t?.pathname.startsWith(B);return a&&!R(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:a,"aria-label":n.text,onClick:t((t=>{const r=a&&!R(a),l=!n.target||"_self"===n.target;r&&l&&(t.preventDefault(),e.push(a))}),n)}}const W=r((({text:e,href:t,target:a,onClick:r,className:l="",children:i})=>t?n("a",{className:`no-underline ${l}`,href:t,target:a,onClick:r,children:n("span",{className:l,children:e||i})}):n("span",{className:l,children:e||i})));function E(e){return t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:a},n):[n]),[])}const O=r((e=>{const{text:t,aboveText:r,appendLeft:l}=e;return a("div",{className:F(e),children:[l||null,H(e)?a("div",{children:[n("div",{className:"text-m-2xs font-light text-left",children:r}),n("div",{className:"text-button text-left",children:t})]}):null]})})),F=e=>{const{version:t,aboveText:n,rounded:a}=e;if("link"===t)return"";const r="px-8 gap-2 "+(n?"py-2":"py-[18px]");return["flex items-center justify-center",H(e)?r:"h-12 w-12",a?"rounded-full":""].join(" ")},H=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),U={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",link:""},Z={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},z="text-center font-sans select-none",q=r((e=>{const{text:t,aboveText:a,appendLeft:r,children:l,disabled:i,rounded:s,...o}=e,c=l??n(O,{text:t,aboveText:a,appendLeft:r,rounded:s});return n(i?K:J,{rounded:s,...o,children:c})})),J=r((({className:e="",ariaLabel:t,version:a="none",rounded:r,href:l,target:i,children:s,onClick:o,...c})=>n("a",{className:`${z} inline-block cursor-pointer no-underline ${U[a]||""} ${r?"rounded-full":"rounded-md"} ${e}`,href:l,target:i,onClick:o,"aria-label":t,role:l?"link":"button",...c,children:s}))),K=r((({className:e,children:t,ariaLabel:a,version:r="none",rounded:l})=>n("div",{role:"button","aria-disabled":"true","aria-label":a,tabIndex:"-1",className:`inline-block ${z} ${Z[r]||""} ${l?"rounded-full":"rounded-md"} ${e||""}`,children:t}))),X=r((({context:e,className:t="",buttons:a})=>{const{handlerDecorator:r}=e,l=e.useRouter();return a?.length?n("div",{className:`${t}`,children:a.map(((e,t)=>function({icon:e,...t},a){if(!t?.text)return;return n(q,e?{appendLeft:n(x,{image:e,width:"24",height:"24",asSVG:!0}),...t}:{...t},String(a))}(G({router:l,handlerDecorator:r},e),t)))}):null}));const Q=r((e=>{const{className:t="",description:a}=e;return n("div",{className:`font-normal text-base ${t}`,children:a})})),Y={primary:"rounded-full inline-block mr-3 mt-2",secondary:"rounded-full inline-block mr-3 mt-2",gray:"rounded-full inline-block mr-3 mt-2",tile:"rounded-full inline-block mr-4 mt-3","tile-white":"rounded-full inline-block mr-4 mt-3"},ee={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text",tile:"bg-black","tile-white":"bg-white"},te=r((({className:e="",isDotted:t=!0,children:r,version:l="primary"})=>a("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&n("div",{className:ne(l)}),n("span",{children:r})]}))),ne=e=>`${Y[e]} ${ee[e]} ${{primary:"w-2 h-2 min-w-2 min-h-2",secondary:"w-2 h-2 min-w-2 min-h-2",gray:"w-1.5 h-1.5 min-w-1.5 min-h-1.5",tile:"w-[7px] h-[7px] min-w-[7px] min-h-[7px]","tile-white":"w-[7px] h-[7px] min-w-[7px] min-h-[7px]"}[e]}`,ae={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text",tile:"text-primary-text","tile-white":"text-white"},re=r((e=>{const{className:t="",itemClassName:a,isDotted:r,items:l,version:i="primary"}=e;return n("section",{className:`${ae[i]} ${t}`,role:"list",children:l?.length?l.map(((e,t)=>n(te,{className:a,isDotted:r,version:i,children:e},String(t)))):null})})),le=r((({className:e="",title:t,children:r,buttons:l,image:i,anchor:s=null})=>a("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,id:s,children:[t,a("div",{className:"flex grow w-full justify-between",children:[a("div",{className:"flex flex-col justify-between w-full",children:[n("div",{children:r}),l?n("div",{children:l}):null]}),i]})]}))),ie={primary:"text-primary-text",secondary:"text-white"},se={primary:"text-secondary-text",secondary:"text-white"};function oe(e,t){let n="bg-primary-main text-black";return"secondary"===e?n="bg-white/30 text-black":"normal"===t&&(n="bg-secondary-light text-primary-main"),`w-[50px] h-[50px] min-w-[50px] min-h-[50px] rounded-full p-[10px] box-border ${n}`}const ce=r((({className:e="",context:t,title:r,headingType:l="h2",description:i,benefits:s,benefitsVersion:o="normal",buttons:c,image:d,items:m,version:h="primary",isDotted:u=!0,textBlockClassName:p=""})=>{const b="secondary"===h?"text-white":"text-primary-text";return a("div",{className:`flex grow justify-between items-stretch ${e}`,children:[n("div",{className:`flex flex-col ${p}`,children:a(le,{context:t,title:de(r,l),buttons:me(t,c),children:[i&&n(Q,{className:`mt-4 max-w-[600px] text-md font-light ${b}`,description:i}),s?.filter((e=>e.label))?.length?n("div",{className:"flex gap-6 mt-6",children:s.map(((e,t)=>function({benefit:e,version:t="primary",benefitsVersion:r="normal"},l){const i="white"===r||"secondary"===t;return a("div",{className:"flex gap-4 items-center",children:[e.icon?n(x,{className:oe(t,r),image:{...e?.icon,iconVersion:i?"white":"normal"},width:"24",height:"24",asSVG:!0}):null,a("div",{className:"flex gap-0.5 flex-col h-full max-w-[149px] min-w-[149px]",children:[n("div",{className:`text-xl m-0 ${ie[t]}`,children:e.label}),e.description&&n("div",{className:`font-light text-m-md ${se[t]}`,children:e.description})]})]},String(l))}({benefit:e,version:h,benefitsVersion:o},t)))}):null,m?.length?n(re,{className:"mt-5 text-title-2xs font-light",items:m,itemClassName:"mb-[7px]",version:h,isDotted:u}):null]})}),d?.src&&n(x,{className:"mt-auto",image:d})]})})),de=(e,t)=>e&&n(s,{headingType:t,title:e,className:"whitespace-pre-wrap max-w-[600px]"}),me=(e,t)=>t?.length?n(X,{context:e,buttons:t,className:"flex mt-9 gap-4"}):null;function he(e,t,r){return a("div",{className:`flex items-center ${r}`,children:[n(q,{version:t,rounded:!0,className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3",ariaLabel:e?.text,href:e?.href,children:n(x,{className:"w-4 h-4",image:e?.icon||{icon:"ArrowLeftIcon"},asSVG:!0})}),e?.text?n("span",{className:"text-m-md font-light",children:e.text}):null]})}const xe={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ue={primary:"text-secondary-text",secondary:"text-white/80"},pe=r((e=>{const{context:t,className:r="",breadcrumbs:l,backwardButton:i,version:s="primary",anchor:o=null,...c}=e,d=t.useRouter(),{handlerDecorator:m}=t;return a("section",{className:`font-sans overflow-hidden pt-[50px] pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${xe[s]} ${r}`,id:o,children:[i?.text?he(i,s,"mb-10 -mt-2.5"):null,l?.length?n("div",{className:"text-xs mb-6",children:E(n("span",{className:`mx-2 ${ue[s]}`,children:"/"}))(l.map(((e,t)=>n(W,{...G({router:d,handlerDecorator:m},{className:ue[s],...e})},String(t)))))}):null,n(ce,{context:t,version:s,...c})]})})),be={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"}},ge=r((({title:e,description:t,blockVersion:r="primary",iconVersion:l,image:i,className:s,anchor:o=null})=>{const c=be[r];return a("section",{className:`font-sans px-9 py-4 flex ${c.background} ${s||""}`,id:o,children:["small"===l?fe(c.icon):null,"big"===l?Ne(i):null,a("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 fe(e){return n("div",{className:"pt-1.5 pl-1 pr-4",children:n("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function Ne(e){return e?.src?n(x,{className:"pt-0.5 pr-3",image:e}):null}const ve=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function ye(e=""){const t=ve(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function we(e=""){const t=ve(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Ie={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},ke=r((e=>{const{context:t,title:r,headingType:l="h3",description:i,items:o,children:c,buttons:d,image:m,className:h="",version:u="primary",role:p,anchor:b=null}=e;return n("section",{className:`overflow-hidden font-sans p-9 pr-3 box-border ${h} ${Ie[u]} ${we(h)} ${ye(h)} `,role:p,id:b,children:a(le,{context:t,title:r&&n(s,{headingType:l,as:"h3",title:r,className:`whitespace-pre-wrap max-w-[600px] ${r?"mb-3":""}\n ${"primary"===u?"text-primary-text":""}`}),buttons:d?.length?n(X,{context:t,buttons:d,className:"flex mt-9 gap-3"}):null,image:m?.src&&n(x,{className:"mt-auto ml-7",image:m}),children:[i&&n(Q,{className:"max-w-[600px] text-title-new-sm font-light",description:i}),c,Ce(o,u)]})})}));function Ce(e,t){return e?.length?n(re,{items:e,itemClassName:"text-title-2xs font-light mt-2",version:"primary"===t?"tile":"tile-white"}):null}const $e={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Se=r((({context:e,className:t="",title:r,headingType:l="h3",description:i,benefits:o,buttons:c,image:d,version:m="primary",anchor:h=null})=>n("section",{className:`bg-white overflow-hidden text-primary-text font-sans p-9 box-border ${t} ${$e[m]} ${we(t)} ${ye(t)} `,id:h,children:a(le,{context:e,title:r&&n(s,{headingType:l,as:"h3",title:r,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:c?.length?n(X,{context:e,buttons:c,className:"flex mt-9 gap-3"}):null,image:d?.src&&n(x,{className:"mt-auto ml-7",image:d}),children:[i&&n(Q,{className:"mt-4 max-w-[600px]",description:i}),a("div",{className:"flex mt-5 mb-1",children:[o?.length?n("div",{className:"mr-8",children:o.map(Te)}):null,o?.length?n("div",{className:"pt-1",children:o.map(((e,t)=>function(e,t,a="primary"){return n("div",{className:`text-sm ${t?"mt-4":""} ${{primary:"text-secondary-text",secondary:"text-white"}[a]}`,children:e.description},String(t))}(e,t,m)))}):null]})]})})));function Te(e,t){return n("div",{className:"text-xl font-medium "+(t?"mt-2.5":""),children:e.label},String(t))}const De=r((({className:e,disabled:t,...a})=>n(q,{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,...a,children:n(x,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon"},width:"16",height:"16",asSVG:!0})}))),Ae={primary:"bg-white text-secondary-text",secondary:"bg-primary-main text-white"},Re={normal:3,mini:4},Me={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Le={normal:380,mini:276},Pe=r((({title:e,description:t,image:r,items:l,button:i,version:s})=>{const o=function(e){return`text-xl m-0\n ${"secondary"!==e?"text-primary-text":""}\n `}(s);return a("div",{className:"h-full flex flex-col justify-between text-center",children:[a("div",{children:[r?.src?n("div",{className:"flex justify-center",children:n(x,{className:"mb-6",image:r})}):null,e?Be(e,o):null,t?n("div",{className:"font-light text-m-md-new "+(e?"mt-2":""),children:t}):null,l?.length?_e(l,s):null]}),i?.text?je(i):null]})}));function je(e){return n(q,{className:"mt-6 w-full",appendLeft:e.icon&&n(x,{image:e.icon,width:"24px",height:"24px",asSVG:!0}),...e})}function Be(e,t){return n("div",{className:`text-xl m-0 ${t}`,children:e})}function _e(e,t="primary"){return n(re,{className:"max-w-[308px] mt-2 text-sm "+("primary"===t?"!text-secondary-text":""),itemClassName:"mt-1 first:mt-0",items:e.filter((e=>e?.text)).map((e=>e.text)),version:t})}const Ve=r((({context:e,title:t,description:r,cards:l=[],version:i="normal",activeCardIndex:o})=>a("div",{children:[n("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent"}),a("div",{className:"flex flex-col items-center mb-8",children:[t?n(s,{headingType:"h2",className:"text-center",title:t}):null,r?n("div",{className:"font-light text-md max-w-[600px] mt-2.5",children:r}):null]}),n("div",{className:`flex ${l?.length<=Re[i]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${o*Le[i]}px)`},role:"list",children:l?.map(((t,a)=>function({card:e,version:t},a){return n("section",{className:`box-border border-solid border border-main-stroke p-6 mx-2 flex flex-col justify-between\n items-stretch ${Me[t]} ${Ae[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:n(Pe,{...e})},String(a))}({card:t,version:i,context:e},a)))})]})));const Ge=r((({context:e,cards:t=[],className:r="",version:l="normal",anchor:i=null,...s})=>{const[o,c]=e.useState(0),d=t?.length>Re[l],m=d&&t?.length-o>Re[l],h=d&&o>0;return a("section",{className:`relative font-sans text-primary-text bg-white p-[42px] overflow-hidden ${r}`,id:i,children:[n(Ve,{context:e,cards:t,version:l,activeCardIndex:o,...s}),h&&n(De,{className:"absolute top-1/2 left-8 z-10 mt-[25px]",onClick:()=>c(o-1),ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}),m&&n(De,{className:"absolute top-1/2 right-8 z-10 mt-[25px] rotate-180",onClick:()=>c(o+1),ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}),n("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white"}),n("div",{className:"absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white"})]})})),We=r((e=>n(Ge,{...e,version:"normal"}))),Ee=r((e=>n(Ge,{...e,version:"mini"}))),Oe=r((({className:e="",documents:t,anchor:a=null})=>n("section",{className:`font-sans bg-white mt-[10px] ${e}`,id:a,children:n("ul",{className:"flex flex-col text-sm text-secondary-text p-0",children:t?.length?Fe(t):null})}))),Fe=e=>e.map(((e,t)=>{const{text:a,...r}=e;return n("li",{className:"mb-4 list-none",children:n("a",{className:"hover:text-primary-main",role:"link",...r,children:a||null})},`list_item_${String(t)}`)})),He={Headline:N,LinkDocs:T,TextBlock:ge,PictureText:A,ProductBlock:pe,Tile:ke,ProductTile:Se,Gallery:We,MiniGallery:Ee,LinkList:Oe},Ue=({blocks:e,context:t,className:n,columns:a})=>e?.length?e.map(Ze({context:t,className:n,columns:a})):null,Ze=({context:e,columns:t,className:a})=>(r,l)=>{const i=r?.blockListType;if(!i||!(i in He))return null;return n("div",{className:`${a} ${2===t?"w-1/2":""}`,children:n(He[i],{context:e,...r,className:"!p-0"})},`block_${l}`)},ze=r((({blocks:e,context:t})=>n("div",{className:"transition-all duration-300 max-h-0 overflow-hidden",children:Ue({context:t,className:"mb-5 last:mb-0 pb-5",blocks:e})}))),qe=r((({label:e,isExpanded:t,blocks:r,context:l})=>{const{isActive:i,hasContent:s,icon:o,handleToggle:c}=(({context:e,blocks:t,initialState:n=!1})=>{const[a,r]=e.useState(n),l=t?.length;return{isActive:a,hasContent:l,icon:a?"MinusIcon":"PlusIcon",handleToggle:e=>{if(!l)return;r(!a);const t=(({currentTarget:e})=>e.nextSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:l,blocks:r,initialState:t});return a("li",{className:"border-0 border-b border-solid border-main-divider last:border-b-0",children:[a("button",{className:`border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans\n ${s?"group cursor-pointer":""}\n `,onClick:c,children:[n("span",{className:"text-xl pr-2.5 font-medium",children:e}),s?n(x,{image:o,className:"text-primary-main",width:"24",height:"24",asSVG:!0}):null]}),s?n(ze,{isExpanded:i,blocks:r,context:l}):null]})})),Je=r((({title:e,description:t,accordionItems:r,context:l,className:i="",anchor:o=null})=>a("section",{className:`p-[50px] font-sans bg-white text-primary-text ${i}`,id:o,children:[e?n(s,{headingType:"h4",className:"mb-2.5",title:e}):null,t?n("div",{className:"mb-2.5 text-base",children:t}):null,r?.length?n("ul",{className:"list-none m-0 p-0",children:r.map(((e,t)=>n(qe,{...e,context:l},`AccordionItem${t}`)))}):null]}))),Ke=r((({className:e,title:t,benefits:r,anchor:l=null})=>a("section",{className:`font-sans text-primary-text bg-white p-12 flex flex-col items-center ${e||""}`,id:l,children:[t?n(s,{headingType:"h2",className:"max-w-[47rem] text-center",title:t}):null,r?.length?n("div",{className:"grid grid-cols-2 gap-8 mt-9",children:r.map(Xe)}):null]}))),Xe=(e,t)=>a("div",{className:"flex items-center gap-5 max-w-[500px]",children:[e.icon?n(x,{className:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",image:e.icon,width:"70",height:"70"}):null,a("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)),Qe=r((e=>{const{className:t="",title:r,description:l,bonusItems:i,anchor:o=null}=e;return n("section",{className:`font-sans bg-white p-[50px] pb-9 ${t}`,id:o,children:a("div",{className:"container",children:[r?n(s,{headingType:"h3",className:"text-center",title:r}):null,l?n("div",{className:"text-md font-light text-center mt-[10px]",children:l}):null,n("div",{className:"flex flex-wrap w-full mt-9",children:i?i.map(((e,t)=>n("div",{className:"flex-grow w-[49%] border border-gray pl-9 pt-9 pr-6 pb-6 mb-[14px] mx-[7px] even:mr-0 odd:ml-0 last:odd:mx-0",children:a("div",{className:"flex justify-between w-full",children:[a("div",{className:"mr-4",children:[n("div",{className:"text-title-sm",children:e.name}),n("div",{className:"text-md font-light mt-[14px] max-w-[488px]",children:e.description})]}),e.bonusCount?a("div",{className:"relative -bottom-3 h-auto flex items-end mt-14 shrink-0",children:[n("span",{className:"font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7",children:e.bonusCount}),n("span",{className:"text-[44px] bg-clip-text text-transparent bg-green-to-yellow",children:e.bonusName})]}):null]})},String(t)))):null})]})})})),Ye=r((({children:e})=>n("div",{className:"self-start flex flex-col",role:"row",children:n("div",{className:"flex",children:e})}))),et="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",tt="border-main-stroke border-solid border",nt="border-main-divider border border-t-0 border-x-0",at="w-[200px] mr-6",rt={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},lt=r((({children:e,activeCardIndex:t,columnWidth:a,version:r="comparison"})=>n("div",{className:"flex flex-1 overflow-hidden",children:n("div",{className:rt[r],style:{transform:`translateX(-${t*a}px)`},children:e})}))),it=r((({icon:e,image:t,title:r,link:l})=>a("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${tt} ${et}`,role:"columnheader",scope:"col",children:[e&&!t?.src&&n(x,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}),t?.src&&n(x,{className:"mb-[18px]",image:t}),r&&n(s,{headingType:"h4",as:"h3",className:"text-center text-white",title:r}),l?.text&&n("div",{className:"mt-auto w-full",children:n(q,{href:l.href,target:l.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:n("div",{className:"font-medium text-xs py-[11px]",children:l.text})})})]}))),st=r((({colHeaders:e,activeCardIndex:t,router:r,handlerDecorator:l})=>a(Ye,{children:[n("div",{className:at,role:"columnheader",scope:"col"}),n(lt,{activeCardIndex:t,columnWidth:336,children:e.map(((e,t)=>n(it,{...e,link:e.link&&G({router:r,handlerDecorator:l},e.link)},String(t))))})]}))),ot=r((({cell:e,isFirstRow:t,isLastRow:a,isFillGradient:r})=>n("div",{className:`w-80 box-border flex flex-col ${tt} ${a?"border-t-0 rounded-b-md":"border-y-0"} ${r?et:""}`,role:"cell",children:n("div",{className:`mx-7 h-full ${nt} ${r&&t?"border-t":""} ${a?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>ct(e,t,r)))})}))),ct=({label:e,description:t},r,l)=>a("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e&&n("h4",{className:"text-xl font-medium m-0 "+(l?"text-white":""),children:e}),t&&n("div",{className:"text-sm opacity-80 "+(l?"text-white":"text-secondary-text"),children:t})]},String(r)),dt=r((({row:{header:e,data:t},activeCardIndex:r,isColoredFirstColumn:l,isFirstRow:i,isLastRow:s})=>a(Ye,{children:[e?.title?n("div",{className:`text-sm py-7 ${nt} w-[200px] mr-6 ${s?"border-b-0":"border-solid"}`,children:e.title}):null,t?.length?n(lt,{activeCardIndex:r,columnWidth:336,children:t.map(((e,t)=>n(ot,{cell:e,isFirstRow:i,isLastRow:s,isFillGradient:l&&0===t},String(t))))}):null]}))),mt=r((({isScrollAvailable:e,onNextClick:t,onPrevClick:r,showNextButton:l,showPrevButton:i})=>e?n("div",{children:a("div",{className:"absolute top-7 right-7 z-10",children:[n(De,{className:"mt-4 rotate-180",onClick:t,disabled:!l,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}),n(De,{className:"mt-4",onClick:r,disabled:!i,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"})]})}):null)),ht=r((({rowData:e,activeCardIndex:t,isColoredFirstColumn:r,...l})=>a("div",{className:"relative",children:[e.map(((e,a,{length:l})=>n(dt,{row:e,isFirstRow:0===a,isLastRow:a+1===l,activeCardIndex:t,isColoredFirstColumn:r},String(a)))),n(mt,{...l})]}))),xt=({columnsLength:e,colsLengthForScroll:t,activeCardIndex:n,setActiveCardIndex:a})=>{const r=e>t;return{onNextClick:()=>a(n+1),onPrevClick:()=>a(n-1),isScrollAvailable:r,showNextButton:r&&e-n>t,showPrevButton:Boolean(r&&n>0)}},ut=r((({context:e,columns:t,rowHeaders:r,isShowAllRow:l,visibleRowLength:i,isColoredFirstColumn:s})=>{const o=e.useRouter(),{handlerDecorator:c}=e,d=t?.map((({header:e})=>e||{})),m=t?.map((({data:e})=>e))||[],h=r?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[{}]))}))).slice(0,l?r.length:i),[x,u]=e.useState(0),p=xt({columnsLength:m.length,colsLengthForScroll:2,activeCardIndex:x,setActiveCardIndex:u}),{isScrollAvailable:b}=p;return a("div",{children:[a("div",{role:"table",children:[d?.length?n(st,{colHeaders:d,activeCardIndex:x,router:o,handlerDecorator:c}):null,h?.length?n(ht,{rowData:h,activeCardIndex:x,isColoredFirstColumn:s,...p}):null]}),b?n("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),pt=r((({className:e,context:t,title:r,rowHeaders:l,columns:i,visibleRowLength:o=0,isColoredFirstColumn:c=!1,anchor:d=null})=>{const[m,h]=t.useState(!o);return a("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,id:d,children:[n(s,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:r}),n(ut,{context:t,columns:i,rowHeaders:l,isShowAllRow:m,isColoredFirstColumn:c,visibleRowLength:o}),o?bt({isShowAllRow:m,onClick:()=>h(!m)}):null]})})),bt=({isShowAllRow:e,onClick:t})=>n("div",{className:"pr-[50px]",children:a("div",{className:"flex w-full",children:[n("div",{className:at}),n("button",{onClick:t,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:e?"Скрыть":"Показать все параметры"})})]})}),gt=r((({tabs:e,currentTabIndex:t,onTabClick:a})=>n("div",{className:"flex items-end border-b border-main-stroke",role:"tablist",children:e?.map(ft(t,a))}))),ft=(e,t)=>(r,l)=>{const i=e===l;return a("div",{className:"flex h-full flex-1 cursor-pointer mr-2 last:mr-0 box-content "+(i?"px-2 h-16 pt-4 pb-2 text-white bg-primary-main":"px-2 h-14 pb-2 pt-3 border border-b-0 border-main-stroke"),role:"tab",onClick:()=>t(l),"aria-selected":String(i),children:[r?.icon?Nt(r,i):null,a("div",{children:[r?.title?n("h3",{className:"font-medium m-0 text-base",children:r?.title}):null,r?.description?n("span",{className:"font-light text-xs "+(i?"":"text-secondary-text"),children:r?.description}):null]})]},String(l))},Nt=(e,t)=>n("div",{className:"h-full mt-1",children:n(x,{className:"w-5 h-5 mr-3 "+(t?"invert":""),image:e?.icon||"CardIcon",asSVG:!t})});function vt(e=""){const t=ve(e);return t<=4?"h4":t<=8?"h3":"h2"}async function yt(e){const t=await fetch(e);return await t.json()}const wt=r((({className:e,viewBox:t,fill:a="none",width:r,height:l,paths:i,...s})=>n("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:a,width:r,height:l,children:i.map((({d:e,fill:t,...a},r)=>n("path",{d:e,fill:t||"currentColor",...s,...a},r)))}))),It=[{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"}],kt=r((({text:e,checked:t,onChange:r,className:l})=>n("div",{className:l,children:a("label",{className:"flex items-center cursor-pointer relative",children:[n("input",{className:`peer appearance-none w-5 h-5 border-solid border ${t?"border-black":"border-main-stroke"} rounded checked:bg-primary-main checked:border-primary-main m-0`,type:"checkbox",onChange:e=>{r(e.target.checked)},checked:t}),n(wt,{paths:It,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),e?n("span",{className:"font-sans ml-3 text-sm leading-5 cursor-pointer",children:e}):null]})}))),Ct=(e,t,n)=>Math.max(t,Math.min(e,n)),$t=3e4,St=3e6,Tt=Math.round(41.5),Dt=(At=[[e=>1===e,"год"],[e=>e<=4,"года"],[()=>!0,"лет"]],e=>{const[,t]=At.find((([t])=>t(e)))||[];return t});var At;const Rt=e=>new Intl.NumberFormat("ru-RU",{maximumSignificantDigits:3}).format(e),Mt=r((({className:e,title:t,items:r=[],min:l=1,max:i=100,step:s=1,value:o=l,onChange:c})=>{const d=e=>{if(!c)return;const t=Number(e.replace(/\D/g,""));c(t)},m={backgroundSize:`${(100*(o-l)/(i-l)).toFixed(2)}% 100%`};return a("div",{className:e,children:[a("label",{className:"block 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 border-solid border-main-stroke rounded-md\n outline-none p-0 pl-4 m-0 box-border text-primary-text "+(t?"pt-4":""),value:Rt(o),onChange:e=>d(e.target.value),onBlur:()=>{c&&(o<l&&c(l),o>i&&c(i))}}),n("div",{className:"absolute inset-x-0 top-[35px] px-4 leading-[18px]",children:n("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:l,max:i,step:s,value:o,onChange:e=>d(e.target.value),style:m})})]}),n("div",{className:"flex justify-between my-3",children:r.map(((e,t)=>a("span",{className:"text-xs leading-[14px] text-secondary-text pl-4",children:[" ",e," "]},String(t))))})]})}));function Lt(e){const{minMonths:t,maxMonths:a,monthsValue:r,defaultMonths:l,setMonthsValue:i}=e;return n(Mt,{className:"mt-[23px]",title:"Срок кредита, месяцев",items:["Или выберите из предложенных вариантов ниже"],min:t,max:a,step:1,value:r||l,onChange:i})}function Pt(e,t){return a("div",{className:"box-border h-fit p-9 bg-primary-main rounded-md text-white",children:[n("div",{className:"text-base mb-[18px]",children:"Наше предложение"}),n("div",{className:"text-sm opacity-60",children:"Ежемесячный платёж"}),a("div",{className:"text-lg mb-3",children:[Rt(Math.round(e))," ₽"]}),n("div",{className:"text-sm opacity-60",children:"Ставка"}),a("div",{className:"text-lg",children:[t," %"]})]})}function jt(e){const{calculatorParams:t,moneyValue:a,defaultSum:r,setMoneyValue:l}=e,i=t?.minSum||$t,s=t?.maxSum||St;return n(Mt,{title:"Желаемая сумма кредита, ₽",items:[`От ${Rt(i)} рублей`,`До ${Rt(s)} рублей`],min:i,max:s,step:1e3,value:a||r,onChange:l})}const Bt=r((({context:e,directoryName:t})=>{const[r,l]=e.useState(void 0),[i,s]=e.useState(void 0),[o,c]=e.useState(!0),[d,m]=e.useState(!0),h=function(e,t){const{data:n}=e(function(e){return`/wcms-resources/${e||"credit-calculator-data"}.json`}(t),yt);return n||{}}(e.useAsyncData,t).rows,x=(e=>{const{tableRows:t,isAnnuity:n=!1}=e;return t&&t.find((e=>e.isAnnuity===n))||{}})({tableRows:h,isAnnuity:o}),u=(e=>e.maxSum&&e.minSum?(e.maxSum-e.minSum)/2:1485e3)(x),p=(e=>e.maxMonths&&e.minMonths?Math.round((e.maxMonths-e.minMonths)/2):Tt)(x),b=x?.minMonths||1,g=x?.maxMonths||84,f=(e=>{const{calculatorParams:t,isInsurance:n}=e;return t?n?t?.rateWithInsurance||5:t?.rateWithoutInsurance||5:5})({calculatorParams:x,isInsurance:d}),N=(e=>{const{calculatorParams:t,paymentType:n,rate:a,sum:r,months:l}=e;if(!t)return 0;const i=Ct(r,t.minSum||$t,t.maxSum||St);if("annuity"===n){const e=Number(a)/1200;return i*(e+e/(Math.pow(1+e,l)-1))}return i/l+i*(Number(a)/12)})({calculatorParams:x,paymentType:"annuity",rate:f,sum:r||u,months:i||p}),v=((e,t)=>{const n=Math.ceil((t-e)/12),a=Math.floor(e/12)+1,r=new Array(Math.min(n-1,5)).fill(0).map(((e,t)=>a+t)),l=n+a-1;return r.concat(l)})(b,g);function y(e){s(Ct(12*e,b,g))}return n("section",{className:"mt-7",children:a("div",{className:"box-border p-[49px] pr-[56px] mx-auto w-max border-solid border-[3px] border-primary-main rounded-md",children:[a("div",{className:"flex justify-between",children:[a("div",{className:"mr-[42px]",children:[jt({calculatorParams:x,moneyValue:r,defaultSum:u,setMoneyValue:l}),Lt({minMonths:b,maxMonths:g,monthsValue:i,defaultMonths:p,setMonthsValue:s}),n("div",{className:"flex mb-7",children:v.map(((e,t)=>function(e,t,r){const l=Dt(e);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:()=>r(e),children:a("span",{className:"font-semibold text-sm",children:[e," ",l]})},String(t))}(e,t,y)))}),n(kt,{text:"Получаю пенсию на карту Россельхозбанка",checked:o,onChange:c}),n(kt,{className:"mt-3 mb-7",text:"Комплексная страховая защита",checked:d,onChange:m})]}),Pt(N,f)]}),a("div",{className:"flex items-center",children:[n(q,{className:"mr-3",text:"Отправить заявку",version:"primary",href:"#"}),n("div",{className:"w-80 text-2xs leading-4 text-secondary-text","aria-label":"Соглашение на обработку персональных данных",children:"Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно требованиям ФЗ «О персональных данных»"})]})]})})})),_t=[{title:"Кредит",description:"Ставка от 6% до 7 лет",directoryName:"credit-calculator-data",icon:{icon:"CardIcon"}},{title:"Кредит",description:"Ставка от 4% до 7 лет",directoryName:"credit-calculator-data1",icon:{icon:"ChartSquareIcon"}},{title:"Кредит",description:"Ставка от 3% до 6 лет",directoryName:"credit-calculator-data2",icon:{icon:"DiscountShapeIcon"}}],Vt=r((({className:e="",context:t,tabs:r=_t,anchor:l=null})=>{const[i,o]=t.useState(0);return a("section",{className:`font-sans text-primary-text py-10 bg-white ${e}`,id:l,children:[n(s,{className:"w-full text-center mb-8",headingType:vt(e),title:"Калькулятор"}),n(gt,{tabs:r,currentTabIndex:i,onTabClick:o}),n(Bt,{context:t,directoryName:r[i]?.directoryName})]})}));async function Gt(){try{const e=await fetch(Wt);return await e.json()}catch(e){console.error(e)}}const Wt="/api/v1/exchangerates.json",Et=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),Ot=e=>e?Et.format(e):"",Ft="font-light text-left font-normal text-sm text-secondary-text",Ht={USD:"DollarIcon",EUR:"EuroIcon"},Ut=r((({className:e,exchangeCurrencyItems:t})=>a("table",{className:`h-fit w-fit ${e}`,children:[n("thead",{children:a("tr",{children:[n("th",{className:Ft,children:"Валюта"}),n("th",{className:`${Ft} pl-11`,children:"Купить"}),n("th",{className:`${Ft} pl-11`,children:"Продать"})]})}),n("tbody",{children:t.map((e=>Zt(e)))})]}))),Zt=e=>{const t=e?.currency?.currency;return a("tr",{className:"pb-1",children:[n("td",{className:"pt-4",children:a("div",{className:"flex items-center",children:[t?n(x,{image:{icon:Ht[t]},width:"24",height:"24"}):null,n("span",{className:"text-m-title-md ml-2",children:t})]})}),n("td",{className:"pt-4 pl-11 m-title-md font-light",children:Ot(e.buyExchangeRate)}),n("td",{className:"pt-4 pl-11 m-title-md font-light",children:Ot(e.saleExchangeRate)})]},t)},zt=r((({className:e="",address:t,distance:r})=>a("div",{className:`flex text-sm ${e}`,children:[n(x,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),a("div",{className:"ml-3 font-light",children:[t?n("p",{className:"m-0 mb-[3px]",children:t}):null,r?a("p",{className:"text-secondary-text m-0",children:["Курс указан для ближайшего офиса - ",r]}):null]})]}))),qt=r((({className:e="",id:t,name:a,type:r="text",placeholder:l})=>n("input",{className:e,id:t,name:a||t,type:r,placeholder:l}))),Jt=r((({className:e="",id:t,name:a,children:r})=>n("select",{className:e,id:t,name:a||t,children:r}))),Kt=r((({className:e="",value:t,selected:a,children:r})=>n("option",{className:e,value:`${t}`,selected:a,children:r}))),Xt=r((({codes:e,className:t=""})=>a("div",{className:`grid gap-3.5 ${t}`,children:[Qt("Хочу продать",e),Qt("Получу",e,"USD"),n(q,{className:"box-border mt-3.5 py-3 h-12 w-full",version:"primary",href:"#",children:"Купить валюту"})]})));function Qt(e,t,r){return a("div",{className:"relative flex items-center",children:[n(qt,{className:"h-10 border pl-4 pt-[7px] pb-[7px] rounded-md text-m-sm w-full appearance-none -mr-12",type:"number",placeholder:`${e}`}),t.length?n(Jt,{className:"h-9 -translate-x-4",children:t.map(((e,t)=>n(Kt,{value:e,selected:e===r,children:e},String(t))))}):null]})}const Yt=["USD","EUR"],en=["RUB","USD","EUR"],tn=[{buyExchangeRate:90.6,saleExchangeRate:92.8,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:73.75,saleExchangeRate:75.95,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],nn={address:"Москва, ул.Ленина д.28",distance:"6км"},an=r((({className:e="",context:t,title:r="Курсы обмена валют",anchor:l=null})=>{const i=function(e){const{data:t}=e(Wt,Gt);return t||{}}(t.useAsyncData)?.exchangeRate?.currencies?.filter((e=>-1!==Yt.indexOf(e?.currency?.currency||"")))||tn;return n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,id:l,children:n(le,{context:t,title:n(s,{headingType:vt(e),title:r,className:"whitespace-pre-wrap"}),children:a("div",{className:"flex",children:[a("div",{className:"mr-[43px] pt-4",children:[i?n(Ut,{className:"mb-[31px]",exchangeCurrencyItems:i}):null,n(zt,{...nn})]}),i?.length?n(Xt,{className:"grow",exchangeCurrencyItems:i,codes:en}):null]})})})})),rn=["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"],ln={"bg-white":"text-primary-main",transparent:"text-white"},sn={"bg-white":"text-black",transparent:"text-white"},on=r((({className:e,href:t,children:r,targetBlank:l,bgColor:i="bg-white",hideTitle:s})=>a("a",{className:`inline-flex items-center font-sans no-underline ${e||""}`,href:t||"https://rshb.ru/",target:l?"_blank":"_self","aria-label":"Россельхозбанк",children:[n(wt,{className:`${ln[i]} w-10`,viewBox:"0 0 40 45",paths:rn.map((e=>({d:e})))}),!s&&n("span",{className:`${sn[i]} font-medium ml-2.5`,children:r||"Россельхозбанк"})]}))),cn=r((({className:e,context:t})=>{const{term:r,setTerm:l}=t.useSearch();return a("form",{className:`relative ${e||""}`,children:[a("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(x,{image:"LoupeIcon",width:"24",height:"24"})}),!r&&n("label",{htmlFor:"search-bar-input",className:"font-sans font-light text-base text-secondary-text",children:"Поиск по сайту"})]}),n("input",{id:"search-bar-input",className:"h-12 pl-12 w-full peer font-sans font-light text-base text-black border border-solid rounded h-full box-border outline-none pr-[6%] border-main-divider focus:border-primary-text",value:r,onChange:e=>l(e.target.value),type:"text",name:"search-bar-input"}),n(q,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-1 right-1",onClick:e=>{e.preventDefault(),console.log("click")},children:n("div",{className:"font-normal text-sm px-9 py-[9px]",children:"Найти"})})]})})),dn=r((({className:e="",items:t,hasButton:r,context:l})=>{const i=l.useRouter(),{handlerDecorator:s}=l;return a("div",{className:e,children:[t?.length?t.map(mn):null,r?n(q,{version:"primary",className:"mb-6 w-full",...G({router:i,handlerDecorator:s},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),mn=(e,t)=>{const{type:r,text:l,description:i}=e;return a("div",{className:"mb-4",children:[n("div",{children:hn(r,l)}),n("div",{className:"mt-1 font-sans font-light text-sm text-secondary-text",children:i})]},String(t))},hn=(e,t="")=>{switch(e){case"tel":return n("a",{className:"font-sans text-xl text-primary-text no-underline",href:`tel:${xn(t)}`,children:t});case"email":return n("a",{className:"font-sans text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return n("span",{children:t})}},xn=e=>e.replaceAll(/\D/g,""),un=r((({links:e,className:t="",context:a})=>{const r=a.useRouter(),{handlerDecorator:l}=a;return n("div",{className:t,children:e?.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:e.map(((e,t)=>n(pn,{index:t,...G({router:r,handlerDecorator:l},e)},String(t))))}):null})})),pn=r((({className:e="",index:t,text:a,href:r,target:l,onClick:i})=>n("a",{className:`font-sans font-light text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:r,target:l,onClick:i,children:a||`Документ ${t}`}))),bn=e=>t=>e?.href===t?.href,gn=(e,t)=>{return(a=e,r=t,(a||[]).map((e=>r?.find(bn(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(bn(e))))));var n,a,r};function fn(e){const{data:t}=e(vn(),Nn);return t||{}}async function Nn(){const e=await fetch(vn());return await e.json()}function vn(){return`/wcms-resources/${d.SITEMAP||"sitemap"}.json`}const yn=r((({className:e="",items:t,context:a})=>{const r=fn(a.useAsyncData),l=gn(r.topItems,t),i={router:a.useRouter(),handlerDecorator:a.handlerDecorator};return n("div",{className:`flex items-start justify-between gap-11 xl:gap-5 ${e}`,children:l?.map(((e,t)=>wn(e,t,i)))})})),wn=(e,t,{router:r,handlerDecorator:l})=>{const{text:i,href:s,items:o,target:c}=e;return a("div",{className:"flex flex-col w-1/5 last:w-1/4 gap-[14px]",children:[n("a",{className:"block font-sans leading-5 text-base text-primary-text no-underline",href:s,target:c||"_self",children:i||`Раздел ${t}`}),o?.map(((e,t)=>n(In,{...G({router:r,handlerDecorator:l},e),index:t},String(t))))]},String(t))},In=r((({text:e,href:t,target:a,index:r})=>n("a",{className:"block font-sans font-light text-base text-secondary-text hover:text-primary-main no-underline",href:t,target:a||"_self",children:e||`Раздел ${r}`}))),kn=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм",width:"20px",height:"16px"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте",width:"24px",height:"12px"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники",width:"12px",height:"20px"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store",width:"20px",height:"22px"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play",width:"21px",height:"21px"}],Cn=r((({href:e,version:t})=>{const{icon:a,width:r,height:l,label:i}=kn.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};if(!a)return null;return n("a",{className:` flex items-center justify-center border border-solid rounded-md border-main-divider no-underline outline-none w-14 h-14 box-border ${"secondary"===t?"text-white hover:text-primary-main hover:bg-white":"text-primary-main hover:text-white hover:bg-primary-main hover:border-primary-main"}`,href:e,"aria-label":i,target:"_blank",rel:"noopener noreferrer",children:a?n(x,{image:a,width:r,height:l,asSVG:!0,className:"block"}):null})})),$n=r((({className:e="",media:t,version:r,context:l,children:i})=>{const s=l.useRouter(),{handlerDecorator:o}=l;return a("div",{children:[n("div",{className:`flex gap-2.5 ${e}`,children:t?.map(((e,t)=>n(Cn,{version:r,...G({router:s,handlerDecorator:o},e)},String(t))))}),n("span",{className:"font-light text-sm text-secondary-text",children:i})]})})),Sn=r((({className:e,links:t,context:r})=>{const l=r.useRouter(),{handlerDecorator:i}=r;return a("div",{className:`${e||""}`,children:[n("div",{className:"pt-5 pb-[5px]",children:n("span",{className:"font-sans font-light 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(Tn,{index:t,...G({router:l,handlerDecorator:i},e)},String(t))))}):null]})})),Tn=r((({className:e,index:t,text:a,href:r,target:l,onClick:i})=>n("a",{className:`font-sans font-light text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:r,target:l,onClick:i,children:a||`Документ ${t}`}))),Dn="w-[204px]",An=r((({className:e,documents:t,relatedEnterprises:r,contacts:l,socialMedia:i,mobileApps:s,topItems:o,context:c,anchor:d=null})=>a("footer",{className:`px-9 pt-9 pb-10 bg-white ${e||""}`,id:d,children:[a("div",{className:"flex items-stretch gap-[54px] pb-[30px] xl:gap-8",children:[n(on,{className:Dn}),n(cn,{context:c,className:"grow"})]}),a("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[a("div",{className:"w-[204px] flex flex-col shrink-0 overflow-hidden",children:[n(dn,{items:l,context:c,hasButton:!0}),n($n,{media:i,context:c,children:"Соцсети"}),n($n,{className:"mt-6",media:s,context:c,children:"Мобильное приложение"})]}),n(yn,{className:"pt-[3px]",context:c,items:o})]}),n(un,{className:"mt-[98px]",links:r,context:c}),n(Sn,{links:t,context:c})]}))),Rn=r((({className:e="",title:t,description:r,calendar:l,anchor:i=null})=>a("section",{className:`font-sans bg-white p-[50px] ${e}`,id:i,children:[n(s,{headingType:"h3",className:"text-center",title:t}),n("div",{className:"font-light text-base-md text-center mt-3",children:r}),l?Mn(l):null]}))),Mn=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),r=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:e.month.length*t+"%"})));return a("div",{className:"w-full flex flex-col justify-center mt-[54px]",children:[n("div",{className:"flex w-full mb-3 font-light text-m-title-md text-center",children:r.map((e=>Ln(e,t)))}),n("div",{className:"flex w-full",children:r.map(((e,t)=>a("div",{className:"pr-[11px] mr-3 border-r border-main-divider last:border-r-0 last:pr-0 last:mr-0",style:{flexBasis:e.flexBasis},children:[n("div",{className:"flex",children:Pn(e)}),a("div",{className:"font-light text-sm text-primary-text mt-3",children:[n("span",{children:e.blackText})," ",n("span",{className:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Ln=(e,t)=>e.month.map((e=>n("div",{style:{flexBasis:`${t}%`},children:e.name},`monthName-${e.name}`))),Pn=e=>e.month.map((e=>e.image?.src?n("div",{className:"h-[207px] border-r-[1px] pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0",children:n(x,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),jn=(e,t,n=((e,t)=>t.startsWith(e)))=>n(M(e),(e=>(e||"").replace(B,""))(M(R(e)?t.href:t.pathname))),Bn=e=>t=>jn(t.href,e),_n=e=>t=>t.items?.some(Bn(e))||jn(t.href,e)||((e,t)=>L(e)===L(t.href))(t.href,e),Vn=r((({className:e="",text:t,href:a,target:r,active:l,flat:i,onClick:s,children:o,ariaLabel:c,bgColor:d="bg-white"})=>n("a",{className:`${Gn(d,l,i)} ${e}`,href:a,target:r,onClick:s,rel:"noopener noreferrer","aria-label":c,children:n("span",{className:Wn(d,l,i),children:t||o})}))),Gn=(e,t,n)=>{let a="border-transparent";return t&&(a="rounded-md "+("bg-white"===e?"border-primary-main":"border-white")),`${a} inline-block border border-solid bg-transparent text-center no-underline ${n?"":"px-4 py-2"}`},Wn=(e,t,n)=>{let a="text-white";return"bg-white"===e&&(a=t?"text-primary-main":(n?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"),`${a} font-sans font-light text-sm`},En=r((({className:e="",children:t,ariaLabel:a})=>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":a,children:t}))),On={"bg-white":"text-primary-text hover:text-primary-main",transparent:"text-white"},Fn={"bg-white":"text-secondary-light hover:text-secondary-hover",transparent:"text-white"},Hn={"bg-white":"GridIcon",transparent:"GridIconWhite"},Un=r((({context:e,className:t,defaultLocation:r="",bgColor:l="bg-white"})=>{const[i,s]=e.useGeolocation(r);return a("div",{className:`flex items-center ${t||""}`,children:[n(Vn,{className:"mr-5",flat:!0,href:"#",text:i,ariaLabel:"Местоположение",onClick:s,bgColor:l}),n(Vn,{className:"mr-7",flat:!0,href:"#",text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов",bgColor:l}),n(En,{className:`mr-5 ${On[l]}`,ariaLabel:"Поиск по сайту",children:n(x,{image:"LoupeIcon",className:"h-full",asSVG:!0})}),n(En,{className:`${Fn[l]} min-w-[32px] min-h-[32px]`,ariaLabel:"Дополнительные ссылки",children:n(x,{image:Hn[l],className:"h-full",asSVG:!0})})]})})),Zn=e=>(t=[])=>{const n=t?.filter(Bn(e));var a;return n?.length?(a=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>a(e)>a(t)?e:t)))(n):null},zn="absolute left-0 -bottom-3 w-full h-[2px]",qn=r((({className:e="",text:t,href:r,target:l,active:i,onClick:s,children:o,bgColor:c="bg-white",dataItemName:d})=>a("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:r,target:l,onClick:s,"data-item-name":d,children:[n("span",{className:Jn(c,i),children:t||o}),i?n("div",{className:Kn(c,i)}):null]}))),Jn=(e,t)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-primary-text hover:text-primary-main"),`${n} font-sans font-light text-base`},Kn=(e,t)=>t?`${"bg-white"===e?"bg-primary-main":e} ${zn}`:zn,Xn=()=>!("undefined"!=typeof window&&window.document&&window.document.createElement),Qn=!Xn()?new IntersectionObserver((e=>{const t=window.document.querySelector("[data-header-submenu-visible=toggled]"),[n,a]=["[data-item-name=header-submenu]","[data-item-name=dots-header-submenu]"].map((e=>Array.from(window.document.querySelectorAll(e))));const r={};e.forEach((e=>{r[e.target.toString()]=e.isIntersecting}));const l=Yn(r,a,"hidden");Yn(r,n,"invisible"),t&&(l?t.classList.remove("hidden"):t.classList.add("hidden"))}),{root:window.document,threshold:1}):void 0,Yn=(e,t,n)=>{const a="hidden"!==n;return t.some((t=>{const r=t.toString(),l=a?!e[r]:e[r];return r in e&&t.classList.toggle(n,l),a?t.classList.contains("hidden"):!t.classList.contains("hidden")}))},ea=r((({context:e,subItems:t,bgColor:r})=>{const[l,i]=e.useState(!1),s=e.useRouter(),{handlerDecorator:o}=e;setTimeout((()=>{if(Xn())return;globalThis.document.querySelectorAll("[data-item-name=header-submenu]").forEach((e=>{Qn?.observe(e)}))}),200);const c=Zn(s)(t),d=t?.map((e=>n(qn,{className:"mr-8",active:e===c,...G({router:s,handlerDecorator:o},e),dataItemName:"header-submenu",bgColor:r},e.href)));return a("nav",{className:"relative mt-5",children:[n("div",{className:"overflow-hidden whitespace-nowrap mr-52",children:d}),ta({subMenuIsShow:l,toggleSubMenu:()=>i(!l),subItems:t,router:s,handlerDecorator:o})]})})),ta=({subMenuIsShow:e,toggleSubMenu:t,subItems:r,router:l,handlerDecorator:i})=>a("div",{className:"absolute w-52 -top-4 right-0 pt-4 z-40 "+(e?"bg-white rounded-md shadow-blue-gray/24":""),"data-header-submenu-visible":"toggled",children:[n("button",{className:"flex justify-between items-center cursor-pointer h-6 ml-6",onClick:t,"aria-label":""+(e?"Скрыть другие разделы":"Показать другие разделы"),children:Array(3).fill(0).map(((e,t)=>aa(t)))}),n("div",{className:"flex flex-col rounded-md bg-white p-6 pb-2 "+(e?"":"hidden"),"aria-hidden":!e,children:na(r,l,i)})]}),na=(e,t,a)=>e?.map((e=>n("a",{...G({router:t,handlerDecorator:a},e),"data-item-name":"dots-header-submenu",className:"text-base font-light pb-4 hover:text-primary-main",children:e.text},e.href))),aa=e=>n("div",{className:"w-[3px] h-[3px] rounded bg-black mr-1"},String(e)),ra={"bg-white":"bg-main-divider",transparent:"bg-main-divider opacity-30"},la=r((({className:e="",defaultLocation:t="Москва",bgColor:r="bg-white",context:l,topItems:i,anchor:s=null})=>{const o=l.useRouter(),c=fn(l.useAsyncData),{handlerDecorator:d}=l,m=gn(c.topItems,i),h=m.find(_n(o)),x=m.map(((e,t)=>n(Vn,{active:e===h,...G({router:o,handlerDecorator:d},e),"aria-label":e.text,bgColor:r},String(t))));return n("header",{className:`pt-6 pb-8 px-20 ${r} ${e}`,id:s,children:a("div",{className:"container",children:[a("div",{className:"flex items-center",children:[n(on,{className:"mr-8",bgColor:r}),x,n(Un,{context:l,className:"ml-auto",defaultLocation:t,bgColor:r})]}),n("div",{className:`mt-6 h-[1px] ${ra[r]}`}),n(ea,{context:l,subItems:h?.items,bgColor:r})]})})})),ia=r((({className:e="",context:t,title:r="Мобильное приложение",qr:l,buttons:i=[],anchor:o=null})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${we(e)} ${ye(e)} `,id:o,children:n(le,{context:t,title:r&&n(s,{headingType:"h3",title:r,className:"whitespace-pre-wrap max-w-[600px] mb-[30px]"}),buttons:i?.length?n(X,{context:t,buttons:i,className:"flex mt-[30px] gap-4"}):null,children:a("div",{className:"flex items-center",children:[l?.src&&l?.href&&n("a",{href:l.href,target:"_blank","aria-label":r,children:n("img",{src:l.src,alt:r,title:r,width:"164",height:"164",className:"w-[92px] h-[92px] min-w-[92px] min-h-[92px] bg-secondary-light"})}),n("span",{className:"font-light text-secondary-text ml-4",children:"Наведите камеру телефона на QR-код и скачайте приложение"})]})})}))),sa=r((({className:e,text:t,onClick:a,href:r,target:l,isActive:i})=>n("a",{className:`bg-inherit no-underline px-4 py-2.5 cursor-pointer rounded text-sm border border-solid hover:text-primary-main ${e||""} ${i?"border-primary-main text-primary-main":"border-white text-secondary-text"}`,onClick:a,href:r,target:l,children:t}))),oa=r((({className:e,context:t,title:r,buttons:l,anchor:i=null})=>{const s=t.useRouter(),{handlerDecorator:o}=t,c=Zn(s)(l);return a("section",{className:`font-sans text-primary-text rounded-[40px] flex items-center justify-between ${e||""}`,id:i,children:[n("h2",{className:"font-medium text-xl m-0",children:r}),l?.length?n("div",{className:"flex rounded-md overflow-hidden bg-white",children:l.filter((({text:e})=>e)).map(((e,t)=>n(sa,{className:"first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md",isActive:e===c,...G({router:s,handlerDecorator:o},e)},String(t))))}):null]})})),ca=r((({className:e="",text:t,active:a,children:r,onClick:l,href:i,target:s="_self"})=>n("a",{className:da(e,a),target:s,href:i,onClick:l,children:n("span",{className:ma(a),children:t||r})}))),da=(e,t)=>`${t?"bg-primary-main":"group bg-white"} flex-1 flex items-center justify-center cursor-pointer ${e}`,ma=e=>`${e?"text-white":"text-secondary-text group-hover:text-primary-main "} font-sans font-normal text-m-md`,ha=r((({className:e="",navigatorTabs:t,context:a,anchor:r=null})=>{const l=globalThis.location?.href;return n("section",{className:`sticky top-0 z-20 box-border flex gap-x-1 h-14 ${e}`,id:r,children:t?t.map(xa(a,l)):null})})),xa=(e,t)=>(a,r)=>{const{useRouter:l,handlerDecorator:i}=e,s=l(),o=P(t),c=o?a.href===o:0===r;return n(ca,{active:c,...G({router:s,handlerDecorator:i},a)},a.href)},ua=r((({blocks:e,columns:t=1,context:a})=>n("div",{className:"transition-all duration-300 max-h-0 overflow-hidden",children:n("div",{className:"box-border w-full p-9 "+(t>1?"flex flex-wrap":""),children:Ue({context:a,className:"box-border p-5",columns:t,blocks:e})})}))),pa=r((({label:e,isExpanded:t,blocks:r,columns:l,context:i})=>{const{hasContent:s,icon:o,handleToggle:c,isActive:d}=(({context:e,blocks:t,initialState:n=!1})=>{const[a,r]=e.useState(n),l=t?.length;return{isActive:a,hasContent:l,icon:a?"ArrowUpIcon":"ArrowDownIcon",handleToggle:e=>{if(!l)return;r(!a);const t=(({currentTarget:e})=>e.previousSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:i,blocks:r,initialState:t});return a("div",{className:"border-0 border-b border-solid border-main-divider",children:[s?n(ua,{isExpanded:d,columns:l,blocks:r,context:i}):null,a("button",{className:"border-none bg-primary-main px-0 py-[26px] mb-[1px] w-full font-sans text-white text-base flex justify-center cursor-pointer",onClick:c,children:[n("span",{className:"pr-3",children:d?"Скрыть":e}),s?n(m,{name:o,width:"20",height:"20",asSVG:!0}):null]})]})})),ba=r((({blockItems:e,colorPalette:t,context:a,className:r=""})=>n("section",{"data-theme":t||null,className:`font-sans bg-white text-primary-text ${r}`,children:e?.length?n("div",{className:"list-none m-0 p-0",children:e.map(((e,t)=>n(pa,{...e,context:a},`BlockItem${t}`)))}):null}))),ga=r((({className:e,context:t,title:r,description:l="Блок в разработке...",anchor:i=null})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${we(e)} ${ye(e)} `,id:i,children:a(le,{context:t,title:r?n(s,{headingType:vt(e),title:r,className:"whitespace-pre-wrap max-w-[600px]"}):null,children:[l?n(Q,{className:"mt-4 max-w-[600px]",description:l}):null,n("figure",{className:"m-0 min-w-[600px]",children:fa()})]})}))),fa=(e=3)=>va(100,e).map((e=>Math.floor(e))).map(Na),Na=(e=100,t)=>n("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),va=(e,t)=>[e].concat(t>0?va(e/1.618,t-1):[]),ya={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},wa=r((({block:e,headingType:t,context:a,className:r=""})=>n("section",{className:`flex grow-0 shrink-0 basis-full ${ya[e?.version??"primary"]} ${r}`,role:"listitem",children:n("div",{className:"p-10 flex grow",children:n(ce,{className:"pl-2.5 pt-2.5 pb-1.5 pr-[6.25rem]",context:a,headingType:t||"h2",...e})})}))),Ia=r((({className:e,context:t,duration:r=0,slides:l=[],anchor:i=null})=>{const s=l.map((e=>e.nav)),o=l.map((e=>e.productBlock)),[c,d]=t.useState(0);return a("section",{className:`font-sans bg-white overflow-hidden w-100 ${e||""}`,id:i,children:[n("div",{className:"flex duration-1000",style:{transform:`translateX(-${c}00%)`},role:"list",children:o.map(((e,a)=>n(wa,{context:t,block:e},String(a))))}),n("div",{className:"flex",children:s.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:r,onClick:l,duration:i}){const s=t===r,o=s?"animate-slide":"",c=s?"text-primary-text":"text-secondary-text";return a("button",{type:"button",onClick:l,"aria-label":e?.title,className:"font-sans group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 pt-4 pb-[23px] grow basis-0",children:[a("div",{className:"border-0 border-r border-solid border-main-divider px-6",children:[n("div",{className:`text-sm font-medium pb-[3px] group-hover:text-primary-text ${c}`,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 ${o}`,style:{animationDuration:`${i}s`,animationFillMode:"forwards"}})]},String(t))}({slide:e,i:t,activeSlideIndex:c,onClick:()=>d(t),duration:r})))})]})}));const ka={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Ca={primary:{title:"text-secondary-text",text:"text-secondary-text"},secondary:{title:"text-white",text:"text-white/80"}},$a={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Sa=r((({className:e="",context:t,slides:r=[],version:l="primary",duration:i=0,anchor:s=null})=>{const o=r.map((e=>e.nav)),c=r.map((e=>e.productBlock)),[d,m]=t.useState(0);return a("section",{id:s,className:`box-border pt-[50px] overflow-hidden relative font-sans w-100 ${e}\n ${ka[l]}`,children:[n("div",{className:"flex duration-1000 pb-14",style:{transform:`translateX(-${d}00%)`},role:"list",children:c.map(((e,a)=>function(e,t,a){const{version:r}=e,l=r?Ca[r].title:"";return n("section",{className:"box-border relative flex grow-0 shrink-0 basis-full",role:"listitem",children:n("div",{className:"flex grow",children:n(ce,{className:`pl-[50px] pr-2 z-[1] ${l}`,context:a,textBlockClassName:"mb-[154px]",...e})})},String(t))}({...e,version:l},a,t)))}),n("div",{className:"flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border",children:o.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:r,onClick:l,version:i,duration:s}){const o=t===r,c=o?"bg-white shadow-dark-blue/42 h-[102px] w-[354px] min-w-[354px] max-w-[354px] p-0 border-none":`min-w-[277px] px-0 pt-4 pb-[23px] hover:py-[26px] hover:py-[26px] ease-in duration-300\n ${$a[i]}`,d=o?"text-primary-text text-title-2xs":`text-base ${Ca[i].title}`,m=o?"text-secondary-text text-m-title-xs mt-2.5":`text-m-md mt-1.5 ${Ca[i].text}`,h="secondary"===i?"border-white/50":"",x=o?"animate-slide":"";return a("button",{type:"button",onClick:l,"aria-label":e?.title,className:`box-border font-sans group relative overflow-hidden border-[1px] cursor-pointer text-left mx-1 grow basis-0 backdrop-blur-sm\n ${c} ${h}\n `,children:[a("div",{className:"border-0 px-6",children:[n("div",{className:`font-medium ${d}`,children:e?.title}),n("div",{className:`text-secondary-text ${m}`,children:e.description})]}),n("div",{className:`absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${x}`,style:{animationDuration:`${s}s`,animationFillMode:"forwards"}})]},String(t))}({slide:e,i:t,activeSlideIndex:d,onClick:()=>m(t),version:l,duration:i})))})]})}));const Ta={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},Da=r((({className:e="",context:t,title:r="Акции и спецпредложения",date:l,description:i,buttons:o=[],version:c="primary",anchor:d=null})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${Ta[c]} ${we(e)} ${ye(e)} `,id:d,children:n(le,{context:t,title:r?n(s,{headingType:vt(e),title:r,className:"whitespace-pre-wrap max-w-[600px]"}):null,buttons:o?.length?n(X,{context:t,buttons:o,className:"flex mt-9 gap-3"}):null,children:a("div",{className:"mt-1.5",children:[l?n("div",{className:"text-sm mb-2",children:Aa(l)}):null,n("div",{className:"text-base",children:i})]})})})));function Aa(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const Ra=r((({context:e,className:t="",title:r,description:l,items:i,image:o,version:c,socialMedia:d})=>n("section",{className:`border border-solid box-border p-[30px] w-[524px] ${t}`,role:"listitem",children:a(le,{context:e,className:"flex justify-between",title:r?n(s,{headingType:"h4",as:"h3",className:"font-normal mb-3.5",title:r}):null,image:o?.src&&n(x,{className:"mt-auto ml-7",image:o}),children:[l?n(Q,{className:"text-left",description:l}):null,i?.length?n(re,{className:"text-md text-left font-light flex flex-col flex-1 gap-2",items:i,version:c}):null,n($n,{className:"pt-[42px] pb-0",media:d,version:c,context:e})]})}))),Ma="absolute top-0 bottom-0 w-[84px]",La=r((({context:e,recommendations:t=[],className:r="",title:l,version:i,anchor:o=null})=>{const[c,d]=e.useState(0),m="secondary"===i?"border-white/50":"border-main-stroke";return a("section",{className:`relative font-sans p-9 overflow-hidden text-center ${"secondary"===i?"bg-primary-main text-white":"bg-white text-primary-text"} ${r}`,id:o,children:[l?n(s,{headingType:"h2",className:"mb-6",title:l}):null,n("div",{className:"flex duration-1000 gap-3.5",style:{transform:`translateX(-${525*c}px)`},role:"list",children:t?.length?t.map(Pa({context:e,version:i,className:m})):null}),ja({cardsCount:t.length,activeCardIndex:c,setActiveCardIndex:d}),n("div",{className:`${Ma} left-0 ${"secondary"===i?"bg-opacity-from-main":"bg-opacity-from-white"}`}),n("div",{className:`${Ma} right-0 ${"secondary"===i?"bg-opacity-to-main":"bg-opacity-to-white"}`})]})})),Pa=({context:e,version:t,className:a})=>(r,l)=>n(Ra,{context:e,...r,version:t,className:a},String(l)),ja=({cardsCount:e,activeCardIndex:t,setActiveCardIndex:r})=>{const l=e>2,i=l&&e-t>2;return a("div",{children:[l&&t>0&&n(De,{className:"absolute top-1/2 left-8 z-10 mt-6",onClick:()=>r(t-1),ariaLabel:"Пролистать влево"}),i&&n(De,{className:"absolute top-1/2 right-8 z-10 mt-6 rotate-180",onClick:()=>r(t+1),ariaLabel:"Пролистать вправо"})]})},Ba=r((({className:e="",title:t,showLines:r=!0,steps:l=[],button:i,anchor:o=null})=>{const c=l.length>3;return a("section",{className:["box-border font-sans text-primary-text bg-white",c?"px-20":"px-[70px]","py-[50px] flex flex-col items-center",e].join(" "),id:o,children:[n(s,{headingType:"h2",className:"max-w-[47rem] text-center",title:t}),l?.length?a("div",{className:"box-border "+(t?"mt-9":""),children:[n("div",{className:"flex items-center px-[88px]",children:E(n("div",{className:"h-0.5 w-full bg-secondary-light "+(r?"":"opacity-0")}))(l.map(_a))}),n("div",{className:"flex justify-between "+(c?"gap-x-3":"gap-x-[101px]"),children:l.map(((e,t)=>Va(e,t,Boolean(i?.text))))})]}):null,i?.text?n(q,{className:"box-border mt-8 py-3 h-12 w-full max-w-[240px]",version:"primary",href:"#",children:i.text}):null]})})),_a=(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?.icon&&n(x,{image:e.icon,width:"48",height:"48"})||n("span",{className:"font-normal text-title-sm text-secondary-text",children:t+1})})},String(t)),Va=(e,t,r)=>a("div",{className:"flex flex-col items-center justify-between text-center relative w-[276px] whitespace-pre-line overflow-hidden",children:[a("div",{children:[e.label&&n("div",{className:"font-normal text-xl m-0 mt-4",children:e.label}),e.description&&n("div",{className:"font-light text-base text-secondary-text "+(e.label?"mt-2":"mt-4"),children:e.description})]}),e?.button?.text&&!r?n(q,{className:"box-border mt-8 py-3 h-12 w-full max-w-[240px]",version:"primary",href:"#",children:e.button.text}):null]},String(t)),Ga=e=>e?.alt||e?.title||c[e?.icon?e.icon:""],Wa=r((({cell:e,isLastRow:t})=>n("div",{className:"first:pl-0 pl-10 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0 "+(t?"border-t-0 rounded-b-md":""),role:"cell",children:n("div",{children:e.map(Ea)})}))),Ea=({label:e,description:t,list:r,image:l,buttons:i},s)=>a("div",{className:"first:pt-5 last:pb-5",children:[s>0&&n("div",{className:"border-main-divider border border-solid border-t-0 border-x-0 my-4"}),e?n("div",{className:"text-xl font-medium m-0",children:e}):null,t?n("div",{className:"text-sm text-secondary-text",children:t}):null,r?.items?.length?Oa(r):null,l&&n(x,{image:l}),i?.length?Fa(i):null]},String(s)),Oa=e=>n(re,{className:"flex flex-col justify-between items-start text-sm",version:"gray",items:e.items,isDotted:e.isDotted??!0}),Fa=e=>n("div",{children:e.map((({icon:e,rounded:t,...a},r)=>n(q,{className:(r>0&&t?"ml-3":"")+" w-12 h-12",ariaLabel:Ga(e),rounded:t,appendLeft:e?n(x,{image:e,width:"24px",height:"24px",asSVG:!0}):null,...a},String(r))))}),Ha=r((({row:{header:e,data:t},activeCardIndex:r,isLastRow:l})=>a(Ye,{children:[n("div",{className:"text-sm py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0 "+(l?"":"border-solid"),children:a("div",{className:"flex items-center text-primary-text",children:[e?.icon?n(x,{className:"mr-[14px] max-w-6 max-h-6",image:e.icon,width:"24px",height:"24px",asSVG:!0}):null,e?.title]})}),t?.length?n(lt,{activeCardIndex:r,columnWidth:360,version:"tariff",children:t.map(((e,t)=>n(Wa,{cell:e,isLastRow:l},String(t))))}):null]}))),Ua=r((({className:e,context:t,title:r,description:l,rowHeaders:i,columns:o,anchor:c=null})=>{const[d,m]=t.useState(0),h=Za(o),x=za(i,h),u=xt({columnsLength:h.length,colsLengthForScroll:2,activeCardIndex:d,setActiveCardIndex:m}),{isScrollAvailable:p}=u;return a("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,id:c,children:[r?n(s,{headingType:"h2",className:"text-center "+(l?"mb-2.5":"mb-9"),title:r}):null,l?n("div",{className:"mb-9 text-center text-m-base",children:l}):null,x?.length?a("div",{role:"table",children:[a("div",{className:"relative",children:[x.map(((e,t,{length:a})=>n(Ha,{row:e,isLastRow:t+1===a,activeCardIndex:d},String(t)))),n(mt,{...u})]}),p?n("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]}):null]})})),Za=e=>e?.map((({data:e})=>e))||[],za=(e,t)=>e?.map(((e,n)=>({header:e,data:t.map((e=>e?.[n]||[{}]))}))),qa={Accordion:Je,BenefitsBlock:Ke,Bonus:Qe,ComparisonTable:pt,CreditCalculator:Vt,ExchangeRateTile:an,Footer:An,Gallery:We,GracePeriod:Rn,Header:la,Headline:N,LinkDocs:T,MiniGallery:Ee,MobileAppTile:ia,NavigatorTabs:ha,PictureText:A,ProductBlock:pe,ProductGallery:Ia,ProductGalleryGreen:Sa,ProductTile:Se,PromoTile:Da,OtherProducts:ba,Recommendation:La,StepsBlock:Ba,TariffsTable:Ua,TextBlock:ge,Tile:ke,Navigation:oa,Placeholder:ga},Ja=r((({className:e,onClick:t,ariaLabel:a})=>n("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":a,children:Ka()}))),Ka=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return a("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"})]})},Xa=r((({className:e,context:t,anchor:r=null})=>{const l=t.useLikeService();return a("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,id:r,children:[n(Ja,{onClick:l.like,ariaLabel:"Поставить отметку «лайк»"}),n(Ja,{onClick:l.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),n("span",{className:"select-none",children:l.likeCount})]})})),Qa=!Xn(),Ya=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),er=r((({className:e="",context:t,blocksRegistry:r,data:{style:l,blocks:i,slots:s={},likeControl:o,colorPalette:c="pc"},blockDecorator:d=Ya})=>{const{header:m}=s,h=t.useRouter();return Qa&&globalThis.addEventListener("load",(()=>{const e=globalThis.document.querySelectorAll("section[id]");globalThis.document.addEventListener("scroll",(()=>((e,t)=>{t?.forEach((t=>{const n=globalThis.location?.hash;if(n===`#${t?.id}`)return;const a=t?.getBoundingClientRect();a&&a.top>0&&a.top<150&&e.replace(`#${t?.id}`)}))})(h,e)))})),a("section",{className:`relative ${nr(l)} ${e}`,"data-theme":c,children:[m?.blocks?.length?n("div",{className:`${nr(m?.style)}`,children:m.blocks.map(((e,n)=>tr({block:e,blockDecorator:d,blocksRegistry:r,context:t},n)))}):null,i?.length?n("div",{className:"container grid grid-cols-12 gap-1",children:i.map(((e,n)=>tr({block:e,blockDecorator:d,blocksRegistry:r,context:t},n)))}):null,o&&n("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:n(Xa,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t},"LikeControl")})]})}));function tr({block:e,blockDecorator:t,blocksRegistry:a,context:r},l){const{type:i}=e;i&&i in a||console.warn(`No block with "${i}" is registered`);const s=a[i||"Placeholder"]||ga;return t({blockClassName:`scroll-mt-12 ${nr(e.style)}`,block:e,render:e=>{const{version:t,content:a,anchor:o}=e.block;return n(s,{className:e.blockClassName,version:t,context:r,anchor:o,...a},`${i}-${l}`)}},`block-${l}`)}function nr(e){return e?e.join(" "):""}const ar=r((({HeadComponent:e,data:t,children:r})=>{const{title:l,main:i,og:s,twitter:o,jsonLd:c}=t,{description:d,keywords:m,canonical:h,robots:x}=i||{};return a(e,{children:[n("title",{children:l}),n("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),d&&n("meta",{name:"description",content:d}),m&&n("meta",{name:"keywords",content:m.join(",")}),x&&n("meta",{name:"robots",content:x.join(",")}),rr(s),lr(o),h&&n("link",{rel:"canonical",href:h}),c&&n("script",{type:"application/ld+json",children:c}),r]})}));function rr(e){return e?Object.entries(e).map((([e,t])=>n("meta",{property:`og:${e}`,content:t},e))):null}function lr(e){return e?Object.entries(e).map((([e,t])=>n("meta",{name:`twitter:${e}`,content:t},e))):null}function ir(e){const{mobile:t,...n}=e;return n}function sr(e){return e?.filter((e=>{return t=e?.type,(t||"")in qa;var t})).map(ir)}e.Blocks=qa,e.Button=q,e.ContentPage=er,e.ContentPageHead=ar,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.Header=la,e.Icon=m,e.Image=x,e.LikeAPI=function(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(l)||"");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:a}=await e.json();return globalThis.localStorage.setItem(l,JSON.stringify({token:n,name:a})),{token:n,name:a}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...a){if(!a.length)return[];const{token:r}=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:r},body:JSON.stringify({node_ids:a})}),{likes:l}=await n.json();return l||[]}catch(e){return console.error(e),[]}},like:async function(a){if(!a)return 0;const{token:r,name:l}=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:r,UserID:l},body:JSON.stringify({node_id:a,user_name:l})}),{likes:i}=await n.json();return i||0}catch(e){return console.error(e),0}},dislike:async function(a){if(!a)return 0;const{token:r,name:l}=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:r,UserID:l},body:JSON.stringify({node_id:a,user_name:l})}),{likes:i}=await n.json();return i||0}catch(e){return console.error(e),0}}}},e.joinList=E,e.normalizePage=function(e){if(!e)return;const{blocks:t,slots:n}=e;return{...e,blocks:sr(t),slots:n&&Object.keys(n).reduce(((e,t)=>({...e,[t]:{...n[t],blocks:sr(n[t].blocks)}})),{})}},e.projectSettings=d,e.setup=t,e.url=j,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export { DaDataAPI } from './api/DaDataAPI';
|
|
|
3
3
|
export { LikeAPI } from './api/LikeAPI';
|
|
4
4
|
export type { BlockContent } from './components/BlockContent';
|
|
5
5
|
export { Blocks } from './components/Blocks';
|
|
6
|
+
export { Button } from './ui-kit/Button/Button';
|
|
7
|
+
export { Img as Image } from './ui-kit/Img/Img';
|
|
6
8
|
export { ContentPage } from './components/ContentPage/ContentPage';
|
|
7
9
|
export type { BlockDecorator } from './components/ContentPage/ContentPage';
|
|
8
10
|
export type { AsyncDataHook, ContentPageContext, GeolocationHook, HandlerDecorator, LikeService, Router, Search, } from './components/ContentPage/ContentPageContext';
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
return result;
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.url = exports.joinList = exports.Icon = exports.projectSettings = exports.Header = exports.normalizePage = exports.ContentPageHead = exports.ContentPage = exports.Blocks = exports.LikeAPI = exports.DaDataAPI = exports.setup = void 0;
|
|
25
|
+
exports.url = exports.joinList = exports.Icon = exports.projectSettings = exports.Header = exports.normalizePage = exports.ContentPageHead = exports.ContentPage = exports.Image = exports.Button = exports.Blocks = exports.LikeAPI = exports.DaDataAPI = exports.setup = void 0;
|
|
26
26
|
var uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
27
27
|
Object.defineProperty(exports, "setup", { enumerable: true, get: function () { return uni_jsx_1.setup; } });
|
|
28
28
|
var DaDataAPI_1 = require("./api/DaDataAPI");
|
|
@@ -31,6 +31,10 @@ var LikeAPI_1 = require("./api/LikeAPI");
|
|
|
31
31
|
Object.defineProperty(exports, "LikeAPI", { enumerable: true, get: function () { return LikeAPI_1.LikeAPI; } });
|
|
32
32
|
var Blocks_1 = require("./components/Blocks");
|
|
33
33
|
Object.defineProperty(exports, "Blocks", { enumerable: true, get: function () { return Blocks_1.Blocks; } });
|
|
34
|
+
var Button_1 = require("./ui-kit/Button/Button");
|
|
35
|
+
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return Button_1.Button; } });
|
|
36
|
+
var Img_1 = require("./ui-kit/Img/Img");
|
|
37
|
+
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return Img_1.Img; } });
|
|
34
38
|
var ContentPage_1 = require("./components/ContentPage/ContentPage");
|
|
35
39
|
Object.defineProperty(exports, "ContentPage", { enumerable: true, get: function () { return ContentPage_1.ContentPage; } });
|
|
36
40
|
var ContentPageHead_1 = require("./components/ContentPage/ContentPageHead");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA0C;AAAjC,gGAAA,KAAK,OAAA;AACd,6CAA4C;AAAnC,sGAAA,SAAS,OAAA;AAClB,yCAAwC;AAA/B,kGAAA,OAAO,OAAA;AAEhB,8CAA6C;AAApC,gGAAA,MAAM,OAAA;AACf,oEAAmE;AAA1D,0GAAA,WAAW,OAAA;AAWpB,4EAA2E;AAAlE,kHAAA,eAAe,OAAA;AACxB,wEAAuE;AAA9D,8GAAA,aAAa,OAAA;AACtB,qDAAoD;AAA3C,gGAAA,MAAM,OAAA;AAEf,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AAWxB,2CAA0C;AAAjC,4FAAA,IAAI,OAAA;AACb,6CAA4C;AAAnC,oGAAA,QAAQ,OAAA;AACjB,mDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA0C;AAAjC,gGAAA,KAAK,OAAA;AACd,6CAA4C;AAAnC,sGAAA,SAAS,OAAA;AAClB,yCAAwC;AAA/B,kGAAA,OAAO,OAAA;AAEhB,8CAA6C;AAApC,gGAAA,MAAM,OAAA;AACf,iDAAgD;AAAvC,gGAAA,MAAM,OAAA;AACf,wCAAgD;AAAvC,4FAAA,GAAG,OAAS;AACrB,oEAAmE;AAA1D,0GAAA,WAAW,OAAA;AAWpB,4EAA2E;AAAlE,kHAAA,eAAe,OAAA;AACxB,wEAAuE;AAA9D,8GAAA,aAAa,OAAA;AACtB,qDAAoD;AAA3C,gGAAA,MAAM,OAAA;AAEf,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AAWxB,2CAA0C;AAAjC,4FAAA,IAAI,OAAA;AACb,6CAA4C;AAAnC,oGAAA,QAAQ,OAAA;AACjB,mDAAmC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export { DaDataAPI } from './api/DaDataAPI';
|
|
|
3
3
|
export { LikeAPI } from './api/LikeAPI';
|
|
4
4
|
export type { BlockContent } from './components/BlockContent';
|
|
5
5
|
export { Blocks } from './components/Blocks';
|
|
6
|
+
export { Button } from './ui-kit/Button/Button';
|
|
7
|
+
export { Img as Image } from './ui-kit/Img/Img';
|
|
6
8
|
export { ContentPage } from './components/ContentPage/ContentPage';
|
|
7
9
|
export type { BlockDecorator } from './components/ContentPage/ContentPage';
|
|
8
10
|
export type { AsyncDataHook, ContentPageContext, GeolocationHook, HandlerDecorator, LikeService, Router, Search, } from './components/ContentPage/ContentPageContext';
|
package/lib/index.js
CHANGED
|
@@ -2,6 +2,8 @@ export { setup } from '@redneckz/uni-jsx';
|
|
|
2
2
|
export { DaDataAPI } from './api/DaDataAPI.js';
|
|
3
3
|
export { LikeAPI } from './api/LikeAPI.js';
|
|
4
4
|
export { Blocks } from './components/Blocks.js';
|
|
5
|
+
export { Button } from './ui-kit/Button/Button.js';
|
|
6
|
+
export { Img as Image } from './ui-kit/Img/Img.js';
|
|
5
7
|
export { ContentPage } from './components/ContentPage/ContentPage.js';
|
|
6
8
|
export { ContentPageHead } from './components/ContentPage/ContentPageHead.js';
|
|
7
9
|
export { normalizePage } from './components/ContentPage/normalizePage.js';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAWnE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAWpD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAWnE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAWpD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC"}
|
|
@@ -1637,11 +1637,13 @@
|
|
|
1637
1637
|
}
|
|
1638
1638
|
|
|
1639
1639
|
exports.Blocks = Blocks;
|
|
1640
|
+
exports.Button = Button;
|
|
1640
1641
|
exports.ContentPage = ContentPage;
|
|
1641
1642
|
exports.ContentPageHead = ContentPageHead;
|
|
1642
1643
|
exports.DaDataAPI = DaDataAPI;
|
|
1643
1644
|
exports.Header = Header;
|
|
1644
1645
|
exports.Icon = Icon;
|
|
1646
|
+
exports.Image = Img;
|
|
1645
1647
|
exports.LikeAPI = LikeAPI;
|
|
1646
1648
|
exports.joinList = joinList;
|
|
1647
1649
|
exports.normalizePage = normalizePage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";const t=(e,n)=>{t._jsx=e,t._jsxs=n||e};t.vue=e=>{t(((t,{children:n,dangerouslySetInnerHTML:r,...i}={})=>{const a=Object.assign({},i,r?{innerHTML:r.__html}:{});return e(t,a,"string"!=typeof t?()=>n:n)}))};const n=(...e)=>t._jsx(...e),r=(...e)=>t._jsxs(...e),i=e=>(e._tmpl||(e._tmpl=function(t,n){const{children:r,...i}=t||{},a=n?.slots?.default,l=r||a&&a();return e(Object.assign(i,l&&{children:l}),n)},e._tmpl.inheritAttrs=!1),e._tmpl);const a="likesToken";const l={h1:"text-m-title",h2:"text-m-title",h3:"text-m-title-md",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},o=i((e=>{const{className:t,headingType:r,title:i,as:a}=e;if(!r)return;return n(a||r,{className:`font-sans font-medium m-0 ${l[r]} ${t||""}`,children:i})}));var c,s;!function(e){e.ActualBalanceIcon="ActualBalanceIcon",e.AppleIcon="AppleIcon",e.ArrowDownIcon="ArrowDownIcon",e.ArrowLeftIcon="ArrowLeftIcon",e.ArrowsRewindRight="ArrowsRewindRight",e.ArrowUpIcon="ArrowUpIcon",e.AtmIcon="AtmIcon",e.BankIcon="BankIcon",e.BurgerIcon="BurgerIcon",e.BurgerIconWhite="BurgerIconWhite",e.Calendar2Icon="Calendar2Icon",e.CalendarCircleIcon="CalendarCircleIcon",e.CalendarIcon="CalendarIcon",e.CalendarTickIcon="CalendarTickIcon",e.CalendarWhiteIcon="CalendarWhiteIcon",e.CardIcon="CardIcon",e.CardPosIcon="CardPosIcon",e.CardTickIcon="CardTickIcon",e.CardWithGemIcon="CardWithGemIcon",e.ChartSquareIcon="ChartSquareIcon",e.ClockIcon="ClockIcon",e.CloseIcon="CloseIcon",e.ComfortableCompIcon="ComfortableCompIcon",e.CreditCardsIcon="CreditCardsIcon",e.DiscountShapeIcon="DiscountShapeIcon",e.DocIcon="DocIcon",e.DocIconMonoColor="DocIconMonoColor",e.DocumentTextIcon="DocumentTextIcon",e.DollarIcon="DollarIcon",e.EarthIcon="EarthIcon",e.EmptyWalletChangeIcon="EmptyWalletChangeIcon",e.EmptyWalletIcon="EmptyWalletIcon",e.EmptyWalletWhiteIcon="EmptyWalletWhiteIcon",e.EuroIcon="EuroIcon",e.GeolocationIcon="GeolocationIcon",e.GlassIcon="GlassIcon",e.GlobalIcon="GlobalIcon",e.GpsIcon="GpsIcon",e.GridIcon="GridIcon",e.GridIconWhite="GridIconWhite",e.InterestGrowthIcon="InterestGrowthIcon",e.InterestIcon="InterestIcon",e.JCBIcon="JCBIcon",e.LoupeIcon="LoupeIcon",e.MasterCardIcon="MasterCardIcon",e.MinusIcon="MinusIcon",e.MirIcon="MirIcon",e.MoneyIcon="MoneyIcon",e.MoneyInsuranceIcon="MoneyInsuranceIcon",e.MonitorMobileIcon="MonitorMobileIcon",e.NewDocIcon="NewDocIcon",e.OfficeIcon="OfficeIcon",e.OkIcon="OkIcon",e.PassSendIcon="PassSendIcon",e.PercentageRoundIcon="PercentageRoundIcon",e.PercentageSquareIcon="PercentageSquareIcon",e.PercentageSquareWhiteIcon="PercentageSquareWhiteIcon",e.PersonalCardIcon="PersonalCardIcon",e.PlayMarketIcon="PlayMarketIcon",e.PlusIcon="PlusIcon",e.Profile2UserIcon="Profile2UserIcon",e.ProfileIcon="ProfileIcon",e.RoundRubleIcon="RoundRubleIcon",e.SafeIcon="SafeIcon",e.ShieldTickIcon="ShieldTickIcon",e.SignDocsIcon="SignDocsIcon",e.SmallClockIcon="SmallClockIcon",e.TelegramIcon="TelegramIcon",e.UnionPayIcon="UnionPayIcon",e.UserTickIcon="UserTickIcon",e.VisaIcon="VisaIcon",e.VKIcon="VKIcon",e.WalletAdd2Icon="WalletAdd2Icon",e.WalletAddIcon="WalletAddIcon",e.WalletIcon="WalletIcon",e.WalletWithMoneyIcon="WalletWithMoneyIcon"}(c||(c={})),function(e){e.ActualBalanceIcon="Деньги",e.AppleIcon="Лого «Apple»",e.ArrowDownIcon="Стрелка 'Вниз'",e.ArrowLeftIcon="Стрелка",e.ArrowsRewindRight="ArrowsRewindRight",e.ArrowUpIcon="ArrowUpIcon",e.AtmIcon="Банкомат",e.BankIcon="Банк",e.BurgerIcon="Бургер",e.BurgerIconWhite="Бургер (белый)",e.Calendar2Icon="Календарь 2",e.CalendarCircleIcon="Скруглённый календарь",e.CalendarIcon="Календарь",e.CalendarTickIcon="Календарь с галочкой",e.CalendarWhiteIcon="Календарь белый",e.CardIcon="Кред. карта",e.CardPosIcon="Кред. карта под наклоном",e.CardTickIcon="Кред. карта с галочкой",e.CardWithGemIcon="Карта с драгоценностями",e.ChartSquareIcon="Деньги внутри кошелька",e.ClockIcon="Часы",e.CloseIcon="Крестик",e.ComfortableCompIcon="Кресло",e.CreditCardsIcon="Кредитные карты",e.DiscountShapeIcon="Скидка",e.DocIcon="Документ",e.DocIconMonoColor="Документ (одноцветный)",e.DocumentTextIcon="Документ с текстом",e.DollarIcon="Доллар",e.EarthIcon="Земля",e.EmptyWalletChangeIcon="Пустой кошелёк с возвратом",e.EmptyWalletIcon="Пустой кошелёк",e.EmptyWalletWhiteIcon="Пустой кошелёк (белый)",e.EuroIcon="Евро",e.GeolocationIcon="Геолокация",e.GlassIcon="Зеркало",e.GlobalIcon="Глобус",e.GpsIcon="Gps",e.GridIcon="Сетка",e.GridIconWhite="Сетка (белая)",e.InterestGrowthIcon="Диаграмма роста",e.InterestIcon="Скидка",e.JCBIcon="JCB",e.LoupeIcon="Лупа",e.MasterCardIcon="MasterCard",e.MinusIcon="Минус",e.MirIcon="МИР",e.MoneyIcon="Деньги",e.MoneyInsuranceIcon="Денежное страхование",e.MonitorMobileIcon="Монитор и мобильный",e.NewDocIcon="Новый документ",e.OfficeIcon="Офис",e.OkIcon="Лого «Одноклассники»",e.PassSendIcon="Бизнес",e.PercentageRoundIcon="Проценты (круг.)",e.PercentageSquareIcon="Проценты",e.PercentageSquareWhiteIcon="Проценты белые",e.PersonalCardIcon="Персональная карта",e.PlayMarketIcon="Лого «PlayMarket»",e.PlusIcon="Плюс",e.Profile2UserIcon="Профиль, 2 персоны",e.ProfileIcon="Профиль",e.RoundRubleIcon="Рубль (круг.)",e.SafeIcon="Сейф",e.ShieldTickIcon="Безопасность",e.SignDocsIcon="Подписанные документы",e.SmallClockIcon="Маленькие часы",e.TelegramIcon="Лого «Telegram»",e.UnionPayIcon="UnionPay",e.UserTickIcon="Пользователь",e.VisaIcon="Visa",e.VKIcon="Лого «VK»",e.WalletAdd2Icon="Пополнение карты",e.WalletAddIcon="Кошелёк с плюсом",e.WalletIcon="Кошелёк",e.WalletWithMoneyIcon="Кошелёк с деньгами"}(s||(s={}));const d=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=i((({className:e="",name:t="",alt:i=`Иконка ${s[t]||t}`,title:a=i,iconVersion:l,asSVG:o,...c})=>{const m=`${d.CDN||""}icons/${t}.svg`,h="white"===l?"text-black invert":"";return o?r("svg",{className:e,...c,"aria-hidden":"true",children:[a?n("title",{children:a}):null,i?n("desc",{children:i}):null,n("use",{className:h,href:`${m}#icon`,xlinkHref:`${m}#icon`})]}):n("img",{className:e,src:m,alt:i,title:a,...c,"aria-hidden":"true"})}));function h(e){return"string"==typeof e?"normal":e.iconVersion||"normal"}const u=i((({className:e="",image:t,imageClassName:r="",...i})=>{const a="string"==typeof t?t:t?.icon;return a||""===a?n(m,{className:e,iconVersion:h(t),name:a,...i}):n(p,{className:e,imageClassName:r,image:t})})),p=i((({className:e="",image:t,imageClassName:i=""})=>t?r("picture",{className:e,children:[t?.sources?.length?t.sources.map((({src:e,format:t},r)=>n("source",{srcSet:e,type:g(t)},`${r}_${e}`))):null,x(t,i)]}):null)),x=(e,t="")=>{const r={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},i=e.title||"",a=e.alt||e.title;return n("img",{src:e.src,className:`m-auto ${t}`,alt:a,title:i,style:r,...e.size})};function g(e){return e?`image/${String(e)}`:void 0}const b={left:"text-left",center:"text-center",right:"text-right"},f={transparent:{background:"bg-transparent",text:"text-primary-text",description:"text-primary-text"},primary:{background:"bg-white",text:"text-primary-text",description:"text-primary-text"},secondary:{background:"bg-primary-main",text:"text-white",description:"text-white/80"}},y=i((({bgColorHeadline:e="transparent",className:t="",title:i,description:a,image:l,align:c="left"})=>{const s=f[e];return r("section",{className:`px-4 py-6 ${s.background} ${t}`,children:[i&&n(o,{headingType:"h2",className:`${s.text} ${b[c]}`,title:i}),a&&n("p",{className:`font-normal text-m-md ${s.description} ${b[c]} ${i?"mt-2.5":""}`,children:a}),l?.src&&n("div",{className:"mt-5 mx-auto flex justify-center",children:n(u,{image:l})})]})})),N=i((({children:e,activeIndex:t,indexFraction:r,showDots:i})=>{const a=e=>n=>{if(e===t)return;const r=n.currentTarget.parentElement?.previousElementSibling;r?.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})};return i&&e?.length?n("div",{className:"flex gap-2 mx-auto mt-5 w-fit",children:e?.map(((e,i)=>n("div",{onClick:a(i),className:"bg-primary-main opacity-30 w-1.5 h-1.5 min-w-1.5 min-h-1.5 rounded-full",style:v(i,t,r),"aria-hidden":!0},String(i))))}):null})),v=(e,t,n)=>{if(e<t||e>t+1)return null;const r=1-n;return e===t?{opacity:""+(.3+.7*r),width:6+16*r+"px"}:{opacity:""+(.3+.7*n),width:6+16*n+"px"}},w=i((({className:e="",children:t,...r})=>n("div",{className:`snap-center snap-always min-w-full box-border ${e}`,role:"listitem",...r,children:t}))),I=e=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e}px`}),k=i((({className:e="",children:t,activeIndex:r,onScroll:i,gap:a=14,padding:l=16})=>n("div",{className:`overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...I(l),gap:`${a}px`},role:"list",onScroll:i,children:t?.length?t?.map(((e,t)=>n(w,{style:I(l/4),"aria-current":Boolean(r===t),children:e},String(t)))):n(w,{children:t})}))),C=i((({className:e,context:t,children:i,gap:a=14,padding:l=16,showDots:o=!0,onSlideChange:c})=>{const[s,d]=t.useState(0),[m,h]=t.useState(0),u={activeIndex:s,indexFraction:m,showDots:o,children:i};return r("div",{className:e,children:[n(k,{gap:a,padding:l,activeIndex:s,onScroll:e=>{const{scrollLeft:t,clientWidth:n,childElementCount:r,scrollWidth:i,children:o}=e.currentTarget,m=o[0].offsetWidth-l/2,u=(({gap:e,padding:t,clientWidth:n,scrollWidth:r,childElementCount:i,itemWidth:a})=>{const l=r-n;if(2===i)return[[0,l],[l,r]];const o=a+e,c=n-e-t,s=i-2,d=new Array(i).fill(0).map(((e,t)=>0===t||t===s?[t>0?l-c:0,t>0?l:c]:[(t-1)*o+c,t*o+c]));return d[i-1]=[l,r],d})({gap:a,padding:l,clientWidth:n,scrollWidth:i,childElementCount:r,itemWidth:m}),{index:p,fraction:x}=((e,t)=>{const n=t.findIndex((([t,n])=>t<=e&&e<n));if(n<0)return{index:n,fraction:0};const[r,i]=t[n];return{index:n,fraction:(e-r)/(i-r)}})(t,u);p!==s&&c&&c(),d(p),h(x)},children:i}),n(N,{...u})]})})),$=i((({className:e,iconClassName:t,textClassName:i,suffixClassName:a,doc:l,icon:o})=>{const{text:c,fileSize:s,...d}=l;return r("a",{className:e,role:"link",...d,children:[o?n(u,{className:t,image:o,width:"24px",height:"24px",asSVG:!0}):null,c?r("span",{className:i,children:[c,n("span",{className:a,children:d?.href&&S(T(d.href),s)})]}):null]})})),S=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),T=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},D=i((({className:e="",doc:t,icon:r})=>n($,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:r}))),R=i((({context:e,hasBorder:t=!0,documents:r,icon:i})=>n(C,{context:e,className:"text-m-sm text-primary-main",children:r?.length?r.map(((e,r)=>n(D,{className:t?"rounded-md border-main-stroke border border-solid p-4":"",doc:e,icon:i},String(r)))):null}))),A=i((({hasBorder:e=!0,documents:t,icon:r})=>n("div",{className:"text-m-sm text-primary-main flex flex-col "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,i)=>n("div",{role:"listitem",children:n(D,{className:e?"rounded-md border-main-stroke border border-solid p-4":"",doc:t,icon:r})},String(i)))):null}))),L=i((({className:e="",context:t,title:i,subtitle:a,icon:l={icon:"DocIconMonoColor"},documents:c,orientation:s="vertical",hasBorder:d=!0})=>r("section",{className:`font-sans text-primary-text py-6 px-4 bg-white overflow-x-hidden ${e}`,children:[i?n(o,{headingType:"h2",className:"text-center "+(a?"mb-2":"mb-5"),title:i}):null,a?n("h3",{className:"mt-0 font-normal mb-5 text-center text-m-md",children:a}):null,"vertical"===s?n(A,{hasBorder:d,documents:c,icon:l}):n(R,{context:t,hasBorder:d,documents:c,icon:l})]}))),P=e=>e?.includes("//"),V=e=>(e||"").replace(/\/?\?.*/,""),W=e=>{if(!e||!P(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t};var M=Object.freeze({__proto__:null,isURL:P,withoutQuery:V,getOrigin:W,getHash:e=>{if(!e||!P(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0}});const j="/mobile",B=(e,t)=>{if(!e)return e;const n=W(t?.href);return n?e.replace(n,"")||"/":e},G=e=>e;function _({router:e,handlerDecorator:t=G},n){const r=((e,t)=>{if(!e)return e;const n=B(e,t)||"",r=t?.pathname.startsWith(j);return r&&!P(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:r,"aria-label":n.text,onClick:t((t=>{const i=r&&!P(r),a=!n.target||"_self"===n.target;i&&a&&(t.preventDefault(),e.push(r))}),n)}}const E=i((e=>{const{text:t,aboveText:i,appendLeft:a}=e;return r("div",{className:O(e),children:[a||null,F(e)?r("div",{children:[n("div",{className:"text-m-2xs font-light text-left",children:i}),n("div",{className:"text-button text-left",children:t})]}):null]})})),O=e=>{const{version:t,aboveText:n,rounded:r}=e;if("link"===t)return"";const i="px-8 gap-2 "+(n?"py-2":"py-[18px]");return["flex items-center justify-center",F(e)?i:"h-12 w-12",r?"rounded-full":""].join(" ")},F=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),H={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",link:"text-primary-main"},U={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},z="w-full text-center font-sans select-none",Z=i((({className:e,text:t,aboveText:r,appendLeft:i,href:a,target:l,onClick:o,children:c,disabled:s,rounded:d,version:m="primary",ariaLabel:h,...u})=>{const p=c??n(E,{text:t,aboveText:r,appendLeft:i,rounded:d,version:m});return s?n("div",{role:"button","aria-disabled":"true","aria-label":h,tabIndex:"-1",className:`inline-block ${z} ${U[m]||""} ${d?"rounded-full":"rounded-md"} ${e||""}`,children:p}):n("a",{className:`${z} inline-block cursor-pointer no-underline ${H[m]||""} ${d?"rounded-full":"rounded-md"} ${e||""}`,href:a,target:l,onClick:o,"aria-label":h,role:a?"link":"button",...u,children:p})})),J=i((({context:e,className:t="",buttons:r})=>{const{handlerDecorator:i}=e,a=e.useRouter();return r?.length?n("div",{className:`${t}`,children:r.map(((e,t)=>function({icon:e,...t},r){if(!t?.text)return;return n(Z,e?{appendLeft:n(u,{image:e,width:"24",height:"24",asSVG:!0}),...t}:{...t},String(r))}(_({router:a,handlerDecorator:i},e),t)))}):null}));const q=i((e=>{const{className:t="",description:r}=e;return n("div",{className:`font-normal text-base ${t}`,children:r})})),K={primary:"rounded-full inline-block mr-3 mt-2",secondary:"rounded-full inline-block mr-3 mt-2",gray:"rounded-full inline-block mr-3 mt-2",tile:"rounded-full inline-block mr-4 mt-3","tile-white":"rounded-full inline-block mr-4 mt-3"},Q={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text",tile:"bg-black","tile-white":"bg-white"},Y=i((({className:e="",isDotted:t=!0,children:i,version:a="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&n("div",{className:X(a)}),n("span",{children:i})]}))),X=e=>`${K[e]} ${Q[e]} ${{primary:"w-2 h-2 min-w-2 min-h-2",secondary:"w-2 h-2 min-w-2 min-h-2",gray:"w-1.5 h-1.5 min-w-1.5 min-h-1.5",tile:"w-[7px] h-[7px] min-w-[7px] min-h-[7px]","tile-white":"w-[7px] h-[7px] min-w-[7px] min-h-[7px]"}[e]}`,ee={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text",tile:"text-primary-text","tile-white":"text-white"},te=i((e=>{const{className:t="",itemClassName:r,isDotted:i,items:a,version:l="primary"}=e;return n("section",{className:`${ee[l]} ${t}`,role:"list",children:a?.length?a.map(((e,t)=>n(Y,{className:r,isDotted:i,version:l,children:e},String(t)))):null})})),ne=i((({className:e="",title:t,children:i,buttons:a,image:l,anchor:o=null})=>r("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,id:o,children:[t,r("div",{className:"flex grow w-full justify-between",children:[r("div",{className:"flex flex-col justify-between w-full",children:[n("div",{children:i}),a?n("div",{children:a}):null]}),l]})]}))),re={primary:"text-primary-text",secondary:"text-white"},ie={primary:"text-secondary-text",secondary:"text-white"};function ae(e){let t="text-primary-main";return"secondary"===e&&(t="text-black"),`w-6 h-6 rounded-full box-border ${t}`}const le=i((({className:e="",context:t,title:i,headingType:a="h2",description:l,benefits:c,benefitsVersion:s="normal",buttons:d,image:m,items:h,version:p="primary",isDotted:x=!0,label:g})=>r("div",{className:`w-full ${e}`,children:[r("div",{children:[g?se(g,p):null,r(ne,{context:t,title:i&&n(o,{headingType:a,title:i,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:d?.length?n(J,{context:t,buttons:d,className:"flex flex-col mt-5 gap-2.5"}):null,children:[l?n(q,{className:"mt-3 text-m-md",description:l}):null,c?.filter((e=>e.label))?.length?n("div",{className:"mt-3",children:c.map(((e,t)=>function({benefit:e,version:t="primary"},i){const a="secondary"===t;return r("div",{className:"flex gap-3 items-center mb-2.5 last:mb-0",children:[e.icon?n(u,{className:ae(t),image:{...e?.icon,iconVersion:a?"white":"normal"},width:"24",height:"24",asSVG:!0}):null,n("div",{className:`font-medium text-m-title-xs m-0 ${re[t]}`,children:e.label}),e.description&&n("div",{className:`font-normal text-m-sm ${ie[t]}`,children:e.description})]},String(i))}({benefit:e,version:p,benefitsVersion:s},t)))}):null,h?.length?n(te,{className:"mt-3 text-m-md",items:h,version:p,isDotted:x}):null]})]}),oe(m)]})));function oe(e){return e?.src?n(u,{imageClassName:"mt-5 mx-auto block",image:{className:"block",...e}}):null}const ce={primary:"text-primary-main border-secondary-hover",secondary:"text-white/80"},se=(e,t)=>n("div",{className:`m-xs px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid w-fit ${ce[t]}`,children:e}),de={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},me=i((e=>{const{className:t="",version:r="primary"}=e;return n("section",{className:`font-sans bg-white px-4 py-6 ${de[r]} ${t}`,children:n(le,{...e})})})),he={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"}},ue=i((({title:e,description:t,blockVersion:i="primary",iconVersion:a,image:l,className:o="",items:c,isDotted:s=!0})=>{const d=he[i];return r("section",{className:`font-sans px-4 py-[18px] flex flex-col ${d.background} ${o}`,children:["small"===a?pe(d.icon):null,"big"===a?xe(l):null,r("div",{className:"py-0.5",children:[e?n("div",{className:`font-medium text-base mb-1 ${d.title}`,children:e}):null,t?n("div",{className:`text-sm ${d.description}`,children:t}):null,c?.length?n(te,{className:"mt-1 text-m-md",items:c,isDotted:s,version:"secondary"===i?"secondary":"gray"}):null]})]})}));function pe(e){return n("div",{className:"mb-3",children:n("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function xe(e){return e?.src?n(u,{className:"pb-3 mr-auto",image:e}):null}const ge={primary:"bg-white",secondary:"bg-primary-main text-white"},be=i((({context:e,title:t,description:i,cards:a=[],className:l,orientation:c="horizontal"})=>r("section",{className:`relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${l}`,children:[r("div",{className:"flex flex-col items-center mb-5",children:[t?n(o,{headingType:"h3",className:"text-center "+(i?"mb-2":"mb-5"),title:t}):null,i?n("div",{className:"font-normal text-m-md max-w-[600px] text-center mb-5",children:i}):null]}),fe(c,a,e)]})));function fe(e,t,r){return"horizontal"===e?n(C,{context:r,children:t?.map(ye)}):n("div",{className:"grid gap-[14px]",children:t?.map(ye)})}function ye(e,t){return r("div",{className:`h-full justify-between box-border horizontal-list-item border-solid border rounded-md border-main-stroke p-4 flex flex-col\n ${ge[e.version??"primary"]}`,children:[r("div",{children:[e.image?.src?n("div",{className:"flex justify-center",children:n(u,{className:"mb-3.5",image:e.image})}):null,e.title?n("h3",{className:"font-medium text-m-title-xs m-0",children:e.title}):null,e.description?Ne(e):null,e.items?.length?ve(e.items,e.version):null]}),e?.button?.text?(i=e.button,n(Z,{className:"mt-3",appendLeft:i?.icon&&n(u,{image:i?.icon,width:"24px",height:"24px",asSVG:!0}),...i})):null]},t);var i}function Ne(e){return n("div",{className:"text-secondary-text mt-1 text-m-sm "+("secondary"===e.version?"text-white opacity-80":""),children:e.description})}function ve(e,t="primary"){return n("section",{className:"mt-3",children:e.map(((e,i)=>r("div",{children:[n("span",{className:"text-m-md font-medium",children:e.title}),n("span",{className:"text-m-sm pl-2 "+("primary"===t?"text-secondary-text":""),children:e.text})]},String(i))))})}const we=i((({className:e="",documents:t,anchor:r=null})=>n("section",{className:`font-sans bg-white mt-[10px] ${e}`,id:r,children:n("ul",{className:"flex flex-col text-sm text-secondary-text p-0",children:t?.length?Ie(t):null})}))),Ie=e=>e.map(((e,t)=>{const{text:r,...i}=e;return n("li",{className:"mb-4 list-none",children:n("a",{className:"hover:text-primary-main",role:"link",...i,children:r||null})},`list_item_${String(t)}`)})),ke={Headline:y,LinkDocs:L,TextBlock:ue,ProductBlock:me,Gallery:be,LinkList:we},Ce=({blocks:e,context:t,className:n,columns:r})=>e?.length?e.map($e({context:t,className:n,columns:r})):null,$e=({context:e,columns:t,className:r})=>(i,a)=>{const l=i?.blockListType;if(!l||!(l in ke))return null;return n("div",{className:`${r} ${2===t?"w-1/2":""}`,children:n(ke[l],{context:e,...i,className:"!p-0"})},`block_${a}`)},Se=i((({blocks:e,context:t})=>n("div",{className:"transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0",children:Ce({context:t,className:"mb-5 last:mb-0 first:mt-2",blocks:e})}))),Te=i((({label:e,labelIcon:t,blocks:i,bordered:a,context:l})=>{const{hasContent:o,icon:c,handleToggle:s}=(({context:e,blocks:t,initialState:n=!1})=>{const[r,i]=e.useState(n),a=t?.length;return{isActive:r,hasContent:a,icon:r?"MinusIcon":"PlusIcon",handleToggle:e=>{if(!a)return;i(!r);const t=(({currentTarget:e})=>e.nextSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:l,blocks:i});return r("li",{className:`${De(a)} border-solid border-main-divider`,children:[r("button",{className:`border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text\n ${a?"":"py-[14px] px-0"}\n ${o?"group cursor-pointer":""}`,onClick:s,children:[r("span",{className:"text-m-title-xs pr-2.5 font-medium flex "+(o?"group-hover:text-primary-main":""),children:[t?n(u,{image:t,width:"24",height:"24",asSVG:!0,className:"mr-3"}):null,e]}),o?n(u,{image:c,width:"24",height:"24",asSVG:!0}):null]}),o?n(Se,{blocks:i,context:l}):null]})}));function De(e){return e?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0"}const Re=i((({title:e,description:t,accordionItems:i,context:a,className:l="",bordered:c})=>r("section",{className:`py-6 px-4 font-sans bg-white text-primary-text ${l}`,children:[e?n(o,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?n("div",{className:"mb-5 text-m-md text-center",children:t}):null,i?.length?n("ul",{className:"list-none m-0 p-0",children:i.map(((e,t)=>n(Te,{...e,context:a,bordered:c},`AccordionItem${t}`)))}):null]}))),Ae=i((({icon:e,image:t,title:i,subtitle:a,isFillGradient:l})=>r("div",{role:"columnheader",scope:"col",children:[e?n(u,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}):null,t?.src&&n("div",{className:"mb-3.5",children:n(u,{image:t})}),i&&n(o,{headingType:"h4",className:""+(l?"text-white":""),title:i}),a&&n("div",{className:"text-m-sm mb-3.5 "+(l?"text-white":"text-secondary-text/80"),children:a})]}))),Le=i((({cell:e,rowHeader:t,isFillGradient:r=!1})=>n("div",{className:"box-border flex flex-col",role:"cell",children:n("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(Pe(r,t))})}))),Pe=(e,t)=>({label:i,description:a},l)=>r("div",{className:"flex justify-between text-m-sm py-3.5",children:[n("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),r("div",{className:"basis-1/2",children:[i&&n("div",{className:"text-right "+(e?"text-white":""),children:i}),a&&n("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:a})]})]},String(l)),Ve=i((({header:e,columnData:t,visibleRowLength:i=0,isFillGradient:a,showRow:l,onToggleColumn:o})=>{const c=t?.slice(0,l?t.length:i),s=a?"secondary":"primary";return r("div",{className:`border border-main-stroke rounded-md p-4 mb-3.5 ${a?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[n(Ae,{...e,isFillGradient:a}),c?.length?c.map((({rowHeader:e,cell:t},r)=>n(Le,{cell:t,rowHeader:e,isFillGradient:a},String(r)))):null,l&&We({header:e,buttonVersion:s}),Me({onToggleColumn:o,isFillGradient:a,showRow:l})]})})),We=({header:e,buttonVersion:t})=>n(Z,{href:e.link.href,target:e.link.target,version:t,className:"font-medium text-m-sm mt-4 py-[11px]",children:e.link.text}),Me=({onToggleColumn:e,isFillGradient:t,showRow:r})=>n("div",{className:"mt-5",role:"cell",children:n("a",{role:"link",onClick:e,className:"font-medium text-m-sm cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:r?"Скрыть":"Показать описание"})}),je=i((({className:e,context:t,title:i,rowHeaders:a,columns:l,visibleRowLength:c=0,isColoredFirstColumn:s=!1,orientation:d="vertical"})=>{const m=l?.map((({data:e,header:t})=>({header:t,column:e?.map(((e,t)=>({cell:e,rowHeader:a?.[t]?.title})))})))||[],[h,u]=t.useState(new Array(l?.length).fill(!c));return r("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${e||""}`,children:[i&&n(o,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:i}),Be({tableData:m,context:t,visibleRowLength:c,isColoredFirstColumn:s,columnsViewState:h,handleToggleColumn:e=>{h[e]=!h[e],u([...h])},orientation:d,setColumnsViewState:u})]})})),Be=({context:e,tableData:t,visibleRowLength:r,isColoredFirstColumn:i,columnsViewState:a,handleToggleColumn:l,orientation:o="horizontal",setColumnsViewState:c})=>n("div",{role:"table",children:t?.length?Ge({orientation:o,context:e,columnsViewState:a,setColumnsViewState:c,tableData:t,visibleRowLength:r,isColoredFirstColumn:i,handleToggleColumn:l}):null}),Ge=({orientation:e,context:t,columnsViewState:r,setColumnsViewState:i,tableData:a,visibleRowLength:l,isColoredFirstColumn:o,handleToggleColumn:c})=>"horizontal"===e?n(C,{context:t,onSlideChange:Ee(r,i),children:a.map(_e({context:t,visibleRowLength:l,isColoredFirstColumn:o,columnsViewState:r,handleToggleColumn:c}))}):a.map(_e({context:t,visibleRowLength:l,isColoredFirstColumn:o,columnsViewState:r,handleToggleColumn:c})),_e=({context:e,visibleRowLength:t,isColoredFirstColumn:r,columnsViewState:i,handleToggleColumn:a})=>(l,o)=>n(Ve,{context:e,visibleRowLength:t,showRow:i[o],header:l.header,columnData:l.column,isFillGradient:0===o&&r,onToggleColumn:()=>a(o)},String(o)),Ee=(e,t)=>()=>{t(new Array(e.length).fill(!1))};async function Oe(){try{const e=await fetch(Fe);return await e.json()}catch(e){console.error(e)}}const Fe="/api/v1/exchangerates.json",He=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function Ue(e=""){const t=He(e);return t<=4?"h4":t<=8?"h3":"h2"}const ze=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),Ze=e=>e?ze.format(e):"",Je="font-light text-left font-normal text-sm text-secondary-text",qe={USD:"DollarIcon",EUR:"EuroIcon"},Ke=i((({className:e,exchangeCurrencyItems:t})=>r("table",{className:`h-fit w-fit ${e}`,children:[n("thead",{children:r("tr",{children:[n("th",{className:Je,children:"Валюта"}),n("th",{className:`${Je} pl-11`,children:"Купить"}),n("th",{className:`${Je} pl-11`,children:"Продать"})]})}),n("tbody",{children:t.map((e=>Qe(e)))})]}))),Qe=e=>{const t=e?.currency?.currency;return r("tr",{className:"pb-1",children:[n("td",{className:"pt-4",children:r("div",{className:"flex items-center",children:[t?n(u,{image:{icon:qe[t]},width:"24",height:"24"}):null,n("span",{className:"text-m-title-md ml-2",children:t})]})}),n("td",{className:"pt-4 pl-11 m-title-md font-light",children:Ze(e.buyExchangeRate)}),n("td",{className:"pt-4 pl-11 m-title-md font-light",children:Ze(e.saleExchangeRate)})]},t)},Ye=i((({className:e="",address:t,distance:i})=>r("div",{className:`flex text-sm ${e}`,children:[n(u,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),r("div",{className:"ml-3 font-light",children:[t?n("p",{className:"m-0 mb-[3px]",children:t}):null,i?r("p",{className:"text-secondary-text m-0",children:["Курс указан для ближайшего офиса - ",i]}):null]})]}))),Xe=i((({className:e="",id:t,name:r,type:i="text",placeholder:a})=>n("input",{className:e,id:t,name:r||t,type:i,placeholder:a}))),et=i((({className:e="",id:t,name:r,children:i})=>n("select",{className:e,id:t,name:r||t,children:i}))),tt=i((({className:e="",value:t,selected:r,children:i})=>n("option",{className:e,value:`${t}`,selected:r,children:i}))),nt=i((({codes:e,className:t=""})=>r("div",{className:`grid gap-3.5 ${t}`,children:[rt("Хочу продать",e),rt("Получу",e,"USD"),n(Z,{className:"box-border mt-3.5 py-3 h-12 w-full",version:"primary",href:"#",children:"Купить валюту"})]})));function rt(e,t,i){return r("div",{className:"relative flex items-center",children:[n(Xe,{className:"h-10 border pl-4 pt-[7px] pb-[7px] rounded-md text-m-sm w-full appearance-none -mr-12",type:"number",placeholder:`${e}`}),t.length?n(et,{className:"h-9 -translate-x-4",children:t.map(((e,t)=>n(tt,{value:e,selected:e===i,children:e},String(t))))}):null]})}const it=["USD","EUR"],at=["RUB","USD","EUR"],lt=[{buyExchangeRate:90.6,saleExchangeRate:92.8,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:73.75,saleExchangeRate:75.95,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],ot={address:"Москва, ул.Ленина д.28",distance:"6км"},ct=i((({className:e="",context:t,title:i="Курсы обмена валют",anchor:a=null})=>{const l=function(e){const{data:t}=e(Fe,Oe);return t||{}}(t.useAsyncData)?.exchangeRate?.currencies?.filter((e=>-1!==it.indexOf(e?.currency?.currency||"")))||lt;return n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,id:a,children:n(ne,{context:t,title:n(o,{headingType:Ue(e),title:i,className:"whitespace-pre-wrap"}),children:r("div",{className:"flex",children:[r("div",{className:"mr-[43px] pt-4",children:[l?n(Ke,{className:"mb-[31px]",exchangeCurrencyItems:l}):null,n(Ye,{...ot})]}),l?.length?n(nt,{className:"grow",exchangeCurrencyItems:l,codes:at}):null]})})})})),st=i((({className:e,viewBox:t,fill:r="none",width:i,height:a,paths:l,...o})=>n("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:r,width:i,height:a,children:l.map((({d:e,fill:t,...r},i)=>n("path",{d:e,fill:t||"currentColor",...o,...r},i)))}))),dt=["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"],mt={"bg-white":"text-primary-main",transparent:"text-white"},ht={"bg-white":"text-black",transparent:"text-white"},ut=i((({className:e="",href:t,children:i,targetBlank:a,bgColor:l="bg-white",hideTitle:o})=>r("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"https://rshb.ru/",target:a?"_blank":"_self","aria-label":"Россельхозбанк",children:[n(st,{className:`${mt[l]} w-10 h-[38px]`,viewBox:"0 0 40 45",paths:dt.map((e=>({d:e})))}),!o&&n("span",{className:`${ht[l]} text-sm font-medium ml-2.5`,children:i||"Россельхозбанк"})]}))),pt=i((({className:e,title:t="Мобильное приложение",description:i,href:a="#"})=>n("div",{className:`col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light ${e||""}`,children:a?r("div",{className:"flex",children:[n("div",{className:"flex justify-center align-middle rounded-md bg-primary-main w-[50px] h-[50px]",children:n(ut,{className:"w-[33px]",bgColor:"transparent",hideTitle:!0})}),r("a",{href:a,target:"_blank",className:"flex flex-col justify-center pl-3 font-sans",children:[n("div",{className:"text-m-button font-medium mb-[3px]",children:t}),n("div",{className:"text-m-button text-secondary-text",children:i})]})]}):null}))),xt=i((({className:e="",items:t,hasButton:i,context:a})=>{const l=a.useRouter(),{handlerDecorator:o}=a;return r("div",{className:e,children:[t?.length?t.map(gt):null,i?n(Z,{version:"primary",className:"mb-6 w-full",..._({router:l,handlerDecorator:o},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),gt=(e,t)=>{const{type:i,text:a,description:l}=e;return r("div",{className:"mb-4",children:[n("div",{children:bt(i,a)}),n("div",{className:"mt-1 font-sans font-light text-sm text-secondary-text",children:l})]},String(t))},bt=(e,t="")=>{switch(e){case"tel":return n("a",{className:"font-sans text-xl text-primary-text no-underline",href:`tel:${ft(t)}`,children:t});case"email":return n("a",{className:"font-sans text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return n("span",{children:t})}},ft=e=>e.replaceAll(/\D/g,""),yt=i((({title:e,links:t,className:i="",context:a})=>{const l=a.useRouter(),{handlerDecorator:o}=a;return r("div",{className:i,children:[n("span",{className:"text-primary-text font-sans font-medium text-sm",children:e}),t?.length?n("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>n(Nt,{index:t,..._({router:l,handlerDecorator:o},e)},String(t))))}):null]})})),Nt=i((({className:e="",index:t,text:r,href:i,target:a,onClick:l})=>n("a",{className:`font-sans font-normal text-sm text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:i,target:a,onClick:l,children:r||`Документ ${t}`}))),vt=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм",width:"20px",height:"16px"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте",width:"24px",height:"12px"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники",width:"12px",height:"20px"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store",width:"20px",height:"22px"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play",width:"21px",height:"21px"}],wt=i((({href:e,version:t})=>{const{icon:r,width:i,height:a,label:l}=vt.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};if(!r)return null;return n("a",{className:` flex items-center justify-center border border-solid rounded-md border-main-divider no-underline outline-none w-14 h-14 box-border ${"secondary"===t?"text-white hover:text-primary-main hover:bg-white":"text-primary-main hover:text-white hover:bg-primary-main hover:border-primary-main"}`,href:e,"aria-label":l,target:"_blank",rel:"noopener noreferrer",children:r?n(u,{image:r,width:i,height:a,asSVG:!0,className:"block"}):null})})),It=i((({className:e,media:t,version:r,context:i})=>{const a=i.useRouter(),{handlerDecorator:l}=i;return n("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e||""}`,children:t?.map(((e,t)=>n(wt,{version:r,..._({router:a,handlerDecorator:l},e)},String(t))))})})),kt=i((({className:e,links:t,context:i})=>{const a=i.useRouter(),{handlerDecorator:l}=i;return r("div",{className:`${e||""}`,children:[n("div",{className:"py-6",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 flex-col justify-start items-start gap-2",children:t.map(((e,t)=>n(Ct,{index:t,..._({router:a,handlerDecorator:l},e)},String(t))))}):null]})})),Ct=i((({className:e,index:t,text:r,href:i,target:a,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:i,target:a,onClick:l,children:r||`Документ ${t}`})));function $t(e){const{data:t}=e(Tt(),St);return t||{}}async function St(){const e=await fetch(Tt());return await e.json()}function Tt(){return`/wcms-resources/${d.SITEMAP||"sitemap"}.json`}const Dt=i((({className:e,context:t})=>{const{term:i,setTerm:a}=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-[20px] h-[20px]",children:n(u,{image:"LoupeIcon",width:"24",height:"24"})}),!i&&n("label",{htmlFor:"search-bar-input",className:"font-sans font-normal text-sm text-secondary-text",children:"Поиск по сайту"})]}),n("input",{id:"search-bar-input",className:"h-12 pl-12 w-full peer placeholder-transparent font-sans font-normal text-base text-black border border-solid rounded box-border outline-none pr-[6%] border-main-divider focus:border-primary-text",value:i,onChange:e=>a(e.target.value),type:"text",name:"search-bar-input",placeholder:"some search"}),n("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:e=>{e.preventDefault(),a("")},children:n(u,{image:"CloseIcon",width:"24",height:"24"})})]})})),Rt=e=>e?.map((e=>({label:e.text||"",blocks:[{accordionBlockType:"LinkList",documents:e.items||[]}]}))),At=i((({className:e="",documents:t,relatedEnterprises:i,contacts:a,socialMedia:l,context:o,horizontalNavigationTitle:c})=>{const s=$t(o.useAsyncData),d=s?.dispositions;return r("footer",{className:`px-4 py-[26px] bg-white ${e}`,children:[n(xt,{className:"overflow-hidden",items:a,context:o,hasButton:!0}),n(Re,{context:o,className:"!p-0 mb-4",accordionItems:Rt(s.topItems)}),n("div",{children:d?.map(Lt)}),n(pt,{context:o,title:"Мобильное приложение",description:"Загрузить для IOS и Android"}),n(Dt,{context:o,className:"grow"}),n(It,{className:"pb-4",media:l,context:o}),n(yt,{title:c,links:i,context:o}),n(kt,{links:t,context:o})]})})),Lt=(e,t)=>{const{icon:i,href:a,text:l}=e;return r(Z,{version:"link",href:a,className:"flex text-sm mb-4",children:[i?n(u,{className:"pr-1",image:i,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-2.5 font-medium text-primary-text",children:l})]},`footer-${t}`)},Pt=(e,t,n=((e,t)=>t.startsWith(e)))=>n(V(e),(e=>(e||"").replace(j,""))(V(P(e)?t.href:t.pathname))),Vt=e=>t=>Pt(t.href,e),Wt=e=>t=>t.items?.some(Vt(e))||Pt(t.href,e)||((e,t)=>W(e)===W(t.href))(t.href,e),Mt=e=>t=>e?.href===t?.href,jt=(e,t)=>{return(r=e,i=t,(r||[]).map((e=>i?.find(Mt(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(Mt(e))))));var n,r,i},Bt="absolute left-0 -bottom-3 w-full h-[2px]",Gt=i((({className:e,text:t,href:i,target:a,active:l,onClick:o,children:c,bgColor:s="bg-white"})=>r("a",{className:`relative inline-block bg-transparent text-center no-underline ${e||""}`,href:i,target:a,onClick:o,children:[n("span",{className:_t(s,l),children:t||c}),l?n("div",{className:Et(s,l)}):null]}))),_t=(e,t)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-secondary-text hover:text-primary-main"),`${n} font-sans font-normal text-sm`},Et=(e,t)=>t?`${"bg-white"===e?"bg-primary-main":e} ${Bt}`:Bt,Ot=i((({context:e,burgerSubMenu:t,onClick:i,defaultLocation:a="",children:l})=>{const[o,c]=e.useGeolocation(a);return r("div",{className:"absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20",children:[n("button",{className:"absolute top-4 right-4 border-none bg-transparent cursor-pointer",onClick:i,children:n(u,{image:"CloseIcon",width:"24",height:"24",asSVG:!0})}),r("button",{onClick:c,className:"flex items-center text-sm text-secondary-text p-0 mb-4 bg-transparent cursor-pointer",children:[n(u,{image:"GeolocationIcon",width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),o]}),l,n("div",{className:"mb-7",children:t?.map(Ft)}),n(Dt,{context:e,className:"grow"})]})})),Ft=(e,t)=>{const{icon:i,href:a,text:l}=e;return r("a",{href:a,className:"flex text-sm mb-4 hover:text-primary-main",children:[i?n(u,{className:"text-primary-main pr-1",image:i,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-0.5 font-medium",children:l})]},`headerSubMenu-${t}`)},Ht=i((({onClick:e,bgColor:t})=>r("div",{className:"flex items-center justify-between border-0 border-b border-main-divider h-[50px]",children:[r("div",{className:"flex items-center",children:[n("button",{className:"pl-0 pr-4 border-0 bg-transparent cursor-pointer",onClick:e,"aria-label":"Открыть меню",children:n(u,{image:"bg-white"===t?"BurgerIcon":"BurgerIconWhite",className:"text-primary-text",width:"24",height:"24",asSVG:!0})}),n(ut,{bgColor:t})]}),n("button",{className:("bg-white"===t?"text-primary-main":"text-white")+" text-sm border-0 bg-transparent cursor-pointer",children:"Войти"})]}))),Ut=i((({className:e="",defaultLocation:t,bgColor:i="bg-white",context:a,topItems:l})=>{const o=a.useRouter(),c=$t(a.useAsyncData),s=c?.dispositions,{handlerDecorator:d}=a,m=jt(c.topItems,l).find(Wt(o))?.items,h=(e=>(t=[])=>{const n=t?.filter(Vt(e));var r;return n?.length?(r=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>r(e)>r(t)?e:t)))(n):null})(o)(m),[u,p]=a.useState(!1),x=()=>p(!u);return r("header",{className:`${i} ${e}`,children:[r("div",{className:"container px-4 py-0 box-border",children:[n(Ht,{onClick:x,bgColor:i}),n("nav",{className:"flex items-center m-0 p-0 overflow-y-hidden w-full h-[50px]",children:n("div",{className:"flex no-scrollbar horizontal-list h-full items-center",children:m?.map(((e,t)=>zt({..._({router:o,handlerDecorator:d},e),active:e===h,bgColor:i},t)))})})]}),u?n(Ot,{context:a,onClick:x,burgerSubMenu:s,defaultLocation:t,children:n(Re,{context:a,accordionItems:Rt(c.topItems),className:"!p-0 mb-4"})}):null]})})),zt=(e,t)=>n(Gt,{className:"mr-8 whitespace-nowrap text-sm",...e},String(t));function Zt(e=""){const t=He(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function Jt(e=""){const t=He(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const qt=i((({className:e,context:t,title:i,description:a="Блок в разработке...",anchor:l=null})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${Jt(e)} ${Zt(e)} `,id:l,children:r(ne,{context:t,title:i?n(o,{headingType:Ue(e),title:i,className:"whitespace-pre-wrap max-w-[600px]"}):null,children:[a?n(q,{className:"mt-4 max-w-[600px]",description:a}):null,n("figure",{className:"m-0 min-w-[600px]",children:Kt()})]})}))),Kt=(e=3)=>Yt(100,e).map((e=>Math.floor(e))).map(Qt),Qt=(e=100,t)=>n("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Yt=(e,t)=>[e].concat(t>0?Yt(e/1.618,t-1):[]),Xt={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},en=i((({block:e,headingType:t,context:r,className:i=""})=>n("section",{className:`flex grow-0 shrink-0 basis-full px-4 pt-6 ${Xt[e?.version??"primary"]} ${i}`,children:n("div",{className:"flex grow",children:n(le,{context:r,headingType:t||"h2",...e})})}))),tn=i((({className:e,context:t,slides:r=[]})=>{const i=r.map((e=>e.productBlock));return n("section",{className:`font-sans bg-white overflow-hidden w-100 pb-6 ${e||""}`,children:n(C,{context:t,children:i.map(((e,r)=>n(en,{block:e,context:t},String(r))))})})})),nn={normal:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",small:"h-[50px] w-[50px] min-w-[50px] min-h-[50px]"},rn={normal:"min-h-[70px]",small:"min-h-[50px]"},an={primary:{background:"bg-white",title:"text-primary-text",description:"text-secondary-text",iconBackground:"bg-secondary-light",iconConnector:"bg-secondary-light"},secondary:{background:"bg-primary-main",title:"text-white",description:"text-white/80",iconBackground:"bg-white/30",iconConnector:"bg-white"}},ln=e=>an[e],on=i((({className:e,title:t,description:i,steps:a,size:l="normal",version:c="primary"})=>{const s=ln(c);return r("section",{className:`box-border font-sans bg-white px-4 py-6 flex flex-col\n ${s.background} ${s.title} ${e||""}`,children:[t&&n(o,{headingType:"h3",className:`text-center ${s.title}`,title:t}),i&&n("p",{className:`text-m-md text-center ${s.description} ${t&&"mt-2"}`,children:i}),a?.length?n("div",{className:"box-border py-0.5 mb-0.5 mt-5",children:n("div",{className:"flex flex-col justify-between gap-x-[101px]",children:a.map(((e,t)=>cn({step:e,size:l,i:t,length:a.length,version:c})))})}):null]})})),cn=e=>{const{step:t,size:i,i:a,length:l,version:o}=e,c=l-1===a,s="normal"===i?"ml-[34px]":"ml-[24px]",d=ln(o);return n("div",{children:r("div",{className:"flex flex-row text-center relative",children:[r("div",{className:"overflow-hidden",children:[sn(e),!c&&n("div",{className:`min-h-8 h-full w-[2px] ${d.iconConnector} ${s}`})]}),r("div",{className:`flex flex-col justify-center h-fit ${rn[i]}`,children:[t.label&&n("div",{className:"font-medium text-m-title-xs m-0 text-left",children:t.label}),t.description&&n("div",{className:`font-normal text-sm ${d.description} text-left ${t.label?"mt-1":""}`,children:t.description})]})]},String(a))},String(a))},sn=e=>{const{step:t,size:r,i:i,version:a}=e,l=ln(a),o="normal"===r?"38":"27",c="normal"===r?"text-m-title":"text-m-title-xs";return n("div",{className:`${nn[r]} ${l.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`,children:n("span",{className:`font-medium flex self-center ${l.title} ${c}`,children:t.icon?.icon&&n(u,{image:t.icon,width:o,height:o,asSVG:!0})||i+1})})},dn=i((({title:e,icon:t})=>r("div",{className:"flex gap-2.5 mb-2",children:[e?n(o,{headingType:"h3",className:"font-medium",title:e}):null,t?n(u,{className:"ml-auto max-w-6 max-h-6",image:t,width:"24px",height:"24px"}):null]}))),mn=e=>e?.alt||e?.title||s[e?.icon?e.icon:""],hn=i((({header:e,data:t})=>r("div",{className:"rounded-md border-main-stroke h-full box-border border p-4",children:[n(dn,{...e}),t?.length?t.map(un):null]}))),un=({label:e,description:t,list:i,image:a,buttons:l},o)=>r("div",{children:[o>0&&n("div",{className:"border-main-divider border border-solid border-t-0 border-x-0 my-2"}),e?n("div",{className:"text-m-sm m-0",children:e}):null,t?n("div",{className:"text-m-sm text-secondary-text mt-[3px]",children:t}):null,i?.items?.length?pn(i):null,a&&n(u,{image:{...a,className:"m-0"}}),l?.length?xn(l):null]},String(o)),pn=e=>n(te,{className:"flex flex-col justify-between items-start text-m-sm",version:"gray",items:e.items,isDotted:e.isDotted??!0}),xn=e=>n("div",{children:e.map((({icon:e,rounded:t,...r},i)=>n(Z,{className:`mt-3 ${i>0&&t?"ml-2.5":""} ${e?"w-12 h-12":""}`,ariaLabel:mn(e),rounded:t,appendLeft:e?n(u,{image:e,width:"24px",height:"24px",asSVG:!0}):null,...r,"aria-label":e},String(i))))}),gn=i((({tiles:e})=>n("div",{className:"flex flex-col gap-3.5",children:e.map(((e,t)=>n(hn,{...e},String(t))))}))),bn=i((({tiles:e,context:t})=>n(C,{context:t,children:e.map(((e,t)=>n(hn,{...e},String(t))))}))),fn=i((({className:e,context:t,title:i,description:a,columns:l,rowHeaders:c,orientation:s="vertical"})=>{const d=Nn(l),m=vn(c,d);return r("section",{className:`px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[i?n(o,{headingType:"h2",className:"text-center "+(a?"mb-2":"mb-5"),title:i}):null,a?n("div",{className:"mb-5 text-center text-m-md",children:a}):null,m?.length?yn(s,m,t):null]})}));function yn(e,t,r){return"vertical"===e?n(gn,{tiles:t}):n(bn,{context:r,tiles:t})}const Nn=e=>e?.[0].data?e[0].data:[],vn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),wn={Accordion:Re,ComparisonTable:je,ExchangeRateTile:ct,Footer:At,Gallery:be,Header:Ut,Headline:y,LinkDocs:L,LinkList:we,MobileAppTile:pt,ProductBlock:me,ProductGallery:tn,StepsBlock:on,TariffsTable:fn,TextBlock:ue,Placeholder:qt},In=i((({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:kn()}))),kn=()=>{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"})]})},Cn=i((({className:e,context:t,anchor:i=null})=>{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||""}`,id:i,children:[n(In,{onClick:a.like,ariaLabel:"Поставить отметку «лайк»"}),n(In,{onClick:a.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),n("span",{className:"select-none",children:a.likeCount})]})})),$n=!("undefined"==typeof window||!window.document||!window.document.createElement),Sn=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),Tn=i((({className:e="",context:t,blocksRegistry:i,data:{style:a,blocks:l,slots:o={},likeControl:c,colorPalette:s="pc"},blockDecorator:d=Sn})=>{const{header:m}=o,h=t.useRouter();return $n&&globalThis.addEventListener("load",(()=>{const e=globalThis.document.querySelectorAll("section[id]");globalThis.document.addEventListener("scroll",(()=>((e,t)=>{t?.forEach((t=>{const n=globalThis.location?.hash;if(n===`#${t?.id}`)return;const r=t?.getBoundingClientRect();r&&r.top>0&&r.top<150&&e.replace(`#${t?.id}`)}))})(h,e)))})),r("section",{className:`relative ${Rn(a)} ${e}`,"data-theme":s,children:[m?.blocks?.length?n("div",{className:`${Rn(m?.style)}`,children:m.blocks.map(((e,n)=>Dn({block:e,blockDecorator:d,blocksRegistry:i,context:t},n)))}):null,l?.length?n("div",{className:"container grid grid-cols-12 gap-1",children:l.map(((e,n)=>Dn({block:e,blockDecorator:d,blocksRegistry:i,context:t},n)))}):null,c&&n("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:n(Cn,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t},"LikeControl")})]})}));function Dn({block:e,blockDecorator:t,blocksRegistry:r,context:i},a){const{type:l}=e;l&&l in r||console.warn(`No block with "${l}" is registered`);const o=r[l||"Placeholder"]||qt;return t({blockClassName:`scroll-mt-12 ${Rn(e.style)}`,block:e,render:e=>{const{version:t,content:r,anchor:c}=e.block;return n(o,{className:e.blockClassName,version:t,context:i,anchor:c,...r},`${l}-${a}`)}},`block-${a}`)}function Rn(e){return e?e.join(" "):""}const An=i((({HeadComponent:e,data:t,children:i})=>{const{title:a,main:l,og:o,twitter:c,jsonLd:s}=t,{description:d,keywords:m,canonical:h,robots:u}=l||{};return r(e,{children:[n("title",{children:a}),n("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),d&&n("meta",{name:"description",content:d}),m&&n("meta",{name:"keywords",content:m.join(",")}),u&&n("meta",{name:"robots",content:u.join(",")}),Ln(o),Pn(c),h&&n("link",{rel:"canonical",href:h}),s&&n("script",{type:"application/ld+json",children:s}),i]})}));function Ln(e){return e?Object.entries(e).map((([e,t])=>n("meta",{property:`og:${e}`,content:t},e))):null}function Pn(e){return e?Object.entries(e).map((([e,t])=>n("meta",{name:`twitter:${e}`,content:t},e))):null}function Vn(e){const{mobile:t,...n}=e;return t?{...n,...t,content:{...n.content,...t.content}}:e}function Wn(e){return e?.filter((e=>(e?.type||e?.mobile?.type||"")in wn&&!e.mobile?.hidden)).map(Vn)}e.Blocks=wn,e.ContentPage=Tn,e.ContentPageHead=An,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.Header=Ut,e.Icon=m,e.LikeAPI=function(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(a)||"");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(a,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:i}=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:i},body:JSON.stringify({node_ids:r})}),{likes:a}=await n.json();return a||[]}catch(e){return console.error(e),[]}},like:async function(r){if(!r)return 0;const{token:i,name:a}=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:i,UserID:a},body:JSON.stringify({node_id:r,user_name:a})}),{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:i,name:a}=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:i,UserID:a},body:JSON.stringify({node_id:r,user_name:a})}),{likes:l}=await n.json();return l||0}catch(e){return console.error(e),0}}}},e.joinList=function(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])},e.normalizePage=function(e){if(!e)return;const{blocks:t,slots:n}=e;return{...e,blocks:Wn(t),slots:n&&Object.keys(n).reduce(((e,t)=>({...e,[t]:{...n[t],blocks:Wn(n[t].blocks)}})),{})}},e.projectSettings=d,e.setup=t,e.url=M,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";const t=(e,n)=>{t._jsx=e,t._jsxs=n||e};t.vue=e=>{t(((t,{children:n,dangerouslySetInnerHTML:r,...i}={})=>{const a=Object.assign({},i,r?{innerHTML:r.__html}:{});return e(t,a,"string"!=typeof t?()=>n:n)}))};const n=(...e)=>t._jsx(...e),r=(...e)=>t._jsxs(...e),i=e=>(e._tmpl||(e._tmpl=function(t,n){const{children:r,...i}=t||{},a=n?.slots?.default,l=r||a&&a();return e(Object.assign(i,l&&{children:l}),n)},e._tmpl.inheritAttrs=!1),e._tmpl);const a="likesToken";const l={h1:"text-m-title",h2:"text-m-title",h3:"text-m-title-md",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},o=i((e=>{const{className:t,headingType:r,title:i,as:a}=e;if(!r)return;return n(a||r,{className:`font-sans font-medium m-0 ${l[r]} ${t||""}`,children:i})}));var c,s;!function(e){e.ActualBalanceIcon="ActualBalanceIcon",e.AppleIcon="AppleIcon",e.ArrowDownIcon="ArrowDownIcon",e.ArrowLeftIcon="ArrowLeftIcon",e.ArrowsRewindRight="ArrowsRewindRight",e.ArrowUpIcon="ArrowUpIcon",e.AtmIcon="AtmIcon",e.BankIcon="BankIcon",e.BurgerIcon="BurgerIcon",e.BurgerIconWhite="BurgerIconWhite",e.Calendar2Icon="Calendar2Icon",e.CalendarCircleIcon="CalendarCircleIcon",e.CalendarIcon="CalendarIcon",e.CalendarTickIcon="CalendarTickIcon",e.CalendarWhiteIcon="CalendarWhiteIcon",e.CardIcon="CardIcon",e.CardPosIcon="CardPosIcon",e.CardTickIcon="CardTickIcon",e.CardWithGemIcon="CardWithGemIcon",e.ChartSquareIcon="ChartSquareIcon",e.ClockIcon="ClockIcon",e.CloseIcon="CloseIcon",e.ComfortableCompIcon="ComfortableCompIcon",e.CreditCardsIcon="CreditCardsIcon",e.DiscountShapeIcon="DiscountShapeIcon",e.DocIcon="DocIcon",e.DocIconMonoColor="DocIconMonoColor",e.DocumentTextIcon="DocumentTextIcon",e.DollarIcon="DollarIcon",e.EarthIcon="EarthIcon",e.EmptyWalletChangeIcon="EmptyWalletChangeIcon",e.EmptyWalletIcon="EmptyWalletIcon",e.EmptyWalletWhiteIcon="EmptyWalletWhiteIcon",e.EuroIcon="EuroIcon",e.GeolocationIcon="GeolocationIcon",e.GlassIcon="GlassIcon",e.GlobalIcon="GlobalIcon",e.GpsIcon="GpsIcon",e.GridIcon="GridIcon",e.GridIconWhite="GridIconWhite",e.InterestGrowthIcon="InterestGrowthIcon",e.InterestIcon="InterestIcon",e.JCBIcon="JCBIcon",e.LoupeIcon="LoupeIcon",e.MasterCardIcon="MasterCardIcon",e.MinusIcon="MinusIcon",e.MirIcon="MirIcon",e.MoneyIcon="MoneyIcon",e.MoneyInsuranceIcon="MoneyInsuranceIcon",e.MonitorMobileIcon="MonitorMobileIcon",e.NewDocIcon="NewDocIcon",e.OfficeIcon="OfficeIcon",e.OkIcon="OkIcon",e.PassSendIcon="PassSendIcon",e.PercentageRoundIcon="PercentageRoundIcon",e.PercentageSquareIcon="PercentageSquareIcon",e.PercentageSquareWhiteIcon="PercentageSquareWhiteIcon",e.PersonalCardIcon="PersonalCardIcon",e.PlayMarketIcon="PlayMarketIcon",e.PlusIcon="PlusIcon",e.Profile2UserIcon="Profile2UserIcon",e.ProfileIcon="ProfileIcon",e.RoundRubleIcon="RoundRubleIcon",e.SafeIcon="SafeIcon",e.ShieldTickIcon="ShieldTickIcon",e.SignDocsIcon="SignDocsIcon",e.SmallClockIcon="SmallClockIcon",e.TelegramIcon="TelegramIcon",e.UnionPayIcon="UnionPayIcon",e.UserTickIcon="UserTickIcon",e.VisaIcon="VisaIcon",e.VKIcon="VKIcon",e.WalletAdd2Icon="WalletAdd2Icon",e.WalletAddIcon="WalletAddIcon",e.WalletIcon="WalletIcon",e.WalletWithMoneyIcon="WalletWithMoneyIcon"}(c||(c={})),function(e){e.ActualBalanceIcon="Деньги",e.AppleIcon="Лого «Apple»",e.ArrowDownIcon="Стрелка 'Вниз'",e.ArrowLeftIcon="Стрелка",e.ArrowsRewindRight="ArrowsRewindRight",e.ArrowUpIcon="ArrowUpIcon",e.AtmIcon="Банкомат",e.BankIcon="Банк",e.BurgerIcon="Бургер",e.BurgerIconWhite="Бургер (белый)",e.Calendar2Icon="Календарь 2",e.CalendarCircleIcon="Скруглённый календарь",e.CalendarIcon="Календарь",e.CalendarTickIcon="Календарь с галочкой",e.CalendarWhiteIcon="Календарь белый",e.CardIcon="Кред. карта",e.CardPosIcon="Кред. карта под наклоном",e.CardTickIcon="Кред. карта с галочкой",e.CardWithGemIcon="Карта с драгоценностями",e.ChartSquareIcon="Деньги внутри кошелька",e.ClockIcon="Часы",e.CloseIcon="Крестик",e.ComfortableCompIcon="Кресло",e.CreditCardsIcon="Кредитные карты",e.DiscountShapeIcon="Скидка",e.DocIcon="Документ",e.DocIconMonoColor="Документ (одноцветный)",e.DocumentTextIcon="Документ с текстом",e.DollarIcon="Доллар",e.EarthIcon="Земля",e.EmptyWalletChangeIcon="Пустой кошелёк с возвратом",e.EmptyWalletIcon="Пустой кошелёк",e.EmptyWalletWhiteIcon="Пустой кошелёк (белый)",e.EuroIcon="Евро",e.GeolocationIcon="Геолокация",e.GlassIcon="Зеркало",e.GlobalIcon="Глобус",e.GpsIcon="Gps",e.GridIcon="Сетка",e.GridIconWhite="Сетка (белая)",e.InterestGrowthIcon="Диаграмма роста",e.InterestIcon="Скидка",e.JCBIcon="JCB",e.LoupeIcon="Лупа",e.MasterCardIcon="MasterCard",e.MinusIcon="Минус",e.MirIcon="МИР",e.MoneyIcon="Деньги",e.MoneyInsuranceIcon="Денежное страхование",e.MonitorMobileIcon="Монитор и мобильный",e.NewDocIcon="Новый документ",e.OfficeIcon="Офис",e.OkIcon="Лого «Одноклассники»",e.PassSendIcon="Бизнес",e.PercentageRoundIcon="Проценты (круг.)",e.PercentageSquareIcon="Проценты",e.PercentageSquareWhiteIcon="Проценты белые",e.PersonalCardIcon="Персональная карта",e.PlayMarketIcon="Лого «PlayMarket»",e.PlusIcon="Плюс",e.Profile2UserIcon="Профиль, 2 персоны",e.ProfileIcon="Профиль",e.RoundRubleIcon="Рубль (круг.)",e.SafeIcon="Сейф",e.ShieldTickIcon="Безопасность",e.SignDocsIcon="Подписанные документы",e.SmallClockIcon="Маленькие часы",e.TelegramIcon="Лого «Telegram»",e.UnionPayIcon="UnionPay",e.UserTickIcon="Пользователь",e.VisaIcon="Visa",e.VKIcon="Лого «VK»",e.WalletAdd2Icon="Пополнение карты",e.WalletAddIcon="Кошелёк с плюсом",e.WalletIcon="Кошелёк",e.WalletWithMoneyIcon="Кошелёк с деньгами"}(s||(s={}));const d=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=i((({className:e="",name:t="",alt:i=`Иконка ${s[t]||t}`,title:a=i,iconVersion:l,asSVG:o,...c})=>{const m=`${d.CDN||""}icons/${t}.svg`,h="white"===l?"text-black invert":"";return o?r("svg",{className:e,...c,"aria-hidden":"true",children:[a?n("title",{children:a}):null,i?n("desc",{children:i}):null,n("use",{className:h,href:`${m}#icon`,xlinkHref:`${m}#icon`})]}):n("img",{className:e,src:m,alt:i,title:a,...c,"aria-hidden":"true"})}));function h(e){return"string"==typeof e?"normal":e.iconVersion||"normal"}const u=i((({className:e="",image:t,imageClassName:r="",...i})=>{const a="string"==typeof t?t:t?.icon;return a||""===a?n(m,{className:e,iconVersion:h(t),name:a,...i}):n(p,{className:e,imageClassName:r,image:t})})),p=i((({className:e="",image:t,imageClassName:i=""})=>t?r("picture",{className:e,children:[t?.sources?.length?t.sources.map((({src:e,format:t},r)=>n("source",{srcSet:e,type:g(t)},`${r}_${e}`))):null,x(t,i)]}):null)),x=(e,t="")=>{const r={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},i=e.title||"",a=e.alt||e.title;return n("img",{src:e.src,className:`m-auto ${t}`,alt:a,title:i,style:r,...e.size})};function g(e){return e?`image/${String(e)}`:void 0}const b={left:"text-left",center:"text-center",right:"text-right"},f={transparent:{background:"bg-transparent",text:"text-primary-text",description:"text-primary-text"},primary:{background:"bg-white",text:"text-primary-text",description:"text-primary-text"},secondary:{background:"bg-primary-main",text:"text-white",description:"text-white/80"}},y=i((({bgColorHeadline:e="transparent",className:t="",title:i,description:a,image:l,align:c="left"})=>{const s=f[e];return r("section",{className:`px-4 py-6 ${s.background} ${t}`,children:[i&&n(o,{headingType:"h2",className:`${s.text} ${b[c]}`,title:i}),a&&n("p",{className:`font-normal text-m-md ${s.description} ${b[c]} ${i?"mt-2.5":""}`,children:a}),l?.src&&n("div",{className:"mt-5 mx-auto flex justify-center",children:n(u,{image:l})})]})})),N=i((({children:e,activeIndex:t,indexFraction:r,showDots:i})=>{const a=e=>n=>{if(e===t)return;const r=n.currentTarget.parentElement?.previousElementSibling;r?.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})};return i&&e?.length?n("div",{className:"flex gap-2 mx-auto mt-5 w-fit",children:e?.map(((e,i)=>n("div",{onClick:a(i),className:"bg-primary-main opacity-30 w-1.5 h-1.5 min-w-1.5 min-h-1.5 rounded-full",style:v(i,t,r),"aria-hidden":!0},String(i))))}):null})),v=(e,t,n)=>{if(e<t||e>t+1)return null;const r=1-n;return e===t?{opacity:""+(.3+.7*r),width:6+16*r+"px"}:{opacity:""+(.3+.7*n),width:6+16*n+"px"}},w=i((({className:e="",children:t,...r})=>n("div",{className:`snap-center snap-always min-w-full box-border ${e}`,role:"listitem",...r,children:t}))),I=e=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e}px`}),k=i((({className:e="",children:t,activeIndex:r,onScroll:i,gap:a=14,padding:l=16})=>n("div",{className:`overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...I(l),gap:`${a}px`},role:"list",onScroll:i,children:t?.length?t?.map(((e,t)=>n(w,{style:I(l/4),"aria-current":Boolean(r===t),children:e},String(t)))):n(w,{children:t})}))),C=i((({className:e,context:t,children:i,gap:a=14,padding:l=16,showDots:o=!0,onSlideChange:c})=>{const[s,d]=t.useState(0),[m,h]=t.useState(0),u={activeIndex:s,indexFraction:m,showDots:o,children:i};return r("div",{className:e,children:[n(k,{gap:a,padding:l,activeIndex:s,onScroll:e=>{const{scrollLeft:t,clientWidth:n,childElementCount:r,scrollWidth:i,children:o}=e.currentTarget,m=o[0].offsetWidth-l/2,u=(({gap:e,padding:t,clientWidth:n,scrollWidth:r,childElementCount:i,itemWidth:a})=>{const l=r-n;if(2===i)return[[0,l],[l,r]];const o=a+e,c=n-e-t,s=i-2,d=new Array(i).fill(0).map(((e,t)=>0===t||t===s?[t>0?l-c:0,t>0?l:c]:[(t-1)*o+c,t*o+c]));return d[i-1]=[l,r],d})({gap:a,padding:l,clientWidth:n,scrollWidth:i,childElementCount:r,itemWidth:m}),{index:p,fraction:x}=((e,t)=>{const n=t.findIndex((([t,n])=>t<=e&&e<n));if(n<0)return{index:n,fraction:0};const[r,i]=t[n];return{index:n,fraction:(e-r)/(i-r)}})(t,u);p!==s&&c&&c(),d(p),h(x)},children:i}),n(N,{...u})]})})),$=i((({className:e,iconClassName:t,textClassName:i,suffixClassName:a,doc:l,icon:o})=>{const{text:c,fileSize:s,...d}=l;return r("a",{className:e,role:"link",...d,children:[o?n(u,{className:t,image:o,width:"24px",height:"24px",asSVG:!0}):null,c?r("span",{className:i,children:[c,n("span",{className:a,children:d?.href&&S(T(d.href),s)})]}):null]})})),S=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),T=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},D=i((({className:e="",doc:t,icon:r})=>n($,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:r}))),R=i((({context:e,hasBorder:t=!0,documents:r,icon:i})=>n(C,{context:e,className:"text-m-sm text-primary-main",children:r?.length?r.map(((e,r)=>n(D,{className:t?"rounded-md border-main-stroke border border-solid p-4":"",doc:e,icon:i},String(r)))):null}))),A=i((({hasBorder:e=!0,documents:t,icon:r})=>n("div",{className:"text-m-sm text-primary-main flex flex-col "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,i)=>n("div",{role:"listitem",children:n(D,{className:e?"rounded-md border-main-stroke border border-solid p-4":"",doc:t,icon:r})},String(i)))):null}))),L=i((({className:e="",context:t,title:i,subtitle:a,icon:l={icon:"DocIconMonoColor"},documents:c,orientation:s="vertical",hasBorder:d=!0})=>r("section",{className:`font-sans text-primary-text py-6 px-4 bg-white overflow-x-hidden ${e}`,children:[i?n(o,{headingType:"h2",className:"text-center "+(a?"mb-2":"mb-5"),title:i}):null,a?n("h3",{className:"mt-0 font-normal mb-5 text-center text-m-md",children:a}):null,"vertical"===s?n(A,{hasBorder:d,documents:c,icon:l}):n(R,{context:t,hasBorder:d,documents:c,icon:l})]}))),P=e=>e?.includes("//"),V=e=>(e||"").replace(/\/?\?.*/,""),W=e=>{if(!e||!P(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t};var M=Object.freeze({__proto__:null,isURL:P,withoutQuery:V,getOrigin:W,getHash:e=>{if(!e||!P(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0}});const j="/mobile",B=(e,t)=>{if(!e)return e;const n=W(t?.href);return n?e.replace(n,"")||"/":e},G=e=>e;function _({router:e,handlerDecorator:t=G},n){const r=((e,t)=>{if(!e)return e;const n=B(e,t)||"",r=t?.pathname.startsWith(j);return r&&!P(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:r,"aria-label":n.text,onClick:t((t=>{const i=r&&!P(r),a=!n.target||"_self"===n.target;i&&a&&(t.preventDefault(),e.push(r))}),n)}}const E=i((e=>{const{text:t,aboveText:i,appendLeft:a}=e;return r("div",{className:O(e),children:[a||null,F(e)?r("div",{children:[n("div",{className:"text-m-2xs font-light text-left",children:i}),n("div",{className:"text-button text-left",children:t})]}):null]})})),O=e=>{const{version:t,aboveText:n,rounded:r}=e;if("link"===t)return"";const i="px-8 gap-2 "+(n?"py-2":"py-[18px]");return["flex items-center justify-center",F(e)?i:"h-12 w-12",r?"rounded-full":""].join(" ")},F=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),H={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",link:"text-primary-main"},U={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},z="w-full text-center font-sans select-none",Z=i((({className:e,text:t,aboveText:r,appendLeft:i,href:a,target:l,onClick:o,children:c,disabled:s,rounded:d,version:m="primary",ariaLabel:h,...u})=>{const p=c??n(E,{text:t,aboveText:r,appendLeft:i,rounded:d,version:m});return s?n("div",{role:"button","aria-disabled":"true","aria-label":h,tabIndex:"-1",className:`inline-block ${z} ${U[m]||""} ${d?"rounded-full":"rounded-md"} ${e||""}`,children:p}):n("a",{className:`${z} inline-block cursor-pointer no-underline ${H[m]||""} ${d?"rounded-full":"rounded-md"} ${e||""}`,href:a,target:l,onClick:o,"aria-label":h,role:a?"link":"button",...u,children:p})})),J=i((({context:e,className:t="",buttons:r})=>{const{handlerDecorator:i}=e,a=e.useRouter();return r?.length?n("div",{className:`${t}`,children:r.map(((e,t)=>function({icon:e,...t},r){if(!t?.text)return;return n(Z,e?{appendLeft:n(u,{image:e,width:"24",height:"24",asSVG:!0}),...t}:{...t},String(r))}(_({router:a,handlerDecorator:i},e),t)))}):null}));const q=i((e=>{const{className:t="",description:r}=e;return n("div",{className:`font-normal text-base ${t}`,children:r})})),K={primary:"rounded-full inline-block mr-3 mt-2",secondary:"rounded-full inline-block mr-3 mt-2",gray:"rounded-full inline-block mr-3 mt-2",tile:"rounded-full inline-block mr-4 mt-3","tile-white":"rounded-full inline-block mr-4 mt-3"},Q={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text",tile:"bg-black","tile-white":"bg-white"},Y=i((({className:e="",isDotted:t=!0,children:i,version:a="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t&&n("div",{className:X(a)}),n("span",{children:i})]}))),X=e=>`${K[e]} ${Q[e]} ${{primary:"w-2 h-2 min-w-2 min-h-2",secondary:"w-2 h-2 min-w-2 min-h-2",gray:"w-1.5 h-1.5 min-w-1.5 min-h-1.5",tile:"w-[7px] h-[7px] min-w-[7px] min-h-[7px]","tile-white":"w-[7px] h-[7px] min-w-[7px] min-h-[7px]"}[e]}`,ee={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text",tile:"text-primary-text","tile-white":"text-white"},te=i((e=>{const{className:t="",itemClassName:r,isDotted:i,items:a,version:l="primary"}=e;return n("section",{className:`${ee[l]} ${t}`,role:"list",children:a?.length?a.map(((e,t)=>n(Y,{className:r,isDotted:i,version:l,children:e},String(t)))):null})})),ne=i((({className:e="",title:t,children:i,buttons:a,image:l,anchor:o=null})=>r("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,id:o,children:[t,r("div",{className:"flex grow w-full justify-between",children:[r("div",{className:"flex flex-col justify-between w-full",children:[n("div",{children:i}),a?n("div",{children:a}):null]}),l]})]}))),re={primary:"text-primary-text",secondary:"text-white"},ie={primary:"text-secondary-text",secondary:"text-white"};function ae(e){let t="text-primary-main";return"secondary"===e&&(t="text-black"),`w-6 h-6 rounded-full box-border ${t}`}const le=i((({className:e="",context:t,title:i,headingType:a="h2",description:l,benefits:c,benefitsVersion:s="normal",buttons:d,image:m,items:h,version:p="primary",isDotted:x=!0,label:g})=>r("div",{className:`w-full ${e}`,children:[r("div",{children:[g?se(g,p):null,r(ne,{context:t,title:i&&n(o,{headingType:a,title:i,className:"whitespace-pre-wrap max-w-[600px]"}),buttons:d?.length?n(J,{context:t,buttons:d,className:"flex flex-col mt-5 gap-2.5"}):null,children:[l?n(q,{className:"mt-3 text-m-md",description:l}):null,c?.filter((e=>e.label))?.length?n("div",{className:"mt-3",children:c.map(((e,t)=>function({benefit:e,version:t="primary"},i){const a="secondary"===t;return r("div",{className:"flex gap-3 items-center mb-2.5 last:mb-0",children:[e.icon?n(u,{className:ae(t),image:{...e?.icon,iconVersion:a?"white":"normal"},width:"24",height:"24",asSVG:!0}):null,n("div",{className:`font-medium text-m-title-xs m-0 ${re[t]}`,children:e.label}),e.description&&n("div",{className:`font-normal text-m-sm ${ie[t]}`,children:e.description})]},String(i))}({benefit:e,version:p,benefitsVersion:s},t)))}):null,h?.length?n(te,{className:"mt-3 text-m-md",items:h,version:p,isDotted:x}):null]})]}),oe(m)]})));function oe(e){return e?.src?n(u,{imageClassName:"mt-5 mx-auto block",image:{className:"block",...e}}):null}const ce={primary:"text-primary-main border-secondary-hover",secondary:"text-white/80"},se=(e,t)=>n("div",{className:`m-xs px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid w-fit ${ce[t]}`,children:e}),de={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},me=i((e=>{const{className:t="",version:r="primary"}=e;return n("section",{className:`font-sans bg-white px-4 py-6 ${de[r]} ${t}`,children:n(le,{...e})})})),he={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"}},ue=i((({title:e,description:t,blockVersion:i="primary",iconVersion:a,image:l,className:o="",items:c,isDotted:s=!0})=>{const d=he[i];return r("section",{className:`font-sans px-4 py-[18px] flex flex-col ${d.background} ${o}`,children:["small"===a?pe(d.icon):null,"big"===a?xe(l):null,r("div",{className:"py-0.5",children:[e?n("div",{className:`font-medium text-base mb-1 ${d.title}`,children:e}):null,t?n("div",{className:`text-sm ${d.description}`,children:t}):null,c?.length?n(te,{className:"mt-1 text-m-md",items:c,isDotted:s,version:"secondary"===i?"secondary":"gray"}):null]})]})}));function pe(e){return n("div",{className:"mb-3",children:n("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function xe(e){return e?.src?n(u,{className:"pb-3 mr-auto",image:e}):null}const ge={primary:"bg-white",secondary:"bg-primary-main text-white"},be=i((({context:e,title:t,description:i,cards:a=[],className:l,orientation:c="horizontal"})=>r("section",{className:`relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${l}`,children:[r("div",{className:"flex flex-col items-center mb-5",children:[t?n(o,{headingType:"h3",className:"text-center "+(i?"mb-2":"mb-5"),title:t}):null,i?n("div",{className:"font-normal text-m-md max-w-[600px] text-center mb-5",children:i}):null]}),fe(c,a,e)]})));function fe(e,t,r){return"horizontal"===e?n(C,{context:r,children:t?.map(ye)}):n("div",{className:"grid gap-[14px]",children:t?.map(ye)})}function ye(e,t){return r("div",{className:`h-full justify-between box-border horizontal-list-item border-solid border rounded-md border-main-stroke p-4 flex flex-col\n ${ge[e.version??"primary"]}`,children:[r("div",{children:[e.image?.src?n("div",{className:"flex justify-center",children:n(u,{className:"mb-3.5",image:e.image})}):null,e.title?n("h3",{className:"font-medium text-m-title-xs m-0",children:e.title}):null,e.description?Ne(e):null,e.items?.length?ve(e.items,e.version):null]}),e?.button?.text?(i=e.button,n(Z,{className:"mt-3",appendLeft:i?.icon&&n(u,{image:i?.icon,width:"24px",height:"24px",asSVG:!0}),...i})):null]},t);var i}function Ne(e){return n("div",{className:"text-secondary-text mt-1 text-m-sm "+("secondary"===e.version?"text-white opacity-80":""),children:e.description})}function ve(e,t="primary"){return n("section",{className:"mt-3",children:e.map(((e,i)=>r("div",{children:[n("span",{className:"text-m-md font-medium",children:e.title}),n("span",{className:"text-m-sm pl-2 "+("primary"===t?"text-secondary-text":""),children:e.text})]},String(i))))})}const we=i((({className:e="",documents:t,anchor:r=null})=>n("section",{className:`font-sans bg-white mt-[10px] ${e}`,id:r,children:n("ul",{className:"flex flex-col text-sm text-secondary-text p-0",children:t?.length?Ie(t):null})}))),Ie=e=>e.map(((e,t)=>{const{text:r,...i}=e;return n("li",{className:"mb-4 list-none",children:n("a",{className:"hover:text-primary-main",role:"link",...i,children:r||null})},`list_item_${String(t)}`)})),ke={Headline:y,LinkDocs:L,TextBlock:ue,ProductBlock:me,Gallery:be,LinkList:we},Ce=({blocks:e,context:t,className:n,columns:r})=>e?.length?e.map($e({context:t,className:n,columns:r})):null,$e=({context:e,columns:t,className:r})=>(i,a)=>{const l=i?.blockListType;if(!l||!(l in ke))return null;return n("div",{className:`${r} ${2===t?"w-1/2":""}`,children:n(ke[l],{context:e,...i,className:"!p-0"})},`block_${a}`)},Se=i((({blocks:e,context:t})=>n("div",{className:"transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0",children:Ce({context:t,className:"mb-5 last:mb-0 first:mt-2",blocks:e})}))),Te=i((({label:e,labelIcon:t,blocks:i,bordered:a,context:l})=>{const{hasContent:o,icon:c,handleToggle:s}=(({context:e,blocks:t,initialState:n=!1})=>{const[r,i]=e.useState(n),a=t?.length;return{isActive:r,hasContent:a,icon:r?"MinusIcon":"PlusIcon",handleToggle:e=>{if(!a)return;i(!r);const t=(({currentTarget:e})=>e.nextSibling)(e);t.style.maxHeight=t.style.maxHeight?null:`${t.scrollHeight}px`}}})({context:l,blocks:i});return r("li",{className:`${De(a)} border-solid border-main-divider`,children:[r("button",{className:`border-none bg-transparent flex justify-between text-left w-full font-sans text-primary-text\n ${a?"":"py-[14px] px-0"}\n ${o?"group cursor-pointer":""}`,onClick:s,children:[r("span",{className:"text-m-title-xs pr-2.5 font-medium flex "+(o?"group-hover:text-primary-main":""),children:[t?n(u,{image:t,width:"24",height:"24",asSVG:!0,className:"mr-3"}):null,e]}),o?n(u,{image:c,width:"24",height:"24",asSVG:!0}):null]}),o?n(Se,{blocks:i,context:l}):null]})}));function De(e){return e?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0"}const Re=i((({title:e,description:t,accordionItems:i,context:a,className:l="",bordered:c})=>r("section",{className:`py-6 px-4 font-sans bg-white text-primary-text ${l}`,children:[e?n(o,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?n("div",{className:"mb-5 text-m-md text-center",children:t}):null,i?.length?n("ul",{className:"list-none m-0 p-0",children:i.map(((e,t)=>n(Te,{...e,context:a,bordered:c},`AccordionItem${t}`)))}):null]}))),Ae=i((({icon:e,image:t,title:i,subtitle:a,isFillGradient:l})=>r("div",{role:"columnheader",scope:"col",children:[e?n(u,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}):null,t?.src&&n("div",{className:"mb-3.5",children:n(u,{image:t})}),i&&n(o,{headingType:"h4",className:""+(l?"text-white":""),title:i}),a&&n("div",{className:"text-m-sm mb-3.5 "+(l?"text-white":"text-secondary-text/80"),children:a})]}))),Le=i((({cell:e,rowHeader:t,isFillGradient:r=!1})=>n("div",{className:"box-border flex flex-col",role:"cell",children:n("div",{className:"h-full border-main-divider border border-t-0 border-x-0",children:e.map(Pe(r,t))})}))),Pe=(e,t)=>({label:i,description:a},l)=>r("div",{className:"flex justify-between text-m-sm py-3.5",children:[n("div",{className:""+(e?"text-white/80":"text-secondary-text"),children:t}),r("div",{className:"basis-1/2",children:[i&&n("div",{className:"text-right "+(e?"text-white":""),children:i}),a&&n("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:a})]})]},String(l)),Ve=i((({header:e,columnData:t,visibleRowLength:i=0,isFillGradient:a,showRow:l,onToggleColumn:o})=>{const c=t?.slice(0,l?t.length:i),s=a?"secondary":"primary";return r("div",{className:`border border-main-stroke rounded-md p-4 mb-3.5 ${a?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""}`,role:"row",children:[n(Ae,{...e,isFillGradient:a}),c?.length?c.map((({rowHeader:e,cell:t},r)=>n(Le,{cell:t,rowHeader:e,isFillGradient:a},String(r)))):null,l&&We({header:e,buttonVersion:s}),Me({onToggleColumn:o,isFillGradient:a,showRow:l})]})})),We=({header:e,buttonVersion:t})=>n(Z,{href:e.link.href,target:e.link.target,version:t,className:"font-medium text-m-sm mt-4 py-[11px]",children:e.link.text}),Me=({onToggleColumn:e,isFillGradient:t,showRow:r})=>n("div",{className:"mt-5",role:"cell",children:n("a",{role:"link",onClick:e,className:"font-medium text-m-sm cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:r?"Скрыть":"Показать описание"})}),je=i((({className:e,context:t,title:i,rowHeaders:a,columns:l,visibleRowLength:c=0,isColoredFirstColumn:s=!1,orientation:d="vertical"})=>{const m=l?.map((({data:e,header:t})=>({header:t,column:e?.map(((e,t)=>({cell:e,rowHeader:a?.[t]?.title})))})))||[],[h,u]=t.useState(new Array(l?.length).fill(!c));return r("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${e||""}`,children:[i&&n(o,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:i}),Be({tableData:m,context:t,visibleRowLength:c,isColoredFirstColumn:s,columnsViewState:h,handleToggleColumn:e=>{h[e]=!h[e],u([...h])},orientation:d,setColumnsViewState:u})]})})),Be=({context:e,tableData:t,visibleRowLength:r,isColoredFirstColumn:i,columnsViewState:a,handleToggleColumn:l,orientation:o="horizontal",setColumnsViewState:c})=>n("div",{role:"table",children:t?.length?Ge({orientation:o,context:e,columnsViewState:a,setColumnsViewState:c,tableData:t,visibleRowLength:r,isColoredFirstColumn:i,handleToggleColumn:l}):null}),Ge=({orientation:e,context:t,columnsViewState:r,setColumnsViewState:i,tableData:a,visibleRowLength:l,isColoredFirstColumn:o,handleToggleColumn:c})=>"horizontal"===e?n(C,{context:t,onSlideChange:Ee(r,i),children:a.map(_e({context:t,visibleRowLength:l,isColoredFirstColumn:o,columnsViewState:r,handleToggleColumn:c}))}):a.map(_e({context:t,visibleRowLength:l,isColoredFirstColumn:o,columnsViewState:r,handleToggleColumn:c})),_e=({context:e,visibleRowLength:t,isColoredFirstColumn:r,columnsViewState:i,handleToggleColumn:a})=>(l,o)=>n(Ve,{context:e,visibleRowLength:t,showRow:i[o],header:l.header,columnData:l.column,isFillGradient:0===o&&r,onToggleColumn:()=>a(o)},String(o)),Ee=(e,t)=>()=>{t(new Array(e.length).fill(!1))};async function Oe(){try{const e=await fetch(Fe);return await e.json()}catch(e){console.error(e)}}const Fe="/api/v1/exchangerates.json",He=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function Ue(e=""){const t=He(e);return t<=4?"h4":t<=8?"h3":"h2"}const ze=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),Ze=e=>e?ze.format(e):"",Je="font-light text-left font-normal text-sm text-secondary-text",qe={USD:"DollarIcon",EUR:"EuroIcon"},Ke=i((({className:e,exchangeCurrencyItems:t})=>r("table",{className:`h-fit w-fit ${e}`,children:[n("thead",{children:r("tr",{children:[n("th",{className:Je,children:"Валюта"}),n("th",{className:`${Je} pl-11`,children:"Купить"}),n("th",{className:`${Je} pl-11`,children:"Продать"})]})}),n("tbody",{children:t.map((e=>Qe(e)))})]}))),Qe=e=>{const t=e?.currency?.currency;return r("tr",{className:"pb-1",children:[n("td",{className:"pt-4",children:r("div",{className:"flex items-center",children:[t?n(u,{image:{icon:qe[t]},width:"24",height:"24"}):null,n("span",{className:"text-m-title-md ml-2",children:t})]})}),n("td",{className:"pt-4 pl-11 m-title-md font-light",children:Ze(e.buyExchangeRate)}),n("td",{className:"pt-4 pl-11 m-title-md font-light",children:Ze(e.saleExchangeRate)})]},t)},Ye=i((({className:e="",address:t,distance:i})=>r("div",{className:`flex text-sm ${e}`,children:[n(u,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),r("div",{className:"ml-3 font-light",children:[t?n("p",{className:"m-0 mb-[3px]",children:t}):null,i?r("p",{className:"text-secondary-text m-0",children:["Курс указан для ближайшего офиса - ",i]}):null]})]}))),Xe=i((({className:e="",id:t,name:r,type:i="text",placeholder:a})=>n("input",{className:e,id:t,name:r||t,type:i,placeholder:a}))),et=i((({className:e="",id:t,name:r,children:i})=>n("select",{className:e,id:t,name:r||t,children:i}))),tt=i((({className:e="",value:t,selected:r,children:i})=>n("option",{className:e,value:`${t}`,selected:r,children:i}))),nt=i((({codes:e,className:t=""})=>r("div",{className:`grid gap-3.5 ${t}`,children:[rt("Хочу продать",e),rt("Получу",e,"USD"),n(Z,{className:"box-border mt-3.5 py-3 h-12 w-full",version:"primary",href:"#",children:"Купить валюту"})]})));function rt(e,t,i){return r("div",{className:"relative flex items-center",children:[n(Xe,{className:"h-10 border pl-4 pt-[7px] pb-[7px] rounded-md text-m-sm w-full appearance-none -mr-12",type:"number",placeholder:`${e}`}),t.length?n(et,{className:"h-9 -translate-x-4",children:t.map(((e,t)=>n(tt,{value:e,selected:e===i,children:e},String(t))))}):null]})}const it=["USD","EUR"],at=["RUB","USD","EUR"],lt=[{buyExchangeRate:90.6,saleExchangeRate:92.8,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:73.75,saleExchangeRate:75.95,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],ot={address:"Москва, ул.Ленина д.28",distance:"6км"},ct=i((({className:e="",context:t,title:i="Курсы обмена валют",anchor:a=null})=>{const l=function(e){const{data:t}=e(Fe,Oe);return t||{}}(t.useAsyncData)?.exchangeRate?.currencies?.filter((e=>-1!==it.indexOf(e?.currency?.currency||"")))||lt;return n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,id:a,children:n(ne,{context:t,title:n(o,{headingType:Ue(e),title:i,className:"whitespace-pre-wrap"}),children:r("div",{className:"flex",children:[r("div",{className:"mr-[43px] pt-4",children:[l?n(Ke,{className:"mb-[31px]",exchangeCurrencyItems:l}):null,n(Ye,{...ot})]}),l?.length?n(nt,{className:"grow",exchangeCurrencyItems:l,codes:at}):null]})})})})),st=i((({className:e,viewBox:t,fill:r="none",width:i,height:a,paths:l,...o})=>n("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:r,width:i,height:a,children:l.map((({d:e,fill:t,...r},i)=>n("path",{d:e,fill:t||"currentColor",...o,...r},i)))}))),dt=["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"],mt={"bg-white":"text-primary-main",transparent:"text-white"},ht={"bg-white":"text-black",transparent:"text-white"},ut=i((({className:e="",href:t,children:i,targetBlank:a,bgColor:l="bg-white",hideTitle:o})=>r("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"https://rshb.ru/",target:a?"_blank":"_self","aria-label":"Россельхозбанк",children:[n(st,{className:`${mt[l]} w-10 h-[38px]`,viewBox:"0 0 40 45",paths:dt.map((e=>({d:e})))}),!o&&n("span",{className:`${ht[l]} text-sm font-medium ml-2.5`,children:i||"Россельхозбанк"})]}))),pt=i((({className:e,title:t="Мобильное приложение",description:i,href:a="#"})=>n("div",{className:`col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light ${e||""}`,children:a?r("div",{className:"flex",children:[n("div",{className:"flex justify-center align-middle rounded-md bg-primary-main w-[50px] h-[50px]",children:n(ut,{className:"w-[33px]",bgColor:"transparent",hideTitle:!0})}),r("a",{href:a,target:"_blank",className:"flex flex-col justify-center pl-3 font-sans",children:[n("div",{className:"text-m-button font-medium mb-[3px]",children:t}),n("div",{className:"text-m-button text-secondary-text",children:i})]})]}):null}))),xt=i((({className:e="",items:t,hasButton:i,context:a})=>{const l=a.useRouter(),{handlerDecorator:o}=a;return r("div",{className:e,children:[t?.length?t.map(gt):null,i?n(Z,{version:"primary",className:"mb-6 w-full",..._({router:l,handlerDecorator:o},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),gt=(e,t)=>{const{type:i,text:a,description:l}=e;return r("div",{className:"mb-4",children:[n("div",{children:bt(i,a)}),n("div",{className:"mt-1 font-sans font-light text-sm text-secondary-text",children:l})]},String(t))},bt=(e,t="")=>{switch(e){case"tel":return n("a",{className:"font-sans text-xl text-primary-text no-underline",href:`tel:${ft(t)}`,children:t});case"email":return n("a",{className:"font-sans text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return n("span",{children:t})}},ft=e=>e.replaceAll(/\D/g,""),yt=i((({title:e,links:t,className:i="",context:a})=>{const l=a.useRouter(),{handlerDecorator:o}=a;return r("div",{className:i,children:[n("span",{className:"text-primary-text font-sans font-medium text-sm",children:e}),t?.length?n("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>n(Nt,{index:t,..._({router:l,handlerDecorator:o},e)},String(t))))}):null]})})),Nt=i((({className:e="",index:t,text:r,href:i,target:a,onClick:l})=>n("a",{className:`font-sans font-normal text-sm text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:i,target:a,onClick:l,children:r||`Документ ${t}`}))),vt=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм",width:"20px",height:"16px"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте",width:"24px",height:"12px"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники",width:"12px",height:"20px"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store",width:"20px",height:"22px"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play",width:"21px",height:"21px"}],wt=i((({href:e,version:t})=>{const{icon:r,width:i,height:a,label:l}=vt.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};if(!r)return null;return n("a",{className:` flex items-center justify-center border border-solid rounded-md border-main-divider no-underline outline-none w-14 h-14 box-border ${"secondary"===t?"text-white hover:text-primary-main hover:bg-white":"text-primary-main hover:text-white hover:bg-primary-main hover:border-primary-main"}`,href:e,"aria-label":l,target:"_blank",rel:"noopener noreferrer",children:r?n(u,{image:r,width:i,height:a,asSVG:!0,className:"block"}):null})})),It=i((({className:e,media:t,version:r,context:i})=>{const a=i.useRouter(),{handlerDecorator:l}=i;return n("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e||""}`,children:t?.map(((e,t)=>n(wt,{version:r,..._({router:a,handlerDecorator:l},e)},String(t))))})})),kt=i((({className:e,links:t,context:i})=>{const a=i.useRouter(),{handlerDecorator:l}=i;return r("div",{className:`${e||""}`,children:[n("div",{className:"py-6",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 flex-col justify-start items-start gap-2",children:t.map(((e,t)=>n(Ct,{index:t,..._({router:a,handlerDecorator:l},e)},String(t))))}):null]})})),Ct=i((({className:e,index:t,text:r,href:i,target:a,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:i,target:a,onClick:l,children:r||`Документ ${t}`})));function $t(e){const{data:t}=e(Tt(),St);return t||{}}async function St(){const e=await fetch(Tt());return await e.json()}function Tt(){return`/wcms-resources/${d.SITEMAP||"sitemap"}.json`}const Dt=i((({className:e,context:t})=>{const{term:i,setTerm:a}=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-[20px] h-[20px]",children:n(u,{image:"LoupeIcon",width:"24",height:"24"})}),!i&&n("label",{htmlFor:"search-bar-input",className:"font-sans font-normal text-sm text-secondary-text",children:"Поиск по сайту"})]}),n("input",{id:"search-bar-input",className:"h-12 pl-12 w-full peer placeholder-transparent font-sans font-normal text-base text-black border border-solid rounded box-border outline-none pr-[6%] border-main-divider focus:border-primary-text",value:i,onChange:e=>a(e.target.value),type:"text",name:"search-bar-input",placeholder:"some search"}),n("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:e=>{e.preventDefault(),a("")},children:n(u,{image:"CloseIcon",width:"24",height:"24"})})]})})),Rt=e=>e?.map((e=>({label:e.text||"",blocks:[{accordionBlockType:"LinkList",documents:e.items||[]}]}))),At=i((({className:e="",documents:t,relatedEnterprises:i,contacts:a,socialMedia:l,context:o,horizontalNavigationTitle:c})=>{const s=$t(o.useAsyncData),d=s?.dispositions;return r("footer",{className:`px-4 py-[26px] bg-white ${e}`,children:[n(xt,{className:"overflow-hidden",items:a,context:o,hasButton:!0}),n(Re,{context:o,className:"!p-0 mb-4",accordionItems:Rt(s.topItems)}),n("div",{children:d?.map(Lt)}),n(pt,{context:o,title:"Мобильное приложение",description:"Загрузить для IOS и Android"}),n(Dt,{context:o,className:"grow"}),n(It,{className:"pb-4",media:l,context:o}),n(yt,{title:c,links:i,context:o}),n(kt,{links:t,context:o})]})})),Lt=(e,t)=>{const{icon:i,href:a,text:l}=e;return r(Z,{version:"link",href:a,className:"flex text-sm mb-4",children:[i?n(u,{className:"pr-1",image:i,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-2.5 font-medium text-primary-text",children:l})]},`footer-${t}`)},Pt=(e,t,n=((e,t)=>t.startsWith(e)))=>n(V(e),(e=>(e||"").replace(j,""))(V(P(e)?t.href:t.pathname))),Vt=e=>t=>Pt(t.href,e),Wt=e=>t=>t.items?.some(Vt(e))||Pt(t.href,e)||((e,t)=>W(e)===W(t.href))(t.href,e),Mt=e=>t=>e?.href===t?.href,jt=(e,t)=>{return(r=e,i=t,(r||[]).map((e=>i?.find(Mt(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(Mt(e))))));var n,r,i},Bt="absolute left-0 -bottom-3 w-full h-[2px]",Gt=i((({className:e,text:t,href:i,target:a,active:l,onClick:o,children:c,bgColor:s="bg-white"})=>r("a",{className:`relative inline-block bg-transparent text-center no-underline ${e||""}`,href:i,target:a,onClick:o,children:[n("span",{className:_t(s,l),children:t||c}),l?n("div",{className:Et(s,l)}):null]}))),_t=(e,t)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-secondary-text hover:text-primary-main"),`${n} font-sans font-normal text-sm`},Et=(e,t)=>t?`${"bg-white"===e?"bg-primary-main":e} ${Bt}`:Bt,Ot=i((({context:e,burgerSubMenu:t,onClick:i,defaultLocation:a="",children:l})=>{const[o,c]=e.useGeolocation(a);return r("div",{className:"absolute top-0 left-0 w-full h-full bg-white p-4 box-border z-20",children:[n("button",{className:"absolute top-4 right-4 border-none bg-transparent cursor-pointer",onClick:i,children:n(u,{image:"CloseIcon",width:"24",height:"24",asSVG:!0})}),r("button",{onClick:c,className:"flex items-center text-sm text-secondary-text p-0 mb-4 bg-transparent cursor-pointer",children:[n(u,{image:"GeolocationIcon",width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),o]}),l,n("div",{className:"mb-7",children:t?.map(Ft)}),n(Dt,{context:e,className:"grow"})]})})),Ft=(e,t)=>{const{icon:i,href:a,text:l}=e;return r("a",{href:a,className:"flex text-sm mb-4 hover:text-primary-main",children:[i?n(u,{className:"text-primary-main pr-1",image:i,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-0.5 font-medium",children:l})]},`headerSubMenu-${t}`)},Ht=i((({onClick:e,bgColor:t})=>r("div",{className:"flex items-center justify-between border-0 border-b border-main-divider h-[50px]",children:[r("div",{className:"flex items-center",children:[n("button",{className:"pl-0 pr-4 border-0 bg-transparent cursor-pointer",onClick:e,"aria-label":"Открыть меню",children:n(u,{image:"bg-white"===t?"BurgerIcon":"BurgerIconWhite",className:"text-primary-text",width:"24",height:"24",asSVG:!0})}),n(ut,{bgColor:t})]}),n("button",{className:("bg-white"===t?"text-primary-main":"text-white")+" text-sm border-0 bg-transparent cursor-pointer",children:"Войти"})]}))),Ut=i((({className:e="",defaultLocation:t,bgColor:i="bg-white",context:a,topItems:l})=>{const o=a.useRouter(),c=$t(a.useAsyncData),s=c?.dispositions,{handlerDecorator:d}=a,m=jt(c.topItems,l).find(Wt(o))?.items,h=(e=>(t=[])=>{const n=t?.filter(Vt(e));var r;return n?.length?(r=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>r(e)>r(t)?e:t)))(n):null})(o)(m),[u,p]=a.useState(!1),x=()=>p(!u);return r("header",{className:`${i} ${e}`,children:[r("div",{className:"container px-4 py-0 box-border",children:[n(Ht,{onClick:x,bgColor:i}),n("nav",{className:"flex items-center m-0 p-0 overflow-y-hidden w-full h-[50px]",children:n("div",{className:"flex no-scrollbar horizontal-list h-full items-center",children:m?.map(((e,t)=>zt({..._({router:o,handlerDecorator:d},e),active:e===h,bgColor:i},t)))})})]}),u?n(Ot,{context:a,onClick:x,burgerSubMenu:s,defaultLocation:t,children:n(Re,{context:a,accordionItems:Rt(c.topItems),className:"!p-0 mb-4"})}):null]})})),zt=(e,t)=>n(Gt,{className:"mr-8 whitespace-nowrap text-sm",...e},String(t));function Zt(e=""){const t=He(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function Jt(e=""){const t=He(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const qt=i((({className:e,context:t,title:i,description:a="Блок в разработке...",anchor:l=null})=>n("section",{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${Jt(e)} ${Zt(e)} `,id:l,children:r(ne,{context:t,title:i?n(o,{headingType:Ue(e),title:i,className:"whitespace-pre-wrap max-w-[600px]"}):null,children:[a?n(q,{className:"mt-4 max-w-[600px]",description:a}):null,n("figure",{className:"m-0 min-w-[600px]",children:Kt()})]})}))),Kt=(e=3)=>Yt(100,e).map((e=>Math.floor(e))).map(Qt),Qt=(e=100,t)=>n("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Yt=(e,t)=>[e].concat(t>0?Yt(e/1.618,t-1):[]),Xt={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},en=i((({block:e,headingType:t,context:r,className:i=""})=>n("section",{className:`flex grow-0 shrink-0 basis-full px-4 pt-6 ${Xt[e?.version??"primary"]} ${i}`,children:n("div",{className:"flex grow",children:n(le,{context:r,headingType:t||"h2",...e})})}))),tn=i((({className:e,context:t,slides:r=[]})=>{const i=r.map((e=>e.productBlock));return n("section",{className:`font-sans bg-white overflow-hidden w-100 pb-6 ${e||""}`,children:n(C,{context:t,children:i.map(((e,r)=>n(en,{block:e,context:t},String(r))))})})})),nn={normal:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",small:"h-[50px] w-[50px] min-w-[50px] min-h-[50px]"},rn={normal:"min-h-[70px]",small:"min-h-[50px]"},an={primary:{background:"bg-white",title:"text-primary-text",description:"text-secondary-text",iconBackground:"bg-secondary-light",iconConnector:"bg-secondary-light"},secondary:{background:"bg-primary-main",title:"text-white",description:"text-white/80",iconBackground:"bg-white/30",iconConnector:"bg-white"}},ln=e=>an[e],on=i((({className:e,title:t,description:i,steps:a,size:l="normal",version:c="primary"})=>{const s=ln(c);return r("section",{className:`box-border font-sans bg-white px-4 py-6 flex flex-col\n ${s.background} ${s.title} ${e||""}`,children:[t&&n(o,{headingType:"h3",className:`text-center ${s.title}`,title:t}),i&&n("p",{className:`text-m-md text-center ${s.description} ${t&&"mt-2"}`,children:i}),a?.length?n("div",{className:"box-border py-0.5 mb-0.5 mt-5",children:n("div",{className:"flex flex-col justify-between gap-x-[101px]",children:a.map(((e,t)=>cn({step:e,size:l,i:t,length:a.length,version:c})))})}):null]})})),cn=e=>{const{step:t,size:i,i:a,length:l,version:o}=e,c=l-1===a,s="normal"===i?"ml-[34px]":"ml-[24px]",d=ln(o);return n("div",{children:r("div",{className:"flex flex-row text-center relative",children:[r("div",{className:"overflow-hidden",children:[sn(e),!c&&n("div",{className:`min-h-8 h-full w-[2px] ${d.iconConnector} ${s}`})]}),r("div",{className:`flex flex-col justify-center h-fit ${rn[i]}`,children:[t.label&&n("div",{className:"font-medium text-m-title-xs m-0 text-left",children:t.label}),t.description&&n("div",{className:`font-normal text-sm ${d.description} text-left ${t.label?"mt-1":""}`,children:t.description})]})]},String(a))},String(a))},sn=e=>{const{step:t,size:r,i:i,version:a}=e,l=ln(a),o="normal"===r?"38":"27",c="normal"===r?"text-m-title":"text-m-title-xs";return n("div",{className:`${nn[r]} ${l.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`,children:n("span",{className:`font-medium flex self-center ${l.title} ${c}`,children:t.icon?.icon&&n(u,{image:t.icon,width:o,height:o,asSVG:!0})||i+1})})},dn=i((({title:e,icon:t})=>r("div",{className:"flex gap-2.5 mb-2",children:[e?n(o,{headingType:"h3",className:"font-medium",title:e}):null,t?n(u,{className:"ml-auto max-w-6 max-h-6",image:t,width:"24px",height:"24px"}):null]}))),mn=e=>e?.alt||e?.title||s[e?.icon?e.icon:""],hn=i((({header:e,data:t})=>r("div",{className:"rounded-md border-main-stroke h-full box-border border p-4",children:[n(dn,{...e}),t?.length?t.map(un):null]}))),un=({label:e,description:t,list:i,image:a,buttons:l},o)=>r("div",{children:[o>0&&n("div",{className:"border-main-divider border border-solid border-t-0 border-x-0 my-2"}),e?n("div",{className:"text-m-sm m-0",children:e}):null,t?n("div",{className:"text-m-sm text-secondary-text mt-[3px]",children:t}):null,i?.items?.length?pn(i):null,a&&n(u,{image:{...a,className:"m-0"}}),l?.length?xn(l):null]},String(o)),pn=e=>n(te,{className:"flex flex-col justify-between items-start text-m-sm",version:"gray",items:e.items,isDotted:e.isDotted??!0}),xn=e=>n("div",{children:e.map((({icon:e,rounded:t,...r},i)=>n(Z,{className:`mt-3 ${i>0&&t?"ml-2.5":""} ${e?"w-12 h-12":""}`,ariaLabel:mn(e),rounded:t,appendLeft:e?n(u,{image:e,width:"24px",height:"24px",asSVG:!0}):null,...r,"aria-label":e},String(i))))}),gn=i((({tiles:e})=>n("div",{className:"flex flex-col gap-3.5",children:e.map(((e,t)=>n(hn,{...e},String(t))))}))),bn=i((({tiles:e,context:t})=>n(C,{context:t,children:e.map(((e,t)=>n(hn,{...e},String(t))))}))),fn=i((({className:e,context:t,title:i,description:a,columns:l,rowHeaders:c,orientation:s="vertical"})=>{const d=Nn(l),m=vn(c,d);return r("section",{className:`px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[i?n(o,{headingType:"h2",className:"text-center "+(a?"mb-2":"mb-5"),title:i}):null,a?n("div",{className:"mb-5 text-center text-m-md",children:a}):null,m?.length?yn(s,m,t):null]})}));function yn(e,t,r){return"vertical"===e?n(gn,{tiles:t}):n(bn,{context:r,tiles:t})}const Nn=e=>e?.[0].data?e[0].data:[],vn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),wn={Accordion:Re,ComparisonTable:je,ExchangeRateTile:ct,Footer:At,Gallery:be,Header:Ut,Headline:y,LinkDocs:L,LinkList:we,MobileAppTile:pt,ProductBlock:me,ProductGallery:tn,StepsBlock:on,TariffsTable:fn,TextBlock:ue,Placeholder:qt},In=i((({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:kn()}))),kn=()=>{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"})]})},Cn=i((({className:e,context:t,anchor:i=null})=>{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||""}`,id:i,children:[n(In,{onClick:a.like,ariaLabel:"Поставить отметку «лайк»"}),n(In,{onClick:a.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),n("span",{className:"select-none",children:a.likeCount})]})})),$n=!("undefined"==typeof window||!window.document||!window.document.createElement),Sn=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),Tn=i((({className:e="",context:t,blocksRegistry:i,data:{style:a,blocks:l,slots:o={},likeControl:c,colorPalette:s="pc"},blockDecorator:d=Sn})=>{const{header:m}=o,h=t.useRouter();return $n&&globalThis.addEventListener("load",(()=>{const e=globalThis.document.querySelectorAll("section[id]");globalThis.document.addEventListener("scroll",(()=>((e,t)=>{t?.forEach((t=>{const n=globalThis.location?.hash;if(n===`#${t?.id}`)return;const r=t?.getBoundingClientRect();r&&r.top>0&&r.top<150&&e.replace(`#${t?.id}`)}))})(h,e)))})),r("section",{className:`relative ${Rn(a)} ${e}`,"data-theme":s,children:[m?.blocks?.length?n("div",{className:`${Rn(m?.style)}`,children:m.blocks.map(((e,n)=>Dn({block:e,blockDecorator:d,blocksRegistry:i,context:t},n)))}):null,l?.length?n("div",{className:"container grid grid-cols-12 gap-1",children:l.map(((e,n)=>Dn({block:e,blockDecorator:d,blocksRegistry:i,context:t},n)))}):null,c&&n("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:n(Cn,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t},"LikeControl")})]})}));function Dn({block:e,blockDecorator:t,blocksRegistry:r,context:i},a){const{type:l}=e;l&&l in r||console.warn(`No block with "${l}" is registered`);const o=r[l||"Placeholder"]||qt;return t({blockClassName:`scroll-mt-12 ${Rn(e.style)}`,block:e,render:e=>{const{version:t,content:r,anchor:c}=e.block;return n(o,{className:e.blockClassName,version:t,context:i,anchor:c,...r},`${l}-${a}`)}},`block-${a}`)}function Rn(e){return e?e.join(" "):""}const An=i((({HeadComponent:e,data:t,children:i})=>{const{title:a,main:l,og:o,twitter:c,jsonLd:s}=t,{description:d,keywords:m,canonical:h,robots:u}=l||{};return r(e,{children:[n("title",{children:a}),n("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),d&&n("meta",{name:"description",content:d}),m&&n("meta",{name:"keywords",content:m.join(",")}),u&&n("meta",{name:"robots",content:u.join(",")}),Ln(o),Pn(c),h&&n("link",{rel:"canonical",href:h}),s&&n("script",{type:"application/ld+json",children:s}),i]})}));function Ln(e){return e?Object.entries(e).map((([e,t])=>n("meta",{property:`og:${e}`,content:t},e))):null}function Pn(e){return e?Object.entries(e).map((([e,t])=>n("meta",{name:`twitter:${e}`,content:t},e))):null}function Vn(e){const{mobile:t,...n}=e;return t?{...n,...t,content:{...n.content,...t.content}}:e}function Wn(e){return e?.filter((e=>(e?.type||e?.mobile?.type||"")in wn&&!e.mobile?.hidden)).map(Vn)}e.Blocks=wn,e.Button=Z,e.ContentPage=Tn,e.ContentPageHead=An,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.Header=Ut,e.Icon=m,e.Image=u,e.LikeAPI=function(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(a)||"");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(a,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:i}=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:i},body:JSON.stringify({node_ids:r})}),{likes:a}=await n.json();return a||[]}catch(e){return console.error(e),[]}},like:async function(r){if(!r)return 0;const{token:i,name:a}=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:i,UserID:a},body:JSON.stringify({node_id:r,user_name:a})}),{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:i,name:a}=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:i,UserID:a},body:JSON.stringify({node_id:r,user_name:a})}),{likes:l}=await n.json();return l||0}catch(e){return console.error(e),0}}}},e.joinList=function(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])},e.normalizePage=function(e){if(!e)return;const{blocks:t,slots:n}=e;return{...e,blocks:Wn(t),slots:n&&Object.keys(n).reduce(((e,t)=>({...e,[t]:{...n[t],blocks:Wn(n[t].blocks)}})),{})}},e.projectSettings=d,e.setup=t,e.url=M,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/mobile/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export { DaDataAPI } from './api/DaDataAPI';
|
|
|
3
3
|
export { LikeAPI } from './api/LikeAPI';
|
|
4
4
|
export type { BlockContent } from './components/BlockContent';
|
|
5
5
|
export { Blocks } from './components/Blocks';
|
|
6
|
+
export { Button } from './ui-kit/Button/Button';
|
|
7
|
+
export { Img as Image } from './ui-kit/Img/Img';
|
|
6
8
|
export { ContentPage } from './components/ContentPage/ContentPage';
|
|
7
9
|
export type { BlockDecorator } from './components/ContentPage/ContentPage';
|
|
8
10
|
export type { AsyncDataHook, ContentPageContext, GeolocationHook, HandlerDecorator, LikeService, Router, Search, } from './components/ContentPage/ContentPageContext';
|
package/mobile/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
return result;
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.url = exports.joinList = exports.Icon = exports.projectSettings = exports.Header = exports.normalizePage = exports.ContentPageHead = exports.ContentPage = exports.Blocks = exports.LikeAPI = exports.DaDataAPI = exports.setup = void 0;
|
|
25
|
+
exports.url = exports.joinList = exports.Icon = exports.projectSettings = exports.Header = exports.normalizePage = exports.ContentPageHead = exports.ContentPage = exports.Image = exports.Button = exports.Blocks = exports.LikeAPI = exports.DaDataAPI = exports.setup = void 0;
|
|
26
26
|
var uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
27
27
|
Object.defineProperty(exports, "setup", { enumerable: true, get: function () { return uni_jsx_1.setup; } });
|
|
28
28
|
var DaDataAPI_1 = require("./api/DaDataAPI");
|
|
@@ -31,6 +31,10 @@ var LikeAPI_1 = require("./api/LikeAPI");
|
|
|
31
31
|
Object.defineProperty(exports, "LikeAPI", { enumerable: true, get: function () { return LikeAPI_1.LikeAPI; } });
|
|
32
32
|
var Blocks_1 = require("./components/Blocks");
|
|
33
33
|
Object.defineProperty(exports, "Blocks", { enumerable: true, get: function () { return Blocks_1.Blocks; } });
|
|
34
|
+
var Button_1 = require("./ui-kit/Button/Button");
|
|
35
|
+
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return Button_1.Button; } });
|
|
36
|
+
var Img_1 = require("./ui-kit/Img/Img");
|
|
37
|
+
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return Img_1.Img; } });
|
|
34
38
|
var ContentPage_1 = require("./components/ContentPage/ContentPage");
|
|
35
39
|
Object.defineProperty(exports, "ContentPage", { enumerable: true, get: function () { return ContentPage_1.ContentPage; } });
|
|
36
40
|
var ContentPageHead_1 = require("./components/ContentPage/ContentPageHead");
|
package/mobile/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA0C;AAAjC,gGAAA,KAAK,OAAA;AACd,6CAA4C;AAAnC,sGAAA,SAAS,OAAA;AAClB,yCAAwC;AAA/B,kGAAA,OAAO,OAAA;AAEhB,8CAA6C;AAApC,gGAAA,MAAM,OAAA;AACf,oEAAmE;AAA1D,0GAAA,WAAW,OAAA;AAWpB,4EAA2E;AAAlE,kHAAA,eAAe,OAAA;AACxB,wEAAuE;AAA9D,8GAAA,aAAa,OAAA;AACtB,qDAAoD;AAA3C,gGAAA,MAAM,OAAA;AAEf,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AAWxB,2CAA0C;AAAjC,4FAAA,IAAI,OAAA;AACb,6CAA4C;AAAnC,oGAAA,QAAQ,OAAA;AACjB,mDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA0C;AAAjC,gGAAA,KAAK,OAAA;AACd,6CAA4C;AAAnC,sGAAA,SAAS,OAAA;AAClB,yCAAwC;AAA/B,kGAAA,OAAO,OAAA;AAEhB,8CAA6C;AAApC,gGAAA,MAAM,OAAA;AACf,iDAAgD;AAAvC,gGAAA,MAAM,OAAA;AACf,wCAAgD;AAAvC,4FAAA,GAAG,OAAS;AACrB,oEAAmE;AAA1D,0GAAA,WAAW,OAAA;AAWpB,4EAA2E;AAAlE,kHAAA,eAAe,OAAA;AACxB,wEAAuE;AAA9D,8GAAA,aAAa,OAAA;AACtB,qDAAoD;AAA3C,gGAAA,MAAM,OAAA;AAEf,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AAWxB,2CAA0C;AAAjC,4FAAA,IAAI,OAAA;AACb,6CAA4C;AAAnC,oGAAA,QAAQ,OAAA;AACjB,mDAAmC"}
|
package/mobile/lib/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export { DaDataAPI } from './api/DaDataAPI';
|
|
|
3
3
|
export { LikeAPI } from './api/LikeAPI';
|
|
4
4
|
export type { BlockContent } from './components/BlockContent';
|
|
5
5
|
export { Blocks } from './components/Blocks';
|
|
6
|
+
export { Button } from './ui-kit/Button/Button';
|
|
7
|
+
export { Img as Image } from './ui-kit/Img/Img';
|
|
6
8
|
export { ContentPage } from './components/ContentPage/ContentPage';
|
|
7
9
|
export type { BlockDecorator } from './components/ContentPage/ContentPage';
|
|
8
10
|
export type { AsyncDataHook, ContentPageContext, GeolocationHook, HandlerDecorator, LikeService, Router, Search, } from './components/ContentPage/ContentPageContext';
|
package/mobile/lib/index.js
CHANGED
|
@@ -2,6 +2,8 @@ export { setup } from '@redneckz/uni-jsx';
|
|
|
2
2
|
export { DaDataAPI } from './api/DaDataAPI.js';
|
|
3
3
|
export { LikeAPI } from './api/LikeAPI.js';
|
|
4
4
|
export { Blocks } from './components/Blocks.js';
|
|
5
|
+
export { Button } from './ui-kit/Button/Button.js';
|
|
6
|
+
export { Img as Image } from './ui-kit/Img/Img.js';
|
|
5
7
|
export { ContentPage } from './components/ContentPage/ContentPage.js';
|
|
6
8
|
export { ContentPageHead } from './components/ContentPage/ContentPageHead.js';
|
|
7
9
|
export { normalizePage } from './components/ContentPage/normalizePage.js';
|
package/mobile/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAWnE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAWpD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAWnE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAWpD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC"}
|
package/mobile/src/index.ts
CHANGED
|
@@ -3,6 +3,8 @@ export { DaDataAPI } from './api/DaDataAPI';
|
|
|
3
3
|
export { LikeAPI } from './api/LikeAPI';
|
|
4
4
|
export type { BlockContent } from './components/BlockContent';
|
|
5
5
|
export { Blocks } from './components/Blocks';
|
|
6
|
+
export { Button } from './ui-kit/Button/Button';
|
|
7
|
+
export { Img as Image } from './ui-kit/Img/Img';
|
|
6
8
|
export { ContentPage } from './components/ContentPage/ContentPage';
|
|
7
9
|
export type { BlockDecorator } from './components/ContentPage/ContentPage';
|
|
8
10
|
export type {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -3,6 +3,8 @@ export { DaDataAPI } from './api/DaDataAPI';
|
|
|
3
3
|
export { LikeAPI } from './api/LikeAPI';
|
|
4
4
|
export type { BlockContent } from './components/BlockContent';
|
|
5
5
|
export { Blocks } from './components/Blocks';
|
|
6
|
+
export { Button } from './ui-kit/Button/Button';
|
|
7
|
+
export { Img as Image } from './ui-kit/Img/Img';
|
|
6
8
|
export { ContentPage } from './components/ContentPage/ContentPage';
|
|
7
9
|
export type { BlockDecorator } from './components/ContentPage/ContentPage';
|
|
8
10
|
export type {
|