@redneckz/wildless-cms-uni-blocks 0.4.7 → 0.5.0

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.
Files changed (174) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +14 -14
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/BaseTile/BaseTile.js +1 -1
  5. package/dist/components/BaseTile/BaseTile.js.map +1 -1
  6. package/dist/components/Calculator/Calculator.js +1 -1
  7. package/dist/components/Calculator/Calculator.js.map +1 -1
  8. package/dist/components/ContentPage/filterBlocks.d.ts +11 -0
  9. package/dist/components/ContentPage/filterBlocks.js +7 -0
  10. package/dist/components/ContentPage/filterBlocks.js.map +1 -0
  11. package/dist/components/ContentPage/filterBlocks.mobile.d.ts +11 -0
  12. package/dist/components/ContentPage/filterBlocks.mobile.js +10 -0
  13. package/dist/components/ContentPage/filterBlocks.mobile.js.map +1 -0
  14. package/dist/components/ContentPage/isBlockInRegistry.d.ts +2 -1
  15. package/dist/components/ContentPage/isBlockInRegistry.js.map +1 -1
  16. package/dist/components/ContentPage/normalizePage.d.ts +28 -1
  17. package/dist/components/ContentPage/normalizePage.js +6 -11
  18. package/dist/components/ContentPage/normalizePage.js.map +1 -1
  19. package/dist/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
  20. package/dist/components/Footer/HorizontalNavigation.js +1 -1
  21. package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
  22. package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
  23. package/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +2 -2
  24. package/dist/components/Recommendation/RecommendationCard.js +1 -1
  25. package/dist/components/Recommendation/RecommendationCard.js.map +1 -1
  26. package/dist/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
  27. package/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
  28. package/dist/ui-kit/Foldable/Foldable.js +2 -2
  29. package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  30. package/dist/ui-kit/Input/Input.js +1 -1
  31. package/dist/ui-kit/Input/Input.js.map +1 -1
  32. package/dist/ui-kit/Logo/Logo.js +2 -2
  33. package/dist/ui-kit/Logo/Logo.js.map +1 -1
  34. package/dist/ui-kit/SearchBar/SearchBarInner.js +1 -1
  35. package/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  36. package/dist/ui-kit/Select/Select.js +1 -1
  37. package/dist/ui-kit/Select/Select.js.map +1 -1
  38. package/lib/common.css +1 -1
  39. package/lib/components/BaseTile/BaseTile.js +1 -1
  40. package/lib/components/BaseTile/BaseTile.js.map +1 -1
  41. package/lib/components/Calculator/Calculator.js +1 -1
  42. package/lib/components/Calculator/Calculator.js.map +1 -1
  43. package/lib/components/ContentPage/filterBlocks.d.ts +11 -0
  44. package/lib/components/ContentPage/filterBlocks.js +4 -0
  45. package/lib/components/ContentPage/filterBlocks.js.map +1 -0
  46. package/lib/components/ContentPage/filterBlocks.mobile.d.ts +11 -0
  47. package/lib/components/ContentPage/filterBlocks.mobile.js +7 -0
  48. package/lib/components/ContentPage/filterBlocks.mobile.js.map +1 -0
  49. package/lib/components/ContentPage/isBlockInRegistry.d.ts +2 -1
  50. package/lib/components/ContentPage/isBlockInRegistry.js.map +1 -1
  51. package/lib/components/ContentPage/normalizePage.d.ts +28 -1
  52. package/lib/components/ContentPage/normalizePage.js +6 -11
  53. package/lib/components/ContentPage/normalizePage.js.map +1 -1
  54. package/lib/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
  55. package/lib/components/Footer/HorizontalNavigation.js +1 -1
  56. package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
  57. package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
  58. package/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +2 -2
  59. package/lib/components/Recommendation/RecommendationCard.js +1 -1
  60. package/lib/components/Recommendation/RecommendationCard.js.map +1 -1
  61. package/lib/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
  62. package/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
  63. package/lib/ui-kit/Foldable/Foldable.js +2 -2
  64. package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  65. package/lib/ui-kit/Input/Input.js +1 -1
  66. package/lib/ui-kit/Input/Input.js.map +1 -1
  67. package/lib/ui-kit/Logo/Logo.js +2 -2
  68. package/lib/ui-kit/Logo/Logo.js.map +1 -1
  69. package/lib/ui-kit/SearchBar/SearchBarInner.js +1 -1
  70. package/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  71. package/lib/ui-kit/Select/Select.js +1 -1
  72. package/lib/ui-kit/Select/Select.js.map +1 -1
  73. package/mobile/bundle/bundle.umd.js +4 -4
  74. package/mobile/bundle/bundle.umd.min.js +1 -1
  75. package/mobile/dist/components/BaseTile/BaseTile.js +1 -1
  76. package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
  77. package/mobile/dist/components/Calculator/Calculator.js +1 -1
  78. package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
  79. package/mobile/dist/components/ContentPage/filterBlocks.d.ts +3 -0
  80. package/mobile/dist/components/ContentPage/filterBlocks.js +10 -0
  81. package/mobile/dist/components/ContentPage/filterBlocks.js.map +1 -0
  82. package/mobile/dist/components/ContentPage/isBlockInRegistry.d.ts +2 -1
  83. package/mobile/dist/components/ContentPage/isBlockInRegistry.js.map +1 -1
  84. package/mobile/dist/components/ContentPage/normalizePage.d.ts +20 -1
  85. package/mobile/dist/components/ContentPage/normalizePage.js +6 -13
  86. package/mobile/dist/components/ContentPage/normalizePage.js.map +1 -1
  87. package/mobile/dist/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
  88. package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
  89. package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
  90. package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +2 -2
  91. package/mobile/dist/components/Recommendation/RecommendationCard.js +1 -1
  92. package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -1
  93. package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
  94. package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
  95. package/mobile/dist/ui-kit/Foldable/Foldable.js +2 -2
  96. package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  97. package/mobile/dist/ui-kit/Input/Input.js +1 -1
  98. package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
  99. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +1 -1
  100. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  101. package/mobile/dist/ui-kit/Select/Select.js +1 -1
  102. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  103. package/mobile/lib/components/BaseTile/BaseTile.js +1 -1
  104. package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
  105. package/mobile/lib/components/Calculator/Calculator.js +1 -1
  106. package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
  107. package/mobile/lib/components/ContentPage/filterBlocks.d.ts +3 -0
  108. package/mobile/lib/components/ContentPage/filterBlocks.js +7 -0
  109. package/mobile/lib/components/ContentPage/filterBlocks.js.map +1 -0
  110. package/mobile/lib/components/ContentPage/isBlockInRegistry.d.ts +2 -1
  111. package/mobile/lib/components/ContentPage/isBlockInRegistry.js.map +1 -1
  112. package/mobile/lib/components/ContentPage/normalizePage.d.ts +20 -1
  113. package/mobile/lib/components/ContentPage/normalizePage.js +6 -13
  114. package/mobile/lib/components/ContentPage/normalizePage.js.map +1 -1
  115. package/mobile/lib/components/ErrorBlock/ErrorBlockContent.d.ts +2 -2
  116. package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
  117. package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
  118. package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +2 -2
  119. package/mobile/lib/components/Recommendation/RecommendationCard.js +1 -1
  120. package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -1
  121. package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
  122. package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
  123. package/mobile/lib/ui-kit/Foldable/Foldable.js +2 -2
  124. package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  125. package/mobile/lib/ui-kit/Input/Input.js +1 -1
  126. package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
  127. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +1 -1
  128. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  129. package/mobile/lib/ui-kit/Select/Select.js +1 -1
  130. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  131. package/mobile/src/components/BaseTile/BaseTile.tsx +2 -2
  132. package/mobile/src/components/Calculator/Calculator.tsx +1 -1
  133. package/mobile/src/components/ContentPage/filterBlocks.ts +13 -0
  134. package/mobile/src/components/ContentPage/isBlockInRegistry.ts +3 -1
  135. package/mobile/src/components/ContentPage/normalizePage.ts +25 -36
  136. package/mobile/src/components/ErrorBlock/ErrorBlockContent.ts +2 -2
  137. package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +2 -2
  138. package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlockContent.ts +2 -2
  139. package/mobile/src/components/Recommendation/RecommendationCard.tsx +18 -16
  140. package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +24 -14
  141. package/mobile/src/ui-kit/CurrencyInput/CurrencyInput.tsx +1 -1
  142. package/mobile/src/ui-kit/Foldable/Foldable.tsx +11 -2
  143. package/mobile/src/ui-kit/Input/Input.tsx +1 -1
  144. package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +1 -1
  145. package/mobile/src/ui-kit/Select/Select.tsx +1 -1
  146. package/package.json +1 -1
  147. package/src/components/BaseTile/BaseTile.tsx +2 -2
  148. package/src/components/Calculator/Calculator.tsx +1 -1
  149. package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +1 -1
  150. package/src/components/ContentPage/ContentPage.fixture.tsx +2 -2
  151. package/src/components/ContentPage/filterBlocks.mobile.ts +13 -0
  152. package/src/components/ContentPage/filterBlocks.ts +7 -0
  153. package/src/components/ContentPage/isBlockInRegistry.ts +3 -1
  154. package/src/components/ContentPage/normalizePage.ts +25 -31
  155. package/src/components/ErrorBlock/ErrorBlockContent.ts +2 -2
  156. package/src/components/Footer/HorizontalNavigation.tsx +1 -1
  157. package/src/components/OfficeServicesBlock/OfficeServicesBlock.fixture.tsx +1 -1
  158. package/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +2 -2
  159. package/src/components/OfficeServicesBlock/OfficeServicesBlockContent.ts +2 -2
  160. package/src/components/Recommendation/RecommendationCard.tsx +18 -16
  161. package/src/components/__snapshots__/Blocks.spec.tsx.snap +24 -14
  162. package/src/ui-kit/CurrencyInput/CurrencyInput.tsx +1 -1
  163. package/src/ui-kit/Foldable/Foldable.tsx +11 -2
  164. package/src/ui-kit/Input/Input.tsx +1 -1
  165. package/src/ui-kit/Logo/Logo.tsx +2 -2
  166. package/src/ui-kit/SearchBar/SearchBarInner.tsx +1 -1
  167. package/src/ui-kit/Select/Select.tsx +1 -1
  168. package/dist/components/ContentPage/normalizePage.mobile.d.ts +0 -2
  169. package/dist/components/ContentPage/normalizePage.mobile.js +0 -30
  170. package/dist/components/ContentPage/normalizePage.mobile.js.map +0 -1
  171. package/lib/components/ContentPage/normalizePage.mobile.d.ts +0 -2
  172. package/lib/components/ContentPage/normalizePage.mobile.js +0 -27
  173. package/lib/components/ContentPage/normalizePage.mobile.js.map +0 -1
  174. package/src/components/ContentPage/normalizePage.mobile.ts +0 -40
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),a=n("useState"),l=n("useEffect"),r=n("useCallback"),i=n("useMemo");function s(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}}}}const o=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}},c="likesToken";function d(){async function e(){try{const e=JSON.parse(globalThis.localStorage.getItem(c)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:n}=await e.json();return globalThis.localStorage.setItem(c,JSON.stringify({token:t,name:n})),{token:t,name:n}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n},body:JSON.stringify({node_ids:t})}),{likes:a}=await e.json();return a||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:n,name:a}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:a},body:JSON.stringify({node_id:t,user_name:a})}),{likes:l}=await e.json();return l||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:n,name:a}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:a},body:JSON.stringify({node_id:t,user_name:a})}),{likes:l}=await e.json();return l||0}catch(e){return console.error(e),0}}}}const m=(...e)=>globalThis._uni._jsx(...e),h=(...e)=>globalThis._uni._jsxs(...e),u=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,n){const{children:a,...l}=t||{},r=n?.slots?.default,i=a||r&&r();return e(Object.assign(l,i&&{children:i}),n)}return t.inheritAttrs=!1,t};class p{static inst=new p;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 b=e=>{if(!e.length)return;const[t]=e;t.isIntersecting},g=u((({anchor:e,className:t,context:n,children:r,tag:i="section",labels:s})=>{const o=i,{IntersectionObserverTag:c}=n,[d,h]=a(!0);return l((()=>p.inst.subscribe("tab",(e=>{var t;"group"===e.type?h(!s?.length||!e.label||s.includes(e.label)):(h(!0),t=e.label,setTimeout((()=>globalThis.document.getElementById(`#${t}`)?.scrollIntoView({behavior:"smooth"}))))}))),[s]),d?e?m(c,{tag:i,className:t,observerCallback:b,observerOptions:{threshold:1},anchor:e,children:r}):m(o,{className:t,children:r}):null}));const f={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=u((e=>{const{className:t="",headingType:n="h3",title:a,as:l="h3"}=e;return m(l,{className:`font-sans m-0 ${f[n]} ${t}`,children:a})}));var v,y;!function(e){e.ActualBalanceIcon="ActualBalanceIcon",e.AirPlaneIcon="AirPlaneIcon",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.DocDownloadIcon="DocDownloadIcon",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.LogoIcon="LogoIcon",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.PackA4Icon="PackA4Icon",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.StateMortgageIcon="StateMortgageIcon",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.WateringCanIcon="WateringCanIcon"}(v||(v={})),function(e){e.ActualBalanceIcon="Деньги",e.AirPlaneIcon="Самолет",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.DocDownloadIcon="Скачать документ",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.LogoIcon="Logo",e.LoupeIcon="Лупа",e.MasterCardIcon="MasterCard",e.MinusIcon="Минус",e.MirIcon="МИР",e.MoneyIcon="Деньги",e.MoneyInsuranceIcon="Денежное страхование",e.MonitorMobileIcon="Монитор и мобильный",e.NewDocIcon="Новый документ",e.OfficeIcon="Офис",e.OkIcon="Лого «Одноклассники»",e.PackA4Icon="PackA4Icon",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.StateMortgageIcon="StateMortgageIcon",e.TelegramIcon="Лого «Telegram»",e.UnionPayIcon="UnionPay",e.UserTickIcon="Пользователь",e.VisaIcon="Visa",e.VKIcon="Лого «VK»",e.WalletAdd2Icon="Пополнение карты",e.WalletAddIcon="Кошелёк с плюсом",e.WalletIcon="Кошелёк",e.WalletWithMoneyIcon="Кошелёк с деньгами",e.WateringCanIcon="Добавить продукт"}(y||(y={}));const w={normal:"text-primary-main",black:"text-black",white:"text-black invert"},I=u((({className:e="",imageClassName:t="",name:n="",alt:a=`Иконка ${y[n]||n}`,title:l=a,iconVersion:r="normal",asSVG:i,...s})=>{const c=`${o.CDN||""}icons/${n}.svg`;return i?h("svg",{className:e,...s,"aria-hidden":"true",children:[l?m("title",{children:l}):null,a?m("desc",{children:a}):null,m("use",{className:`${w[r]} ${t}`,href:`${c}#icon`,xlinkHref:`${c}#icon`})]}):m("img",{className:e,src:c,alt:a,title:l,...s,"aria-hidden":"true"})}));function C(e){return"string"==typeof e?"normal":e.iconVersion||"normal"}const k=(e,t)=>e.media&&t.media?e.media-t.media:0,S=u((({className:e="",image:t,imageClassName:n="",isMobile:a=!1})=>{if(!t||!t?.sources&&!t?.src)return null;return h("picture",{className:`${a?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(k).map((({src:e,format:n,media:a},l)=>m("source",{srcSet:e,type:T(n),media:a?`(max-width: ${a}px)`:"",...t.size},`${l}_${e}`))):null,$(t,n,a)]})})),$=(e,t="",n=!1)=>{const a={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},l=e.title||"",r=e.alt||e.title,i=n?"m-auto":"m-0";return m("img",{src:e.src,className:`${i} ${t}`,alt:r,title:l,style:a,...e.size})};function T(e){return e?`image/${String(e)}`:void 0}const D=u((({className:e="",image:t,imageClassName:n="",isMobile:a,...l})=>{if(!t)return null;const r="string"==typeof t?t:t.icon;return r||""===r?r.length?m(I,{className:e,imageClassName:n,iconVersion:C(t),name:r,...l}):null:m(S,{className:e,imageClassName:n,image:t,isMobile:a})})),B=u((({className:e="",imageClassName:t,image:n,...a})=>m(D,{className:e,imageClassName:t,image:n,...a})));function R(e){return e?e.filter(Boolean).join(" "):""}const V={left:"text-left",center:"text-center",right:"text-right"},A={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"}},M={XXL:{descriptionFont:"text-h5",gap:"gap-[18px]",headingType:"h0",as:"h1"},XL:{descriptionFont:"text-xl-light",gap:"gap-4",headingType:"h1",as:"h1"},L:{descriptionFont:"text-xl-light",gap:"gap-4",headingType:"h2",as:"h2"},M:{descriptionFont:"text-xl-light",gap:"gap-3",headingType:"h3",as:"h3"},S:{descriptionFont:"text-xl-light",gap:"gap-2",headingType:"h4",as:"h4"}},P=u((e=>{const{className:t="",description:n}=e;return m("div",{className:`${t}`,children:n})})),L=u((({bgColorHeadline:e="transparent",align:t="center",className:n="",title:a,description:l,headlineVersion:r="XL",as:i,...s})=>{const o=A[e],c=M[r];return h(g,{className:`font-sans flex flex-col p-[50px] ${c.gap} ${o.background} ${n}`,...s,children:[a?m(N,{headingType:c?.headingType,as:i||c?.as,className:`whitespace-pre-wrap ${o.text} ${V[t]}`,title:a}):null,l?m(P,{className:`${c.descriptionFont} ${o.text} ${V[t]}`,description:l}):null]})})),j=u((({className:e,iconClassName:t,textClassName:n,suffixClassName:a,doc:l,icon:r})=>{const{text:i,fileSize:s,...o}=l;return h("a",{className:e,role:"link",...o,children:[r?m(B,{className:t,image:r,width:"24px",height:"24px",asSVG:!0}):null,i?h("span",{className:n,children:[i,m("span",{className:a,children:o?.href&&_(U(o.href),s)})]}):null]})})),_=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),U=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},G=u((({className:e="",doc:t,icon:n})=>m(j,{className:`flex h-full box-border ${e}`,iconClassName:"mr-2.5 min-w-6 min-h-6",textClassName:"self-center text-l-light",suffixClassName:"text-secondary-text group-hover:text-primary-main",doc:t,icon:n}))),O=u((({className:e,documents:t,columnsMode:n="double",icon:a})=>t?.length?m("div",{className:e,role:"list",children:t.map(((e,t)=>m("div",{className:"double"===n?"basis-[calc(50%-20px)]":"",role:"listitem",children:m(G,{className:"group flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:a})},String(t))))}):null)),E={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},F=u((({context:e,className:t="",title:n,description:a,align:l="center",documents:r,icon:i={icon:"DocIcon"},columnsMode:s="double",...o})=>h(g,{className:`font-sans text-primary-text p-[50px] bg-white ${t}`,context:e,...o,children:[m(L,{className:"!p-0",title:n,description:a,context:e,align:l,headlineVersion:"M",as:"h2"}),m(O,{className:`mt-8 ${E[s]}`,columnsMode:s,documents:r,icon:i})]}))),W={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},z={primary:"text-primary-text",secondary:"text-white"},H={primary:"text-secondary-text",secondary:"text-white"},J=u((e=>{const{className:t="",icon:n,label:a,description:l,version:r="primary",benefitsVersion:i="normal"}=e,s="white"===i||"secondary"===r;return h("div",{className:`flex gap-5 ${l?"items-start":"items-center"} ${t}`,children:[n?m("div",{className:X(r,i),children:m(B,{className:"w-[24px] h-[24px]",image:{...n,iconVersion:s?"white":"normal"},asSVG:!0})}):null,h("div",{className:"gap-0.5",children:[a?m("div",{className:`text-h6 ${z[r]}`,children:a}):null,l?m("div",{className:`text-m-light ${H[r]}`,children:l}):null]})]})}));function X(e,t){let n="bg-primary-main text-black";return"secondary"===e?n="bg-white/30 text-black":"normal"===t&&(n="bg-secondary-light text-primary-main"),`w-[50px] h-[50px] min-w-[50px] rounded-full p-[10px] box-border flex items-center justify-center ${n}`}const q=e=>new Intl.NumberFormat("ru-RU",{maximumSignificantDigits:3}).format(e),K=u((({className:e="",context:t,title:n,description:a,image:l,benefits:r,version:i="primary",sum:s,monthLimit:o,directionRight:c=!1,...d})=>h(g,{className:`relative font-sans p-14 ${W[i]} ${e}`,context:t,...d,children:[m(L,{context:t,className:"!p-0",title:n,description:a,headlineVersion:"M",bgColorHeadline:i,align:"center"}),h("div",{className:"flex justify-center gap-[122px] mt-[30px]",children:[l?.src?m(B,{className:c?"order-2":"",image:l}):null,h("div",{className:"w-[558px] m-auto",children:[r?.length?m("div",{className:"flex flex-col gap-4",children:r.map(Q(i))}):null,Z(s,o)]})]})]}))),Q=e=>(t,n)=>m(J,{icon:t.icon,label:t.label,description:t.description,version:e},String(n));function Z(e,t){return e||t?h("div",{className:"bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4",children:[Number.isFinite(e)?Y("Страховая сумма:",e,Boolean(t)):null,Number.isFinite(t)?Y("Ежемесячный лимит:",t,Boolean(e)):null]}):null}function Y(e,t=0,n=!1){return h("div",{className:`flex justify-between items-center gap-2 w-full ${n?"w-fit":"w-full"}`,children:[m("span",{className:"text-secondary-text text-l-light",children:e}),h("span",{className:"text-primary-main text-h6",children:[q(t)," ₽"]})]})}const ee=e=>e?.includes("//"),te=e=>(e||"").replace(/\/?\?.*/,""),ne=e=>{if(!e||!ee(e))return;const t=e,n=t.indexOf("//"),a=t.indexOf("/",n+"//".length);return-1!==a?t.substring(0,a):t};var ae=Object.freeze({__proto__:null,isURL:ee,withoutQuery:te,getOrigin:ne,getHash:e=>{if(!e||!ee(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0},isHash:e=>e?.startsWith("#")});const le="/mobile",re=(e,t)=>{if(!e)return e;const n=ne(t?.href);return n?e.replace(n,"")||"/":e},ie=e=>e;function se({router:e,handlerDecorator:t=ie},n){const a=((e,t)=>{if(!e)return e;const n=re(e,t)||"",a=t?.pathname.startsWith(le);return a&&!ee(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:a,"aria-label":n.text,onClick:t((t=>{const l=a&&!ee(a),r=!n.target||"_self"===n.target;l&&r&&(t?.preventDefault(),e.push(a))}),n)}}const oe=u((({text:e,href:t,target:n,onClick:a,className:l="",children:r})=>t?m("a",{className:`no-underline ${l}`,href:t,target:n,onClick:a,children:m("span",{className:l,children:e||r})}):m("span",{className:l,children:e||r})));function ce(e){return t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:a},n):[n]),[])}const de=u((e=>{const{text:t,aboveText:n,appendLeft:a,appendRight:l}=e;return h("div",{className:me(e),children:[a||null,he(e)?h("div",{children:[m("div",{className:"text-xs-light text-left",children:n}),m("div",{className:"text-left "+(n?"text-s -mt-0.5":"text-l"),children:t})]}):null,l||null]})})),me=e=>{const{version:t,aboveText:n,rounded:a}=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",he(e)?l:"h-12 w-12",a?"rounded-full":""].join(" ")},he=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),ue={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",link:""},xe={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},pe="text-center font-sans select-none",be=({className:e,rounded:t,version:n})=>[pe,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-focus focus:border",n?ue[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ge=({className:e,rounded:t,version:n})=>["inline-block",pe,n?xe[n]:"",t?"rounded-full":"rounded-md",e].join(" "),fe=u((e=>{const{text:t,aboveText:n,appendLeft:a,appendRight:l,children:r,disabled:i,rounded:s,...o}=e,c=r??m(de,{text:t,aboveText:n,appendLeft:a,appendRight:l,rounded:s});return m(i?ve:Ne,{rounded:s,...o,children:c})})),Ne=u((({className:e="",ariaLabel:t,version:n,rounded:a,href:l,target:r,children:i,onClick:s,...o})=>m("a",{className:be({className:e,version:n,rounded:a}),href:l,target:r,onClick:s,"aria-label":t,role:l?"link":"button",...o,children:i}))),ve=u((({className:e,children:t,ariaLabel:n,version:a,rounded:l})=>m("div",{role:"button","aria-disabled":"true","aria-label":n,tabIndex:-1,className:ge({className:e,rounded:l,version:a}),children:t}))),ye=u((({context:e,className:t="",buttons:n})=>{const{handlerDecorator:a}=e,l=e.useRouter();return n&&n?.length?m("div",{className:t,children:n.map(((e,t)=>function({icon:e,iconRight:t,...n},a){if(!n?.text)return null;return m(fe,e?{appendLeft:m(B,{image:e,width:"24",height:"24",asSVG:!0}),appendRight:m(B,{image:t,width:"24",height:"24",asSVG:!0}),...n}:{...n},String(a))}(se({router:l,handlerDecorator:a},e),t)))}):null}));const we={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"},Ie={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text",tile:"bg-black","tile-white":"bg-white"},Ce=u((({className:e="",isDotted:t=!0,children:n,version:a="primary"})=>h("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t?m("div",{className:ke(a)}):null,m("span",{children:n})]}))),ke=e=>`${we[e]} ${Ie[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]}`,Se={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text",tile:"text-primary-text","tile-white":"text-white"},$e={M:"text-xl-light",L:"text-h5-light"},Te=u((e=>{const{className:t="",itemClassName:n,isDotted:a,items:l,listItemSize:r="M",version:i="primary"}=e;return m("section",{className:`${Se[i]} ${$e[r]} ${t}`,role:"list",children:l?.length?l.map(((e,t)=>m(Ce,{className:n,isDotted:a,version:i,children:e},String(t)))):null})})),De=u((({className:e="",title:t="",children:n,buttons:a,image:l})=>h("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,h("div",{className:"flex grow w-full justify-between",children:[h("div",{className:"flex flex-col justify-between w-full",children:[m("div",{children:n}),a?m("div",{className:"mt-auto",children:a}):null]}),l]})]}))),Be=(e="primary",t="normal")=>({icon:n,label:a,description:l},r)=>m(J,{icon:n,label:a,description:l,version:e,benefitsVersion:t},String(r)),Re=u((({className:e="",context:t,title:n,headlineVersion:a="L",description:l,benefits:r,benefitsVersion:i="normal",buttons:s,image:o,items:c,version:d="primary",isDotted:u=!0,textBlockClassName:x=""})=>h("div",{className:`flex grow justify-between items-stretch h-full ${e}`,children:[h("div",{className:`flex flex-col ${x}`,children:[m(L,{context:t,title:n,description:l,className:"!p-0 max-w-[600px]",bgColorHeadline:d,headlineVersion:a,align:"left"}),h(De,{context:t,buttons:Ve(t,s),children:[r?.filter((e=>e.label))?.length?m("div",{className:"flex gap-6 mt-6",children:r.map(Be(d,i))}):null,c?.length?m(Te,{className:"mt-5 text-h6",items:c,itemClassName:"mb-[7px]",version:d,isDotted:u}):null]})]}),o?.src&&m(B,{className:"mt-[-50px]",image:o})]}))),Ve=(e,t)=>t?.length?m(ye,{context:e,buttons:t,className:"flex gap-4"}):null;function Ae(e,t,n){const{text:a,href:l,target:r,onClick:i}=e,s="primary"===t?"white":"black";return h("div",{className:`flex items-center cursor-pointer ${n}`,onClick:i,children:[m(fe,{version:t,rounded:!0,className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3",ariaLabel:a,href:l,target:r,children:m(B,{className:"w-4 h-4",image:{...e?.icon||{icon:"ArrowLeftIcon"},iconVersion:s},asSVG:!0})}),a?m("span",{className:"text-m",children:a}):null]})}const Me={primary:"text-secondary-text",secondary:"text-white/80"},Pe=u((e=>{const{context:t,className:n="",breadcrumbs:a,backwardButton:l,version:r="primary",...i}=e,s=t.useRouter(),{handlerDecorator:o}=t;return h(g,{context:t,className:`font-sans overflow-hidden p-[50px] flex flex-col box-border min-h-[454px] ${W[r]} ${n}`,...i,children:[l?.text?Ae(se({router:s,handlerDecorator:o},l),r,"mb-10 -mt-2.5"):null,a?.length?m("div",{className:"text-xs-light mb-6",children:ce(m("span",{className:`mx-2 ${Me[r]}`,children:"/"}))(a.map(((e,t)=>m(oe,{...se({router:s,handlerDecorator:o},{className:Me[r],...e})},String(t)))))}):null,m(Re,{context:t,version:r,...i})]})})),Le={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"}},je=u((({title:e,description:t,blockVersion:n="primary",iconVersion:a,image:l,className:r,...i})=>{const s=Le[n];return h(g,{className:`font-sans px-9 py-4 flex ${s.background} ${r||""}`,...i,children:["small"===a?_e(s.icon):null,"big"===a?Ue(l):null,h("div",{className:"py-0.5",children:[e?m("div",{className:`text-l font-medium mb-1 ${s.title}`,children:e}):null,t?m("div",{className:`text-s ${s.description}`,children:t}):null]})]})}));function _e(e){return m("div",{className:"pt-1.5 pl-1 pr-4",children:m("div",{className:`rounded-full h-4 w-4 text-center text-xs-light ${e}`,children:"i"})})}function Ue(e){return e?.src?m(B,{className:"pt-0.5 pr-3",image:e}):null}const Ge=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function Oe(e=""){const t=Ge(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function Ee(e=""){const t=Ge(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Fe=u((e=>{const{context:t,title:n,headingType:a="h3",description:l,items:r,children:i,buttons:s,image:o,isDotted:c=!0,listItemSize:d="M",className:u="",version:x="primary",...p}=e,b="primary"===x?"text-primary-text":"";return m(g,{context:t,className:`overflow-hidden font-sans p-9 pr-3 box-border ${u} ${W[x]} ${Ee(u)} ${Oe(u)} `,...p,children:h(De,{context:t,title:n?m(N,{headingType:a,as:"h2",title:n,className:`whitespace-pre-wrap max-w-[600px] ${b}`}):null,buttons:s?.length?m(ye,{context:t,buttons:s.map((e=>({...e,className:"w-[158px]"}))),className:"flex mt-8 gap-3"}):null,image:o?.src?m(B,{className:"mt-auto ml-7",image:o}):null,children:[l?m(P,{className:"max-w-[600px] text-xl-light mt-2",description:l}):null,i,We(r,{version:x,isDotted:c,listItemSize:d})]})})}));function We(e,{version:t,isDotted:n,listItemSize:a}){const l="primary"===t?"tile":"tile-white";return e?.length?m(Te,{items:e,isDotted:n,className:"mt-3",listItemSize:a,itemClassName:"mb-1.5",version:l}):null}const ze=u((({context:e,className:t="",title:n,headlineVersion:a="S",description:l,additionalDescription:r,benefits:i=[],buttons:s,image:o,version:c="primary",...d})=>h(g,{context:e,className:`overflow-hidden font-sans p-9 box-border relative justify-between grid ${t} ${W[c]} ${Ee(t)} ${Oe(t)}`,...d,children:[m(L,{context:e,className:"!p-0 z-10 "+(n||l?"mb-3.5":""),as:"h2",title:n,description:l,headlineVersion:a,bgColorHeadline:c,align:"left"}),He(i,c),r?Xe(r,c):null,s?.length?m(ye,{context:e,buttons:s,className:"flex self-end mt-5 gap-4 z-10 text-l"}):null,o?.src?m(B,{className:"absolute right-0 bottom-0",image:o}):null]})));function He(e,t){return m("div",{className:"z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline max-w-[calc(100%-186px)]",children:e.length?e.map(Je(t)):null})}function Je(e="primary"){const t={primary:"text-secondary-text",secondary:"text-white"};return function(n,a){const{label:l="",description:r=""}=n;return[m("div",{className:"text-h6",children:l},`label-${a}`),m("div",{className:`text-m-light ${t[e]}`,children:r},`desc-${a}`)]}}function Xe(e,t="primary"){return m("div",{className:`text-m-light mt-2.5 ${{primary:"text-secondary-text",secondary:"text-white"}[t]}`,children:e})}const qe=u((({className:e,disabled:t,...n})=>m(fe,{rounded:!0,className:`group shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...n,children:m(B,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover:text-primary-main",width:"16",height:"16",asSVG:!0})})));function Ke({handler:e,isShown:t,btnClass:n,className:a="",isDisabled:l=!1}){return h("div",{children:[t[0]||l?m(qe,{className:`absolute z-10 ${n[0]} ${a}`,onClick:e[0],ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!t[0]}):null,t[1]||l?m(qe,{className:`absolute z-10 rotate-180 ${n[1]} ${a}`,onClick:e[1],ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!t[1]}):null]})}const Qe={normal:3,mini:4},Ze={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Ye={normal:380,mini:276},et=u((({title:e,description:t,image:n,items:a,button:l,version:r,isDotted:i=!0})=>{const s=function(e){return`text-xl-light m-0\n ${"secondary"!==e?"text-primary-text":""}\n `}(r);return h("div",{className:"h-full flex flex-col justify-between text-center",children:[h("div",{children:[n?.src?m("div",{className:"flex justify-center",children:m(B,{className:"mb-6",image:n})}):null,e?nt(e,s):null,t?m("div",{className:"text-m"+(e?"mt-2":""),children:t}):null,a?.length?at(a,i,r):null]}),l?.text?tt(l):null]})}));function tt(e){return m(fe,{className:"mt-6 w-full",appendLeft:e.icon&&m(B,{image:e.icon,width:"24px",height:"24px",asSVG:!0}),...e})}function nt(e,t){return m("div",{className:`text-xl-light m-0 ${t}`,children:e})}function at(e,t,n="primary"){return m(Te,{className:"max-w-[308px] mt-2 text-s "+("primary"===n?"!text-secondary-text":""),itemClassName:"mt-1 text-left first:mt-0",items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,version:n})}const lt=u((({context:e,title:t,description:n,cards:a=[],version:l="normal",activeCardIndex:r})=>h("div",{children:[m("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent"}),m(L,{context:e,className:"!p-0",title:t,description:n,headlineVersion:"L",align:"center"}),m("div",{className:`flex mt-8 ${a?.length<=Qe[l]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${r*Ye[l]}px)`},role:"list",children:a?.map(((t,n)=>function({card:e,version:t},n){return m("section",{className:`box-border border-solid border border-main-stroke p-6 mx-2 flex flex-col justify-between\n items-stretch ${Ze[t]} ${W[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:m(et,{...e})},String(n))}({card:t,version:l,context:e},n)))})]})));const rt=u((({context:e,cards:t=[],className:n="",version:l="normal",...r})=>{const[i,s]=a(0),o=t?.length>Qe[l],c=o&&t?.length-i>Qe[l],d=o&&i>0;return h(g,{context:e,className:`relative font-sans text-primary-text bg-white p-[42px] overflow-hidden ${n}`,...r,children:[m(lt,{context:e,cards:t,version:l,activeCardIndex:i,...r}),Ke({handler:[()=>s(i-1),()=>s(i+1)],isShown:[d,c],btnClass:["left-8","right-8"],className:"top-1/2"}),m("div",{className:"absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white"}),m("div",{className:"absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white"})]})})),it=u((e=>m(rt,{...e,version:"normal"}))),st=u((e=>m(rt,{...e,version:"mini"}))),ot=u((({className:e="",documents:t,...n})=>m(g,{className:`font-sans bg-white mt-[10px] ${e}`,...n,children:m("ul",{className:"flex flex-col text-s text-secondary-text p-0",children:t?.length?ct(t):null})}))),ct=e=>e.map(((e,t)=>{const{text:n,...a}=e;return m("li",{className:"mb-4 list-none",children:m("a",{className:"hover:text-primary-main",role:"link",...a,children:n||null})},`list_item_${String(t)}`)})),dt={Headline:L,LinkDocs:F,TextBlock:je,PictureText:K,ProductBlock:Pe,Tile:Fe,ProductTile:ze,Gallery:it,MiniGallery:st,LinkList:ot},mt=({blocks:e,context:t,className:n=""})=>e?.length?e.map(ht({context:t,className:n})):null,ht=({context:e,className:t})=>(n,a)=>{if(!n)return null;const{style:l,blockListType:r,...i}=n;if(!r||!(r in dt))return null;const s=R(l);return m(dt[r],{className:`${t} ${s}`,context:e,...i},`block_${a}`)},ut=u((({blocks:e,context:t})=>m("div",{className:"grid grid-cols-12 transition-all duration-300 max-h-0 overflow-hidden",children:mt({context:t,blocks:e,className:"!p-0 mb-3.5"})}))),xt=u((({label:e,isExpanded:t,blocks:n,context:l})=>{const{isActive:r,hasContent:i,icon:s,handleToggle:o}=(({blocks:e,initialState:t=!1})=>{const[n,l]=a(t),r=e?.length;return{isActive:n,hasContent:r,icon:n?"MinusIcon":"PlusIcon",handleToggle:e=>{const t=e.currentTarget;if(!t)return;l(!n);const a=t.nextSibling;a.style.maxHeight=a.style.maxHeight?"":`${a.scrollHeight}px`}}})({blocks:n,initialState:t});return h("li",{className:"border-0 border-b border-solid border-main-divider last:border-b-0",children:[h("button",{className:`border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full\n font-sans text-h6 ${i?"group cursor-pointer":""}\n `,onClick:o,children:[m("span",{className:"text-xl font-medium pr-2.5",children:e}),i?m(B,{image:s,className:"text-primary-main flex-shrink-0",width:"24",height:"24",asSVG:!0}):null]}),i?m(ut,{isExpanded:r,blocks:n,context:l}):null]})})),pt={left:"text-left",center:"text-center",right:"text-right"},bt=u((({title:e,description:t,accordionItems:n,context:a,className:l="",accordionAlignTitle:r="center",...i})=>h(g,{context:a,className:`p-[50px] mb-1 last:mb-0 font-sans bg-white text-primary-text ${l}`,...i,children:[e?m(N,{headingType:"h3",as:"h2",className:`mb-2.5 ${pt[r]}`,title:e}):null,t?m("div",{className:"mb-2.5 text-l",children:t}):null,n?.length?m("ul",{className:"list-none m-0 p-0",children:n.map(((e,t)=>m(xt,{...e,context:a},`AccordionItem${t}`)))}):null]}))),gt={primary:"bg-white",secondary:"bg-primary-main"},ft={primary:"",secondary:"text-white"},Nt={primary:"text-secondary-text",secondary:"text-white opacity-80"},vt={primary:"bg-main-divider text-primary-main",secondary:"bg-white/30 text-black"},yt=u((({className:e="",title:t,benefitList:n,benefitsBlockVersion:a="primary",...l})=>h(g,{className:`font-sans text-primary-text p-12 flex flex-col items-center ${e} ${gt[a]}`,...l,children:[t?m(N,{headingType:"h3",as:"h2",className:`max-w-[47rem] text-center ${ft[a]}`,title:t}):null,n?.length?wt(n,a):null]}))),wt=(e,t)=>m("div",{className:"flex flex-wrap w-full justify-center gap-x-20 mt-8",children:e.map(Ct(t))}),It=(e,t)=>e.icon?(e.iconVersion="secondary"===t?"white":"normal",e):e,Ct=e=>(t,n)=>{const a=t?.description||void 0;return h("div",{className:"flex items-center basis-1/2 max-w-[500px] mb-14",children:[t?.icon?.icon?m(B,{className:`w-[50px] h-[50px] min-w-[50px] p-3 rounded-full ${vt[e]}`,image:It(t.icon,e),asSVG:!0}):null,t?.icon?.src?m(B,{image:t.icon}):null,h("div",{className:"ml-5",children:[t?.label?m("h3",{className:`text-h6 m-0 ${ft[e]}`,children:t.label}):null,kt(a,e)]})]},String(n))},kt=(e,t)=>{const n=e?e?.benefitType:null;return n&&e?m("div",{className:`text-l-light mt-2 ${Nt[t]}`,children:"list"===n?$t(e):St(e)}):null},St=e=>e?e.name:null,$t=e=>{const t=e?.bullets?"list-disc pl-6":"";return e?.items&&e.items.length>0?m("ul",{className:t,children:e.items.map(((e,t)=>m("li",{children:e},`benefitListItem-${t}`)))}):null},Tt=u((e=>{const{context:t,className:n="",title:a,description:l,bonusItems:r,...i}=e;return m(g,{className:`font-sans bg-white p-[50px] pb-9 ${n}`,context:t,...i,children:h("div",{className:"container",children:[m(L,{context:t,className:"!p-0",title:a,description:l,headlineVersion:"M",align:"center"}),m("div",{className:"flex flex-wrap w-full mt-9",children:r?r.map(((e,t)=>m("div",{className:"flex-grow w-[49%] border border-gray pl-9 pt-9 pr-6 pb-6 mb-[14px] mx-[7px] even:mr-0 odd:ml-0 last:odd:mx-0",children:h("div",{className:"flex justify-between w-full",children:[h("div",{className:"mr-4",children:[m("div",{className:"text-h4",children:e.title}),m("div",{className:"text-xl-light mt-[14px] max-w-[488px]",children:e.description})]}),e.bonusCount?h("div",{className:"relative -bottom-3 h-auto flex items-end mt-14 shrink-0",children:[m("span",{className:"font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7",children:e.bonusCount}),m("span",{className:"text-[44px] bg-clip-text text-transparent bg-green-to-yellow",children:e.bonusName})]}):null]})},String(t)))):null})]})})}));function Dt(e=""){const t=Ge(e);return t<=6?"grid-cols-2":t<=8?"grid-cols-3":"grid-cols-4"}const Bt=u((({context:e,className:t="",title:n,subtitle:a,bonusBenefits:l,...r})=>h(g,{className:`font-sans text-primary-text bg-white p-50 flex flex-col text-center ${t}`,context:e,...r,children:[m(L,{context:e,className:"!p-0",title:n,description:a,headlineVersion:"M",align:"center"}),l?.length?m("div",{className:`grid gap-1 mt-8 ${Dt(t)}`,children:l.map(Rt)}):null]}))),Rt=(e,t)=>h("div",{className:"flex flex-col items-center max-w-[292px]",children:[e?.icon?m(B,{className:"h-[180px] w-[160px] min-w-[160px] min-h-[160px]",image:e.icon,width:"160",height:"180"}):null,m("div",{children:e?.label?m("span",{className:"text-h6 m-0",children:e.label}):null})]},String(t)),Vt=u((({title:e,value:t,postfix:n="",prefix:a,className:l=""})=>h("div",{className:`mb-5 ${l}`,children:[e?m("div",{className:"text-l-light text-secondary-text",children:e}):null,t?h("div",{className:"text-h3",children:[a," ",q(Math.round(t))," ",n]}):null]}))),At=6e4,Mt=2e6,Pt=97e4,Lt=Math.round(23.5),jt={minSum:At,maxSum:Mt,minMonths:13,maxMonths:60,rateBottomRange:10,rateTopRange:7,isSalaryClient:!0,isStateEmployee:!0,isInsurance:!0,sumBorder:999999},_t={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Ut=u((({rate:e,title:t="Ставка",unit:n,rateBlockClassName:a})=>h("div",{children:[m("div",{className:"text-l-light text-secondary-text",children:t}),h("div",{className:"flex justify-start",children:[m("span",{className:`block gradient-color-text font-mohave text-title-huge pr-6 -mt-4 ${a}`,children:String(e).replace(".",",")}),n?m("span",{className:"gradient-color-text text-[65px] leading-[75px]",children:n}):""]})]})));function Gt(e,t){return t?.length?m(ye,{context:e,buttons:t,className:"flex flex-col mt-7 gap-2"}):null}const Ot=u((({className:e,title:t,items:n=[],min:a=1,max:l=100,step:r=1,value:i=a,disabled:s=!1,onChange:o})=>{const c=e=>{if(!o)return;const t=Number(e.replace(/\D/g,""));o(t)},d={backgroundSize:`${(100*(i-a)/(l-a)).toFixed(2)}% 100%`};return h("div",{className:e,children:[h("label",{className:"block relative",children:[t?m("span",{className:"text-m-light",children:t}):null,m("input",{className:"m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-main-stroke rounded-md\n outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-focus disabled:border-main-stroke disabled:bg-main-divider",value:q(i),disabled:s,onChange:e=>c(e.target.value),onBlur:()=>{o&&(i<a&&o(a),i>l&&o(l))}}),m("div",{className:"absolute inset-x-0 -bottom-1 px-4 leading-[18px]",children:m("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:a,max:l,step:r,value:i,disabled:s,onChange:e=>c(e.target.value),style:d})})]}),m("div",{className:"flex justify-between my-2",children:n.map(((e,t)=>m("span",{className:"text-s-light text-secondary-text",children:e},String(t))))})]})})),Et=(e,t,n)=>Math.max(t,Math.min(e,n)),Ft=1e3;function Wt(e,t,n){const{moneyValue:a,minSum:l,maxSum:r,step:i=Ft,isShowItems:s=!0}=t,o=[`От ${q(l)} ₽`,`До ${q(r)} ₽`];return m(Ot,{title:e,items:s?o:[],min:l,max:r,step:i,value:Et(a,l,r),onChange:n})}const zt=new Map;function Ht(e){return e?Array.isArray(e)?e:e instanceof Function?Ht(e()):[e]:[e]}let Jt=function(e,t){const n=i((()=>Ht(e)),[e]),[r,s]=a(),[o,c]=a();return l((()=>{if(!n.every((e=>null===e)))try{const e=t(...n);"then"in e?(e=>{e.then((e=>zt.get(n)||e)).then(s).catch(c)})(e):s(e)}catch(e){c(e)}}),[t,...n]),{data:r,error:o,mutate:()=>Promise.resolve(void 0),isValidating:!1}};const Xt=(e,t)=>Jt(e,t);async function qt(e,t){const n=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await n.json()}function Kt(e){const{data:t}=Xt(`/wcms-resources/${e}.json`,qt);return t}const Qt=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,l=Kt(t||"bonus-calculator-data")||_t,[r,i]=((e,t,n)=>{const{minSumTravel:a,minSumOther:l,maxBonus:r,prefMonthsNum:i,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===a&&n===l)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*n),r);return[m,m*i+Math.min(Math.round(c*t)+Math.round(d*n),r)*(12-i)]})(l,n,a);return{...l,...e,monthBonus:r,yearBonus:i}},Zt=u((({context:e,className:t="",sourceBookDir:n="",buttons:l})=>{const[r,i]=a(6e3),[s,o]=a(6e3),c={travelExpenseValue:r,restExpenseValue:s},{minSumTravel:d,maxSumTravel:u,minSumOther:x,maxSumOther:p,monthBonus:b,yearBonus:g}=Qt(c,n);return h("section",{className:t,children:[h("div",{className:"w-[468px]",children:[Wt("Сумма покупок в категории путешествия, ₽",{minSum:d,maxSum:u,moneyValue:r,step:500,isShowItems:!1},i),Wt("Сумма покупок в остальных категориях, ₽",{className:"mt-7",minSum:x,maxSum:p,moneyValue:s,step:500,isShowItems:!1},o)]}),m("div",{children:b>=0?m(Ut,{title:"Баллов за месяц",rate:b,rateBlockClassName:"tracking-[-14px]"}):null}),h("div",{className:"w-[240px]",children:[g>=0?m(Vt,{title:"Баллов за год",value:g}):null,Gt(e,l)]})]})})),Yt=u((({className:e,viewBox:t,fill:n="none",width:a,height:l,paths:r,...i})=>m("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:a,height:l,children:r.map((({d:e,fill:t,...n},a)=>m("path",{d:e,fill:t||"currentColor",...i,...n},a)))}))),en=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],tn=u((({className:e,text:t,checked:n,isRadio:a,onChange:l})=>m("div",{className:e,children:h("label",{className:"flex items-center relative cursor-pointer group",children:[m("input",{className:`peer appearance-none w-5 h-5 border-solid cursor-pointer group-hover:border-checkbox-hover\n ${a?"rounded-full border-2":"rounded checked:bg-primary-main border"}\n ${n?"border-black":"border-main-stroke"}\n checked:border-primary-main m-0`,type:"checkbox",onChange:e=>{l(e.target.checked)},checked:n}),a?m("div",{className:"left-1 w-3 h-3 rounded-full bg-primary-main hidden absolute peer-checked:block"}):m(Yt,{paths:en,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),t?m("span",{className:"font-sans ml-3 text-l-light",children:t}):null]})})));function nn(e,t,n){const{minMonths:a,maxMonths:l,monthsValue:r}=t,i=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`;return m(Ot,{className:"mt-7",title:e,items:[`От ${i(a)}`,`До ${i(l)}`],min:a,max:l,step:1,value:Et(r,a,l),onChange:n})}const an=u((({items:e,checkedItem:t,onChangeCheckedItem:n})=>m("div",{children:e?.map((({id:e,text:a})=>m(tn,{isRadio:!0,text:a,checked:t===e,onChange:()=>n(e)},e)))})));function ln(e,{items:t,checkedItem:n,onChange:a}){return m(an,{context:e,items:t,checkedItem:n,onChangeCheckedItem:a})}const rn=(e,t)=>{const{isInsurance:n,isSalaryClient:a,isStateEmployee:l,moneyValue:r}=e,i=Kt(t||"credit-calculator-data")?.rows?.find((e=>n===e.isInsurance&&a===e.isSalaryClient&&l===e.isStateEmployee))||jt,{rateBottomRange:s,rateTopRange:o,sumBorder:c}=i,d=r<=c?s:o,m=((e,t)=>{const{isAnnuity:n,moneyValue:a,monthsValue:l}=t;if(n){const t=e/1200;return a*(t+t/(Math.pow(1+t,l)-1))}return Math.round(a/l)+a*(e/1200)})(d,e);return{...i,...e,finalRate:d,monthlyPayment:m}},sn="annuity",on="differential",cn=[{id:sn,text:"Аннуитетный"},{id:on,text:"Дифференцированный"}],dn=u((({context:e,className:t="",sourceBookDir:n,buttons:l})=>{const[r,i]=a(!1),[s,o]=a(!0),[c,d]=a(!1),[u,x]=a(!1),[p,b]=a(Pt),[g,f]=a(Lt),N=rn({isAnnuity:r,isInsurance:s,isSalaryClient:c,isStateEmployee:u,moneyValue:p,monthsValue:g},n);return h("section",{className:t,children:[h("div",{className:"w-[468px]",children:[Wt("Сумма кредита, ₽",{...N,step:500},b),nn("Срок кредита, месяцев",N,f),h("div",{className:"mt-7",children:[m(tn,{text:"Получаю зарплату на счёт в Россельхозбанке",checked:c,onChange:d}),m(tn,{className:"mt-3",text:"Работаю в бюджетной организации",checked:u,onChange:x}),m(tn,{className:"mt-3",text:"Комплексная страховая защита",checked:s,onChange:o})]})]}),m(Ut,{title:"Ставка",rate:N.finalRate,rateBlockClassName:"tracking-[-25px]",unit:"%"}),h("div",{className:"w-[351px]",children:[m(Vt,{title:r?"Ежемесячный платеж":"Платёж в первый месяц",value:N.monthlyPayment,postfix:"₽"}),ln(e,{items:cn,checkedItem:r?sn:on,onChange:e=>i(e===sn)}),Gt(e,l)]})]})})),mn=u((({context:e,className:t="",buttons:n,rate:l})=>{const[r,i]=a(Pt),[s,o]=a(Lt);return h("section",{className:t,children:[h("div",{className:"w-[468px]",children:[Wt("Сумма вклада, ₽",{moneyValue:r,minSum:At,maxSum:Mt},i),nn("Срок вклада, месяцев",{minMonths:13,maxMonths:60,monthsValue:s},o)]}),m(Ut,{rate:l||1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),h("div",{className:"w-[351px]",children:[m(Vt,{title:"Доход по вкладу",value:948841,postfix:"₽",prefix:"+"}),m(Vt,{title:"Сумма в конце срока",value:1218841,postfix:"₽"}),Gt(e,n)]})]})})),hn=10.2;function un(e,t,n){const{moneyValue:a}=t,l=Mt;return m(Ot,{className:"mt-7",title:e,items:[`От ${q(6e4)} рублей`,`До ${q(l)} рублей`],min:6e4,max:l,step:1e3,value:a,onChange:n})}function xn({credit:e,period:t,taxRefund:n}){return h("div",{children:[h("div",{className:"flex justify-between",children:[m(Vt,{title:"Сумма кредита",value:e,postfix:"₽"}),m(Vt,{title:"Срок",value:t,postfix:"лет",className:"w-[120px]"})]}),m(Vt,{title:"Ежемесячный платеж",value:777777,postfix:"₽"}),m(Vt,{title:"Налоговый вычет",value:n,postfix:"₽"})]})}function pn(e,t,n){const{moneyValue:a}=t,l=Mt;return m(Ot,{title:e,items:[`От ${q(6e4)} ₽`,`До ${q(l)} ₽`],min:6e4,max:l,step:1e3,value:a,onChange:n})}const bn={CreditCalculatorForm:dn,MortgageCalculatorForm:u((({context:e,className:t="",buttons:n})=>{const[l,r]=a(1e6),[i,s]=a(12),[o,c]=a(!1),[d,u]=a(!1),x=(e=>{const{calculatorParams:t,isInsurance:n}=e;return t?n?t?.rateWithInsurance||hn:t?.rateWithoutInsurance||hn:hn})({calculatorParams:{},isInsurance:o});return h("section",{className:t,children:[h("div",{className:"w-[468px]",children:[pn("Стоимость недвижимости, ₽",{moneyValue:l},r),un("Первоначальный взнос, ₽",{moneyValue:l},r),nn("Срок ипотеки, месяцев",{minMonths:13,maxMonths:60,monthsValue:i},s),h("div",{className:"mt-7",children:[m(tn,{text:"Страхование жизни",checked:o,onChange:c}),m(tn,{className:"mt-4",text:"Страхование жизни, здоровья и временной утраты трудоспособности",checked:d,onChange:u})]})]}),m(Ut,{rate:x,rateBlockClassName:"tracking-[-25px]",unit:"%"}),h("div",{children:[m("div",{className:"w-[351px]",children:xn({credit:3892e3,period:15,taxRefund:65e4})}),Gt(e,n)]})]})})),DepositCalculatorForm:mn,BonusCalculatorForm:Zt},gn=({context:e,className:t})=>(n,a)=>{const l=n?.calcType;if(!l||!(l in bn))return null;const r=bn[l];return m("section",{className:`box-border relative bg-white flex shrink-0 self-start basis-full ${t}`,role:"listitem",children:h("div",{className:"box-border p-9 w-full",children:[n?.title?m(N,{className:"text-center mb-6",title:n.title}):null,m(r,{context:e,...n,className:"flex justify-between"})]})},String(a))},fn=u((({className:e="",context:t,calculatorTabs:n=[],...l})=>{const r=n.map((e=>e.nav||{})),i=n.map((({calculatorBlock:e})=>e||{})),[s,o]=a(0),[c,d]=a(0),u=n?.length>3&&n?.length>c+3,x=c>0;return h(g,{context:t,className:`box-border overflow-hidden relative font-sans w-100 text-primary-text ${e}`,...l,children:[h("div",{className:"bg-white",children:[r.length>1?Nn({tabsShift:c,tabsNav:r,activeSlideIndex:s,setActiveSlideIndex:o}):null,Ke({handler:[()=>d(c-1),()=>d(c+1)],isShown:[x,u],btnClass:["left-3","right-3"],className:"top-8"})]}),m("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:i?.length?i.map(gn({context:t,className:e})):null})]})}));function Nn({tabsShift:e,tabsNav:t,activeSlideIndex:n,setActiveSlideIndex:a}){return h("div",{children:[m("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000",children:m("div",{className:"w-full flex flex-nowrap items-end gap-2",children:t.map(((e,t)=>function({tab:e,i:t,activeSlideIndex:n,onClick:a}){const l=t===n,r=l?"h-[88px] w-[387px] min-w-[387px] p-5 border-none bg-primary-main text-white":"h-[77px] w-[328px] min-w-[328px] px-5 py-4 ease-in duration-300 bg-white text-primary-text",i=l?"text-xl mb-1.5":"text-l mb-[3px]",s=l?"text-l-light text-white":"text-m-light text-secondary-text",o=l?"":"text-primary-main";return h("button",{type:"button",onClick:a,"aria-label":e?.title,className:`box-border relative border border-main-stroke cursor-pointer text-left border-b-0 flex hover:h-[88px]\n ${r}`,children:[m(B,{className:`h-[24px] w-[24px] min-w-[24px] min-h-[24px] mr-4 ${o}`,image:{...e?.icon,iconVersion:l?"white":"normal"},width:"24",height:"24",asSVG:!0}),h("div",{className:"border-0",children:[m("div",{className:`${i}`,children:e?.title}),m("div",{className:`${s}`,children:e.description})]})]},String(t))}({tab:e,i:t,activeSlideIndex:n,onClick:()=>a(t)})))})}),m("div",{className:"w-full h-2 bg-primary-main"})]})}const vn={RUB:"₽",USD:"$",EUR:"€"},yn=u((({className:e="",label:t,currency:n="RUB",onChange:a,value:l="",minValue:r=0,maxValue:i=3e5,...s})=>h("div",{className:e,children:[t?m("label",{className:"block text-m-light mb-2",children:t}):null,h("div",{className:"h-[56px] relative flex items-center",children:[m("input",{type:"number",className:"text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke",onChange:e=>{if(!a)return;const t=""===e.target.value?"":String(Et(e.target.value,r,i));a(t)},value:l,min:r,max:i,...s}),m("span",{className:"text-xl-light absolute right-4",children:vn[n]})]})]}))),wn={version:"primary",className:"w-full h-[56px] px-9 mt-6"},In=u((({className:e="",title:t="Укажите сумму перевода",...n})=>{const[l,r]=a(""),i=!Number(l);return h(g,{className:`p-[50px] flex flex-col items-center font-sans bg-white ${e}`,...n,children:[t?m(N,{className:"max-w-[684px] pb-9",headingType:"h2",title:t}):null,h("form",{className:"w-[468px]",method:"POST",action:"https://www.rshb.ru/p2p/",children:[m(yn,{name:"amount",value:l,onChange:r,placeholder:"1500",label:"Сумма перевода"}),m("button",{type:"submit",className:i?ge(wn):be(wn),disabled:i,children:"Далее"})]})]})})),Cn={default:"normal",primary:"white",secondary:"black"},kn={black:"bg-black",white:"bg-white"},Sn=u((({className:e="",title:t,description:n,image:a,price:l,button:r,colors:i})=>h("section",{className:`border border-solid box-border p-[30px] min-w-[402px] flex flex-col justify-left ${e}`,role:"listitem",children:[a?.src?m(B,{className:"mb-5 flex justify-center",image:a}):null,t?m(N,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,n?m("div",{className:"text-m-light text-left mb-4",children:n}):null,i?.length?h("div",{className:"flex mb-4 text-m-light text-secondary-text",children:[m("div",{className:"mr-1.5",children:"Доступные цвета: "}),i.map($n)]}):null,l?h("div",{className:"text-h3 text-left",children:[l," ₽"]}):null,r?Tn(r):null]}))),$n=(e,t)=>m("span",{className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${kn[e]}`},String(t)),Tn=e=>{const{icon:t,iconRight:n,...a}=e;if(!e?.text)return null;const l=Cn[e?.version||"default"],r=Dn({...t,iconVersion:l}),i=Dn({...n,iconVersion:l});return m(fe,{className:"mt-5 w-full",appendLeft:r,appendRight:i,...a})},Dn=e=>{if(!e||!e?.icon&&!e?.src)return null;const t=e?.size?.width?`${e.size.width}`:"24";return m(B,{image:e,width:t,height:"24",asSVG:!0})},Bn="absolute top-0 bottom-0 w-[84px]",Rn=u((({context:e,cards:t=[],className:n="",title:l,description:r,...i})=>{const[s,o]=a(0);return h(g,{context:e,className:`bg-white relative font-sans p-12 overflow-hidden text-center ${n}`,...i,children:[m(L,{context:e,className:"!p-0",title:l,description:r,headlineVersion:"M",align:"center"}),m("div",{className:"flex duration-1000 gap-3.5 mt-8",style:{transform:`translateX(-${430*s}px)`},role:"list",children:t?.length?t.map(Vn(e)):null}),An({cardsCount:t.length,activeCardIndex:s,setActiveCardIndex:o}),m("div",{className:`${Bn} left-0 bg-opacity-from-white`}),m("div",{className:`${Bn} right-0 bg-opacity-to-white`})]})})),Vn=e=>(t,n)=>m(Sn,{context:e,...t},String(n)),An=({cardsCount:e,activeCardIndex:t,setActiveCardIndex:n})=>{const a=e>3;return Ke({handler:[()=>n(t-1),()=>n(t+1)],isShown:[a&&t>0,a&&e-t>3],btnClass:["left-8","right-8"],className:"top-1/2 z-10 mt-6"})},Mn=({columnsLength:e,colsLengthForScroll:t,activeCardIndex:n,setActiveCardIndex:a})=>{const l=e>t;return{handleNextClick:()=>a(n+1),handlePrevClick:()=>a(n-1),isScrollAvailable:l,showNextButton:l&&e-n>t,showPrevButton:Boolean(l&&n>0)}},Pn="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",Ln="border-main-stroke border-solid border",jn="border-main-divider border border-t-0 border-x-0",_n="w-[200px] mr-6",Un=u((({icon:e,image:t,title:n,link:a})=>h("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${Ln} ${Pn}`,role:"columnheader",children:[e&&!t?.src&&m(B,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}),t?.src&&m(B,{className:"mb-[18px]",image:t}),n?m(N,{headingType:"h4",as:"h3",className:"text-center text-white",title:n}):null,a?.text&&m("div",{className:"mt-auto w-full",children:m(fe,{href:a.href,target:a.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:m("div",{className:"text-xs-light font-medium py-[11px]",children:a.text})})})]}))),Gn={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},On=u((({children:e,activeCardIndex:t,columnWidth:n,version:a="comparison"})=>m("div",{className:"flex flex-1 overflow-hidden",children:m("div",{className:Gn[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),En=u((({children:e})=>m("div",{className:"self-start flex flex-col",role:"row",children:m("div",{className:"flex",children:e})}))),Fn=u((({colHeaders:e,activeCardIndex:t,router:n,handlerDecorator:a})=>h(En,{children:[m("div",{className:_n,role:"columnheader"}),m(On,{activeCardIndex:t,columnWidth:336,children:e.map(((e,t)=>m(Un,{...e,link:e.link&&se({router:n,handlerDecorator:a},e.link)},String(t))))})]}))),Wn=u((({isScrollAvailable:e,handleNextClick:t,handlePrevClick:n,showNextButton:a,showPrevButton:l})=>e?m("div",{children:Ke({handler:[n,t],isShown:[l,a],btnClass:["top-[108px]","top-11"],className:"right-7",isDisabled:!0})}):null)),zn=u((({cell:e,isFirstRow:t,isLastRow:n,isFillGradient:a})=>m("div",{className:`w-80 box-border flex flex-col ${Ln} ${n?"border-t-0 rounded-b-md":"border-y-0"} ${a?Pn:""}`,role:"cell",children:m("div",{className:`mx-7 h-full ${jn} ${a&&t?"border-t":""} ${n?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>Xn(e,t,a)))})}))),Hn=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),Jn=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),Xn=({label:e,description:t},n,a)=>h("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e?m("h4",{className:Hn(a),children:e}):null,t?m("div",{className:Jn(a),children:t}):null]},String(n)),qn=(e=!1)=>`text-s py-7 ${jn} w-[200px] mr-6 ${e?"border-b-0":"border-solid"}`,Kn=u((({row:{header:e,data:t},activeCardIndex:n,isColoredFirstColumn:a,isFirstRow:l,isLastRow:r})=>h(En,{children:[e?.title?m("div",{className:qn(r),children:e.title}):null,t?.length?m(On,{activeCardIndex:n,columnWidth:336,children:t.map(((e,t)=>m(zn,{cell:e,isFirstRow:l,isLastRow:r,isFillGradient:a&&0===t},String(t))))}):null]}))),Qn=u((({rowData:e,activeCardIndex:t,isColoredFirstColumn:n,...a})=>h("div",{className:"relative",children:[e.map(((e,a,{length:l})=>m(Kn,{row:e,isFirstRow:0===a,isLastRow:a+1===l,activeCardIndex:t,isColoredFirstColumn:n},String(a)))),m(Wn,{...a})]}))),Zn=u((({context:e,columns:t,rowHeaders:n,isShowAllRow:l,visibleRowLength:r,isColoredFirstColumn:i})=>{const s=e.useRouter(),{handlerDecorator:o}=e,c=t?.map((({header:e})=>e||{})),d=t?.map((({data:e})=>e))||[],u=n?.map(((e,t)=>({header:e,data:d.map((e=>e?.[t]||[{}]))}))).slice(0,l?n.length:r),[x,p]=a(0),b=Mn({columnsLength:d.length,colsLengthForScroll:2,activeCardIndex:x,setActiveCardIndex:p}),{isScrollAvailable:g}=b;return h("div",{children:[h("div",{role:"table",children:[c?.length?m(Fn,{colHeaders:c,activeCardIndex:x,router:s,handlerDecorator:o}):null,u?.length?m(Qn,{rowData:u,activeCardIndex:x,isColoredFirstColumn:i,...b}):null]}),g?m("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),Yn=u((({className:e="",context:t,title:n,rowHeaders:l,columns:r,visibleRowLength:i=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=a(!i);return h(g,{context:t,className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e}`,...o,children:[m(N,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:n}),m(Zn,{context:t,columns:r,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:i}),i?ea({isShowAllRow:c,onClick:()=>d(!c)}):null]})})),ea=({isShowAllRow:e,onClick:t})=>m("div",{className:"pr-[50px]",children:h("div",{className:"flex w-full",children:[m("div",{className:_n}),m("button",{onClick:t,className:"mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:m("div",{className:"font-sans text-xs-light font-medium py-[11px]",children:e?"Скрыть":"Показать все параметры"})})]})}),ta=(e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n};function na(){return async function(e,t){try{return await qt(e,t)}catch(e){console.error(e)}return null}(aa,{method:"POST",body:JSON.stringify(la)})}const aa="https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000",la={query:{bool:{must:[{term:{russian_region_code:"77"}},{term:{from_volume:"0"}},{terms:{currency_pair:["USD/RUB","EUR/RUB"]}}]}}},ra=e=>e.reduce(((e,t)=>{const n=t.currency_first?.code;return e.some((e=>e.code===n))||e.push({code:n,buy:ta(Number(t.rate_buy),3),sell:ta(Number(t.rate_sell),3)}),e}),[]);var ia;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(ia||(ia={}));const sa=new Intl.NumberFormat("ru",{style:"currency",currency:ia.RUB}),oa=e=>e?sa.format(e):"",ca="text-left text-m-light text-secondary-text",da={USD:"DollarIcon",EUR:"EuroIcon"},ma=u((({className:e,exchangeCurrencyItems:t})=>h("table",{className:`h-fit w-fit ${e}`,children:[m("thead",{children:h("tr",{children:[m("th",{className:ca,children:"Валюта"}),m("th",{className:`${ca} pl-11`,children:"Купить"}),m("th",{className:`${ca} pl-11`,children:"Продать"})]})}),m("tbody",{children:t.map((e=>ha(e)))})]}))),ha=e=>{const t=e?.code;return h("tr",{className:"pb-1 text-h6",children:[m("td",{className:"pt-4",children:h("div",{className:"flex items-center",children:[t?m(B,{image:{icon:da[t]},width:"24",height:"24"}):null,m("span",{className:"ml-2",children:t})]})}),m("td",{className:"pt-4 pl-11",children:oa(e?.sell)}),m("td",{className:"pt-4 pl-11",children:oa(e?.buy)})]},t)},ua=u((({className:e="",address:t,distance:n})=>h("div",{className:`flex ${e}`,children:[m(B,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),h("div",{className:"ml-3",children:[t?m("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,n?h("p",{className:"text-secondary-text m-0 text-m",children:["Курс указан для ближайшего офиса - ",n]}):null]})]}))),xa=(e,t,n)=>{const a=Number(pa(e))*Math.pow(t,n?-1:1);return Number.isInteger(a)?a:ta(a)},pa=e=>e.replace(/[^\d.,]/g,"").replace(",","."),ba=e=>{return(t=[[e=>e.value!==ia.RUB&&e.oppositeValue!==ia.RUB,()=>e.handleConvert(e.value,ia.RUB)],[e=>e.value===ia.RUB&&e.oppositeValue===ia.RUB,()=>e.handleConvert(e.value,ia.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,n]=t.find((([t])=>t(e)))||[];return n})(e)?.();var t},ga=u((({className:e="",id:t,name:n,type:a="text",placeholder:l,pattern:r,value:i,onChange:s})=>m("input",{className:e,id:t,name:n||t,type:a,pattern:r,placeholder:l,value:i,onChange:e=>{const t=e.target.validity.valid?e.target.value:i;s(t)}}))),fa={background:"url('/icons/ArrowDownIcon.svg') no-repeat right 16px top 50%"},Na=u((({className:e="",id:t,name:n,children:a,value:l,onChange:r})=>m("select",{className:`appearance-none ${e}`,style:fa,id:t,name:n||t,value:l,onChange:e=>r(e.target.value),placeholder:"12321321312",children:a}))),va=u((({className:e="",value:t,selected:n,disabled:a=!1,children:l})=>m("option",{className:e,value:`${t}`,selected:n,disabled:a,children:l})));function ya(e){const{placeholder:t,rates:n,selected:a,value:l,setValue:r,setSelected:i}=e;return h("div",{className:"relative flex items-center",children:[m(ga,{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:l,onChange:r}),n.length?m(Na,{className:"shrink-0 w-20 h-9 -translate-x-8 bg-transparent",value:a,onChange:e=>i(e),children:n.map(((e,t)=>m(va,{value:e.code,children:e.code},String(t))))}):null]})}const wa=u((({context:e,className:t="",currencyRatesBuy:n,currencyRatesSell:l,button:r})=>{const{useRouter:i,handlerDecorator:s}=e,o=i(),[c,d]=a({inputSell:"",inputBuy:"",selectSell:n?.[0]?.code||ia.RUB,selectBuy:l?.[0]?.code||ia.USD}),u=e=>{d((t=>({...t,...e})))};return h("div",{className:`grid gap-[18px] pt-2 ${t}`,children:[ya({placeholder:"Хочу продать",rates:l,selected:c.selectSell,setSelected:Ia(c,u,l),value:c.inputSell,setValue:e=>ka(u,l)(e,c.selectSell,c.selectBuy)}),ya({placeholder:"Получу",rates:n,selected:c.selectBuy,setSelected:Ca(c,u,n),value:c.inputBuy,setValue:e=>Sa(u,n)(e,c.selectBuy,c.selectSell)}),r?.text?m(fe,{className:"py-4 mr-1",version:r?.version,...se({router:o,handlerDecorator:s},r),children:r.text}):null]})})),Ia=(e,t,n)=>a=>{t({selectSell:a}),ba({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,l=e.selectBuy)=>{ka(t,n)(e.inputSell,a,l)}})},Ca=(e,t,n)=>a=>{t({selectBuy:a}),ba({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,l=e.selectSell)=>Sa(t,n)(e.inputBuy,a,l)})},ka=(e,t)=>(n,a,l)=>{e({inputSell:pa(n),selectBuy:l});const r=t.find((e=>e.code===l))?.buy||t.find((e=>e.code===a))?.sell;r&&e({inputBuy:String(xa(n,r,a===ia.RUB)||"")})},Sa=(e,t)=>(n,a,l)=>{e({inputBuy:pa(n),selectSell:l});const r=t.find((e=>e.code===l))?.sell||t.find((e=>e.code===a))?.buy;r&&e({inputSell:String(xa(n,r,a===ia.RUB)||"")})},$a={address:"Москва, ул.Ленина д.28",distance:"6км"},Ta=u((({className:e="",context:t,title:n="Курсы обмена валют",button:a,...l})=>{const r=function(){const{data:e}=Xt(aa,na),t=e?.hits?.hits?.map((e=>e._source))||[];return t.length?ra(t):t}(),i=r.filter((e=>e.buy));i.unshift({code:ia.RUB});const s=r.filter((e=>e.sell));return s.push({code:ia.RUB}),m(g,{context:t,className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,...l,children:m(De,{context:t,title:m(N,{headingType:"h4",title:n,className:"whitespace-pre-wrap text-h4"}),children:h("div",{className:"flex",children:[h("div",{className:"mr-14 pt-4",children:[r?m(ma,{className:"mb-[30px]",exchangeCurrencyItems:r}):null,m(ua,{...$a})]}),r.length&&i.length&&s.length?m(wa,{className:"grow",context:t,currencyRatesBuy:i,currencyRatesSell:s,button:a}):null]})})})})),Da={"bg-white":"normal",transparent:"white"},Ba={"bg-white":"text-primary-main",transparent:"text-white"},Ra={"bg-white":"text-black",transparent:"text-white"},Va=u((({className:e="",href:t,logo:n,children:a=n?.title,targetBlank:l,bgColor:r="bg-white",hideTitle:i})=>h("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"/",target:l?"_blank":"_self","aria-label":n?.title||"Россельхозбанк",children:[m(B,n?.image?.src?{image:n.image,className:Ba[r],width:"40",height:"45",asSVG:!0}:{image:{icon:"LogoIcon",iconVersion:Da[r]},className:`${Ba[r]} w-10`,width:"40",height:"45",asSVG:!0}),i?null:Aa(a,r,n?.title)]}))),Aa=(e,t,n)=>m("span",{className:`${Ra[t]} font-light ml-2.5`,children:e||n||"Россельхозбанк"}),Ma=u((({className:e,isMobile:t=!1})=>{const{term:n,setTerm:l}=(()=>{const[e,t]=a("");return{term:e,setTerm:e=>t(e)}})(),r=t?"text-s":"text-l-light",i=t?" placeholder-transparent":"h-full",s=t?"some search":void 0;return h("form",{className:`font-sans relative ${e}`,children:[h("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[m("div",{className:t?"w-[20px] h-[20px]":"w-[24px] h-[24px]",children:m(B,{image:"LoupeIcon",width:"24",height:"24"})}),n?null:m("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${r}`,children:"Поиск по сайту"})]}),m("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 ${i}`,value:n,onChange:e=>l(e.target.value),type:"text",name:"search-bar-input",placeholder:s}),t?m("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(),l("")},children:m(B,{image:"CloseIcon",width:"24",height:"24"})}):m(fe,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-1 right-1",onClick:e=>{e?.preventDefault(),console.log("click")},children:m("div",{className:"text-s px-9 py-2.5",children:"Найти"})})]})})),Pa=u((({className:e=""})=>m(Ma,{className:e}))),La=u((({className:e="",items:t,hasButton:n,context:a})=>{const l=a.useRouter(),{handlerDecorator:r}=a;return h("div",{className:e,children:[t?.length?t.map(ja):null,n?m(fe,{version:"primary",className:"mb-6 w-full",...se({router:l,handlerDecorator:r},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),ja=(e,t)=>{const{type:n,text:a,description:l}=e;return h("div",{className:"mb-4",children:[m("div",{children:_a(n,a)}),m("div",{className:"mt-1 text-s-light text-secondary-text",children:l})]},String(t))},_a=(e,t="")=>{switch(e){case"tel":return m("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Ua(t)}`,children:t});case"email":return m("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return m("span",{children:t})}},Ua=e=>e.replaceAll(/\D/g,""),Ga=u((({className:e="",index:t,text:n,href:a,target:l,onClick:r})=>m("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:a,target:l,onClick:r,children:n||`Документ ${t}`}))),Oa=u((({links:e,className:t="",context:n})=>{const a=n.useRouter(),{handlerDecorator:l}=n;return m("div",{className:t,children:e?.length?m("div",{className:"flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider",children:e.map(((e,t)=>m(Ga,{index:t,className:"font-l-light max-w-[292px]",...se({router:a,handlerDecorator:l},e)},String(t))))}):null})})),Ea=e=>t=>e?.href===t?.href,Fa=(e,t)=>{return(a=e,l=t,(a||[]).map((e=>l?.find(Ea(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(Ea(e))))));var n,a,l};function Wa(){const{data:e}=Xt(`/wcms-resources/${o.SITEMAP||"sitemap"}.json`,qt);return e||{}}const za=u((({className:e="",items:t,context:n})=>{const a=Wa(),l=Fa(a.topItems,t),r={router:n.useRouter(),handlerDecorator:n.handlerDecorator};return m("div",{className:`flex flex-grow items-start justify-between gap-[54px] xl:gap-5 ${e}`,children:l?.map(((e,t)=>Ha(e,t,r)))})})),Ha=(e,t,{router:n,handlerDecorator:a})=>{const{text:l,href:r,items:i,target:s}=e;return h("div",{className:"flex flex-col w-1/5 last:w-1/4 gap-3.5",children:[m("a",{className:"block leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:r,target:s||"_self",children:l||`Раздел ${t}`}),i?.map(((e,t)=>m(Ja,{...se({router:n,handlerDecorator:a},e),index:t},String(t))))]},String(t))},Ja=u((({text:e,href:t,target:n,index:a})=>m("a",{className:"block text-l-light text-secondary-text hover:text-primary-main no-underline",href:t,target:n||"_self",children:e||`Раздел ${a}`}))),Xa=[{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"}],qa=u((({href:e,version:t="primary"})=>{const{icon:n,label:a}=Xa.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};if(!n)return null;return m("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":a,target:"_blank",rel:"noopener noreferrer",children:n?m(B,{image:n,imageClassName:"group-hover:text-white",width:"24",height:"24",asSVG:!0}):null})})),Ka=u((({className:e="",media:t,version:n,context:a,children:l})=>{const r=a.useRouter(),{handlerDecorator:i}=a;return h("div",{className:"font-sans",children:[m("div",{className:`flex gap-2.5 ${e}`,children:t?.map(((e,t)=>m(qa,{version:n,...se({router:r,handlerDecorator:i},e)},String(t))))}),m("span",{className:"text-s-light text-secondary-text",children:l})]})})),Qa=u((({className:e="",index:t,text:n,href:a,target:l,onClick:r})=>m("a",{className:`text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:l,onClick:r,children:n||`Документ ${t}`}))),Za=u((({className:e,links:t,context:n})=>{const a=n.useRouter(),{handlerDecorator:l}=n;return h("div",{className:`${e||""}`,children:[m("div",{className:"pt-5",children:m("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?m("div",{className:"flex justify-start items-start gap-5 pt-2.5",children:t.map(((e,t)=>m(Qa,{index:t,...se({router:a,handlerDecorator:l},e)},String(t))))}):null]})})),Ya="w-[204px]",el=u((({className:e,documents:t,relatedEnterprises:n,contacts:a,socialMedia:l,mobileApps:r,topItems:i,context:s,...o})=>h(g,{tag:"footer",context:s,className:`p-9 bg-white font-sans ${e||""}`,...o,children:[h("div",{className:"flex items-stretch gap-[54px] pb-[30px] xl:gap-8",children:[m(Va,{className:Ya}),m(Pa,{context:s,className:"grow"})]}),h("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[h("div",{className:"w-[204px] flex flex-col shrink-0 overflow-hidden",children:[m(La,{items:a,context:s,hasButton:!0}),m(Ka,{media:l,context:s,children:"Соцсети"}),m(Ka,{className:"mt-6",media:r,context:s,children:"Мобильное приложение"})]}),m(za,{className:"pt-[3px]",context:s,items:i})]}),m(Oa,{className:"mt-[98px]",links:n,context:s}),m(Za,{links:t,context:s})]}))),tl=u((({context:e,className:t="",title:n,description:a,calendar:l,...r})=>h(g,{className:`font-sans bg-white p-[50px] ${t}`,context:e,...r,children:[m(L,{context:e,className:"!p-0",title:n,description:a,headlineVersion:"M",align:"center"}),l?nl(l):null]}))),nl=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:e.month.length*t+"%"})));return h("div",{className:"w-full flex flex-col justify-center mt-[54px]",children:[m("div",{className:"flex w-full mb-3 text-h6 text-center",children:n.map((e=>al(e,t)))}),m("div",{className:"flex w-full",children:n.map(((e,t)=>h("div",{className:"pr-[11px] mr-3 border-r border-main-divider last:border-r-0 last:pr-0 last:mr-0",style:{flexBasis:e.flexBasis},children:[m("div",{className:"flex",children:ll(e)}),h("div",{className:"text-s-light text-primary-text mt-3",children:[m("span",{children:e.text})," ",m("span",{className:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},al=(e,t)=>e.month.map(((e,n)=>m("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),ll=e=>e.month.map((e=>e.image?.src?m("div",{className:"h-[207px] border-r-[1px] pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0",children:m(B,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),rl=(e,t,n=((e,t)=>t.startsWith(e)))=>n(te(e),(e=>(e||"").replace(le,""))(te(ee(e)?t.href:t.pathname))),il=e=>t=>rl(t.href,e),sl=e=>t=>t.items?.some(il(e))||rl(t.href,e)||((e,t)=>ne(e)===ne(t.href))(t.href,e),ol="font-sans text-s-light",cl=u((({className:e="",text:t,href:n,target:a,active:l,flat:r,onClick:i,children:s,ariaLabel:o,bgColor:c="bg-white"})=>m("a",{className:`${dl(c,l,r)} ${e}`,href:n,target:a,onClick:i,rel:"noopener noreferrer","aria-label":o,children:m("span",{className:ml(c,l,r),children:t||s})}))),dl=(e,t=!1,n=!1)=>{let a="border-transparent";return t&&(a="rounded-md "+("bg-white"===e?"border-primary-main":"border-white")),`${a} inline-block border border-solid bg-transparent text-center no-underline ${n?"":"px-4 py-2"}`},ml=(e,t=!1,n=!1)=>{if("transparent"===e)return`text-white hover:text-primary-hover ${ol}`;return`${t?"text-primary-main":(n?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"} ${ol}`},hl=s("https://10.80.4.9");const ul=u((({className:e="",children:t,ariaLabel:n})=>m("button",{type:"button",className:`border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${e}`,disabled:!0,"aria-label":n,children:t}))),xl={"bg-white":"text-primary-text hover:text-primary-main",transparent:"text-white"},pl={"bg-white":"text-secondary-light hover:text-secondary-hover",transparent:"text-white"},bl={"bg-white":"black",transparent:"white"},gl=u((({className:e,defaultLocation:t="",bgColor:n="bg-white"})=>{const[i,s]=function(e){const[t,n]=a(e);return l((()=>{n(globalThis?.localStorage.getItem("location")||e)}),[e]),[t,r((()=>{hl.getFetcherAddress().then((t=>{const a=t||e;globalThis?.localStorage.setItem("location",a),n(a)}))}),[e])]}(t);return h("div",{className:`flex items-center ${e||""}`,children:[m(cl,{className:"mr-5",flat:!0,href:"#",text:i,ariaLabel:"Местоположение",onClick:s,bgColor:n}),m(cl,{className:"mr-7",flat:!0,href:"#",text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов",bgColor:n}),m(ul,{className:`mr-5 group ${xl[n]}`,ariaLabel:"Поиск по сайту",children:m(B,{image:{icon:"LoupeIcon",iconVersion:bl[n]},className:"h-full pointer-events-none",imageClassName:"group-hover:text-primary-hover group-hover:invert-0 pointer-events-none",asSVG:!0})}),m(ul,{className:`${pl[n]} group min-w-[32px] min-h-[32px]`,ariaLabel:"Дополнительные ссылки",children:m(B,{image:{icon:"GridIcon",iconVersion:bl[n]},className:"h-full bg-main-divider/20 rounded-full pointer-events-none",imageClassName:"group-hover:text-primary-hover group-hover:invert-0",asSVG:!0})})]})})),fl=e=>(t=[])=>{const n=t?.filter(il(e));return n?.length?(a=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>a(e)>a(t)?e:t)))(n):void 0;var a},Nl="absolute left-0 -bottom-3 w-full h-[2px]",vl=u((({className:e="",text:t,href:n,target:a,active:l,onClick:r,children:i,bgColor:s="bg-white",dataItemName:o})=>h("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:n,target:a,onClick:r,"data-item-name":o,children:[m("span",{className:yl(s,l),children:t||i}),l?m("div",{className:wl(s,l)}):null]}))),yl=(e,t=!1)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-primary-text hover:text-primary-main"),`${n} font-sans text-l-light`},wl=(e,t=!1)=>t?`${"bg-white"===e?"bg-primary-main":e} ${Nl}`:Nl,Il={"bg-white":"bg-primary-text",transparent:"bg-white"},Cl=u((e=>{const{menuVisible:t,toggleMenu:n,menuItems:a,bgColor:l,context:r,activeSubItem:i}=e,{useRouter:s,handlerDecorator:o}=r,c=s();return h("div",{className:"absolute w-52 -top-4 right-0 pt-4 z-40 "+(t?"bg-white rounded-md shadow-blue-gray/24":""),children:[m("button",{className:"flex justify-between items-center cursor-pointer h-6 ml-6",onClick:n,"aria-label":""+(t?"Скрыть другие разделы":"Показать другие разделы"),children:Array(3).fill(l).map(Sl)}),m("div",{className:"flex flex-col rounded-md bg-white p-6 pb-2 "+(t?"":"hidden"),"aria-hidden":!t,children:kl({menuItems:a,router:c,handlerDecorator:o,activeSubItem:i})})]})})),kl=({menuItems:e,router:t,handlerDecorator:n,activeSubItem:a})=>e?.map((e=>{return m("a",{...se({router:t,handlerDecorator:n},e),className:"text-l-light pb-4 hover:text-primary-main "+(l=e,l===a?"text-primary-main":""),children:e.text},e.href);var l})),Sl=(e,t)=>m("div",{className:`w-[3px] h-[3px] rounded mr-1 ${Il[e]}`},String(t)),$l=u((({context:e,subItems:t=[],bgColor:n})=>{const[l,r]=a(!1),i=e.useRouter(),{handlerDecorator:s,IntersectionObserverTag:o}=e,[c,d]=a(t.length),u=t.slice(c),x=fl(i)(t);return h("nav",{className:"relative mt-6",children:[m("div",{className:"overflow-hidden whitespace-nowrap mr-52 pb-3",children:t.map(((e,t)=>{return m(o,{tag:"span",observerCallback:(a=t,e=>{e.length&&(e[0].intersectionRatio<1?d((e=>Math.min(e,a))):d((e=>Math.max(e,a+1))))}),observerOptions:{threshold:1},children:m(vl,{className:"mr-8 "+(c-1<t?"invisible":""),active:e===x,...se({router:i,handlerDecorator:s},e),bgColor:n})},String(t));var a}))}),u.length?m(Cl,{context:e,activeSubItem:x,menuVisible:l,toggleMenu:()=>r(!l),menuItems:u,bgColor:n}):null]})})),Tl={"bg-white":"bg-main-divider",transparent:"bg-main-divider opacity-30"},Dl=u((({className:e="",defaultLocation:t="Москва",showSubMenu:n=!0,bgColor:a="bg-white",context:l,topItems:r,logo:i,...s})=>{const o=l.useRouter(),c=Wa(),{handlerDecorator:d}=l,u=Fa(c.topItems,r),[x]=u,p=n?u.find(sl(o))||x:null,b=u.map(((e,t)=>m(cl,{active:e===p,...se({router:o,handlerDecorator:d},e),"aria-label":e.text,bgColor:a},String(t))));return m(g,{tag:"header",context:l,className:`pt-6 pb-5 px-20 ${a} ${e}`,...s,children:h("div",{className:"container",children:[h("div",{className:"flex items-center",children:[m(Va,{className:"mr-8",bgColor:a,logo:i}),b,m(gl,{className:"ml-auto",defaultLocation:t,bgColor:a})]}),m("div",{className:`mt-6 h-[1px] ${Tl[a]}`}),n&&p?.items?.length?m($l,{context:l,subItems:p.items,bgColor:a}):null]})})})),Bl=u((({className:e="",cards:t=[],button:n})=>{const[l,r]=a(0),[i,s]=a(0),o=t?.length??0,c=t?.length>2&&o>i+2,d=o===i+2,u=i>0,x=t[l]?.href;return h("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[h("div",{className:"relative overflow-hidden",children:[o?Rl({tabsShift:i,cards:t,activeSlideIndex:l,isLastShift:d,setActiveSlideIndex:r}):null,Ke({handler:[()=>s(i-1),()=>s(i+1)],isShown:[u,c],btnClass:["left-[50px]","right-[50px]"],className:"top-[62px]"}),u?m("div",{className:"absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white"}):null,c?m("div",{className:"absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white"}):null]}),m(fe,{className:"w-[240px] text-center",version:"primary",...n,href:x})]})}));function Rl({tabsShift:e,cards:t,activeSlideIndex:n,isLastShift:a,setActiveSlideIndex:l}){const r=a?460*e-240:460*e,i=t.length>2?"justify-start":"justify-center";return m("div",{style:{transform:`translateX(-${r}px)`},className:"duration-1000 px-[50px]",children:m("div",{className:`w-full flex flex-nowrap gap-3.5 pb-12 ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:n,onClick:a}){const l=t===n;return h("button",{type:"button",onClick:a,className:"p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative "+(l?"shadow-dark-blue/42 border-primary-main":"ease-in duration-300 border-main-stroke"),children:[e?.icon?m(B,{className:"p-6 rounded-full bg-secondary-light mr-[30px]",image:e.icon,width:"108",height:"108"}):null,h("div",{className:"flex gap-3.5",children:[e?.sum?Vl("страховая сумма",e.sum):null,e?.fee?Vl("страховой взнос",e.fee):null]}),Al(l)]},String(t))}({slide:e,i:t,activeSlideIndex:n,onClick:()=>l(t)})))})})}function Vl(e,t){return h("div",{className:"flex flex-col text-left whitespace-pre",children:[h("span",{className:"text-h6",children:[q(t)," ₽"]}),m("span",{className:"text-secondary-text text-l mt-1",children:e})]})}function Al(e){return e?m(B,{className:"h-[24px] w-[24px] min-w-[24px] min-h-[24px] absolute right-4 top-4",image:"DoneIcon",width:"24",height:"24"}):null}const Ml=u((({className:e="",context:t,title:n,insuranceTabs:l=[],button:r,...i})=>{const[s,o]=a(0);return h(g,{context:t,className:`box-border py-[50px] overflow-hidden relative font-sans w-100 bg-white ${e}`,...i,children:[n?m(N,{className:"text-center mb-8",title:n,headingType:"h3"}):null,l?.length>1?m("div",{className:"p-1.5 bg-secondary-light w-fit mx-auto mb-7 rounded-md",children:l.map(((e,t)=>function({title:e,i:t,activeSlideIndex:n,onClick:a}){return m("button",{type:"button",onClick:a,"aria-label":e,className:"box-border px-4 py-3 text-m-light "+(t===n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,activeSlideIndex:s,onClick:()=>o(t)})))}):null,m("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Pl({context:t,className:e,insuranceTabs:l,button:r})})]})})),Pl=({insuranceTabs:e,button:t,context:n,className:a=""})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>m(Bl,{context:n,className:a,button:t,cards:e},String(l)))):null};const Ll=u((({className:e="",context:t,title:n="Мобильное приложение",qr:a,buttons:l,version:r="primary",items:i,image:s,headingType:o="h4",...c})=>{const d="primary"===r?"text-primary-text":"",u="secondary"===r?"p-3.5 min-w-[120px]":"min-w-[92px]",x=l?.map((e=>({...e,className:"min-w-[168px]"})));return h(g,{context:t,className:`flex justify-between font-sans p-9 box-border relative min-h-[320px]\n ${Oe(e)}\n ${W[r]}\n ${e}`,...c,children:[m(De,{context:t,className:"z-[1]",title:n?m(N,{headingType:o,as:"h3",title:n,className:`whitespace-pre-wrap max-w-[509px] mb-6\n ${d}`}):null,buttons:l?.length?m(ye,{context:t,buttons:x,className:"flex gap-4"}):null,children:h("div",{className:"flex flex-1 items-center",children:[a?.src?m("div",{className:`flex justify-center mr-5 bg-white rounded-md ${u}`,children:m(B,{className:"w-fit",image:a})}):null,jl(r,i)]})}),s?.src?m("div",{className:"absolute right-0 bottom-0",children:m(B,{image:s})}):null]})})),jl=(e,t)=>t?.length?m(Te,{items:t,itemClassName:"text-l-light mb-2 last:mb-0",version:"primary"===e?"tile":"tile-white"}):m("span",{className:"text-m-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),_l=u((({className:e,text:t,onClick:n,href:a,target:l,isActive:r})=>m("a",{className:`bg-inherit no-underline px-4 py-2.5 cursor-pointer rounded text-s border border-solid hover:text-primary-main ${e||""} ${r?"border-primary-main text-primary-main":"border-white text-secondary-text"}`,onClick:n,href:a,target:l,children:t}))),Ul=u((({className:e,context:t,title:n,buttons:a,...l})=>{const r=t.useRouter(),{handlerDecorator:i}=t,s=fl(r)(a);return h(g,{context:t,className:`font-sans text-primary-text rounded-[40px] flex items-center justify-between ${e||""}`,...l,children:[m("h2",{className:"text-xl font-medium m-0",children:n}),a?.length?m("div",{className:"flex rounded-md overflow-hidden bg-white",children:a.filter((({text:e})=>e)).map(((e,t)=>m(_l,{className:"first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md",isActive:e===s,...se({router:r,handlerDecorator:i},e)},String(t))))}):null]})})),Gl=u((({className:e="",context:t,title:n,officesList:a,anchor:l=""})=>h(g,{context:t,id:l,className:`font-sans bg-white p-12 flex flex-col ${e}`,children:[n?m(N,{headingType:"h5",className:"mb-2.5",title:n}):null,a?.length?a.map(Ol):null]}))),Ol=(e,t)=>h("li",{className:"flex mb-2.5 list-none",children:[e.icon?m(B,{className:"mr-[14px] max-w-6 max-h-6",width:"24px",height:"24px",asSVG:!0,image:e.icon}):null,e.text?m("span",{className:"text-l-light",children:e.text}):null]},`list_item_${String(t)}`),El="transition-all duration-300 max-h-0 overflow-hidden",Fl=u((({blocks:e=[],hiddenBlocksNum:t=0,foldButtonClasses:n,foldButtonLabel:l,foldButtonDataTheme:r,isUnfolded:i,containerClasses:s,render:o=(e=>e)})=>{const c=Et(t,0,e.length),{icon:d,handleToggle:u,isActive:x}=(({initialState:e=!1})=>{const[t,n]=a(e);return{icon:t?"ArrowUpIcon":"ArrowDownIcon",handleToggle:e=>{const a=e.currentTarget;if(!a)return;n(!t);const l=a.previousSibling.getElementsByClassName(El)[0];l.style.maxHeight=l.style.maxHeight?"":`${l.scrollHeight}px`},isActive:t}})({initialState:i}),p=n||"border-none bg-primary-main hover:bg-primary-hover px-0 py-[26px] mb-[1px] w-full font-sans text-white text-h4 flex justify-center cursor-pointer",b=x?"Скрыть":l;return e?h("div",{children:[Wl(e,o,{blocksToHide:c,isActive:x,containerClasses:s}),t?h("button",{className:p,"data-theme":r,onClick:u,children:[m("span",{className:"pr-3",children:b}),d?m(I,{name:d,iconVersion:"white",width:"20",height:"20",asSVG:!0}):null]}):null]}):null})),Wl=(e,t,{blocksToHide:n,isActive:a,containerClasses:l=""})=>{const r=e.slice(0,e.length-n),i=n>0?e.slice(-n):[];return t(h("div",{children:[r,m("div",{className:`${El} ${l}`,children:i})]}),a)},zl=u((({label:e,blocks:t,context:n,dataTheme:a,isUnfolded:l})=>{const r=mt({context:n,blocks:t});return m("div",{className:"border-0 border-b border-solid border-main-divider",children:t?.length?m(Fl,{foldButtonDataTheme:a,hiddenBlocksNum:t?.length,blocks:r,isUnfolded:l,context:n,foldButtonLabel:e,containerClasses:"grid grid-cols-12 gap-1 border-box",render:e=>m(Hl,{children:e})}):null})})),Hl=u((({children:e})=>m("div",{className:"box-border",children:e}))),Jl=u((({blockItems:e,colorPalette:t,context:n,className:a="",...l})=>m(g,{context:n,className:`font-sans text-primary-text ${a}`,...l,children:e?.length?m("div",{className:"box-border1",children:e.map(((e,a)=>m(zl,{...e,dataTheme:t,context:n},`BlockItem${a}`)))}):null})));function Xl(e=""){const t=Ge(e);return t<=4?"S":t<=8?"M":"L"}const ql=u((({className:e,context:t,title:n,description:a="Блок в разработке...",...l})=>h(g,{context:t,className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${Ee(e)} ${Oe(e)} `,...l,children:[m(L,{context:t,className:"!p-0 max-w-[600px]",title:n,description:a,headlineVersion:Xl(e)}),m("figure",{className:"m-0 min-w-[80%]",children:Kl()})]}))),Kl=(e=3)=>Zl(100,e).map((e=>Math.floor(e))).map(Ql),Ql=(e,t)=>m("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Zl=(e,t)=>[e].concat(t>0?Zl(e/1.618,t-1):[]),Yl={primary:{title:"text-secondary-text",text:"text-secondary-text"},secondary:{title:"text-white",text:"text-white/80"}},er=u((({className:e="",context:t,slides:n=[],version:l="primary",...r})=>{const i=n.map((e=>e.nav)),s=n.map((e=>e.productBlock)),[o,c]=a(0);return h(g,{context:t,className:`box-border pt-[50px] overflow-hidden relative font-sans w-100 ${e}\n ${W[l]}`,...r,children:[m("div",{className:"flex duration-1000 pb-14",style:{transform:`translateX(-${o}00%)`},role:"list",children:s.map(((e,n)=>function(e,t,n){const{version:a}=e,l=a?Yl[a].title:"";return m("section",{className:"box-border relative flex grow-0 shrink-0 basis-full",role:"listitem",children:m("div",{className:"flex grow",children:m(Re,{className:`pl-[50px] z-10 ${l}`,context:n,textBlockClassName:"mb-[154px]",...e,headlineVersion:"XXL"})})},String(t))}({...e,version:l},n,t)))}),m("div",{className:"flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border h-28",children:i.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:n,onClick:a,version:l}){const r=t===n,i=r?"bg-white shadow-dark-blue/42 w-[354px] min-w-[354px] border-none":`min-w-[277px] hover:py-[26px] hover:py-[26px] ease-in duration-300 bg-white/10\n ${W[l]}`,s=r?"text-primary-text text-h6":`text-l ${Yl[l].title}`,o=r?"text-secondary-text text-m-title-xs mt-2.5":`text-m mt-1.5 ${Yl[l].text}`,c="secondary"===l?"border-white/50":"border-black/50";return m("button",{type:"button",onClick:a,"aria-label":e?.title,className:`box-border font-sans relative overflow-hidden border border-white/50 cursor-pointer text-left mx-1 grow basis-0 pt-5 pb-[23px]\n ${i} ${c}\n `,children:h("div",{className:"border-0 px-6",children:[m("div",{className:`font-medium ${s}`,children:e?.title}),m("div",{className:`text-secondary-text ${o}`,children:e.description})]})},String(t))}({slide:e,i:t,activeSlideIndex:o,onClick:()=>c(t),version:l})))})]})}));const tr=u((({className:e="",context:t,title:n="Акции и спецпредложения",date:a,description:l,buttons:r=[],version:i="primary",...s})=>m(g,{context:t,className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${W[i]} ${Ee(e)} ${Oe(e)} `,...s,children:m(De,{context:t,title:n?m(L,{context:t,title:n,className:"!p-0 max-w-[600px]",headlineVersion:Xl(e),bgColorHeadline:i,align:"left",as:"h2"}):null,buttons:r?.length?m(ye,{context:t,buttons:r,className:"flex gap-3"}):null,children:h("div",{className:"mt-1.5",children:[a?m("div",{className:"text-s mb-2",children:nr(a)}):null,m("div",{className:"text-l",children:l})]})})})));function nr(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const ar=u((({context:e,className:t="",title:n,description:a,items:l,image:r,version:i,socialMedia:s})=>{const o=n?m(N,{headingType:"h5",as:"h3",className:"mb-3.5 z-10",title:n}):null,c=r?.src?m(B,{className:"absolute bottom-0 right-0 m-0",image:r}):null;return m("section",{className:`relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${t}`,role:"listitem",children:h(De,{context:e,className:"flex justify-between",title:o,image:c,children:[a?m(P,{className:"mb-2",description:a}):null,l?.length?m(Te,{className:"text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]",items:l,version:i}):null,s?m(Ka,{className:"pt-[42px] pb-0",media:s,version:i,context:e}):null]})})})),lr="absolute top-0 bottom-0 w-[84px]",rr=u((({context:e,recommendations:t=[],className:n="",title:l,version:r,...i})=>{const[s,o]=a(0),c="secondary"===r?"border-white/50":"border-main-stroke";return h(g,{context:e,className:`relative font-sans p-9 overflow-hidden text-center ${"secondary"===r?"bg-primary-main text-white":"bg-white text-primary-text"} ${n}`,...i,children:[l?m(N,{headingType:"h3",className:"mb-6",title:l}):null,h("div",{children:[m("div",{className:"flex duration-1000 gap-3.5",style:{transform:`translateX(-${525*s}px)`},role:"list",children:t?.length?t.map(ir({context:e,version:r,className:c})):null}),sr({cardsCount:t.length,activeCardIndex:s,setActiveCardIndex:o})]}),m("div",{className:`${lr} left-0 ${"secondary"===r?"bg-opacity-from-main":"bg-opacity-from-white"}`}),m("div",{className:`${lr} right-0 ${"secondary"===r?"bg-opacity-to-main":"bg-opacity-to-white"}`})]})})),ir=({context:e,version:t,className:n})=>(a,l)=>m(ar,{context:e,...a,version:t,className:n},String(l)),sr=({cardsCount:e,activeCardIndex:t,setActiveCardIndex:n})=>{const a=e>2;return m("div",{children:Ke({handler:[()=>n(t-1),()=>n(t+1)],isShown:[a&&t>0,a&&e-t>2],btnClass:["left-8","right-8"],className:"top-1/2 mt-3"})})};const or=u((({data:e,fieldLabel:t,fieldValue:n,selected:a,placeholder:l="Выберите значение",setSelected:r,label:i})=>h("div",{children:[m("span",{className:"block text-m-light mb-2",children:i}),h(Na,{className:"h-14 border border-gray p-4 rounded-md text-s w-full cursor-pointer "+(a?"":"text-secondary-text"),value:a,onChange:e=>r(e),children:[m(va,{value:"",children:l}),e.map(((e,a)=>m(va,{value:e?.[n||t],children:e?.[t]},String(a))))]})]}))),cr=u((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:a=[],selectedBranch:l,onSelectedBranch:r})=>h("div",{className:"flex justify-between mb-6",children:[m("div",{className:"w-full mr-4",children:m(or,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Город"})}),m("div",{className:"w-full",children:m(or,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:l,setSelected:r,label:"Отделение",placeholder:"Выберите отделение"})})]}))),dr=u((({name:e,text:t,value:n,checked:a,onChange:l,className:r})=>m("div",{className:r,children:h("label",{className:"flex items-center relative cursor-pointer",children:[m("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border-2 border-primary-main rounded-full cursor-pointer after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main",type:"radio",value:n,name:e,checked:a,onChange:l}),t?m("span",{className:"font-sans ml-3 cursor-pointer",children:t}):null]})}))),mr=u((()=>{const[e,t]=a("option1"),n=e=>t(e.target.value);return h("div",{children:[m(dr,{className:"mb-2",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===e,onChange:n}),m(dr,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===e,onChange:n})]})})),hr=["От 1 дня","До 365 дней"],ur=u((({days:e,setDays:t})=>h("div",{className:"mb-6",children:[m("span",{className:"block text-m-light mb-[3px]",children:"Срок аренды"}),m(Ot,{min:1,max:365,value:e,items:hr,onChange:t})]}))),xr=u((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:a=[],selectedBoxSize:l,onSelectedBoxSize:r})=>h("div",{className:"flex justify-between mb-6",children:[m("div",{className:"mr-4 w-full",children:m(or,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),m("div",{className:"w-full",children:m(or,{data:a,fieldLabel:"safeBoxCasesSize",selected:l,setSelected:r,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),pr=u((({days:e,tariffs:t=[]})=>{const n=gr(e,t);return h("div",{className:"flex flex-col justify-between",children:[h("div",{className:"flex",children:[br("Аренда за",e,"mr-11"),br("Цена",n+" ₽")]}),h("div",{className:"bg-primary-main px-10 pt-10 pb-4 text-center",children:[m(B,{image:{icon:"PackA4Icon"},width:"290",height:"257",asSVG:!0}),h("span",{className:"text-s-light text-white opacity-80 mt-2 inline-block",children:["На рисунки изображена пачка",m("br",{})," листов формата А4"]})]})]})})),br=(e,t,n="")=>h("div",{className:n,children:[m("span",{className:"block text-m-light mb-1",children:e}),m("span",{className:"text-h3",children:t})]}),gr=(e,t)=>{const n=fr(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},fr=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},Nr=u((({regions:e})=>{const[t,n]=a(""),[r,i]=a([]),[s,o]=a(""),[c,d]=a(""),[u,x]=a(""),[p,b]=a(26);l((()=>{n(vr(e))}),[e]),l((()=>{t?async function(e){try{const t=await fetch(`/api/v1/safeboxes?regionCode=${e}`,{headers:{"Content-Type":"application/json"}}),n=await t.json();return Promise.resolve(n)}catch(e){return console.error(e),Promise.reject()}}(t).then((e=>{i(e)})):i([]),o(""),d(""),x("")}),[e,t]);const g=yr(r,s),f=wr(g?.safeBoxCaseVolumes),N=Ir(g?.safeBoxCaseVolumes,c)?.safeBoxCases,v=Cr(N,u);return h("div",{className:"flex justify-between align-top mb-6",children:[h("div",{className:"flex-1 mr-9",children:[m(cr,{regions:e,selectedRegion:t,onSelectedRegion:n,branches:r,selectedBranch:s,onSelectedBranch:e=>{o(e),d(""),x("")}}),m(ur,{days:p,setDays:b}),m(xr,{caseVolumes:f,selectedCaseVolume:c,onSelectedCaseVolume:e=>{d(e),x("")},safeBoxCases:N,selectedBoxSize:u,onSelectedBoxSize:x}),m("span",{className:"text-secondary-text text-l-light",children:"Тип договора"}),h("div",{className:"flex justify-between items-center mt-5",children:[m(mr,{}),m(fe,{text:"Офисы на карте",version:"primary"})]})]}),m(pr,{days:p,tariffs:v})]})})),vr=e=>e?.find((e=>"Москва"===e.name))?.code||"",yr=(e,t)=>e.find((e=>e.branchCode===t)),wr=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Ir=(e,t)=>e?.find((e=>e.volume===t)),Cr=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs;const kr=u((({title:e,context:t,className:n="",...a})=>{const l=function(){const{data:e}=Xt("/api/v1/admin/regions",qt);return e||[]}();return h(g,{context:t,className:`bg-white px-8 py-12 ${n}`,...a,children:[e?m(N,{title:e,headingType:"h3",as:"h2",className:"mb-2.5 text-center"}):null,m(Nr,{regions:l}),m("p",{className:"text-s-light text-secondary-text",children:"Аренда СЯ, в случае проведения процедуры купли-продажи, с использованием наличных денег или процедуры ипотечной сделки"})]})})),Sr=e=>Boolean(e?.icon||e?.src),$r={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"}},Tr=u((({className:e="",showLines:t=!0,steps:n=[],button:a,version:l="primary",context:r,...i})=>{const s=r.useRouter(),{handlerDecorator:o}=r,{title:c}=i,d=$r[l],u=n.length>3,x=(e=>e?"":"opacity-0")(t),p=c?"mt-9":"";return h(g,{className:["box-border font-sans text-primary-text bg-white",u?"px-20":"px-[70px]","py-[50px] flex flex-col items-center",d.background,d.title,e].join(" "),context:r,...i,children:[c?m(N,{headingType:"h2",className:"max-w-[752px] text-center",title:c}):null,n?.length?h("div",{className:`box-border ${p}`,children:[m("div",{className:"flex items-center px-[88px]",children:ce(m("div",{className:`h-0.5 w-full bg-secondary-light ${x}`}))(n.map(Dr(d)))}),m("div",{className:"flex justify-between "+(u?"gap-x-3":"gap-x-[101px]"),children:n.map(Br({styleMap:d,isMainButton:Boolean(a?.text),version:l,router:s,handlerDecorator:o}))})]}):null,a?.text?m(fe,{className:"mt-8 w-full max-w-[240px]",version:"primary",...se({router:s,handlerDecorator:o},a)}):null]})})),Dr=e=>({icon:t},n)=>m("div",{className:"flex flex-col items-center text-center",children:m("div",{className:`h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center\n ${e.iconBackground} ${e.title}`,children:Sr(t)?m(B,{image:t,width:"48",height:"48",asSVG:!0}):m("span",{className:`text-h4 ${e.iconText}`,children:n+1})})},String(n)),Br=({styleMap:e,isMainButton:t,version:n,router:a,handlerDecorator:l})=>(r,i)=>{const s=r?.label?"mt-2":"mt-4";return h("div",{className:"flex flex-col items-center justify-between text-center relative w-[276px]\n whitespace-pre-line overflow-hidden",children:[r?.label?m("div",{className:"text-xl m-0 mt-4",children:r.label}):null,r?.description?m("div",{className:`text-l-light ${e.description} ${s}`,children:r.description}):null,r.button?.text&&!t?m(fe,{className:"box-border mt-8 py-3 h-12 w-full max-w-[240px]",...se({router:a,handlerDecorator:l},r.button),version:n,children:r.button.text}):null]},String(i))};const Rr="h-12 flex-1 flex items-center justify-center cursor-pointer",Vr="group bg-white",Ar="font-sans text-m",Mr="text-secondary-text group-hover:text-primary-main",Pr=(e,t)=>m("h3",{className:`${Ar} ${t?"text-white":Mr}`,children:e}),Lr=(e,t)=>m("div",{className:"min-w-[22px] w-[22px] h-[22px] rounded-full text-xs ml-2 "+(t?"bg-white/30 text-white":"bg-main-divider text-secondary-text group-hover:text-primary-main"),children:e}),jr=({onClick:e,currentTab:t,showCounter:n,page:a,context:l})=>(r,i)=>{const{useRouter:s,handlerDecorator:o}=l,c=s(),d=r.type;if("group"!==d&&"link"!==d)return null;switch(d){case"group":return(({onClick:e,currentTab:t,showCounter:n,page:a})=>(l,r)=>{const i=t===l,s=l.ref?a?.blocks?.filter((e=>e?.labels?.includes(l.ref))).length:a?.blocks?.length;return m("div",{className:`${Rr} ${i?"bg-primary-main":Vr}`,role:"tab","aria-selected":i,onClick:()=>e(l),children:h("div",{className:"flex flex-1 items-center justify-center",children:[l?.title?Pr(l.title,i):null,n&&s?Lr(s,i):null]})},String(r))})({onClick:e,currentTab:t,showCounter:n,page:a,context:l})(r,i);case"link":return(({text:e,onClick:t,href:n,target:a="_self",i:l})=>m("a",{className:`${Rr} group bg-white`,target:a,href:n,onClick:t,children:m("span",{className:`${Ar} ${Mr}`,children:e})},String(l)))({...se({router:c,handlerDecorator:o},r),i:i});default:!function(e){throw new Error(e)}(d)}},_r=u((e=>{const{context:t,className:n,tabs:r,page:i,showCounter:s}=e,[o,c]=a(r?r[0]:void 0);l((()=>{if("group"===o?.type)return p.inst.subject("tab",{label:o.ref})}),[o]);return m(g,{context:t,className:`mb-2 box-border flex gap-x-1 ${n}`,role:"tablist",children:r?.map(jr({onClick:e=>{"group"===e?.type&&(p.inst.fire("tab",{type:e.type,label:e.ref}),c(e))},currentTab:o,page:i,showCounter:s,context:t}))})})),Ur=u((({isOpen:e,dataUrl:t,pdfUrl:n,rowIdx:a,cellIdx:l,fieldIdx:r})=>h(fe,{version:"primary",onClick:()=>{p.inst.fire("tariffInnerTable",{dataUrl:t,pdfUrl:n,rowIdx:a,cellIdx:l,fieldIdx:r})},className:"w-full flex items-center justify-center rounded-none py-5 ",children:[m("div",{className:"text-h4",children:e?"Скрыть":"Показать ставки по вкладу"}),m(I,{name:e?"ArrowUpIcon":"ArrowDownIcon",className:"ml-3",iconVersion:"white",width:"20",height:"20",asSVG:!0})]}))),Gr=e=>e?.alt||e?.title||y[e?.icon?e.icon:""],Or={Buttons:({buttons:e})=>e&&e?.length?m("div",{children:e.map((({icon:e,rounded:t,...n},a)=>m(fe,{className:(a>0&&t?"ml-3":"")+" w-12 h-12",ariaLabel:Gr(e),rounded:t,appendLeft:e?.src||e?.icon?m(B,{image:e,width:"24px",height:"24px",asSVG:!0}):null,...n},String(a))))}):null,Img:({image:e})=>e?.src?m(B,{image:e}):null,List:({isDotted:e,...t})=>m(Te,{className:"flex flex-col justify-between items-start text-sm",version:"gray",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>h("div",{children:[e?m("div",{className:"text-h6 font-medium m-0 "+(t?"mb-1":""),children:e}):null,t?m("div",{className:"text-s text-secondary-text",children:t}):null]}),Table:u((e=>{const[t,n]=a(!0);console.log(e);const r=t=>{const a=["rowIdx","cellIdx","fieldIdx"].every((n=>e[n]===t[n]));n(!a)};return l((()=>p.inst.subscribe("tariffInnerTable",r)),[]),t?m(Ur,{...e}):null}))},Er=u((({context:e,cells:t,isLastRow:n,rowIdx:a,cellIdx:l})=>m("div",{className:"first:pl-0 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0 "+(n?"border-t-0 rounded-b-md":""),role:"cell",children:t.map(Fr(a,e,l))}))),Fr=(e,t,n)=>(a,l)=>h("div",{className:"Table"===a?.tableCellType?"mx-0.5":"first:pt-5 last:pb-5 pl-10",children:[l>0?m("div",{className:"h-5"}):null,Wr(a,t,{rowIdx:e,cellIdx:n,fieldIdx:l})]},String(l)),Wr=(e,t,n)=>{if(!e)return null;const{tableCellType:a,...l}=e;if(!a||!(a in Or))return null;return m(Or[a],{context:t,...l,...n})};async function zr(e){const t=await fetch(e);return await t.json()}const Hr=u((({rows:e})=>{const[t,n]=a(0),l=e?.[0]?.length??0,r=l>3&&l>t+4,i=t>0;return h("div",{children:[e?.map(Jr(t)),Ke({handler:[()=>n(t-1),()=>n(t+1)],isShown:[i,r],btnClass:["right-3 top-24","right-3 top-2"],className:""})]})})),Jr=e=>(t,n)=>{if(!t?.length)return null;const[a,...l]=t,r=[...Array(e).keys()].reduce(((e,t)=>140*(l?.[t]?.cols?.length??1)+e),0);return h("div",{className:"flex border-main-divider border border-t-0 border-x-0 border-solid",children:[m("div",{className:"text-xl-light min-w-[214px] w-[214px] pt-6 pb-5",children:a.data}),m("div",{className:"flex flex-grow overflow-hidden",children:m("div",{className:"flex duration-1000 text-center",style:{transform:`translateX(-${r}px)`},children:l?.map(((t,n)=>h("div",{className:"flex flex-col flex-grow justify-center pt-6 pb-5 odd:bg-main-divider",children:[t?.data?m("div",{className:"text-xl-light mb-3",children:t.data}):null,t?.cols?Xr(t.cols,e):null]},`row${n}`)))})})]},String(n))},Xr=(e,t)=>e?m("div",{className:"flex text-xl-light "+(0===t?"text-secondary-text":""),children:e.map(((e,t)=>m("div",{className:"w-[76px] mx-8",children:e},String(t))))}):null,qr=u((({context:e,activeTabIndex:t,items:n})=>{const[l,r]=a({});return m("div",{children:n.map(((n,a)=>{const i=`activeTabIdx:${t}-tableIdx:${a}`;return h("div",{className:"w-full",children:[h("div",{className:"flex p-4 bg-main-stroke text-xl-light text-center justify-center cursor-pointer relative",onClick:()=>(e=>{r((t=>({...t,[e]:!t[e]})))})(i),children:[n.title,m(B,{image:l[i]?"PlusIcon":"MinusIcon",className:"absolute right-[22px]",width:"24",height:"24"})]}),m("div",{className:"w-full pl-2 overflow-hidden transition-height duration-500 ease-in-out "+(l[i]?"h-0":"h-[243px]"),children:m("div",{className:"relative",children:m(Hr,{context:e,rows:n.rowsData})})})]},i)}))})})),Kr=u((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:a})=>h("div",{className:"flex justify-between w-full pt-2.5 pb-3",children:[e&&e.length>1?m("div",{className:"flex bg-secondary-light p-1 rounded-md",children:e.map(((e,t)=>m("div",{className:"rounded-md text-xl-light px-4 py-3 cursor-pointer "+(t===n?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>a(t),children:e||t+1},e)))}):null,t?h(fe,{href:t,version:"secondary",className:"flex justify-center items-center text-l-light text-primary-main px-8",children:[m(B,{image:"DocDownloadIcon",className:"mr-[10px]",width:"24",height:"24",asSVG:!0}),m("span",{children:"Скачать в PDF"})]}):null]}))),Qr=u((({context:e,dataUrl:t,pdfUrl:n})=>{const{tableData:l}=function(e){const{data:t}=Xt(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),zr);return t||{}}(t),[r,i]=a(0),s=l?.[r]?.items??[],o=l?.map((e=>e.currency??""));return l?h("div",{className:"bg-white z-10",children:[m(Kr,{currencies:o,activeTabIndex:r,setActiveTabIndex:i,linkToPDF:n}),m(qr,{context:e,activeTabIndex:r,items:s}),m(Ur,{context:e,isOpen:!0})]}):null})),Zr=u((({context:e,children:t,rowIdx:n})=>{const[r,i]=a(void 0);return l((()=>p.inst.subscribe("tariffInnerTable",(e=>{i(n===e.rowIdx?{dataUrl:e.dataUrl,pdfUrl:e.pdfUrl}:void 0)}))),[n]),h("div",{className:"self-start flex flex-col",role:"row",children:[m("div",{className:"flex",children:t}),r?m("div",{className:"origin-top animate-expansion",children:m(Qr,{context:e,...r})}):null]})})),Yr=u((({row:{header:e,data:t},activeCardIndex:n,isLastRow:a,context:l,rowIdx:r})=>h(Zr,{context:l,rowIdx:r,children:[m("div",{className:"text-s py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0 "+(a?"":"border-solid"),children:h("div",{className:"flex items-center text-primary-text",role:"cell",children:[e?.icon?m(B,{className:"mr-[14px] max-w-6 max-h-6",image:e.icon,width:"24px",height:"24px",asSVG:!0}):null,e?.title]})}),t?.length?m(On,{activeCardIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>m(Er,{cells:e,isLastRow:a,rowIdx:r,cellIdx:t,context:l},String(t))))}):null]}))),ei=u((({className:e="",context:t,title:n,description:l,rowHeaders:r,tariffsColumns:i,hiddenRowsNum:s=0,...o})=>{const[c,d]=a(0),u=i?.map((({data:e})=>e))||[],x=r?.map(((e,t)=>({header:e,data:u.map((e=>e?.[t]||[]))}))),p=u.length,b=Mn({columnsLength:p,colsLengthForScroll:2,activeCardIndex:c,setActiveCardIndex:d}),f=x?.map(((e,n,{length:a})=>m(Yr,{context:t,row:e,isLastRow:n+1===a,activeCardIndex:c,rowIdx:n},String(n))));return h(g,{className:`bg-white font-sans p-[50px] overflow-hidden text-primary-text relative ${p>1?"pr-0":""} ${e}`,context:t,...o,children:[n?m(N,{headingType:"h2",className:"text-center "+(l?"mb-2.5":"mb-9"),title:n}):null,l?m("div",{className:"mb-9 text-center text-l",children:l}):null,x?.length?m(Fl,{blocks:f,hiddenBlocksNum:s,context:t,render:e=>m(ti,{tableArrowScrollControlProps:b,children:e}),foldButtonLabel:"Развернуть"}):null]})})),ti=u((({children:e,tableArrowScrollControlProps:t})=>{const{isScrollAvailable:n}=t;return h("div",{role:"table",children:[h("div",{className:"relative",children:[e,m(Wn,{...t})]}),n?m("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),ni=e=>"Image"===e?.errorContentType&&e?.image?m(B,{className:"mb-7",image:e.image}):"Code"===e?.errorContentType&&e.code?m("div",{className:"text-title-extra gradient-color-text",children:e.code}):null,ai=u((({context:e,className:t="",title:n,subtitle:a,error:l,button:r})=>{const{useRouter:i,handlerDecorator:s}=e,o=i();return h("section",{className:`flex flex-col justify-center items-center ${t}`,role:"listitem",children:[m("div",{className:"flex justify-center mb-7",children:ni(l)}),n?m(N,{headingType:"h1",className:"text-left mb-4",title:n}):null,a?m("div",{className:"text-xl-light text-left mb-7",children:a}):null,r?.text?m(fe,{className:"py-4 px-9",version:r?.version,...se({router:o,handlerDecorator:s},r),children:r.text}):null]})})),li={Accordion:bt,BenefitsBlock:yt,Bonus:Tt,CardTransfer:In,ComparisonTable:Yn,Calculator:fn,Catalog:Rn,ExchangeRateTile:Ta,Footer:el,Gallery:it,GracePeriod:tl,Header:Dl,Headline:L,InsuranceAmountBlock:Ml,LinkDocs:F,MiniGallery:st,MobileAppTile:Ll,PictureText:K,ProductBlock:Pe,ProductGallery:er,ProductTile:ze,PromoTile:tr,OtherProducts:Jl,Recommendation:rr,StepsBlock:Tr,TariffsTable:ei,TextBlock:je,Tile:Fe,Navigation:Ul,Placeholder:ql,BonusBenefitsBlock:Bt,SafeDepositRental:kr,Tabs:_r,ErrorBlock:ai,OfficeServicesBlock:Gl},ri=d();const ii=u((({className:e,onClick:t,ariaLabel:n})=>m("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:si()}))),si=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m("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"}),m("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"})]})},oi=u((({className:e,context:t,...n})=>{const{useRouter:i,handlerDecorator:s=ie}=t,o=function(e){const[t,n]=a(0);return l((()=>{(async()=>{const[t]=await ri.getLikeCount(e);n(t?.value||0)})()}),[e]),{likeCount:t,like:r((async()=>{n(await ri.like(e))}),[e]),dislike:r((async()=>{n(await ri.dislike(e))}),[e])}}(i().pathname);return h(g,{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||""}`,...n,children:[m(ii,{onClick:s(o.like),ariaLabel:"Поставить отметку «лайк»"}),m(ii,{onClick:s(o.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),m("span",{className:"select-none",children:o.likeCount})]})})),ci=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),di=u((({className:e="",context:t,blocksRegistry:n,data:a={},blockDecorator:l=ci})=>{const{style:r,blocks:i,slots:s={},likeControl:o,colorPalette:c="pc"}=a,{header:d}=s;return h("section",{className:`relative ${R(r)} ${e}`,"data-theme":c,children:[d?.blocks?.length?m("div",{className:`${R(d?.style)}`,children:d.blocks.map(((e,r)=>mi({block:e,page:a,blockDecorator:l,blocksRegistry:n,context:t},r)))}):null,i?.length?m("div",{className:"container grid grid-cols-12 gap-1",children:i.map(((e,r)=>mi({block:e,blockDecorator:l,blocksRegistry:n,context:t,page:a},r)))}):null,o?m("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:m(oi,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t},"LikeControl")}):null]})}));function mi({block:e,blockDecorator:t,blocksRegistry:n,context:a,page:l},r){const{type:i}=e;i&&i in n||console.warn(`No block with "${i}" is registered`);const s=n[i||"Placeholder"]||ql;return t({blockClassName:`scroll-mt-12 ${R(e.style)}`,block:e,render:e=>{const{version:t,content:n,anchor:o,labels:c}=e.block;return m(s,{className:e.blockClassName,version:t,context:a,page:l,anchor:o,labels:c,...n},`${i}-${r}`)}},`block-${r}`)}e.Blocks=li,e.ContentPage=di,e.DaDataAPI=s,e.LikeAPI=d,e.joinList=ce,e.projectSettings=o,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=ae,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),a=n("useState"),r=n("useEffect"),l=n("useCallback"),i=n("useMemo");function s(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}}}}const o=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}},c="likesToken";function d(){async function e(){try{const e=JSON.parse(globalThis.localStorage.getItem(c)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:n}=await e.json();return globalThis.localStorage.setItem(c,JSON.stringify({token:t,name:n})),{token:t,name:n}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n},body:JSON.stringify({node_ids:t})}),{likes:a}=await e.json();return a||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:n,name:a}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:a},body:JSON.stringify({node_id:t,user_name:a})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:n,name:a}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:n,UserID:a},body:JSON.stringify({node_id:t,user_name:a})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}}}}const m=(...e)=>globalThis._uni._jsx(...e),h=(...e)=>globalThis._uni._jsxs(...e),u=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:x(e)),t._tmpl},x=e=>{function t(t,n){const{children:a,...r}=t||{},l=n?.slots?.default,i=a||l&&l();return e(Object.assign(r,i&&{children:i}),n)}return t.inheritAttrs=!1,t};class p{static inst=new p;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 b=e=>{if(!e.length)return;const[t]=e;t.isIntersecting},g=u((({anchor:e,className:t,context:n,children:l,tag:i="section",labels:s})=>{const o=i,{IntersectionObserverTag:c}=n,[d,h]=a(!0);return r((()=>p.inst.subscribe("tab",(e=>{var t;"group"===e.type?h(!s?.length||!e.label||s.includes(e.label)):(h(!0),t=e.label,setTimeout((()=>globalThis.document.getElementById(`#${t}`)?.scrollIntoView({behavior:"smooth"}))))}))),[s]),d?e?m(c,{tag:i,className:t,observerCallback:b,observerOptions:{threshold:1},anchor:e,children:l}):m(o,{className:t,children:l}):null}));const f={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=u((e=>{const{className:t="",headingType:n="h3",title:a,as:r="h3"}=e;return m(r,{className:`font-sans m-0 ${f[n]} ${t}`,children:a})}));var v,y;!function(e){e.ActualBalanceIcon="ActualBalanceIcon",e.AirPlaneIcon="AirPlaneIcon",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.DocDownloadIcon="DocDownloadIcon",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.LogoIcon="LogoIcon",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.PackA4Icon="PackA4Icon",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.StateMortgageIcon="StateMortgageIcon",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.WateringCanIcon="WateringCanIcon"}(v||(v={})),function(e){e.ActualBalanceIcon="Деньги",e.AirPlaneIcon="Самолет",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.DocDownloadIcon="Скачать документ",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.LogoIcon="Logo",e.LoupeIcon="Лупа",e.MasterCardIcon="MasterCard",e.MinusIcon="Минус",e.MirIcon="МИР",e.MoneyIcon="Деньги",e.MoneyInsuranceIcon="Денежное страхование",e.MonitorMobileIcon="Монитор и мобильный",e.NewDocIcon="Новый документ",e.OfficeIcon="Офис",e.OkIcon="Лого «Одноклассники»",e.PackA4Icon="PackA4Icon",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.StateMortgageIcon="StateMortgageIcon",e.TelegramIcon="Лого «Telegram»",e.UnionPayIcon="UnionPay",e.UserTickIcon="Пользователь",e.VisaIcon="Visa",e.VKIcon="Лого «VK»",e.WalletAdd2Icon="Пополнение карты",e.WalletAddIcon="Кошелёк с плюсом",e.WalletIcon="Кошелёк",e.WalletWithMoneyIcon="Кошелёк с деньгами",e.WateringCanIcon="Добавить продукт"}(y||(y={}));const w={normal:"text-primary-main",black:"text-black",white:"text-black invert"},I=u((({className:e="",imageClassName:t="",name:n="",alt:a=`Иконка ${y[n]||n}`,title:r=a,iconVersion:l="normal",asSVG:i,...s})=>{const c=`${o.CDN||""}icons/${n}.svg`;return i?h("svg",{className:e,...s,"aria-hidden":"true",children:[r?m("title",{children:r}):null,a?m("desc",{children:a}):null,m("use",{className:`${w[l]} ${t}`,href:`${c}#icon`,xlinkHref:`${c}#icon`})]}):m("img",{className:e,src:c,alt:a,title:r,...s,"aria-hidden":"true"})}));function C(e){return"string"==typeof e?"normal":e.iconVersion||"normal"}const k=(e,t)=>e.media&&t.media?e.media-t.media:0,S=u((({className:e="",image:t,imageClassName:n="",isMobile:a=!1})=>{if(!t||!t?.sources&&!t?.src)return null;return h("picture",{className:`${a?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(k).map((({src:e,format:n,media:a},r)=>m("source",{srcSet:e,type:T(n),media:a?`(max-width: ${a}px)`:"",...t.size},`${r}_${e}`))):null,$(t,n,a)]})})),$=(e,t="",n=!1)=>{const a={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},r=e.title||"",l=e.alt||e.title,i=n?"m-auto":"m-0";return m("img",{src:e.src,className:`${i} ${t}`,alt:l,title:r,style:a,...e.size})};function T(e){return e?`image/${String(e)}`:void 0}const D=u((({className:e="",image:t,imageClassName:n="",isMobile:a,...r})=>{if(!t)return null;const l="string"==typeof t?t:t.icon;return l||""===l?l.length?m(I,{className:e,imageClassName:n,iconVersion:C(t),name:l,...r}):null:m(S,{className:e,imageClassName:n,image:t,isMobile:a})})),B=u((({className:e="",imageClassName:t,image:n,...a})=>m(D,{className:e,imageClassName:t,image:n,...a})));function R(e){return e?e.filter(Boolean).join(" "):""}const V={left:"text-left",center:"text-center",right:"text-right"},A={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"}},M={XXL:{descriptionFont:"text-h5",gap:"gap-[18px]",headingType:"h0",as:"h1"},XL:{descriptionFont:"text-xl-light",gap:"gap-4",headingType:"h1",as:"h1"},L:{descriptionFont:"text-xl-light",gap:"gap-4",headingType:"h2",as:"h2"},M:{descriptionFont:"text-xl-light",gap:"gap-3",headingType:"h3",as:"h3"},S:{descriptionFont:"text-xl-light",gap:"gap-2",headingType:"h4",as:"h4"}},P=u((e=>{const{className:t="",description:n}=e;return m("div",{className:`${t}`,children:n})})),j=u((({bgColorHeadline:e="transparent",align:t="center",className:n="",title:a,description:r,headlineVersion:l="XL",as:i,...s})=>{const o=A[e],c=M[l];return h(g,{className:`font-sans flex flex-col p-[50px] ${c.gap} ${o.background} ${n}`,...s,children:[a?m(N,{headingType:c?.headingType,as:i||c?.as,className:`whitespace-pre-wrap ${o.text} ${V[t]}`,title:a}):null,r?m(P,{className:`${c.descriptionFont} ${o.text} ${V[t]}`,description:r}):null]})})),L=u((({className:e,iconClassName:t,textClassName:n,suffixClassName:a,doc:r,icon:l})=>{const{text:i,fileSize:s,...o}=r;return h("a",{className:e,role:"link",...o,children:[l?m(B,{className:t,image:l,width:"24px",height:"24px",asSVG:!0}):null,i?h("span",{className:n,children:[i,m("span",{className:a,children:o?.href&&_(U(o.href),s)})]}):null]})})),_=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),U=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},G=u((({className:e="",doc:t,icon:n})=>m(L,{className:`flex h-full box-border ${e}`,iconClassName:"mr-2.5 min-w-6 min-h-6",textClassName:"self-center text-l-light",suffixClassName:"text-secondary-text group-hover:text-primary-main",doc:t,icon:n}))),O=u((({className:e,documents:t,columnsMode:n="double",icon:a})=>t?.length?m("div",{className:e,role:"list",children:t.map(((e,t)=>m("div",{className:"double"===n?"basis-[calc(50%-20px)]":"",role:"listitem",children:m(G,{className:"group flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:a})},String(t))))}):null)),E={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},F=u((({context:e,className:t="",title:n,description:a,align:r="center",documents:l,icon:i={icon:"DocIcon"},columnsMode:s="double",...o})=>h(g,{className:`font-sans text-primary-text p-[50px] bg-white ${t}`,context:e,...o,children:[m(j,{className:"!p-0",title:n,description:a,context:e,align:r,headlineVersion:"M",as:"h2"}),m(O,{className:`mt-8 ${E[s]}`,columnsMode:s,documents:l,icon:i})]}))),W={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},z={primary:"text-primary-text",secondary:"text-white"},H={primary:"text-secondary-text",secondary:"text-white"},J=u((e=>{const{className:t="",icon:n,label:a,description:r,version:l="primary",benefitsVersion:i="normal"}=e,s="white"===i||"secondary"===l;return h("div",{className:`flex gap-5 ${r?"items-start":"items-center"} ${t}`,children:[n?m("div",{className:X(l,i),children:m(B,{className:"w-[24px] h-[24px]",image:{...n,iconVersion:s?"white":"normal"},asSVG:!0})}):null,h("div",{className:"gap-0.5",children:[a?m("div",{className:`text-h6 ${z[l]}`,children:a}):null,r?m("div",{className:`text-m-light ${H[l]}`,children:r}):null]})]})}));function X(e,t){let n="bg-primary-main text-black";return"secondary"===e?n="bg-white/30 text-black":"normal"===t&&(n="bg-secondary-light text-primary-main"),`w-[50px] h-[50px] min-w-[50px] rounded-full p-[10px] box-border flex items-center justify-center ${n}`}const q=e=>new Intl.NumberFormat("ru-RU",{maximumSignificantDigits:3}).format(e),K=u((({className:e="",context:t,title:n,description:a,image:r,benefits:l,version:i="primary",sum:s,monthLimit:o,directionRight:c=!1,...d})=>h(g,{className:`relative font-sans p-14 ${W[i]} ${e}`,context:t,...d,children:[m(j,{context:t,className:"!p-0",title:n,description:a,headlineVersion:"M",bgColorHeadline:i,align:"center"}),h("div",{className:"flex justify-center gap-[122px] mt-[30px]",children:[r?.src?m(B,{className:c?"order-2":"",image:r}):null,h("div",{className:"w-[558px] m-auto",children:[l?.length?m("div",{className:"flex flex-col gap-4",children:l.map(Q(i))}):null,Z(s,o)]})]})]}))),Q=e=>(t,n)=>m(J,{icon:t.icon,label:t.label,description:t.description,version:e},String(n));function Z(e,t){return e||t?h("div",{className:"bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4",children:[Number.isFinite(e)?Y("Страховая сумма:",e,Boolean(t)):null,Number.isFinite(t)?Y("Ежемесячный лимит:",t,Boolean(e)):null]}):null}function Y(e,t=0,n=!1){return h("div",{className:`flex justify-between items-center gap-2 w-full ${n?"w-fit":"w-full"}`,children:[m("span",{className:"text-secondary-text text-l-light",children:e}),h("span",{className:"text-primary-main text-h6",children:[q(t)," ₽"]})]})}const ee=e=>e?.includes("//"),te=e=>(e||"").replace(/\/?\?.*/,""),ne=e=>{if(!e||!ee(e))return;const t=e,n=t.indexOf("//"),a=t.indexOf("/",n+"//".length);return-1!==a?t.substring(0,a):t};var ae=Object.freeze({__proto__:null,isURL:ee,withoutQuery:te,getOrigin:ne,getHash:e=>{if(!e||!ee(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0},isHash:e=>e?.startsWith("#")});const re="/mobile",le=(e,t)=>{if(!e)return e;const n=ne(t?.href);return n?e.replace(n,"")||"/":e},ie=e=>e;function se({router:e,handlerDecorator:t=ie},n){const a=((e,t)=>{if(!e)return e;const n=le(e,t)||"",a=t?.pathname.startsWith(re);return a&&!ee(n)?`/mobile${n}`:n})(n.href,e);return{...n,href:a,"aria-label":n.text,onClick:t((t=>{const r=a&&!ee(a),l=!n.target||"_self"===n.target;r&&l&&(t?.preventDefault(),e.push(a))}),n)}}const oe=u((({text:e,href:t,target:n,onClick:a,className:r="",children:l})=>t?m("a",{className:`no-underline ${r}`,href:t,target:n,onClick:a,children:m("span",{className:r,children:e||l})}):m("span",{className:r,children:e||l})));function ce(e){return t=>t.reduce(((t,n,a)=>t.length?t.concat({...e,key:a},n):[n]),[])}const de=u((e=>{const{text:t,aboveText:n,appendLeft:a,appendRight:r}=e;return h("div",{className:me(e),children:[a||null,he(e)?h("div",{children:[m("div",{className:"text-xs-light text-left",children:n}),m("div",{className:"text-left "+(n?"text-s -mt-0.5":"text-l"),children:t})]}):null,r||null]})})),me=e=>{const{version:t,aboveText:n,rounded:a}=e;if("link"===t)return"";const r="gap-2 "+(n?"py-2.5 px-7":"py-4 px-9");return["flex items-center justify-center",he(e)?r:"h-12 w-12",a?"rounded-full":""].join(" ")},he=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),ue={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",link:""},xe={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text",link:""},pe="text-center font-sans select-none",be=({className:e,rounded:t,version:n})=>[pe,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-focus focus:border",n?ue[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ge=({className:e,rounded:t,version:n})=>["inline-block",pe,n?xe[n]:"",t?"rounded-full":"rounded-md",e].join(" "),fe=u((e=>{const{text:t,aboveText:n,appendLeft:a,appendRight:r,children:l,disabled:i,rounded:s,...o}=e,c=l??m(de,{text:t,aboveText:n,appendLeft:a,appendRight:r,rounded:s});return m(i?ve:Ne,{rounded:s,...o,children:c})})),Ne=u((({className:e="",ariaLabel:t,version:n,rounded:a,href:r,target:l,children:i,onClick:s,...o})=>m("a",{className:be({className:e,version:n,rounded:a}),href:r,target:l,onClick:s,"aria-label":t,role:r?"link":"button",...o,children:i}))),ve=u((({className:e,children:t,ariaLabel:n,version:a,rounded:r})=>m("div",{role:"button","aria-disabled":"true","aria-label":n,tabIndex:-1,className:ge({className:e,rounded:r,version:a}),children:t}))),ye=u((({context:e,className:t="",buttons:n})=>{const{handlerDecorator:a}=e,r=e.useRouter();return n&&n?.length?m("div",{className:t,children:n.map(((e,t)=>function({icon:e,iconRight:t,...n},a){if(!n?.text)return null;return m(fe,e?{appendLeft:m(B,{image:e,width:"24",height:"24",asSVG:!0}),appendRight:m(B,{image:t,width:"24",height:"24",asSVG:!0}),...n}:{...n},String(a))}(se({router:r,handlerDecorator:a},e),t)))}):null}));const we={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"},Ie={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text",tile:"bg-black","tile-white":"bg-white"},Ce=u((({className:e="",isDotted:t=!0,children:n,version:a="primary"})=>h("div",{className:`font-sans flex items-start ${e}`,role:"listitem",children:[t?m("div",{className:ke(a)}):null,m("span",{children:n})]}))),ke=e=>`${we[e]} ${Ie[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]}`,Se={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text",tile:"text-primary-text","tile-white":"text-white"},$e={M:"text-xl-light",L:"text-h5-light"},Te=u((e=>{const{className:t="",itemClassName:n,isDotted:a,items:r,listItemSize:l="M",version:i="primary"}=e;return m("section",{className:`${Se[i]} ${$e[l]} ${t}`,role:"list",children:r?.length?r.map(((e,t)=>m(Ce,{className:n,isDotted:a,version:i,children:e},String(t)))):null})})),De=u((({className:e="",title:t="",children:n,buttons:a,image:r})=>h("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,h("div",{className:"flex grow w-full justify-between",children:[h("div",{className:"flex flex-col justify-between w-full",children:[m("div",{className:"h-full",children:n}),a?m("div",{className:"mt-auto pt-8",children:a}):null]}),r]})]}))),Be=(e="primary",t="normal")=>({icon:n,label:a,description:r},l)=>m(J,{icon:n,label:a,description:r,version:e,benefitsVersion:t},String(l)),Re=u((({className:e="",context:t,title:n,headlineVersion:a="L",description:r,benefits:l,benefitsVersion:i="normal",buttons:s,image:o,items:c,version:d="primary",isDotted:u=!0,textBlockClassName:x=""})=>h("div",{className:`flex grow justify-between items-stretch h-full ${e}`,children:[h("div",{className:`flex flex-col ${x}`,children:[m(j,{context:t,title:n,description:r,className:"!p-0 max-w-[600px]",bgColorHeadline:d,headlineVersion:a,align:"left"}),h(De,{context:t,buttons:Ve(t,s),children:[l?.filter((e=>e.label))?.length?m("div",{className:"flex gap-6 mt-6",children:l.map(Be(d,i))}):null,c?.length?m(Te,{className:"mt-5 text-h6",items:c,itemClassName:"mb-[7px]",version:d,isDotted:u}):null]})]}),o?.src&&m(B,{className:"mt-[-50px]",image:o})]}))),Ve=(e,t)=>t?.length?m(ye,{context:e,buttons:t,className:"flex gap-4"}):null;function Ae(e,t,n){const{text:a,href:r,target:l,onClick:i}=e,s="primary"===t?"white":"black";return h("div",{className:`flex items-center cursor-pointer ${n}`,onClick:i,children:[m(fe,{version:t,rounded:!0,className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3",ariaLabel:a,href:r,target:l,children:m(B,{className:"w-4 h-4",image:{...e?.icon||{icon:"ArrowLeftIcon"},iconVersion:s},asSVG:!0})}),a?m("span",{className:"text-m",children:a}):null]})}const Me={primary:"text-secondary-text",secondary:"text-white/80"},Pe=u((e=>{const{context:t,className:n="",breadcrumbs:a,backwardButton:r,version:l="primary",...i}=e,s=t.useRouter(),{handlerDecorator:o}=t;return h(g,{context:t,className:`font-sans overflow-hidden p-[50px] flex flex-col box-border min-h-[454px] ${W[l]} ${n}`,...i,children:[r?.text?Ae(se({router:s,handlerDecorator:o},r),l,"mb-10 -mt-2.5"):null,a?.length?m("div",{className:"text-xs-light mb-6",children:ce(m("span",{className:`mx-2 ${Me[l]}`,children:"/"}))(a.map(((e,t)=>m(oe,{...se({router:s,handlerDecorator:o},{className:Me[l],...e})},String(t)))))}):null,m(Re,{context:t,version:l,...i})]})})),je={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"}},Le=u((({title:e,description:t,blockVersion:n="primary",iconVersion:a,image:r,className:l,...i})=>{const s=je[n];return h(g,{className:`font-sans px-9 py-4 flex ${s.background} ${l||""}`,...i,children:["small"===a?_e(s.icon):null,"big"===a?Ue(r):null,h("div",{className:"py-0.5",children:[e?m("div",{className:`text-l font-medium mb-1 ${s.title}`,children:e}):null,t?m("div",{className:`text-s ${s.description}`,children:t}):null]})]})}));function _e(e){return m("div",{className:"pt-1.5 pl-1 pr-4",children:m("div",{className:`rounded-full h-4 w-4 text-center text-xs-light ${e}`,children:"i"})})}function Ue(e){return e?.src?m(B,{className:"pt-0.5 pr-3",image:e}):null}const Ge=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12};function Oe(e=""){const t=Ge(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}function Ee(e=""){const t=Ge(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const Fe=u((e=>{const{context:t,title:n,headingType:a="h3",description:r,items:l,children:i,buttons:s,image:o,isDotted:c=!0,listItemSize:d="M",className:u="",version:x="primary",...p}=e,b="primary"===x?"text-primary-text":"";return m(g,{context:t,className:`overflow-hidden font-sans p-9 pr-3 box-border ${u} ${W[x]} ${Ee(u)} ${Oe(u)} `,...p,children:h(De,{context:t,title:n?m(N,{headingType:a,as:"h2",title:n,className:`whitespace-pre-wrap max-w-[600px] ${b}`}):null,buttons:s?.length?m(ye,{context:t,buttons:s.map((e=>({...e,className:"w-[158px]"}))),className:"flex mt-8 gap-3"}):null,image:o?.src?m(B,{className:"mt-auto ml-7",image:o}):null,children:[r?m(P,{className:"max-w-[600px] text-xl-light mt-2",description:r}):null,i,We(l,{version:x,isDotted:c,listItemSize:d})]})})}));function We(e,{version:t,isDotted:n,listItemSize:a}){const r="primary"===t?"tile":"tile-white";return e?.length?m(Te,{items:e,isDotted:n,className:"mt-3",listItemSize:a,itemClassName:"mb-1.5",version:r}):null}const ze=u((({context:e,className:t="",title:n,headlineVersion:a="S",description:r,additionalDescription:l,benefits:i=[],buttons:s,image:o,version:c="primary",...d})=>h(g,{context:e,className:`overflow-hidden font-sans p-9 box-border relative justify-between grid ${t} ${W[c]} ${Ee(t)} ${Oe(t)}`,...d,children:[m(j,{context:e,className:"!p-0 z-10 "+(n||r?"mb-3.5":""),as:"h2",title:n,description:r,headlineVersion:a,bgColorHeadline:c,align:"left"}),He(i,c),l?Xe(l,c):null,s?.length?m(ye,{context:e,buttons:s,className:"flex self-end mt-5 gap-4 z-10 text-l"}):null,o?.src?m(B,{className:"absolute right-0 bottom-0",image:o}):null]})));function He(e,t){return m("div",{className:"z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline max-w-[calc(100%-186px)]",children:e.length?e.map(Je(t)):null})}function Je(e="primary"){const t={primary:"text-secondary-text",secondary:"text-white"};return function(n,a){const{label:r="",description:l=""}=n;return[m("div",{className:"text-h6",children:r},`label-${a}`),m("div",{className:`text-m-light ${t[e]}`,children:l},`desc-${a}`)]}}function Xe(e,t="primary"){return m("div",{className:`text-m-light mt-2.5 ${{primary:"text-secondary-text",secondary:"text-white"}[t]}`,children:e})}const qe=u((({className:e,disabled:t,...n})=>m(fe,{rounded:!0,className:`group shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...n,children:m(B,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover:text-primary-main",width:"16",height:"16",asSVG:!0})})));function Ke({handler:e,isShown:t,btnClass:n,className:a="",isDisabled:r=!1}){return h("div",{children:[t[0]||r?m(qe,{className:`absolute z-10 ${n[0]} ${a}`,onClick:e[0],ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!t[0]}):null,t[1]||r?m(qe,{className:`absolute z-10 rotate-180 ${n[1]} ${a}`,onClick:e[1],ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!t[1]}):null]})}const Qe={normal:3,mini:4},Ze={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Ye={normal:380,mini:276},et=u((({title:e,description:t,image:n,items:a,button:r,version:l,isDotted:i=!0})=>{const s=function(e){return`text-xl-light m-0\n ${"secondary"!==e?"text-primary-text":""}\n `}(l);return h("div",{className:"h-full flex flex-col justify-between text-center",children:[h("div",{children:[n?.src?m("div",{className:"flex justify-center",children:m(B,{className:"mb-6",image:n})}):null,e?nt(e,s):null,t?m("div",{className:"text-m"+(e?"mt-2":""),children:t}):null,a?.length?at(a,i,l):null]}),r?.text?tt(r):null]})}));function tt(e){return m(fe,{className:"mt-6 w-full",appendLeft:e.icon&&m(B,{image:e.icon,width:"24px",height:"24px",asSVG:!0}),...e})}function nt(e,t){return m("div",{className:`text-xl-light m-0 ${t}`,children:e})}function at(e,t,n="primary"){return m(Te,{className:"max-w-[308px] mt-2 text-s "+("primary"===n?"!text-secondary-text":""),itemClassName:"mt-1 text-left first:mt-0",items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t,version:n})}const rt=u((({context:e,title:t,description:n,cards:a=[],version:r="normal",activeCardIndex:l})=>h("div",{children:[m("div",{className:"absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent"}),m(j,{context:e,className:"!p-0",title:t,description:n,headlineVersion:"L",align:"center"}),m("div",{className:`flex mt-8 ${a?.length<=Qe[r]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${l*Ye[r]}px)`},role:"list",children:a?.map(((t,n)=>function({card:e,version:t},n){return m("section",{className:`box-border border-solid border border-main-stroke p-6 mx-2 flex flex-col justify-between\n items-stretch ${Ze[t]} ${W[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:m(et,{...e})},String(n))}({card:t,version:r,context:e},n)))})]})));const lt=u((({context:e,cards:t=[],className:n="",version:r="normal",...l})=>{const[i,s]=a(0),o=t?.length>Qe[r],c=o&&t?.length-i>Qe[r],d=o&&i>0;return h(g,{context:e,className:`relative font-sans text-primary-text bg-white p-[42px] overflow-hidden ${n}`,...l,children:[m(rt,{context:e,cards:t,version:r,activeCardIndex:i,...l}),Ke({handler:[()=>s(i-1),()=>s(i+1)],isShown:[d,c],btnClass:["left-8","right-8"],className:"top-1/2"}),m("div",{className:"absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white"}),m("div",{className:"absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white"})]})})),it=u((e=>m(lt,{...e,version:"normal"}))),st=u((e=>m(lt,{...e,version:"mini"}))),ot=u((({className:e="",documents:t,...n})=>m(g,{className:`font-sans bg-white mt-[10px] ${e}`,...n,children:m("ul",{className:"flex flex-col text-s text-secondary-text p-0",children:t?.length?ct(t):null})}))),ct=e=>e.map(((e,t)=>{const{text:n,...a}=e;return m("li",{className:"mb-4 list-none",children:m("a",{className:"hover:text-primary-main",role:"link",...a,children:n||null})},`list_item_${String(t)}`)})),dt={Headline:j,LinkDocs:F,TextBlock:Le,PictureText:K,ProductBlock:Pe,Tile:Fe,ProductTile:ze,Gallery:it,MiniGallery:st,LinkList:ot},mt=({blocks:e,context:t,className:n=""})=>e?.length?e.map(ht({context:t,className:n})):null,ht=({context:e,className:t})=>(n,a)=>{if(!n)return null;const{style:r,blockListType:l,...i}=n;if(!l||!(l in dt))return null;const s=R(r);return m(dt[l],{className:`${t} ${s}`,context:e,...i},`block_${a}`)},ut=u((({blocks:e,context:t})=>m("div",{className:"grid grid-cols-12 transition-all duration-300 max-h-0 overflow-hidden",children:mt({context:t,blocks:e,className:"!p-0 mb-3.5"})}))),xt=u((({label:e,isExpanded:t,blocks:n,context:r})=>{const{isActive:l,hasContent:i,icon:s,handleToggle:o}=(({blocks:e,initialState:t=!1})=>{const[n,r]=a(t),l=e?.length;return{isActive:n,hasContent:l,icon:n?"MinusIcon":"PlusIcon",handleToggle:e=>{const t=e.currentTarget;if(!t)return;r(!n);const a=t.nextSibling;a.style.maxHeight=a.style.maxHeight?"":`${a.scrollHeight}px`}}})({blocks:n,initialState:t});return h("li",{className:"border-0 border-b border-solid border-main-divider last:border-b-0",children:[h("button",{className:`border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full\n font-sans text-h6 ${i?"group cursor-pointer":""}\n `,onClick:o,children:[m("span",{className:"text-xl font-medium pr-2.5",children:e}),i?m(B,{image:s,className:"text-primary-main flex-shrink-0",width:"24",height:"24",asSVG:!0}):null]}),i?m(ut,{isExpanded:l,blocks:n,context:r}):null]})})),pt={left:"text-left",center:"text-center",right:"text-right"},bt=u((({title:e,description:t,accordionItems:n,context:a,className:r="",accordionAlignTitle:l="center",...i})=>h(g,{context:a,className:`p-[50px] mb-1 last:mb-0 font-sans bg-white text-primary-text ${r}`,...i,children:[e?m(N,{headingType:"h3",as:"h2",className:`mb-2.5 ${pt[l]}`,title:e}):null,t?m("div",{className:"mb-2.5 text-l",children:t}):null,n?.length?m("ul",{className:"list-none m-0 p-0",children:n.map(((e,t)=>m(xt,{...e,context:a},`AccordionItem${t}`)))}):null]}))),gt={primary:"bg-white",secondary:"bg-primary-main"},ft={primary:"",secondary:"text-white"},Nt={primary:"text-secondary-text",secondary:"text-white opacity-80"},vt={primary:"bg-main-divider text-primary-main",secondary:"bg-white/30 text-black"},yt=u((({className:e="",title:t,benefitList:n,benefitsBlockVersion:a="primary",...r})=>h(g,{className:`font-sans text-primary-text p-12 flex flex-col items-center ${e} ${gt[a]}`,...r,children:[t?m(N,{headingType:"h3",as:"h2",className:`max-w-[47rem] text-center ${ft[a]}`,title:t}):null,n?.length?wt(n,a):null]}))),wt=(e,t)=>m("div",{className:"flex flex-wrap w-full justify-center gap-x-20 mt-8",children:e.map(Ct(t))}),It=(e,t)=>e.icon?(e.iconVersion="secondary"===t?"white":"normal",e):e,Ct=e=>(t,n)=>{const a=t?.description||void 0;return h("div",{className:"flex items-center basis-1/2 max-w-[500px] mb-14",children:[t?.icon?.icon?m(B,{className:`w-[50px] h-[50px] min-w-[50px] p-3 rounded-full ${vt[e]}`,image:It(t.icon,e),asSVG:!0}):null,t?.icon?.src?m(B,{image:t.icon}):null,h("div",{className:"ml-5",children:[t?.label?m("h3",{className:`text-h6 m-0 ${ft[e]}`,children:t.label}):null,kt(a,e)]})]},String(n))},kt=(e,t)=>{const n=e?e?.benefitType:null;return n&&e?m("div",{className:`text-l-light mt-2 ${Nt[t]}`,children:"list"===n?$t(e):St(e)}):null},St=e=>e?e.name:null,$t=e=>{const t=e?.bullets?"list-disc pl-6":"";return e?.items&&e.items.length>0?m("ul",{className:t,children:e.items.map(((e,t)=>m("li",{children:e},`benefitListItem-${t}`)))}):null},Tt=u((e=>{const{context:t,className:n="",title:a,description:r,bonusItems:l,...i}=e;return m(g,{className:`font-sans bg-white p-[50px] pb-9 ${n}`,context:t,...i,children:h("div",{className:"container",children:[m(j,{context:t,className:"!p-0",title:a,description:r,headlineVersion:"M",align:"center"}),m("div",{className:"flex flex-wrap w-full mt-9",children:l?l.map(((e,t)=>m("div",{className:"flex-grow w-[49%] border border-gray pl-9 pt-9 pr-6 pb-6 mb-[14px] mx-[7px] even:mr-0 odd:ml-0 last:odd:mx-0",children:h("div",{className:"flex justify-between w-full",children:[h("div",{className:"mr-4",children:[m("div",{className:"text-h4",children:e.title}),m("div",{className:"text-xl-light mt-[14px] max-w-[488px]",children:e.description})]}),e.bonusCount?h("div",{className:"relative -bottom-3 h-auto flex items-end mt-14 shrink-0",children:[m("span",{className:"font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7",children:e.bonusCount}),m("span",{className:"text-[44px] bg-clip-text text-transparent bg-green-to-yellow",children:e.bonusName})]}):null]})},String(t)))):null})]})})}));function Dt(e=""){const t=Ge(e);return t<=6?"grid-cols-2":t<=8?"grid-cols-3":"grid-cols-4"}const Bt=u((({context:e,className:t="",title:n,subtitle:a,bonusBenefits:r,...l})=>h(g,{className:`font-sans text-primary-text bg-white p-50 flex flex-col text-center ${t}`,context:e,...l,children:[m(j,{context:e,className:"!p-0",title:n,description:a,headlineVersion:"M",align:"center"}),r?.length?m("div",{className:`grid gap-1 mt-8 ${Dt(t)}`,children:r.map(Rt)}):null]}))),Rt=(e,t)=>h("div",{className:"flex flex-col items-center max-w-[292px]",children:[e?.icon?m(B,{className:"h-[180px] w-[160px] min-w-[160px] min-h-[160px]",image:e.icon,width:"160",height:"180"}):null,m("div",{children:e?.label?m("span",{className:"text-h6 m-0",children:e.label}):null})]},String(t)),Vt=u((({title:e,value:t,postfix:n="",prefix:a,className:r=""})=>h("div",{className:`mb-5 ${r}`,children:[e?m("div",{className:"text-l-light text-secondary-text",children:e}):null,t?h("div",{className:"text-h3",children:[a," ",q(Math.round(t))," ",n]}):null]}))),At=6e4,Mt=2e6,Pt=97e4,jt=Math.round(23.5),Lt={minSum:At,maxSum:Mt,minMonths:13,maxMonths:60,rateBottomRange:10,rateTopRange:7,isSalaryClient:!0,isStateEmployee:!0,isInsurance:!0,sumBorder:999999},_t={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Ut=u((({rate:e,title:t="Ставка",unit:n,rateBlockClassName:a})=>h("div",{children:[m("div",{className:"text-l-light text-secondary-text",children:t}),h("div",{className:"flex justify-start",children:[m("span",{className:`block gradient-color-text font-mohave text-title-huge pr-6 -mt-4 ${a}`,children:String(e).replace(".",",")}),n?m("span",{className:"gradient-color-text text-[65px] leading-[75px]",children:n}):""]})]})));function Gt(e,t){return t?.length?m(ye,{context:e,buttons:t,className:"flex flex-col mt-7 gap-2"}):null}const Ot=u((({className:e,title:t,items:n=[],min:a=1,max:r=100,step:l=1,value:i=a,disabled:s=!1,onChange:o})=>{const c=e=>{if(!o)return;const t=Number(e.replace(/\D/g,""));o(t)},d={backgroundSize:`${(100*(i-a)/(r-a)).toFixed(2)}% 100%`};return h("div",{className:e,children:[h("label",{className:"block relative",children:[t?m("span",{className:"text-m-light",children:t}):null,m("input",{className:"m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-main-stroke rounded-md\n outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-focus disabled:border-main-stroke disabled:bg-main-divider",value:q(i),disabled:s,onChange:e=>c(e.target.value),onBlur:()=>{o&&(i<a&&o(a),i>r&&o(r))}}),m("div",{className:"absolute inset-x-0 -bottom-1 px-4 leading-[18px]",children:m("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:a,max:r,step:l,value:i,disabled:s,onChange:e=>c(e.target.value),style:d})})]}),m("div",{className:"flex justify-between my-2",children:n.map(((e,t)=>m("span",{className:"text-s-light text-secondary-text",children:e},String(t))))})]})})),Et=(e,t,n)=>Math.max(t,Math.min(e,n)),Ft=1e3;function Wt(e,t,n){const{moneyValue:a,minSum:r,maxSum:l,step:i=Ft,isShowItems:s=!0}=t,o=[`От ${q(r)} ₽`,`До ${q(l)} ₽`];return m(Ot,{title:e,items:s?o:[],min:r,max:l,step:i,value:Et(a,r,l),onChange:n})}const zt=new Map;function Ht(e){return e?Array.isArray(e)?e:e instanceof Function?Ht(e()):[e]:[e]}let Jt=function(e,t){const n=i((()=>Ht(e)),[e]),[l,s]=a(),[o,c]=a();return r((()=>{if(!n.every((e=>null===e)))try{const e=t(...n);"then"in e?(e=>{e.then((e=>zt.get(n)||e)).then(s).catch(c)})(e):s(e)}catch(e){c(e)}}),[t,...n]),{data:l,error:o,mutate:()=>Promise.resolve(void 0),isValidating:!1}};const Xt=(e,t)=>Jt(e,t);async function qt(e,t){const n=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await n.json()}function Kt(e){const{data:t}=Xt(`/wcms-resources/${e}.json`,qt);return t}const Qt=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:a}=e,r=Kt(t||"bonus-calculator-data")||_t,[l,i]=((e,t,n)=>{const{minSumTravel:a,minSumOther:r,maxBonus:l,prefMonthsNum:i,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===a&&n===r)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*n),l);return[m,m*i+Math.min(Math.round(c*t)+Math.round(d*n),l)*(12-i)]})(r,n,a);return{...r,...e,monthBonus:l,yearBonus:i}},Zt=u((({context:e,className:t="",sourceBookDir:n="",buttons:r})=>{const[l,i]=a(6e3),[s,o]=a(6e3),c={travelExpenseValue:l,restExpenseValue:s},{minSumTravel:d,maxSumTravel:u,minSumOther:x,maxSumOther:p,monthBonus:b,yearBonus:g}=Qt(c,n);return h("section",{className:t,children:[h("div",{className:"w-[468px]",children:[Wt("Сумма покупок в категории путешествия, ₽",{minSum:d,maxSum:u,moneyValue:l,step:500,isShowItems:!1},i),Wt("Сумма покупок в остальных категориях, ₽",{className:"mt-7",minSum:x,maxSum:p,moneyValue:s,step:500,isShowItems:!1},o)]}),m("div",{children:b>=0?m(Ut,{title:"Баллов за месяц",rate:b,rateBlockClassName:"tracking-[-14px]"}):null}),h("div",{className:"w-[240px]",children:[g>=0?m(Vt,{title:"Баллов за год",value:g}):null,Gt(e,r)]})]})})),Yt=u((({className:e,viewBox:t,fill:n="none",width:a,height:r,paths:l,...i})=>m("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:a,height:r,children:l.map((({d:e,fill:t,...n},a)=>m("path",{d:e,fill:t||"currentColor",...i,...n},a)))}))),en=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],tn=u((({className:e,text:t,checked:n,isRadio:a,onChange:r})=>m("div",{className:e,children:h("label",{className:"flex items-center relative cursor-pointer group",children:[m("input",{className:`peer appearance-none w-5 h-5 border-solid cursor-pointer group-hover:border-checkbox-hover\n ${a?"rounded-full border-2":"rounded checked:bg-primary-main border"}\n ${n?"border-black":"border-main-stroke"}\n checked:border-primary-main m-0`,type:"checkbox",onChange:e=>{r(e.target.checked)},checked:n}),a?m("div",{className:"left-1 w-3 h-3 rounded-full bg-primary-main hidden absolute peer-checked:block"}):m(Yt,{paths:en,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),t?m("span",{className:"font-sans ml-3 text-l-light",children:t}):null]})})));function nn(e,t,n){const{minMonths:a,maxMonths:r,monthsValue:l}=t,i=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`;return m(Ot,{className:"mt-7",title:e,items:[`От ${i(a)}`,`До ${i(r)}`],min:a,max:r,step:1,value:Et(l,a,r),onChange:n})}const an=u((({items:e,checkedItem:t,onChangeCheckedItem:n})=>m("div",{children:e?.map((({id:e,text:a})=>m(tn,{isRadio:!0,text:a,checked:t===e,onChange:()=>n(e)},e)))})));function rn(e,{items:t,checkedItem:n,onChange:a}){return m(an,{context:e,items:t,checkedItem:n,onChangeCheckedItem:a})}const ln=(e,t)=>{const{isInsurance:n,isSalaryClient:a,isStateEmployee:r,moneyValue:l}=e,i=Kt(t||"credit-calculator-data")?.rows?.find((e=>n===e.isInsurance&&a===e.isSalaryClient&&r===e.isStateEmployee))||Lt,{rateBottomRange:s,rateTopRange:o,sumBorder:c}=i,d=l<=c?s:o,m=((e,t)=>{const{isAnnuity:n,moneyValue:a,monthsValue:r}=t;if(n){const t=e/1200;return a*(t+t/(Math.pow(1+t,r)-1))}return Math.round(a/r)+a*(e/1200)})(d,e);return{...i,...e,finalRate:d,monthlyPayment:m}},sn="annuity",on="differential",cn=[{id:sn,text:"Аннуитетный"},{id:on,text:"Дифференцированный"}],dn=u((({context:e,className:t="",sourceBookDir:n,buttons:r})=>{const[l,i]=a(!1),[s,o]=a(!0),[c,d]=a(!1),[u,x]=a(!1),[p,b]=a(Pt),[g,f]=a(jt),N=ln({isAnnuity:l,isInsurance:s,isSalaryClient:c,isStateEmployee:u,moneyValue:p,monthsValue:g},n);return h("section",{className:t,children:[h("div",{className:"w-[468px]",children:[Wt("Сумма кредита, ₽",{...N,step:500},b),nn("Срок кредита, месяцев",N,f),h("div",{className:"mt-7",children:[m(tn,{text:"Получаю зарплату на счёт в Россельхозбанке",checked:c,onChange:d}),m(tn,{className:"mt-3",text:"Работаю в бюджетной организации",checked:u,onChange:x}),m(tn,{className:"mt-3",text:"Комплексная страховая защита",checked:s,onChange:o})]})]}),m(Ut,{title:"Ставка",rate:N.finalRate,rateBlockClassName:"tracking-[-25px]",unit:"%"}),h("div",{className:"w-[351px]",children:[m(Vt,{title:l?"Ежемесячный платеж":"Платёж в первый месяц",value:N.monthlyPayment,postfix:"₽"}),rn(e,{items:cn,checkedItem:l?sn:on,onChange:e=>i(e===sn)}),Gt(e,r)]})]})})),mn=u((({context:e,className:t="",buttons:n,rate:r})=>{const[l,i]=a(Pt),[s,o]=a(jt);return h("section",{className:t,children:[h("div",{className:"w-[468px]",children:[Wt("Сумма вклада, ₽",{moneyValue:l,minSum:At,maxSum:Mt},i),nn("Срок вклада, месяцев",{minMonths:13,maxMonths:60,monthsValue:s},o)]}),m(Ut,{rate:r||1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),h("div",{className:"w-[351px]",children:[m(Vt,{title:"Доход по вкладу",value:948841,postfix:"₽",prefix:"+"}),m(Vt,{title:"Сумма в конце срока",value:1218841,postfix:"₽"}),Gt(e,n)]})]})})),hn=10.2;function un(e,t,n){const{moneyValue:a}=t,r=Mt;return m(Ot,{className:"mt-7",title:e,items:[`От ${q(6e4)} рублей`,`До ${q(r)} рублей`],min:6e4,max:r,step:1e3,value:a,onChange:n})}function xn({credit:e,period:t,taxRefund:n}){return h("div",{children:[h("div",{className:"flex justify-between",children:[m(Vt,{title:"Сумма кредита",value:e,postfix:"₽"}),m(Vt,{title:"Срок",value:t,postfix:"лет",className:"w-[120px]"})]}),m(Vt,{title:"Ежемесячный платеж",value:777777,postfix:"₽"}),m(Vt,{title:"Налоговый вычет",value:n,postfix:"₽"})]})}function pn(e,t,n){const{moneyValue:a}=t,r=Mt;return m(Ot,{title:e,items:[`От ${q(6e4)} ₽`,`До ${q(r)} ₽`],min:6e4,max:r,step:1e3,value:a,onChange:n})}const bn={CreditCalculatorForm:dn,MortgageCalculatorForm:u((({context:e,className:t="",buttons:n})=>{const[r,l]=a(1e6),[i,s]=a(12),[o,c]=a(!1),[d,u]=a(!1),x=(e=>{const{calculatorParams:t,isInsurance:n}=e;return t?n?t?.rateWithInsurance||hn:t?.rateWithoutInsurance||hn:hn})({calculatorParams:{},isInsurance:o});return h("section",{className:t,children:[h("div",{className:"w-[468px]",children:[pn("Стоимость недвижимости, ₽",{moneyValue:r},l),un("Первоначальный взнос, ₽",{moneyValue:r},l),nn("Срок ипотеки, месяцев",{minMonths:13,maxMonths:60,monthsValue:i},s),h("div",{className:"mt-7",children:[m(tn,{text:"Страхование жизни",checked:o,onChange:c}),m(tn,{className:"mt-4",text:"Страхование жизни, здоровья и временной утраты трудоспособности",checked:d,onChange:u})]})]}),m(Ut,{rate:x,rateBlockClassName:"tracking-[-25px]",unit:"%"}),h("div",{children:[m("div",{className:"w-[351px]",children:xn({credit:3892e3,period:15,taxRefund:65e4})}),Gt(e,n)]})]})})),DepositCalculatorForm:mn,BonusCalculatorForm:Zt},gn=({context:e,className:t})=>(n,a)=>{const r=n?.calcType;if(!r||!(r in bn))return null;const l=bn[r];return m("section",{className:`box-border relative bg-white flex shrink-0 self-start basis-full ${t}`,role:"listitem",children:h("div",{className:"box-border p-9 w-full",children:[n?.title?m(N,{className:"text-center mb-6",title:n.title}):null,m(l,{context:e,...n,className:"flex justify-between"})]})},String(a))},fn=u((({className:e="",context:t,calculatorTabs:n=[],...r})=>{const l=n.map((e=>e.nav||{})),i=n.map((({calculatorBlock:e})=>e||{})),[s,o]=a(0),[c,d]=a(0),u=n?.length>3&&n?.length>c+3,x=c>0;return h(g,{context:t,className:`box-border overflow-hidden relative font-sans w-100 text-primary-text bg-white ${e}`,...r,children:[h("div",{className:"bg-white",children:[l.length>1?Nn({tabsShift:c,tabsNav:l,activeSlideIndex:s,setActiveSlideIndex:o}):null,Ke({handler:[()=>d(c-1),()=>d(c+1)],isShown:[x,u],btnClass:["left-3","right-3"],className:"top-8"})]}),m("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:i?.length?i.map(gn({context:t,className:e})):null})]})}));function Nn({tabsShift:e,tabsNav:t,activeSlideIndex:n,setActiveSlideIndex:a}){return h("div",{children:[m("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000",children:m("div",{className:"w-full flex flex-nowrap items-end gap-2",children:t.map(((e,t)=>function({tab:e,i:t,activeSlideIndex:n,onClick:a}){const r=t===n,l=r?"h-[88px] w-[387px] min-w-[387px] p-5 border-none bg-primary-main text-white":"h-[77px] w-[328px] min-w-[328px] px-5 py-4 ease-in duration-300 bg-white text-primary-text",i=r?"text-xl mb-1.5":"text-l mb-[3px]",s=r?"text-l-light text-white":"text-m-light text-secondary-text",o=r?"":"text-primary-main";return h("button",{type:"button",onClick:a,"aria-label":e?.title,className:`box-border relative border border-main-stroke cursor-pointer text-left border-b-0 flex hover:h-[88px]\n ${l}`,children:[m(B,{className:`h-[24px] w-[24px] min-w-[24px] min-h-[24px] mr-4 ${o}`,image:{...e?.icon,iconVersion:r?"white":"normal"},width:"24",height:"24",asSVG:!0}),h("div",{className:"border-0",children:[m("div",{className:`${i}`,children:e?.title}),m("div",{className:`${s}`,children:e.description})]})]},String(t))}({tab:e,i:t,activeSlideIndex:n,onClick:()=>a(t)})))})}),m("div",{className:"w-full h-2 bg-primary-main"})]})}const vn={RUB:"₽",USD:"$",EUR:"€"},yn=u((({className:e="",label:t,currency:n="RUB",onChange:a,value:r="",minValue:l=0,maxValue:i=3e5,...s})=>h("div",{className:e,children:[t?m("label",{className:"block text-m-light mb-2",children:t}):null,h("div",{className:"h-[56px] relative flex items-center",children:[m("input",{type:"number",className:"text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text",onChange:e=>{if(!a)return;const t=""===e.target.value?"":String(Et(e.target.value,l,i));a(t)},value:r,min:l,max:i,...s}),m("span",{className:"text-xl-light absolute right-4",children:vn[n]})]})]}))),wn={version:"primary",className:"w-full h-[56px] px-9 mt-6"},In=u((({className:e="",title:t="Укажите сумму перевода",...n})=>{const[r,l]=a(""),i=!Number(r);return h(g,{className:`p-[50px] flex flex-col items-center font-sans bg-white ${e}`,...n,children:[t?m(N,{className:"max-w-[684px] pb-9",headingType:"h2",title:t}):null,h("form",{className:"w-[468px]",method:"POST",action:"https://www.rshb.ru/p2p/",children:[m(yn,{name:"amount",value:r,onChange:l,placeholder:"1500",label:"Сумма перевода"}),m("button",{type:"submit",className:i?ge(wn):be(wn),disabled:i,children:"Далее"})]})]})})),Cn={default:"normal",primary:"white",secondary:"black"},kn={black:"bg-black",white:"bg-white"},Sn=u((({className:e="",title:t,description:n,image:a,price:r,button:l,colors:i})=>h("section",{className:`border border-solid box-border p-[30px] min-w-[402px] flex flex-col justify-left ${e}`,role:"listitem",children:[a?.src?m(B,{className:"mb-5 flex justify-center",image:a}):null,t?m(N,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,n?m("div",{className:"text-m-light text-left mb-4",children:n}):null,i?.length?h("div",{className:"flex mb-4 text-m-light text-secondary-text",children:[m("div",{className:"mr-1.5",children:"Доступные цвета: "}),i.map($n)]}):null,r?h("div",{className:"text-h3 text-left",children:[r," ₽"]}):null,l?Tn(l):null]}))),$n=(e,t)=>m("span",{className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${kn[e]}`},String(t)),Tn=e=>{const{icon:t,iconRight:n,...a}=e;if(!e?.text)return null;const r=Cn[e?.version||"default"],l=Dn({...t,iconVersion:r}),i=Dn({...n,iconVersion:r});return m(fe,{className:"mt-5 w-full",appendLeft:l,appendRight:i,...a})},Dn=e=>{if(!e||!e?.icon&&!e?.src)return null;const t=e?.size?.width?`${e.size.width}`:"24";return m(B,{image:e,width:t,height:"24",asSVG:!0})},Bn="absolute top-0 bottom-0 w-[84px]",Rn=u((({context:e,cards:t=[],className:n="",title:r,description:l,...i})=>{const[s,o]=a(0);return h(g,{context:e,className:`bg-white relative font-sans p-12 overflow-hidden text-center ${n}`,...i,children:[m(j,{context:e,className:"!p-0",title:r,description:l,headlineVersion:"M",align:"center"}),m("div",{className:"flex duration-1000 gap-3.5 mt-8",style:{transform:`translateX(-${430*s}px)`},role:"list",children:t?.length?t.map(Vn(e)):null}),An({cardsCount:t.length,activeCardIndex:s,setActiveCardIndex:o}),m("div",{className:`${Bn} left-0 bg-opacity-from-white`}),m("div",{className:`${Bn} right-0 bg-opacity-to-white`})]})})),Vn=e=>(t,n)=>m(Sn,{context:e,...t},String(n)),An=({cardsCount:e,activeCardIndex:t,setActiveCardIndex:n})=>{const a=e>3;return Ke({handler:[()=>n(t-1),()=>n(t+1)],isShown:[a&&t>0,a&&e-t>3],btnClass:["left-8","right-8"],className:"top-1/2 z-10 mt-6"})},Mn=({columnsLength:e,colsLengthForScroll:t,activeCardIndex:n,setActiveCardIndex:a})=>{const r=e>t;return{handleNextClick:()=>a(n+1),handlePrevClick:()=>a(n-1),isScrollAvailable:r,showNextButton:r&&e-n>t,showPrevButton:Boolean(r&&n>0)}},Pn="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",jn="border-main-stroke border-solid border",Ln="border-main-divider border border-t-0 border-x-0",_n="w-[200px] mr-6",Un=u((({icon:e,image:t,title:n,link:a})=>h("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${jn} ${Pn}`,role:"columnheader",children:[e&&!t?.src&&m(B,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:e,width:"63",height:"63"}),t?.src&&m(B,{className:"mb-[18px]",image:t}),n?m(N,{headingType:"h4",as:"h3",className:"text-center text-white",title:n}):null,a?.text&&m("div",{className:"mt-auto w-full",children:m(fe,{href:a.href,target:a.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:m("div",{className:"text-xs-light font-medium py-[11px]",children:a.text})})})]}))),Gn={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},On=u((({children:e,activeCardIndex:t,columnWidth:n,version:a="comparison"})=>m("div",{className:"flex flex-1 overflow-hidden",children:m("div",{className:Gn[a],style:{transform:`translateX(-${t*n}px)`},children:e})}))),En=u((({children:e})=>m("div",{className:"self-start flex flex-col",role:"row",children:m("div",{className:"flex",children:e})}))),Fn=u((({colHeaders:e,activeCardIndex:t,router:n,handlerDecorator:a})=>h(En,{children:[m("div",{className:_n,role:"columnheader"}),m(On,{activeCardIndex:t,columnWidth:336,children:e.map(((e,t)=>m(Un,{...e,link:e.link&&se({router:n,handlerDecorator:a},e.link)},String(t))))})]}))),Wn=u((({isScrollAvailable:e,handleNextClick:t,handlePrevClick:n,showNextButton:a,showPrevButton:r})=>e?m("div",{children:Ke({handler:[n,t],isShown:[r,a],btnClass:["top-[108px]","top-11"],className:"right-7",isDisabled:!0})}):null)),zn=u((({cell:e,isFirstRow:t,isLastRow:n,isFillGradient:a})=>m("div",{className:`w-80 box-border flex flex-col ${jn} ${n?"border-t-0 rounded-b-md":"border-y-0"} ${a?Pn:""}`,role:"cell",children:m("div",{className:`mx-7 h-full ${Ln} ${a&&t?"border-t":""} ${n?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>Xn(e,t,a)))})}))),Hn=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),Jn=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),Xn=({label:e,description:t},n,a)=>h("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e?m("h4",{className:Hn(a),children:e}):null,t?m("div",{className:Jn(a),children:t}):null]},String(n)),qn=(e=!1)=>`text-s py-7 ${Ln} w-[200px] mr-6 ${e?"border-b-0":"border-solid"}`,Kn=u((({row:{header:e,data:t},activeCardIndex:n,isColoredFirstColumn:a,isFirstRow:r,isLastRow:l})=>h(En,{children:[e?.title?m("div",{className:qn(l),children:e.title}):null,t?.length?m(On,{activeCardIndex:n,columnWidth:336,children:t.map(((e,t)=>m(zn,{cell:e,isFirstRow:r,isLastRow:l,isFillGradient:a&&0===t},String(t))))}):null]}))),Qn=u((({rowData:e,activeCardIndex:t,isColoredFirstColumn:n,...a})=>h("div",{className:"relative",children:[e.map(((e,a,{length:r})=>m(Kn,{row:e,isFirstRow:0===a,isLastRow:a+1===r,activeCardIndex:t,isColoredFirstColumn:n},String(a)))),m(Wn,{...a})]}))),Zn=u((({context:e,columns:t,rowHeaders:n,isShowAllRow:r,visibleRowLength:l,isColoredFirstColumn:i})=>{const s=e.useRouter(),{handlerDecorator:o}=e,c=t?.map((({header:e})=>e||{})),d=t?.map((({data:e})=>e))||[],u=n?.map(((e,t)=>({header:e,data:d.map((e=>e?.[t]||[{}]))}))).slice(0,r?n.length:l),[x,p]=a(0),b=Mn({columnsLength:d.length,colsLengthForScroll:2,activeCardIndex:x,setActiveCardIndex:p}),{isScrollAvailable:g}=b;return h("div",{children:[h("div",{role:"table",children:[c?.length?m(Fn,{colHeaders:c,activeCardIndex:x,router:s,handlerDecorator:o}):null,u?.length?m(Qn,{rowData:u,activeCardIndex:x,isColoredFirstColumn:i,...b}):null]}),g?m("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),Yn=u((({className:e="",context:t,title:n,rowHeaders:r,columns:l,visibleRowLength:i=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=a(!i);return h(g,{context:t,className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e}`,...o,children:[m(N,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:n}),m(Zn,{context:t,columns:l,rowHeaders:r,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:i}),i?ea({isShowAllRow:c,onClick:()=>d(!c)}):null]})})),ea=({isShowAllRow:e,onClick:t})=>m("div",{className:"pr-[50px]",children:h("div",{className:"flex w-full",children:[m("div",{className:_n}),m("button",{onClick:t,className:"mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:m("div",{className:"font-sans text-xs-light font-medium py-[11px]",children:e?"Скрыть":"Показать все параметры"})})]})}),ta=(e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n};function na(){return async function(e,t){try{return await qt(e,t)}catch(e){console.error(e)}return null}(aa,{method:"POST",body:JSON.stringify(ra)})}const aa="https://coins.rshb.ru/api/catalog/vue_storefront_magento_1_currency_rates_average/currency_rates_average/_search?size=10000",ra={query:{bool:{must:[{term:{russian_region_code:"77"}},{term:{from_volume:"0"}},{terms:{currency_pair:["USD/RUB","EUR/RUB"]}}]}}},la=e=>e.reduce(((e,t)=>{const n=t.currency_first?.code;return e.some((e=>e.code===n))||e.push({code:n,buy:ta(Number(t.rate_buy),3),sell:ta(Number(t.rate_sell),3)}),e}),[]);var ia;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(ia||(ia={}));const sa=new Intl.NumberFormat("ru",{style:"currency",currency:ia.RUB}),oa=e=>e?sa.format(e):"",ca="text-left text-m-light text-secondary-text",da={USD:"DollarIcon",EUR:"EuroIcon"},ma=u((({className:e,exchangeCurrencyItems:t})=>h("table",{className:`h-fit w-fit ${e}`,children:[m("thead",{children:h("tr",{children:[m("th",{className:ca,children:"Валюта"}),m("th",{className:`${ca} pl-11`,children:"Купить"}),m("th",{className:`${ca} pl-11`,children:"Продать"})]})}),m("tbody",{children:t.map((e=>ha(e)))})]}))),ha=e=>{const t=e?.code;return h("tr",{className:"pb-1 text-h6",children:[m("td",{className:"pt-4",children:h("div",{className:"flex items-center",children:[t?m(B,{image:{icon:da[t]},width:"24",height:"24"}):null,m("span",{className:"ml-2",children:t})]})}),m("td",{className:"pt-4 pl-11",children:oa(e?.sell)}),m("td",{className:"pt-4 pl-11",children:oa(e?.buy)})]},t)},ua=u((({className:e="",address:t,distance:n})=>h("div",{className:`flex ${e}`,children:[m(B,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),h("div",{className:"ml-3",children:[t?m("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,n?h("p",{className:"text-secondary-text m-0 text-m",children:["Курс указан для ближайшего офиса - ",n]}):null]})]}))),xa=(e,t,n)=>{const a=Number(pa(e))*Math.pow(t,n?-1:1);return Number.isInteger(a)?a:ta(a)},pa=e=>e.replace(/[^\d.,]/g,"").replace(",","."),ba=e=>{return(t=[[e=>e.value!==ia.RUB&&e.oppositeValue!==ia.RUB,()=>e.handleConvert(e.value,ia.RUB)],[e=>e.value===ia.RUB&&e.oppositeValue===ia.RUB,()=>e.handleConvert(e.value,ia.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,n]=t.find((([t])=>t(e)))||[];return n})(e)?.();var t},ga=u((({className:e="",id:t,name:n,type:a="text",placeholder:r,pattern:l,value:i,onChange:s})=>m("input",{className:`border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text ${e}`,id:t,name:n||t,type:a,pattern:l,placeholder:r,value:i,onChange:e=>{const t=e.target.validity.valid?e.target.value:i;s(t)}}))),fa={background:"url('/icons/ArrowDownIcon.svg') no-repeat right 16px top 50%"},Na=u((({className:e="",id:t,name:n,children:a,value:r,onChange:l})=>m("select",{className:`appearance-none ${e}`,style:fa,id:t,name:n||t,value:r,onChange:e=>l(e.target.value),placeholder:"",children:a}))),va=u((({className:e="",value:t,selected:n,disabled:a=!1,children:r})=>m("option",{className:e,value:`${t}`,selected:n,disabled:a,children:r})));function ya(e){const{placeholder:t,rates:n,selected:a,value:r,setValue:l,setSelected:i}=e;return h("div",{className:"relative flex items-center",children:[m(ga,{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:r,onChange:l}),n.length?m(Na,{className:"shrink-0 w-20 h-9 -translate-x-8 bg-transparent",value:a,onChange:e=>i(e),children:n.map(((e,t)=>m(va,{value:e.code,children:e.code},String(t))))}):null]})}const wa=u((({context:e,className:t="",currencyRatesBuy:n,currencyRatesSell:r,button:l})=>{const{useRouter:i,handlerDecorator:s}=e,o=i(),[c,d]=a({inputSell:"",inputBuy:"",selectSell:n?.[0]?.code||ia.RUB,selectBuy:r?.[0]?.code||ia.USD}),u=e=>{d((t=>({...t,...e})))};return h("div",{className:`grid gap-[18px] pt-2 ${t}`,children:[ya({placeholder:"Хочу продать",rates:r,selected:c.selectSell,setSelected:Ia(c,u,r),value:c.inputSell,setValue:e=>ka(u,r)(e,c.selectSell,c.selectBuy)}),ya({placeholder:"Получу",rates:n,selected:c.selectBuy,setSelected:Ca(c,u,n),value:c.inputBuy,setValue:e=>Sa(u,n)(e,c.selectBuy,c.selectSell)}),l?.text?m(fe,{className:"py-4 mr-1",version:l?.version,...se({router:o,handlerDecorator:s},l),children:l.text}):null]})})),Ia=(e,t,n)=>a=>{t({selectSell:a}),ba({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,r=e.selectBuy)=>{ka(t,n)(e.inputSell,a,r)}})},Ca=(e,t,n)=>a=>{t({selectBuy:a}),ba({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,r=e.selectSell)=>Sa(t,n)(e.inputBuy,a,r)})},ka=(e,t)=>(n,a,r)=>{e({inputSell:pa(n),selectBuy:r});const l=t.find((e=>e.code===r))?.buy||t.find((e=>e.code===a))?.sell;l&&e({inputBuy:String(xa(n,l,a===ia.RUB)||"")})},Sa=(e,t)=>(n,a,r)=>{e({inputBuy:pa(n),selectSell:r});const l=t.find((e=>e.code===r))?.sell||t.find((e=>e.code===a))?.buy;l&&e({inputSell:String(xa(n,l,a===ia.RUB)||"")})},$a={address:"Москва, ул.Ленина д.28",distance:"6км"},Ta=u((({className:e="",context:t,title:n="Курсы обмена валют",button:a,...r})=>{const l=function(){const{data:e}=Xt(aa,na),t=e?.hits?.hits?.map((e=>e._source))||[];return t.length?la(t):t}(),i=l.filter((e=>e.buy));i.unshift({code:ia.RUB});const s=l.filter((e=>e.sell));return s.push({code:ia.RUB}),m(g,{context:t,className:`bg-white text-primary-text font-sans p-9 box-border ${e}`,...r,children:m(De,{context:t,title:m(N,{headingType:"h4",title:n,className:"whitespace-pre-wrap text-h4"}),children:h("div",{className:"flex",children:[h("div",{className:"mr-14 pt-4",children:[l?m(ma,{className:"mb-[30px]",exchangeCurrencyItems:l}):null,m(ua,{...$a})]}),l.length&&i.length&&s.length?m(wa,{className:"grow",context:t,currencyRatesBuy:i,currencyRatesSell:s,button:a}):null]})})})})),Da={"bg-white":"normal",transparent:"white"},Ba={"bg-white":"text-primary-main",transparent:"text-white"},Ra={"bg-white":"text-primary-text",transparent:"text-white"},Va=u((({className:e="",href:t,logo:n,children:a=n?.title,targetBlank:r,bgColor:l="bg-white",hideTitle:i})=>h("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"/",target:r?"_blank":"_self","aria-label":n?.title||"Россельхозбанк",children:[m(B,n?.image?.src?{image:n.image,className:Ba[l],width:"40",height:"45",asSVG:!0}:{image:{icon:"LogoIcon",iconVersion:Da[l]},className:`${Ba[l]} w-10`,width:"40",height:"45",asSVG:!0}),i?null:Aa(a,l,n?.title)]}))),Aa=(e,t,n)=>m("span",{className:`${Ra[t]} font-medium ml-2.5`,children:e||n||"Россельхозбанк"}),Ma=u((({className:e,isMobile:t=!1})=>{const{term:n,setTerm:r}=(()=>{const[e,t]=a("");return{term:e,setTerm:e=>t(e)}})(),l=t?"text-s":"text-l-light",i=t?" placeholder-transparent":"h-full",s=t?"some search":void 0;return h("form",{className:`font-sans relative ${e}`,children:[h("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[m("div",{className:t?"w-[20px] h-[20px]":"w-[24px] h-[24px]",children:m(B,{image:"LoupeIcon",width:"24",height:"24"})}),n?null:m("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${l}`,children:"Поиск по сайту"})]}),m("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-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text ${i}`,value:n,onChange:e=>r(e.target.value),type:"text",name:"search-bar-input",placeholder:s}),t?m("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(),r("")},children:m(B,{image:"CloseIcon",width:"24",height:"24"})}):m(fe,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-1 right-1",onClick:e=>{e?.preventDefault(),console.log("click")},children:m("div",{className:"text-s px-9 py-2.5",children:"Найти"})})]})})),Pa=u((({className:e=""})=>m(Ma,{className:e}))),ja=u((({className:e="",items:t,hasButton:n,context:a})=>{const r=a.useRouter(),{handlerDecorator:l}=a;return h("div",{className:e,children:[t?.length?t.map(La):null,n?m(fe,{version:"primary",className:"mb-6 w-full",...se({router:r,handlerDecorator:l},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),La=(e,t)=>{const{type:n,text:a,description:r}=e;return h("div",{className:"mb-4",children:[m("div",{children:_a(n,a)}),m("div",{className:"mt-1 text-s-light text-secondary-text",children:r})]},String(t))},_a=(e,t="")=>{switch(e){case"tel":return m("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Ua(t)}`,children:t});case"email":return m("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return m("span",{children:t})}},Ua=e=>e.replaceAll(/\D/g,""),Ga=u((({className:e="",index:t,text:n,href:a,target:r,onClick:l})=>m("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:a,target:r,onClick:l,children:n||`Документ ${t}`}))),Oa=u((({links:e,className:t="",context:n})=>{const a=n.useRouter(),{handlerDecorator:r}=n;return m("div",{className:t,children:e?.length?m("div",{className:"flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider",children:e.map(((e,t)=>m(Ga,{index:t,className:"text-l-light max-w-[292px]",...se({router:a,handlerDecorator:r},e)},String(t))))}):null})})),Ea=e=>t=>e?.href===t?.href,Fa=(e,t)=>{return(a=e,r=t,(a||[]).map((e=>r?.find(Ea(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(Ea(e))))));var n,a,r};function Wa(){const{data:e}=Xt(`/wcms-resources/${o.SITEMAP||"sitemap"}.json`,qt);return e||{}}const za=u((({className:e="",items:t,context:n})=>{const a=Wa(),r=Fa(a.topItems,t),l={router:n.useRouter(),handlerDecorator:n.handlerDecorator};return m("div",{className:`flex flex-grow items-start justify-between gap-[54px] xl:gap-5 ${e}`,children:r?.map(((e,t)=>Ha(e,t,l)))})})),Ha=(e,t,{router:n,handlerDecorator:a})=>{const{text:r,href:l,items:i,target:s}=e;return h("div",{className:"flex flex-col w-1/5 last:w-1/4 gap-3.5",children:[m("a",{className:"block leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:l,target:s||"_self",children:r||`Раздел ${t}`}),i?.map(((e,t)=>m(Ja,{...se({router:n,handlerDecorator:a},e),index:t},String(t))))]},String(t))},Ja=u((({text:e,href:t,target:n,index:a})=>m("a",{className:"block text-l-light text-secondary-text hover:text-primary-main no-underline",href:t,target:n||"_self",children:e||`Раздел ${a}`}))),Xa=[{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"}],qa=u((({href:e,version:t="primary"})=>{const{icon:n,label:a}=Xa.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};if(!n)return null;return m("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":a,target:"_blank",rel:"noopener noreferrer",children:n?m(B,{image:n,imageClassName:"group-hover:text-white",width:"24",height:"24",asSVG:!0}):null})})),Ka=u((({className:e="",media:t,version:n,context:a,children:r})=>{const l=a.useRouter(),{handlerDecorator:i}=a;return h("div",{className:"font-sans",children:[m("div",{className:`flex gap-2.5 ${e}`,children:t?.map(((e,t)=>m(qa,{version:n,...se({router:l,handlerDecorator:i},e)},String(t))))}),m("span",{className:"text-s-light text-secondary-text",children:r})]})})),Qa=u((({className:e="",index:t,text:n,href:a,target:r,onClick:l})=>m("a",{className:`text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:r,onClick:l,children:n||`Документ ${t}`}))),Za=u((({className:e,links:t,context:n})=>{const a=n.useRouter(),{handlerDecorator:r}=n;return h("div",{className:`${e||""}`,children:[m("div",{className:"pt-5",children:m("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?m("div",{className:"flex justify-start items-start gap-5 pt-2.5",children:t.map(((e,t)=>m(Qa,{index:t,...se({router:a,handlerDecorator:r},e)},String(t))))}):null]})})),Ya="w-[204px]",er=u((({className:e,documents:t,relatedEnterprises:n,contacts:a,socialMedia:r,mobileApps:l,topItems:i,context:s,...o})=>h(g,{tag:"footer",context:s,className:`p-9 bg-white font-sans ${e||""}`,...o,children:[h("div",{className:"flex items-stretch gap-[54px] pb-[30px] xl:gap-8",children:[m(Va,{className:Ya}),m(Pa,{context:s,className:"grow"})]}),h("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[h("div",{className:"w-[204px] flex flex-col shrink-0 overflow-hidden",children:[m(ja,{items:a,context:s,hasButton:!0}),m(Ka,{media:r,context:s,children:"Соцсети"}),m(Ka,{className:"mt-6",media:l,context:s,children:"Мобильное приложение"})]}),m(za,{className:"pt-[3px]",context:s,items:i})]}),m(Oa,{className:"mt-[98px]",links:n,context:s}),m(Za,{links:t,context:s})]}))),tr=u((({context:e,className:t="",title:n,description:a,calendar:r,...l})=>h(g,{className:`font-sans bg-white p-[50px] ${t}`,context:e,...l,children:[m(j,{context:e,className:"!p-0",title:n,description:a,headlineVersion:"M",align:"center"}),r?nr(r):null]}))),nr=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:e.month.length*t+"%"})));return h("div",{className:"w-full flex flex-col justify-center mt-[54px]",children:[m("div",{className:"flex w-full mb-3 text-h6 text-center",children:n.map((e=>ar(e,t)))}),m("div",{className:"flex w-full",children:n.map(((e,t)=>h("div",{className:"pr-[11px] mr-3 border-r border-main-divider last:border-r-0 last:pr-0 last:mr-0",style:{flexBasis:e.flexBasis},children:[m("div",{className:"flex",children:rr(e)}),h("div",{className:"text-s-light text-primary-text mt-3",children:[m("span",{children:e.text})," ",m("span",{className:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},ar=(e,t)=>e.month.map(((e,n)=>m("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),rr=e=>e.month.map((e=>e.image?.src?m("div",{className:"h-[207px] border-r-[1px] pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0",children:m(B,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),lr=(e,t,n=((e,t)=>t.startsWith(e)))=>n(te(e),(e=>(e||"").replace(re,""))(te(ee(e)?t.href:t.pathname))),ir=e=>t=>lr(t.href,e),sr=e=>t=>t.items?.some(ir(e))||lr(t.href,e)||((e,t)=>ne(e)===ne(t.href))(t.href,e),or="font-sans text-s-light",cr=u((({className:e="",text:t,href:n,target:a,active:r,flat:l,onClick:i,children:s,ariaLabel:o,bgColor:c="bg-white"})=>m("a",{className:`${dr(c,r,l)} ${e}`,href:n,target:a,onClick:i,rel:"noopener noreferrer","aria-label":o,children:m("span",{className:mr(c,r,l),children:t||s})}))),dr=(e,t=!1,n=!1)=>{let a="border-transparent";return t&&(a="rounded-md "+("bg-white"===e?"border-primary-main":"border-white")),`${a} inline-block border border-solid bg-transparent text-center no-underline ${n?"":"px-4 py-2"}`},mr=(e,t=!1,n=!1)=>{if("transparent"===e)return`text-white hover:text-primary-hover ${or}`;return`${t?"text-primary-main":(n?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"} ${or}`},hr=s("https://10.80.4.9");const ur=u((({className:e="",children:t,ariaLabel:n})=>m("button",{type:"button",className:`border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${e}`,disabled:!0,"aria-label":n,children:t}))),xr={"bg-white":"text-primary-text hover:text-primary-main",transparent:"text-white"},pr={"bg-white":"text-secondary-light hover:text-secondary-hover",transparent:"text-white"},br={"bg-white":"black",transparent:"white"},gr=u((({className:e,defaultLocation:t="",bgColor:n="bg-white"})=>{const[i,s]=function(e){const[t,n]=a(e);return r((()=>{n(globalThis?.localStorage.getItem("location")||e)}),[e]),[t,l((()=>{hr.getFetcherAddress().then((t=>{const a=t||e;globalThis?.localStorage.setItem("location",a),n(a)}))}),[e])]}(t);return h("div",{className:`flex items-center ${e||""}`,children:[m(cr,{className:"mr-5",flat:!0,href:"#",text:i,ariaLabel:"Местоположение",onClick:s,bgColor:n}),m(cr,{className:"mr-7",flat:!0,href:"#",text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов",bgColor:n}),m(ur,{className:`mr-5 group ${xr[n]}`,ariaLabel:"Поиск по сайту",children:m(B,{image:{icon:"LoupeIcon",iconVersion:br[n]},className:"h-full pointer-events-none",imageClassName:"group-hover:text-primary-hover group-hover:invert-0 pointer-events-none",asSVG:!0})}),m(ur,{className:`${pr[n]} group min-w-[32px] min-h-[32px]`,ariaLabel:"Дополнительные ссылки",children:m(B,{image:{icon:"GridIcon",iconVersion:br[n]},className:"h-full bg-main-divider/20 rounded-full pointer-events-none",imageClassName:"group-hover:text-primary-hover group-hover:invert-0",asSVG:!0})})]})})),fr=e=>(t=[])=>{const n=t?.filter(ir(e));return n?.length?(a=e=>e.href?.length||0,e=>e.reduceRight(((e,t)=>a(e)>a(t)?e:t)))(n):void 0;var a},Nr="absolute left-0 -bottom-3 w-full h-[2px]",vr=u((({className:e="",text:t,href:n,target:a,active:r,onClick:l,children:i,bgColor:s="bg-white",dataItemName:o})=>h("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:n,target:a,onClick:l,"data-item-name":o,children:[m("span",{className:yr(s,r),children:t||i}),r?m("div",{className:wr(s,r)}):null]}))),yr=(e,t=!1)=>{let n="text-white";return"bg-white"===e&&(n=t?"text-primary-main":"text-primary-text hover:text-primary-main"),`${n} font-sans text-l-light`},wr=(e,t=!1)=>t?`${"bg-white"===e?"bg-primary-main":e} ${Nr}`:Nr,Ir={"bg-white":"bg-primary-text",transparent:"bg-white"},Cr=u((e=>{const{menuVisible:t,toggleMenu:n,menuItems:a,bgColor:r,context:l,activeSubItem:i}=e,{useRouter:s,handlerDecorator:o}=l,c=s();return h("div",{className:"absolute w-52 -top-4 right-0 pt-4 z-40 "+(t?"bg-white rounded-md shadow-blue-gray/24":""),children:[m("button",{className:"flex justify-between items-center cursor-pointer h-6 ml-6",onClick:n,"aria-label":""+(t?"Скрыть другие разделы":"Показать другие разделы"),children:Array(3).fill(r).map(Sr)}),m("div",{className:"flex flex-col rounded-md bg-white p-6 pb-2 "+(t?"":"hidden"),"aria-hidden":!t,children:kr({menuItems:a,router:c,handlerDecorator:o,activeSubItem:i})})]})})),kr=({menuItems:e,router:t,handlerDecorator:n,activeSubItem:a})=>e?.map((e=>{return m("a",{...se({router:t,handlerDecorator:n},e),className:"text-l-light pb-4 hover:text-primary-main "+(r=e,r===a?"text-primary-main":""),children:e.text},e.href);var r})),Sr=(e,t)=>m("div",{className:`w-[3px] h-[3px] rounded mr-1 ${Ir[e]}`},String(t)),$r=u((({context:e,subItems:t=[],bgColor:n})=>{const[r,l]=a(!1),i=e.useRouter(),{handlerDecorator:s,IntersectionObserverTag:o}=e,[c,d]=a(t.length),u=t.slice(c),x=fr(i)(t);return h("nav",{className:"relative mt-6",children:[m("div",{className:"overflow-hidden whitespace-nowrap mr-52 pb-3",children:t.map(((e,t)=>{return m(o,{tag:"span",observerCallback:(a=t,e=>{e.length&&(e[0].intersectionRatio<1?d((e=>Math.min(e,a))):d((e=>Math.max(e,a+1))))}),observerOptions:{threshold:1},children:m(vr,{className:"mr-8 "+(c-1<t?"invisible":""),active:e===x,...se({router:i,handlerDecorator:s},e),bgColor:n})},String(t));var a}))}),u.length?m(Cr,{context:e,activeSubItem:x,menuVisible:r,toggleMenu:()=>l(!r),menuItems:u,bgColor:n}):null]})})),Tr={"bg-white":"bg-main-divider",transparent:"bg-main-divider opacity-30"},Dr=u((({className:e="",defaultLocation:t="Москва",showSubMenu:n=!0,bgColor:a="bg-white",context:r,topItems:l,logo:i,...s})=>{const o=r.useRouter(),c=Wa(),{handlerDecorator:d}=r,u=Fa(c.topItems,l),[x]=u,p=n?u.find(sr(o))||x:null,b=u.map(((e,t)=>m(cr,{active:e===p,...se({router:o,handlerDecorator:d},e),"aria-label":e.text,bgColor:a},String(t))));return m(g,{tag:"header",context:r,className:`pt-6 pb-5 px-20 ${a} ${e}`,...s,children:h("div",{className:"container",children:[h("div",{className:"flex items-center",children:[m(Va,{className:"mr-8",bgColor:a,logo:i}),b,m(gr,{className:"ml-auto",defaultLocation:t,bgColor:a})]}),m("div",{className:`mt-6 h-[1px] ${Tr[a]}`}),n&&p?.items?.length?m($r,{context:r,subItems:p.items,bgColor:a}):null]})})})),Br=u((({className:e="",cards:t=[],button:n})=>{const[r,l]=a(0),[i,s]=a(0),o=t?.length??0,c=t?.length>2&&o>i+2,d=o===i+2,u=i>0,x=t[r]?.href;return h("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[h("div",{className:"relative overflow-hidden",children:[o?Rr({tabsShift:i,cards:t,activeSlideIndex:r,isLastShift:d,setActiveSlideIndex:l}):null,Ke({handler:[()=>s(i-1),()=>s(i+1)],isShown:[u,c],btnClass:["left-[50px]","right-[50px]"],className:"top-[62px]"}),u?m("div",{className:"absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white"}):null,c?m("div",{className:"absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white"}):null]}),m(fe,{className:"w-[240px] text-center",version:"primary",...n,href:x})]})}));function Rr({tabsShift:e,cards:t,activeSlideIndex:n,isLastShift:a,setActiveSlideIndex:r}){const l=a?460*e-240:460*e,i=t.length>2?"justify-start":"justify-center";return m("div",{style:{transform:`translateX(-${l}px)`},className:"duration-1000 px-[50px]",children:m("div",{className:`w-full flex flex-nowrap gap-3.5 pb-12 ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:n,onClick:a}){const r=t===n;return h("button",{type:"button",onClick:a,className:"p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative "+(r?"shadow-dark-blue/42 border-primary-main":"ease-in duration-300 border-main-stroke"),children:[e?.icon?m(B,{className:"p-6 rounded-full bg-secondary-light mr-[30px]",image:e.icon,width:"108",height:"108"}):null,h("div",{className:"flex gap-3.5",children:[e?.sum?Vr("страховая сумма",e.sum):null,e?.fee?Vr("страховой взнос",e.fee):null]}),Ar(r)]},String(t))}({slide:e,i:t,activeSlideIndex:n,onClick:()=>r(t)})))})})}function Vr(e,t){return h("div",{className:"flex flex-col text-left whitespace-pre",children:[h("span",{className:"text-h6",children:[q(t)," ₽"]}),m("span",{className:"text-secondary-text text-l mt-1",children:e})]})}function Ar(e){return e?m(B,{className:"h-[24px] w-[24px] min-w-[24px] min-h-[24px] absolute right-4 top-4",image:"DoneIcon",width:"24",height:"24"}):null}const Mr=u((({className:e="",context:t,title:n,insuranceTabs:r=[],button:l,...i})=>{const[s,o]=a(0);return h(g,{context:t,className:`box-border py-[50px] overflow-hidden relative font-sans w-100 bg-white ${e}`,...i,children:[n?m(N,{className:"text-center mb-8",title:n,headingType:"h3"}):null,r?.length>1?m("div",{className:"p-1.5 bg-secondary-light w-fit mx-auto mb-7 rounded-md",children:r.map(((e,t)=>function({title:e,i:t,activeSlideIndex:n,onClick:a}){return m("button",{type:"button",onClick:a,"aria-label":e,className:"box-border px-4 py-3 text-m-light "+(t===n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,activeSlideIndex:s,onClick:()=>o(t)})))}):null,m("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Pr({context:t,className:e,insuranceTabs:r,button:l})})]})})),Pr=({insuranceTabs:e,button:t,context:n,className:a=""})=>{const r=e?.map((e=>e.cards));return r?.length?r.map(((e,r)=>m(Br,{context:n,className:a,button:t,cards:e},String(r)))):null};const jr=u((({className:e="",context:t,title:n="Мобильное приложение",qr:a,buttons:r,version:l="primary",items:i,image:s,headingType:o="h4",...c})=>{const d="primary"===l?"text-primary-text":"",u="secondary"===l?"p-3.5 min-w-[120px]":"min-w-[92px]",x=r?.map((e=>({...e,className:"min-w-[168px]"})));return h(g,{context:t,className:`flex justify-between font-sans p-9 box-border relative min-h-[320px]\n ${Oe(e)}\n ${W[l]}\n ${e}`,...c,children:[m(De,{context:t,className:"z-[1]",title:n?m(N,{headingType:o,as:"h3",title:n,className:`whitespace-pre-wrap max-w-[509px] mb-6\n ${d}`}):null,buttons:r?.length?m(ye,{context:t,buttons:x,className:"flex gap-4"}):null,children:h("div",{className:"flex flex-1 items-center",children:[a?.src?m("div",{className:`flex justify-center mr-5 bg-white rounded-md ${u}`,children:m(B,{className:"w-fit",image:a})}):null,Lr(l,i)]})}),s?.src?m("div",{className:"absolute right-0 bottom-0",children:m(B,{image:s})}):null]})})),Lr=(e,t)=>t?.length?m(Te,{items:t,itemClassName:"text-l-light mb-2 last:mb-0",version:"primary"===e?"tile":"tile-white"}):m("span",{className:"text-m-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),_r=u((({className:e,text:t,onClick:n,href:a,target:r,isActive:l})=>m("a",{className:`bg-inherit no-underline px-4 py-2.5 cursor-pointer rounded text-s border border-solid hover:text-primary-main ${e||""} ${l?"border-primary-main text-primary-main":"border-white text-secondary-text"}`,onClick:n,href:a,target:r,children:t}))),Ur=u((({className:e,context:t,title:n,buttons:a,...r})=>{const l=t.useRouter(),{handlerDecorator:i}=t,s=fr(l)(a);return h(g,{context:t,className:`font-sans text-primary-text rounded-[40px] flex items-center justify-between ${e||""}`,...r,children:[m("h2",{className:"text-xl font-medium m-0",children:n}),a?.length?m("div",{className:"flex rounded-md overflow-hidden bg-white",children:a.filter((({text:e})=>e)).map(((e,t)=>m(_r,{className:"first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md",isActive:e===s,...se({router:l,handlerDecorator:i},e)},String(t))))}):null]})})),Gr=u((({className:e="",context:t,title:n,servicesList:a,anchor:r=""})=>h(g,{context:t,id:r,className:`font-sans bg-white p-12 flex flex-col ${e}`,children:[n?m(N,{headingType:"h5",className:"mb-2.5",title:n}):null,a?.length?a.map(Or):null]}))),Or=(e,t)=>h("li",{className:"flex mb-2.5 list-none",children:[e.icon?m(B,{className:"mr-[14px] max-w-6 max-h-6",width:"24px",height:"24px",asSVG:!0,image:e.icon}):null,e.text?m("span",{className:"text-l-light",children:e.text}):null]},`list_item_${String(t)}`),Er="transition-all duration-300 max-h-0 overflow-hidden",Fr=u((({blocks:e=[],hiddenBlocksNum:t=0,foldButtonClasses:n,foldButtonLabel:r,foldButtonDataTheme:l,isUnfolded:i,containerClasses:s,render:o=(e=>e)})=>{const c=Et(t,0,e.length),{icon:d,handleToggle:u,isActive:x}=(({initialState:e=!1})=>{const[t,n]=a(e);return{icon:t?"ArrowUpIcon":"ArrowDownIcon",handleToggle:e=>{const a=e.currentTarget;if(!a)return;n(!t);const r=a.previousSibling.getElementsByClassName(Er)[0];r.style.maxHeight=r.style.maxHeight?"":`${r.scrollHeight}px`},isActive:t}})({initialState:i}),p=n||"border-none bg-primary-main hover:bg-primary-hover px-0 py-5 mb-[1px] w-full font-sans text-white text-h4 flex justify-center cursor-pointer",b=x?"Скрыть":r;return e?h("div",{children:[Wr(e,o,{blocksToHide:c,isActive:x,containerClasses:s}),t?h("button",{className:p,"data-theme":l,onClick:u,children:[m("span",{className:"pr-3",children:b}),d?m(I,{className:"my-auto",name:d,iconVersion:"white",width:"20",height:"20",asSVG:!0}):null]}):null]}):null})),Wr=(e,t,{blocksToHide:n,isActive:a,containerClasses:r=""})=>{const l=e.slice(0,e.length-n),i=n>0?e.slice(-n):[];return t(h("div",{children:[l,m("div",{className:`${Er} ${r}`,children:i})]}),a)},zr=u((({label:e,blocks:t,context:n,dataTheme:a,isUnfolded:r})=>{const l=mt({context:n,blocks:t});return m("div",{className:"border-0 border-b border-solid border-main-divider",children:t?.length?m(Fr,{foldButtonDataTheme:a,hiddenBlocksNum:t?.length,blocks:l,isUnfolded:r,context:n,foldButtonLabel:e,containerClasses:"grid grid-cols-12 gap-1 border-box",render:e=>m(Hr,{children:e})}):null})})),Hr=u((({children:e})=>m("div",{className:"box-border",children:e}))),Jr=u((({blockItems:e,colorPalette:t,context:n,className:a="",...r})=>m(g,{context:n,className:`font-sans text-primary-text ${a}`,...r,children:e?.length?m("div",{className:"box-border1",children:e.map(((e,a)=>m(zr,{...e,dataTheme:t,context:n},`BlockItem${a}`)))}):null})));function Xr(e=""){const t=Ge(e);return t<=4?"S":t<=8?"M":"L"}const qr=u((({className:e,context:t,title:n,description:a="Блок в разработке...",...r})=>h(g,{context:t,className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${Ee(e)} ${Oe(e)} `,...r,children:[m(j,{context:t,className:"!p-0 max-w-[600px]",title:n,description:a,headlineVersion:Xr(e)}),m("figure",{className:"m-0 min-w-[80%]",children:Kr()})]}))),Kr=(e=3)=>Zr(100,e).map((e=>Math.floor(e))).map(Qr),Qr=(e,t)=>m("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),Zr=(e,t)=>[e].concat(t>0?Zr(e/1.618,t-1):[]),Yr={primary:{title:"text-secondary-text",text:"text-secondary-text"},secondary:{title:"text-white",text:"text-white/80"}},el=u((({className:e="",context:t,slides:n=[],version:r="primary",...l})=>{const i=n.map((e=>e.nav)),s=n.map((e=>e.productBlock)),[o,c]=a(0);return h(g,{context:t,className:`box-border pt-[50px] overflow-hidden relative font-sans w-100 ${e}\n ${W[r]}`,...l,children:[m("div",{className:"flex duration-1000 pb-14",style:{transform:`translateX(-${o}00%)`},role:"list",children:s.map(((e,n)=>function(e,t,n){const{version:a}=e,r=a?Yr[a].title:"";return m("section",{className:"box-border relative flex grow-0 shrink-0 basis-full",role:"listitem",children:m("div",{className:"flex grow",children:m(Re,{className:`pl-[50px] z-10 ${r}`,context:n,textBlockClassName:"mb-[154px]",...e,headlineVersion:"XXL"})})},String(t))}({...e,version:r},n,t)))}),m("div",{className:"flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border h-28",children:i.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:n,onClick:a,version:r}){const l=t===n,i=l?"bg-white shadow-dark-blue/42 w-[354px] min-w-[354px] border-none":`min-w-[277px] hover:py-[26px] hover:py-[26px] ease-in duration-300 bg-white/10\n ${W[r]}`,s=l?"text-primary-text text-h6":`text-l ${Yr[r].title}`,o=l?"text-secondary-text text-m-title-xs mt-2.5":`text-m mt-1.5 ${Yr[r].text}`,c="secondary"===r?"border-white/50":"border-black/50";return m("button",{type:"button",onClick:a,"aria-label":e?.title,className:`box-border font-sans relative overflow-hidden border border-white/50 cursor-pointer text-left mx-1 grow basis-0 pt-5 pb-[23px]\n ${i} ${c}\n `,children:h("div",{className:"border-0 px-6",children:[m("div",{className:`font-medium ${s}`,children:e?.title}),m("div",{className:`text-secondary-text ${o}`,children:e.description})]})},String(t))}({slide:e,i:t,activeSlideIndex:o,onClick:()=>c(t),version:r})))})]})}));const tl=u((({className:e="",context:t,title:n="Акции и спецпредложения",date:a,description:r,buttons:l=[],version:i="primary",...s})=>m(g,{context:t,className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${W[i]} ${Ee(e)} ${Oe(e)} `,...s,children:m(De,{context:t,title:n?m(j,{context:t,title:n,className:"!p-0 max-w-[600px]",headlineVersion:Xr(e),bgColorHeadline:i,align:"left",as:"h2"}):null,buttons:l?.length?m(ye,{context:t,buttons:l,className:"flex gap-3"}):null,children:h("div",{className:"mt-1.5",children:[a?m("div",{className:"text-s mb-2",children:nl(a)}):null,m("div",{className:"text-l",children:r})]})})})));function nl(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const al=u((({context:e,className:t="",title:n,description:a,items:r,image:l,version:i,socialMedia:s})=>{const o=n?m(N,{headingType:"h5",as:"h3",className:"mb-3.5 z-10",title:n}):null,c=l?.src?m(B,{className:"absolute bottom-0 right-0 m-0",image:l}):null;return m("section",{className:`relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${t}`,role:"listitem",children:m(De,{context:e,className:"flex justify-between",title:o,image:c,children:h("div",{className:"h-full flex flex-col justify-between",children:[a?m(P,{className:"mb-2",description:a}):null,r?.length?m(Te,{className:"text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]",items:r,version:i}):null,s?m(Ka,{className:"pt-10 pb-0",media:s,version:i,context:e}):null]})})})})),rl="absolute top-0 bottom-0 w-[84px]",ll=u((({context:e,recommendations:t=[],className:n="",title:r,version:l,...i})=>{const[s,o]=a(0),c="secondary"===l?"border-white/50":"border-main-stroke";return h(g,{context:e,className:`relative font-sans p-9 overflow-hidden text-center ${"secondary"===l?"bg-primary-main text-white":"bg-white text-primary-text"} ${n}`,...i,children:[r?m(N,{headingType:"h3",className:"mb-6",title:r}):null,h("div",{children:[m("div",{className:"flex duration-1000 gap-3.5",style:{transform:`translateX(-${525*s}px)`},role:"list",children:t?.length?t.map(il({context:e,version:l,className:c})):null}),sl({cardsCount:t.length,activeCardIndex:s,setActiveCardIndex:o})]}),m("div",{className:`${rl} left-0 ${"secondary"===l?"bg-opacity-from-main":"bg-opacity-from-white"}`}),m("div",{className:`${rl} right-0 ${"secondary"===l?"bg-opacity-to-main":"bg-opacity-to-white"}`})]})})),il=({context:e,version:t,className:n})=>(a,r)=>m(al,{context:e,...a,version:t,className:n},String(r)),sl=({cardsCount:e,activeCardIndex:t,setActiveCardIndex:n})=>{const a=e>2;return m("div",{children:Ke({handler:[()=>n(t-1),()=>n(t+1)],isShown:[a&&t>0,a&&e-t>2],btnClass:["left-8","right-8"],className:"top-1/2 mt-3"})})};const ol=u((({data:e,fieldLabel:t,fieldValue:n,selected:a,placeholder:r="Выберите значение",setSelected:l,label:i})=>h("div",{children:[m("span",{className:"block text-m-light mb-2",children:i}),h(Na,{className:"h-14 border border-gray p-4 rounded-md text-s w-full cursor-pointer "+(a?"":"text-secondary-text"),value:a,onChange:e=>l(e),children:[m(va,{value:"",children:r}),e.map(((e,a)=>m(va,{value:e?.[n||t],children:e?.[t]},String(a))))]})]}))),cl=u((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:a=[],selectedBranch:r,onSelectedBranch:l})=>h("div",{className:"flex justify-between mb-6",children:[m("div",{className:"w-full mr-4",children:m(ol,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Город"})}),m("div",{className:"w-full",children:m(ol,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:r,setSelected:l,label:"Отделение",placeholder:"Выберите отделение"})})]}))),dl=u((({name:e,text:t,value:n,checked:a,onChange:r,className:l})=>m("div",{className:l,children:h("label",{className:"flex items-center relative cursor-pointer",children:[m("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border-2 border-primary-main rounded-full cursor-pointer after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main",type:"radio",value:n,name:e,checked:a,onChange:r}),t?m("span",{className:"font-sans ml-3 cursor-pointer",children:t}):null]})}))),ml=u((()=>{const[e,t]=a("option1"),n=e=>t(e.target.value);return h("div",{children:[m(dl,{className:"mb-2",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===e,onChange:n}),m(dl,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===e,onChange:n})]})})),hl=["От 1 дня","До 365 дней"],ul=u((({days:e,setDays:t})=>h("div",{className:"mb-6",children:[m("span",{className:"block text-m-light mb-[3px]",children:"Срок аренды"}),m(Ot,{min:1,max:365,value:e,items:hl,onChange:t})]}))),xl=u((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:a=[],selectedBoxSize:r,onSelectedBoxSize:l})=>h("div",{className:"flex justify-between mb-6",children:[m("div",{className:"mr-4 w-full",children:m(ol,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),m("div",{className:"w-full",children:m(ol,{data:a,fieldLabel:"safeBoxCasesSize",selected:r,setSelected:l,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),pl=u((({days:e,tariffs:t=[]})=>{const n=gl(e,t);return h("div",{className:"flex flex-col justify-between",children:[h("div",{className:"flex",children:[bl("Аренда за",e,"mr-11"),bl("Цена",n+" ₽")]}),h("div",{className:"bg-primary-main px-10 pt-10 pb-4 text-center",children:[m(B,{image:{icon:"PackA4Icon"},width:"290",height:"257",asSVG:!0}),h("span",{className:"text-s-light text-white opacity-80 mt-2 inline-block",children:["На рисунки изображена пачка",m("br",{})," листов формата А4"]})]})]})})),bl=(e,t,n="")=>h("div",{className:n,children:[m("span",{className:"block text-m-light mb-1",children:e}),m("span",{className:"text-h3",children:t})]}),gl=(e,t)=>{const n=fl(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},fl=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},Nl=u((({regions:e})=>{const[t,n]=a(""),[l,i]=a([]),[s,o]=a(""),[c,d]=a(""),[u,x]=a(""),[p,b]=a(26);r((()=>{n(vl(e))}),[e]),r((()=>{t?async function(e){try{const t=await fetch(`/api/v1/safeboxes?regionCode=${e}`,{headers:{"Content-Type":"application/json"}}),n=await t.json();return Promise.resolve(n)}catch(e){return console.error(e),Promise.reject()}}(t).then((e=>{i(e)})):i([]),o(""),d(""),x("")}),[e,t]);const g=yl(l,s),f=wl(g?.safeBoxCaseVolumes),N=Il(g?.safeBoxCaseVolumes,c)?.safeBoxCases,v=Cl(N,u);return h("div",{className:"flex justify-between align-top mb-6",children:[h("div",{className:"flex-1 mr-9",children:[m(cl,{regions:e,selectedRegion:t,onSelectedRegion:n,branches:l,selectedBranch:s,onSelectedBranch:e=>{o(e),d(""),x("")}}),m(ul,{days:p,setDays:b}),m(xl,{caseVolumes:f,selectedCaseVolume:c,onSelectedCaseVolume:e=>{d(e),x("")},safeBoxCases:N,selectedBoxSize:u,onSelectedBoxSize:x}),m("span",{className:"text-secondary-text text-l-light",children:"Тип договора"}),h("div",{className:"flex justify-between items-center mt-5",children:[m(ml,{}),m(fe,{text:"Офисы на карте",version:"primary"})]})]}),m(pl,{days:p,tariffs:v})]})})),vl=e=>e?.find((e=>"Москва"===e.name))?.code||"",yl=(e,t)=>e.find((e=>e.branchCode===t)),wl=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Il=(e,t)=>e?.find((e=>e.volume===t)),Cl=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs;const kl=u((({title:e,context:t,className:n="",...a})=>{const r=function(){const{data:e}=Xt("/api/v1/admin/regions",qt);return e||[]}();return h(g,{context:t,className:`bg-white px-8 py-12 ${n}`,...a,children:[e?m(N,{title:e,headingType:"h3",as:"h2",className:"mb-2.5 text-center"}):null,m(Nl,{regions:r}),m("p",{className:"text-s-light text-secondary-text",children:"Аренда СЯ, в случае проведения процедуры купли-продажи, с использованием наличных денег или процедуры ипотечной сделки"})]})})),Sl=e=>Boolean(e?.icon||e?.src),$l={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"}},Tl=u((({className:e="",showLines:t=!0,steps:n=[],button:a,version:r="primary",context:l,...i})=>{const s=l.useRouter(),{handlerDecorator:o}=l,{title:c}=i,d=$l[r],u=n.length>3,x=(e=>e?"":"opacity-0")(t),p=c?"mt-9":"";return h(g,{className:["box-border font-sans text-primary-text bg-white",u?"px-20":"px-[70px]","py-[50px] flex flex-col items-center",d.background,d.title,e].join(" "),context:l,...i,children:[c?m(N,{headingType:"h2",className:"max-w-[752px] text-center",title:c}):null,n?.length?h("div",{className:`box-border ${p}`,children:[m("div",{className:"flex items-center px-[88px]",children:ce(m("div",{className:`h-0.5 w-full bg-secondary-light ${x}`}))(n.map(Dl(d)))}),m("div",{className:"flex justify-between "+(u?"gap-x-3":"gap-x-[101px]"),children:n.map(Bl({styleMap:d,isMainButton:Boolean(a?.text),version:r,router:s,handlerDecorator:o}))})]}):null,a?.text?m(fe,{className:"mt-8 w-full max-w-[240px]",version:"primary",...se({router:s,handlerDecorator:o},a)}):null]})})),Dl=e=>({icon:t},n)=>m("div",{className:"flex flex-col items-center text-center",children:m("div",{className:`h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center\n ${e.iconBackground} ${e.title}`,children:Sl(t)?m(B,{image:t,width:"48",height:"48",asSVG:!0}):m("span",{className:`text-h4 ${e.iconText}`,children:n+1})})},String(n)),Bl=({styleMap:e,isMainButton:t,version:n,router:a,handlerDecorator:r})=>(l,i)=>{const s=l?.label?"mt-2":"mt-4";return h("div",{className:"flex flex-col items-center justify-between text-center relative w-[276px]\n whitespace-pre-line overflow-hidden",children:[l?.label?m("div",{className:"text-xl m-0 mt-4",children:l.label}):null,l?.description?m("div",{className:`text-l-light ${e.description} ${s}`,children:l.description}):null,l.button?.text&&!t?m(fe,{className:"box-border mt-8 py-3 h-12 w-full max-w-[240px]",...se({router:a,handlerDecorator:r},l.button),version:n,children:l.button.text}):null]},String(i))};const Rl="h-12 flex-1 flex items-center justify-center cursor-pointer",Vl="group bg-white",Al="font-sans text-m",Ml="text-secondary-text group-hover:text-primary-main",Pl=(e,t)=>m("h3",{className:`${Al} ${t?"text-white":Ml}`,children:e}),jl=(e,t)=>m("div",{className:"min-w-[22px] w-[22px] h-[22px] rounded-full text-xs ml-2 "+(t?"bg-white/30 text-white":"bg-main-divider text-secondary-text group-hover:text-primary-main"),children:e}),Ll=({onClick:e,currentTab:t,showCounter:n,page:a,context:r})=>(l,i)=>{const{useRouter:s,handlerDecorator:o}=r,c=s(),d=l.type;if("group"!==d&&"link"!==d)return null;switch(d){case"group":return(({onClick:e,currentTab:t,showCounter:n,page:a})=>(r,l)=>{const i=t===r,s=r.ref?a?.blocks?.filter((e=>e?.labels?.includes(r.ref))).length:a?.blocks?.length;return m("div",{className:`${Rl} ${i?"bg-primary-main":Vl}`,role:"tab","aria-selected":i,onClick:()=>e(r),children:h("div",{className:"flex flex-1 items-center justify-center",children:[r?.title?Pl(r.title,i):null,n&&s?jl(s,i):null]})},String(l))})({onClick:e,currentTab:t,showCounter:n,page:a,context:r})(l,i);case"link":return(({text:e,onClick:t,href:n,target:a="_self",i:r})=>m("a",{className:`${Rl} group bg-white`,target:a,href:n,onClick:t,children:m("span",{className:`${Al} ${Ml}`,children:e})},String(r)))({...se({router:c,handlerDecorator:o},l),i:i});default:!function(e){throw new Error(e)}(d)}},_l=u((e=>{const{context:t,className:n,tabs:l,page:i,showCounter:s}=e,[o,c]=a(l?l[0]:void 0);r((()=>{if("group"===o?.type)return p.inst.subject("tab",{label:o.ref})}),[o]);return m(g,{context:t,className:`mb-2 box-border flex gap-x-1 ${n}`,role:"tablist",children:l?.map(Ll({onClick:e=>{"group"===e?.type&&(p.inst.fire("tab",{type:e.type,label:e.ref}),c(e))},currentTab:o,page:i,showCounter:s,context:t}))})})),Ul=u((({isOpen:e,dataUrl:t,pdfUrl:n,rowIdx:a,cellIdx:r,fieldIdx:l})=>h(fe,{version:"primary",onClick:()=>{p.inst.fire("tariffInnerTable",{dataUrl:t,pdfUrl:n,rowIdx:a,cellIdx:r,fieldIdx:l})},className:"w-full flex items-center justify-center rounded-none py-5 ",children:[m("div",{className:"text-h4",children:e?"Скрыть":"Показать ставки по вкладу"}),m(I,{name:e?"ArrowUpIcon":"ArrowDownIcon",className:"ml-3",iconVersion:"white",width:"20",height:"20",asSVG:!0})]}))),Gl=e=>e?.alt||e?.title||y[e?.icon?e.icon:""],Ol={Buttons:({buttons:e})=>e&&e?.length?m("div",{children:e.map((({icon:e,rounded:t,...n},a)=>m(fe,{className:(a>0&&t?"ml-3":"")+" w-12 h-12",ariaLabel:Gl(e),rounded:t,appendLeft:e?.src||e?.icon?m(B,{image:e,width:"24px",height:"24px",asSVG:!0}):null,...n},String(a))))}):null,Img:({image:e})=>e?.src?m(B,{image:e}):null,List:({isDotted:e,...t})=>m(Te,{className:"flex flex-col justify-between items-start text-sm",version:"gray",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>h("div",{children:[e?m("div",{className:"text-h6 font-medium m-0 "+(t?"mb-1":""),children:e}):null,t?m("div",{className:"text-s text-secondary-text",children:t}):null]}),Table:u((e=>{const[t,n]=a(!0);console.log(e);const l=t=>{const a=["rowIdx","cellIdx","fieldIdx"].every((n=>e[n]===t[n]));n(!a)};return r((()=>p.inst.subscribe("tariffInnerTable",l)),[]),t?m(Ul,{...e}):null}))},El=u((({context:e,cells:t,isLastRow:n,rowIdx:a,cellIdx:r})=>m("div",{className:"first:pl-0 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0 "+(n?"border-t-0 rounded-b-md":""),role:"cell",children:t.map(Fl(a,e,r))}))),Fl=(e,t,n)=>(a,r)=>h("div",{className:"Table"===a?.tableCellType?"mx-0.5":"first:pt-5 last:pb-5 pl-10",children:[r>0?m("div",{className:"h-5"}):null,Wl(a,t,{rowIdx:e,cellIdx:n,fieldIdx:r})]},String(r)),Wl=(e,t,n)=>{if(!e)return null;const{tableCellType:a,...r}=e;if(!a||!(a in Ol))return null;return m(Ol[a],{context:t,...r,...n})};async function zl(e){const t=await fetch(e);return await t.json()}const Hl=u((({rows:e})=>{const[t,n]=a(0),r=e?.[0]?.length??0,l=r>3&&r>t+4,i=t>0;return h("div",{children:[e?.map(Jl(t)),Ke({handler:[()=>n(t-1),()=>n(t+1)],isShown:[i,l],btnClass:["right-3 top-24","right-3 top-2"],className:""})]})})),Jl=e=>(t,n)=>{if(!t?.length)return null;const[a,...r]=t,l=[...Array(e).keys()].reduce(((e,t)=>140*(r?.[t]?.cols?.length??1)+e),0);return h("div",{className:"flex border-main-divider border border-t-0 border-x-0 border-solid",children:[m("div",{className:"text-xl-light min-w-[214px] w-[214px] pt-6 pb-5",children:a.data}),m("div",{className:"flex flex-grow overflow-hidden",children:m("div",{className:"flex duration-1000 text-center",style:{transform:`translateX(-${l}px)`},children:r?.map(((t,n)=>h("div",{className:"flex flex-col flex-grow justify-center pt-6 pb-5 odd:bg-main-divider",children:[t?.data?m("div",{className:"text-xl-light mb-3",children:t.data}):null,t?.cols?Xl(t.cols,e):null]},`row${n}`)))})})]},String(n))},Xl=(e,t)=>e?m("div",{className:"flex text-xl-light "+(0===t?"text-secondary-text":""),children:e.map(((e,t)=>m("div",{className:"w-[76px] mx-8",children:e},String(t))))}):null,ql=u((({context:e,activeTabIndex:t,items:n})=>{const[r,l]=a({});return m("div",{children:n.map(((n,a)=>{const i=`activeTabIdx:${t}-tableIdx:${a}`;return h("div",{className:"w-full",children:[h("div",{className:"flex p-4 bg-main-stroke text-xl-light text-center justify-center cursor-pointer relative",onClick:()=>(e=>{l((t=>({...t,[e]:!t[e]})))})(i),children:[n.title,m(B,{image:r[i]?"PlusIcon":"MinusIcon",className:"absolute right-[22px]",width:"24",height:"24"})]}),m("div",{className:"w-full pl-2 overflow-hidden transition-height duration-500 ease-in-out "+(r[i]?"h-0":"h-[243px]"),children:m("div",{className:"relative",children:m(Hl,{context:e,rows:n.rowsData})})})]},i)}))})})),Kl=u((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:a})=>h("div",{className:"flex justify-between w-full pt-2.5 pb-3",children:[e&&e.length>1?m("div",{className:"flex bg-secondary-light p-1 rounded-md",children:e.map(((e,t)=>m("div",{className:"rounded-md text-xl-light px-4 py-3 cursor-pointer "+(t===n?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>a(t),children:e||t+1},e)))}):null,t?h(fe,{href:t,version:"secondary",className:"flex justify-center items-center text-l-light text-primary-main px-8",children:[m(B,{image:"DocDownloadIcon",className:"mr-[10px]",width:"24",height:"24",asSVG:!0}),m("span",{children:"Скачать в PDF"})]}):null]}))),Ql=u((({context:e,dataUrl:t,pdfUrl:n})=>{const{tableData:r}=function(e){const{data:t}=Xt(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),zl);return t||{}}(t),[l,i]=a(0),s=r?.[l]?.items??[],o=r?.map((e=>e.currency??""));return r?h("div",{className:"bg-white z-10",children:[m(Kl,{currencies:o,activeTabIndex:l,setActiveTabIndex:i,linkToPDF:n}),m(ql,{context:e,activeTabIndex:l,items:s}),m(Ul,{context:e,isOpen:!0})]}):null})),Zl=u((({context:e,children:t,rowIdx:n})=>{const[l,i]=a(void 0);return r((()=>p.inst.subscribe("tariffInnerTable",(e=>{i(n===e.rowIdx?{dataUrl:e.dataUrl,pdfUrl:e.pdfUrl}:void 0)}))),[n]),h("div",{className:"self-start flex flex-col",role:"row",children:[m("div",{className:"flex",children:t}),l?m("div",{className:"origin-top animate-expansion",children:m(Ql,{context:e,...l})}):null]})})),Yl=u((({row:{header:e,data:t},activeCardIndex:n,isLastRow:a,context:r,rowIdx:l})=>h(Zl,{context:r,rowIdx:l,children:[m("div",{className:"text-s py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0 "+(a?"":"border-solid"),children:h("div",{className:"flex items-center text-primary-text",role:"cell",children:[e?.icon?m(B,{className:"mr-[14px] max-w-6 max-h-6",image:e.icon,width:"24px",height:"24px",asSVG:!0}):null,e?.title]})}),t?.length?m(On,{activeCardIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>m(El,{cells:e,isLastRow:a,rowIdx:l,cellIdx:t,context:r},String(t))))}):null]}))),ei=u((({className:e="",context:t,title:n,description:r,rowHeaders:l,tariffsColumns:i,hiddenRowsNum:s=0,...o})=>{const[c,d]=a(0),u=i?.map((({data:e})=>e))||[],x=l?.map(((e,t)=>({header:e,data:u.map((e=>e?.[t]||[]))}))),p=u.length,b=Mn({columnsLength:p,colsLengthForScroll:2,activeCardIndex:c,setActiveCardIndex:d}),f=x?.map(((e,n,{length:a})=>m(Yl,{context:t,row:e,isLastRow:n+1===a,activeCardIndex:c,rowIdx:n},String(n))));return h(g,{className:`bg-white font-sans p-[50px] overflow-hidden text-primary-text relative ${p>1?"pr-0":""} ${e}`,context:t,...o,children:[n?m(N,{headingType:"h2",className:"text-center "+(r?"mb-2.5":"mb-9"),title:n}):null,r?m("div",{className:"mb-9 text-center text-l",children:r}):null,x?.length?m(Fr,{blocks:f,hiddenBlocksNum:s,context:t,render:e=>m(ti,{tableArrowScrollControlProps:b,children:e}),foldButtonLabel:"Развернуть"}):null]})})),ti=u((({children:e,tableArrowScrollControlProps:t})=>{const{isScrollAvailable:n}=t;return h("div",{role:"table",children:[h("div",{className:"relative",children:[e,m(Wn,{...t})]}),n?m("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),ni=e=>"Image"===e?.errorContentType&&e?.image?m(B,{className:"mb-7",image:e.image}):"Code"===e?.errorContentType&&e.code?m("div",{className:"text-title-extra gradient-color-text",children:e.code}):null,ai=u((({context:e,className:t="",title:n,subtitle:a,error:r,button:l})=>{const{useRouter:i,handlerDecorator:s}=e,o=i();return h("section",{className:`flex flex-col justify-center items-center ${t}`,role:"listitem",children:[m("div",{className:"flex justify-center mb-7",children:ni(r)}),n?m(N,{headingType:"h1",className:"text-left mb-4",title:n}):null,a?m("div",{className:"text-xl-light text-left mb-7",children:a}):null,l?.text?m(fe,{className:"py-4 px-9",version:l?.version,...se({router:o,handlerDecorator:s},l),children:l.text}):null]})})),ri={Accordion:bt,BenefitsBlock:yt,Bonus:Tt,CardTransfer:In,ComparisonTable:Yn,Calculator:fn,Catalog:Rn,ExchangeRateTile:Ta,Footer:er,Gallery:it,GracePeriod:tr,Header:Dr,Headline:j,InsuranceAmountBlock:Mr,LinkDocs:F,MiniGallery:st,MobileAppTile:jr,PictureText:K,ProductBlock:Pe,ProductGallery:el,ProductTile:ze,PromoTile:tl,OtherProducts:Jr,Recommendation:ll,StepsBlock:Tl,TariffsTable:ei,TextBlock:Le,Tile:Fe,Navigation:Ur,Placeholder:qr,BonusBenefitsBlock:Bt,SafeDepositRental:kl,Tabs:_l,ErrorBlock:ai,OfficeServicesBlock:Gr},li=d();const ii=u((({className:e,onClick:t,ariaLabel:n})=>m("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:si()}))),si=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m("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"}),m("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"})]})},oi=u((({className:e,context:t,...n})=>{const{useRouter:i,handlerDecorator:s=ie}=t,o=function(e){const[t,n]=a(0);return r((()=>{(async()=>{const[t]=await li.getLikeCount(e);n(t?.value||0)})()}),[e]),{likeCount:t,like:l((async()=>{n(await li.like(e))}),[e]),dislike:l((async()=>{n(await li.dislike(e))}),[e])}}(i().pathname);return h(g,{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||""}`,...n,children:[m(ii,{onClick:s(o.like),ariaLabel:"Поставить отметку «лайк»"}),m(ii,{onClick:s(o.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),m("span",{className:"select-none",children:o.likeCount})]})})),ci=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),di=u((({className:e="",context:t,blocksRegistry:n,data:a={},blockDecorator:r=ci})=>{const{style:l,blocks:i,slots:s={},likeControl:o,colorPalette:c="pc"}=a,{header:d}=s;return h("section",{className:`relative ${R(l)} ${e}`,"data-theme":c,children:[d?.blocks?.length?m("div",{className:`${R(d?.style)}`,children:d.blocks.map(((e,l)=>mi({block:e,page:a,blockDecorator:r,blocksRegistry:n,context:t},l)))}):null,i?.length?m("div",{className:"container grid grid-cols-12 gap-1",children:i.map(((e,l)=>mi({block:e,blockDecorator:r,blocksRegistry:n,context:t,page:a},l)))}):null,o?m("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:m(oi,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t},"LikeControl")}):null]})}));function mi({block:e,blockDecorator:t,blocksRegistry:n,context:a,page:r},l){const{type:i}=e;i&&i in n||console.warn(`No block with "${i}" is registered`);const s=n[i||"Placeholder"]||qr;return t({blockClassName:`scroll-mt-12 ${R(e.style)}`,block:e,render:e=>{const{version:t,content:n,anchor:o,labels:c}=e.block;return m(s,{className:e.blockClassName,version:t,context:a,page:r,anchor:o,labels:c,...n},`${i}-${l}`)}},`block-${l}`)}e.Blocks=ri,e.ContentPage=di,e.DaDataAPI=s,e.LikeAPI=d,e.joinList=ce,e.projectSettings=o,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=ae,Object.defineProperty(e,"__esModule",{value:!0})}));