@redneckz/wildless-cms-uni-blocks 0.2.72 → 0.2.75

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 (211) hide show
  1. package/bundle/blocks.schema.json +240 -151
  2. package/bundle/bundle.umd.js +124 -44
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/BaseTile.js +9 -4
  5. package/dist/BaseTile.js.map +1 -1
  6. package/dist/BaseTileContent.d.ts +2 -2
  7. package/dist/BlockContent.d.ts +2 -1
  8. package/dist/Blocks.d.ts +2 -0
  9. package/dist/Blocks.js +4 -0
  10. package/dist/Blocks.js.map +1 -1
  11. package/dist/ComparisonTable/ComparisonTable.d.ts +5 -0
  12. package/dist/ComparisonTable/ComparisonTable.js +34 -0
  13. package/dist/ComparisonTable/ComparisonTable.js.map +1 -0
  14. package/dist/ComparisonTable/ComparisonTableContent.d.ts +37 -0
  15. package/dist/ComparisonTable/ComparisonTableContent.js +2 -0
  16. package/dist/ComparisonTable/ComparisonTableContent.js.map +1 -0
  17. package/dist/ComparisonTable/HeaderCell.d.ts +10 -0
  18. package/dist/ComparisonTable/HeaderCell.js +11 -0
  19. package/dist/ComparisonTable/HeaderCell.js.map +1 -0
  20. package/dist/ComparisonTable/TableCarouselContainer.d.ts +4 -0
  21. package/dist/ComparisonTable/TableCarouselContainer.js +7 -0
  22. package/dist/ComparisonTable/TableCarouselContainer.js.map +1 -0
  23. package/dist/ComparisonTable/TableCell.d.ts +8 -0
  24. package/dist/ComparisonTable/TableCell.js +12 -0
  25. package/dist/ComparisonTable/TableCell.js.map +1 -0
  26. package/dist/ComparisonTable/TableRow.d.ts +10 -0
  27. package/dist/ComparisonTable/TableRow.js +10 -0
  28. package/dist/ComparisonTable/TableRow.js.map +1 -0
  29. package/dist/ComparisonTable/TableRowContainer.d.ts +4 -0
  30. package/dist/ComparisonTable/TableRowContainer.js +6 -0
  31. package/dist/ComparisonTable/TableRowContainer.js.map +1 -0
  32. package/dist/ComparisonTable/constants.d.ts +6 -0
  33. package/dist/ComparisonTable/constants.js +9 -0
  34. package/dist/ComparisonTable/constants.js.map +1 -0
  35. package/dist/ComparisonTable/index.d.ts +3 -0
  36. package/dist/ComparisonTable/index.js +5 -0
  37. package/dist/ComparisonTable/index.js.map +1 -0
  38. package/dist/ExchangeRateTile.js +1 -0
  39. package/dist/ExchangeRateTile.js.map +1 -1
  40. package/dist/Footer/Contacts.js +1 -1
  41. package/dist/Footer/Contacts.js.map +1 -1
  42. package/dist/Footer/SocialMedia.js +4 -1
  43. package/dist/Footer/SocialMedia.js.map +1 -1
  44. package/dist/Gallery.d.ts +1 -1
  45. package/dist/Gallery.js +2 -32
  46. package/dist/Gallery.js.map +1 -1
  47. package/dist/Gallery.mobile.js +1 -1
  48. package/dist/Gallery.mobile.js.map +1 -1
  49. package/dist/GalleryInner.d.ts +7 -0
  50. package/dist/GalleryInner.js +46 -0
  51. package/dist/GalleryInner.js.map +1 -0
  52. package/dist/MiniGallery.d.ts +5 -0
  53. package/dist/MiniGallery.js +7 -0
  54. package/dist/MiniGallery.js.map +1 -0
  55. package/dist/ProductBlockInner.js +3 -3
  56. package/dist/ProductBlockInner.js.map +1 -1
  57. package/dist/TextBlock.js +4 -4
  58. package/dist/TextBlock.js.map +1 -1
  59. package/dist/model/GalleryVersion.d.ts +1 -0
  60. package/dist/{ui-kit/IconButtonProps.js → model/GalleryVersion.js} +1 -1
  61. package/dist/model/GalleryVersion.js.map +1 -0
  62. package/dist/ui-kit/ArrowButton.d.ts +2 -6
  63. package/dist/ui-kit/ArrowButton.js +17 -3
  64. package/dist/ui-kit/ArrowButton.js.map +1 -1
  65. package/dist/ui-kit/Button.d.ts +2 -1
  66. package/dist/ui-kit/Button.js +11 -5
  67. package/dist/ui-kit/Button.js.map +1 -1
  68. package/dist/ui-kit/ButtonProps.d.ts +15 -3
  69. package/dist/ui-kit/IconProps.d.ts +23 -1
  70. package/dist/ui-kit/IconProps.js +24 -0
  71. package/dist/ui-kit/IconProps.js.map +1 -1
  72. package/dist/{Img.d.ts → ui-kit/Img.d.ts} +1 -1
  73. package/dist/{Img.js → ui-kit/Img.js} +0 -0
  74. package/dist/ui-kit/Img.js.map +1 -0
  75. package/dist/ui-kit/SVG.d.ts +2 -0
  76. package/dist/ui-kit/SVG.js +2 -2
  77. package/dist/ui-kit/SVG.js.map +1 -1
  78. package/lib/BaseTile.js +9 -4
  79. package/lib/BaseTile.js.map +1 -1
  80. package/lib/BaseTileContent.d.ts +2 -2
  81. package/lib/BlockContent.d.ts +2 -1
  82. package/lib/Blocks.d.ts +2 -0
  83. package/lib/Blocks.js +4 -0
  84. package/lib/Blocks.js.map +1 -1
  85. package/lib/ComparisonTable/ComparisonTable.d.ts +5 -0
  86. package/lib/ComparisonTable/ComparisonTable.js +32 -0
  87. package/lib/ComparisonTable/ComparisonTable.js.map +1 -0
  88. package/lib/ComparisonTable/ComparisonTableContent.d.ts +37 -0
  89. package/lib/ComparisonTable/ComparisonTableContent.js +2 -0
  90. package/lib/ComparisonTable/ComparisonTableContent.js.map +1 -0
  91. package/lib/ComparisonTable/HeaderCell.d.ts +10 -0
  92. package/lib/ComparisonTable/HeaderCell.js +9 -0
  93. package/lib/ComparisonTable/HeaderCell.js.map +1 -0
  94. package/lib/ComparisonTable/TableCarouselContainer.d.ts +4 -0
  95. package/lib/ComparisonTable/TableCarouselContainer.js +5 -0
  96. package/lib/ComparisonTable/TableCarouselContainer.js.map +1 -0
  97. package/lib/ComparisonTable/TableCell.d.ts +8 -0
  98. package/lib/ComparisonTable/TableCell.js +10 -0
  99. package/lib/ComparisonTable/TableCell.js.map +1 -0
  100. package/lib/ComparisonTable/TableRow.d.ts +10 -0
  101. package/lib/ComparisonTable/TableRow.js +8 -0
  102. package/lib/ComparisonTable/TableRow.js.map +1 -0
  103. package/lib/ComparisonTable/TableRowContainer.d.ts +4 -0
  104. package/lib/ComparisonTable/TableRowContainer.js +4 -0
  105. package/lib/ComparisonTable/TableRowContainer.js.map +1 -0
  106. package/lib/ComparisonTable/constants.d.ts +6 -0
  107. package/lib/ComparisonTable/constants.js +7 -0
  108. package/lib/ComparisonTable/constants.js.map +1 -0
  109. package/lib/ComparisonTable/index.d.ts +3 -0
  110. package/lib/ComparisonTable/index.js +2 -0
  111. package/lib/ComparisonTable/index.js.map +1 -0
  112. package/lib/ExchangeRateTile.js +1 -0
  113. package/lib/ExchangeRateTile.js.map +1 -1
  114. package/lib/Footer/Contacts.js +1 -1
  115. package/lib/Footer/Contacts.js.map +1 -1
  116. package/lib/Footer/SocialMedia.js +4 -1
  117. package/lib/Footer/SocialMedia.js.map +1 -1
  118. package/lib/Gallery.d.ts +1 -1
  119. package/lib/Gallery.js +3 -33
  120. package/lib/Gallery.js.map +1 -1
  121. package/lib/Gallery.mobile.js +1 -1
  122. package/lib/Gallery.mobile.js.map +1 -1
  123. package/lib/GalleryInner.d.ts +7 -0
  124. package/lib/GalleryInner.js +44 -0
  125. package/lib/GalleryInner.js.map +1 -0
  126. package/lib/MiniGallery.d.ts +5 -0
  127. package/lib/MiniGallery.js +5 -0
  128. package/lib/MiniGallery.js.map +1 -0
  129. package/lib/ProductBlockInner.js +3 -3
  130. package/lib/ProductBlockInner.js.map +1 -1
  131. package/lib/TextBlock.js +4 -4
  132. package/lib/TextBlock.js.map +1 -1
  133. package/lib/common.css +1 -1
  134. package/lib/model/GalleryVersion.d.ts +1 -0
  135. package/lib/model/GalleryVersion.js +2 -0
  136. package/lib/model/GalleryVersion.js.map +1 -0
  137. package/lib/ui-kit/ArrowButton.d.ts +2 -6
  138. package/lib/ui-kit/ArrowButton.js +18 -4
  139. package/lib/ui-kit/ArrowButton.js.map +1 -1
  140. package/lib/ui-kit/Button.d.ts +2 -1
  141. package/lib/ui-kit/Button.js +11 -5
  142. package/lib/ui-kit/Button.js.map +1 -1
  143. package/lib/ui-kit/ButtonProps.d.ts +15 -3
  144. package/lib/ui-kit/IconProps.d.ts +23 -1
  145. package/lib/ui-kit/IconProps.js +23 -1
  146. package/lib/ui-kit/IconProps.js.map +1 -1
  147. package/lib/{Img.d.ts → ui-kit/Img.d.ts} +1 -1
  148. package/lib/{Img.js → ui-kit/Img.js} +0 -0
  149. package/lib/ui-kit/Img.js.map +1 -0
  150. package/lib/ui-kit/SVG.d.ts +2 -0
  151. package/lib/ui-kit/SVG.js +2 -2
  152. package/lib/ui-kit/SVG.js.map +1 -1
  153. package/package.json +1 -1
  154. package/src/BaseTile.tsx +17 -5
  155. package/src/BaseTileContent.ts +2 -2
  156. package/src/BlockContent.ts +3 -1
  157. package/src/Blocks.ts +4 -0
  158. package/src/ComparisonTable/ComparisonTable.fixture.tsx +265 -0
  159. package/src/ComparisonTable/ComparisonTable.tsx +126 -0
  160. package/src/ComparisonTable/ComparisonTableContent.ts +43 -0
  161. package/src/ComparisonTable/HeaderCell.tsx +50 -0
  162. package/src/ComparisonTable/TableCarouselContainer.tsx +19 -0
  163. package/src/ComparisonTable/TableCell.tsx +43 -0
  164. package/src/ComparisonTable/TableRow.tsx +44 -0
  165. package/src/ComparisonTable/TableRowContainer.tsx +7 -0
  166. package/src/ComparisonTable/constants.ts +6 -0
  167. package/src/ComparisonTable/index.ts +3 -0
  168. package/src/ContentPage.page.json +463 -1
  169. package/src/ExchangeRateTile.tsx +2 -1
  170. package/src/Footer/Contacts.tsx +1 -0
  171. package/src/Footer/SocialMedia.tsx +9 -5
  172. package/src/Gallery.fixture.tsx +1 -1
  173. package/src/Gallery.mobile.tsx +1 -1
  174. package/src/Gallery.tsx +3 -119
  175. package/src/GalleryInner.tsx +135 -0
  176. package/src/MiniGallery.fixture.tsx +90 -0
  177. package/src/MiniGallery.tsx +10 -0
  178. package/src/ProductBlock.fixture.tsx +1 -1
  179. package/src/ProductBlockInner.tsx +3 -3
  180. package/src/ProductTile.fixture.tsx +1 -1
  181. package/src/TextBlock.fixture.tsx +1 -1
  182. package/src/TextBlock.tsx +6 -4
  183. package/src/Tile.fixture.tsx +1 -1
  184. package/src/common.css +36 -0
  185. package/src/icons/AppleIcon.svg +1 -13
  186. package/src/icons/GlassIcon.svg +1 -0
  187. package/src/icons/PlayMarketIcon.svg +1 -6
  188. package/src/model/GalleryVersion.ts +1 -0
  189. package/src/ui-kit/ArrowButton.tsx +29 -30
  190. package/src/ui-kit/Button.fixture.tsx +33 -5
  191. package/src/ui-kit/Button.tsx +41 -17
  192. package/src/ui-kit/ButtonProps.ts +17 -3
  193. package/src/ui-kit/Icon.fixture.tsx +22 -0
  194. package/src/ui-kit/IconProps.ts +24 -21
  195. package/src/{Img.tsx → ui-kit/Img.tsx} +1 -1
  196. package/src/ui-kit/SVG.tsx +11 -2
  197. package/dist/Img.js.map +0 -1
  198. package/dist/ui-kit/IconButton.d.ts +0 -2
  199. package/dist/ui-kit/IconButton.js +0 -10
  200. package/dist/ui-kit/IconButton.js.map +0 -1
  201. package/dist/ui-kit/IconButtonProps.d.ts +0 -6
  202. package/dist/ui-kit/IconButtonProps.js.map +0 -1
  203. package/lib/Img.js.map +0 -1
  204. package/lib/ui-kit/IconButton.d.ts +0 -2
  205. package/lib/ui-kit/IconButton.js +0 -8
  206. package/lib/ui-kit/IconButton.js.map +0 -1
  207. package/lib/ui-kit/IconButtonProps.d.ts +0 -6
  208. package/lib/ui-kit/IconButtonProps.js +0 -2
  209. package/lib/ui-kit/IconButtonProps.js.map +0 -1
  210. package/src/ui-kit/IconButton.tsx +0 -22
  211. package/src/ui-kit/IconButtonProps.ts +0 -7
@@ -239,13 +239,6 @@
239
239
  return (jsxs("div", { className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, children: [jsx(LikeButton, { onClick: likeService.like, ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u043B\u0430\u0439\u043A\u00BB" }), jsx(LikeButton, { onClick: likeService.dislike, className: "rotate-180", ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u0434\u0438\u0437\u043B\u0430\u0439\u043A\u00BB" }), jsx("span", { className: "select-none", children: likeService.likeCount })] }));
240
240
  });
241
241
 
242
- const Img = JSX(({ className, image }) => (jsxs("picture", { className: `${className || ''}`, children: [image.sources?.length
243
- ? image.sources.map(({ src, format }, index) => (jsx("source", { srcSet: src, type: formatToMimeType(format) }, `${index}_${src}`)))
244
- : null, jsx("img", { src: image.src, alt: image.alt || image.title, title: image.title, ...image?.size })] })));
245
- function formatToMimeType(format) {
246
- return format ? `image/${String(format)}` : undefined;
247
- }
248
-
249
242
  const listStyleMap = {
250
243
  primary: 'bg-primary-main',
251
244
  secondary: 'bg-white',
@@ -266,19 +259,28 @@
266
259
  primary: 'bg-secondary-dark text-secondary-text',
267
260
  secondary: 'bg-secondary-light text-secondary-text',
268
261
  };
