@redneckz/wildless-cms-uni-blocks 0.3.92 → 0.3.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +22 -11
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/ExchangeRateTile/renderButton.d.ts +3 -0
- package/dist/components/ExchangeRateTile/renderButton.js +9 -0
- package/dist/components/ExchangeRateTile/renderButton.js.map +1 -0
- package/dist/components/ExchangeRateTile/renderInput.js +1 -1
- package/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +1 -1
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +21 -8
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +3 -3
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +5 -3
- package/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -4
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ExchangeRateTile/renderButton.d.ts +3 -0
- package/lib/components/ExchangeRateTile/renderButton.js +6 -0
- package/lib/components/ExchangeRateTile/renderButton.js.map +1 -0
- package/lib/components/ExchangeRateTile/renderInput.js +1 -1
- package/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +1 -1
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +22 -9
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +4 -4
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +5 -3
- package/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js +1 -2
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +4 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/renderButton.d.ts +3 -0
- package/mobile/dist/components/ExchangeRateTile/renderButton.js +9 -0
- package/mobile/dist/components/ExchangeRateTile/renderButton.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/renderInput.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +3 -3
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +5 -3
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -4
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/renderButton.d.ts +3 -0
- package/mobile/lib/components/ExchangeRateTile/renderButton.js +6 -0
- package/mobile/lib/components/ExchangeRateTile/renderButton.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/renderInput.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +4 -4
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +5 -3
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js +1 -2
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/src/components/ExchangeRateTile/renderButton.tsx +10 -0
- package/mobile/src/components/ExchangeRateTile/renderInput.tsx +2 -2
- package/mobile/src/components/StepsBlock/StepsBlock.example.json +15 -0
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +4 -4
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +5 -3
- package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +1 -3
- package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +1 -1
- package/package.json +1 -1
- package/src/components/ExchangeRateTile/renderButton.tsx +10 -0
- package/src/components/ExchangeRateTile/renderInput.tsx +2 -2
- package/src/components/ProductBlock/ProductBlock.tsx +1 -1
- package/src/components/StepsBlock/StepsBlock.example.json +15 -0
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +4 -3
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +4 -4
- package/src/components/StepsBlock/StepsBlock.tsx +73 -38
- package/src/components/StepsBlock/StepsBlockContent.ts +5 -3
- package/src/components/StepsBlock/StepsBlockStyleMaps.ts +1 -3
- package/src/components/__snapshots__/Blocks.spec.tsx.snap +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { Picture } from '../../model/Picture';
|
|
3
3
|
import type { SizeVersion } from '../../model/SizeVersion';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
5
|
/**
|
|
6
6
|
* @title Шаг
|
|
7
7
|
*/
|
|
@@ -22,7 +22,8 @@ export interface Step {
|
|
|
22
22
|
* }
|
|
23
23
|
*/
|
|
24
24
|
icon?: Picture;
|
|
25
|
-
|
|
25
|
+
/** @title Кнопка */
|
|
26
|
+
button?: ButtonWithIconProps;
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
28
29
|
* @title Блок шаги
|
|
@@ -43,7 +44,8 @@ export interface StepsBlockContent {
|
|
|
43
44
|
* @maxItems 4
|
|
44
45
|
*/
|
|
45
46
|
steps?: Step[];
|
|
46
|
-
|
|
47
|
+
/** @title Кнопка */
|
|
48
|
+
button?: ButtonWithIconProps;
|
|
47
49
|
/**
|
|
48
50
|
* @title Размер шагов (моб.)
|
|
49
51
|
* @default normal
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const STEPS_BLOCK_STYLE_MAPS = {
|
|
1
|
+
export const STEPS_BLOCK_STYLE_MAPS = {
|
|
2
2
|
primary: {
|
|
3
3
|
background: 'bg-white',
|
|
4
4
|
title: 'text-primary-text',
|
|
@@ -16,5 +16,4 @@ const STEPS_BLOCK_STYLE_MAPS = {
|
|
|
16
16
|
iconConnector: 'bg-white',
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
|
-
export const getStyleMap = (version) => STEPS_BLOCK_STYLE_MAPS[version];
|
|
20
19
|
//# sourceMappingURL=StepsBlockStyleMaps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepsBlockStyleMaps.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlockStyleMaps.ts"],"names":[],"mappings":"AAWA,MAAM,sBAAsB,GAAoC;
|
|
1
|
+
{"version":3,"file":"StepsBlockStyleMaps.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlockStyleMaps.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,sBAAsB,GAAoC;IACrE,OAAO,EAAE;QACP,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,qBAAqB;QAClC,QAAQ,EAAE,qBAAqB;QAC/B,cAAc,EAAE,iBAAiB;QACjC,aAAa,EAAE,oBAAoB;KACpC;IACD,SAAS,EAAE;QACT,UAAU,EAAE,iBAAiB;QAC7B,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,eAAe;QAC5B,QAAQ,EAAE,YAAY;QACtB,cAAc,EAAE,aAAa;QAC7B,aAAa,EAAE,UAAU;KAC1B;CACF,CAAC"}
|
|
@@ -1264,7 +1264,7 @@
|
|
|
1264
1264
|
|
|
1265
1265
|
function renderInput(props) {
|
|
1266
1266
|
const { placeholder, rates, selected, value, setValue, setSelected } = props;
|
|
1267
|
-
return (jsxs("div", { className: "relative flex items-center", children: [jsx(Input, { className: "h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12", placeholder: placeholder, type: "text", value: value, onChange: setValue }), rates.length ? (jsx(Select, { className: "h-9 -translate-x-
|
|
1267
|
+
return (jsxs("div", { className: "relative flex items-center", children: [jsx(Input, { className: "shrink-0 h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12", placeholder: placeholder, type: "text", value: value, onChange: setValue }), rates.length ? (jsx(Select, { className: "shrink-0 w-20 h-9 -translate-x-8 bg-transparent", value: selected, onChange: (_) => setSelected(_), children: rates.map((_, i) => (jsx(SelectOption, { value: _.code, children: _.code }, String(i)))) })) : null] }));
|
|
1268
1268
|
}
|
|
1269
1269
|
|
|
1270
1270
|
const ExchangeCurrencyCalculator = JSX(({ context, className = '', currencyRatesBuy, currencyRatesSell, button }) => {
|
|
@@ -1667,7 +1667,6 @@
|
|
|
1667
1667
|
iconConnector: 'bg-white',
|
|
1668
1668
|
},
|
|
1669
1669
|
};
|
|
1670
|
-
const getStyleMap = (version) => STEPS_BLOCK_STYLE_MAPS[version];
|
|
1671
1670
|
|
|
1672
1671
|
const STEPS_SIZE_MAP = {
|
|
1673
1672
|
normal: 'h-[70px] w-[70px] min-w-[70px] min-h-[70px]',
|
|
@@ -1678,18 +1677,18 @@
|
|
|
1678
1677
|
small: 'min-h-[50px]',
|
|
1679
1678
|
};
|
|
1680
1679
|
const StepsBlock = JSX(({ className, title, description, showLines = true, steps, size = 'normal', version = 'primary', }) => {
|
|
1681
|
-
const styleMap =
|
|
1680
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
1682
1681
|
return (jsxs("section", { className: `box-border font-sans bg-white px-4 py-6 flex flex-col
|
|
1683
1682
|
${styleMap.background} ${styleMap.title} ${className || ''}`, children: [title ? (jsx(Heading, { headingType: "h3", className: `text-center ${styleMap.title}`, title: title })) : null, description ? (jsx("p", { className: `text-m text-center ${styleMap.description} ${title ? 'mt-2' : ''}`, children: description })) : null, steps?.length ? (jsx("div", { className: `box-border py-0.5 mb-0.5 mt-5`, children: jsx("div", { className: "flex flex-col justify-between gap-x-[101px]", children: steps.map(renderStepTitle(size, version, showLines)) }) })) : null] }));
|
|
1684
1683
|
});
|
|
1685
1684
|
const renderStepTitle = (size, version, showLines) => (step, i, steps) => {
|
|
1686
1685
|
const isLastStep = steps.length - 1 === i;
|
|
1687
1686
|
const margin = size === 'normal' ? 'ml-[34px]' : 'ml-6';
|
|
1688
|
-
const styleMap =
|
|
1687
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
1689
1688
|
return (jsx("div", { children: jsxs("div", { className: "flex flex-row text-center relative", children: [jsxs("div", { className: "overflow-hidden", children: [renderIconArea(size, version), isLastStep ? null : (jsx("div", { className: `min-h-8 h-full w-[2px] ${showLines ? styleMap.iconConnector : ''} ${margin}` }))] }), jsxs("div", { className: `flex flex-col justify-center h-fit ${STEPS_TILE_DESCRIPTION_HEIGHT_MAP[size]}`, children: [step.label ? (jsx("div", { className: "font-medium text-m-title-xs m-0 text-left mb-1", children: step.label })) : null, step.description ? (jsx("div", { className: `text-s ${styleMap.description} text-left`, children: step.description })) : null] })] }) }, String(i)));
|
|
1690
1689
|
};
|
|
1691
1690
|
const renderIconArea = (size, version) => (step, i) => {
|
|
1692
|
-
const styleMap =
|
|
1691
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
1693
1692
|
const iconAreaSize = STEPS_SIZE_MAP[size];
|
|
1694
1693
|
const iconSize = size === 'normal' ? '38' : '27';
|
|
1695
1694
|
const iconTextSize = size === 'normal' ? 'text-m-title' : 'text-m-title-xs';
|
|
@@ -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,...l}={})=>{const a=Object.assign({},l,r?{innerHTML:r.__html}:{});return e(t,a,"string"!=typeof t?()=>n:n)}))};const n=(...e)=>t._jsx(...e),r=(...e)=>t._jsxs(...e),l=e=>(e._tmpl||(e._tmpl=function(t,n){const{children:r,...l}=t||{},a=n?.slots?.default,o=r||a&&a();return e(Object.assign(l,o&&{children:o}),n)},e._tmpl.inheritAttrs=!1),e._tmpl);const a="likesToken";const o={h0:"text-m-title",h1:"text-m-title",h2:"text-m-title",h3:"text-h6",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},i=l((e=>{const{className:t,headingType:r="h3",title:l,as:a="h3"}=e;return n(a,{className:`font-sans font-medium m-0 ${o[r]} ${t||""}`,children:l})}));var s,c;!function(e){e.ActualBalanceIcon="ActualBalanceIcon",e.AirPlane="AirPlane",e.AppleIcon="AppleIcon",e.ArrowDownIcon="ArrowDownIcon",e.ArrowLeftIcon="ArrowLeftIcon",e.ArrowUpIcon="ArrowUpIcon",e.AtmIcon="AtmIcon",e.BankIcon="BankIcon",e.BurgerIcon="BurgerIcon",e.Calendar2Icon="Calendar2Icon",e.CalendarCircleIcon="CalendarCircleIcon",e.CalendarIcon="CalendarIcon",e.CalendarTickIcon="CalendarTickIcon",e.CardIcon="CardIcon",e.CardPosIcon="CardPosIcon",e.CardTickIcon="CardTickIcon",e.CardWithGemIcon="CardWithGemIcon",e.CarIcon="CarIcon",e.ChartSquareIcon="ChartSquareIcon",e.CinemaIcon="CinemaIcon",e.ClockIcon="ClockIcon",e.CloseIcon="CloseIcon",e.ComfortableCompIcon="ComfortableCompIcon",e.CreditCardsIcon="CreditCardsIcon",e.DiscountShapeIcon="DiscountShapeIcon",e.DocIcon="DocIcon",e.DocIconMonoColor="DocIconMonoColor",e.DocsIcon="DocsIcon",e.DocumentTextIcon="DocumentTextIcon",e.DollarIcon="DollarIcon",e.DoneIcon="DoneIcon",e.EarthIcon="EarthIcon",e.EmptyWalletChangeIcon="EmptyWalletChangeIcon",e.EmptyWalletIcon="EmptyWalletIcon",e.EuroIcon="EuroIcon",e.GeolocationIcon="GeolocationIcon",e.GlassIcon="GlassIcon",e.GlobalIcon="GlobalIcon",e.GpsIcon="GpsIcon",e.GridIcon="GridIcon",e.InterestGrowthIcon="InterestGrowthIcon",e.InterestIcon="InterestIcon",e.JCBIcon="JCBIcon",e.Logo="Logo",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.PackA4="PackA4",e.PassSendIcon="PassSendIcon",e.PercentageRoundIcon="PercentageRoundIcon",e.PercentageSquareIcon="PercentageSquareIcon",e.PersonalCardIcon="PersonalCardIcon",e.PlayMarketIcon="PlayMarketIcon",e.PlusIcon="PlusIcon",e.PowerIcon="PowerIcon",e.Profile2UserIcon="Profile2UserIcon",e.ProfileIcon="ProfileIcon",e.PumpkinIcon="PumpkinIcon",e.RoundRubleIcon="RoundRubleIcon",e.SafeIcon="SafeIcon",e.ShieldTickIcon="ShieldTickIcon",e.SignDocsIcon="SignDocsIcon",e.SmallClockIcon="SmallClockIcon",e.SoundIcon="SoundIcon",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",e.WateringCan="WateringCan"}(s||(s={})),function(e){e.ActualBalanceIcon="Деньги",e.AirPlane="Самолет",e.AppleIcon="Лого «Apple»",e.ArrowDownIcon="Стрелка 'Вниз'",e.ArrowLeftIcon="Стрелка",e.ArrowUpIcon="Стрелка вверх",e.AtmIcon="Банкомат",e.BankIcon="Банк",e.BurgerIcon="Бургер",e.Calendar2Icon="Календарь 2",e.CalendarCircleIcon="Скруглённый календарь",e.CalendarIcon="Календарь",e.CalendarTickIcon="Календарь с галочкой",e.CardIcon="Кред. карта",e.CardPosIcon="Кред. карта под наклоном",e.CardTickIcon="Кред. карта с галочкой",e.CardWithGemIcon="Карта с драгоценностями",e.CarIcon="Машина",e.ChartSquareIcon="Деньги внутри кошелька",e.CinemaIcon="Кино",e.ClockIcon="Часы",e.CloseIcon="Крестик",e.ComfortableCompIcon="Кресло",e.CreditCardsIcon="Кредитные карты",e.DiscountShapeIcon="Скидка",e.DocIcon="Документ",e.DocIconMonoColor="Документ (одноцветный)",e.DocsIcon="Документы",e.DocumentTextIcon="Документ с текстом",e.DollarIcon="Доллар",e.DoneIcon="Зелёная 'галочка'",e.EarthIcon="Земля",e.EmptyWalletChangeIcon="Пустой кошелёк с возвратом",e.EmptyWalletIcon="Пустой кошелёк",e.EuroIcon="Евро",e.GeolocationIcon="Геолокация",e.GlassIcon="Зеркало",e.GlobalIcon="Глобус",e.GpsIcon="Gps",e.GridIcon="Сетка (белая)",e.InterestGrowthIcon="Диаграмма роста",e.InterestIcon="Скидка",e.JCBIcon="JCB",e.Logo="Logo",e.LoupeIcon="Лупа",e.MasterCardIcon="MasterCard",e.MinusIcon="Минус",e.MirIcon="МИР",e.MoneyIcon="Деньги",e.MoneyInsuranceIcon="Денежное страхование",e.MonitorMobileIcon="Монитор и мобильный",e.NewDocIcon="Новый документ",e.OfficeIcon="Офис",e.OkIcon="Лого «Одноклассники»",e.PackA4="PackA4",e.PassSendIcon="Бизнес",e.PercentageRoundIcon="Проценты (круг.)",e.PercentageSquareIcon="Проценты",e.PersonalCardIcon="Персональная карта",e.PlayMarketIcon="Лого «PlayMarket»",e.PlusIcon="Плюс",e.PowerIcon="Щит",e.Profile2UserIcon="Профиль, 2 персоны",e.ProfileIcon="Профиль",e.PumpkinIcon="Тыква",e.RoundRubleIcon="Рубль (круг.)",e.SafeIcon="Сейф",e.ShieldTickIcon="Безопасность",e.SignDocsIcon="Подписанные документы",e.SmallClockIcon="Маленькие часы",e.SoundIcon="Звук",e.TelegramIcon="Лого «Telegram»",e.UnionPayIcon="UnionPay",e.UserTickIcon="Пользователь",e.VisaIcon="Visa",e.VKIcon="Лого «VK»",e.WalletAdd2Icon="Пополнение карты",e.WalletAddIcon="Кошелёк с плюсом",e.WalletIcon="Кошелёк",e.WalletWithMoneyIcon="Кошелёк с деньгами",e.WateringCan="Добавить продукт"}(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={normal:"text-primary-main",black:"text-black",white:"text-black invert"},h=l((({className:e="",imageClassName:t="",name:l="",alt:a=`Иконка ${c[l]||l}`,title:o=a,iconVersion:i="normal",asSVG:s,...h})=>{const u=`${d.CDN||""}icons/${l}.svg`;return s?r("svg",{className:e,...h,"aria-hidden":"true",children:[o?n("title",{children:o}):null,a?n("desc",{children:a}):null,n("use",{className:`${m[i]} ${t}`,href:`${u}#icon`,xlinkHref:`${u}#icon`})]}):n("img",{className:e,src:u,alt:a,title:o,...h,"aria-hidden":"true"})}));function u(e){return"string"==typeof e?"normal":e.iconVersion||"normal"}const p=(e,t)=>e.media&&t.media?e.media-t.media:0,x=l((({className:e="",image:t,imageClassName:l="",isMobile:a=!1})=>{if(!t)return null;return r("picture",{className:`${a?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(p).map((({src:e,format:t,media:r,size:l},a)=>n("source",{srcSet:e,type:b(t),media:r?`(max-width: ${r}px)`:"",...l},`${a}_${e}`))):null,g(t,l,a)]})})),g=(e,t="",r=!1)=>{const l=e.title||"",a=e.alt||e.title,o=r?"m-auto":"m-0";return n("img",{src:e.src,className:`${o} ${t}`,alt:a,title:l,...e.size})};function b(e){return e?`image/${String(e)}`:void 0}const f=l((({className:e="",image:t,imageClassName:r="",isMobile:l,...a})=>{if(!t)return null;const o="string"==typeof t?t:t.icon;return o||""===o?o.length?n(h,{className:e,imageClassName:r,iconVersion:u(t),name:o,...a}):null:n(x,{className:e,imageClassName:r,image:t,isMobile:l})})),y=l((({className:e="",image:t})=>n(f,{className:e,image:t,isMobile:!0})));function N(e){return e?e.filter(Boolean).join(" "):""}const v={left:"text-left",center:"text-center",right:"text-right"},I={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"}},w=l((({bgColorHeadline:e="transparent",className:t="",title:l,description:a,image:o,align:s="left"})=>{const c=I[e];return r("section",{className:`px-4 py-6 flex flex-col gap-2.5 ${c.background} ${t}`,children:[l?n(i,{headingType:"h2",className:`${c.text} ${v[s]}`,title:l}):null,a?n("p",{className:`font-normal text-m ${c.description} ${v[s]} `,children:a}):null,o?.src&&n("div",{className:"mt-2.5 mx-auto flex justify-center",children:n(y,{image:o})})]})})),k=l((({children:e,activeIndex:t,indexFraction:r,showDots:l})=>{const a=e=>n=>{if(e===t)return;const r=n.currentTarget.parentElement?.previousElementSibling;r?.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})};return l&&e?.length?n("div",{className:"flex gap-2 mx-auto mt-5 w-fit",children:e?.map(((e,l)=>n("div",{onClick:a(l),className:"bg-primary-main opacity-30 w-1.5 h-1.5 min-w-1.5 min-h-1.5 rounded-full",style:C(l,t,r),"aria-hidden":!0},String(l))))}):null})),C=(e,t,n)=>{if(e<t||e>t+1)return;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"}},S=l((({className:e="",children:t,...r})=>n("div",{className:`snap-center snap-always min-w-full box-border ${e}`,role:"listitem",...r,children:t}))),$=e=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e}px`}),D=l((({className:e="",children:t,activeIndex:r,onScroll:l,gap:a=14,padding:o=16})=>n("div",{className:`overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...$(o),gap:`${a}px`},role:"list",onScroll:l,children:t?.length?t?.map(((e,t)=>n(S,{style:$(o/4),"aria-current":Boolean(r===t),children:e},String(t)))):n(S,{children:t})}))),T=l((({className:e,context:t,children:l,gap:a=14,padding:o=16,showDots:i=!0,onSlideChange:s})=>{const[c,d]=t.useState(0),[m,h]=t.useState(0),u={activeIndex:c,indexFraction:m,showDots:i,children:l};return r("div",{className:e,children:[n(D,{gap:a,padding:o,activeIndex:c,onScroll:e=>{const{scrollLeft:t,clientWidth:n,childElementCount:r,scrollWidth:l,children:i}=e?.currentTarget,m=i[0].offsetWidth-o/2,u=(({gap:e,padding:t,clientWidth:n,scrollWidth:r,childElementCount:l,itemWidth:a})=>{const o=r-n;if(2===l)return[[0,o],[o,r]];const i=a+e,s=n-e-t,c=l-2,d=new Array(l).fill(0).map(((e,t)=>0===t||t===c?[t>0?o-s:0,t>0?o:s]:[(t-1)*i+s,t*i+s]));return d[l-1]=[o,r],d})({gap:a,padding:o,clientWidth:n,scrollWidth:l,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,l]=t[n];return{index:n,fraction:(e-r)/(l-r)}})(t,u);p!==c&&s&&s(),d(p),h(x)},children:l}),n(k,{...u})]})})),R=l((({className:e,iconClassName:t,textClassName:l,suffixClassName:a,doc:o,icon:i})=>{const{text:s,fileSize:c,...d}=o;return r("a",{className:e,role:"link",...d,children:[i?n(y,{className:t,image:i,width:"24px",height:"24px",asSVG:!0}):null,s?r("span",{className:l,children:[s,n("span",{className:a,children:d?.href&&B(P(d.href),c)})]}):null]})})),B=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),P=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},_=l((({className:e="",doc:t,icon:r})=>n(R,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:r}))),A=l((({context:e,hasBorder:t=!0,documents:r,icon:l})=>n(T,{context:e,className:"text-s text-primary-main mt-5",children:r?.length?r.map(((e,r)=>n(_,{className:t?"rounded-md border-main-stroke border border-solid p-4":"",doc:e,icon:l},String(r)))):null}))),L=l((({hasBorder:e=!0,documents:t,icon:r})=>n("div",{className:"text-s text-primary-main flex flex-col mt-5 "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,l)=>n("div",{role:"listitem",children:n(_,{className:e?"rounded-md border-main-stroke border border-solid p-4":"",doc:t,icon:r})},String(l)))):null}))),M=l((({className:e="",context:t,title:l,description:a,icon:o={icon:"DocIconMonoColor"},documents:i,orientation:s="vertical",hasBorder:c=!0})=>r("section",{className:`font-sans text-primary-text py-6 px-4 bg-white overflow-x-hidden ${e}`,children:[n(w,{className:"!p-0 "+(a?"gap-2":"gap-5"),title:l,description:a,context:t,align:"center"}),"vertical"===s?n(L,{hasBorder:c,documents:i,icon:o}):n(A,{context:t,hasBorder:c,documents:i,icon:o})]}))),V=e=>e?.includes("//"),j=e=>(e||"").replace(/\/?\?.*/,""),G=e=>{if(!e||!V(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t};var W=Object.freeze({__proto__:null,isURL:V,withoutQuery:j,getOrigin:G,getHash:e=>{if(!e||!V(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0},isHash:e=>e?.startsWith("#")});const O="/mobile",U=(e,t)=>{if(!e)return e;const n=G(t?.href);return n?e.replace(n,"")||"/":e},E=e=>e;function F({router:e,handlerDecorator:t=E},n){const r=((e,t)=>{if(!e)return e;const n=U(e,t)||"",r=t?.pathname.startsWith(O);return r&&!V(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:r,"aria-label":n.text,onClick:t((t=>{const l=r&&!V(r),a=!n.target||"_self"===n.target;l&&a&&(t?.preventDefault(),e.push(r))}),n)}}const H=l((e=>{const{text:t,aboveText:l,appendLeft:a,appendRight:o}=e;return r("div",{className:z(e),children:[a||null,J(e)?r("div",{children:[n("div",{className:"text-xs text-left",children:l}),n("div",{className:"text-left "+(l?"text-s -mt-0.5":"text-l"),children:t})]}):null,o||null]})})),z=e=>{const{version:t,aboveText:n,rounded:r}=e;if("link"===t)return"";const l="gap-2 "+(n?"py-2.5 px-7":"py-4 px-9");return["flex items-center justify-center",J(e)?l:"h-12 w-12",r?"rounded-full":""].join(" ")},J=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),q={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"},K={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},Q="w-full text-center font-sans select-none",Y=l((({className:e,text:t,aboveText:r,appendLeft:l,href:a,target:o,onClick:i,children:s,disabled:c,rounded:d,version:m="primary",ariaLabel:h,...u})=>{const p=s??n(H,{text:t,aboveText:r,appendLeft:l,rounded:d,version:m});return c?n("div",{role:"button","aria-disabled":"true","aria-label":h,tabIndex:-1,className:`inline-block ${Q} ${K[m]||""} ${d?"rounded-full":"rounded-md"} ${e||""}`,children:p}):n("a",{className:`${Q} inline-block cursor-pointer no-underline ${q[m]||""} ${d?"rounded-full":"rounded-md"} ${e||""}`,href:a,target:o,onClick:i,"aria-label":h,role:a?"link":"button",...u,children:p})})),Z=l((({context:e,className:t="",buttons:r})=>{const{handlerDecorator:l}=e,a=e.useRouter();return r&&r?.length?n("div",{className:t,children:r.map(((e,t)=>function({icon:e,iconRight:t,...r},l){if(!r?.text)return null;return n(Y,e?{appendLeft:n(y,{image:e,width:"24",height:"24",asSVG:!0}),appendRight:n(y,{image:t,width:"24",height:"24",asSVG:!0}),...r}:{...r},String(l))}(F({router:a,handlerDecorator:l},e),t)))}):null}));const X={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=l((({className:e="",isDotted:t=!0,children:l,version:a="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t?n("div",{className:ne(a)}):null,n("span",{children:l})]}))),ne=e=>`${X[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"},le=l((e=>{const{className:t="",itemClassName:r,isDotted:l,items:a,version:o="primary"}=e;return n("section",{className:`${re[o]} ${t}`,role:"list",children:a?.length?a.map(((e,t)=>n(te,{className:r,isDotted:l,version:o,children:e},String(t)))):null})})),ae=l((({className:e="",title:t="",children:l,buttons:a,image:o})=>r("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,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:l}),a?n("div",{children:a}):null]}),o]})]}))),oe={primary:"text-primary-text",secondary:"text-white"},ie={primary:"text-secondary-text",secondary:"text-white"};function se(e){let t="text-primary-main";return"secondary"===e&&(t="text-black"),`w-6 h-6 rounded-full box-border ${t}`}const ce=l((({className:e="",context:t,title:l,headlineVersion:a="L",description:o,benefits:i,benefitsVersion:s="normal",buttons:c,image:d,items:m,version:h="primary",isDotted:u=!0,label:p})=>r("div",{className:`w-full ${e}`,children:[r("div",{children:[p?he(p,h):null,n(w,{context:t,className:"!p-0 max-w-[600px]",title:l,description:o,bgColorHeadline:h,headlineVersion:a}),r(ae,{context:t,buttons:c?.length?n(Z,{context:t,buttons:c,className:"flex flex-col mt-5 gap-2.5"}):null,children:[i?.filter((e=>e.label))?.length?n("div",{className:"mt-3",children:i.map(((e,t)=>function({benefit:e,version:t="primary"},l){const a="secondary"===t;return r("div",{className:"flex gap-3 items-center mb-2.5 last:mb-0",children:[e.icon?n(y,{className:se(t),image:{...e?.icon,iconVersion:a?"white":"normal"},width:"24",height:"24",asSVG:!0}):null,n("div",{className:`text-l m-0 ${oe[t]}`,children:e.label}),e.description&&n("div",{className:`text-s ${ie[t]}`,children:e.description})]},String(l))}({benefit:e,version:h,benefitsVersion:s},t)))}):null,m?.length?n(le,{className:"mt-3 text-m",items:m,version:h,isDotted:u}):null]})]}),de(d)]})));function de(e){return e?.src?n(y,{imageClassName:"mt-5 mx-auto block",image:{className:"block",...e}}):null}const me={primary:"text-primary-main border-secondary-hover",secondary:"text-white/80"},he=(e,t)=>n("div",{className:`px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid w-fit ${me[t]}`,children:e}),ue={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},pe=l((e=>{const{className:t="",version:r="primary"}=e;return n("section",{className:`font-sans bg-white px-4 py-6 ${ue[r]} ${t}`,children:n(ce,{...e})})})),xe={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=l((({title:e,description:t,blockVersion:l="primary",iconVersion:a,image:o,className:i="",items:s,isDotted:c=!0})=>{const d=xe[l],m="secondary"===l?"secondary":"gray";return r("section",{className:`font-sans px-4 py-[18px] flex flex-col ${d.background} ${i}`,children:["small"===a?be(d.icon):null,"big"===a?fe(o):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,s?.length?n(le,{className:"mt-1 text-m-md",items:s,isDotted:c,version:m}):null]})]})}));function be(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 fe(e){return e?.src?n(y,{className:"pb-3 mr-auto",image:e}):null}const ye={primary:"bg-white",secondary:"bg-primary-main text-white"},Ne=l((({context:e,title:t,description:l,cards:a=[],className:o,orientation:s="horizontal"})=>r("section",{className:`relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${o}`,children:[r("div",{className:"flex flex-col items-center mb-5",children:[t?n(i,{headingType:"h3",className:`text-center ${l?"mb-2":"mb-5"}`,title:t}):null,l?n("div",{className:"font-normal text-m-md max-w-[600px] text-center mb-5",children:l}):null]}),ve(s,a,e)]})));function ve(e,t,r){return"horizontal"===e?n(T,{context:r,children:t?.map(Ie)}):n("div",{className:"grid gap-[14px]",children:t?.map(Ie)})}function Ie(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 ${ye[e.version??"primary"]}`,children:[r("div",{children:[e.image?.src?n("div",{className:"flex justify-center",children:n(y,{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?we(e):null,e.items?.length?ke(e.items,e.isDotted,e.version):null]}),e?.button?.text?(l=e.button,n(Y,{className:"mt-3",appendLeft:l?.icon&&n(y,{image:l?.icon,width:"24px",height:"24px",asSVG:!0}),...l})):null]},t);var l}function we(e){return n("div",{className:"text-secondary-text mt-1 text-m-sm "+("secondary"===e.version?"text-white opacity-80":""),children:e.description})}function ke(e,t,l="primary"){return n("section",{className:"mt-3",children:e.map(((e,a)=>r("div",{children:[t?n("div",{className:ne(l)}):null,n("span",{className:"text-m-md font-medium",children:e.title}),n("span",{className:"text-m-sm pl-2 "+("primary"===l?"text-secondary-text":""),children:e.text})]},String(a))))})}class Ce{static inst=new Ce;subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]||=[],this.subscribers[e]?.push(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){this.subjectsStateMap[e]=t,this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const Se=e=>{if(!e.length)return;const[t]=e;t.isIntersecting},$e=l((({anchor:e,className:t,context:r,children:l,tag:a="section",labels:o})=>{const i=a,{IntersectionObserverTag:s}=r,[c,d]=r.useState(!0);return r.useEffect((()=>Ce.inst.subscribe("tab",(e=>{d(!o?.length||!e.label||o.includes(e.label))}))),[o]),c?e?n(s,{tag:a,className:t,observerCallback:Se,observerOptions:{threshold:1},anchor:e,children:l}):n(i,{className:t,children:l}):null})),De=l((({className:e="",documents:t,...r})=>n($e,{className:`font-sans bg-white mt-[10px] ${e}`,...r,children:n("ul",{className:"flex flex-col text-sm text-secondary-text p-0",children:t?.length?Te(t):null})}))),Te=e=>e.map(((e,t)=>{const{text:r,...l}=e;return n("li",{className:"mb-4 list-none",children:n("a",{className:"hover:text-primary-main",role:"link",...l,children:r||null})},`list_item_${String(t)}`)})),Re={Headline:w,LinkDocs:M,TextBlock:ge,ProductBlock:pe,Gallery:Ne,LinkList:De},Be=({blocks:e,context:t,className:n=""})=>e?.length?e.map(Pe({context:t,className:n})):null,Pe=({context:e,className:t})=>(r,l)=>{if(!r)return null;const{style:a,blockListType:o,...i}=r;if(!o||!(o in Re))return null;const s=N(a);return n(Re[o],{className:`${t} ${s}`,context:e,...i},`block_${l}`)},_e=l((({blocks:e,context:t})=>n("div",{className:"flex flex-wrap transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0",children:Be({context:t,blocks:e,className:"!px-0"})}))),Ae=l((({label:e,labelIcon:t,blocks:l,bordered:a,context:o})=>{const{hasContent:i,icon:s,handleToggle:c}=(({context:e,blocks:t,initialState:n=!1})=>{const[r,l]=e.useState(n),a=t?.length;return{isActive:r,hasContent:a,icon:r?"MinusIcon":"PlusIcon",handleToggle:e=>{const t=e.currentTarget;if(!t)return;l(!r);const n=t.nextSibling;n.style.maxHeight=n.style.maxHeight?"":`${n.scrollHeight}px`}}})({context:o,blocks:l});return r("li",{className:`${Le(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 ${i?"group cursor-pointer":""}`,onClick:c,children:[r("span",{className:"text-m-title-xs pr-2.5 font-medium flex "+(i?"group-hover:text-primary-main":""),children:[t?n(y,{image:t,width:"24",height:"24",asSVG:!0,className:"mr-3"}):null,e]}),i?n(y,{image:s,width:"24",height:"24",asSVG:!0}):null]}),i?n(_e,{blocks:l,context:o}):null]})}));function Le(e){return e?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0"}const Me=l((({title:e,description:t,accordionItems:l,context:a,className:o="",bordered:s})=>r("section",{className:`py-6 px-4 font-sans bg-white text-primary-text ${o}`,children:[e?n(i,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?n("div",{className:"mb-5 text-m-md text-center",children:t}):null,l?.length?n("ul",{className:"list-none m-0 p-0",children:l.map(((e,t)=>n(Ae,{...e,context:a,bordered:s},`AccordionItem_${t}`)))}):null]}))),Ve=(e=!1)=>e?"text-white":"",je=(e=!1)=>"text-m-sm mb-3.5 "+(e?"text-white":"text-secondary-text/80"),Ge=l((({icon:e,image:t,title:l,subtitle:a,isFillGradient:o})=>r("div",{role:"columnheader",children:[e?n(y,{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(y,{image:t})}),l?n(i,{headingType:"h4",className:Ve(o),title:l}):null,a?n("div",{className:je(o),children:a}):null]}))),We=l((({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(Oe(r,t))})}))),Oe=(e,t)=>({label:l,description:a},o)=>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:[l?n("div",{className:"text-right "+(e?"text-white":""),children:l}):null,a?n("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:a}):null]})]},String(o)),Ue=l((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:a,showRow:o,onToggleColumn:i})=>{const s=t?.slice(0,o?t.length:l),c=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(Ge,{...e,isFillGradient:a}),s?.length?s.map((({rowHeader:e,cell:t},r)=>n(We,{cell:t,rowHeader:e,isFillGradient:a},String(r)))):null,o&&Ee({header:e,buttonVersion:c}),Fe({onToggleColumn:i,isFillGradient:a,showRow:o})]})})),Ee=({header:e,buttonVersion:t})=>n(Y,{href:e.link.href,target:e.link.target,version:t,className:"font-medium text-m-sm mt-4 py-[11px]",children:e.link.text}),Fe=({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?"Скрыть":"Показать описание"})}),He=l((({className:e,context:t,title:l,rowHeaders:a,columns:o,visibleRowLength:s=0,isColoredFirstColumn:c=!1,orientation:d="vertical"})=>{const m=o?.map((({data:e,header:t})=>({header:t,column:e?.map(((e,t)=>({cell:e,rowHeader:a?.[t]?.title})))})))||[],[h,u]=t.useState(new Array(o?.length).fill(!s));return r("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${e||""}`,children:[l?n(i,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:l}):null,ze({tableData:m,context:t,visibleRowLength:s,isColoredFirstColumn:c,columnsViewState:h,handleToggleColumn:e=>{h[e]=!h[e],u([...h])},orientation:d,setColumnsViewState:u})]})})),ze=({context:e,tableData:t,visibleRowLength:r,isColoredFirstColumn:l,columnsViewState:a,handleToggleColumn:o,orientation:i="horizontal",setColumnsViewState:s})=>n("div",{role:"table",children:t?.length?Je({orientation:i,context:e,columnsViewState:a,setColumnsViewState:s,tableData:t,visibleRowLength:r,isColoredFirstColumn:l,handleToggleColumn:o}):null}),Je=({orientation:e,context:t,columnsViewState:r,setColumnsViewState:l,tableData:a,visibleRowLength:o,isColoredFirstColumn:i,handleToggleColumn:s})=>"horizontal"===e?n(T,{context:t,onSlideChange:Ke(r,l),children:a.map(qe({context:t,visibleRowLength:o,isColoredFirstColumn:i,columnsViewState:r,handleToggleColumn:s}))}):a.map(qe({context:t,visibleRowLength:o,isColoredFirstColumn:i,columnsViewState:r,handleToggleColumn:s})),qe=({context:e,visibleRowLength:t,isColoredFirstColumn:r,columnsViewState:l,handleToggleColumn:a})=>(o,i)=>n(Ue,{context:e,visibleRowLength:t,showRow:l[i],header:o.header,columnData:o.column,isFillGradient:0===i&&r,onToggleColumn:()=>a(i)},String(i)),Ke=(e,t)=>()=>{t(new Array(e.length).fill(!1))};async function Qe(){try{const e=await fetch(Ye,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ze)});return await e.json()}catch(e){return console.error(e),Promise.resolve()}}const Ye="https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000",Ze={query:{bool:{must:[{term:{russian_region_code:"77"}},{term:{from_volume:"0"}},{terms:{currency_pair:["USD/RUB","EUR/RUB"]}}]}}},Xe=e=>e.reduce(((e,t)=>{const n=t.currency_first?.code;return e.some((e=>e.code===n))||e.push({code:n,buy:et(Number(t.rate_buy)),sell:et(Number(t.rate_sell))}),e}),[]),et=e=>Math.round(1e3*e)/1e3;var tt;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(tt||(tt={}));const nt=new Intl.NumberFormat("ru",{style:"currency",currency:tt.RUB}),rt=e=>e?nt.format(e):"",lt="text-left text-m text-secondary-text",at={USD:"DollarIcon",EUR:"EuroIcon"},ot=l((({className:e,exchangeCurrencyItems:t})=>r("table",{className:`h-fit w-fit ${e}`,children:[n("thead",{children:r("tr",{children:[n("th",{className:lt,children:"Валюта"}),n("th",{className:`${lt} pl-11`,children:"Купить"}),n("th",{className:`${lt} pl-11`,children:"Продать"})]})}),n("tbody",{children:t.map((e=>it(e)))})]}))),it=e=>{const t=e?.code;return r("tr",{className:"pb-1 text-h6",children:[n("td",{className:"pt-4",children:r("div",{className:"flex items-center",children:[t?n(y,{image:{icon:at[t]},width:"24",height:"24"}):null,n("span",{className:"ml-2",children:t})]})}),n("td",{className:"pt-4 pl-11",children:rt(e?.sell)}),n("td",{className:"pt-4 pl-11",children:rt(e?.buy)})]},t)},st=l((({className:e="",address:t,distance:l})=>r("div",{className:`flex ${e}`,children:[n(y,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),r("div",{className:"ml-3",children:[t?n("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,l?r("p",{className:"text-secondary-text m-0 text-m",children:["Курс указан для ближайшего офиса - ",l]}):null]})]}))),ct=(e,t,n)=>{const r=Number(dt(e))*Math.pow(t,n?-1:1);return Number.isInteger(r)?r:((e,t=2)=>{const n=Math.pow(10,t);return Math.round(parseFloat(String(e))*n)/n})(r)},dt=e=>e.replace(/[^\d.,]/g,"").replace(",","."),mt=e=>{return(t=[[e=>e.value!==tt.RUB&&e.oppositeValue!==tt.RUB,()=>e.handleConvert(e.value,tt.RUB)],[e=>e.value===tt.RUB&&e.oppositeValue===tt.RUB,()=>e.handleConvert(e.value,tt.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,n]=t.find((([t])=>t(e)))||[];return n})(e)?.();var t},ht=l((({className:e="",id:t,name:r,type:l="text",placeholder:a,pattern:o,value:i,onChange:s})=>n("input",{className:e,id:t,name:r||t,type:l,pattern:o,placeholder:a,value:i,onChange:e=>{const t=e.target.validity.valid?e.target.value:i;s(t)}}))),ut={background:"url('/icons/ArrowDownIcon.svg') no-repeat right 16px top 50%"},pt=l((({className:e="",id:t,name:r,children:l,value:a,onChange:o})=>n("select",{className:`appearance-none ${e}`,style:ut,id:t,name:r||t,value:a,onChange:e=>o(e.target.value),children:l}))),xt=l((({className:e="",value:t,selected:r,children:l})=>n("option",{className:e,value:`${t}`,selected:r,children:l})));function gt(e){const{placeholder:t,rates:l,selected:a,value:o,setValue:i,setSelected:s}=e;return r("div",{className:"relative flex items-center",children:[n(ht,{className:"h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12",placeholder:t,type:"text",value:o,onChange:i}),l.length?n(pt,{className:"h-9 -translate-x-4 bg-transparent",value:a,onChange:e=>s(e),children:l.map(((e,t)=>n(xt,{value:e.code,children:e.code},String(t))))}):null]})}const bt=l((({context:e,className:t="",currencyRatesBuy:l,currencyRatesSell:a,button:o})=>{const{useRouter:i,handlerDecorator:s}=e,c=i(),[d,m]=e.useState({inputSell:"",inputBuy:"",selectSell:l?.[0]?.code||tt.RUB,selectBuy:a?.[0]?.code||tt.USD}),h=e=>{m((t=>({...t,...e})))};return r("div",{className:`grid gap-[18px] pt-2 ${t}`,children:[gt({placeholder:"Хочу продать",rates:l,selected:d.selectSell,setSelected:ft(d,h,a),value:d.inputSell,setValue:e=>Nt(h,a)(e,d.selectSell,d.selectBuy)}),gt({placeholder:"Получу",rates:a,selected:d.selectBuy,setSelected:yt(d,h,l),value:d.inputBuy,setValue:e=>vt(h,l)(e,d.selectBuy,d.selectSell)}),o?.text?n(Y,{className:"py-4 mr-1",version:o?.version,...F({router:c,handlerDecorator:s},o),children:o.text}):null]})})),ft=(e,t,n)=>r=>{t({selectSell:r}),mt({value:r,oppositeValue:e.selectBuy,handleConvert:(r=e.selectSell,l=e.selectBuy)=>{Nt(t,n)(e.inputSell,r,l)}})},yt=(e,t,n)=>r=>{t({selectBuy:r}),mt({value:r,oppositeValue:e.selectSell,handleConvert:(r=e.selectBuy,l=e.selectSell)=>vt(t,n)(e.inputBuy,r,l)})},Nt=(e,t)=>(n,r,l)=>{e({inputSell:dt(n),selectBuy:l});const a=t.find((e=>e.code===l))?.buy||t.find((e=>e.code===r))?.sell;a&&e({inputBuy:String(ct(n,a,r===tt.RUB)||"")})},vt=(e,t)=>(n,r,l)=>{e({inputBuy:dt(n),selectSell:l});const a=t.find((e=>e.code===l))?.sell||t.find((e=>e.code===r))?.buy;a&&e({inputSell:String(ct(n,a,r===tt.RUB)||"")})},It={address:"Москва, ул.Ленина д.28",distance:"6км"},wt=l((({className:e="",context:t,title:l="Курсы обмена валют",button:a,...o})=>{const s=function(e){const{data:t}=e(Ye,Qe),n=t?.hits?.hits?.map((e=>e._source))||[];return n.length?Xe(n):n}(t.useAsyncData),c=s.filter((e=>e.buy));c.unshift({code:tt.RUB});const d=s.filter((e=>e.sell));return d.push({code:tt.RUB}),n($e,{context:t,className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,...o,children:n(ae,{context:t,title:n(i,{headingType:"h4",title:l,className:"whitespace-pre-wrap text-h4"}),children:r("div",{className:"flex",children:[r("div",{className:"mr-14 pt-4",children:[s?n(ot,{className:"mb-[30px]",exchangeCurrencyItems:s}):null,n(st,{...It})]}),s.length&&c.length&&d.length?n(bt,{className:"grow",context:t,currencyRatesBuy:c,currencyRatesSell:d,button:a}):null]})})})})),kt={"bg-white":"text-primary-main",transparent:"text-white"},Ct={"bg-white":"text-black",transparent:"text-white"},St=l((({className:e="",href:t,children:l,targetBlank:a,bgColor:o="bg-white",hideTitle:i})=>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(y,{image:{icon:"Logo"},className:`${kt[o]} w-10 h-[38px]`,asSVG:!0}),i?null:n("span",{className:`${Ct[o]} text-sm font-medium ml-2.5`,children:l||"Россельхозбанк"})]}))),$t=l((({className:e="",title:t="Мобильное приложение",description:l,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(St,{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-s font-medium mb-[3px]",children:t}),n("div",{className:"text-s text-secondary-text",children:l})]})]}):null}))),Dt=l((({className:e="",items:t,hasButton:l,context:a})=>{const o=a.useRouter(),{handlerDecorator:i}=a;return r("div",{className:e,children:[t?.length?t.map(Tt):null,l?n(Y,{version:"primary",className:"mb-6 w-full",...F({router:o,handlerDecorator:i},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),Tt=(e,t)=>{const{type:l,text:a,description:o}=e;return r("div",{className:"mb-4",children:[n("div",{children:Rt(l,a)}),n("div",{className:"mt-1 text-s-light text-secondary-text",children:o})]},String(t))},Rt=(e,t="")=>{switch(e){case"tel":return n("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Bt(t)}`,children:t});case"email":return n("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return n("span",{children:t})}},Bt=e=>e.replaceAll(/\D/g,""),Pt=l((({className:e="",index:t,text:r,href:l,target:a,onClick:o})=>n("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:l,target:a,onClick:o,children:r||`Документ ${t}`}))),_t=l((({title:e,links:t,className:l="",context:a})=>{const o=a.useRouter(),{handlerDecorator:i}=a;return r("div",{className:l,children:[n("span",{className:"text-primary-text font-medium text-sm",children:e}),t?.length?n("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>n(Pt,{index:t,className:"font-normal text-sm",...F({router:o,handlerDecorator:i},e)},String(t))))}):null]})})),At=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play"}],Lt=l((({href:e,version:t="primary"})=>{const{icon:r,label:l}=At.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};if(!r)return null;return n("a",{className:`flex items-center justify-center rounded-md w-14 h-14 group box-border ${"secondary"===t?"bg-secondary-light hover:bg-secondary-hover":"border-solid border-[1px] border-main-divider hover:border-transparent hover:bg-primary-main"} ${"primary"===t?"hover:text-black":""}`,href:e,"aria-label":l,target:"_blank",rel:"noopener noreferrer",children:r?n(y,{image:r,imageClassName:"group-hover:text-white",width:"24",height:"24",asSVG:!0}):null})})),Mt=l((({className:e,media:t,version:r,context:l})=>{const a=l.useRouter(),{handlerDecorator:o}=l;return n("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e||""}`,children:t?.map(((e,t)=>n(Lt,{version:r,...F({router:a,handlerDecorator:o},e)},String(t))))})})),Vt=l((({className:e="",index:t,text:r,href:l,target:a,onClick:o})=>n("a",{className:`text-xs text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:l,target:a,onClick:o,children:r||`Документ ${t}`}))),jt=l((({className:e,links:t,context:l})=>{const a=l.useRouter(),{handlerDecorator:o}=l;return r("div",{className:`${e||""}`,children:[n("div",{className:"py-6",children:n("span",{className:"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(Vt,{index:t,className:"font-normal",...F({router:a,handlerDecorator:o},e)},String(t))))}):null]})}));function Gt(e){const{data:t}=e(Ot(),Wt);return t||{}}async function Wt(){const e=await fetch(Ot());return await e.json()}function Ot(){return`/wcms-resources/${d.SITEMAP||"sitemap"}.json`}const Ut=l((({className:e,context:t,isMobile:l=!1})=>{const{term:a,setTerm:o}=t.useSearch(),i=l?"font-normal text-sm":"text-l-light",s=l?" placeholder-transparent font-normal":"font-light h-full",c=l?"some search":void 0;return r("form",{className:`font-sans 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:l?"w-[20px] h-[20px]":"w-[24px] h-[24px]",children:n(y,{image:"LoupeIcon",width:"24",height:"24"})}),a?null:n("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${i}`,children:"Поиск по сайту"})]}),n("input",{id:"search-bar-input",className:`h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none pr-[6%] border-main-divider focus:border-primary-text ${s}`,value:a,onChange:e=>o(e.target.value),type:"text",name:"search-bar-input",placeholder:c}),l?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(),o("")},children:n(y,{image:"CloseIcon",width:"24",height:"24"})}):n(Y,{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:"Найти"})})]})})),Et=l((({className:e="",context:t})=>n(Ut,{context:t,className:e,isMobile:!0}))),Ft=e=>e?.map((e=>({label:e.text||"",blocks:[{accordionBlockType:"LinkList",documents:e.items||[]}]}))),Ht=l((({className:e="",documents:t,relatedEnterprises:l,contacts:a,socialMedia:o,context:i,horizontalNavigationTitle:s})=>{const c=Gt(i.useAsyncData),d=c?.dispositions;return r("footer",{className:`font-sans px-4 py-[26px] bg-white ${e}`,children:[n(Dt,{className:"overflow-hidden",items:a,context:i,hasButton:!0}),n(Me,{context:i,className:"!p-0 mb-4",accordionItems:Ft(c.topItems)}),n("div",{children:d?.map(zt)}),n($t,{context:i,title:"Мобильное приложение",description:"Загрузить для IOS и Android"}),n(Et,{context:i,className:"grow"}),n(Mt,{className:"pb-4",media:o,context:i}),n(_t,{title:s,links:l,context:i}),n(jt,{links:t,context:i})]})})),zt=(e,t)=>{const{icon:l,href:a,text:o}=e;return r(Y,{version:"link",href:a,className:"flex text-sm mb-4",children:[l?n(y,{className:"pr-1",image:l,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-2.5 font-medium text-primary-text",children:o})]},`footer-${t}`)},Jt=(e,t,n=((e,t)=>t.startsWith(e)))=>n(j(e),(e=>(e||"").replace(O,""))(j(V(e)?t.href:t.pathname))),qt=e=>t=>Jt(t.href,e),Kt=e=>t=>t.items?.some(qt(e))||Jt(t.href,e)||((e,t)=>G(e)===G(t.href))(t.href,e),Qt=e=>t=>e?.href===t?.href,Yt=(e,t)=>{return(r=e,l=t,(r||[]).map((e=>l?.find(Qt(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(Qt(e))))));var n,r,l},Zt="absolute left-0 -bottom-3 w-full h-[2px]",Xt=l((({className:e="",text:t,href:l,target:a,active:o,onClick:i,children:s,bgColor:c="bg-white"})=>r("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:l,target:a,onClick:i,children:[n("span",{className:en(c,o),children:t||s}),o?n("div",{className:tn(c,o)}):null]}))),en=(e,t=!1)=>{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`},tn=(e,t=!1)=>t?`${"bg-white"===e?"bg-primary-main":e} ${Zt}`:Zt,nn=l((({context:e,burgerSubMenu:t,onClick:l,defaultLocation:a="",children:o})=>{const[i,s]=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:l,children:n(y,{image:"CloseIcon",width:"24",height:"24",asSVG:!0})}),r("button",{onClick:s,className:"flex items-center text-sm text-secondary-text p-0 mb-4 bg-transparent cursor-pointer",children:[n(y,{image:"GeolocationIcon",width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),i]}),o,n("div",{className:"mb-7",children:t?.map(rn)}),n(Et,{context:e,className:"grow"})]})})),rn=(e,t)=>{const{icon:l,href:a,text:o}=e;return r("a",{href:a,className:"flex text-sm mb-4 hover:text-primary-main",children:[l?n(y,{className:"text-primary-main pr-1",image:l,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-0.5 font-medium",children:o})]},`headerSubMenu-${t}`)},ln=l((({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(y,{image:{icon:"BurgerIcon",iconVersion:"bg-white"===t?"black":"white"},className:"text-primary-text",width:"24",height:"24",asSVG:!0})}),n(St,{bgColor:t})]}),n("button",{className:("bg-white"===t?"text-primary-main":"text-white")+" text-sm border-0 bg-transparent cursor-pointer",children:"Войти"})]}))),an=l((({className:e="",defaultLocation:t,bgColor:l="bg-white",context:a,topItems:o})=>{const i=a.useRouter(),s=Gt(a.useAsyncData),c=s?.dispositions,{handlerDecorator:d}=a,m=Yt(s.topItems,o).find(Kt(i))?.items,h=(e=>(t=[])=>{const n=t?.filter(qt(e));return n?.length?(r=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>r(e)>r(t)?e:t)))(n):void 0;var r})(i)(m),[u,p]=a.useState(!1),x=()=>p(!u);return r("header",{className:`${l} ${e}`,children:[r("div",{className:"container px-4 py-0 box-border",children:[n(ln,{onClick:x,bgColor:l}),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)=>on({...F({router:i,handlerDecorator:d},e),active:e===h,bgColor:l},t)))})})]}),u?n(nn,{context:a,onClick:x,burgerSubMenu:c,defaultLocation:t,children:n(Me,{context:a,accordionItems:Ft(s.topItems),className:"!p-0 mb-4"})}):null]})})),on=(e,t)=>n(Xt,{className:"mr-8 whitespace-nowrap text-sm",...e},String(t)),sn=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function cn(e=""){const t=sn(e);return t<=4?"S":t<=8?"M":"L"}function dn(e=""){const t=sn(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function mn(e=""){const t=sn(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const hn=l((({className:e,context:t,title:l,description:a="Блок в разработке...",...o})=>r($e,{context:t,className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${mn(e)} ${dn(e)} `,...o,children:[n(w,{context:t,className:"!p-0 max-w-[600px]",title:l,description:a,headlineVersion:cn(e)}),n("figure",{className:"m-0 min-w-[600px]",children:un()})]}))),un=(e=3)=>xn(100,e).map((e=>Math.floor(e))).map(pn),pn=(e,t)=>n("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),xn=(e,t)=>[e].concat(t>0?xn(e/1.618,t-1):[]),gn={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},bn=l((({block:e,context:t,className:r=""})=>n("section",{className:`flex grow-0 shrink-0 basis-full px-4 pt-6 ${gn[e?.version??"primary"]} ${r}`,role:"listitem",children:n("div",{className:"flex grow",children:n(ce,{context:t,...e})})}))),fn=l((({className:e,context:t,slides:r=[]})=>{const l=r.map((e=>e.productBlock));return n("section",{className:`font-sans bg-white overflow-hidden w-100 pb-6 ${e||""}`,children:n(T,{context:t,children:l.map(((e,r)=>n(bn,{block:e,context:t},String(r))))})})})),yn={primary:{background:"bg-white",title:"text-primary-text",description:"text-secondary-text",iconText:"text-secondary-text",iconBackground:"bg-main-divider",iconConnector:"bg-secondary-light"},secondary:{background:"bg-primary-main",title:"text-white",description:"text-white/80",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white"}},Nn=e=>yn[e],vn={normal:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",small:"h-[50px] w-[50px] min-w-[50px] min-h-[50px]"},In={normal:"min-h-[70px]",small:"min-h-[50px]"},wn=l((({className:e,title:t,description:l,showLines:a=!0,steps:o,size:s="normal",version:c="primary"})=>{const d=Nn(c);return r("section",{className:`box-border font-sans bg-white px-4 py-6 flex flex-col\n ${d.background} ${d.title} ${e||""}`,children:[t?n(i,{headingType:"h3",className:`text-center ${d.title}`,title:t}):null,l?n("p",{className:`text-m text-center ${d.description} ${t?"mt-2":""}`,children:l}):null,o?.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:o.map(kn(s,c,a))})}):null]})})),kn=(e,t,l)=>(a,o,i)=>{const s=i.length-1===o,c="normal"===e?"ml-[34px]":"ml-6",d=Nn(t);return n("div",{children:r("div",{className:"flex flex-row text-center relative",children:[r("div",{className:"overflow-hidden",children:[Cn(e,t),s?null:n("div",{className:`min-h-8 h-full w-[2px] ${l?d.iconConnector:""} ${c}`})]}),r("div",{className:`flex flex-col justify-center h-fit ${In[e]}`,children:[a.label?n("div",{className:"font-medium text-m-title-xs m-0 text-left mb-1",children:a.label}):null,a.description?n("div",{className:`text-s ${d.description} text-left`,children:a.description}):null]})]})},String(o))},Cn=(e,t)=>(r,l)=>{const a=Nn(t),o="normal"===e?"38":"27",i="normal"===e?"text-m-title":"text-m-title-xs";return n("div",{className:`${vn[e]} ${a.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`,children:n("span",{className:`font-medium flex self-center ${a.title} ${i}`,children:(s=r?.icon,Boolean(s?.icon||s?.src)?n(y,{image:r.icon,width:o,height:o,asSVG:!0}):n("span",{children:l+1}))})});var s},Sn=l((({title:e,icon:t})=>r("div",{className:"flex gap-2.5 mb-2",children:[e?n(i,{headingType:"h3",className:"font-medium",title:e}):null,t?n(y,{className:"ml-auto max-w-6 max-h-6",image:t,width:"24px",height:"24px"}):null]}))),$n=e=>e?.alt||e?.title||c[e?.icon?e.icon:""],Dn=l((({header:e,data:t})=>r("div",{className:"rounded-md border-main-stroke h-full box-border border p-4",children:[n(Sn,{...e}),t?.length?t.map(Tn):null]}))),Tn=({label:e,description:t,list:l,image:a,buttons:o},i)=>r("div",{children:[i>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,l?.items?.length?Rn(l):null,a?n(y,{image:{...a,className:"m-0"}}):null,o?.length?Bn(o):null]},String(i)),Rn=e=>n(le,{className:"flex flex-col justify-between items-start text-m-sm",version:"gray",items:e.items,isDotted:e.isDotted??!0}),Bn=e=>n("div",{children:e.map((({icon:e,rounded:t,...r},l)=>n(Y,{className:`mt-3 ${l>0&&t?"ml-2.5":""} ${e?"w-12 h-12":""}`,ariaLabel:$n(e),rounded:t,appendLeft:e?n(y,{image:e,width:"24px",height:"24px",asSVG:!0}):null,...r,"aria-label":e},String(l))))}),Pn=l((({tiles:e,context:t})=>n(T,{context:t,children:e.map(((e,t)=>n(Dn,{...e},String(t))))}))),_n=l((({tiles:e})=>n("div",{className:"flex flex-col gap-3.5",children:e.map(((e,t)=>n(Dn,{...e},String(t))))}))),An=l((({className:e,context:t,title:l,description:a,columns:o,rowHeaders:s,orientation:c="vertical"})=>{const d=Mn(o),m=Vn(s,d);return r("section",{className:`px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[l?n(i,{headingType:"h2",className:`text-center ${a?"mb-2":"mb-5"}`,title:l}):null,a?n("div",{className:"mb-5 text-center text-m-md",children:a}):null,m?.length?Ln(c,m,t):null]})}));function Ln(e,t,r){return"vertical"===e?n(_n,{tiles:t}):n(Pn,{context:r,tiles:t})}const Mn=e=>e?.[0].data?e[0].data:[],Vn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),jn={Accordion:Me,ComparisonTable:He,ExchangeRateTile:wt,Footer:Ht,Gallery:Ne,Header:an,Headline:w,LinkDocs:M,LinkList:De,MobileAppTile:$t,ProductBlock:pe,ProductGallery:fn,StepsBlock:wn,TariffsTable:An,TextBlock:ge,Placeholder:hn},Gn=l((({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:Wn()}))),Wn=()=>{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"})]})},On=l((({className:e,context:t,...l})=>{const a=t.useLikeService();return r($e,{tag:"div",context:t,className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,...l,children:[n(Gn,{onClick:a.like,ariaLabel:"Поставить отметку «лайк»"}),n(Gn,{onClick:a.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),n("span",{className:"select-none",children:a.likeCount})]})})),Un=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),En=l((({className:e="",context:t,blocksRegistry:l,data:a={},blockDecorator:o=Un})=>{const{style:i,blocks:s,slots:c={},likeControl:d,colorPalette:m="pc"}=a,{header:h}=c;return r("section",{className:`relative ${N(i)} ${e}`,"data-theme":m,children:[h?.blocks?.length?n("div",{className:`${N(h?.style)}`,children:h.blocks.map(((e,n)=>Fn({block:e,page:a,blockDecorator:o,blocksRegistry:l,context:t},n)))}):null,s?.length?n("div",{className:"container grid grid-cols-12 gap-1",children:s.map(((e,n)=>Fn({block:e,blockDecorator:o,blocksRegistry:l,context:t,page:a},n)))}):null,d?n("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:n(On,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t},"LikeControl")}):null]})}));function Fn({block:e,blockDecorator:t,blocksRegistry:r,context:l,page:a},o){const{type:i}=e;i&&i in r||console.warn(`No block with "${i}" is registered`);const s=r[i||"Placeholder"]||hn;return t({blockClassName:`scroll-mt-12 ${N(e.style)}`,block:e,render:e=>{const{version:t,content:r,anchor:c,labels:d}=e.block;return n(s,{className:e.blockClassName,version:t,context:l,page:a,anchor:c,labels:d,...r},`${i}-${o}`)}},`block-${o}`)}e.Blocks=jn,e.ContentPage=En,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=function(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(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:l}=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:l},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:l,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:l,UserID:a},body:JSON.stringify({node_id:r,user_name:a})}),{likes:o}=await n.json();return o||0}catch(e){return console.error(e),0}},dislike:async function(r){if(!r)return 0;const{token:l,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:l,UserID:a},body:JSON.stringify({node_id:r,user_name:a})}),{likes:o}=await n.json();return o||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.projectSettings=d,e.setup=t,e.url=W,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,...l}={})=>{const a=Object.assign({},l,r?{innerHTML:r.__html}:{});return e(t,a,"string"!=typeof t?()=>n:n)}))};const n=(...e)=>t._jsx(...e),r=(...e)=>t._jsxs(...e),l=e=>(e._tmpl||(e._tmpl=function(t,n){const{children:r,...l}=t||{},a=n?.slots?.default,o=r||a&&a();return e(Object.assign(l,o&&{children:o}),n)},e._tmpl.inheritAttrs=!1),e._tmpl);const a="likesToken";const o={h0:"text-m-title",h1:"text-m-title",h2:"text-m-title",h3:"text-h6",h4:"text-m-title-xs",h5:"text-m-title-xs",h6:"text-m-title-xs"},i=l((e=>{const{className:t,headingType:r="h3",title:l,as:a="h3"}=e;return n(a,{className:`font-sans font-medium m-0 ${o[r]} ${t||""}`,children:l})}));var s,c;!function(e){e.ActualBalanceIcon="ActualBalanceIcon",e.AirPlane="AirPlane",e.AppleIcon="AppleIcon",e.ArrowDownIcon="ArrowDownIcon",e.ArrowLeftIcon="ArrowLeftIcon",e.ArrowUpIcon="ArrowUpIcon",e.AtmIcon="AtmIcon",e.BankIcon="BankIcon",e.BurgerIcon="BurgerIcon",e.Calendar2Icon="Calendar2Icon",e.CalendarCircleIcon="CalendarCircleIcon",e.CalendarIcon="CalendarIcon",e.CalendarTickIcon="CalendarTickIcon",e.CardIcon="CardIcon",e.CardPosIcon="CardPosIcon",e.CardTickIcon="CardTickIcon",e.CardWithGemIcon="CardWithGemIcon",e.CarIcon="CarIcon",e.ChartSquareIcon="ChartSquareIcon",e.CinemaIcon="CinemaIcon",e.ClockIcon="ClockIcon",e.CloseIcon="CloseIcon",e.ComfortableCompIcon="ComfortableCompIcon",e.CreditCardsIcon="CreditCardsIcon",e.DiscountShapeIcon="DiscountShapeIcon",e.DocIcon="DocIcon",e.DocIconMonoColor="DocIconMonoColor",e.DocsIcon="DocsIcon",e.DocumentTextIcon="DocumentTextIcon",e.DollarIcon="DollarIcon",e.DoneIcon="DoneIcon",e.EarthIcon="EarthIcon",e.EmptyWalletChangeIcon="EmptyWalletChangeIcon",e.EmptyWalletIcon="EmptyWalletIcon",e.EuroIcon="EuroIcon",e.GeolocationIcon="GeolocationIcon",e.GlassIcon="GlassIcon",e.GlobalIcon="GlobalIcon",e.GpsIcon="GpsIcon",e.GridIcon="GridIcon",e.InterestGrowthIcon="InterestGrowthIcon",e.InterestIcon="InterestIcon",e.JCBIcon="JCBIcon",e.Logo="Logo",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.PackA4="PackA4",e.PassSendIcon="PassSendIcon",e.PercentageRoundIcon="PercentageRoundIcon",e.PercentageSquareIcon="PercentageSquareIcon",e.PersonalCardIcon="PersonalCardIcon",e.PlayMarketIcon="PlayMarketIcon",e.PlusIcon="PlusIcon",e.PowerIcon="PowerIcon",e.Profile2UserIcon="Profile2UserIcon",e.ProfileIcon="ProfileIcon",e.PumpkinIcon="PumpkinIcon",e.RoundRubleIcon="RoundRubleIcon",e.SafeIcon="SafeIcon",e.ShieldTickIcon="ShieldTickIcon",e.SignDocsIcon="SignDocsIcon",e.SmallClockIcon="SmallClockIcon",e.SoundIcon="SoundIcon",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",e.WateringCan="WateringCan"}(s||(s={})),function(e){e.ActualBalanceIcon="Деньги",e.AirPlane="Самолет",e.AppleIcon="Лого «Apple»",e.ArrowDownIcon="Стрелка 'Вниз'",e.ArrowLeftIcon="Стрелка",e.ArrowUpIcon="Стрелка вверх",e.AtmIcon="Банкомат",e.BankIcon="Банк",e.BurgerIcon="Бургер",e.Calendar2Icon="Календарь 2",e.CalendarCircleIcon="Скруглённый календарь",e.CalendarIcon="Календарь",e.CalendarTickIcon="Календарь с галочкой",e.CardIcon="Кред. карта",e.CardPosIcon="Кред. карта под наклоном",e.CardTickIcon="Кред. карта с галочкой",e.CardWithGemIcon="Карта с драгоценностями",e.CarIcon="Машина",e.ChartSquareIcon="Деньги внутри кошелька",e.CinemaIcon="Кино",e.ClockIcon="Часы",e.CloseIcon="Крестик",e.ComfortableCompIcon="Кресло",e.CreditCardsIcon="Кредитные карты",e.DiscountShapeIcon="Скидка",e.DocIcon="Документ",e.DocIconMonoColor="Документ (одноцветный)",e.DocsIcon="Документы",e.DocumentTextIcon="Документ с текстом",e.DollarIcon="Доллар",e.DoneIcon="Зелёная 'галочка'",e.EarthIcon="Земля",e.EmptyWalletChangeIcon="Пустой кошелёк с возвратом",e.EmptyWalletIcon="Пустой кошелёк",e.EuroIcon="Евро",e.GeolocationIcon="Геолокация",e.GlassIcon="Зеркало",e.GlobalIcon="Глобус",e.GpsIcon="Gps",e.GridIcon="Сетка (белая)",e.InterestGrowthIcon="Диаграмма роста",e.InterestIcon="Скидка",e.JCBIcon="JCB",e.Logo="Logo",e.LoupeIcon="Лупа",e.MasterCardIcon="MasterCard",e.MinusIcon="Минус",e.MirIcon="МИР",e.MoneyIcon="Деньги",e.MoneyInsuranceIcon="Денежное страхование",e.MonitorMobileIcon="Монитор и мобильный",e.NewDocIcon="Новый документ",e.OfficeIcon="Офис",e.OkIcon="Лого «Одноклассники»",e.PackA4="PackA4",e.PassSendIcon="Бизнес",e.PercentageRoundIcon="Проценты (круг.)",e.PercentageSquareIcon="Проценты",e.PersonalCardIcon="Персональная карта",e.PlayMarketIcon="Лого «PlayMarket»",e.PlusIcon="Плюс",e.PowerIcon="Щит",e.Profile2UserIcon="Профиль, 2 персоны",e.ProfileIcon="Профиль",e.PumpkinIcon="Тыква",e.RoundRubleIcon="Рубль (круг.)",e.SafeIcon="Сейф",e.ShieldTickIcon="Безопасность",e.SignDocsIcon="Подписанные документы",e.SmallClockIcon="Маленькие часы",e.SoundIcon="Звук",e.TelegramIcon="Лого «Telegram»",e.UnionPayIcon="UnionPay",e.UserTickIcon="Пользователь",e.VisaIcon="Visa",e.VKIcon="Лого «VK»",e.WalletAdd2Icon="Пополнение карты",e.WalletAddIcon="Кошелёк с плюсом",e.WalletIcon="Кошелёк",e.WalletWithMoneyIcon="Кошелёк с деньгами",e.WateringCan="Добавить продукт"}(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={normal:"text-primary-main",black:"text-black",white:"text-black invert"},h=l((({className:e="",imageClassName:t="",name:l="",alt:a=`Иконка ${c[l]||l}`,title:o=a,iconVersion:i="normal",asSVG:s,...h})=>{const u=`${d.CDN||""}icons/${l}.svg`;return s?r("svg",{className:e,...h,"aria-hidden":"true",children:[o?n("title",{children:o}):null,a?n("desc",{children:a}):null,n("use",{className:`${m[i]} ${t}`,href:`${u}#icon`,xlinkHref:`${u}#icon`})]}):n("img",{className:e,src:u,alt:a,title:o,...h,"aria-hidden":"true"})}));function u(e){return"string"==typeof e?"normal":e.iconVersion||"normal"}const p=(e,t)=>e.media&&t.media?e.media-t.media:0,x=l((({className:e="",image:t,imageClassName:l="",isMobile:a=!1})=>{if(!t)return null;return r("picture",{className:`${a?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(p).map((({src:e,format:t,media:r,size:l},a)=>n("source",{srcSet:e,type:b(t),media:r?`(max-width: ${r}px)`:"",...l},`${a}_${e}`))):null,g(t,l,a)]})})),g=(e,t="",r=!1)=>{const l=e.title||"",a=e.alt||e.title,o=r?"m-auto":"m-0";return n("img",{src:e.src,className:`${o} ${t}`,alt:a,title:l,...e.size})};function b(e){return e?`image/${String(e)}`:void 0}const f=l((({className:e="",image:t,imageClassName:r="",isMobile:l,...a})=>{if(!t)return null;const o="string"==typeof t?t:t.icon;return o||""===o?o.length?n(h,{className:e,imageClassName:r,iconVersion:u(t),name:o,...a}):null:n(x,{className:e,imageClassName:r,image:t,isMobile:l})})),y=l((({className:e="",image:t})=>n(f,{className:e,image:t,isMobile:!0})));function N(e){return e?e.filter(Boolean).join(" "):""}const v={left:"text-left",center:"text-center",right:"text-right"},I={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"}},w=l((({bgColorHeadline:e="transparent",className:t="",title:l,description:a,image:o,align:s="left"})=>{const c=I[e];return r("section",{className:`px-4 py-6 flex flex-col gap-2.5 ${c.background} ${t}`,children:[l?n(i,{headingType:"h2",className:`${c.text} ${v[s]}`,title:l}):null,a?n("p",{className:`font-normal text-m ${c.description} ${v[s]} `,children:a}):null,o?.src&&n("div",{className:"mt-2.5 mx-auto flex justify-center",children:n(y,{image:o})})]})})),k=l((({children:e,activeIndex:t,indexFraction:r,showDots:l})=>{const a=e=>n=>{if(e===t)return;const r=n.currentTarget.parentElement?.previousElementSibling;r?.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})};return l&&e?.length?n("div",{className:"flex gap-2 mx-auto mt-5 w-fit",children:e?.map(((e,l)=>n("div",{onClick:a(l),className:"bg-primary-main opacity-30 w-1.5 h-1.5 min-w-1.5 min-h-1.5 rounded-full",style:C(l,t,r),"aria-hidden":!0},String(l))))}):null})),C=(e,t,n)=>{if(e<t||e>t+1)return;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"}},S=l((({className:e="",children:t,...r})=>n("div",{className:`snap-center snap-always min-w-full box-border ${e}`,role:"listitem",...r,children:t}))),$=e=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e}px`}),D=l((({className:e="",children:t,activeIndex:r,onScroll:l,gap:a=14,padding:o=16})=>n("div",{className:`overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...$(o),gap:`${a}px`},role:"list",onScroll:l,children:t?.length?t?.map(((e,t)=>n(S,{style:$(o/4),"aria-current":Boolean(r===t),children:e},String(t)))):n(S,{children:t})}))),T=l((({className:e,context:t,children:l,gap:a=14,padding:o=16,showDots:i=!0,onSlideChange:s})=>{const[c,d]=t.useState(0),[m,h]=t.useState(0),u={activeIndex:c,indexFraction:m,showDots:i,children:l};return r("div",{className:e,children:[n(D,{gap:a,padding:o,activeIndex:c,onScroll:e=>{const{scrollLeft:t,clientWidth:n,childElementCount:r,scrollWidth:l,children:i}=e?.currentTarget,m=i[0].offsetWidth-o/2,u=(({gap:e,padding:t,clientWidth:n,scrollWidth:r,childElementCount:l,itemWidth:a})=>{const o=r-n;if(2===l)return[[0,o],[o,r]];const i=a+e,s=n-e-t,c=l-2,d=new Array(l).fill(0).map(((e,t)=>0===t||t===c?[t>0?o-s:0,t>0?o:s]:[(t-1)*i+s,t*i+s]));return d[l-1]=[o,r],d})({gap:a,padding:o,clientWidth:n,scrollWidth:l,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,l]=t[n];return{index:n,fraction:(e-r)/(l-r)}})(t,u);p!==c&&s&&s(),d(p),h(x)},children:l}),n(k,{...u})]})})),R=l((({className:e,iconClassName:t,textClassName:l,suffixClassName:a,doc:o,icon:i})=>{const{text:s,fileSize:c,...d}=o;return r("a",{className:e,role:"link",...d,children:[i?n(y,{className:t,image:i,width:"24px",height:"24px",asSVG:!0}):null,s?r("span",{className:l,children:[s,n("span",{className:a,children:d?.href&&B(P(d.href),c)})]}):null]})})),B=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),P=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},_=l((({className:e="",doc:t,icon:r})=>n(R,{className:`flex h-full box-border ${e}`,iconClassName:"mr-3 min-w-6 min-h-6",doc:t,icon:r}))),A=l((({context:e,hasBorder:t=!0,documents:r,icon:l})=>n(T,{context:e,className:"text-s text-primary-main mt-5",children:r?.length?r.map(((e,r)=>n(_,{className:t?"rounded-md border-main-stroke border border-solid p-4":"",doc:e,icon:l},String(r)))):null}))),L=l((({hasBorder:e=!0,documents:t,icon:r})=>n("div",{className:"text-s text-primary-main flex flex-col mt-5 "+(e?"gap-3.5":"gap-2"),role:"list",children:t?.length?t.map(((t,l)=>n("div",{role:"listitem",children:n(_,{className:e?"rounded-md border-main-stroke border border-solid p-4":"",doc:t,icon:r})},String(l)))):null}))),M=l((({className:e="",context:t,title:l,description:a,icon:o={icon:"DocIconMonoColor"},documents:i,orientation:s="vertical",hasBorder:c=!0})=>r("section",{className:`font-sans text-primary-text py-6 px-4 bg-white overflow-x-hidden ${e}`,children:[n(w,{className:"!p-0 "+(a?"gap-2":"gap-5"),title:l,description:a,context:t,align:"center"}),"vertical"===s?n(L,{hasBorder:c,documents:i,icon:o}):n(A,{context:t,hasBorder:c,documents:i,icon:o})]}))),V=e=>e?.includes("//"),j=e=>(e||"").replace(/\/?\?.*/,""),G=e=>{if(!e||!V(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t};var W=Object.freeze({__proto__:null,isURL:V,withoutQuery:j,getOrigin:G,getHash:e=>{if(!e||!V(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0},isHash:e=>e?.startsWith("#")});const O="/mobile",U=(e,t)=>{if(!e)return e;const n=G(t?.href);return n?e.replace(n,"")||"/":e},E=e=>e;function F({router:e,handlerDecorator:t=E},n){const r=((e,t)=>{if(!e)return e;const n=U(e,t)||"",r=t?.pathname.startsWith(O);return r&&!V(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:r,"aria-label":n.text,onClick:t((t=>{const l=r&&!V(r),a=!n.target||"_self"===n.target;l&&a&&(t?.preventDefault(),e.push(r))}),n)}}const H=l((e=>{const{text:t,aboveText:l,appendLeft:a,appendRight:o}=e;return r("div",{className:z(e),children:[a||null,J(e)?r("div",{children:[n("div",{className:"text-xs text-left",children:l}),n("div",{className:"text-left "+(l?"text-s -mt-0.5":"text-l"),children:t})]}):null,o||null]})})),z=e=>{const{version:t,aboveText:n,rounded:r}=e;if("link"===t)return"";const l="gap-2 "+(n?"py-2.5 px-7":"py-4 px-9");return["flex items-center justify-center",J(e)?l:"h-12 w-12",r?"rounded-full":""].join(" ")},J=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),q={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"},K={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},Q="w-full text-center font-sans select-none",Y=l((({className:e,text:t,aboveText:r,appendLeft:l,href:a,target:o,onClick:i,children:s,disabled:c,rounded:d,version:m="primary",ariaLabel:h,...u})=>{const p=s??n(H,{text:t,aboveText:r,appendLeft:l,rounded:d,version:m});return c?n("div",{role:"button","aria-disabled":"true","aria-label":h,tabIndex:-1,className:`inline-block ${Q} ${K[m]||""} ${d?"rounded-full":"rounded-md"} ${e||""}`,children:p}):n("a",{className:`${Q} inline-block cursor-pointer no-underline ${q[m]||""} ${d?"rounded-full":"rounded-md"} ${e||""}`,href:a,target:o,onClick:i,"aria-label":h,role:a?"link":"button",...u,children:p})})),Z=l((({context:e,className:t="",buttons:r})=>{const{handlerDecorator:l}=e,a=e.useRouter();return r&&r?.length?n("div",{className:t,children:r.map(((e,t)=>function({icon:e,iconRight:t,...r},l){if(!r?.text)return null;return n(Y,e?{appendLeft:n(y,{image:e,width:"24",height:"24",asSVG:!0}),appendRight:n(y,{image:t,width:"24",height:"24",asSVG:!0}),...r}:{...r},String(l))}(F({router:a,handlerDecorator:l},e),t)))}):null}));const X={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=l((({className:e="",isDotted:t=!0,children:l,version:a="primary"})=>r("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t?n("div",{className:ne(a)}):null,n("span",{children:l})]}))),ne=e=>`${X[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"},le=l((e=>{const{className:t="",itemClassName:r,isDotted:l,items:a,version:o="primary"}=e;return n("section",{className:`${re[o]} ${t}`,role:"list",children:a?.length?a.map(((e,t)=>n(te,{className:r,isDotted:l,version:o,children:e},String(t)))):null})})),ae=l((({className:e="",title:t="",children:l,buttons:a,image:o})=>r("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,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:l}),a?n("div",{children:a}):null]}),o]})]}))),oe={primary:"text-primary-text",secondary:"text-white"},ie={primary:"text-secondary-text",secondary:"text-white"};function se(e){let t="text-primary-main";return"secondary"===e&&(t="text-black"),`w-6 h-6 rounded-full box-border ${t}`}const ce=l((({className:e="",context:t,title:l,headlineVersion:a="L",description:o,benefits:i,benefitsVersion:s="normal",buttons:c,image:d,items:m,version:h="primary",isDotted:u=!0,label:p})=>r("div",{className:`w-full ${e}`,children:[r("div",{children:[p?he(p,h):null,n(w,{context:t,className:"!p-0 max-w-[600px]",title:l,description:o,bgColorHeadline:h,headlineVersion:a}),r(ae,{context:t,buttons:c?.length?n(Z,{context:t,buttons:c,className:"flex flex-col mt-5 gap-2.5"}):null,children:[i?.filter((e=>e.label))?.length?n("div",{className:"mt-3",children:i.map(((e,t)=>function({benefit:e,version:t="primary"},l){const a="secondary"===t;return r("div",{className:"flex gap-3 items-center mb-2.5 last:mb-0",children:[e.icon?n(y,{className:se(t),image:{...e?.icon,iconVersion:a?"white":"normal"},width:"24",height:"24",asSVG:!0}):null,n("div",{className:`text-l m-0 ${oe[t]}`,children:e.label}),e.description&&n("div",{className:`text-s ${ie[t]}`,children:e.description})]},String(l))}({benefit:e,version:h,benefitsVersion:s},t)))}):null,m?.length?n(le,{className:"mt-3 text-m",items:m,version:h,isDotted:u}):null]})]}),de(d)]})));function de(e){return e?.src?n(y,{imageClassName:"mt-5 mx-auto block",image:{className:"block",...e}}):null}const me={primary:"text-primary-main border-secondary-hover",secondary:"text-white/80"},he=(e,t)=>n("div",{className:`px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid w-fit ${me[t]}`,children:e}),ue={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},pe=l((e=>{const{className:t="",version:r="primary"}=e;return n("section",{className:`font-sans bg-white px-4 py-6 ${ue[r]} ${t}`,children:n(ce,{...e})})})),xe={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=l((({title:e,description:t,blockVersion:l="primary",iconVersion:a,image:o,className:i="",items:s,isDotted:c=!0})=>{const d=xe[l],m="secondary"===l?"secondary":"gray";return r("section",{className:`font-sans px-4 py-[18px] flex flex-col ${d.background} ${i}`,children:["small"===a?be(d.icon):null,"big"===a?fe(o):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,s?.length?n(le,{className:"mt-1 text-m-md",items:s,isDotted:c,version:m}):null]})]})}));function be(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 fe(e){return e?.src?n(y,{className:"pb-3 mr-auto",image:e}):null}const ye={primary:"bg-white",secondary:"bg-primary-main text-white"},Ne=l((({context:e,title:t,description:l,cards:a=[],className:o,orientation:s="horizontal"})=>r("section",{className:`relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${o}`,children:[r("div",{className:"flex flex-col items-center mb-5",children:[t?n(i,{headingType:"h3",className:`text-center ${l?"mb-2":"mb-5"}`,title:t}):null,l?n("div",{className:"font-normal text-m-md max-w-[600px] text-center mb-5",children:l}):null]}),ve(s,a,e)]})));function ve(e,t,r){return"horizontal"===e?n(T,{context:r,children:t?.map(Ie)}):n("div",{className:"grid gap-[14px]",children:t?.map(Ie)})}function Ie(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 ${ye[e.version??"primary"]}`,children:[r("div",{children:[e.image?.src?n("div",{className:"flex justify-center",children:n(y,{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?we(e):null,e.items?.length?ke(e.items,e.isDotted,e.version):null]}),e?.button?.text?(l=e.button,n(Y,{className:"mt-3",appendLeft:l?.icon&&n(y,{image:l?.icon,width:"24px",height:"24px",asSVG:!0}),...l})):null]},t);var l}function we(e){return n("div",{className:"text-secondary-text mt-1 text-m-sm "+("secondary"===e.version?"text-white opacity-80":""),children:e.description})}function ke(e,t,l="primary"){return n("section",{className:"mt-3",children:e.map(((e,a)=>r("div",{children:[t?n("div",{className:ne(l)}):null,n("span",{className:"text-m-md font-medium",children:e.title}),n("span",{className:"text-m-sm pl-2 "+("primary"===l?"text-secondary-text":""),children:e.text})]},String(a))))})}class Ce{static inst=new Ce;subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]||=[],this.subscribers[e]?.push(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){this.subjectsStateMap[e]=t,this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}const Se=e=>{if(!e.length)return;const[t]=e;t.isIntersecting},$e=l((({anchor:e,className:t,context:r,children:l,tag:a="section",labels:o})=>{const i=a,{IntersectionObserverTag:s}=r,[c,d]=r.useState(!0);return r.useEffect((()=>Ce.inst.subscribe("tab",(e=>{d(!o?.length||!e.label||o.includes(e.label))}))),[o]),c?e?n(s,{tag:a,className:t,observerCallback:Se,observerOptions:{threshold:1},anchor:e,children:l}):n(i,{className:t,children:l}):null})),De=l((({className:e="",documents:t,...r})=>n($e,{className:`font-sans bg-white mt-[10px] ${e}`,...r,children:n("ul",{className:"flex flex-col text-sm text-secondary-text p-0",children:t?.length?Te(t):null})}))),Te=e=>e.map(((e,t)=>{const{text:r,...l}=e;return n("li",{className:"mb-4 list-none",children:n("a",{className:"hover:text-primary-main",role:"link",...l,children:r||null})},`list_item_${String(t)}`)})),Re={Headline:w,LinkDocs:M,TextBlock:ge,ProductBlock:pe,Gallery:Ne,LinkList:De},Be=({blocks:e,context:t,className:n=""})=>e?.length?e.map(Pe({context:t,className:n})):null,Pe=({context:e,className:t})=>(r,l)=>{if(!r)return null;const{style:a,blockListType:o,...i}=r;if(!o||!(o in Re))return null;const s=N(a);return n(Re[o],{className:`${t} ${s}`,context:e,...i},`block_${l}`)},_e=l((({blocks:e,context:t})=>n("div",{className:"flex flex-wrap transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0",children:Be({context:t,blocks:e,className:"!px-0"})}))),Ae=l((({label:e,labelIcon:t,blocks:l,bordered:a,context:o})=>{const{hasContent:i,icon:s,handleToggle:c}=(({context:e,blocks:t,initialState:n=!1})=>{const[r,l]=e.useState(n),a=t?.length;return{isActive:r,hasContent:a,icon:r?"MinusIcon":"PlusIcon",handleToggle:e=>{const t=e.currentTarget;if(!t)return;l(!r);const n=t.nextSibling;n.style.maxHeight=n.style.maxHeight?"":`${n.scrollHeight}px`}}})({context:o,blocks:l});return r("li",{className:`${Le(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 ${i?"group cursor-pointer":""}`,onClick:c,children:[r("span",{className:"text-m-title-xs pr-2.5 font-medium flex "+(i?"group-hover:text-primary-main":""),children:[t?n(y,{image:t,width:"24",height:"24",asSVG:!0,className:"mr-3"}):null,e]}),i?n(y,{image:s,width:"24",height:"24",asSVG:!0}):null]}),i?n(_e,{blocks:l,context:o}):null]})}));function Le(e){return e?"border p-4 rounded mb-4":"border-0 border-b last:border-b-0"}const Me=l((({title:e,description:t,accordionItems:l,context:a,className:o="",bordered:s})=>r("section",{className:`py-6 px-4 font-sans bg-white text-primary-text ${o}`,children:[e?n(i,{headingType:"h3",className:"mb-2 text-center",title:e}):null,t?n("div",{className:"mb-5 text-m-md text-center",children:t}):null,l?.length?n("ul",{className:"list-none m-0 p-0",children:l.map(((e,t)=>n(Ae,{...e,context:a,bordered:s},`AccordionItem_${t}`)))}):null]}))),Ve=(e=!1)=>e?"text-white":"",je=(e=!1)=>"text-m-sm mb-3.5 "+(e?"text-white":"text-secondary-text/80"),Ge=l((({icon:e,image:t,title:l,subtitle:a,isFillGradient:o})=>r("div",{role:"columnheader",children:[e?n(y,{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(y,{image:t})}),l?n(i,{headingType:"h4",className:Ve(o),title:l}):null,a?n("div",{className:je(o),children:a}):null]}))),We=l((({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(Oe(r,t))})}))),Oe=(e,t)=>({label:l,description:a},o)=>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:[l?n("div",{className:"text-right "+(e?"text-white":""),children:l}):null,a?n("div",{className:"text-right "+(e?"text-white/80":"text-secondary-text"),children:a}):null]})]},String(o)),Ue=l((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:a,showRow:o,onToggleColumn:i})=>{const s=t?.slice(0,o?t.length:l),c=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(Ge,{...e,isFillGradient:a}),s?.length?s.map((({rowHeader:e,cell:t},r)=>n(We,{cell:t,rowHeader:e,isFillGradient:a},String(r)))):null,o&&Ee({header:e,buttonVersion:c}),Fe({onToggleColumn:i,isFillGradient:a,showRow:o})]})})),Ee=({header:e,buttonVersion:t})=>n(Y,{href:e.link.href,target:e.link.target,version:t,className:"font-medium text-m-sm mt-4 py-[11px]",children:e.link.text}),Fe=({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?"Скрыть":"Показать описание"})}),He=l((({className:e,context:t,title:l,rowHeaders:a,columns:o,visibleRowLength:s=0,isColoredFirstColumn:c=!1,orientation:d="vertical"})=>{const m=o?.map((({data:e,header:t})=>({header:t,column:e?.map(((e,t)=>({cell:e,rowHeader:a?.[t]?.title})))})))||[],[h,u]=t.useState(new Array(o?.length).fill(!s));return r("section",{className:`bg-white font-sans px-4 py-6 overflow-hidden text-primary-text relative ${e||""}`,children:[l?n(i,{headingType:"h3",className:"font-medium text-center m-0 mb-5",title:l}):null,ze({tableData:m,context:t,visibleRowLength:s,isColoredFirstColumn:c,columnsViewState:h,handleToggleColumn:e=>{h[e]=!h[e],u([...h])},orientation:d,setColumnsViewState:u})]})})),ze=({context:e,tableData:t,visibleRowLength:r,isColoredFirstColumn:l,columnsViewState:a,handleToggleColumn:o,orientation:i="horizontal",setColumnsViewState:s})=>n("div",{role:"table",children:t?.length?Je({orientation:i,context:e,columnsViewState:a,setColumnsViewState:s,tableData:t,visibleRowLength:r,isColoredFirstColumn:l,handleToggleColumn:o}):null}),Je=({orientation:e,context:t,columnsViewState:r,setColumnsViewState:l,tableData:a,visibleRowLength:o,isColoredFirstColumn:i,handleToggleColumn:s})=>"horizontal"===e?n(T,{context:t,onSlideChange:Ke(r,l),children:a.map(qe({context:t,visibleRowLength:o,isColoredFirstColumn:i,columnsViewState:r,handleToggleColumn:s}))}):a.map(qe({context:t,visibleRowLength:o,isColoredFirstColumn:i,columnsViewState:r,handleToggleColumn:s})),qe=({context:e,visibleRowLength:t,isColoredFirstColumn:r,columnsViewState:l,handleToggleColumn:a})=>(o,i)=>n(Ue,{context:e,visibleRowLength:t,showRow:l[i],header:o.header,columnData:o.column,isFillGradient:0===i&&r,onToggleColumn:()=>a(i)},String(i)),Ke=(e,t)=>()=>{t(new Array(e.length).fill(!1))};async function Qe(){try{const e=await fetch(Ye,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ze)});return await e.json()}catch(e){return console.error(e),Promise.resolve()}}const Ye="https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000",Ze={query:{bool:{must:[{term:{russian_region_code:"77"}},{term:{from_volume:"0"}},{terms:{currency_pair:["USD/RUB","EUR/RUB"]}}]}}},Xe=e=>e.reduce(((e,t)=>{const n=t.currency_first?.code;return e.some((e=>e.code===n))||e.push({code:n,buy:et(Number(t.rate_buy)),sell:et(Number(t.rate_sell))}),e}),[]),et=e=>Math.round(1e3*e)/1e3;var tt;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(tt||(tt={}));const nt=new Intl.NumberFormat("ru",{style:"currency",currency:tt.RUB}),rt=e=>e?nt.format(e):"",lt="text-left text-m text-secondary-text",at={USD:"DollarIcon",EUR:"EuroIcon"},ot=l((({className:e,exchangeCurrencyItems:t})=>r("table",{className:`h-fit w-fit ${e}`,children:[n("thead",{children:r("tr",{children:[n("th",{className:lt,children:"Валюта"}),n("th",{className:`${lt} pl-11`,children:"Купить"}),n("th",{className:`${lt} pl-11`,children:"Продать"})]})}),n("tbody",{children:t.map((e=>it(e)))})]}))),it=e=>{const t=e?.code;return r("tr",{className:"pb-1 text-h6",children:[n("td",{className:"pt-4",children:r("div",{className:"flex items-center",children:[t?n(y,{image:{icon:at[t]},width:"24",height:"24"}):null,n("span",{className:"ml-2",children:t})]})}),n("td",{className:"pt-4 pl-11",children:rt(e?.sell)}),n("td",{className:"pt-4 pl-11",children:rt(e?.buy)})]},t)},st=l((({className:e="",address:t,distance:l})=>r("div",{className:`flex ${e}`,children:[n(y,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),r("div",{className:"ml-3",children:[t?n("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,l?r("p",{className:"text-secondary-text m-0 text-m",children:["Курс указан для ближайшего офиса - ",l]}):null]})]}))),ct=(e,t,n)=>{const r=Number(dt(e))*Math.pow(t,n?-1:1);return Number.isInteger(r)?r:((e,t=2)=>{const n=Math.pow(10,t);return Math.round(parseFloat(String(e))*n)/n})(r)},dt=e=>e.replace(/[^\d.,]/g,"").replace(",","."),mt=e=>{return(t=[[e=>e.value!==tt.RUB&&e.oppositeValue!==tt.RUB,()=>e.handleConvert(e.value,tt.RUB)],[e=>e.value===tt.RUB&&e.oppositeValue===tt.RUB,()=>e.handleConvert(e.value,tt.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,n]=t.find((([t])=>t(e)))||[];return n})(e)?.();var t},ht=l((({className:e="",id:t,name:r,type:l="text",placeholder:a,pattern:o,value:i,onChange:s})=>n("input",{className:e,id:t,name:r||t,type:l,pattern:o,placeholder:a,value:i,onChange:e=>{const t=e.target.validity.valid?e.target.value:i;s(t)}}))),ut={background:"url('/icons/ArrowDownIcon.svg') no-repeat right 16px top 50%"},pt=l((({className:e="",id:t,name:r,children:l,value:a,onChange:o})=>n("select",{className:`appearance-none ${e}`,style:ut,id:t,name:r||t,value:a,onChange:e=>o(e.target.value),children:l}))),xt=l((({className:e="",value:t,selected:r,children:l})=>n("option",{className:e,value:`${t}`,selected:r,children:l})));function gt(e){const{placeholder:t,rates:l,selected:a,value:o,setValue:i,setSelected:s}=e;return r("div",{className:"relative flex items-center",children:[n(ht,{className:"shrink-0 h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12",placeholder:t,type:"text",value:o,onChange:i}),l.length?n(pt,{className:"shrink-0 w-20 h-9 -translate-x-8 bg-transparent",value:a,onChange:e=>s(e),children:l.map(((e,t)=>n(xt,{value:e.code,children:e.code},String(t))))}):null]})}const bt=l((({context:e,className:t="",currencyRatesBuy:l,currencyRatesSell:a,button:o})=>{const{useRouter:i,handlerDecorator:s}=e,c=i(),[d,m]=e.useState({inputSell:"",inputBuy:"",selectSell:l?.[0]?.code||tt.RUB,selectBuy:a?.[0]?.code||tt.USD}),h=e=>{m((t=>({...t,...e})))};return r("div",{className:`grid gap-[18px] pt-2 ${t}`,children:[gt({placeholder:"Хочу продать",rates:l,selected:d.selectSell,setSelected:ft(d,h,a),value:d.inputSell,setValue:e=>Nt(h,a)(e,d.selectSell,d.selectBuy)}),gt({placeholder:"Получу",rates:a,selected:d.selectBuy,setSelected:yt(d,h,l),value:d.inputBuy,setValue:e=>vt(h,l)(e,d.selectBuy,d.selectSell)}),o?.text?n(Y,{className:"py-4 mr-1",version:o?.version,...F({router:c,handlerDecorator:s},o),children:o.text}):null]})})),ft=(e,t,n)=>r=>{t({selectSell:r}),mt({value:r,oppositeValue:e.selectBuy,handleConvert:(r=e.selectSell,l=e.selectBuy)=>{Nt(t,n)(e.inputSell,r,l)}})},yt=(e,t,n)=>r=>{t({selectBuy:r}),mt({value:r,oppositeValue:e.selectSell,handleConvert:(r=e.selectBuy,l=e.selectSell)=>vt(t,n)(e.inputBuy,r,l)})},Nt=(e,t)=>(n,r,l)=>{e({inputSell:dt(n),selectBuy:l});const a=t.find((e=>e.code===l))?.buy||t.find((e=>e.code===r))?.sell;a&&e({inputBuy:String(ct(n,a,r===tt.RUB)||"")})},vt=(e,t)=>(n,r,l)=>{e({inputBuy:dt(n),selectSell:l});const a=t.find((e=>e.code===l))?.sell||t.find((e=>e.code===r))?.buy;a&&e({inputSell:String(ct(n,a,r===tt.RUB)||"")})},It={address:"Москва, ул.Ленина д.28",distance:"6км"},wt=l((({className:e="",context:t,title:l="Курсы обмена валют",button:a,...o})=>{const s=function(e){const{data:t}=e(Ye,Qe),n=t?.hits?.hits?.map((e=>e._source))||[];return n.length?Xe(n):n}(t.useAsyncData),c=s.filter((e=>e.buy));c.unshift({code:tt.RUB});const d=s.filter((e=>e.sell));return d.push({code:tt.RUB}),n($e,{context:t,className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,...o,children:n(ae,{context:t,title:n(i,{headingType:"h4",title:l,className:"whitespace-pre-wrap text-h4"}),children:r("div",{className:"flex",children:[r("div",{className:"mr-14 pt-4",children:[s?n(ot,{className:"mb-[30px]",exchangeCurrencyItems:s}):null,n(st,{...It})]}),s.length&&c.length&&d.length?n(bt,{className:"grow",context:t,currencyRatesBuy:c,currencyRatesSell:d,button:a}):null]})})})})),kt={"bg-white":"text-primary-main",transparent:"text-white"},Ct={"bg-white":"text-black",transparent:"text-white"},St=l((({className:e="",href:t,children:l,targetBlank:a,bgColor:o="bg-white",hideTitle:i})=>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(y,{image:{icon:"Logo"},className:`${kt[o]} w-10 h-[38px]`,asSVG:!0}),i?null:n("span",{className:`${Ct[o]} text-sm font-medium ml-2.5`,children:l||"Россельхозбанк"})]}))),$t=l((({className:e="",title:t="Мобильное приложение",description:l,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(St,{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-s font-medium mb-[3px]",children:t}),n("div",{className:"text-s text-secondary-text",children:l})]})]}):null}))),Dt=l((({className:e="",items:t,hasButton:l,context:a})=>{const o=a.useRouter(),{handlerDecorator:i}=a;return r("div",{className:e,children:[t?.length?t.map(Tt):null,l?n(Y,{version:"primary",className:"mb-6 w-full",...F({router:o,handlerDecorator:i},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),Tt=(e,t)=>{const{type:l,text:a,description:o}=e;return r("div",{className:"mb-4",children:[n("div",{children:Rt(l,a)}),n("div",{className:"mt-1 text-s-light text-secondary-text",children:o})]},String(t))},Rt=(e,t="")=>{switch(e){case"tel":return n("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Bt(t)}`,children:t});case"email":return n("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return n("span",{children:t})}},Bt=e=>e.replaceAll(/\D/g,""),Pt=l((({className:e="",index:t,text:r,href:l,target:a,onClick:o})=>n("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:l,target:a,onClick:o,children:r||`Документ ${t}`}))),_t=l((({title:e,links:t,className:l="",context:a})=>{const o=a.useRouter(),{handlerDecorator:i}=a;return r("div",{className:l,children:[n("span",{className:"text-primary-text font-medium text-sm",children:e}),t?.length?n("div",{className:"flex flex-col gap-2 pt-3",children:t.map(((e,t)=>n(Pt,{index:t,className:"font-normal text-sm",...F({router:o,handlerDecorator:i},e)},String(t))))}):null]})})),At=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play"}],Lt=l((({href:e,version:t="primary"})=>{const{icon:r,label:l}=At.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};if(!r)return null;return n("a",{className:`flex items-center justify-center rounded-md w-14 h-14 group box-border ${"secondary"===t?"bg-secondary-light hover:bg-secondary-hover":"border-solid border-[1px] border-main-divider hover:border-transparent hover:bg-primary-main"} ${"primary"===t?"hover:text-black":""}`,href:e,"aria-label":l,target:"_blank",rel:"noopener noreferrer",children:r?n(y,{image:r,imageClassName:"group-hover:text-white",width:"24",height:"24",asSVG:!0}):null})})),Mt=l((({className:e,media:t,version:r,context:l})=>{const a=l.useRouter(),{handlerDecorator:o}=l;return n("div",{className:`flex gap-2 items-start justify-start pt-6 pb-6 ${e||""}`,children:t?.map(((e,t)=>n(Lt,{version:r,...F({router:a,handlerDecorator:o},e)},String(t))))})})),Vt=l((({className:e="",index:t,text:r,href:l,target:a,onClick:o})=>n("a",{className:`text-xs text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:l,target:a,onClick:o,children:r||`Документ ${t}`}))),jt=l((({className:e,links:t,context:l})=>{const a=l.useRouter(),{handlerDecorator:o}=l;return r("div",{className:`${e||""}`,children:[n("div",{className:"py-6",children:n("span",{className:"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(Vt,{index:t,className:"font-normal",...F({router:a,handlerDecorator:o},e)},String(t))))}):null]})}));function Gt(e){const{data:t}=e(Ot(),Wt);return t||{}}async function Wt(){const e=await fetch(Ot());return await e.json()}function Ot(){return`/wcms-resources/${d.SITEMAP||"sitemap"}.json`}const Ut=l((({className:e,context:t,isMobile:l=!1})=>{const{term:a,setTerm:o}=t.useSearch(),i=l?"font-normal text-sm":"text-l-light",s=l?" placeholder-transparent font-normal":"font-light h-full",c=l?"some search":void 0;return r("form",{className:`font-sans 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:l?"w-[20px] h-[20px]":"w-[24px] h-[24px]",children:n(y,{image:"LoupeIcon",width:"24",height:"24"})}),a?null:n("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${i}`,children:"Поиск по сайту"})]}),n("input",{id:"search-bar-input",className:`h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none pr-[6%] border-main-divider focus:border-primary-text ${s}`,value:a,onChange:e=>o(e.target.value),type:"text",name:"search-bar-input",placeholder:c}),l?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(),o("")},children:n(y,{image:"CloseIcon",width:"24",height:"24"})}):n(Y,{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:"Найти"})})]})})),Et=l((({className:e="",context:t})=>n(Ut,{context:t,className:e,isMobile:!0}))),Ft=e=>e?.map((e=>({label:e.text||"",blocks:[{accordionBlockType:"LinkList",documents:e.items||[]}]}))),Ht=l((({className:e="",documents:t,relatedEnterprises:l,contacts:a,socialMedia:o,context:i,horizontalNavigationTitle:s})=>{const c=Gt(i.useAsyncData),d=c?.dispositions;return r("footer",{className:`font-sans px-4 py-[26px] bg-white ${e}`,children:[n(Dt,{className:"overflow-hidden",items:a,context:i,hasButton:!0}),n(Me,{context:i,className:"!p-0 mb-4",accordionItems:Ft(c.topItems)}),n("div",{children:d?.map(zt)}),n($t,{context:i,title:"Мобильное приложение",description:"Загрузить для IOS и Android"}),n(Et,{context:i,className:"grow"}),n(Mt,{className:"pb-4",media:o,context:i}),n(_t,{title:s,links:l,context:i}),n(jt,{links:t,context:i})]})})),zt=(e,t)=>{const{icon:l,href:a,text:o}=e;return r(Y,{version:"link",href:a,className:"flex text-sm mb-4",children:[l?n(y,{className:"pr-1",image:l,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-2.5 font-medium text-primary-text",children:o})]},`footer-${t}`)},Jt=(e,t,n=((e,t)=>t.startsWith(e)))=>n(j(e),(e=>(e||"").replace(O,""))(j(V(e)?t.href:t.pathname))),qt=e=>t=>Jt(t.href,e),Kt=e=>t=>t.items?.some(qt(e))||Jt(t.href,e)||((e,t)=>G(e)===G(t.href))(t.href,e),Qt=e=>t=>e?.href===t?.href,Yt=(e,t)=>{return(r=e,l=t,(r||[]).map((e=>l?.find(Qt(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(Qt(e))))));var n,r,l},Zt="absolute left-0 -bottom-3 w-full h-[2px]",Xt=l((({className:e="",text:t,href:l,target:a,active:o,onClick:i,children:s,bgColor:c="bg-white"})=>r("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:l,target:a,onClick:i,children:[n("span",{className:en(c,o),children:t||s}),o?n("div",{className:tn(c,o)}):null]}))),en=(e,t=!1)=>{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`},tn=(e,t=!1)=>t?`${"bg-white"===e?"bg-primary-main":e} ${Zt}`:Zt,nn=l((({context:e,burgerSubMenu:t,onClick:l,defaultLocation:a="",children:o})=>{const[i,s]=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:l,children:n(y,{image:"CloseIcon",width:"24",height:"24",asSVG:!0})}),r("button",{onClick:s,className:"flex items-center text-sm text-secondary-text p-0 mb-4 bg-transparent cursor-pointer",children:[n(y,{image:"GeolocationIcon",width:"20",height:"20",className:"text-primary-main box-border mr-2",asSVG:!0}),i]}),o,n("div",{className:"mb-7",children:t?.map(rn)}),n(Et,{context:e,className:"grow"})]})})),rn=(e,t)=>{const{icon:l,href:a,text:o}=e;return r("a",{href:a,className:"flex text-sm mb-4 hover:text-primary-main",children:[l?n(y,{className:"text-primary-main pr-1",image:l,width:"24",height:"24",asSVG:!0}):null,n("span",{className:"pl-0.5 font-medium",children:o})]},`headerSubMenu-${t}`)},ln=l((({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(y,{image:{icon:"BurgerIcon",iconVersion:"bg-white"===t?"black":"white"},className:"text-primary-text",width:"24",height:"24",asSVG:!0})}),n(St,{bgColor:t})]}),n("button",{className:("bg-white"===t?"text-primary-main":"text-white")+" text-sm border-0 bg-transparent cursor-pointer",children:"Войти"})]}))),an=l((({className:e="",defaultLocation:t,bgColor:l="bg-white",context:a,topItems:o})=>{const i=a.useRouter(),s=Gt(a.useAsyncData),c=s?.dispositions,{handlerDecorator:d}=a,m=Yt(s.topItems,o).find(Kt(i))?.items,h=(e=>(t=[])=>{const n=t?.filter(qt(e));return n?.length?(r=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>r(e)>r(t)?e:t)))(n):void 0;var r})(i)(m),[u,p]=a.useState(!1),x=()=>p(!u);return r("header",{className:`${l} ${e}`,children:[r("div",{className:"container px-4 py-0 box-border",children:[n(ln,{onClick:x,bgColor:l}),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)=>on({...F({router:i,handlerDecorator:d},e),active:e===h,bgColor:l},t)))})})]}),u?n(nn,{context:a,onClick:x,burgerSubMenu:c,defaultLocation:t,children:n(Me,{context:a,accordionItems:Ft(s.topItems),className:"!p-0 mb-4"})}):null]})})),on=(e,t)=>n(Xt,{className:"mr-8 whitespace-nowrap text-sm",...e},String(t)),sn=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function cn(e=""){const t=sn(e);return t<=4?"S":t<=8?"M":"L"}function dn(e=""){const t=sn(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function mn(e=""){const t=sn(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const hn=l((({className:e,context:t,title:l,description:a="Блок в разработке...",...o})=>r($e,{context:t,className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${mn(e)} ${dn(e)} `,...o,children:[n(w,{context:t,className:"!p-0 max-w-[600px]",title:l,description:a,headlineVersion:cn(e)}),n("figure",{className:"m-0 min-w-[600px]",children:un()})]}))),un=(e=3)=>xn(100,e).map((e=>Math.floor(e))).map(pn),pn=(e,t)=>n("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),xn=(e,t)=>[e].concat(t>0?xn(e/1.618,t-1):[]),gn={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},bn=l((({block:e,context:t,className:r=""})=>n("section",{className:`flex grow-0 shrink-0 basis-full px-4 pt-6 ${gn[e?.version??"primary"]} ${r}`,role:"listitem",children:n("div",{className:"flex grow",children:n(ce,{context:t,...e})})}))),fn=l((({className:e,context:t,slides:r=[]})=>{const l=r.map((e=>e.productBlock));return n("section",{className:`font-sans bg-white overflow-hidden w-100 pb-6 ${e||""}`,children:n(T,{context:t,children:l.map(((e,r)=>n(bn,{block:e,context:t},String(r))))})})})),yn={primary:{background:"bg-white",title:"text-primary-text",description:"text-secondary-text",iconText:"text-secondary-text",iconBackground:"bg-main-divider",iconConnector:"bg-secondary-light"},secondary:{background:"bg-primary-main",title:"text-white",description:"text-white/80",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white"}},Nn={normal:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",small:"h-[50px] w-[50px] min-w-[50px] min-h-[50px]"},vn={normal:"min-h-[70px]",small:"min-h-[50px]"},In=l((({className:e,title:t,description:l,showLines:a=!0,steps:o,size:s="normal",version:c="primary"})=>{const d=yn[c];return r("section",{className:`box-border font-sans bg-white px-4 py-6 flex flex-col\n ${d.background} ${d.title} ${e||""}`,children:[t?n(i,{headingType:"h3",className:`text-center ${d.title}`,title:t}):null,l?n("p",{className:`text-m text-center ${d.description} ${t?"mt-2":""}`,children:l}):null,o?.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:o.map(wn(s,c,a))})}):null]})})),wn=(e,t,l)=>(a,o,i)=>{const s=i.length-1===o,c="normal"===e?"ml-[34px]":"ml-6",d=yn[t];return n("div",{children:r("div",{className:"flex flex-row text-center relative",children:[r("div",{className:"overflow-hidden",children:[kn(e,t),s?null:n("div",{className:`min-h-8 h-full w-[2px] ${l?d.iconConnector:""} ${c}`})]}),r("div",{className:`flex flex-col justify-center h-fit ${vn[e]}`,children:[a.label?n("div",{className:"font-medium text-m-title-xs m-0 text-left mb-1",children:a.label}):null,a.description?n("div",{className:`text-s ${d.description} text-left`,children:a.description}):null]})]})},String(o))},kn=(e,t)=>(r,l)=>{const a=yn[t],o="normal"===e?"38":"27",i="normal"===e?"text-m-title":"text-m-title-xs";return n("div",{className:`${Nn[e]} ${a.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`,children:n("span",{className:`font-medium flex self-center ${a.title} ${i}`,children:(s=r?.icon,Boolean(s?.icon||s?.src)?n(y,{image:r.icon,width:o,height:o,asSVG:!0}):n("span",{children:l+1}))})});var s},Cn=l((({title:e,icon:t})=>r("div",{className:"flex gap-2.5 mb-2",children:[e?n(i,{headingType:"h3",className:"font-medium",title:e}):null,t?n(y,{className:"ml-auto max-w-6 max-h-6",image:t,width:"24px",height:"24px"}):null]}))),Sn=e=>e?.alt||e?.title||c[e?.icon?e.icon:""],$n=l((({header:e,data:t})=>r("div",{className:"rounded-md border-main-stroke h-full box-border border p-4",children:[n(Cn,{...e}),t?.length?t.map(Dn):null]}))),Dn=({label:e,description:t,list:l,image:a,buttons:o},i)=>r("div",{children:[i>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,l?.items?.length?Tn(l):null,a?n(y,{image:{...a,className:"m-0"}}):null,o?.length?Rn(o):null]},String(i)),Tn=e=>n(le,{className:"flex flex-col justify-between items-start text-m-sm",version:"gray",items:e.items,isDotted:e.isDotted??!0}),Rn=e=>n("div",{children:e.map((({icon:e,rounded:t,...r},l)=>n(Y,{className:`mt-3 ${l>0&&t?"ml-2.5":""} ${e?"w-12 h-12":""}`,ariaLabel:Sn(e),rounded:t,appendLeft:e?n(y,{image:e,width:"24px",height:"24px",asSVG:!0}):null,...r,"aria-label":e},String(l))))}),Bn=l((({tiles:e,context:t})=>n(T,{context:t,children:e.map(((e,t)=>n($n,{...e},String(t))))}))),Pn=l((({tiles:e})=>n("div",{className:"flex flex-col gap-3.5",children:e.map(((e,t)=>n($n,{...e},String(t))))}))),_n=l((({className:e,context:t,title:l,description:a,columns:o,rowHeaders:s,orientation:c="vertical"})=>{const d=Ln(o),m=Mn(s,d);return r("section",{className:`px-4 py-6 bg-white font-sans text-primary-text overflow-x-hidden ${e}`,children:[l?n(i,{headingType:"h2",className:`text-center ${a?"mb-2":"mb-5"}`,title:l}):null,a?n("div",{className:"mb-5 text-center text-m-md",children:a}):null,m?.length?An(c,m,t):null]})}));function An(e,t,r){return"vertical"===e?n(Pn,{tiles:t}):n(Bn,{context:r,tiles:t})}const Ln=e=>e?.[0].data?e[0].data:[],Mn=(e,t)=>e?.map(((e,n)=>({header:e,data:t?.[n]||[{}]}))),Vn={Accordion:Me,ComparisonTable:He,ExchangeRateTile:wt,Footer:Ht,Gallery:Ne,Header:an,Headline:w,LinkDocs:M,LinkList:De,MobileAppTile:$t,ProductBlock:pe,ProductGallery:fn,StepsBlock:In,TariffsTable:_n,TextBlock:ge,Placeholder:hn},jn=l((({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:Gn()}))),Gn=()=>{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"})]})},Wn=l((({className:e,context:t,...l})=>{const a=t.useLikeService();return r($e,{tag:"div",context:t,className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,...l,children:[n(jn,{onClick:a.like,ariaLabel:"Поставить отметку «лайк»"}),n(jn,{onClick:a.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),n("span",{className:"select-none",children:a.likeCount})]})})),On=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),Un=l((({className:e="",context:t,blocksRegistry:l,data:a={},blockDecorator:o=On})=>{const{style:i,blocks:s,slots:c={},likeControl:d,colorPalette:m="pc"}=a,{header:h}=c;return r("section",{className:`relative ${N(i)} ${e}`,"data-theme":m,children:[h?.blocks?.length?n("div",{className:`${N(h?.style)}`,children:h.blocks.map(((e,n)=>En({block:e,page:a,blockDecorator:o,blocksRegistry:l,context:t},n)))}):null,s?.length?n("div",{className:"container grid grid-cols-12 gap-1",children:s.map(((e,n)=>En({block:e,blockDecorator:o,blocksRegistry:l,context:t,page:a},n)))}):null,d?n("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:n(Wn,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t},"LikeControl")}):null]})}));function En({block:e,blockDecorator:t,blocksRegistry:r,context:l,page:a},o){const{type:i}=e;i&&i in r||console.warn(`No block with "${i}" is registered`);const s=r[i||"Placeholder"]||hn;return t({blockClassName:`scroll-mt-12 ${N(e.style)}`,block:e,render:e=>{const{version:t,content:r,anchor:c,labels:d}=e.block;return n(s,{className:e.blockClassName,version:t,context:l,page:a,anchor:c,labels:d,...r},`${i}-${o}`)}},`block-${o}`)}e.Blocks=Vn,e.ContentPage=Un,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=function(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(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:l}=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:l},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:l,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:l,UserID:a},body:JSON.stringify({node_id:r,user_name:a})}),{likes:o}=await n.json();return o||0}catch(e){return console.error(e),0}},dislike:async function(r){if(!r)return 0;const{token:l,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:l,UserID:a},body:JSON.stringify({node_id:r,user_name:a})}),{likes:o}=await n.json();return o||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.projectSettings=d,e.setup=t,e.url=W,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.renderButton = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const Button_1 = require("../../ui-kit/Button/Button");
|
|
5
|
+
function renderButton(button) {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)(Button_1.Button, { className: "py-4 mr-1", version: button?.version, href: button?.href, target: "_blank", children: button?.text }));
|
|
7
|
+
}
|
|
8
|
+
exports.renderButton = renderButton;
|
|
9
|
+
//# sourceMappingURL=renderButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderButton.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/renderButton.tsx"],"names":[],"mappings":";;;AAAA,uDAAoD;AAGpD,SAAgB,YAAY,CAAC,MAAmB;IAC9C,OAAO,CACL,uBAAC,eAAM,IAAC,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAC,QAAQ,YACxF,MAAM,EAAE,IAAI,GACN,CACV,CAAC;AACJ,CAAC;AAND,oCAMC"}
|
|
@@ -6,7 +6,7 @@ const Select_1 = require("../../ui-kit/Select/Select");
|
|
|
6
6
|
const SelectOption_1 = require("../../ui-kit/Select/SelectOption");
|
|
7
7
|
function renderInput(props) {
|
|
8
8
|
const { placeholder, rates, selected, value, setValue, setSelected } = props;
|
|
9
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "relative flex items-center", children: [(0, jsx_runtime_1.jsx)(Input_1.Input, { className: "h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12", placeholder: placeholder, type: "text", value: value, onChange: setValue }), rates.length ? ((0, jsx_runtime_1.jsx)(Select_1.Select, { className: "h-9 -translate-x-
|
|
9
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "relative flex items-center", children: [(0, jsx_runtime_1.jsx)(Input_1.Input, { className: "shrink-0 h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12", placeholder: placeholder, type: "text", value: value, onChange: setValue }), rates.length ? ((0, jsx_runtime_1.jsx)(Select_1.Select, { className: "shrink-0 w-20 h-9 -translate-x-8 bg-transparent", value: selected, onChange: (_) => setSelected(_), children: rates.map((_, i) => ((0, jsx_runtime_1.jsx)(SelectOption_1.SelectOption, { value: _.code, children: _.code }, String(i)))) })) : null] }));
|
|
10
10
|
}
|
|
11
11
|
exports.renderInput = renderInput;
|
|
12
12
|
//# sourceMappingURL=renderInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderInput.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/renderInput.tsx"],"names":[],"mappings":";;;AAAA,oDAAiD;AACjD,uDAAoD;AACpD,mEAAgE;AAahE,SAAgB,WAAW,CAAC,KAAiB;IAC3C,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAE7E,OAAO,CACL,iCAAK,SAAS,EAAC,4BAA4B,aACzC,uBAAC,aAAK,IACJ,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"renderInput.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/renderInput.tsx"],"names":[],"mappings":";;;AAAA,oDAAiD;AACjD,uDAAoD;AACpD,mEAAgE;AAahE,SAAgB,WAAW,CAAC,KAAiB;IAC3C,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAE7E,OAAO,CACL,iCAAK,SAAS,EAAC,4BAA4B,aACzC,uBAAC,aAAK,IACJ,SAAS,EAAC,qFAAqF,EAC/F,WAAW,EAAE,WAAW,EACxB,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,GAClB,EACD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CACd,uBAAC,eAAM,IACL,SAAS,EAAC,iDAAiD,EAC3D,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,CAAa,CAAC,YAE1C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACnB,uBAAC,2BAAY,IAAiB,KAAK,EAAE,CAAC,CAAC,IAAI,YACxC,CAAC,CAAC,IAAI,IADU,MAAM,CAAC,CAAC,CAAC,CAEb,CAChB,CAAC,GACK,CACV,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC;AA3BD,kCA2BC"}
|
|
@@ -15,18 +15,18 @@ const STEPS_TILE_DESCRIPTION_HEIGHT_MAP = {
|
|
|
15
15
|
small: 'min-h-[50px]',
|
|
16
16
|
};
|
|
17
17
|
exports.StepsBlock = (0, uni_jsx_1.JSX)(({ className, title, description, showLines = true, steps, size = 'normal', version = 'primary', }) => {
|
|
18
|
-
const styleMap =
|
|
18
|
+
const styleMap = StepsBlockStyleMaps_1.STEPS_BLOCK_STYLE_MAPS[version];
|
|
19
19
|
return ((0, jsx_runtime_1.jsxs)("section", { className: `box-border font-sans bg-white px-4 py-6 flex flex-col
|
|
20
20
|
${styleMap.background} ${styleMap.title} ${className || ''}`, children: [title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h3", className: `text-center ${styleMap.title}`, title: title })) : null, description ? ((0, jsx_runtime_1.jsx)("p", { className: `text-m text-center ${styleMap.description} ${title ? 'mt-2' : ''}`, children: description })) : null, steps?.length ? ((0, jsx_runtime_1.jsx)("div", { className: `box-border py-0.5 mb-0.5 mt-5`, children: (0, jsx_runtime_1.jsx)("div", { className: "flex flex-col justify-between gap-x-[101px]", children: steps.map(renderStepTitle(size, version, showLines)) }) })) : null] }));
|
|
21
21
|
});
|
|
22
22
|
const renderStepTitle = (size, version, showLines) => (step, i, steps) => {
|
|
23
23
|
const isLastStep = steps.length - 1 === i;
|
|
24
24
|
const margin = size === 'normal' ? 'ml-[34px]' : 'ml-6';
|
|
25
|
-
const styleMap =
|
|
25
|
+
const styleMap = StepsBlockStyleMaps_1.STEPS_BLOCK_STYLE_MAPS[version];
|
|
26
26
|
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-row text-center relative", children: [(0, jsx_runtime_1.jsxs)("div", { className: "overflow-hidden", children: [renderIconArea(size, version), isLastStep ? null : ((0, jsx_runtime_1.jsx)("div", { className: `min-h-8 h-full w-[2px] ${showLines ? styleMap.iconConnector : ''} ${margin}` }))] }), (0, jsx_runtime_1.jsxs)("div", { className: `flex flex-col justify-center h-fit ${STEPS_TILE_DESCRIPTION_HEIGHT_MAP[size]}`, children: [step.label ? ((0, jsx_runtime_1.jsx)("div", { className: "font-medium text-m-title-xs m-0 text-left mb-1", children: step.label })) : null, step.description ? ((0, jsx_runtime_1.jsx)("div", { className: `text-s ${styleMap.description} text-left`, children: step.description })) : null] })] }) }, String(i)));
|
|
27
27
|
};
|
|
28
28
|
const renderIconArea = (size, version) => (step, i) => {
|
|
29
|
-
const styleMap =
|
|
29
|
+
const styleMap = StepsBlockStyleMaps_1.STEPS_BLOCK_STYLE_MAPS[version];
|
|
30
30
|
const iconAreaSize = STEPS_SIZE_MAP[size];
|
|
31
31
|
const iconSize = size === 'normal' ? '38' : '27';
|
|
32
32
|
const iconTextSize = size === 'normal' ? 'text-m-title' : 'text-m-title-xs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepsBlock.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAIxC,0DAAuD;AACvD,8CAA2C;AAE3C,6EAA0E;AAC1E,+
|
|
1
|
+
{"version":3,"file":"StepsBlock.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAIxC,0DAAuD;AACvD,8CAA2C;AAE3C,6EAA0E;AAC1E,+DAA+D;AAI/D,MAAM,cAAc,GAAgC;IAClD,MAAM,EAAE,6CAA6C;IACrD,KAAK,EAAE,6CAA6C;CACrD,CAAC;AAEF,MAAM,iCAAiC,GAAgC;IACrE,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,cAAc;CACtB,CAAC;AAEW,QAAA,UAAU,GAAG,IAAA,aAAG,EAC3B,CAAC,EACC,SAAS,EACT,KAAK,EACL,WAAW,EACX,SAAS,GAAG,IAAI,EAChB,KAAK,EACL,IAAI,GAAG,QAAQ,EACf,OAAO,GAAG,SAAS,GACpB,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,4CAAsB,CAAC,OAAO,CAAC,CAAC;IAEjD,OAAO,CACL,qCACE,SAAS,EAAE;UACT,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,KAAK,IAAI,SAAS,IAAI,EAAE,EAAE,aAE3D,KAAK,CAAC,CAAC,CAAC,CACP,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,SAAS,EAAE,eAAe,QAAQ,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,GAAI,CACvF,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,CAAC,CAAC,CACb,8BAAG,SAAS,EAAE,sBAAsB,QAAQ,CAAC,WAAW,IAAI,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,YAC9E,WAAW,GACV,CACL,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACf,gCAAK,SAAS,EAAE,+BAA+B,YAC7C,gCAAK,SAAS,EAAC,6CAA6C,YACzD,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,GACjD,GACF,CACP,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,eAAe,GACnB,CAAC,IAAiB,EAAE,OAAqB,EAAE,SAAkB,EAAE,EAAE,CACjE,CAAC,IAAU,EAAE,CAAS,EAAE,KAAa,EAAE,EAAE;IACvC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC;IACxD,MAAM,QAAQ,GAAG,4CAAsB,CAAC,OAAO,CAAC,CAAC;IAEjD,OAAO,CACL,0CACE,iCAAK,SAAS,EAAC,oCAAoC,aACjD,iCAAK,SAAS,EAAC,iBAAiB,aAC7B,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,EAC7B,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACnB,gCACE,SAAS,EAAE,0BACT,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,EACvC,IAAI,MAAM,EAAE,GACZ,CACH,IACG,EACN,iCACE,SAAS,EAAE,sCAAsC,iCAAiC,CAAC,IAAI,CAAC,EAAE,aAEzF,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CACZ,gCAAK,SAAS,EAAC,gDAAgD,YAAE,IAAI,CAAC,KAAK,GAAO,CACnF,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAClB,gCAAK,SAAS,EAAE,UAAU,QAAQ,CAAC,WAAW,YAAY,YAAG,IAAI,CAAC,WAAW,GAAO,CACrF,CAAC,CAAC,CAAC,IAAI,IACJ,IACF,IAtBE,MAAM,CAAC,CAAC,CAAC,CAuBb,CACP,CAAC;AACJ,CAAC,CAAC;AAEJ,MAAM,cAAc,GAAG,CAAC,IAAiB,EAAE,OAAqB,EAAE,EAAE,CAAC,CAAC,IAAU,EAAE,CAAS,EAAE,EAAE;IAC7F,MAAM,QAAQ,GAAG,4CAAsB,CAAC,OAAO,CAAC,CAAC;IACjD,MAAM,YAAY,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAE1C,MAAM,QAAQ,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACjD,MAAM,YAAY,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAE5E,OAAO,CACL,gCACE,SAAS,EAAE,GAAG,YAAY,IAAI,QAAQ,CAAC,cAAc,4DAA4D,YAEjH,iCAAM,SAAS,EAAE,gCAAgC,QAAQ,CAAC,KAAK,IAAI,YAAY,EAAE,YAC9E,IAAA,6CAAqB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CACnC,uBAAC,SAAG,IAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,SAAG,CACnE,CAAC,CAAC,CAAC,CACF,2CAAO,CAAC,GAAG,CAAC,GAAQ,CACrB,GACI,GACH,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { Picture } from '../../model/Picture';
|
|
3
3
|
import type { SizeVersion } from '../../model/SizeVersion';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
5
|
/**
|
|
6
6
|
* @title Шаг
|
|
7
7
|
*/
|
|
@@ -22,7 +22,8 @@ export interface Step {
|
|
|
22
22
|
* }
|
|
23
23
|
*/
|
|
24
24
|
icon?: Picture;
|
|
25
|
-
|
|
25
|
+
/** @title Кнопка */
|
|
26
|
+
button?: ButtonWithIconProps;
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
28
29
|
* @title Блок шаги
|
|
@@ -43,7 +44,8 @@ export interface StepsBlockContent {
|
|
|
43
44
|
* @maxItems 4
|
|
44
45
|
*/
|
|
45
46
|
steps?: Step[];
|
|
46
|
-
|
|
47
|
+
/** @title Кнопка */
|
|
48
|
+
button?: ButtonWithIconProps;
|
|
47
49
|
/**
|
|
48
50
|
* @title Размер шагов (моб.)
|
|
49
51
|
* @default normal
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.
|
|
3
|
-
|
|
2
|
+
exports.STEPS_BLOCK_STYLE_MAPS = void 0;
|
|
3
|
+
exports.STEPS_BLOCK_STYLE_MAPS = {
|
|
4
4
|
primary: {
|
|
5
5
|
background: 'bg-white',
|
|
6
6
|
title: 'text-primary-text',
|
|
@@ -18,6 +18,4 @@ const STEPS_BLOCK_STYLE_MAPS = {
|
|
|
18
18
|
iconConnector: 'bg-white',
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
|
-
const getStyleMap = (version) => STEPS_BLOCK_STYLE_MAPS[version];
|
|
22
|
-
exports.getStyleMap = getStyleMap;
|
|
23
21
|
//# sourceMappingURL=StepsBlockStyleMaps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepsBlockStyleMaps.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlockStyleMaps.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"StepsBlockStyleMaps.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlockStyleMaps.ts"],"names":[],"mappings":";;AAWa,QAAA,sBAAsB,GAAoC;IACrE,OAAO,EAAE;QACP,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,qBAAqB;QAClC,QAAQ,EAAE,qBAAqB;QAC/B,cAAc,EAAE,iBAAiB;QACjC,aAAa,EAAE,oBAAoB;KACpC;IACD,SAAS,EAAE;QACT,UAAU,EAAE,iBAAiB;QAC7B,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,eAAe;QAC5B,QAAQ,EAAE,YAAY;QACtB,cAAc,EAAE,aAAa;QAC7B,aAAa,EAAE,UAAU;KAC1B;CACF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { Button } from '../../ui-kit/Button/Button.js';
|
|
3
|
+
export function renderButton(button) {
|
|
4
|
+
return (_jsx(Button, { className: "py-4 mr-1", version: button?.version, href: button?.href, target: "_blank", children: button?.text }));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=renderButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderButton.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/renderButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGpD,MAAM,UAAU,YAAY,CAAC,MAAmB;IAC9C,OAAO,CACL,KAAC,MAAM,IAAC,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAC,QAAQ,YACxF,MAAM,EAAE,IAAI,GACN,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -4,6 +4,6 @@ import { Select } from '../../ui-kit/Select/Select.js';
|
|
|
4
4
|
import { SelectOption } from '../../ui-kit/Select/SelectOption.js';
|
|
5
5
|
export function renderInput(props) {
|
|
6
6
|
const { placeholder, rates, selected, value, setValue, setSelected } = props;
|
|
7
|
-
return (_jsxs("div", { className: "relative flex items-center", children: [_jsx(Input, { className: "h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12", placeholder: placeholder, type: "text", value: value, onChange: setValue }), rates.length ? (_jsx(Select, { className: "h-9 -translate-x-
|
|
7
|
+
return (_jsxs("div", { className: "relative flex items-center", children: [_jsx(Input, { className: "shrink-0 h-13 border pl-4 pt-4 pb-4 rounded-md text-l w-full appearance-none -mr-12", placeholder: placeholder, type: "text", value: value, onChange: setValue }), rates.length ? (_jsx(Select, { className: "shrink-0 w-20 h-9 -translate-x-8 bg-transparent", value: selected, onChange: (_) => setSelected(_), children: rates.map((_, i) => (_jsx(SelectOption, { value: _.code, children: _.code }, String(i)))) })) : null] }));
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=renderInput.js.map
|