269
- const styleButton = 'inline-block rounded-md px-8 py-2 text-center font-sans';
270
- const Button = JSX(({ className, text, href, target, onClick, children, disabled, version = 'primary', ariaLabel, }) => {
262
+ const styleButton = 'inline-block text-center font-sans select-none';
263
+ const Button = JSX(({ className, text, aboveText, appendLeft, href, target, onClick, children, disabled, rounded, version = 'none', ariaLabel, ...rest }) => {
264
+ const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded }));
271
265
  if (disabled) {
272
- return (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: "-1", className: `${styleButton} select-none ${buttonDisabledStyleMap[version]} ${className || ''}`, children: children ? (jsx("div", { children: children })) : (jsx("div", { className: "text-sm font-medium py-1.5", children: text })) }));
266
+ return (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: "-1", className: `${styleButton} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: buttonInner }));
273
267
  }
274
- return (jsx("a", { className: `${styleButton} no-underline ${buttonStyleMap[version]} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, children: children ? (jsx("div", { children: children })) : (jsx("div", { className: "text-sm font-medium py-1.5", children: text })) }));
268
+ return (jsx("a", { className: `${styleButton} cursor-pointer no-underline ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: !href ? 'button' : 'link', ...rest, children: buttonInner }));
269
+ });
270
+ const ButtonInner = JSX(({ text, aboveText, appendLeft, rounded }) => {
271
+ const withoutText = !text && !aboveText && Boolean(appendLeft);
272
+ const buttonInnerClasses = `flex items-center justify-center ${withoutText ? 'h-12 w-12 min-h-12 min-w-12' : `px-8 gap-2 ${aboveText ? 'py-2' : 'py-[13px]'}`} ${rounded ? 'rounded-full' : ''}`;
273
+ return (jsxs("div", { className: buttonInnerClasses, children: [appendLeft ? appendLeft : null, !withoutText ? (jsxs("div", { children: [jsx("div", { className: "text-xxs text-left", children: aboveText }), jsx("div", { className: "text-sm font-medium text-left", children: text })] })) : null] }));
275
274
  });
276
275
 
277
276
  const Icon = JSX(({ className, name, alt = `Icon ${name}`, title = alt, ...imgProps }) => (jsx("img", { className: className, src: `${projectSettings.CDN || ''}icons/${name}.svg`, alt: alt, title: title, ...imgProps })));
278
277
 
279
- const IconButton = JSX((props) => {
280
- return (jsx(Button, { ...props, children: props.icon ? (jsxs("div", { className: "flex items-center", children: [jsx("div", { className: "mr-2", children: jsx(Icon, { name: props.icon, width: "24", height: "24" }) }), jsxs("div", { children: [jsx("div", { className: "text-xxs text-left", children: props.aboveText }), jsx("div", { className: "text-sm font-medium text-left", children: props.text })] })] })) : null }));
281
- });
278
+ const Img = JSX(({ className, image }) => (jsxs("picture", { className: `${className || ''}`, children: [image.sources?.length
279
+ ? image.sources.map(({ src, format }, index) => (jsx("source", { srcSet: src, type: formatToMimeType(format) }, `${index}_${src}`)))
280
+ : null, jsx("img", { src: image.src, alt: image.alt || image.title, title: image.title, ...image?.size })] })));
281
+ function formatToMimeType(format) {
282
+ return format ? `image/${String(format)}` : undefined;
283
+ }
282
284
 
283
285
  var SizeTableClass;
284
286
  (function (SizeTableClass) {
@@ -367,7 +369,7 @@
367
369
  const BaseTile = JSX(({ className, context, title, titleSize, description, children, buttons, image, items, version = 'primary', }) => {
368
370
  const router = context.useRouter();
369
371
  const { handlerDecorator } = context;
370
- return (jsxs("div", { className: `font-sans flex flex-col grow h-full`, children: [title && (jsx(Title, { size: titleSize || getTitleSizeByClassName(className), className: TITLE_CLASSES, children: title })), jsxs("div", { className: "flex grow justify-between", children: [jsxs("div", { className: "flex flex-col justify-between items-start", children: [jsxs("div", { children: [description ? (jsx("div", { className: "font-normal text-base max-w-[600px] mb-5", children: description })) : null, children, items?.length ? renderItems$2(items, version) : null] }), buttons?.length ? (jsx("div", { className: "flex mt-9 gap-3", children: buttons.map((button, index) => renderButton(useLink({ router, handlerDecorator }, button), index)) })) : null] }), image?.src && jsx(Img, { className: "mt-auto ml-7", image: image })] })] }));
372
+ return (jsxs("div", { className: `font-sans flex flex-col grow h-full`, children: [title && (jsx(Title, { size: titleSize || getTitleSizeByClassName(className), className: TITLE_CLASSES, children: title })), jsxs("div", { className: "flex grow justify-between", children: [jsxs("div", { className: "flex flex-col justify-between items-start", children: [jsxs("div", { children: [description ? (jsx("div", { className: "font-normal text-base max-w-[600px] mb-5", children: description })) : null, children, items?.length ? renderItems$1(items, version) : null] }), buttons?.length ? (jsx("div", { className: "flex mt-9 gap-3", children: buttons.map((button, index) => renderButton(useLink({ router, handlerDecorator }, button), index)) })) : null] }), image?.src && jsx(Img, { className: "mt-auto ml-7", image: image })] })] }));
371
373
  });
372
374
  function getTitleSizeByClassName(className = '') {
373
375
  const colSpan = getColSpan(className);
@@ -381,11 +383,15 @@
381
383
  return 'L';
382
384
  }
383
385
  }
384
- function renderItems$2(items = [], version) {
386
+ function renderItems$1(items = [], version) {
385
387
  return (jsx("section", { className: "max-w-[600px]", role: "list", children: items.map((_, i) => (jsx(BlockItem, { className: i ? 'mt-2.5' : '', text: _, version: version }, String(i)))) }));
386
388
  }
387
- function renderButton(button, i) {
388
- return button?.text ? jsx(IconButton, { ...button }, String(i)) : null;
389
+ function renderButton({ icon, ...button }, i) {
390
+ if (!button?.text)
391
+ return;
392
+ if (icon)
393
+ return (jsx(Button, { appendLeft: jsx(Icon, { name: icon, width: "24", height: "24" }), ...button }, String(i)));
394
+ return jsx(Button, { ...button }, String(i));
389
395
  }
390
396
 
391
397
  const tileStyleMap = {
@@ -479,6 +485,7 @@
479
485
  {
480
486
  text: 'Все показатели',
481
487
  href: 'https://cbr.ru/currency_base/daily/',
488
+ version: 'secondary',
482
489
  },
483
490
  ];
484
491
  const ExchangeRateTile = JSX(({ className, context, title }) => {
@@ -497,8 +504,8 @@
497
504
  const currencyNumberFormat = new Intl.NumberFormat('ru', { style: 'currency', currency: 'RUB' });
498
505
  const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
499
506
 
500
- const SVG = JSX(({ className, viewBox, fill = 'none', paths, ...commonOptions }) => {
501
- return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, children: paths.map(({ d, fill, ...options }, i) => (jsx("path", { d: d, fill: fill || 'currentColor', ...commonOptions, ...options }, i))) }));
507
+ const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
508
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill, ...options }, i) => (jsx("path", { d: d, fill: fill || 'currentColor', ...commonOptions, ...options }, i))) }));
502
509
  });
503
510
 
504
511
  const LOGO_PATHS = [
@@ -523,7 +530,7 @@
523
530
  const Contacts = JSX(({ className, items, hasButton, context }) => {
524
531
  const router = context.useRouter();
525
532
  const { handlerDecorator } = context;
526
- return (jsxs("div", { className: `flex flex-col ${className || ''}`, children: [items?.length ? items.map(renderContact) : null, hasButton ? (jsx(Button, { className: "my-4", ...useLink({ router, handlerDecorator }, {
533
+ return (jsxs("div", { className: `flex flex-col ${className || ''}`, children: [items?.length ? items.map(renderContact) : null, hasButton ? (jsx(Button, { version: "primary", className: "my-4", ...useLink({ router, handlerDecorator }, {
527
534
  text: 'Обратная связь',
528
535
  href: '/',
529
536
  target: '_blank',
@@ -598,7 +605,9 @@
598
605
  });
599
606
  const MediaButton = JSX(({ href }) => {
600
607
  const { icon, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
601
- return (jsx("a", { className: "flex items-center justify-center border-solid border border-main-divider rounded-full no-underline outline-none w-9 h-9", href: href, target: "_blank", rel: "noopener noreferrer", "aria-label": label, children: icon && jsx(Icon, { className: "block", name: icon }) /* TODO width & height */ }));
608
+ if (!icon)
609
+ return null;
610
+ return (jsx(Button, { rounded: true, href: href, target: "_blank", rel: "noopener noreferrer", "aria-label": label, className: "border-solid border border-main-divider w-9 h-9 flex items-center justify-center hover:text-primary-main", appendLeft: jsx(Icon, { name: icon }) }));
602
611
  });
603
612
 
604
613
  const TextInformation = JSX(({ className, links, context }) => {
@@ -614,13 +623,35 @@
614
623
  return (jsxs("footer", { className: `${className} px-9 py-10 bg-white`, children: [jsxs("div", { className: "flex items-stretch gap-32 pb-8 xl:gap-8", children: [jsx(Logo, { className: `${LEFT_COL_WIDTH_FULL_HD} ${LEFT_COL_WIDTH_SMALL_DESKTOP}` }), jsx(SearchBar, { context: context, className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-32 xl:gap-8", children: [jsx(Contacts, { className: `${LEFT_COL_WIDTH_FULL_HD} shrink-0 overflow-hidden ${LEFT_COL_WIDTH_SMALL_DESKTOP}`, items: contacts, context: context, hasButton: true }), jsx(Sitemap, { className: "pt-[3px]", context: context, items: topItems })] }), jsx(SocialMedia, { media: socialMedia, context: context }), jsx(HorizontalNavigation, { links: relatedEnterprises, context: context }), jsx(TextInformation, { links: documents, context: context })] }));
615
624
  });
616
625
 
617
- const ArrowButton = JSX(({ className, onClick, ariaLabel }) => {
618
- return (jsx("button", { className: `${className} border-none no-underline w-12 h-12 rounded-3xl bg-white flex text-black hover:text-primary-main`, style: { boxShadow: '0px 4px 25px rgba(0, 0, 0, 0.07)' }, onClick: onClick, "aria-label": ariaLabel, children: jsxs("svg", { className: "m-auto", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("path", { d: "M7 12L3 8L7 4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }), jsx("path", { d: "M14 9C14.5523 9 15 8.55228 15 8C15 7.44772 14.5523 7 14 7L14 9ZM8 7C7.44772 7 7 7.44772 7 8C7 8.55229 7.44772 9 8 9L8 7ZM14 7L8 7L8 9L14 9L14 7Z", fill: "currentColor" })] }) }));
619
- });
626
+ const ARROW_PATHS = [
627
+ {
628
+ d: 'm9 12 4-4-4-4',
629
+ stroke: 'currentColor',
630
+ strokeWidth: '2',
631
+ strokeLinecap: 'round',
632
+ fill: 'none',
633
+ },
634
+ {
635
+ d: 'M2 9a1 1 0 0 1 0-2v2Zm6-2a1 1 0 0 1 0 2V7ZM2 7h6v2H2V7Z',
636
+ },
637
+ ];
638
+ const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, className: `shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${disabled
639
+ ? 'bg-secondary-light text-secondary-text'
640
+ : 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(SVG, { paths: ARROW_PATHS, viewBox: "0 0 16 16", fill: "none", width: "16", height: "16" }) })));
620
641
 
621
- const CARD_WIDTH = 384;
622
- const GALLERY_LENGTH_FOR_SCROLL = 3;
623
- const Gallery$1 = JSX(({ title, description, context, cards = [], className }) => {
642
+ const cardStyleMap = {
643
+ normal: 'min-w-[364px] w-[364px]',
644
+ mini: 'min-w-[260px] w-[260px]',
645
+ };
646
+ const cardWidthMap = {
647
+ normal: 380,
648
+ mini: 276,
649
+ };
650
+ const galleryLengthForScrollMap = {
651
+ normal: 3,
652
+ mini: 4,
653
+ };
654
+ const GalleryInner = JSX(({ title, description, context, cards = [], className, version = 'normal' }) => {
624
655
  const [activeCardIndex, setActiveCardIndex] = context.useState(0);
625
656
  function handleNextClick() {
626
657
  setActiveCardIndex(activeCardIndex + 1);
@@ -628,24 +659,25 @@
628
659
  function handlePrevClick() {
629
660
  setActiveCardIndex(activeCardIndex - 1);
630
661
  }
631
- const isGalleryScrollAvailable = cards?.length > GALLERY_LENGTH_FOR_SCROLL;
632
- const showNextButton = isGalleryScrollAvailable && cards?.length - activeCardIndex > GALLERY_LENGTH_FOR_SCROLL;
662
+ const isGalleryScrollAvailable = cards?.length > galleryLengthForScrollMap[version];
663
+ const showNextButton = isGalleryScrollAvailable &&
664
+ cards?.length - activeCardIndex > galleryLengthForScrollMap[version];
633
665
  const showPrevButton = isGalleryScrollAvailable && activeCardIndex > 0;
634
- return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-12 overflow-hidden ${className}`, children: [jsxs("div", { className: "flex flex-col items-center mb-8", children: [jsx(Title, { className: "font-medium m-0 text-centers", children: title }), description ? (jsx("div", { className: "font-normal text-base max-w-[600px] mt-3", children: description })) : null] }), jsx("div", {
666
+ return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-12 overflow-hidden ${className}`, children: [jsxs("div", { className: "flex flex-col items-center mb-8", children: [title ? jsx(Title, { className: "font-medium m-0 text-center", children: title }) : null, description ? (jsx("div", { className: "font-normal text-base max-w-[600px] mt-3", children: description })) : null] }), jsx("div", {
635
667
  // Need to place all cards at the center if count of cards less than 4
636
- className: `flex ${cards?.length <= GALLERY_LENGTH_FOR_SCROLL ? 'justify-center' : ''} duration-1000`,
668
+ className: `flex ${cards?.length <= galleryLengthForScrollMap[version] ? 'justify-center' : ''} duration-1000`,
637
669
  // All cards has same width
638
- style: { transform: `translateX(-${activeCardIndex * CARD_WIDTH}px)` }, role: "list", children: cards?.map(renderCard$1) }), showPrevButton && (jsx(ArrowButton, { className: "absolute top-1/2 left-8", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })), showNextButton && (jsx(ArrowButton, { className: "absolute top-1/2 right-1 z-20 rotate-180", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" })), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px]", style: {
639
- background: 'linear-gradient(270deg, #FFFFFF 34.89%, rgba(255, 255, 255, 0) 92.52%)',
640
- } })] }));
670
+ style: { transform: `translateX(-${activeCardIndex * cardWidthMap[version]}px)` }, role: "list", children: cards?.map((card, i) => renderCard$1(card, i, version)) }), showPrevButton && (jsx(ArrowButton, { className: "absolute top-1/2 left-8 rotate-180", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })), showNextButton && (jsx(ArrowButton, { className: "absolute top-1/2 right-1 z-10", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" })), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })] }));
641
671
  });
642
- function renderCard$1(card, key) {
643
- return (jsxs("div", { className: "box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between items-stretch min-w-[364px] w-[364px] w-full", role: "listitem", children: [jsxs("div", { children: [card.image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: card.image }) })) : null, card.title ? (jsx("h4", { className: `font-medium text-xl m-0 ${!card.description && !card.items?.length ? 'text-center' : ''}`, children: card.title })) : null, card.description ? (jsx("div", { className: "font-normal text-sm text-secondary-text mt-2", children: card.description })) : null, card.items?.length ? renderItems$1(card.items) : null] }), card.href ? (jsx(Button, { className: "mt-6", text: "\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435", version: "secondary", href: card.href })) : null] }, key));
672
+ function renderCard$1(card, i, version) {
673
+ return (jsxs("div", { className: `box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between items-stretch ${cardStyleMap[version]} w-full`, role: "listitem", children: [jsxs("div", { children: [card.image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: card.image }) })) : null, card.title ? (jsx("h4", { className: `font-medium text-xl m-0 ${!card.description && !card.items?.length ? 'text-center' : ''}`, children: card.title })) : null, card.description ? (jsx("div", { className: "font-normal text-sm text-secondary-text mt-2", children: card.description })) : null, card.items?.length ? (jsx("section", { className: "max-w-[308px] mt-2", role: "list", children: card.items.map(renderItem) })) : null] }), card.href ? (jsx(Button, { className: "mt-6", text: "\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435", version: "secondary", href: card.href })) : null] }, String(i)));
644
674
  }
645
- function renderItems$1(items = []) {
646
- return (jsx("section", { className: "max-w-[308px] mt-2", role: "list", children: items.map((item, i) => (jsx(BlockItem, { children: jsx("span", { className: "text-sm text-secondary-text", children: item }) }, String(i)))) }));
675
+ function renderItem(item, i) {
676
+ return (jsx(BlockItem, { children: jsx("span", { className: "text-sm text-secondary-text", children: item }) }, String(i)));
647
677
  }
648
678
 
679
+ const Gallery$1 = JSX((props) => jsx(GalleryInner, { ...props, version: "normal" }));
680
+
649
681
  const HeaderItem = JSX(({ className, text, href, target, active, onClick, children }) => {
650
682
  const textStyle = active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main';
651
683
  return (jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className || ''}`, href: href, target: target, onClick: onClick, children: [jsx("span", { className: `font-sans font-normal text-base ${textStyle}`, children: text || children }), active ? (jsx("div", { className: "absolute left-0 -bottom-2 w-full h-[2px] bg-primary-main" })) : null] }));
@@ -687,6 +719,8 @@
687
719
  return (jsxs("header", { className: `pt-5 pb-8 px-20 bg-white ${className || ''}`, children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8" }), topMenu, jsx(HeaderSecondaryMenu, { context: context, className: "ml-auto", defaultLocation: defaultLocation })] }), jsx("div", { className: "mt-5 h-[1px] bg-main-divider" }), jsx("nav", { className: "mt-5", children: subMenu })] }));
688
720
  });
689
721
 
722
+ const MiniGallery = JSX((props) => (jsx(GalleryInner, { ...props, version: "mini" })));
723
+
690
724
  const MobileAppTile = JSX(({ className, context, title = 'Мобильное приложение', qr, buttons = [] }) => {
691
725
  return (jsx(Tile, { className: className, context: context, title: title, buttons: buttons, children: jsxs("div", { className: "flex items-center", children: [qr?.src && qr?.href && (jsx("a", { href: qr.href, target: "_blank", children: jsx("img", { src: qr.src, alt: title, title: title, width: "164", height: "164", className: "w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light" }) })), jsx("span", { className: "font-normal text-sm text-secondary-text ml-4", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }) }));
692
726
  });
@@ -694,10 +728,10 @@
694
728
  const ProductBlockInner = JSX(({ className, context, title, titleSize, description, benefits, buttons, image, items }) => {
695
729
  return (jsxs("div", { className: `flex grow justify-between items-stretch ${className || ''}`, children: [jsxs("div", { className: 'flex flex-col', children: [title && (
696
730
  /* TODO Why <Title> is duplicated here? */
697
- jsx(Title, { size: titleSize || 'XL', className: "font-medium m-0 mb-4 whitespace-pre-wrap max-w-[600px]", children: title })), jsx(BaseTile, { context: context, description: description, items: items, buttons: buttons, children: benefits?.length ? (jsx("div", { className: "flex gap-6 mt-6 mb-3.5", children: benefits.map(renderBenefit) })) : null })] }), image?.src && jsx(Img, { className: "mt-auto", image: image })] }));
731
+ jsx(Title, { size: titleSize || 'XL', className: "font-medium m-0 mb-4 whitespace-pre-wrap max-w-[600px] text-primary-text", children: title })), jsx(BaseTile, { context: context, description: description, items: items, buttons: buttons, children: benefits?.length ? (jsx("div", { className: "flex gap-6 mt-6 mb-3.5", children: benefits.map(renderBenefit) })) : null })] }), image?.src && jsx(Img, { className: "mt-auto", image: image })] }));
698
732
  });
699
733
  function renderBenefit(benefit, i) {
700
- return (jsxs("div", { className: "flex gap-4 items-center", children: [benefit.icon && (jsx(Icon, { className: "w-[50px] h-[50px] min-w-[50px] min-h-[50px] bg-main rounded-full p-[10px] box-border", name: benefit.icon, width: "24", height: "24" })), jsxs("div", { className: "flex gap-1 flex-col h-full", children: [jsx("h4", { className: "font-medium text-xl m-0", children: benefit.label }), benefit.description && (jsx("div", { className: "font-normal text-sm text-secondary-text", children: benefit.description }))] })] }, String(i)));
734
+ return (jsxs("div", { className: "flex gap-4 items-center", children: [benefit.icon && (jsx(Icon, { className: "w-[50px] h-[50px] min-w-[50px] min-h-[50px] bg-main rounded-full p-[10px] box-border", name: benefit.icon, width: "24", height: "24" })), jsxs("div", { className: "flex gap-1 flex-col h-full", children: [jsx("h4", { className: "font-medium text-primary-text text-xl m-0", children: benefit.label }), benefit.description && (jsx("div", { className: "font-normal text-sm text-secondary-text", children: benefit.description }))] })] }, String(i)));
701
735
  }
702
736
 
703
737
  const Breadcrumb = JSX(({ text, href, target, onClick, className, children }) => {
@@ -784,7 +818,7 @@
784
818
  primary: {
785
819
  background: 'bg-white',
786
820
  icon: 'bg-primary-main text-white',
787
- title: 'text-base',
821
+ title: 'text-primary-text',
788
822
  description: 'text-secondary-text',
789
823
  },
790
824
  secondary: {
@@ -796,13 +830,13 @@
796
830
  'secondary-light': {
797
831
  background: 'bg-primary-main/10',
798
832
  icon: 'bg-primary-main text-white',
799
- title: 'text-base',
833
+ title: 'text-primary-text',
800
834
  description: 'text-secondary-text',
801
835
  },
802
836
  };
803
837
  const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className }) => {
804
838
  const textBlockStyleMap = textBlockStyleMaps[blockVersion];
805
- return (jsxs("section", { className: `font-sans px-9 py-4 flex ${textBlockStyleMap.background} ${className || ''}`, children: [iconVersion && iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null, iconVersion && iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "py-0.5", children: [title && jsx("div", { className: `font-medium mb-1 ${textBlockStyleMap.title}`, children: title }), description && (jsx("div", { className: `text-sm ${textBlockStyleMap.description}`, children: description }))] })] }));
839
+ return (jsxs("section", { className: `font-sans px-9 py-4 flex ${textBlockStyleMap.background} ${className || ''}`, children: [iconVersion && iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null, iconVersion && iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "py-0.5", children: [title && (jsx("div", { className: `font-medium text-base mb-1 ${textBlockStyleMap.title}`, children: title })), description && (jsx("div", { className: `text-sm ${textBlockStyleMap.description}`, children: description }))] })] }));
806
840
  });
807
841
  function renderIcon(className) {
808
842
  return (jsx("div", { className: `pt-1.5 pr-4`, children: jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs ${className}`, children: "i" }) }));
@@ -811,6 +845,50 @@
811
845
  return image?.src ? jsx(Img, { className: "pt-0.5 pr-3", image: image }) : null;
812
846
  }
813
847
 
848
+ const TableRowContainer = JSX(({ children }) => (jsx("div", { className: "self-start flex flex-col", role: "row", children: jsx("div", { className: "flex", children: children }) })));
849
+
850
+ const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
851
+ const BORDER_CLASSES = 'border-main-stroke border-solid border';
852
+ const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
853
+ const FIRST_CELL_CLASSES = 'w-[200px] mr-6';
854
+ const COLS_LENGTH_FOR_SCROLL = 2;
855
+ const COLUMN_WIDTH = 4 * 80 + 4 * 4; // w-80 + gap-4 = 336px
856
+
857
+ const TableCarouselContainer = JSX(({ children, activeCardIndex }) => (jsx("div", { className: "flex flex-1 overflow-hidden", children: jsx("div", { className: "flex gap-4 duration-1000", style: { transform: `translateX(-${activeCardIndex * COLUMN_WIDTH}px)` }, children: children }) })));
858
+
859
+ const HeaderCell = JSX(({ icon, image, title, link }) => (jsxs("div", { className: `w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-12 ${BORDER_CLASSES} ${GRADIENT}`, role: "columnheader", scope: "col", children: [icon && !image?.src && (jsx(Icon, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", name: icon, width: "63", height: "63" })), image?.src && jsx(Img, { className: "mb-4", image: image }), title && (jsx(Title, { size: "S", className: "font-medium m-0 text-center text-white", children: title })), link?.text && (jsx("div", { className: "mt-auto w-full", children: jsx(Button, { href: link.href, target: link.target, className: "mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active", children: jsx("div", { className: "text-xs py-[11px]", children: link.text }) }) }))] })));
860
+
861
+ const TableCell = JSX(({ cell, isFirstRow, isLastRow, isFillGradient }) => {
862
+ const cellWrapperClasses = `w-80 box-border flex flex-col ${BORDER_CLASSES} ${!isLastRow ? 'border-y-0' : 'border-t-0 rounded-b-md'} ${isFillGradient ? GRADIENT : ''}`;
863
+ const cellClasses = `mx-7 h-full ${DIVIDER_CLASSES} ${isFillGradient && isFirstRow ? 'border-t' : ''} ${!isLastRow ? 'border-solid' : ''}`;
864
+ return (jsx("div", { className: cellWrapperClasses, role: "cell", children: jsx("div", { className: cellClasses, children: cell.map((item, i) => renderCellInner(item, i, isFillGradient)) }) }));
865
+ });
866
+ const renderCellInner = ({ label, description }, i, isFillGradient) => (jsxs("div", { className: "first:pt-7 pt-6 last:pb-7", children: [label && (jsx("h5", { className: `text-xl font-medium m-0 ${isFillGradient ? 'text-white' : ''}`, children: label })), description && (jsx("div", { className: `text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`, children: description }))] }, String(i)));
867
+
868
+ const TableRow = JSX(({ row: { header, data }, activeCardIndex, isColoredFirstColumn, isFirstRow, isLastRow }) => (jsxs(TableRowContainer, { children: [header?.title ? (jsx("div", { className: `text-sm py-7 ${DIVIDER_CLASSES} ${FIRST_CELL_CLASSES} ${!isLastRow ? 'border-solid' : ''}`, children: header.title })) : null, data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, children: data.map((cell, i) => (jsx(TableCell, { cell: cell, isFirstRow: isFirstRow, isLastRow: isLastRow, isFillGradient: isColoredFirstColumn && i === 0 }, String(i)))) })) : null] })));
869
+
870
+ const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, }) => {
871
+ const router = context.useRouter();
872
+ const { handlerDecorator } = context;
873
+ const [activeCardIndex, setActiveCardIndex] = context.useState(0);
874
+ const [isShowAllRow, setIsShowAllRow] = context.useState(!visibleRowLength);
875
+ const colHeaders = columns?.map(({ header }) => header || {});
876
+ const colData = columns?.map(({ data }) => data) || [];
877
+ const rowData = rowHeaders
878
+ ?.map((header, i) => ({
879
+ header,
880
+ data: colData.map((col) => col?.[i] || [{}]),
881
+ }))
882
+ .slice(0, isShowAllRow ? rowHeaders.length : visibleRowLength);
883
+ const nextClick = () => setActiveCardIndex(activeCardIndex + 1);
884
+ const prevClick = () => setActiveCardIndex(activeCardIndex - 1);
885
+ const showToggle = () => setIsShowAllRow(!isShowAllRow);
886
+ const isScrollAvailable = colData?.length && colData.length > COLS_LENGTH_FOR_SCROLL;
887
+ const showNextButton = isScrollAvailable && colData?.length - activeCardIndex > COLS_LENGTH_FOR_SCROLL;
888
+ const showPrevButton = isScrollAvailable && activeCardIndex > 0;
889
+ return (jsxs("section", { className: `bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${className || ''}`, children: [jsx(Title, { className: "font-medium m-0 max-w-[47rem] text-center mb-9 mx-auto", children: title }), jsxs("div", { role: "table", children: [colHeaders?.length ? (jsxs(TableRowContainer, { children: [jsx("div", { className: FIRST_CELL_CLASSES, role: "columnheader", scope: "col" }), jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, children: colHeaders.map((header, i) => (jsx(HeaderCell, { ...header, link: header.link && useLink({ router, handlerDecorator }, header.link) }, String(i)))) })] })) : null, rowData?.length ? (jsxs("div", { className: "relative", children: [rowData.map((row, i, { length }) => (jsx(TableRow, { row: row, isFirstRow: i === 0, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex, isColoredFirstColumn: isColoredFirstColumn }, String(i)))), isScrollAvailable ? (jsx("div", { children: jsxs("div", { className: "absolute top-7 right-7 z-10", children: [jsx(ArrowButton, { onClick: nextClick, disabled: !showNextButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" }), jsx(ArrowButton, { className: "mt-4 rotate-180", onClick: prevClick, disabled: !showPrevButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })] }) })) : null] })) : null] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null, visibleRowLength ? (jsx("div", { className: "pr-[50px]", children: jsxs("div", { className: "flex w-full", children: [jsx("div", { className: FIRST_CELL_CLASSES }), jsx("button", { onClick: showToggle, 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: jsx("div", { className: "font-sans font-medium text-xs py-[11px]", children: !isShowAllRow ? 'Показать все параметры' : 'Скрыть' }) })] }) })) : null] }));
890
+ });
891
+
814
892
  const Blocks = {
815
893
  Header,
816
894
  Footer: Footer$1,
@@ -826,6 +904,8 @@
826
904
  ExchangeRateTile,
827
905
  MobileAppTile,
828
906
  Gallery: Gallery$1,
907
+ MiniGallery,
908
+ ComparisonTable,
829
909
  };
830
910
 
831
911
  const Footer = JSX(({ className, context }) => (jsx("footer", { className: `${className} px-9 py-2 bg-white rounded-bl-3xl rounded-br-3xl`, children: jsx(TextInformation, { context: context }) })));
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";const t=(e,n)=>{t._jsx=e,t._jsxs=n||e};t.vue=e=>{t(((t,{children:n,dangerouslySetInnerHTML:r,...a}={})=>{const i=Object.assign({},a,r?{innerHTML:r.__html}:{});return e(t,i,"string"!=typeof t?()=>n:n)}))};const n=(...e)=>t._jsx(...e),r=(...e)=>t._jsxs(...e),a=e=>(e._tmpl||(e._tmpl=function(t,n){const{children:r,...a}=t||{},i=n?.slots?.default,l=r||i&&i();return e(Object.assign(a,l&&{children:l}),n)},e._tmpl.inheritAttrs=!1),e._tmpl),i=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ENABLE_ASSIST(){return this._.ENABLE_ASSIST}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}},l="likesToken";const s=a((({HeadComponent:e,data:t,children:a})=>{const{title:i,description:l,keywords:s,robots:c,og:o}=t;return r(e,{children:[n("title",{children:i}),n("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),l&&n("meta",{name:"description",content:l}),s&&n("meta",{name:"keywords",content:s.join(",")}),c&&n("meta",{name:"robots",content:c.join(",")}),o?Object.entries(o).map((([e,t])=>n("meta",{name:`og:${e}`,content:t},e))):null,a]})})),c=a((({className:e,onClick:t,ariaLabel:r})=>n("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":r,children:o()}))),o=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[n("path",{...e,strokeMiterlimit:"10",d:"M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"}),n("path",{...e,d:"M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"})]})},m=a((({className:e,context:t})=>{const a=t.useLikeService();return r("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,children:[n(c,{onClick:a.like,ariaLabel:"Поставить отметку «лайк»"}),n(c,{onClick:a.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),n("span",{className:"select-none",children:a.likeCount})]})})),d=a((({className:e,image:t})=>r("picture",{className:`${e||""}`,children:[t.sources?.length?t.sources.map((({src:e,format:t},r)=>n("source",{srcSet:e,type:h(t)},`${r}_${e}`))):null,n("img",{src:t.src,alt:t.alt||t.title,title:t.title,...t?.size})]})));function h(e){return e?`image/${String(e)}`:void 0}const x={primary:"bg-primary-main",secondary:"bg-white"},u={primary:"text-primary-text",secondary:"text-white"},p=a((({className:e,text:t,children:a,version:i="primary"})=>r("div",{className:`inline-block flex ${e||""}`,role:"listitem",children:[n("div",{className:`inline-block w-[8px] h-[8px] min-w-[8px] min-h-[8px] rounded-full mt-2 ${x[i]}`}),n("span",{className:`text-base font-normal font-sans mx-3 ${u[i]}`,children:t||a})]}))),f={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active"},b={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text"},g="inline-block rounded-md px-8 py-2 text-center font-sans",N=a((({className:e,text:t,href:r,target:a,onClick:i,children:l,disabled:s,version:c="primary",ariaLabel:o})=>s?n("div",{role:"button","aria-disabled":"true","aria-label":o,tabIndex:"-1",className:`${g} select-none ${b[c]} ${e||""}`,children:n("div",l?{children:l}:{className:"text-sm font-medium py-1.5",children:t})}):n("a",{className:`${g} no-underline ${f[c]} ${e||""}`,href:r,target:a,onClick:i,"aria-label":o,children:n("div",l?{children:l}:{className:"text-sm font-medium py-1.5",children:t})}))),v=a((({className:e,name:t,alt:r=`Icon ${t}`,title:a=r,...l})=>n("img",{className:e,src:`${i.CDN||""}icons/${t}.svg`,alt:r,title:a,...l}))),y=a((e=>n(N,{...e,children:e.icon?r("div",{className:"flex items-center",children:[n("div",{className:"mr-2",children:n(v,{name:e.icon,width:"24",height:"24"})}),r("div",{children:[n("div",{className:"text-xxs text-left",children:e.aboveText}),n("div",{className:"text-sm font-medium text-left",children:e.text})]})]}):null})));var w;!function(e){e.XL="text-title-lg",e.L="text-title",e.M="text-title-sm",e.S="text-title-xs"}(w||(w={}));const k=a((({size:e="L",className:t,children:r,...a})=>n("XL"===e?"h1":"h2",{className:$(w[e],t),...a,children:r}))),$=(...e)=>e.filter(Boolean).join(" "),S="/mobile",C=e=>e?.includes("//"),_=(e,t,n=((e,t)=>e===t))=>n(L(e),j(L(C(e)?t.href:t.pathname))),L=e=>(e||"").replace(/\/?\?.*/,""),j=e=>(e||"").replace(S,""),D=e=>{if(!C(e))return;const t=e,n=t.indexOf("//"),r=t.indexOf("/",n+"//".length);return-1!==r?t.substring(0,r):t},T=(e,t)=>{if(!e)return e;const n=R(e,t),r=t?.pathname.startsWith(S);return r&&!C(n)?`/mobile${n}`:n},R=(e,t)=>{if(!e)return e;const n=D(t?.href);return n?e.replace(n,"")||"/":e};var A=Object.freeze({__proto__:null,MOBILE_URL_PATH:S,isURL:C,isHrefActive:_,withoutQuery:L,withoutMobilePath:j,getOrigin:D,adjustHref:T,toRelativeHref:R});const I=(e,t)=>e;function B({router:e,handlerDecorator:t=I},n){const r=T(n.href,e);return{...n,href:r,ariaLabel:n.text,onClick:t((t=>{const a=r&&!C(r),i=!n.target||"_self"===n.target;a&&i&&(t.preventDefault(),e.push(r))}),n)}}const O=e=>{const t="col-span-",n=e.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(t.length),10):12},P=a((({className:e,context:t,title:a,titleSize:i,description:l,children:s,buttons:c,image:o,items:m,version:h="primary"})=>{const x=t.useRouter(),{handlerDecorator:u}=t;return r("div",{className:"font-sans flex flex-col grow h-full",children:[a&&n(k,{size:i||M(e),className:"font-medium m-0 mb-4 whitespace-pre-wrap max-w-[600px]",children:a}),r("div",{className:"flex grow justify-between",children:[r("div",{className:"flex flex-col justify-between items-start",children:[r("div",{children:[l?n("div",{className:"font-normal text-base max-w-[600px] mb-5",children:l}):null,s,m?.length?Z(m,h):null]}),c?.length?n("div",{className:"flex mt-9 gap-3",children:c.map(((e,t)=>function(e,t){return e?.text?n(y,{...e},String(t)):null}(B({router:x,handlerDecorator:u},e),t)))}):null]}),o?.src&&n(d,{className:"mt-auto ml-7",image:o})]})]})}));function M(e=""){const t=O(e);return t<=4?"S":t<=8?"M":"L"}function Z(e=[],t){return n("section",{className:"max-w-[600px]",role:"list",children:e.map(((e,r)=>n(p,{className:r?"mt-2.5":"",text:e,version:t},String(r))))})}const F={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},H=a((e=>{const{children:t,className:r,version:a="primary"}=e;return n("section",{className:`font-sans p-9 min-h-[320px] box-border ${r||""} ${F[a]} ${V(r)} `,children:n(P,{...e,children:t})})}));function V(e=""){const t=O(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const E=a((({className:e,context:t,title:r})=>n(H,{className:e,context:t,title:r,description:"Блок в разработке...",children:n("figure",{className:"m-0 min-w-[600px]",children:z()})}))),z=(e=3)=>W(100,e).map((e=>Math.floor(e))).map(U),U=(e=100,t)=>n("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),W=(e,t)=>[e].concat(t>0?W(e/1.618,t-1):[]),J=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),G=a((({className:e,context:t,blocksRegistry:a,data:{style:i,blocks:l,likeControl:s,colorPalette:c="pc"},blockDecorator:o=J})=>r("section",{className:"relative","data-theme":c,children:[n("div",{className:`grid grid-cols-12 gap-1 ${X(i)} ${e||""}`,children:l?.length?l.map((function e(r,i){const{type:l}=r;l in a||console.warn(`No block with "${l}" is registered`);const s=a[l]||E;return o({blockClassName:X(r.style),block:r,render:r=>{const{version:a,content:c,blocks:o}=r.block;return n(s,{className:r.blockClassName,version:a,context:t,...c,children:o?.length?o.map(e):null},`${l}-${i}`)}},`block-${i}`)})):null}),s&&n("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:n(m,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t})})]})));function X(e){return e?e.join(" "):""}function Q(e){const{mobile:t}=e;return t?{...e,style:t.style?.length?t.style:e.style}:e}const q=a((({className:e,title:t,benefits:a})=>r("section",{className:`font-sans text-primary-text bg-white p-12 pb-2 flex flex-col items-center ${e||""}`,children:[n("h2",{className:"font-medium text-title m-0 max-w-[47rem] text-center",children:t}),a?.length?n("div",{className:"grid grid-cols-2 gap-5 mt-9",children:a.map(K)}):null]}))),K=(e,t)=>r("div",{className:"flex items-center p-10 gap-5 max-w-[580px]",children:[e.icon&&n(v,{className:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",name:e.icon,width:"70",height:"70"}),r("div",{children:[n("h3",{className:"font-medium text-xl m-0",children:e.label}),e.description&&n("div",{className:"font-normal text-sm mt-2",children:e.description})]})]},String(t)),Y="https://www.cbr-xml-daily.ru/daily_json.js",ee=["USD","EUR"],te={USD:"DollarIcon",EUR:"EuroIcon"},ne=[{text:"Все показатели",href:"https://cbr.ru/currency_base/daily/"}],re=a((({className:e,context:t,title:a})=>{const{data:i}=t.useAsyncData(Y,le);return n(H,{className:e,context:t,title:a||"Курсы обмена валют",buttons:ne,children:r("table",{children:[n("thead",{children:r("tr",{children:[n(ae,{children:"Валюта"}),n(ae,{className:"pl-11",children:"Курс"})]})}),n("tbody",{children:ee.map((e=>{const t=(i?.Valute||{})[e]?.Value;return r("tr",{children:[n(ie,{className:"pt-4",children:r("div",{className:"flex items-center",children:[n(v,{name:te[e],width:"24",height:"24"}),n("span",{className:"ml-2",children:e})]})}),n(ie,{className:"pt-4 pl-11",children:ce(t)})]},e)}))})]})})})),ae=a((({className:e="",children:t})=>n("th",{className:`text-left font-normal text-sm text-secondary-text ${e}`,children:t}))),ie=a((({className:e="",children:t})=>n("td",{className:`text-left font-normal text-base text-primary-text ${e}`,children:t})));async function le(){const e=await fetch(Y);return await e.json()}const se=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),ce=e=>e?se.format(e):"",oe=a((({className:e,viewBox:t,fill:r="none",paths:a,...i})=>n("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:r,children:a.map((({d:e,fill:t,...r},a)=>n("path",{d:e,fill:t||"currentColor",...i,...r},a)))}))),me=["m13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z","M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z","M33.93 35.53c.3-.41.6-.85.87-1.3v-2.66h-.87v3.96Zm2.54-4.92c.12-.4.24-.78.34-1.16h-2.88v.7h.43c.77-.02 1.63-.03 2.11.46Zm-19.19-1.27h-.78v7.91h.78v-7.9Z","M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z","M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z"],de=a((({className:e,href:t,children:a,targetBlank:i})=>r("a",{className:`inline-flex items-center font-sans no-underline ${e||""}`,href:t||"https://rshb.ru/",target:i?"_blank":"_self",children:[n(oe,{className:"text-primary-main w-10",viewBox:"0 0 40 45",paths:me.map((e=>({d:e})))}),n("span",{className:"text-black text-base font-medium ml-2.5",children:a||"Россельхозбанк"})]}))),he=a((({className:e,context:t})=>{const{term:a,setTerm:i}=t.useSearch();return r("form",{className:`relative ${e||""}`,children:[r("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[n("div",{className:"w-[24px] h-[24px]",children:n(v,{name:"LoupeIcon",width:"24",height:"24"})}),!a&&n("span",{className:"font-sans font-normal text-base text-secondary-text",children:"Поиск по сайту"})]}),n("input",{className:"pl-12 w-full font-sans font-normal text-base text-black border border-solid border-main-divider rounded h-full box-border outline-none pr-[6%]",value:a,onChange:e=>i(e.target.value),type:"text",name:"s"}),a&&n("button",{type:"submit",className:"absolute font-sans font-normal text-sm cursor-pointer bg-transparent hover:bg-primary-hover active:bg-primary-active text-primary-main hover:text-white border-none px-5 py-2 rounded top-1 right-1 outline-none",onClick:e=>{e.preventDefault(),console.log("click")},children:"Найти"})]})})),xe=a((({className:e,items:t,hasButton:a,context:i})=>{const l=i.useRouter(),{handlerDecorator:s}=i;return r("div",{className:`flex flex-col ${e||""}`,children:[t?.length?t.map(ue):null,a?n(N,{className:"my-4",...B({router:l,handlerDecorator:s},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),ue=(e,t)=>{const{type:a,text:i,description:l}=e;return r("div",{className:"mb-4",children:[n("div",{children:pe(a,i)}),n("div",{className:"font-sans text-sm text-secondary-text",children:l})]},String(t))},pe=(e,t)=>{switch(e){case"tel":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`tel:${fe(t)}`,children:t});case"email":return n("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return n("span",{children:t})}},fe=e=>e.replaceAll(/(\-|\s|\(|\)|\D+)/g,""),be=a((({className:e,links:t,context:r})=>{const a=r.useRouter(),{handlerDecorator:i}=r;return n("div",{className:`${e||""}`,children:t?.length?n("div",{className:"flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider",children:t.map(((e,t)=>n(ge,{index:t,...B({router:a,handlerDecorator:i},e)},String(t))))}):null})})),ge=a((({className:e,index:t,text:r,href:a,target:i,onClick:l})=>n("a",{className:`font-sans font-normal text-sm text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:a,target:i,onClick:l,children:r||`Документ ${t}`}))),Ne=e=>t=>e?.href===t?.href;function ve(e,t){return(r=e,a=t,(r||[]).map((e=>a?.find(Ne(e))||e))).concat((n=e,(t||[]).filter((e=>!n?.find(Ne(e))))));var n,r,a}function ye(e){const{data:t}=e(ke(),we);return t||{}}async function we(){const e=await fetch(ke());return await e.json()}function ke(){return`/wcms-resources/${i.SITEMAP||"sitemap"}.json`}const $e=a((({className:e,items:t,context:r})=>{const a=ve(ye(r.useAsyncData).topItems,t),i={router:r.useRouter(),handlerDecorator:r.handlerDecorator};return n("div",{className:`flex items-start justify-start gap-11 xl:gap-5 ${e||""}`,children:a?.map(((e,t)=>Se(e,t,i)))})})),Se=(e,t,{router:a,handlerDecorator:i})=>{const{text:l,href:s,items:c,target:o}=e;return r("div",{className:"flex flex-col w-[235px] gap-[14px]",children:[n("a",{className:"block font-sans font-medium text-base text-primary-text no-underline",href:s,target:o||"_self",children:l||`Раздел ${t}`}),c?.map(((e,t)=>n(Ce,{...B({router:a,handlerDecorator:i},e)},String(t))))]},String(t))},Ce=a((({text:e,href:t,target:r,index:a})=>n("a",{className:"block font-sans font-normal text-base text-secondary-text hover:text-primary-main no-underline",href:t,target:r||"_self",children:e||`Раздел ${a}`}))),_e=[{origins:["t.me","telegram.org"],icon:"TelegramIcon",label:"Телеграм"},{origins:["vk.com"],icon:"VKIcon",label:"ВКонтакте"},{origins:["ok.ru"],icon:"OkIcon",label:"Одноклассники"}],Le=a((({className:e,media:t,context:r})=>{const a=r.useRouter(),{handlerDecorator:i}=r;return n("div",{className:`flex items-end justify-end gap-2 pt-[30px] pb-7 ${e||""}`,children:t?.map(((e,t)=>n(je,{...B({router:a,handlerDecorator:i},e)},String(t))))})})),je=a((({href:e})=>{const{icon:t,label:r}=_e.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};return n("a",{className:"flex items-center justify-center border-solid border border-main-divider rounded-full no-underline outline-none w-9 h-9",href:e,target:"_blank",rel:"noopener noreferrer","aria-label":r,children:t&&n(v,{className:"block",name:t})})})),De=a((({className:e,links:t,context:a})=>{const i=a.useRouter(),{handlerDecorator:l}=a;return r("div",{className:`${e||""}`,children:[n("div",{className:"pt-5 pb-[5px]",children:n("span",{className:"font-sans font-normal text-xs text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?n("div",{className:"flex justify-start items-start gap-5 pt-[5px]",children:t.map(((e,t)=>n(Te,{index:t,...B({router:i,handlerDecorator:l},e)},String(t))))}):null]})})),Te=a((({className:e,index:t,text:r,href:a,target:i,onClick:l})=>n("a",{className:`font-sans font-normal text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:a,target:i,onClick:l,children:r||`Документ ${t}`}))),Re=a((({className:e,documents:t,relatedEnterprises:a,contacts:i,socialMedia:l,topItems:s,context:c})=>r("footer",{className:`${e} px-9 py-10 bg-white`,children:[r("div",{className:"flex items-stretch gap-32 pb-8 xl:gap-8",children:[n(de,{className:"w-[280px] xl:w-[220px]"}),n(he,{context:c,className:"grow"})]}),r("div",{className:"flex items-stretch gap-32 xl:gap-8",children:[n(xe,{className:"w-[280px] shrink-0 overflow-hidden xl:w-[220px]",items:i,context:c,hasButton:!0}),n($e,{className:"pt-[3px]",context:c,items:s})]}),n(Le,{media:l,context:c}),n(be,{links:a,context:c}),n(De,{links:t,context:c})]}))),Ae=a((({className:e,onClick:t,ariaLabel:a})=>n("button",{className:`${e} border-none no-underline w-12 h-12 rounded-3xl bg-white flex text-black hover:text-primary-main`,style:{boxShadow:"0px 4px 25px rgba(0, 0, 0, 0.07)"},onClick:t,"aria-label":a,children:r("svg",{className:"m-auto",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n("path",{d:"M7 12L3 8L7 4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),n("path",{d:"M14 9C14.5523 9 15 8.55228 15 8C15 7.44772 14.5523 7 14 7L14 9ZM8 7C7.44772 7 7 7.44772 7 8C7 8.55229 7.44772 9 8 9L8 7ZM14 7L8 7L8 9L14 9L14 7Z",fill:"currentColor"})]})}))),Ie=a((({title:e,description:t,context:a,cards:i=[],className:l})=>{const[s,c]=a.useState(0);const o=i?.length>3,m=o&&i?.length-s>3,d=o&&s>0;return r("section",{className:`relative font-sans text-primary-text bg-white p-12 overflow-hidden ${l}`,children:[r("div",{className:"flex flex-col items-center mb-8",children:[n(k,{className:"font-medium m-0 text-centers",children:e}),t?n("div",{className:"font-normal text-base max-w-[600px] mt-3",children:t}):null]}),n("div",{className:`flex ${i?.length<=3?"justify-center":""} duration-1000`,style:{transform:`translateX(-${384*s}px)`},role:"list",children:i?.map(Be)}),d&&n(Ae,{className:"absolute top-1/2 left-8",onClick:function(){c(s-1)},ariaLabel:"Пролистать влево"}),m&&n(Ae,{className:"absolute top-1/2 right-1 z-20 rotate-180",onClick:function(){c(s+1)},ariaLabel:"Пролистать вправо"}),n("div",{className:"absolute top-0 right-0 bottom-0 w-[84px]",style:{background:"linear-gradient(270deg, #FFFFFF 34.89%, rgba(255, 255, 255, 0) 92.52%)"}})]})}));function Be(e,t){return r("div",{className:"box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between items-stretch min-w-[364px] w-[364px] w-full",role:"listitem",children:[r("div",{children:[e.image?.src?n("div",{className:"flex justify-center",children:n(d,{className:"mb-6",image:e.image})}):null,e.title?n("h4",{className:"font-medium text-xl m-0 "+(e.description||e.items?.length?"":"text-center"),children:e.title}):null,e.description?n("div",{className:"font-normal text-sm text-secondary-text mt-2",children:e.description}):null,e.items?.length?Oe(e.items):null]}),e.href?n(N,{className:"mt-6",text:"Подробнее",version:"secondary",href:e.href}):null]},t)}function Oe(e=[]){return n("section",{className:"max-w-[308px] mt-2",role:"list",children:e.map(((e,t)=>n(p,{children:n("span",{className:"text-sm text-secondary-text",children:e})},String(t))))})}const Pe=a((({className:e,text:t,href:a,target:i,active:l,onClick:s,children:c})=>r("a",{className:`relative inline-block bg-transparent text-center no-underline ${e||""}`,href:a,target:i,onClick:s,children:[n("span",{className:`font-sans font-normal text-base ${l?"text-primary-main":"text-primary-text hover:text-primary-main"}`,children:t||c}),l?n("div",{className:"absolute left-0 -bottom-2 w-full h-[2px] bg-primary-main"}):null]}))),Me=a((({className:e,text:t,href:r,target:a,active:i,flat:l,onClick:s,children:c,ariaLabel:o})=>n("a",{className:`inline-block border border-solid bg-transparent text-center no-underline ${l?"":"px-4 py-2"} ${i?"border-primary-main rounded-md":"border-transparent"} ${e||""}`,href:r,target:a,onClick:s,rel:"noopener noreferrer","aria-label":o,children:n("span",{className:`font-sans font-normal text-sm ${i?"text-primary-main":(l?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"}`,children:t||c})}))),Ze=a((({className:e,children:t,ariaLabel:r})=>n("button",{type:"button",className:`border-0 p-0 w-[24px] flex items-center bg-inherit cursor-pointer ${e||""}`,disabled:!0,"aria-label":r,children:t}))),Fe=a((({context:e,className:t,defaultLocation:a=""})=>{const[i,l]=e.useGeolocation(a);return r("div",{className:`flex items-center ${t||""}`,children:[n(Me,{className:"mr-5",flat:!0,href:"#",text:i,ariaLabel:"Местоположение",onClick:l}),n(Me,{className:"mr-7",flat:!0,href:"#",text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов"}),n(Ze,{className:"mr-5 text-primary-text hover:text-primary-main",ariaLabel:"Поиск по сайту",children:n(v,{name:"LoupeIcon","aria-hidden":"true"})}),n(Ze,{className:"mr-5 text-primary-text hover:text-primary-main",ariaLabel:"Профиль",children:n(v,{name:"ProfileIcon","aria-hidden":"true"})}),n(Ze,{className:"mr-5 text-secondary-light hover:text-secondary-active min-w-[32px] min-h-[32px]",ariaLabel:"Дополнительные ссылки",children:n(v,{name:"GridIcon","aria-hidden":"true"})})]})}));const He=a((({className:e,defaultLocation:t,context:a,topItems:i})=>{const l=a.useRouter(),s=ye(a.useAsyncData),{handlerDecorator:c}=a,o=ve(s.topItems,i),m=o.find(function(e){return t=>_(t.href,e,((e,t)=>t.startsWith(e)))}(l)),d=m?.items,h=d?.find(function(e){return t=>_(t.href,e)}(l)),x=o.map(((e,t)=>n(Me,{active:e===m,...B({router:l,handlerDecorator:c},e),ariaLabel:e.text},String(t)))),u=d?.map((e=>n(Pe,{className:"mr-8",active:e===h,...B({router:l,handlerDecorator:c},e)},e.href)));return r("header",{className:`pt-5 pb-8 px-20 bg-white ${e||""}`,children:[r("div",{className:"flex items-center",children:[n(de,{className:"mr-8"}),x,n(Fe,{context:a,className:"ml-auto",defaultLocation:t})]}),n("div",{className:"mt-5 h-[1px] bg-main-divider"}),n("nav",{className:"mt-5",children:u})]})})),Ve=a((({className:e,context:t,title:a="Мобильное приложение",qr:i,buttons:l=[]})=>n(H,{className:e,context:t,title:a,buttons:l,children:r("div",{className:"flex items-center",children:[i?.src&&i?.href&&n("a",{href:i.href,target:"_blank",children:n("img",{src:i.src,alt:a,title:a,width:"164",height:"164",className:"w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light"})}),n("span",{className:"font-normal text-sm text-secondary-text ml-4",children:"Наведите камеру телефона на QR-код и скачайте приложение"})]})}))),Ee=a((({className:e,context:t,title:a,titleSize:i,description:l,benefits:s,buttons:c,image:o,items:m})=>r("div",{className:`flex grow justify-between items-stretch ${e||""}`,children:[r("div",{className:"flex flex-col",children:[a&&n(k,{size:i||"XL",className:"font-medium m-0 mb-4 whitespace-pre-wrap max-w-[600px]",children:a}),n(P,{context:t,description:l,items:m,buttons:c,children:s?.length?n("div",{className:"flex gap-6 mt-6 mb-3.5",children:s.map(ze)}):null})]}),o?.src&&n(d,{className:"mt-auto",image:o})]})));function ze(e,t){return r("div",{className:"flex gap-4 items-center",children:[e.icon&&n(v,{className:"w-[50px] h-[50px] min-w-[50px] min-h-[50px] bg-main rounded-full p-[10px] box-border",name:e.icon,width:"24",height:"24"}),r("div",{className:"flex gap-1 flex-col h-full",children:[n("h4",{className:"font-medium text-xl m-0",children:e.label}),e.description&&n("div",{className:"font-normal text-sm text-secondary-text",children:e.description})]})]},String(t))}const Ue=a((({text:e,href:t,target:r,onClick:a,className:i,children:l})=>t?n("a",{className:`no-underline ${i||""}`,href:t,target:r,onClick:a,children:n("span",{className:`${i||""}`,children:e||l})}):n("span",{className:`${i||""}`,children:e||l})));function We(e){return t=>t.reduce(((t,n,r)=>t.length?t.concat({...e,key:r},n):[n]),[])}const Je=a((e=>{const{context:t,className:a,breadcrumbs:i}=e,l=t.useRouter(),{handlerDecorator:s}=t;return r("section",{className:`font-sans bg-white pt-10 pl-[50px] pb-[50px] pr-[7.5rem] ${a||""}`,children:[i?.length?n("div",{className:"text-xs mb-6",children:We(n("span",{className:"text-secondary-text mx-2",children:"/"}))(i.map(((e,t)=>n(Ue,{...B({router:l,handlerDecorator:s},{className:"text-secondary-text",...e})},String(t)))))}):null,n(Ee,{...e})]})})),Ge=a((({className:e,context:t,duration:a=0,slides:i=[]})=>{const l=i.map((e=>e.nav)),s=i.map((e=>e.productBlock)),[c,o]=t.useState(0);return r("section",{className:`font-sans bg-white overflow-hidden w-100 ${e||""}`,children:[n("div",{className:"flex duration-1000",style:{transform:`translateX(-${c}00%)`},role:"list",children:s.map(((e,r)=>function(e,t,r){return n("section",{className:"flex grow-0 shrink-0 basis-full",role:"listitem",children:n("div",{className:"p-10 flex grow",children:n(Ee,{className:"pl-2.5 pt-2.5 pb-1.5 pr-[6.25rem]",context:r,...e})})},String(t))}(e,r,t)))}),n("div",{className:"border-t border-solid border-main-divider flex",children:l.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:a,onClick:i,duration:l}){const s=t===a,c=s?"animate-slide":"";return r("button",{type:"button",onClick:i,className:"group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 py-4 grow basis-0",children:[r("div",{className:"border-0 border-r border-solid border-main-divider px-6",children:[n("div",{className:"text-sm font-medium group-hover:text-primary-text "+(s?"text-primary-text":"text-secondary-text"),children:e?.title}),n("div",{className:"text-xs text-secondary-text",children:e.desc})]}),n("div",{className:`absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${c}`,style:{animationDuration:`${l}s`}})]},String(t))}({slide:e,i:t,activeSlideIndex:c,onClick:()=>o(t),duration:a})))})]})}));const Xe=a((e=>{const{benefits:t,version:a}=e;return n(H,{...e,children:r("div",{className:"flex mt-5 mb-1",children:[t?.length?n("div",{className:"mr-8",children:t.map(Qe)}):null,t?.length?n("div",{className:"pt-1",children:t.map(((e,t)=>function(e,t,r="primary"){return n("div",{className:`text-sm ${t?"mt-4":""} ${{primary:"text-secondary-text",secondary:"text-white"}[r]}`,children:e.label},String(t))}(e,t,a)))}):null]})})}));function Qe(e,t){return n("div",{className:"text-xl font-medium "+(t?"mt-2.5":""),children:e.description},String(t))}const qe=a((({className:e,context:t,title:a="Акции и спецпредложения",date:i,description:l,buttons:s=[],version:c})=>n(H,{className:e,context:t,title:a,buttons:s,version:c,children:r("div",{children:[i&&n("div",{className:"text-sm mb-2",children:Ke(i)}),n("div",{className:"text-base",children:l})]})})));function Ke(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const Ye=a((({className:e,title:t,steps:a})=>r("section",{className:`font-sans text-primary-text bg-white px-12 py-12 flex flex-col items-center ${e||""}`,children:[n(k,{className:"font-medium m-0 max-w-[47rem] text-center",children:t}),a?.length?r("div",{children:[n("div",{className:"flex mt-9 items-center px-[88px]",children:We(n("div",{className:"h-0.5 w-full bg-secondary-light"}))(a.map(((e,t)=>et(e,t))))}),n("div",{className:"flex mt-9 justify-between gap-x-24",children:a.map(tt)})]}):null]}))),et=(e,t)=>n("div",{className:"flex flex-col items-center text-center relative",children:n("div",{className:"h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10",children:e.icon&&n(v,{name:e.icon,width:"48",height:"48"})||n("span",{className:"font-medium text-title-sm text-secondary-text",children:t+1})})},String(t)),tt=(e,t)=>n("div",{className:"flex flex-col items-center text-center relative w-[276px]",children:r("div",{className:"max-w-min",children:[n("h5",{className:"font-medium text-xl m-0 mt-4 whitespace-nowrap px-3",children:e.label}),e.description&&n("div",{className:"font-normal text-sm text-secondary-text mt-2",children:e.description})]})},String(t)),nt={primary:{background:"bg-white",icon:"bg-primary-main text-white",title:"text-base",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-base",description:"text-secondary-text"}},rt=a((({title:e,description:t,blockVersion:a="primary",iconVersion:i,image:l,className:s})=>{const c=nt[a];return r("section",{className:`font-sans px-9 py-4 flex ${c.background} ${s||""}`,children:[i&&"small"===i?at(c.icon):null,i&&"big"===i?it(l):null,r("div",{className:"py-0.5",children:[e&&n("div",{className:`font-medium mb-1 ${c.title}`,children:e}),t&&n("div",{className:`text-sm ${c.description}`,children:t})]})]})}));function at(e){return n("div",{className:"pt-1.5 pr-4",children:n("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function it(e){return e?.src?n(d,{className:"pt-0.5 pr-3",image:e}):null}const lt={Header:He,Footer:Re,Placeholder:E,Tile:H,PromoTile:qe,TextBlock:rt,ProductTile:Xe,ProductBlock:Je,StepsBlock:Ye,BenefitsBlock:q,ProductGallery:Ge,ExchangeRateTile:re,MobileAppTile:Ve,Gallery:Ie},st=a((({className:e,context:t})=>n("footer",{className:`${e} px-9 py-2 bg-white rounded-bl-3xl rounded-br-3xl`,children:n(De,{context:t})}))),ct=a((({title:e,description:t,cards:a=[],className:i})=>r("section",{className:`relative font-sans text-primary-text bg-white p-4 overflow-hidden ${i}`,children:[r("div",{className:"flex flex-col items-center mb-8",children:[n(k,{className:"font-medium m-0 text-centers",children:e}),t?n("div",{className:"font-normal text-base max-w-[600px] mt-3",children:t}):null]}),n("div",{className:"horizontal-list no-scrollbar",role:"list",children:a?.map(ot)})]})));function ot(e,t){return r("div",{className:"box-border horizontal-list-item border-solid border rounded-md border-main-divider p-4 mx-1 flex flex-col justify-between items-stretch",role:"listitem",children:[r("div",{children:[e.image?.src?n("div",{className:"flex justify-center",children:n(d,{className:"mb-6",image:e.image})}):null,e.title?n("h4",{className:"font-medium text-xl m-0 "+(e.description||e.items?.length?"":"text-center"),children:e.title}):null,e.description?n("div",{className:"font-normal text-sm text-secondary-text mt-2",children:e.description}):null,e.items?.length?mt(e.items):null]}),e.href?n(N,{className:"mt-6",text:"Подробнее",version:"secondary",href:e.href}):null]},t)}function mt(e=[]){return n("section",{className:"max-w-[308px] mt-2",role:"list",children:e.map(((e,t)=>n(p,{children:n("span",{className:"text-sm text-secondary-text",children:e})},String(t))))})}const dt=a((({titleSize:e,image:t,benefits:r,...a})=>{const{className:i}=a;return n("section",{className:`font-sans bg-white pt-10 pl-[50px] pb-[50px] pr-[7.5rem] ${i||""}`,children:n(Ee,{...a,titleSize:"L"})})})),ht={Header:He,Footer:st,Placeholder:E,Tile:H,ProductTile:Xe,ProductBlock:dt,TextBlock:rt,ExchangeRateTile:re,MobileAppTile:Ve,Gallery:ct};e.Blocks=lt,e.ContentPage=G,e.ContentPageHead=s,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),n=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await n.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=function(e,t=""){async function n(){try{const e=JSON.parse(globalThis.localStorage.getItem(l)||"");if(e?.token)return e}catch(e){}try{const e=await fetch(`${t}/assist/v1/public/auth`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:n,name:r}=await e.json();return globalThis.localStorage.setItem(l,JSON.stringify({token:n,name:r})),{token:n,name:r}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...r){if(!r.length)return[];const{token:a}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a},body:JSON.stringify({node_ids:r})}),{likes:i}=await n.json();return i||[]}catch(e){return console.error(e),[]}},like:async function(r){if(!r)return 0;const{token:a,name:i}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a,UserID:i},body:JSON.stringify({node_id:r,user_name:i})}),{likes:l}=await n.json();return l||0}catch(e){return console.error(e),0}},dislike:async function(r){if(!r)return 0;const{token:a,name:i}=await n();try{const n=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a,UserID:i},body:JSON.stringify({node_id:r,user_name:i})}),{likes:l}=await n.json();return l||0}catch(e){return console.error(e),0}}}},e.MobileBlocks=ht,e.joinList=We,e.projectSettings=i,e.setup=t,e.toMobilePage=function(e){const t=e.blocks?.filter((({mobile:e})=>!e?.hidden)).map(Q);return{...e,blocks:t}},e.url=A,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";const t=(e,r)=>{t._jsx=e,t._jsxs=r||e};t.vue=e=>{t(((t,{children:r,dangerouslySetInnerHTML:n,...a}={})=>{const i=Object.assign({},a,n?{innerHTML:n.__html}:{});return e(t,i,"string"!=typeof t?()=>r:r)}))};const r=(...e)=>t._jsx(...e),n=(...e)=>t._jsxs(...e),a=e=>(e._tmpl||(e._tmpl=function(t,r){const{children:n,...a}=t||{},i=r?.slots?.default,l=n||i&&i();return e(Object.assign(a,l&&{children:l}),r)},e._tmpl.inheritAttrs=!1),e._tmpl),i=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ENABLE_ASSIST(){return this._.ENABLE_ASSIST}get SITEMAP(){return this._.SITEMAP}get CDN(){return this._.CDN}},l="likesToken";const s=a((({HeadComponent:e,data:t,children:a})=>{const{title:i,description:l,keywords:s,robots:c,og:o}=t;return n(e,{children:[r("title",{children:i}),r("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),l&&r("meta",{name:"description",content:l}),s&&r("meta",{name:"keywords",content:s.join(",")}),c&&r("meta",{name:"robots",content:c.join(",")}),o?Object.entries(o).map((([e,t])=>r("meta",{name:`og:${e}`,content:t},e))):null,a]})})),c=a((({className:e,onClick:t,ariaLabel:n})=>r("button",{type:"button",className:`border-0 w-[36px] bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":n,children:o()}))),o=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return n("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[r("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"}),r("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"})]})},d=a((({className:e,context:t})=>{const a=t.useLikeService();return n("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e||""}`,children:[r(c,{onClick:a.like,ariaLabel:"Поставить отметку «лайк»"}),r(c,{onClick:a.dislike,className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),r("span",{className:"select-none",children:a.likeCount})]})})),m={primary:"bg-primary-main",secondary:"bg-white"},h={primary:"text-primary-text",secondary:"text-white"},x=a((({className:e,text:t,children:a,version:i="primary"})=>n("div",{className:`inline-block flex ${e||""}`,role:"listitem",children:[r("div",{className:`inline-block w-[8px] h-[8px] min-w-[8px] min-h-[8px] rounded-full mt-2 ${m[i]}`}),r("span",{className:`text-base font-normal font-sans mx-3 ${h[i]}`,children:t||a})]}))),p={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active"},u={primary:"bg-secondary-dark text-secondary-text",secondary:"bg-secondary-light text-secondary-text"},f="inline-block text-center font-sans select-none",b=a((({className:e,text:t,aboveText:n,appendLeft:a,href:i,target:l,onClick:s,children:c,disabled:o,rounded:d,version:m="none",ariaLabel:h,...x})=>{const b=c??r(g,{text:t,aboveText:n,appendLeft:a,rounded:d});return o?r("div",{role:"button","aria-disabled":"true","aria-label":h,tabIndex:"-1",className:`${f} ${u[m]||""} ${d?"rounded-full":"rounded-md"} ${e||""}`,children:b}):r("a",{className:`${f} cursor-pointer no-underline ${p[m]||""} ${d?"rounded-full":"rounded-md"} ${e||""}`,href:i,target:l,onClick:s,"aria-label":h,role:i?"link":"button",...x,children:b})})),g=a((({text:e,aboveText:t,appendLeft:a,rounded:i})=>{const l=!e&&!t&&Boolean(a);return n("div",{className:`flex items-center justify-center ${l?"h-12 w-12 min-h-12 min-w-12":"px-8 gap-2 "+(t?"py-2":"py-[13px]")} ${i?"rounded-full":""}`,children:[a||null,l?null:n("div",{children:[r("div",{className:"text-xxs text-left",children:t}),r("div",{className:"text-sm font-medium text-left",children:e})]})]})})),v=a((({className:e,name:t,alt:n=`Icon ${t}`,title:a=n,...l})=>r("img",{className:e,src:`${i.CDN||""}icons/${t}.svg`,alt:n,title:a,...l}))),N=a((({className:e,image:t})=>n("picture",{className:`${e||""}`,children:[t.sources?.length?t.sources.map((({src:e,format:t},n)=>r("source",{srcSet:e,type:y(t)},`${n}_${e}`))):null,r("img",{src:t.src,alt:t.alt||t.title,title:t.title,...t?.size})]})));function y(e){return e?`image/${String(e)}`:void 0}var w;!function(e){e.XL="text-title-lg",e.L="text-title",e.M="text-title-sm",e.S="text-title-xs"}(w||(w={}));const k=a((({size:e="L",className:t,children:n,...a})=>r("XL"===e?"h1":"h2",{className:$(w[e],t),...a,children:n}))),$=(...e)=>e.filter(Boolean).join(" "),S="/mobile",C=e=>e?.includes("//"),_=(e,t,r=((e,t)=>e===t))=>r(L(e),j(L(C(e)?t.href:t.pathname))),L=e=>(e||"").replace(/\/?\?.*/,""),j=e=>(e||"").replace(S,""),D=e=>{if(!C(e))return;const t=e,r=t.indexOf("//"),n=t.indexOf("/",r+"//".length);return-1!==n?t.substring(0,n):t},R=(e,t)=>{if(!e)return e;const r=T(e,t),n=t?.pathname.startsWith(S);return n&&!C(r)?`/mobile${r}`:r},T=(e,t)=>{if(!e)return e;const r=D(t?.href);return r?e.replace(r,"")||"/":e};var I=Object.freeze({__proto__:null,MOBILE_URL_PATH:S,isURL:C,isHrefActive:_,withoutQuery:L,withoutMobilePath:j,getOrigin:D,adjustHref:R,toRelativeHref:T});const A=(e,t)=>e;function B({router:e,handlerDecorator:t=A},r){const n=R(r.href,e);return{...r,href:n,ariaLabel:r.text,onClick:t((t=>{const a=n&&!C(n),i=!r.target||"_self"===r.target;a&&i&&(t.preventDefault(),e.push(n))}),r)}}const O=e=>{const t="col-span-",r=e.split(/\s+/).find((e=>e.startsWith(t)));return r?parseInt(r.substring(t.length),10):12},P=a((({className:e,context:t,title:a,titleSize:i,description:l,children:s,buttons:c,image:o,items:d,version:m="primary"})=>{const h=t.useRouter(),{handlerDecorator:x}=t;return n("div",{className:"font-sans flex flex-col grow h-full",children:[a&&r(k,{size:i||M(e),className:"font-medium m-0 mb-4 whitespace-pre-wrap max-w-[600px]",children:a}),n("div",{className:"flex grow justify-between",children:[n("div",{className:"flex flex-col justify-between items-start",children:[n("div",{children:[l?r("div",{className:"font-normal text-base max-w-[600px] mb-5",children:l}):null,s,d?.length?Z(d,m):null]}),c?.length?r("div",{className:"flex mt-9 gap-3",children:c.map(((e,t)=>function({icon:e,...t},n){if(!t?.text)return;return r(b,e?{appendLeft:r(v,{name:e,width:"24",height:"24"}),...t}:{...t},String(n))}(B({router:h,handlerDecorator:x},e),t)))}):null]}),o?.src&&r(N,{className:"mt-auto ml-7",image:o})]})]})}));function M(e=""){const t=O(e);return t<=4?"S":t<=8?"M":"L"}function Z(e=[],t){return r("section",{className:"max-w-[600px]",role:"list",children:e.map(((e,n)=>r(x,{className:n?"mt-2.5":"",text:e,version:t},String(n))))})}const F={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},H=a((e=>{const{children:t,className:n,version:a="primary"}=e;return r("section",{className:`font-sans p-9 min-h-[320px] box-border ${n||""} ${F[a]} ${V(n)} `,children:r(P,{...e,children:t})})}));function V(e=""){const t=O(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const E=a((({className:e,context:t,title:n})=>r(H,{className:e,context:t,title:n,description:"Блок в разработке...",children:r("figure",{className:"m-0 min-w-[600px]",children:z()})}))),z=(e=3)=>G(100,e).map((e=>Math.floor(e))).map(U),U=(e=100,t)=>r("div",{style:{width:`${e}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),G=(e,t)=>[e].concat(t>0?G(e/1.618,t-1):[]),W=({blockClassName:e,block:t,render:r})=>r({blockClassName:e,block:t}),J=a((({className:e,context:t,blocksRegistry:a,data:{style:i,blocks:l,likeControl:s,colorPalette:c="pc"},blockDecorator:o=W})=>n("section",{className:"relative","data-theme":c,children:[r("div",{className:`grid grid-cols-12 gap-1 ${X(i)} ${e||""}`,children:l?.length?l.map((function e(n,i){const{type:l}=n;l in a||console.warn(`No block with "${l}" is registered`);const s=a[l]||E;return o({blockClassName:X(n.style),block:n,render:n=>{const{version:a,content:c,blocks:o}=n.block;return r(s,{className:n.blockClassName,version:a,context:t,...c,children:o?.length?o.map(e):null},`${l}-${i}`)}},`block-${i}`)})):null}),s&&r("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:r(d,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto",context:t})})]})));function X(e){return e?e.join(" "):""}function Q(e){const{mobile:t}=e;return t?{...e,style:t.style?.length?t.style:e.style}:e}const q=a((({className:e,title:t,benefits:a})=>n("section",{className:`font-sans text-primary-text bg-white p-12 pb-2 flex flex-col items-center ${e||""}`,children:[r("h2",{className:"font-medium text-title m-0 max-w-[47rem] text-center",children:t}),a?.length?r("div",{className:"grid grid-cols-2 gap-5 mt-9",children:a.map(K)}):null]}))),K=(e,t)=>n("div",{className:"flex items-center p-10 gap-5 max-w-[580px]",children:[e.icon&&r(v,{className:"h-[70px] w-[70px] min-w-[70px] min-h-[70px]",name:e.icon,width:"70",height:"70"}),n("div",{children:[r("h3",{className:"font-medium text-xl m-0",children:e.label}),e.description&&r("div",{className:"font-normal text-sm mt-2",children:e.description})]})]},String(t)),Y="https://www.cbr-xml-daily.ru/daily_json.js",ee=["USD","EUR"],te={USD:"DollarIcon",EUR:"EuroIcon"},re=[{text:"Все показатели",href:"https://cbr.ru/currency_base/daily/",version:"secondary"}],ne=a((({className:e,context:t,title:a})=>{const{data:i}=t.useAsyncData(Y,le);return r(H,{className:e,context:t,title:a||"Курсы обмена валют",buttons:re,children:n("table",{children:[r("thead",{children:n("tr",{children:[r(ae,{children:"Валюта"}),r(ae,{className:"pl-11",children:"Курс"})]})}),r("tbody",{children:ee.map((e=>{const t=(i?.Valute||{})[e]?.Value;return n("tr",{children:[r(ie,{className:"pt-4",children:n("div",{className:"flex items-center",children:[r(v,{name:te[e],width:"24",height:"24"}),r("span",{className:"ml-2",children:e})]})}),r(ie,{className:"pt-4 pl-11",children:ce(t)})]},e)}))})]})})})),ae=a((({className:e="",children:t})=>r("th",{className:`text-left font-normal text-sm text-secondary-text ${e}`,children:t}))),ie=a((({className:e="",children:t})=>r("td",{className:`text-left font-normal text-base text-primary-text ${e}`,children:t})));async function le(){const e=await fetch(Y);return await e.json()}const se=new Intl.NumberFormat("ru",{style:"currency",currency:"RUB"}),ce=e=>e?se.format(e):"",oe=a((({className:e,viewBox:t,fill:n="none",width:a,height:i,paths:l,...s})=>r("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:a,height:i,children:l.map((({d:e,fill:t,...n},a)=>r("path",{d:e,fill:t||"currentColor",...s,...n},a)))}))),de=["m13.72 25.51 4.42-4.33v-2.95l-4.42 4.32v2.96Zm0-10.98 4.42-4.35V7.41l-4.42 4.31v2.8Zm0 3.63 4.42-4.33v-2.78l-4.42 4.32v2.8ZM12.46 7.44l-.6-.56V0h-.66v6.22l-.58-.57V0h-.67v5l-.59-.58V0H8.7v6.56l4.44 4.33V0h-.67v7.44Zm1.26 14.35 4.42-4.33v-2.78L13.72 19v2.8Zm-5.03-.61 4.44 4.33v-2.96l-4.44-4.32v2.95Zm8.79-16.76-.59.58V0h-.66v5.66l-.6.56V0h-.66v6.87l-.58.57V0h-.67v10.9l4.42-4.34V0h-.66v4.42Zm-8.79 5.76 4.44 4.35v-2.8L8.69 7.4v2.77Zm0 3.65 4.44 4.33v-2.8l-4.44-4.3v2.77Zm0 3.63 4.44 4.33V19l-4.44-4.31v2.78Zm26.37 2.29H24.3a2.25 2.25 0 0 0 .36-1.22 2.32 2.32 0 0 0-2.33-2.31 2.32 2.32 0 0 0-2.31 2.31c0 .5.16.96.43 1.34a.74.74 0 0 0-.33.61c0 .26.14.49.33.62a2.32 2.32 0 0 0-.43 1.34 2.31 2.31 0 0 0 2.31 2.31 2.32 2.32 0 0 0 2.33-2.31c0-.45-.13-.87-.36-1.22h8.01v.49h-.8v.68h.8v.7h-.8v1.3h.8v-.58h1.17v.58h.79v-1.3h-.79v-.7h.79v-.68h-.79v-.5h1.58a.56.56 0 0 0 .56-.56v-.34a.57.57 0 0 0-.56-.56Zm-11.53 2.7a1.2 1.2 0 0 1-2.4 0c0-.24.08-.47.2-.66l.34-.56a.97.97 0 0 1-.34-.75c0-.3.13-.56.33-.74l-.32-.56a1.13 1.13 0 0 1-.2-.66 1.2 1.2 0 0 1 2.4 0c0 .49-.56 1.65-.56 1.65v.62c-.01.01.55 1.17.55 1.66ZM4.67 18.34v2.89c0 2.75 1.2 4.53 1.9 5.21l4.58 4.5c1.28 1.25 1.5 1.66 1.79 2.37v-3.2c0-2.84-1.44-3.94-2.19-4.67-1.73-1.68-2.89-2.8-3.82-3.73a8.98 8.98 0 0 1-2.26-3.37Zm6.08 14.24c-1.73-1.7-2.89-2.8-3.82-3.73a10 10 0 0 1-2.25-2.98v2.49a7.87 7.87 0 0 0 1.89 5.24l4.58 4.47c1.28 1.25 1.5 1.85 1.79 2.55v-3.37c0-2.85-1.45-3.95-2.19-4.67Z","M19.88 5.34c-.32 0-.64 0-.96.02V6.7a18.5 18.5 0 1 1 .95 36.94A18.5 18.5 0 0 1 1.35 25.17c0-5.67 2.55-10.73 6.58-14.13V9.32A19.78 19.78 0 0 0 0 25.17C0 36.12 8.9 45 19.88 45a19.85 19.85 0 0 0 19.86-19.83c0-10.95-8.9-19.83-19.87-19.83Z","M33.93 35.53c.3-.41.6-.85.87-1.3v-2.66h-.87v3.96Zm2.54-4.92c.12-.4.24-.78.34-1.16h-2.88v.7h.43c.77-.02 1.63-.03 2.11.46Zm-19.19-1.27h-.78v7.91h.78v-7.9Z","M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z","M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z"],me=a((({className:e,href:t,children:a,targetBlank:i})=>n("a",{className:`inline-flex items-center font-sans no-underline ${e||""}`,href:t||"https://rshb.ru/",target:i?"_blank":"_self",children:[r(oe,{className:"text-primary-main w-10",viewBox:"0 0 40 45",paths:de.map((e=>({d:e})))}),r("span",{className:"text-black text-base font-medium ml-2.5",children:a||"Россельхозбанк"})]}))),he=a((({className:e,context:t})=>{const{term:a,setTerm:i}=t.useSearch();return n("form",{className:`relative ${e||""}`,children:[n("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[r("div",{className:"w-[24px] h-[24px]",children:r(v,{name:"LoupeIcon",width:"24",height:"24"})}),!a&&r("span",{className:"font-sans font-normal text-base text-secondary-text",children:"Поиск по сайту"})]}),r("input",{className:"pl-12 w-full font-sans font-normal text-base text-black border border-solid border-main-divider rounded h-full box-border outline-none pr-[6%]",value:a,onChange:e=>i(e.target.value),type:"text",name:"s"}),a&&r("button",{type:"submit",className:"absolute font-sans font-normal text-sm cursor-pointer bg-transparent hover:bg-primary-hover active:bg-primary-active text-primary-main hover:text-white border-none px-5 py-2 rounded top-1 right-1 outline-none",onClick:e=>{e.preventDefault(),console.log("click")},children:"Найти"})]})})),xe=a((({className:e,items:t,hasButton:a,context:i})=>{const l=i.useRouter(),{handlerDecorator:s}=i;return n("div",{className:`flex flex-col ${e||""}`,children:[t?.length?t.map(pe):null,a?r(b,{version:"primary",className:"my-4",...B({router:l,handlerDecorator:s},{text:"Обратная связь",href:"/",target:"_blank"})}):null]})})),pe=(e,t)=>{const{type:a,text:i,description:l}=e;return n("div",{className:"mb-4",children:[r("div",{children:ue(a,i)}),r("div",{className:"font-sans text-sm text-secondary-text",children:l})]},String(t))},ue=(e,t)=>{switch(e){case"tel":return r("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`tel:${fe(t)}`,children:t});case"email":return r("a",{className:"font-sans font-medium text-xl text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return r("span",{children:t})}},fe=e=>e.replaceAll(/(\-|\s|\(|\)|\D+)/g,""),be=a((({className:e,links:t,context:n})=>{const a=n.useRouter(),{handlerDecorator:i}=n;return r("div",{className:`${e||""}`,children:t?.length?r("div",{className:"flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider",children:t.map(((e,t)=>r(ge,{index:t,...B({router:a,handlerDecorator:i},e)},String(t))))}):null})})),ge=a((({className:e,index:t,text:n,href:a,target:i,onClick:l})=>r("a",{className:`font-sans font-normal text-sm text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:a,target:i,onClick:l,children:n||`Документ ${t}`}))),ve=e=>t=>e?.href===t?.href;function Ne(e,t){return(n=e,a=t,(n||[]).map((e=>a?.find(ve(e))||e))).concat((r=e,(t||[]).filter((e=>!r?.find(ve(e))))));var r,n,a}function ye(e){const{data:t}=e(ke(),we);return t||{}}async function we(){const e=await fetch(ke());return await e.json()}function ke(){return`/wcms-resources/${i.SITEMAP||"sitemap"}.json`}const $e=a((({className:e,items:t,context:n})=>{const a=Ne(ye(n.useAsyncData).topItems,t),i={router:n.useRouter(),handlerDecorator:n.handlerDecorator};return r("div",{className:`flex items-start justify-start gap-11 xl:gap-5 ${e||""}`,children:a?.map(((e,t)=>Se(e,t,i)))})})),Se=(e,t,{router:a,handlerDecorator:i})=>{const{text:l,href:s,items:c,target:o}=e;return n("div",{className:"flex flex-col w-[235px] gap-[14px]",children:[r("a",{className:"block font-sans font-medium text-base text-primary-text no-underline",href:s,target:o||"_self",children:l||`Раздел ${t}`}),c?.map(((e,t)=>r(Ce,{...B({router:a,handlerDecorator:i},e)},String(t))))]},String(t))},Ce=a((({text:e,href:t,target:n,index:a})=>r("a",{className:"block font-sans font-normal text-base text-secondary-text hover:text-primary-main no-underline",href:t,target:n||"_self",children:e||`Раздел ${a}`}))),_e=[{origins:["t.me","telegram.org"],icon:"TelegramIcon",label:"Телеграм"},{origins:["vk.com"],icon:"VKIcon",label:"ВКонтакте"},{origins:["ok.ru"],icon:"OkIcon",label:"Одноклассники"}],Le=a((({className:e,media:t,context:n})=>{const a=n.useRouter(),{handlerDecorator:i}=n;return r("div",{className:`flex items-end justify-end gap-2 pt-[30px] pb-7 ${e||""}`,children:t?.map(((e,t)=>r(je,{...B({router:a,handlerDecorator:i},e)},String(t))))})})),je=a((({href:e})=>{const{icon:t,label:n}=_e.find((({origins:t})=>t.some((t=>e?.includes(t)))))||{};return t?r(b,{rounded:!0,href:e,target:"_blank",rel:"noopener noreferrer","aria-label":n,className:"border-solid border border-main-divider w-9 h-9 flex items-center justify-center hover:text-primary-main",appendLeft:r(v,{name:t})}):null})),De=a((({className:e,links:t,context:a})=>{const i=a.useRouter(),{handlerDecorator:l}=a;return n("div",{className:`${e||""}`,children:[r("div",{className:"pt-5 pb-[5px]",children:r("span",{className:"font-sans font-normal text-xs text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?r("div",{className:"flex justify-start items-start gap-5 pt-[5px]",children:t.map(((e,t)=>r(Re,{index:t,...B({router:i,handlerDecorator:l},e)},String(t))))}):null]})})),Re=a((({className:e,index:t,text:n,href:a,target:i,onClick:l})=>r("a",{className:`font-sans font-normal text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${e||""}`,href:a,target:i,onClick:l,children:n||`Документ ${t}`}))),Te=a((({className:e,documents:t,relatedEnterprises:a,contacts:i,socialMedia:l,topItems:s,context:c})=>n("footer",{className:`${e} px-9 py-10 bg-white`,children:[n("div",{className:"flex items-stretch gap-32 pb-8 xl:gap-8",children:[r(me,{className:"w-[280px] xl:w-[220px]"}),r(he,{context:c,className:"grow"})]}),n("div",{className:"flex items-stretch gap-32 xl:gap-8",children:[r(xe,{className:"w-[280px] shrink-0 overflow-hidden xl:w-[220px]",items:i,context:c,hasButton:!0}),r($e,{className:"pt-[3px]",context:c,items:s})]}),r(Le,{media:l,context:c}),r(be,{links:a,context:c}),r(De,{links:t,context:c})]}))),Ie=[{d:"m9 12 4-4-4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",fill:"none"},{d:"M2 9a1 1 0 0 1 0-2v2Zm6-2a1 1 0 0 1 0 2V7ZM2 7h6v2H2V7Z"}],Ae=a((({className:e,disabled:t,...n})=>r(b,{rounded:!0,className:`shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...n,children:r(oe,{paths:Ie,viewBox:"0 0 16 16",fill:"none",width:"16",height:"16"})}))),Be={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Oe={normal:380,mini:276},Pe={normal:3,mini:4},Me=a((({title:e,description:t,context:a,cards:i=[],className:l,version:s="normal"})=>{const[c,o]=a.useState(0);const d=i?.length>Pe[s],m=d&&i?.length-c>Pe[s],h=d&&c>0;return n("section",{className:`relative font-sans text-primary-text bg-white p-12 overflow-hidden ${l}`,children:[n("div",{className:"flex flex-col items-center mb-8",children:[e?r(k,{className:"font-medium m-0 text-center",children:e}):null,t?r("div",{className:"font-normal text-base max-w-[600px] mt-3",children:t}):null]}),r("div",{className:`flex ${i?.length<=Pe[s]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${c*Oe[s]}px)`},role:"list",children:i?.map(((e,t)=>function(e,t,a){return n("div",{className:`box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between items-stretch ${Be[a]} w-full`,role:"listitem",children:[n("div",{children:[e.image?.src?r("div",{className:"flex justify-center",children:r(N,{className:"mb-6",image:e.image})}):null,e.title?r("h4",{className:"font-medium text-xl m-0 "+(e.description||e.items?.length?"":"text-center"),children:e.title}):null,e.description?r("div",{className:"font-normal text-sm text-secondary-text mt-2",children:e.description}):null,e.items?.length?r("section",{className:"max-w-[308px] mt-2",role:"list",children:e.items.map(Ze)}):null]}),e.href?r(b,{className:"mt-6",text:"Подробнее",version:"secondary",href:e.href}):null]},String(t))}(e,t,s)))}),h&&r(Ae,{className:"absolute top-1/2 left-8 rotate-180",onClick:function(){o(c-1)},ariaLabel:"Пролистать влево"}),m&&r(Ae,{className:"absolute top-1/2 right-1 z-10",onClick:function(){o(c+1)},ariaLabel:"Пролистать вправо"}),r("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"})]})}));function Ze(e,t){return r(x,{children:r("span",{className:"text-sm text-secondary-text",children:e})},String(t))}const Fe=a((e=>r(Me,{...e,version:"normal"}))),He=a((({className:e,text:t,href:a,target:i,active:l,onClick:s,children:c})=>n("a",{className:`relative inline-block bg-transparent text-center no-underline ${e||""}`,href:a,target:i,onClick:s,children:[r("span",{className:`font-sans font-normal text-base ${l?"text-primary-main":"text-primary-text hover:text-primary-main"}`,children:t||c}),l?r("div",{className:"absolute left-0 -bottom-2 w-full h-[2px] bg-primary-main"}):null]}))),Ve=a((({className:e,text:t,href:n,target:a,active:i,flat:l,onClick:s,children:c,ariaLabel:o})=>r("a",{className:`inline-block border border-solid bg-transparent text-center no-underline ${l?"":"px-4 py-2"} ${i?"border-primary-main rounded-md":"border-transparent"} ${e||""}`,href:n,target:a,onClick:s,rel:"noopener noreferrer","aria-label":o,children:r("span",{className:`font-sans font-normal text-sm ${i?"text-primary-main":(l?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"}`,children:t||c})}))),Ee=a((({className:e,children:t,ariaLabel:n})=>r("button",{type:"button",className:`border-0 p-0 w-[24px] flex items-center bg-inherit cursor-pointer ${e||""}`,disabled:!0,"aria-label":n,children:t}))),ze=a((({context:e,className:t,defaultLocation:a=""})=>{const[i,l]=e.useGeolocation(a);return n("div",{className:`flex items-center ${t||""}`,children:[r(Ve,{className:"mr-5",flat:!0,href:"#",text:i,ariaLabel:"Местоположение",onClick:l}),r(Ve,{className:"mr-7",flat:!0,href:"#",text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов"}),r(Ee,{className:"mr-5 text-primary-text hover:text-primary-main",ariaLabel:"Поиск по сайту",children:r(v,{name:"LoupeIcon","aria-hidden":"true"})}),r(Ee,{className:"mr-5 text-primary-text hover:text-primary-main",ariaLabel:"Профиль",children:r(v,{name:"ProfileIcon","aria-hidden":"true"})}),r(Ee,{className:"mr-5 text-secondary-light hover:text-secondary-active min-w-[32px] min-h-[32px]",ariaLabel:"Дополнительные ссылки",children:r(v,{name:"GridIcon","aria-hidden":"true"})})]})}));const Ue=a((({className:e,defaultLocation:t,context:a,topItems:i})=>{const l=a.useRouter(),s=ye(a.useAsyncData),{handlerDecorator:c}=a,o=Ne(s.topItems,i),d=o.find(function(e){return t=>_(t.href,e,((e,t)=>t.startsWith(e)))}(l)),m=d?.items,h=m?.find(function(e){return t=>_(t.href,e)}(l)),x=o.map(((e,t)=>r(Ve,{active:e===d,...B({router:l,handlerDecorator:c},e),ariaLabel:e.text},String(t)))),p=m?.map((e=>r(He,{className:"mr-8",active:e===h,...B({router:l,handlerDecorator:c},e)},e.href)));return n("header",{className:`pt-5 pb-8 px-20 bg-white ${e||""}`,children:[n("div",{className:"flex items-center",children:[r(me,{className:"mr-8"}),x,r(ze,{context:a,className:"ml-auto",defaultLocation:t})]}),r("div",{className:"mt-5 h-[1px] bg-main-divider"}),r("nav",{className:"mt-5",children:p})]})})),Ge=a((e=>r(Me,{...e,version:"mini"}))),We=a((({className:e,context:t,title:a="Мобильное приложение",qr:i,buttons:l=[]})=>r(H,{className:e,context:t,title:a,buttons:l,children:n("div",{className:"flex items-center",children:[i?.src&&i?.href&&r("a",{href:i.href,target:"_blank",children:r("img",{src:i.src,alt:a,title:a,width:"164",height:"164",className:"w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light"})}),r("span",{className:"font-normal text-sm text-secondary-text ml-4",children:"Наведите камеру телефона на QR-код и скачайте приложение"})]})}))),Je=a((({className:e,context:t,title:a,titleSize:i,description:l,benefits:s,buttons:c,image:o,items:d})=>n("div",{className:`flex grow justify-between items-stretch ${e||""}`,children:[n("div",{className:"flex flex-col",children:[a&&r(k,{size:i||"XL",className:"font-medium m-0 mb-4 whitespace-pre-wrap max-w-[600px] text-primary-text",children:a}),r(P,{context:t,description:l,items:d,buttons:c,children:s?.length?r("div",{className:"flex gap-6 mt-6 mb-3.5",children:s.map(Xe)}):null})]}),o?.src&&r(N,{className:"mt-auto",image:o})]})));function Xe(e,t){return n("div",{className:"flex gap-4 items-center",children:[e.icon&&r(v,{className:"w-[50px] h-[50px] min-w-[50px] min-h-[50px] bg-main rounded-full p-[10px] box-border",name:e.icon,width:"24",height:"24"}),n("div",{className:"flex gap-1 flex-col h-full",children:[r("h4",{className:"font-medium text-primary-text text-xl m-0",children:e.label}),e.description&&r("div",{className:"font-normal text-sm text-secondary-text",children:e.description})]})]},String(t))}const Qe=a((({text:e,href:t,target:n,onClick:a,className:i,children:l})=>t?r("a",{className:`no-underline ${i||""}`,href:t,target:n,onClick:a,children:r("span",{className:`${i||""}`,children:e||l})}):r("span",{className:`${i||""}`,children:e||l})));function qe(e){return t=>t.reduce(((t,r,n)=>t.length?t.concat({...e,key:n},r):[r]),[])}const Ke=a((e=>{const{context:t,className:a,breadcrumbs:i}=e,l=t.useRouter(),{handlerDecorator:s}=t;return n("section",{className:`font-sans bg-white pt-10 pl-[50px] pb-[50px] pr-[7.5rem] ${a||""}`,children:[i?.length?r("div",{className:"text-xs mb-6",children:qe(r("span",{className:"text-secondary-text mx-2",children:"/"}))(i.map(((e,t)=>r(Qe,{...B({router:l,handlerDecorator:s},{className:"text-secondary-text",...e})},String(t)))))}):null,r(Je,{...e})]})})),Ye=a((({className:e,context:t,duration:a=0,slides:i=[]})=>{const l=i.map((e=>e.nav)),s=i.map((e=>e.productBlock)),[c,o]=t.useState(0);return n("section",{className:`font-sans bg-white overflow-hidden w-100 ${e||""}`,children:[r("div",{className:"flex duration-1000",style:{transform:`translateX(-${c}00%)`},role:"list",children:s.map(((e,n)=>function(e,t,n){return r("section",{className:"flex grow-0 shrink-0 basis-full",role:"listitem",children:r("div",{className:"p-10 flex grow",children:r(Je,{className:"pl-2.5 pt-2.5 pb-1.5 pr-[6.25rem]",context:n,...e})})},String(t))}(e,n,t)))}),r("div",{className:"border-t border-solid border-main-divider flex",children:l.map(((e,t)=>function({slide:e,i:t,activeSlideIndex:a,onClick:i,duration:l}){const s=t===a,c=s?"animate-slide":"";return n("button",{type:"button",onClick:i,className:"group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 py-4 grow basis-0",children:[n("div",{className:"border-0 border-r border-solid border-main-divider px-6",children:[r("div",{className:"text-sm font-medium group-hover:text-primary-text "+(s?"text-primary-text":"text-secondary-text"),children:e?.title}),r("div",{className:"text-xs text-secondary-text",children:e.desc})]}),r("div",{className:`absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${c}`,style:{animationDuration:`${l}s`}})]},String(t))}({slide:e,i:t,activeSlideIndex:c,onClick:()=>o(t),duration:a})))})]})}));const et=a((e=>{const{benefits:t,version:a}=e;return r(H,{...e,children:n("div",{className:"flex mt-5 mb-1",children:[t?.length?r("div",{className:"mr-8",children:t.map(tt)}):null,t?.length?r("div",{className:"pt-1",children:t.map(((e,t)=>function(e,t,n="primary"){return r("div",{className:`text-sm ${t?"mt-4":""} ${{primary:"text-secondary-text",secondary:"text-white"}[n]}`,children:e.label},String(t))}(e,t,a)))}):null]})})}));function tt(e,t){return r("div",{className:"text-xl font-medium "+(t?"mt-2.5":""),children:e.description},String(t))}const rt=a((({className:e,context:t,title:a="Акции и спецпредложения",date:i,description:l,buttons:s=[],version:c})=>r(H,{className:e,context:t,title:a,buttons:s,version:c,children:n("div",{children:[i&&r("div",{className:"text-sm mb-2",children:nt(i)}),r("div",{className:"text-base",children:l})]})})));function nt(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const at=a((({className:e,title:t,steps:a})=>n("section",{className:`font-sans text-primary-text bg-white px-12 py-12 flex flex-col items-center ${e||""}`,children:[r(k,{className:"font-medium m-0 max-w-[47rem] text-center",children:t}),a?.length?n("div",{children:[r("div",{className:"flex mt-9 items-center px-[88px]",children:qe(r("div",{className:"h-0.5 w-full bg-secondary-light"}))(a.map(((e,t)=>it(e,t))))}),r("div",{className:"flex mt-9 justify-between gap-x-24",children:a.map(lt)})]}):null]}))),it=(e,t)=>r("div",{className:"flex flex-col items-center text-center relative",children:r("div",{className:"h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10",children:e.icon&&r(v,{name:e.icon,width:"48",height:"48"})||r("span",{className:"font-medium text-title-sm text-secondary-text",children:t+1})})},String(t)),lt=(e,t)=>r("div",{className:"flex flex-col items-center text-center relative w-[276px]",children:n("div",{className:"max-w-min",children:[r("h5",{className:"font-medium text-xl m-0 mt-4 whitespace-nowrap px-3",children:e.label}),e.description&&r("div",{className:"font-normal text-sm text-secondary-text mt-2",children:e.description})]})},String(t)),st={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"}},ct=a((({title:e,description:t,blockVersion:a="primary",iconVersion:i,image:l,className:s})=>{const c=st[a];return n("section",{className:`font-sans px-9 py-4 flex ${c.background} ${s||""}`,children:[i&&"small"===i?ot(c.icon):null,i&&"big"===i?dt(l):null,n("div",{className:"py-0.5",children:[e&&r("div",{className:`font-medium text-base mb-1 ${c.title}`,children:e}),t&&r("div",{className:`text-sm ${c.description}`,children:t})]})]})}));function ot(e){return r("div",{className:"pt-1.5 pr-4",children:r("div",{className:`rounded-full h-4 w-4 text-center text-xs ${e}`,children:"i"})})}function dt(e){return e?.src?r(N,{className:"pt-0.5 pr-3",image:e}):null}const mt=a((({children:e})=>r("div",{className:"self-start flex flex-col",role:"row",children:r("div",{className:"flex",children:e})}))),ht="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",xt="border-main-stroke border-solid border",pt="border-main-divider border border-t-0 border-x-0",ut="w-[200px] mr-6",ft=a((({children:e,activeCardIndex:t})=>r("div",{className:"flex flex-1 overflow-hidden",children:r("div",{className:"flex gap-4 duration-1000",style:{transform:`translateX(-${336*t}px)`},children:e})}))),bt=a((({icon:e,image:t,title:a,link:i})=>n("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-12 ${xt} ${ht}`,role:"columnheader",scope:"col",children:[e&&!t?.src&&r(v,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",name:e,width:"63",height:"63"}),t?.src&&r(N,{className:"mb-4",image:t}),a&&r(k,{size:"S",className:"font-medium m-0 text-center text-white",children:a}),i?.text&&r("div",{className:"mt-auto w-full",children:r(b,{href:i.href,target:i.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:r("div",{className:"text-xs py-[11px]",children:i.text})})})]}))),gt=a((({cell:e,isFirstRow:t,isLastRow:n,isFillGradient:a})=>r("div",{className:`w-80 box-border flex flex-col ${xt} ${n?"border-t-0 rounded-b-md":"border-y-0"} ${a?ht:""}`,role:"cell",children:r("div",{className:`mx-7 h-full ${pt} ${a&&t?"border-t":""} ${n?"":"border-solid"}`,children:e.map(((e,t)=>vt(e,t,a)))})}))),vt=({label:e,description:t},a,i)=>n("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e&&r("h5",{className:"text-xl font-medium m-0 "+(i?"text-white":""),children:e}),t&&r("div",{className:"text-sm opacity-80 "+(i?"text-white":"text-secondary-text"),children:t})]},String(a)),Nt=a((({row:{header:e,data:t},activeCardIndex:a,isColoredFirstColumn:i,isFirstRow:l,isLastRow:s})=>n(mt,{children:[e?.title?r("div",{className:`text-sm py-7 ${pt} w-[200px] mr-6 ${s?"":"border-solid"}`,children:e.title}):null,t?.length?r(ft,{activeCardIndex:a,children:t.map(((e,t)=>r(gt,{cell:e,isFirstRow:l,isLastRow:s,isFillGradient:i&&0===t},String(t))))}):null]}))),yt=a((({className:e,context:t,title:a,rowHeaders:i,columns:l,visibleRowLength:s=0,isColoredFirstColumn:c=!1})=>{const o=t.useRouter(),{handlerDecorator:d}=t,[m,h]=t.useState(0),[x,p]=t.useState(!s),u=l?.map((({header:e})=>e||{})),f=l?.map((({data:e})=>e))||[],b=i?.map(((e,t)=>({header:e,data:f.map((e=>e?.[t]||[{}]))}))).slice(0,x?i.length:s),g=f?.length&&f.length>2,v=g&&f?.length-m>2,N=g&&m>0;return n("section",{className:`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${e||""}`,children:[r(k,{className:"font-medium m-0 max-w-[47rem] text-center mb-9 mx-auto",children:a}),n("div",{role:"table",children:[u?.length?n(mt,{children:[r("div",{className:ut,role:"columnheader",scope:"col"}),r(ft,{activeCardIndex:m,children:u.map(((e,t)=>r(bt,{...e,link:e.link&&B({router:o,handlerDecorator:d},e.link)},String(t))))})]}):null,b?.length?n("div",{className:"relative",children:[b.map(((e,t,{length:n})=>r(Nt,{row:e,isFirstRow:0===t,isLastRow:t+1===n,activeCardIndex:m,isColoredFirstColumn:c},String(t)))),g?r("div",{children:n("div",{className:"absolute top-7 right-7 z-10",children:[r(Ae,{onClick:()=>h(m+1),disabled:!v,ariaLabel:"Пролистать вправо"}),r(Ae,{className:"mt-4 rotate-180",onClick:()=>h(m-1),disabled:!N,ariaLabel:"Пролистать влево"})]})}):null]}):null]}),g?r("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null,s?r("div",{className:"pr-[50px]",children:n("div",{className:"flex w-full",children:[r("div",{className:ut}),r("button",{onClick:()=>p(!x),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:r("div",{className:"font-sans font-medium text-xs py-[11px]",children:x?"Скрыть":"Показать все параметры"})})]})}):null]})})),wt={Header:Ue,Footer:Te,Placeholder:E,Tile:H,PromoTile:rt,TextBlock:ct,ProductTile:et,ProductBlock:Ke,StepsBlock:at,BenefitsBlock:q,ProductGallery:Ye,ExchangeRateTile:ne,MobileAppTile:We,Gallery:Fe,MiniGallery:Ge,ComparisonTable:yt},kt=a((({className:e,context:t})=>r("footer",{className:`${e} px-9 py-2 bg-white rounded-bl-3xl rounded-br-3xl`,children:r(De,{context:t})}))),$t=a((({title:e,description:t,cards:a=[],className:i})=>n("section",{className:`relative font-sans text-primary-text bg-white p-4 overflow-hidden ${i}`,children:[n("div",{className:"flex flex-col items-center mb-8",children:[r(k,{className:"font-medium m-0 text-centers",children:e}),t?r("div",{className:"font-normal text-base max-w-[600px] mt-3",children:t}):null]}),r("div",{className:"horizontal-list no-scrollbar",role:"list",children:a?.map(St)})]})));function St(e,t){return n("div",{className:"box-border horizontal-list-item border-solid border rounded-md border-main-divider p-4 mx-1 flex flex-col justify-between items-stretch",role:"listitem",children:[n("div",{children:[e.image?.src?r("div",{className:"flex justify-center",children:r(N,{className:"mb-6",image:e.image})}):null,e.title?r("h4",{className:"font-medium text-xl m-0 "+(e.description||e.items?.length?"":"text-center"),children:e.title}):null,e.description?r("div",{className:"font-normal text-sm text-secondary-text mt-2",children:e.description}):null,e.items?.length?Ct(e.items):null]}),e.href?r(b,{className:"mt-6",text:"Подробнее",version:"secondary",href:e.href}):null]},t)}function Ct(e=[]){return r("section",{className:"max-w-[308px] mt-2",role:"list",children:e.map(((e,t)=>r(x,{children:r("span",{className:"text-sm text-secondary-text",children:e})},String(t))))})}const _t=a((({titleSize:e,image:t,benefits:n,...a})=>{const{className:i}=a;return r("section",{className:`font-sans bg-white pt-10 pl-[50px] pb-[50px] pr-[7.5rem] ${i||""}`,children:r(Je,{...a,titleSize:"L"})})})),Lt={Header:Ue,Footer:kt,Placeholder:E,Tile:H,ProductTile:et,ProductBlock:_t,TextBlock:ct,ExchangeRateTile:ne,MobileAppTile:We,Gallery:$t};e.Blocks=wt,e.ContentPage=J,e.ContentPageHead=s,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),r=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await r.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.LikeAPI=function(e,t=""){async function r(){try{const e=JSON.parse(globalThis.localStorage.getItem(l)||"");if(e?.token)return e}catch(e){}try{const e=await fetch(`${t}/assist/v1/public/auth`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:r,name:n}=await e.json();return globalThis.localStorage.setItem(l,JSON.stringify({token:r,name:n})),{token:r,name:n}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...n){if(!n.length)return[];const{token:a}=await r();try{const r=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a},body:JSON.stringify({node_ids:n})}),{likes:i}=await r.json();return i||[]}catch(e){return console.error(e),[]}},like:async function(n){if(!n)return 0;const{token:a,name:i}=await r();try{const r=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a,UserID:i},body:JSON.stringify({node_id:n,user_name:i})}),{likes:l}=await r.json();return l||0}catch(e){return console.error(e),0}},dislike:async function(n){if(!n)return 0;const{token:a,name:i}=await r();try{const r=await fetch(`${t}/assist/v1/public/projects/${e}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:a,UserID:i},body:JSON.stringify({node_id:n,user_name:i})}),{likes:l}=await r.json();return l||0}catch(e){return console.error(e),0}}}},e.MobileBlocks=Lt,e.joinList=qe,e.projectSettings=i,e.setup=t,e.toMobilePage=function(e){const t=e.blocks?.filter((({mobile:e})=>!e?.hidden)).map(Q);return{...e,blocks:t}},e.url=I,Object.defineProperty(e,"__esModule",{value:!0})}));
package/dist/BaseTile.js CHANGED
@@ -2,9 +2,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
2
2
  exports.BaseTile = void 0;
3
3
  const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const uni_jsx_1 = require("@redneckz/uni-jsx");
5
- const Img_1 = require("./Img");
6
5
  const BlockItem_1 = require("./ui-kit/BlockItem");
7
- const IconButton_1 = require("./ui-kit/IconButton");
6
+ const Button_1 = require("./ui-kit/Button");
7
+ const Icon_1 = require("./ui-kit/Icon");
8
+ const Img_1 = require("./ui-kit/Img");
8
9
  const Title_1 = require("./ui-kit/Title");
9
10
  const useLink_1 = require("./useLink");
10
11
  const getColSpan_1 = require("./utils/getColSpan");
@@ -29,7 +30,11 @@ function getTitleSizeByClassName(className = '') {
29
30
  function renderItems(items = [], version) {
30
31
  return ((0, jsx_runtime_1.jsx)("section", { className: "max-w-[600px]", role: "list", children: items.map((_, i) => ((0, jsx_runtime_1.jsx)(BlockItem_1.BlockItem, { className: i ? 'mt-2.5' : '', text: _, version: version }, String(i)))) }));
31
32
  }
32
- function renderButton(button, i) {
33
- return button?.text ? (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { ...button }, String(i)) : null;
33
+ function renderButton({ icon, ...button }, i) {
34
+ if (!button?.text)
35
+ return;
36
+ if (icon)
37
+ return ((0, jsx_runtime_1.jsx)(Button_1.Button, { appendLeft: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: icon, width: "24", height: "24" }), ...button }, String(i)));
38
+ return (0, jsx_runtime_1.jsx)(Button_1.Button, { ...button }, String(i));
34
39
  }
35
40
  //# sourceMappingURL=BaseTile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseTile.js","sourceRoot":"","sources":["../src/BaseTile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,+BAA4B;AAG5B,kDAA+C;AAC/C,oDAAiD;AAEjD,0CAAuC;AACvC,uCAAoC;AACpC,mDAAgD;AAIhD,MAAM,aAAa,GAAG,wDAAwD,CAAC;AAElE,QAAA,QAAQ,GAAG,IAAA,aAAG,EACzB,CAAC,EACC,SAAS,EACT,OAAO,EACP,KAAK,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,GAAG,SAAS,GACpB,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IACnC,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;IACrC,OAAO,CACL,iCAAK,SAAS,EAAE,qCAAqC,aAClD,KAAK,IAAI,CACR,uBAAC,aAAK,IAAC,IAAI,EAAE,SAAS,IAAI,uBAAuB,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,aAAa,YACnF,KAAK,GACA,CACT,EACD,iCAAK,SAAS,EAAC,2BAA2B,aACxC,iCAAK,SAAS,EAAC,2CAA2C,aACxD,4CACG,WAAW,CAAC,CAAC,CAAC,CACb,gCAAK,SAAS,EAAC,0CAA0C,YAAE,WAAW,GAAO,CAC9E,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,EACR,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,IAC/C,EACL,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CACjB,gCAAK,SAAS,EAAC,iBAAiB,YAC7B,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAC7B,YAAY,CAAC,IAAA,iBAAO,EAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,CACnE,GACG,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,KAAK,EAAE,GAAG,IAAI,uBAAC,SAAG,IAAC,SAAS,EAAC,cAAc,EAAC,KAAK,EAAE,KAAK,GAAI,IACzD,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,uBAAuB,CAAC,YAAoB,EAAE;IACrD,MAAM,OAAO,GAAG,IAAA,uBAAU,EAAC,SAAS,CAAC,CAAC;IACtC,IAAI,OAAO,IAAI,CAAC,EAAE;QAChB,OAAO,GAAG,CAAC;KACZ;SAAM,IAAI,OAAO,IAAI,CAAC,EAAE;QACvB,OAAO,GAAG,CAAC;KACZ;SAAM;QACL,OAAO,GAAG,CAAC;KACZ;AACH,CAAC;AAED,SAAS,WAAW,CAAC,QAAkB,EAAE,EAAE,OAAsB;IAC/D,OAAO,CACL,oCAAS,SAAS,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,YAC3C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACnB,uBAAC,qBAAS,IAAiB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,IAAlE,MAAM,CAAC,CAAC,CAAC,CAA6D,CACvF,CAAC,GACM,CACX,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,MAAuB,EAAE,CAAS;IACtD,OAAO,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,uBAAC,uBAAU,OAAqB,MAAM,IAArB,MAAM,CAAC,CAAC,CAAC,CAAgB,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1E,CAAC"}
1
+ {"version":3,"file":"BaseTile.js","sourceRoot":"","sources":["../src/BaseTile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAIxC,kDAA+C;AAC/C,4CAAyC;AAEzC,wCAAqC;AACrC,sCAAmC;AACnC,0CAAuC;AACvC,uCAAoC;AACpC,mDAAgD;AAIhD,MAAM,aAAa,GAAG,wDAAwD,CAAC;AAElE,QAAA,QAAQ,GAAG,IAAA,aAAG,EACzB,CAAC,EACC,SAAS,EACT,OAAO,EACP,KAAK,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,GAAG,SAAS,GACpB,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IACnC,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;IACrC,OAAO,CACL,iCAAK,SAAS,EAAE,qCAAqC,aAClD,KAAK,IAAI,CACR,uBAAC,aAAK,IAAC,IAAI,EAAE,SAAS,IAAI,uBAAuB,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,aAAa,YACnF,KAAK,GACA,CACT,EACD,iCAAK,SAAS,EAAC,2BAA2B,aACxC,iCAAK,SAAS,EAAC,2CAA2C,aACxD,4CACG,WAAW,CAAC,CAAC,CAAC,CACb,gCAAK,SAAS,EAAC,0CAA0C,YAAE,WAAW,GAAO,CAC9E,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,EACR,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,IAC/C,EACL,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CACjB,gCAAK,SAAS,EAAC,iBAAiB,YAC7B,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAC7B,YAAY,CAAC,IAAA,iBAAO,EAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,CACnE,GACG,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,KAAK,EAAE,GAAG,IAAI,uBAAC,SAAG,IAAC,SAAS,EAAC,cAAc,EAAC,KAAK,EAAE,KAAK,GAAI,IACzD,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,uBAAuB,CAAC,YAAoB,EAAE;IACrD,MAAM,OAAO,GAAG,IAAA,uBAAU,EAAC,SAAS,CAAC,CAAC;IACtC,IAAI,OAAO,IAAI,CAAC,EAAE;QAChB,OAAO,GAAG,CAAC;KACZ;SAAM,IAAI,OAAO,IAAI,CAAC,EAAE;QACvB,OAAO,GAAG,CAAC;KACZ;SAAM;QACL,OAAO,GAAG,CAAC;KACZ;AACH,CAAC;AAED,SAAS,WAAW,CAAC,QAAkB,EAAE,EAAE,OAAsB;IAC/D,OAAO,CACL,oCAAS,SAAS,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,YAC3C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACnB,uBAAC,qBAAS,IAAiB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,IAAlE,MAAM,CAAC,CAAC,CAAC,CAA6D,CACvF,CAAC,GACM,CACX,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,IAAI,EAAE,GAAG,MAAM,EAAuB,EAAE,CAAS;IACvE,IAAI,CAAC,MAAM,EAAE,IAAI;QAAE,OAAO;IAE1B,IAAI,IAAI;QACN,OAAO,CACL,uBAAC,eAAM,IAEL,UAAU,EAAE,uBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,KACnD,MAAM,IAFL,MAAM,CAAC,CAAC,CAAC,CAGd,CACH,CAAC;IAEJ,OAAO,uBAAC,eAAM,OAAqB,MAAM,IAArB,MAAM,CAAC,CAAC,CAAC,CAAgB,CAAC;AAChD,CAAC"}