@meduza/ui-kit-2 0.8.605 → 0.8.607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Meta/Meta.module.css +5 -0
- package/src/Meta/MetaContainer.tsx +16 -13
- package/dist/AnnouncementInText/AnnouncementInText.types.d.ts +0 -4
- package/dist/AnnouncementInText/index.d.ts +0 -3
- package/dist/BookmarkButton/BookmarkButton.types.d.ts +0 -6
- package/dist/BookmarkButton/index.d.ts +0 -3
- package/dist/Button/Button.d.ts +0 -3
- package/dist/Button/Button.types.d.ts +0 -16
- package/dist/Button/ButtonLoader.d.ts +0 -2
- package/dist/Button/index.d.ts +0 -2
- package/dist/CardTitle/CardTitle.types.d.ts +0 -11
- package/dist/CardTitle/index.d.ts +0 -3
- package/dist/ChapterBlock/ChapterBlock.types.d.ts +0 -8
- package/dist/ChapterBlock/index.d.ts +0 -3
- package/dist/Cover/Cover.types.d.ts +0 -24
- package/dist/Cover/index.d.ts +0 -3
- package/dist/DocumentItemsCount/DocumentItemsCount.types.d.ts +0 -6
- package/dist/DocumentItemsCount/index.d.ts +0 -3
- package/dist/DonatesTeaser/DonatesTeaser.types.d.ts +0 -4
- package/dist/DonatesTeaser/index.d.ts +0 -3
- package/dist/DotsOnImage/DotsOnImage.types.d.ts +0 -46
- package/dist/DotsOnImage/index.d.ts +0 -3
- package/dist/Dropdown/Dropdown.types.d.ts +0 -5
- package/dist/Dropdown/index.d.ts +0 -4
- package/dist/EmbedBlock/EmbedBlock.d.ts +0 -3
- package/dist/EmbedBlock/EmbedBlock.types.d.ts +0 -12
- package/dist/EmbedBlock/EmbedGif.d.ts +0 -3
- package/dist/EmbedBlock/IframeBlock.d.ts +0 -3
- package/dist/EmbedBlock/index.d.ts +0 -3
- package/dist/Footnote/Footnote.types.d.ts +0 -5
- package/dist/Footnote/index.d.ts +0 -3
- package/dist/GroupedBlock/GroupedBlock.types.d.ts +0 -4
- package/dist/GroupedBlock/index.d.ts +0 -3
- package/dist/HalfBlock/HalfBlock.types.d.ts +0 -4
- package/dist/HalfBlock/index.d.ts +0 -3
- package/dist/Image/Image.types.d.ts +0 -35
- package/dist/Image/RenderPicture.d.ts +0 -4
- package/dist/Image/index.d.ts +0 -3
- package/dist/ImportantLead/ImportantLead.types.d.ts +0 -4
- package/dist/ImportantLead/index.d.ts +0 -3
- package/dist/Lazy/Lazy.types.d.ts +0 -4
- package/dist/Lazy/index.d.ts +0 -3
- package/dist/ListBlock/ListBlock.types.d.ts +0 -9
- package/dist/ListBlock/index.d.ts +0 -3
- package/dist/MaterialNote/MaterialNote.types.d.ts +0 -13
- package/dist/MaterialNote/index.d.ts +0 -3
- package/dist/MaterialTitle/MaterialTitle.types.d.ts +0 -4
- package/dist/MaterialTitle/index.d.ts +0 -5
- package/dist/MediaCaption/MediaCaption.types.d.ts +0 -5
- package/dist/MediaCaption/index.d.ts +0 -3
- package/dist/Meta/Meta.mock.d.ts +0 -12
- package/dist/Meta/Meta.types.d.ts +0 -20
- package/dist/Meta/MetaContainer.d.ts +0 -3
- package/dist/Meta/index.d.ts +0 -3
- package/dist/MetaItem/MetaItem.types.d.ts +0 -7
- package/dist/MetaItem/index.d.ts +0 -3
- package/dist/MetaItemLive/MetaItemLive.types.d.ts +0 -3
- package/dist/MetaItemLive/index.d.ts +0 -3
- package/dist/Popover/Popover.types.d.ts +0 -5
- package/dist/Popover/index.d.ts +0 -3
- package/dist/QuoteBlock/QuoteBlock.types.d.ts +0 -6
- package/dist/QuoteBlock/index.d.ts +0 -3
- package/dist/RawHtmlBlock/RawHtmlBlock.types.d.ts +0 -18
- package/dist/RawHtmlBlock/index.d.ts +0 -3
- package/dist/RelatedBlock/RelatedBlock.types.d.ts +0 -17
- package/dist/RelatedBlock/index.d.ts +0 -3
- package/dist/RelatedBook/RelatedBook.mock.d.ts +0 -65
- package/dist/RelatedBook/RelatedBook.types.d.ts +0 -4
- package/dist/RelatedBook/index.d.ts +0 -3
- package/dist/RelatedRichBlock/RelatedRichBlock.types.d.ts +0 -4
- package/dist/RelatedRichBlock/index.d.ts +0 -3
- package/dist/RenderBlocks/RenderBlocks.types.d.ts +0 -12
- package/dist/RenderBlocks/index.d.ts +0 -3
- package/dist/RichTitle/RichTitle.types.d.ts +0 -12
- package/dist/RichTitle/index.d.ts +0 -3
- package/dist/SensitiveBlock/SensitiveBlock.types.d.ts +0 -15
- package/dist/SensitiveBlock/index.d.ts +0 -3
- package/dist/ShopRelatedBlock/ShopRelatedBlock.types.d.ts +0 -4
- package/dist/ShopRelatedBlock/index.d.ts +0 -3
- package/dist/SimpleBlock/SimpleBlock.types.d.ts +0 -5
- package/dist/SimpleBlock/index.d.ts +0 -3
- package/dist/SimpleTitle/SimpleTitle.types.d.ts +0 -9
- package/dist/SimpleTitle/index.d.ts +0 -3
- package/dist/SourceBlock/SourceBlock.types.d.ts +0 -15
- package/dist/SourceBlock/index.d.ts +0 -3
- package/dist/Spoiler/Spoiler.types.d.ts +0 -4
- package/dist/Spoiler/index.d.ts +0 -3
- package/dist/SvgSymbol/SvgSymbol.types.d.ts +0 -8
- package/dist/SvgSymbol/icons.d.ts +0 -182
- package/dist/SvgSymbol/index.d.ts +0 -3
- package/dist/Switcher/Switcher.types.d.ts +0 -12
- package/dist/Switcher/index.d.ts +0 -3
- package/dist/Table/Table.types.d.ts +0 -25
- package/dist/Table/index.d.ts +0 -3
- package/dist/Tag/Tag.types.d.ts +0 -12
- package/dist/Tag/index.d.ts +0 -3
- package/dist/Timestamp/Timestamp.types.d.ts +0 -5
- package/dist/Timestamp/index.d.ts +0 -4
- package/dist/Toolbar/Toolbar.d.ts +0 -3
- package/dist/Toolbar/Toolbar.types.d.ts +0 -7
- package/dist/Toolbar/ToolbarItem.d.ts +0 -3
- package/dist/Toolbar/index.d.ts +0 -2
- package/dist/ToolbarButton/ToolbarButton.types.d.ts +0 -10
- package/dist/ToolbarButton/index.d.ts +0 -3
- package/dist/Tooltip/Tooltip.d.ts +0 -3
- package/dist/Tooltip/Tooltip.types.d.ts +0 -8
- package/dist/Tooltip/TooltipFooter.d.ts +0 -3
- package/dist/Tooltip/index.d.ts +0 -2
- package/dist/VersesBlock/VersesBlock.types.d.ts +0 -9
- package/dist/VersesBlock/index.d.ts +0 -3
- package/dist/constants.d.ts +0 -41
- package/dist/index.d.ts +0 -45
- package/dist/types.d.ts +0 -20
- package/dist/ui-kit-2.cjs.development.js +0 -2872
- package/dist/ui-kit-2.cjs.development.js.map +0 -1
- package/dist/ui-kit-2.cjs.production.min.js +0 -2
- package/dist/ui-kit-2.cjs.production.min.js.map +0 -1
- package/dist/ui-kit-2.esm.js +0 -2818
- package/dist/ui-kit-2.esm.js.map +0 -1
- package/dist/ui-kit-game.css +0 -7084
- package/dist/ui-kit.css +0 -7084
- package/dist/utils/BlockContext.d.ts +0 -8
- package/dist/utils/DangerousHtml.d.ts +0 -8
- package/dist/utils/capitalizeFirstLetter.d.ts +0 -1
- package/dist/utils/converCase.d.ts +0 -2
- package/dist/utils/generateGradient.d.ts +0 -2
- package/dist/utils/getElementPositionRelativeToViewport.d.ts +0 -2
- package/dist/utils/makeClassName.d.ts +0 -3
- package/dist/utils/makeStyleContext.d.ts +0 -3
- package/dist/utils/pluralize.d.ts +0 -2
- package/dist/utils/postMessage.d.ts +0 -2
- package/dist/utils/viewportSize.d.ts +0 -6
package/dist/ui-kit-2.esm.js
DELETED
|
@@ -1,2818 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect, useContext, useRef, useCallback } from 'react';
|
|
2
|
-
import { useInView } from 'react-intersection-observer';
|
|
3
|
-
import dayjs from 'dayjs';
|
|
4
|
-
import 'dayjs/locale/ru';
|
|
5
|
-
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
6
|
-
import { Link } from 'react-router-dom';
|
|
7
|
-
|
|
8
|
-
const makeClassName = list => {
|
|
9
|
-
return list.filter(([, active]) => active).map(([className]) => className).join(' ');
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const ButtonLoader = () => ( /*#__PURE__*/React.createElement("svg", {
|
|
13
|
-
width: "30px",
|
|
14
|
-
height: "30px",
|
|
15
|
-
viewBox: "0 0 30 30",
|
|
16
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
17
|
-
}, /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
18
|
-
d: "M15 0C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15zm0 2c7.18 0 13 5.82 13 13s-5.82 13-13 13S2 22.18 2 15 7.82 2 15 2z",
|
|
19
|
-
opacity: "0.3"
|
|
20
|
-
})), /*#__PURE__*/React.createElement("g", {
|
|
21
|
-
fillRule: "evenodd"
|
|
22
|
-
}, /*#__PURE__*/React.createElement("animateTransform", {
|
|
23
|
-
attributeName: "transform",
|
|
24
|
-
type: "rotate",
|
|
25
|
-
from: "0 15 15",
|
|
26
|
-
to: "360 15 15",
|
|
27
|
-
dur: "1000ms",
|
|
28
|
-
repeatCount: "indefinite"
|
|
29
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
30
|
-
d: "M15 0c8.18 0 14.83 6.547 14.997 14.686L30 15h-2c0-7.077-5.655-12.833-12.693-12.996L15 2V0z"
|
|
31
|
-
}))));
|
|
32
|
-
|
|
33
|
-
var styles$I = {"root":"Button-module_root__9OQ5b","gold":"Button-module_gold__q-XBP","isLoading":"Button-module_isLoading__Z53G4","gray":"Button-module_gray__fypDq","sand":"Button-module_sand__e5v-k","dark":"Button-module_dark__qv4NQ","light":"Button-module_light__TLYLT","black":"Button-module_black__GIsbk","red":"Button-module_red__kybni","default":"Button-module_default__utLb-","isInSpoiler":"Button-module_isInSpoiler__pGp-w","ghost":"Button-module_ghost__1s5-r","isInDropdown":"Button-module_isInDropdown__gN7TI","loader":"Button-module_loader__r0Mjs","isFancy":"Button-module_isFancy__gTRmu"};
|
|
34
|
-
|
|
35
|
-
const Button = ({
|
|
36
|
-
theme = 'gold',
|
|
37
|
-
size = 'default',
|
|
38
|
-
state = 'isDefault',
|
|
39
|
-
styleContext = 'isInToolbar',
|
|
40
|
-
appearance,
|
|
41
|
-
disabled = false,
|
|
42
|
-
onClick,
|
|
43
|
-
children
|
|
44
|
-
}) => {
|
|
45
|
-
const handleClick = () => {
|
|
46
|
-
if (disabled || !onClick) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
onClick();
|
|
50
|
-
};
|
|
51
|
-
return /*#__PURE__*/React.createElement("button", {
|
|
52
|
-
"data-testid": "button",
|
|
53
|
-
className: makeClassName([[styles$I.root, true], [styles$I[size], !!size], [styles$I[theme], !!theme], [styles$I[appearance], !!appearance], [styles$I[state], !!state && !!styles$I[state]], [styles$I[styleContext], !!styleContext]]),
|
|
54
|
-
disabled: disabled,
|
|
55
|
-
onClick: handleClick,
|
|
56
|
-
type: "button"
|
|
57
|
-
}, state === 'isLoading' ? ( /*#__PURE__*/React.createElement("span", {
|
|
58
|
-
className: styles$I.loader
|
|
59
|
-
}, /*#__PURE__*/React.createElement(ButtonLoader, null))) : children);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const icons = {
|
|
63
|
-
meduzaLogo: {
|
|
64
|
-
width: 544,
|
|
65
|
-
height: 115,
|
|
66
|
-
content: '<path d="M59.1008614,49.65632 L59.1008614,106.01472 L84.9480411,114.24 L84.9480411,49.65632 L101.574882,49.65632 L101.574882,106.01472 L127.270909,114.24 L144.048902,91.392 L127.422062,91.392 L127.422062,35.7952 L101.726035,26.80832 L84.9480411,46.60992 L84.9480411,35.7952 L59.2520145,26.80832 L42.4740206,46.60992 L42.4740206,35.7952 L16.7779939,26.80832 L0,49.65632 L16.6268408,49.65632 L16.6268408,106.01472 L42.4740206,114.24 L42.4740206,49.65632 L59.1008614,49.65632 L59.1008614,49.65632 Z M336.61795,91.392 L336.61795,35.0336 L310.770769,26.80832 L310.770769,105.25312 L336.466796,114.24 L353.24479,94.4384 L353.24479,105.25312 L378.940817,114.24 L395.71881,91.392 L379.091969,91.392 L379.091969,35.0336 L353.24479,26.80832 L353.24479,91.392 L336.61795,91.392 L336.61795,91.392 Z M527.373159,38.08 L502.130592,26.80832 L472.202278,41.1264 L502.130592,52.39808 L461.016949,72.352 L461.016949,104.94848 L486.86413,114.24 L502.130592,94.28608 L502.130592,105.25312 L527.977771,114.24 L544,91.23968 L527.373159,91.23968 L527.373159,38.08 L527.373159,38.08 Z M177.453737,114.24 L207.079744,102.35904 L177.453737,91.23968 L177.453737,75.24608 L216.300083,56.3584 L194.231731,26.80832 L151.606557,47.37152 L151.606557,103.12064 L177.453737,114.24 L177.453737,114.24 Z M455.424284,89.56416 L423.984441,79.968 L453.459295,42.19264 L416.577937,26.80832 L397.230341,51.48416 L428.821339,61.23264 L398.741873,98.85568 L436.076687,114.24 L455.424284,89.56416 L455.424284,89.56416 Z M486.86413,91.392 L486.86413,68.84864 L502.130592,61.53728 L502.130592,91.392 L486.86413,91.392 L486.86413,91.392 Z M177.453737,41.58336 L190.452904,59.55712 L177.453737,65.80224 L177.453737,41.58336 L177.453737,41.58336 Z M222.95082,103.12064 L248.797999,114.24 L291.27202,97.18016 L291.27202,29.7024 L222.95082,0 L222.95082,26.30784 L265.424841,43.21536 L265.424841,97.33248 L248.797999,91.23968 L248.797999,43.71584 L222.95082,51.94112 L222.95082,103.12064 L222.95082,103.12064 Z" />'
|
|
67
|
-
},
|
|
68
|
-
menu: {
|
|
69
|
-
width: 24,
|
|
70
|
-
height: 24,
|
|
71
|
-
content: '<path d="M2 21h20M2 12h20M2 3h20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" vector-effect="non-scaling-stroke" />'
|
|
72
|
-
},
|
|
73
|
-
fb: {
|
|
74
|
-
width: 16,
|
|
75
|
-
height: 18,
|
|
76
|
-
content: '<path d="M15.117 1H.883A.883.883 0 0 0 0 1.883v14.234A.883.883 0 0 0 .883 17h7.663v-6.196H6.461V8.389h2.085V6.61a2.91 2.91 0 0 1 3.106-3.192c.622-.003 1.244.03 1.863.095v2.16h-1.279c-1.002 0-1.196.476-1.196 1.176v1.541h2.39l-.31 2.415h-2.08V17h4.077a.883.883 0 0 0 .883-.883V1.883A.883.883 0 0 0 15.117 1" />'
|
|
77
|
-
},
|
|
78
|
-
tw: {
|
|
79
|
-
width: 20,
|
|
80
|
-
height: 18,
|
|
81
|
-
content: '<path d="M20 3.1c-.7.3-1.5.6-2.4.7.8-.5 1.5-1.4 1.8-2.4-.8.5-1.7.8-2.6 1-.7-.8-1.8-1.4-3-1.4-2.3 0-4.1 1.9-4.1 4.3 0 .3 0 .7.1 1-3.3-.1-6.4-1.8-8.4-4.4-.3.6-.5 1.4-.5 2.2 0 1.5.7 2.8 1.8 3.6-.7 0-1.3-.2-1.9-.5v.1c0 2.1 1.4 3.8 3.3 4.2-.3.1-.7.2-1.1.2-.3 0-.5 0-.8-.1.5 1.7 2 2.9 3.8 3-1.3 1-3.1 1.6-5 1.6-.3 0-.7 0-1-.1C1.8 17.3 4 18 6.3 18 13.8 18 18 11.5 18 5.8v-.6c.8-.5 1.5-1.2 2-2.1" fill-rule="nonzero"/>'
|
|
82
|
-
},
|
|
83
|
-
vk: {
|
|
84
|
-
width: 20,
|
|
85
|
-
height: 18,
|
|
86
|
-
content: '<path d="M16.517 9.851s2.587-3.768 2.886-5.058c.1-.396-.1-.694-.498-.694h-2.288c-.498 0-.697.199-.896.595 0 0-1.194 2.678-2.686 4.364-.498.496-.697.694-.995.694-.2 0-.299-.198-.299-.694V4.793c0-.595-.1-.793-.597-.793H7.463c-.2 0-.398.198-.398.397 0 .595.796.694.796 2.28v3.174c0 .595 0 .893-.299.893-.796 0-2.686-2.777-3.681-5.851-.2-.595-.398-.794-.995-.794H.597C.299 4.1 0 4.298 0 4.694c0 .595.697 3.471 3.483 7.34C5.373 14.611 7.86 16 10.05 16c1.393 0 1.691-.198 1.691-.793v-1.984c0-.496.2-.694.498-.694s.895.1 2.189 1.388C15.92 15.405 16.02 16 16.915 16h2.587c.299 0 .498-.1.498-.595 0-.595-.796-1.587-1.89-2.876-.498-.595-1.195-1.29-1.493-1.686-.398-.397-.299-.595-.1-.992" fill-rule="nonzero"/>'
|
|
87
|
-
},
|
|
88
|
-
ok: {
|
|
89
|
-
width: 9,
|
|
90
|
-
height: 18,
|
|
91
|
-
content: '<path d="M4.5 2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4m0 5.7c-.9 0-1.6-.8-1.6-1.7 0-.9.7-1.6 1.6-1.6.9 0 1.7.7 1.7 1.7 0 .8-.8 1.6-1.7 1.6" fill-rule="nonzero"/> <path d="M6.127 12.982a9.194 9.194 0 0 0 2.307-.904c.602-.301.703-1.004.402-1.507-.301-.502-1.104-.703-1.605-.401-1.605 1.004-3.812 1.004-5.417 0-.502-.302-1.304-.201-1.605.3-.401.604-.2 1.206.401 1.608a9.194 9.194 0 0 0 2.307.904L.61 15.092c-.502.401-.502 1.104 0 1.607a1.357 1.357 0 0 0 1.705 0l2.207-2.11L6.73 16.7a1.357 1.357 0 0 0 1.705 0c.502-.402.502-1.105 0-1.608l-2.307-2.109" fill-rule="nonzero"/>'
|
|
92
|
-
},
|
|
93
|
-
tg: {
|
|
94
|
-
width: 18,
|
|
95
|
-
height: 18,
|
|
96
|
-
content: '<path d="M9 18c-5 0-9-4-9-9s4-9 9-9 9 4 9 9-4 9-9 9zm-1.5-7.4c1.1 1 2 3.3 2 3.3.4.2.7.1.8-.4l2.1-7.4c.1-.6-.2-.8-.6-.7L4 8.3c-.6.2-.6.5-.1.7 0 .1 2.4.6 3.6 1.6z" fill-rule="nonzero"/>'
|
|
97
|
-
},
|
|
98
|
-
meduzaSymbol: {
|
|
99
|
-
width: 24,
|
|
100
|
-
height: 18,
|
|
101
|
-
content: '<path d="M10.026233,17.0968697 L13.9737671,18.3530831 L13.9737671,10.9855851 L13.9737671,8.48948164 L16.5131165,8.48948164 L16.5131165,17.0968697 L20.4375656,18.3530831 L23,14.8636014 L20.4606507,14.8636014 L20.4606507,6.37252945 L16.5362015,5 L13.9737671,8.02421743 L13.9737671,6.37252945 L10.049318,5 L7.48688354,8.02421743 L7.48688354,6.37252945 L3.56243443,5 L1,8.48948164 L3.53934943,8.48948164 L3.53934943,17.0968697 L7.48688354,18.3530831 L7.48688354,8.48948164 L10.026233,8.48948164 L10.026233,17.0968697 Z" />'
|
|
102
|
-
},
|
|
103
|
-
backward: {
|
|
104
|
-
width: 25,
|
|
105
|
-
height: 27,
|
|
106
|
-
content: '<path d="M13 0v2.01c6.672.263 12 5.754 12 12.49C25 21.404 19.404 27 12.5 27S0 21.404 0 14.5c0-3.493 1.441-6.758 3.936-9.105a.75.75 0 111.028 1.092A10.965 10.965 0 001.5 14.5c0 6.075 4.925 11 11 11s11-4.925 11-11c0-5.907-4.656-10.727-10.499-10.989L13 6 8 3l5-3zm3.295 11.33v1.25h-3.16v1.63c.32-.32.86-.56 1.47-.56 1.13 0 2.14.81 2.14 2.16 0 1.42-1.06 2.31-2.67 2.31-1.16 0-2-.38-2.57-1l.79-.99c.45.47 1.07.73 1.77.73.79 0 1.24-.45 1.24-.99 0-.59-.44-.99-1.2-.99-.55 0-1 .16-1.4.54l-.99-.26v-3.83h4.58zm-5.94 0V18h-1.42v-4.84l-1.11 1.13-.81-.85 2.1-2.11h1.24z" fill-rule="nonzero"/>'
|
|
107
|
-
},
|
|
108
|
-
forward: {
|
|
109
|
-
width: 25,
|
|
110
|
-
height: 27,
|
|
111
|
-
content: '<path d="M12 0l5 3-5 3V3.511C6.157 3.773 1.5 8.592 1.5 14.5c0 6.075 4.925 11 11 11s11-4.925 11-11c0-3.075-1.267-5.946-3.464-8.013a.75.75 0 011.028-1.092A12.465 12.465 0 0125 14.5C25 21.404 19.404 27 12.5 27S0 21.404 0 14.5C0 7.764 5.328 2.272 12 2.01V0zm4.295 11.33v1.25h-3.16v1.63c.32-.32.86-.56 1.47-.56 1.13 0 2.14.81 2.14 2.16 0 1.42-1.06 2.31-2.67 2.31-1.16 0-2-.38-2.57-1l.79-.99c.45.47 1.07.73 1.77.73.79 0 1.24-.45 1.24-.99 0-.59-.44-.99-1.2-.99-.55 0-1 .16-1.4.54l-.99-.26v-3.83h4.58zm-5.94 0V18h-1.42v-4.84l-1.11 1.13-.81-.85 2.1-2.11h1.24z" fill-rule="nonzero"/>'
|
|
112
|
-
},
|
|
113
|
-
download: {
|
|
114
|
-
width: 25,
|
|
115
|
-
height: 27,
|
|
116
|
-
content: '<path d="M12.5 2C19.404 2 25 7.596 25 14.5S19.404 27 12.5 27 0 21.404 0 14.5 5.596 2 12.5 2zm0 1.5c-6.075 0-11 4.925-11 11s4.925 11 11 11 11-4.925 11-11-4.925-11-11-11zm6 15.75a.75.75 0 01.102 1.493l-.102.007h-12a.75.75 0 01-.102-1.493l.102-.007h12zm-6-12a.75.75 0 01.743.648L13.25 8v7.598l1.834-1.222a.75.75 0 11.832 1.248l-3 2a.75.75 0 01-.832 0l-3-2a.75.75 0 11.832-1.248l1.834 1.223V8a.75.75 0 01.648-.743l.102-.007z" fill-rule="nonzero" fill="currentColor" />'
|
|
117
|
-
},
|
|
118
|
-
episodeDownload: {
|
|
119
|
-
width: 30,
|
|
120
|
-
height: 30,
|
|
121
|
-
content: '<g opacity="0.4"><circle cx="15" cy="15" r="10.5" stroke="white" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/><path d="M15 19.5L15 10.5M15 19.5L18.5 17.2257M15 19.5L11.5 17.2257" stroke="white" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/></g>'
|
|
122
|
-
},
|
|
123
|
-
play: {
|
|
124
|
-
width: 62,
|
|
125
|
-
height: 62,
|
|
126
|
-
content: '<path d="M24.35 41.772a.5.5 0 0 1-.739-.439V20.667a.5.5 0 0 1 .74-.44l18.944 10.334a.5.5 0 0 1 0 .878L24.351 41.772z" fill-rule="nonzero"/>'
|
|
127
|
-
},
|
|
128
|
-
pause: {
|
|
129
|
-
width: 22,
|
|
130
|
-
height: 22,
|
|
131
|
-
content: '<path d="M12.832 4h2.8c.276 0 .5.224.5.5v12.394c0 .277-.224.5-.5.5h-2.8c-.276 0-.5-.223-.5-.5V4.5c0-.276.224-.5.5-.5zM6.5 4h2.8c.277 0 .5.224.5.5v12.394c0 .277-.223.5-.5.5H6.5c-.276 0-.5-.223-.5-.5V4.5c0-.276.224-.5.5-.5z" />'
|
|
132
|
-
},
|
|
133
|
-
speedHalf: {
|
|
134
|
-
width: 27,
|
|
135
|
-
height: 11,
|
|
136
|
-
content: `<g xmlns="http://www.w3.org/2000/svg" opacity="0.25">
|
|
137
|
-
<path d="M24.0086 6.10773L22.3566 7.75973C22.2586 7.85773 22.1186 7.92773 21.9646 7.92773C21.6566 7.92773 21.4186 7.67573 21.4186 7.38173C21.4186 7.22773 21.4886 7.08773 21.5726 6.98973L23.2246 5.32373L21.5726 3.67173C21.4886 3.57373 21.4186 3.43373 21.4186 3.27973C21.4186 2.97173 21.6566 2.71973 21.9646 2.71973C22.1186 2.71973 22.2726 2.78973 22.3706 2.88773L24.0086 4.55373L25.6606 2.88773C25.7586 2.78973 25.9126 2.73373 26.0526 2.73373C26.3606 2.73373 26.6126 2.97173 26.6126 3.27973C26.6126 3.43373 26.5426 3.57373 26.4446 3.67173L24.7926 5.32373L26.4446 6.98973C26.5426 7.08773 26.6126 7.22773 26.6126 7.38173C26.6126 7.67573 26.3606 7.91373 26.0526 7.91373C25.9126 7.91373 25.7726 7.85773 25.6746 7.75973L24.0086 6.10773Z" fill="black"/>
|
|
138
|
-
<path d="M13.307 9.31411C13.083 9.17411 12.915 8.88011 12.915 8.58611C12.915 8.09611 13.307 7.70411 13.797 7.70411C13.965 7.70411 14.133 7.74611 14.273 7.84411C14.847 8.25011 15.505 8.43211 16.233 8.43211C17.339 8.43211 17.969 7.80211 17.969 7.03211C17.969 6.17811 17.353 5.60411 16.289 5.60411C15.673 5.60411 15.155 5.75811 14.665 6.13611C14.483 6.27611 14.259 6.34611 14.007 6.34611C13.419 6.34611 12.943 5.87011 12.943 5.28211V1.71211C12.943 1.04011 13.307 0.662109 13.993 0.662109H18.599C19.061 0.662109 19.467 1.04011 19.467 1.53011C19.467 1.99211 19.061 2.37011 18.599 2.37011H14.889V4.70811C15.379 4.27411 16.135 3.92411 16.989 3.92411C18.571 3.92411 19.985 5.05811 19.985 6.94811C19.985 8.92211 18.501 10.1681 16.247 10.1681C15.029 10.1681 14.077 9.86011 13.307 9.31411Z" fill="black"/>
|
|
139
|
-
<path d="M9.03894 9.01974C9.03894 8.40374 9.55694 7.88574 10.1729 7.88574C10.7889 7.88574 11.3069 8.40374 11.3069 9.01974C11.3069 9.63574 10.7889 10.1537 10.1729 10.1537C9.55694 10.1537 9.03894 9.63574 9.03894 9.01974Z" fill="black"/>
|
|
140
|
-
<path d="M0.476074 5.33748C0.476074 2.92948 1.66607 0.521484 4.34007 0.521484C7.00007 0.521484 8.20407 2.92948 8.20407 5.33748C8.20407 7.74548 7.00007 10.1675 4.34007 10.1675C1.66607 10.1675 0.476074 7.74548 0.476074 5.33748ZM6.17407 5.33748C6.17407 3.61548 5.67007 2.28549 4.34007 2.28549C2.99607 2.28549 2.49207 3.61548 2.49207 5.33748C2.49207 7.05948 2.99607 8.40349 4.34007 8.40349C5.67007 8.40349 6.17407 7.05948 6.17407 5.33748Z" fill="black"/>
|
|
141
|
-
</g>`
|
|
142
|
-
},
|
|
143
|
-
speedThreeQuarters: {
|
|
144
|
-
width: 34,
|
|
145
|
-
height: 11,
|
|
146
|
-
content: `<g xmlns="http://www.w3.org/2000/svg" opacity="0.25">
|
|
147
|
-
<path d="M30.6531 6.10773L29.0011 7.75973C28.9031 7.85773 28.7631 7.92773 28.6091 7.92773C28.3011 7.92773 28.0631 7.67573 28.0631 7.38173C28.0631 7.22773 28.1331 7.08773 28.2171 6.98973L29.8691 5.32373L28.2171 3.67173C28.1331 3.57373 28.0631 3.43373 28.0631 3.27973C28.0631 2.97173 28.3011 2.71973 28.6091 2.71973C28.7631 2.71973 28.9171 2.78973 29.0151 2.88773L30.6531 4.55373L32.3051 2.88773C32.4031 2.78973 32.5571 2.73373 32.6971 2.73373C33.0051 2.73373 33.2571 2.97173 33.2571 3.27973C33.2571 3.43373 33.1871 3.57373 33.0891 3.67173L31.4371 5.32373L33.0891 6.98973C33.1871 7.08773 33.2571 7.22773 33.2571 7.38173C33.2571 7.67573 33.0051 7.91373 32.6971 7.91373C32.5571 7.91373 32.4171 7.85773 32.3191 7.75973L30.6531 6.10773Z" fill="black"/>
|
|
148
|
-
<path d="M19.9516 9.31411C19.7276 9.17411 19.5596 8.88011 19.5596 8.58611C19.5596 8.09611 19.9516 7.70411 20.4416 7.70411C20.6096 7.70411 20.7776 7.74611 20.9176 7.84411C21.4916 8.25011 22.1496 8.43211 22.8776 8.43211C23.9836 8.43211 24.6136 7.80211 24.6136 7.03211C24.6136 6.17811 23.9976 5.60411 22.9336 5.60411C22.3176 5.60411 21.7996 5.75811 21.3096 6.13611C21.1276 6.27611 20.9036 6.34611 20.6516 6.34611C20.0636 6.34611 19.5876 5.87011 19.5876 5.28211V1.71211C19.5876 1.04011 19.9516 0.662109 20.6376 0.662109H25.2436C25.7056 0.662109 26.1116 1.04011 26.1116 1.53011C26.1116 1.99211 25.7056 2.37011 25.2436 2.37011H21.5336V4.70811C22.0236 4.27411 22.7796 3.92411 23.6336 3.92411C25.2156 3.92411 26.6296 5.05811 26.6296 6.94811C26.6296 8.92211 25.1456 10.1681 22.8916 10.1681C21.6736 10.1681 20.7216 9.86011 19.9516 9.31411Z" fill="black"/>
|
|
149
|
-
<path d="M14.1437 10.0981C13.5977 10.0981 13.1497 9.65011 13.1497 9.10411C13.1497 8.96411 13.1917 8.83811 13.2337 8.69811L16.0197 2.41211H12.0997C11.6237 2.41211 11.2177 2.02011 11.2177 1.54411C11.2177 1.05411 11.6237 0.662109 12.0997 0.662109H17.4757C17.9937 0.662109 18.4277 1.08211 18.4277 1.61411C18.4277 1.75411 18.3997 1.88011 18.3437 1.99211L15.0677 9.49611C14.9277 9.86011 14.5637 10.0981 14.1437 10.0981Z" fill="black"/>
|
|
150
|
-
<path d="M9.03894 9.01974C9.03894 8.40374 9.55694 7.88574 10.1729 7.88574C10.7889 7.88574 11.3069 8.40374 11.3069 9.01974C11.3069 9.63574 10.7889 10.1537 10.1729 10.1537C9.55694 10.1537 9.03894 9.63574 9.03894 9.01974Z" fill="black"/>
|
|
151
|
-
<path d="M0.476074 5.33748C0.476074 2.92948 1.66607 0.521484 4.34007 0.521484C7.00007 0.521484 8.20407 2.92948 8.20407 5.33748C8.20407 7.74548 7.00007 10.1675 4.34007 10.1675C1.66607 10.1675 0.476074 7.74548 0.476074 5.33748ZM6.17407 5.33748C6.17407 3.61548 5.67007 2.28549 4.34007 2.28549C2.99607 2.28549 2.49207 3.61548 2.49207 5.33748C2.49207 7.05948 2.99607 8.40349 4.34007 8.40349C5.67007 8.40349 6.17407 7.05948 6.17407 5.33748Z" fill="black"/>
|
|
152
|
-
</g>`
|
|
153
|
-
},
|
|
154
|
-
speedOne: {
|
|
155
|
-
width: 25,
|
|
156
|
-
height: 10,
|
|
157
|
-
content: `<g xmlns="http://www.w3.org/2000/svg" opacity="0.25">
|
|
158
|
-
<path d="M21.9901 5.60773L20.3381 7.25973C20.2401 7.35773 20.1001 7.42773 19.9461 7.42773C19.6381 7.42773 19.4001 7.17573 19.4001 6.88173C19.4001 6.72773 19.4701 6.58773 19.5541 6.48973L21.2061 4.82373L19.5541 3.17173C19.4701 3.07373 19.4001 2.93373 19.4001 2.77973C19.4001 2.47173 19.6381 2.21973 19.9461 2.21973C20.1001 2.21973 20.2541 2.28973 20.3521 2.38773L21.9901 4.05373L23.6421 2.38773C23.7401 2.28973 23.8941 2.23373 24.0341 2.23373C24.3421 2.23373 24.5941 2.47173 24.5941 2.77973C24.5941 2.93373 24.5241 3.07373 24.4261 3.17173L22.7741 4.82373L24.4261 6.48973C24.5241 6.58773 24.5941 6.72773 24.5941 6.88173C24.5941 7.17573 24.3421 7.41373 24.0341 7.41373C23.8941 7.41373 23.7541 7.35773 23.6561 7.25973L21.9901 5.60773Z" fill="black"/>
|
|
159
|
-
<path d="M10.2565 4.83748C10.2565 2.42948 11.4465 0.0214844 14.1205 0.0214844C16.7805 0.0214844 17.9845 2.42948 17.9845 4.83748C17.9845 7.24548 16.7805 9.66749 14.1205 9.66749C11.4465 9.66749 10.2565 7.24548 10.2565 4.83748ZM15.9545 4.83748C15.9545 3.11548 15.4505 1.78549 14.1205 1.78549C12.7765 1.78549 12.2725 3.11548 12.2725 4.83748C12.2725 6.55948 12.7765 7.90349 14.1205 7.90349C15.4505 7.90349 15.9545 6.55948 15.9545 4.83748Z" fill="black"/>
|
|
160
|
-
<path d="M6.85645 8.51974C6.85645 7.90374 7.37445 7.38574 7.99045 7.38574C8.60645 7.38574 9.12444 7.90374 9.12444 8.51974C9.12444 9.13574 8.60645 9.65374 7.99045 9.65374C7.37445 9.65374 6.85645 9.13574 6.85645 8.51974Z" fill="black"/>
|
|
161
|
-
<path d="M4.27766 9.59748C3.71766 9.59748 3.28366 9.13548 3.28366 8.60348V2.72348L2.26166 3.77348C2.10766 3.92748 1.89766 4.02548 1.67366 4.02548C1.21166 4.02548 0.847656 3.64748 0.847656 3.19948C0.847656 2.96148 0.945656 2.76548 1.08566 2.61148L3.29766 0.399477C3.50766 0.189477 3.80166 0.0634766 4.12366 0.0634766C4.75366 0.0634766 5.27166 0.581477 5.27166 1.21148V8.60348C5.27166 9.13548 4.82366 9.59748 4.27766 9.59748Z" fill="black"/>
|
|
162
|
-
</g>`
|
|
163
|
-
},
|
|
164
|
-
speedOneQuarter: {
|
|
165
|
-
width: 33,
|
|
166
|
-
height: 11,
|
|
167
|
-
content: `<g xmlns="http://www.w3.org/2000/svg" opacity="0.25">
|
|
168
|
-
<path d="M29.6005 6.10773L27.9485 7.75973C27.8505 7.85773 27.7105 7.92773 27.5565 7.92773C27.2485 7.92773 27.0105 7.67573 27.0105 7.38173C27.0105 7.22773 27.0805 7.08773 27.1645 6.98973L28.8165 5.32373L27.1645 3.67173C27.0805 3.57373 27.0105 3.43373 27.0105 3.27973C27.0105 2.97173 27.2485 2.71973 27.5565 2.71973C27.7105 2.71973 27.8645 2.78973 27.9625 2.88773L29.6005 4.55373L31.2525 2.88773C31.3505 2.78973 31.5045 2.73373 31.6445 2.73373C31.9525 2.73373 32.2045 2.97173 32.2045 3.27973C32.2045 3.43373 32.1345 3.57373 32.0365 3.67173L30.3845 5.32373L32.0365 6.98973C32.1345 7.08773 32.2045 7.22773 32.2045 7.38173C32.2045 7.67573 31.9525 7.91373 31.6445 7.91373C31.5045 7.91373 31.3645 7.85773 31.2665 7.75973L29.6005 6.10773Z" fill="black"/>
|
|
169
|
-
<path d="M18.899 9.31411C18.675 9.17411 18.507 8.88011 18.507 8.58611C18.507 8.09611 18.899 7.70411 19.389 7.70411C19.557 7.70411 19.725 7.74611 19.865 7.84411C20.439 8.25011 21.097 8.43211 21.825 8.43211C22.931 8.43211 23.561 7.80211 23.561 7.03211C23.561 6.17811 22.945 5.60411 21.881 5.60411C21.265 5.60411 20.747 5.75811 20.257 6.13611C20.075 6.27611 19.851 6.34611 19.599 6.34611C19.011 6.34611 18.535 5.87011 18.535 5.28211V1.71211C18.535 1.04011 18.899 0.662109 19.585 0.662109H24.191C24.653 0.662109 25.059 1.04011 25.059 1.53011C25.059 1.99211 24.653 2.37011 24.191 2.37011H20.481V4.70811C20.971 4.27411 21.727 3.92411 22.581 3.92411C24.163 3.92411 25.577 5.05811 25.577 6.94811C25.577 8.92211 24.093 10.1681 21.839 10.1681C20.621 10.1681 19.669 9.86011 18.899 9.31411Z" fill="black"/>
|
|
170
|
-
<path d="M10.7532 9.99949C10.1932 9.99949 9.71716 9.53749 9.71716 8.96348C9.71716 8.62748 9.89916 8.31948 10.1512 8.13748C13.7072 5.54748 14.7572 4.62348 14.7572 3.50348C14.7572 2.69148 14.0152 2.28549 13.2312 2.28549C12.4612 2.28549 11.8172 2.52348 11.2572 2.91548C11.1172 3.01348 10.9492 3.06948 10.7672 3.06948C10.2772 3.06948 9.88516 2.67748 9.88516 2.18748C9.88516 1.89348 10.0392 1.62748 10.2492 1.47348C11.1172 0.815485 12.1812 0.521484 13.2032 0.521484C15.1912 0.521484 16.7732 1.64148 16.7732 3.50348C16.7732 5.09948 15.4572 6.48549 12.9512 8.24949H16.0592C16.5352 8.24949 16.9412 8.64149 16.9412 9.11749C16.9412 9.60748 16.5352 9.99949 16.0592 9.99949H10.7532Z" fill="black"/>
|
|
171
|
-
<path d="M6.37305 9.01974C6.37305 8.40374 6.89105 7.88574 7.50705 7.88574C8.12305 7.88574 8.64105 8.40374 8.64105 9.01974C8.64105 9.63574 8.12305 10.1537 7.50705 10.1537C6.89105 10.1537 6.37305 9.63574 6.37305 9.01974Z" fill="black"/>
|
|
172
|
-
<path d="M3.79426 10.0975C3.23426 10.0975 2.80026 9.63548 2.80026 9.10348V3.22348L1.77826 4.27348C1.62426 4.42748 1.41426 4.52548 1.19026 4.52548C0.728258 4.52548 0.364258 4.14748 0.364258 3.69948C0.364258 3.46148 0.462258 3.26548 0.602258 3.11148L2.81426 0.899477C3.02426 0.689477 3.31826 0.563477 3.64026 0.563477C4.27026 0.563477 4.78826 1.08148 4.78826 1.71148V9.10348C4.78826 9.63548 4.34026 10.0975 3.79426 10.0975Z" fill="black"/>
|
|
173
|
-
</g>`
|
|
174
|
-
},
|
|
175
|
-
speedOneHalf: {
|
|
176
|
-
width: 24,
|
|
177
|
-
height: 11,
|
|
178
|
-
content: `<g xmlns="http://www.w3.org/2000/svg" opacity="0.25">
|
|
179
|
-
<path d="M21.3427 6.1087L19.6907 7.7607C19.5927 7.8587 19.4527 7.9287 19.2987 7.9287C18.9907 7.9287 18.7527 7.6767 18.7527 7.3827C18.7527 7.2287 18.8227 7.0887 18.9067 6.9907L20.5587 5.3247L18.9067 3.6727C18.8227 3.5747 18.7527 3.4347 18.7527 3.2807C18.7527 2.9727 18.9907 2.7207 19.2987 2.7207C19.4527 2.7207 19.6067 2.7907 19.7047 2.8887L21.3427 4.5547L22.9947 2.8887C23.0927 2.7907 23.2467 2.7347 23.3867 2.7347C23.6947 2.7347 23.9467 2.9727 23.9467 3.2807C23.9467 3.4347 23.8767 3.5747 23.7787 3.6727L22.1267 5.3247L23.7787 6.9907C23.8767 7.0887 23.9467 7.2287 23.9467 7.3827C23.9467 7.6767 23.6947 7.9147 23.3867 7.9147C23.2467 7.9147 23.1067 7.8587 23.0087 7.7607L21.3427 6.1087Z" fill="black"/>
|
|
180
|
-
<path d="M10.6411 9.31411C10.4171 9.17411 10.2491 8.88011 10.2491 8.58611C10.2491 8.09611 10.6411 7.70411 11.1311 7.70411C11.2991 7.70411 11.4671 7.74611 11.6071 7.84411C12.1811 8.25011 12.8391 8.43211 13.5671 8.43211C14.6731 8.43211 15.3031 7.80211 15.3031 7.03211C15.3031 6.17811 14.6871 5.60411 13.6231 5.60411C13.0071 5.60411 12.4891 5.75811 11.9991 6.13611C11.8171 6.27611 11.5931 6.34611 11.3411 6.34611C10.7531 6.34611 10.2771 5.87011 10.2771 5.28211V1.71211C10.2771 1.04011 10.6411 0.662109 11.3271 0.662109H15.9331C16.3951 0.662109 16.8011 1.04011 16.8011 1.53011C16.8011 1.99211 16.3951 2.37011 15.9331 2.37011H12.2231V4.70811C12.7131 4.27411 13.4691 3.92411 14.3231 3.92411C15.9051 3.92411 17.3191 5.05811 17.3191 6.94811C17.3191 8.92211 15.8351 10.1681 13.5811 10.1681C12.3631 10.1681 11.4111 9.86011 10.6411 9.31411Z" fill="black"/>
|
|
181
|
-
<path d="M6.37305 9.02072C6.37305 8.40472 6.89105 7.88672 7.50705 7.88672C8.12305 7.88672 8.64105 8.40472 8.64105 9.02072C8.64105 9.63672 8.12305 10.1547 7.50705 10.1547C6.89105 10.1547 6.37305 9.63672 6.37305 9.02072Z" fill="black"/>
|
|
182
|
-
<path d="M3.79426 10.0985C3.23426 10.0985 2.80026 9.63645 2.80026 9.10445V3.22445L1.77826 4.27445C1.62426 4.42845 1.41426 4.52645 1.19026 4.52645C0.728258 4.52645 0.364258 4.14845 0.364258 3.70045C0.364258 3.46245 0.462258 3.26645 0.602258 3.11245L2.81426 0.900453C3.02426 0.690453 3.31826 0.564453 3.64026 0.564453C4.27026 0.564453 4.78826 1.08245 4.78826 1.71245V9.10445C4.78826 9.63645 4.34026 10.0985 3.79426 10.0985Z" fill="black"/>
|
|
183
|
-
</g>`
|
|
184
|
-
},
|
|
185
|
-
speedTwo: {
|
|
186
|
-
width: 27,
|
|
187
|
-
height: 11,
|
|
188
|
-
content: `<g xmlns="http://www.w3.org/2000/svg" opacity="0.25">
|
|
189
|
-
<path d="M24.0494 6.10773L22.3974 7.75973C22.2994 7.85773 22.1594 7.92773 22.0054 7.92773C21.6974 7.92773 21.4594 7.67573 21.4594 7.38173C21.4594 7.22773 21.5294 7.08773 21.6134 6.98973L23.2654 5.32373L21.6134 3.67173C21.5294 3.57373 21.4594 3.43373 21.4594 3.27973C21.4594 2.97173 21.6974 2.71973 22.0054 2.71973C22.1594 2.71973 22.3134 2.78973 22.4114 2.88773L24.0494 4.55373L25.7014 2.88773C25.7994 2.78973 25.9534 2.73373 26.0934 2.73373C26.4014 2.73373 26.6534 2.97173 26.6534 3.27973C26.6534 3.43373 26.5834 3.57373 26.4854 3.67173L24.8334 5.32373L26.4854 6.98973C26.5834 7.08773 26.6534 7.22773 26.6534 7.38173C26.6534 7.67573 26.4014 7.91373 26.0934 7.91373C25.9534 7.91373 25.8134 7.85773 25.7154 7.75973L24.0494 6.10773Z" fill="black"/>
|
|
190
|
-
<path d="M12.3157 5.33748C12.3157 2.92948 13.5057 0.521484 16.1797 0.521484C18.8397 0.521484 20.0437 2.92948 20.0437 5.33748C20.0437 7.74548 18.8397 10.1675 16.1797 10.1675C13.5057 10.1675 12.3157 7.74548 12.3157 5.33748ZM18.0137 5.33748C18.0137 3.61548 17.5097 2.28549 16.1797 2.28549C14.8357 2.28549 14.3317 3.61548 14.3317 5.33748C14.3317 7.05948 14.8357 8.40349 16.1797 8.40349C17.5097 8.40349 18.0137 7.05948 18.0137 5.33748Z" fill="black"/>
|
|
191
|
-
<path d="M8.91565 9.01974C8.91565 8.40374 9.43365 7.88574 10.0496 7.88574C10.6656 7.88574 11.1836 8.40374 11.1836 9.01974C11.1836 9.63574 10.6656 10.1537 10.0496 10.1537C9.43365 10.1537 8.91565 9.63574 8.91565 9.01974Z" fill="black"/>
|
|
192
|
-
<path d="M1.45592 9.99949C0.895922 9.99949 0.419922 9.53749 0.419922 8.96348C0.419922 8.62748 0.601922 8.31948 0.853922 8.13748C4.40992 5.54748 5.45992 4.62348 5.45992 3.50348C5.45992 2.69148 4.71792 2.28549 3.93392 2.28549C3.16392 2.28549 2.51992 2.52348 1.95992 2.91548C1.81992 3.01348 1.65192 3.06948 1.46992 3.06948C0.979922 3.06948 0.587922 2.67748 0.587922 2.18748C0.587922 1.89348 0.741922 1.62748 0.951922 1.47348C1.81992 0.815485 2.88392 0.521484 3.90592 0.521484C5.89392 0.521484 7.47592 1.64148 7.47592 3.50348C7.47592 5.09948 6.15992 6.48549 3.65392 8.24949H6.76192C7.23792 8.24949 7.64392 8.64149 7.64392 9.11749C7.64392 9.60748 7.23792 9.99949 6.76192 9.99949H1.45592Z" fill="black"/>
|
|
193
|
-
</g>`
|
|
194
|
-
},
|
|
195
|
-
podcastBookmark: {
|
|
196
|
-
width: 25,
|
|
197
|
-
height: 27,
|
|
198
|
-
content: '<path d="M12.5 27C19.404 27 25 21.404 25 14.5S19.404 2 12.5 2 0 7.596 0 14.5 5.596 27 12.5 27zm0-1.5c-6.075 0-11-4.925-11-11s4.925-11 11-11 11 4.925 11 11-4.925 11-11 11z" /> <path d="M17.071 8.25H8a.75.75 0 00-.75.75v11.545l.007.104a.75.75 0 001.228.468l4.05-3.437 4.051 3.437a.75.75 0 001.235-.572V9a.75.75 0 00-.75-.75zm-.75 1.499v9.176l-3.3-2.8-.098-.07a.75.75 0 00-.873.07l-3.3 2.799V9.749h7.571z" data-stroke="true" /> <path d="M17.071 8.25H8a.75.75 0 00-.75.75v11.545l.007.104a.75.75 0 001.228.468l4.05-3.437 4.051 3.437a.75.75 0 001.235-.572V9a.75.75 0 00-.75-.75z" data-fill="true" />'
|
|
199
|
-
},
|
|
200
|
-
reaction: {
|
|
201
|
-
width: 16,
|
|
202
|
-
height: 16,
|
|
203
|
-
content: '<path data-theme="light" fill="#D09959" d="M1 2h14v12H1z"/> <path d="M0 1.778C0 .8.8 0 1.778 0h12.444C15.2 0 16 .8 16 1.778v12.444C16 15.2 15.2 16 14.222 16H1.778C.8 16 0 15.2 0 14.222V1.778zM6.8 11.7l2.5.8V6.2h1.6v5.5l2.5.8 1.6-2.3h-1.6V4.8L10.9 4 9.3 5.9V4.8L6.8 4 5.1 5.9V4.8L2.6 4 1 6.2h1.6v5.5l2.5.8V6.2h1.7v5.5z" />'
|
|
204
|
-
},
|
|
205
|
-
cross: {
|
|
206
|
-
width: 18,
|
|
207
|
-
height: 18,
|
|
208
|
-
content: '<path fill="none" fill-rule="evenodd" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" vector-effect="non-scaling-stroke" d="M2 2l14 14M16 2L2 16" />'
|
|
209
|
-
},
|
|
210
|
-
link: {
|
|
211
|
-
width: 24,
|
|
212
|
-
height: 24,
|
|
213
|
-
content: '<path d="M9.158 18.928c-1.065 0-2.13-.405-2.94-1.215-1.624-1.623-1.624-4.262 0-5.884l.643-.645c.327-.326.854-.326 1.18 0 .325.326.325.853 0 1.178l-.645.645c-.972.972-.972 2.554 0 3.526.973.972 2.554.973 3.526 0l2.842-2.84c.97-.972.97-2.555 0-3.527-.325-.325-.325-.854 0-1.18.325-.324.853-.324 1.178 0 1.623 1.625 1.623 4.264 0 5.885l-2.84 2.84c-.81.81-1.877 1.216-2.942 1.216" /> <path d="M10.578 14.184c-.213 0-.426-.082-.59-.244-.784-.785-1.217-1.83-1.217-2.94 0-1.113.433-2.158 1.22-2.944l2.84-2.84c1.622-1.62 4.26-1.62 5.883 0 1.622 1.623 1.622 4.262 0 5.883l-.645.643c-.325.326-.852.326-1.178 0-.325-.325-.325-.852 0-1.178l.645-.644c.972-.97.972-2.554 0-3.526s-2.556-.972-3.527 0l-2.84 2.842c-.47.47-.73 1.096-.73 1.762 0 .667.26 1.293.73 1.763.325.327.325.854 0 1.18-.163.162-.376.244-.59.244" />'
|
|
214
|
-
},
|
|
215
|
-
search: {
|
|
216
|
-
width: 16,
|
|
217
|
-
height: 16,
|
|
218
|
-
content: '<g transform="translate(2 1)" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" vector-effect="non-scaling-stroke"><circle cx="5.5" cy="5.5" r="5.5"/><path d="M11.37 13.442l-.995-1.272"/></g>'
|
|
219
|
-
},
|
|
220
|
-
card: {
|
|
221
|
-
width: 15,
|
|
222
|
-
height: 15,
|
|
223
|
-
content: '<path d="M9 5.5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5H4a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5zm-.5 1h-4v4h4v-4zm2.5-3a.5.5 0 0 1 .5.5v5a.5.5 0 1 1-1 0V4.5H6a.5.5 0 0 1 0-1h5z" fill-rule="nonzero"/>'
|
|
224
|
-
},
|
|
225
|
-
podcast: {
|
|
226
|
-
width: 15,
|
|
227
|
-
height: 15,
|
|
228
|
-
content: '<path d="M5.252 11.432A.5.5 0 0 1 4.5 11V4a.5.5 0 0 1 .752-.432l6 3.5a.5.5 0 0 1 0 .864l-6 3.5zm.248-1.303L10.008 7.5 5.5 4.87v5.26z" fill-rule="nonzero" />'
|
|
229
|
-
},
|
|
230
|
-
arrow: {
|
|
231
|
-
width: 12,
|
|
232
|
-
height: 12,
|
|
233
|
-
content: '<path d="M3 7l3 3.5L9 7M6 10V1" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2" vector-effect="non-scaling-stroke" />'
|
|
234
|
-
},
|
|
235
|
-
brent: {
|
|
236
|
-
width: 9,
|
|
237
|
-
height: 12,
|
|
238
|
-
content: '<g fill="#999" fill-rule="nonzero"><path d="M4.332 0l.528.606c2.528 2.902 3.804 5.07 3.804 6.634A4.332 4.332 0 110 7.24C0 5.676 1.276 3.508 3.804.606L4.332 0zm0 2.143l-.176.212C2.313 4.589 1.4 6.248 1.4 7.24a2.932 2.932 0 105.864 0c0-.992-.914-2.651-2.756-4.885l-.176-.212z"/><path d="M2.973 7.475c0 .415.417.863.835.924l.097.008v.7c-.79 0-1.548-.716-1.626-1.5l-.006-.132h.7z"/></g> '
|
|
239
|
-
},
|
|
240
|
-
user: {
|
|
241
|
-
width: 16,
|
|
242
|
-
height: 16,
|
|
243
|
-
content: '<path fill="currentColor" fill-rule="nonzero" d="M8 1a4.25 4.25 0 012.676 7.552 6.751 6.751 0 014.074 6.198.75.75 0 11-1.5 0 5.25 5.25 0 00-10.5 0 .75.75 0 11-1.5 0 6.752 6.752 0 014.074-6.199A4.25 4.25 0 018 1zm0 1.5A2.75 2.75 0 108 8a2.75 2.75 0 000-5.5z" />'
|
|
244
|
-
},
|
|
245
|
-
bookmark: {
|
|
246
|
-
width: 17,
|
|
247
|
-
height: 21,
|
|
248
|
-
content: '<path d="M16 20l-7.5-6.333L1 20V1h15z" stroke="currentColor" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"/>'
|
|
249
|
-
},
|
|
250
|
-
shareBookmark: {
|
|
251
|
-
width: 11,
|
|
252
|
-
height: 15,
|
|
253
|
-
content: '<path clip-rule="evenodd" d="M10 14 5.5 9.667 1 14V1h9v13Z" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>'
|
|
254
|
-
},
|
|
255
|
-
receipt: {
|
|
256
|
-
width: 10,
|
|
257
|
-
height: 13,
|
|
258
|
-
content: '<g fill="currentColor" fill-rule="nonzero"><path d="M10 0H0v13l2-1.74 1.5 1.305L5 11.26l1.5 1.305L8 11.26 10 13V0zM9 .997v9.81l-1-.87-1.5 1.304L5 9.937 3.5 11.24 2 9.937l-1 .87V.996h8z"/><path d="M7 3v1H3V3zM7 6v1H3V6z"/></g>'
|
|
259
|
-
},
|
|
260
|
-
read: {
|
|
261
|
-
width: 15,
|
|
262
|
-
height: 15,
|
|
263
|
-
content: '<g fill="none" fill-rule="evenodd"><path opacity=".98" d="M0 0h15v15H0z"/><path d="M13.085 1.694a.513.513 0 01.855.56l-.051.077-3.163 3.975a.514.514 0 01-.73.075l-.068-.069-1.812-2.208a.512.512 0 01.729-.716l.065.066 1.409 1.718 2.766-3.478z" fill="#6EAC65" fill-rule="nonzero"/><path d="M6.454 12.997l-.06-.01-.078-.023a.49.49 0 01-.266-.24l.011.015a2.349 2.349 0 00-.535-.607c-.89-.745-2.117-.917-3.813-.12a.5.5 0 01-.706-.37L1 11.558V4.568a.5.5 0 01.287-.453c2.053-.963 3.695-.733 4.88.26.327.272.556.548.698.77l.084.144.018.04.022.076.01.071L7 11.233l.126-.09c.95-.656 2.16-.857 3.608-.417l.266.087v-2.81a.5.5 0 01.41-.491l.09-.008a.5.5 0 01.492.41l.008.09v3.555a.5.5 0 01-.713.452c-1.696-.796-2.922-.624-3.813.12a2.533 2.533 0 00-.497.544l-.038.064a.486.486 0 01-.485.258zm-4.29-8.17L2 4.892v5.92c1.637-.572 2.977-.348 4 .42l.002-5.58a2.605 2.605 0 00-.476-.513c-.81-.677-1.897-.88-3.362-.314z" fill="currentColor" fill-rule="nonzero"/></g>'
|
|
264
|
-
},
|
|
265
|
-
listened: {
|
|
266
|
-
width: 15,
|
|
267
|
-
height: 15,
|
|
268
|
-
content: '<g fill-rule="nonzero"><path d="M4.978 4.354a.5.5 0 01-.332.624c-1.197.367-2.064 1.527-2.14 2.897l-.005.167a.749.749 0 01.999.708v3a.75.75 0 01-1.458.248L2 12a1 1 0 01-1-1v-1a1 1 0 01.5-.866V8.072c0-1.886 1.172-3.535 2.854-4.05a.5.5 0 01.624.332zM10 7a.5.5 0 01.492.41l.008.09.001 1.634a1 1 0 01.492.745L11 10v1a1 1 0 01-.883.993L10 12l-.042-.002a.75.75 0 01-1.451-.146L8.5 11.75v-3a.75.75 0 011.001-.707L9.5 7.5l.008-.09A.5.5 0 0110 7z" fill="currentColor" /><path d="M11.585 1.194a.513.513 0 01.855.56l-.051.077-3.163 3.975a.514.514 0 01-.73.075l-.068-.069-1.812-2.208a.512.512 0 01.729-.716l.065.066 1.409 1.718 2.766-3.478z" fill="#6EAC65" /></g>'
|
|
269
|
-
},
|
|
270
|
-
magic: {
|
|
271
|
-
width: 15,
|
|
272
|
-
height: 15,
|
|
273
|
-
content: '<g fill-rule="evenodd" clip-rule="evenodd"> <path d="M7.804.4a.6.6 0 0 1 .6.6v2.035a.6.6 0 0 1-1.2 0V1a.6.6 0 0 1 .6-.6ZM7.804 10.577a.6.6 0 0 1 .6.6v2.035a.6.6 0 1 1-1.2 0v-2.035a.6.6 0 0 1 .6-.6ZM14.636 7.106a.6.6 0 0 1-.6.6h-2.078a.6.6 0 1 1 0-1.2h2.078a.6.6 0 0 1 .6.6ZM4.25 7.106a.6.6 0 0 1-.6.6H1.573a.6.6 0 0 1 0-1.2H3.65a.6.6 0 0 1 .6.6ZM12.639 2.37a.585.585 0 0 1 0 .84l-1.442 1.412a.615.615 0 0 1-.857 0 .585.585 0 0 1 0-.84l1.442-1.412a.615.615 0 0 1 .857 0ZM12.639 11.843a.615.615 0 0 1-.857 0L10.34 10.43a.585.585 0 0 1 0-.84.615.615 0 0 1 .857 0l1.442 1.413a.585.585 0 0 1 0 .84ZM5.269 4.621a.615.615 0 0 1-.858 0L2.97 3.208a.585.585 0 0 1 0-.84.615.615 0 0 1 .858 0l1.442 1.413a.585.585 0 0 1 0 .84ZM8.926 6.074a.6.6 0 0 1 0 .849l-.863.863-.849-.849.863-.863a.6.6 0 0 1 .849 0ZM7.348 8.5l-5.924 5.924a.6.6 0 1 1-.848-.848L6.5 7.652l.848.848Z"/> </g>'
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
var styles$H = {"root":"SvgSymbol-module_root__WctNR","small":"SvgSymbol-module_small__h9V-w","normal":"SvgSymbol-module_normal__gFAVe","medium":"SvgSymbol-module_medium__QaYjY","large":"SvgSymbol-module_large__o6A4o","adaptive":"SvgSymbol-module_adaptive__gL9qn","fb":"SvgSymbol-module_fb__HZqcB","vk":"SvgSymbol-module_vk__XctB2","ok":"SvgSymbol-module_ok__IM6Z9","tw":"SvgSymbol-module_tw__fio-Q","tg":"SvgSymbol-module_tg__GRhd-","magic":"SvgSymbol-module_magic__N-jKk","reaction":"SvgSymbol-module_reaction__xSbgo","card":"SvgSymbol-module_card__2nVFu","podcast":"SvgSymbol-module_podcast__Yp05r","read":"SvgSymbol-module_read__Bu653","listened":"SvgSymbol-module_listened__AOn7j","menu":"SvgSymbol-module_menu__z-dLm","cross":"SvgSymbol-module_cross__3Xej1","isInFeature":"SvgSymbol-module_isInFeature__BmyI-","isInCard":"SvgSymbol-module_isInCard__USxBS","isInTopicBlockItem":"SvgSymbol-module_isInTopicBlockItem__cnCgw","isInPageStatic":"SvgSymbol-module_isInPageStatic__7kMP-","isInMaterialMeta":"SvgSymbol-module_isInMaterialMeta__lIKJO","isInAudioPlayer":"SvgSymbol-module_isInAudioPlayer__mamWa","isInEpisodeBlock":"SvgSymbol-module_isInEpisodeBlock__oZ6JG","isInButtonPlaybackRate":"SvgSymbol-module_isInButtonPlaybackRate__NnADm","isInButtonBackward":"SvgSymbol-module_isInButtonBackward__x8L9a","isInButtonForward":"SvgSymbol-module_isInButtonForward__TtixK","isInToolbar":"SvgSymbol-module_isInToolbar__RzbaX","play":"SvgSymbol-module_play__dAES0","meduzaLogo":"SvgSymbol-module_meduzaLogo__aVKzZ","arrow":"SvgSymbol-module_arrow__lWTSJ","oil":"SvgSymbol-module_oil__VFGTp","search":"SvgSymbol-module_search__h06cc","user":"SvgSymbol-module_user__ORMm-","bookmark":"SvgSymbol-module_bookmark__JPKyG","shareBookmark":"SvgSymbol-module_shareBookmark__7w9X9","receipt":"SvgSymbol-module_receipt__o3V8u","isInHeader":"SvgSymbol-module_isInHeader__M5Tzw"};
|
|
278
|
-
|
|
279
|
-
const SvgSymbol = ({
|
|
280
|
-
icon,
|
|
281
|
-
size,
|
|
282
|
-
styleContext
|
|
283
|
-
}) => {
|
|
284
|
-
const data = icons[icon];
|
|
285
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
286
|
-
"data-testid": "svg-symbol",
|
|
287
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
288
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
289
|
-
className: makeClassName([[styles$H.root, true], [styles$H[size], !!styles$H[size]], [styles$H[icon], !!styles$H[icon]], [styles$H[styleContext], !!styles$H[styleContext]]]),
|
|
290
|
-
width: data.width,
|
|
291
|
-
height: data.height,
|
|
292
|
-
viewBox: `0 0 ${data.width} ${data.height}`,
|
|
293
|
-
dangerouslySetInnerHTML: {
|
|
294
|
-
__html: data.content
|
|
295
|
-
}
|
|
296
|
-
});
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
var styles$G = {"root":"Switcher-module_root__cBsJB","dark":"Switcher-module_dark__1QQsH","control":"Switcher-module_control__60WMX","input":"Switcher-module_input__5UDnv","knob":"Switcher-module_knob__PwA1A","children":"Switcher-module_children__uLapU","left":"Switcher-module_left__5-HNa","right":"Switcher-module_right__82Edk","isInPanel":"Switcher-module_isInPanel__-nBSf","isInMenu":"Switcher-module_isInMenu__RQVhp","isInLive":"Switcher-module_isInLive__ZyMCT"};
|
|
300
|
-
|
|
301
|
-
const Switcher = ({
|
|
302
|
-
enabled,
|
|
303
|
-
children,
|
|
304
|
-
childrenPosition = 'left',
|
|
305
|
-
onChange,
|
|
306
|
-
styleContext,
|
|
307
|
-
theme = 'light'
|
|
308
|
-
}) => ( /*#__PURE__*/React.createElement("label", {
|
|
309
|
-
"data-testid": "switcher",
|
|
310
|
-
className: makeClassName([[styles$G.root, true], [styles$G[theme], !!styles$G[theme]], [styles$G[styleContext], !!styles$G[styleContext]]])
|
|
311
|
-
}, children && childrenPosition === 'left' && ( /*#__PURE__*/React.createElement("div", {
|
|
312
|
-
className: makeClassName([[styles$G.children, true], [styles$G.left, true]])
|
|
313
|
-
}, children)), /*#__PURE__*/React.createElement("input", {
|
|
314
|
-
className: styles$G.input,
|
|
315
|
-
type: "checkbox",
|
|
316
|
-
checked: enabled,
|
|
317
|
-
onChange: onChange
|
|
318
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
319
|
-
className: styles$G.control
|
|
320
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
321
|
-
className: styles$G.knob
|
|
322
|
-
})), children && childrenPosition === 'right' && ( /*#__PURE__*/React.createElement("div", {
|
|
323
|
-
className: makeClassName([[styles$G.children, true], [styles$G.right, true]])
|
|
324
|
-
}, children))));
|
|
325
|
-
|
|
326
|
-
const makeStyleContext = (classNames, styleContext, styles) => {
|
|
327
|
-
const context = Array.isArray(styleContext) ? styleContext.filter(ctx => styles[ctx]).map(ctx => [[styles[ctx]], true]) : [[styles[styleContext], !!styleContext && !!styles[styleContext]]];
|
|
328
|
-
return classNames.concat(context);
|
|
329
|
-
};
|
|
330
|
-
|
|
331
|
-
const BlockContext = /*#__PURE__*/React.createContext({
|
|
332
|
-
lightBox: null
|
|
333
|
-
});
|
|
334
|
-
const BlockProvider = BlockContext.Provider;
|
|
335
|
-
|
|
336
|
-
const POST_MESSAGE_PREFIX = 'mdzKitMsg';
|
|
337
|
-
const postMessage = (category, element, action) => {
|
|
338
|
-
const target = window.top;
|
|
339
|
-
const msg = `${POST_MESSAGE_PREFIX}=${JSON.stringify({
|
|
340
|
-
category,
|
|
341
|
-
element,
|
|
342
|
-
action
|
|
343
|
-
})}`;
|
|
344
|
-
if (typeof target !== 'undefined') {
|
|
345
|
-
target.postMessage(msg, '*');
|
|
346
|
-
}
|
|
347
|
-
};
|
|
348
|
-
|
|
349
|
-
var styles$F = {"root":"Lazy-module_root__DWw8D"};
|
|
350
|
-
|
|
351
|
-
const Lazy = ({
|
|
352
|
-
children,
|
|
353
|
-
threshold
|
|
354
|
-
}) => {
|
|
355
|
-
const [ref, inView, entry] = useInView({
|
|
356
|
-
threshold: threshold || 0
|
|
357
|
-
});
|
|
358
|
-
const [visible, setVisible] = useState(false);
|
|
359
|
-
useEffect(() => {
|
|
360
|
-
if (entry && entry.boundingClientRect && entry.boundingClientRect.y < 0) {
|
|
361
|
-
setVisible(true);
|
|
362
|
-
}
|
|
363
|
-
}, [entry]);
|
|
364
|
-
useEffect(() => {
|
|
365
|
-
if (inView) {
|
|
366
|
-
setVisible(true);
|
|
367
|
-
}
|
|
368
|
-
}, [inView]);
|
|
369
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
370
|
-
className: makeClassName([[styles$F.root, true], [styles$F.visible, visible]]),
|
|
371
|
-
ref: ref,
|
|
372
|
-
"data-testid": "lazy"
|
|
373
|
-
}, visible && children);
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
const MediaQuerySizes = {
|
|
377
|
-
MOBILE: 512,
|
|
378
|
-
PORTRAIT_TABLET: 768,
|
|
379
|
-
LANDSCAPE_TABLET: 1024,
|
|
380
|
-
DESKTOP: 1010,
|
|
381
|
-
WIDE_DESKTOP: 1200
|
|
382
|
-
};
|
|
383
|
-
const imageBreakpoints = {
|
|
384
|
-
325: '(min-width: 0)',
|
|
385
|
-
520: '(min-width: 325px)',
|
|
386
|
-
600: '(min-width: 600px)',
|
|
387
|
-
650: '(min-width: 650px)',
|
|
388
|
-
980: '(min-width: 1000px)',
|
|
389
|
-
1335: '(min-width: 1000px)'
|
|
390
|
-
};
|
|
391
|
-
const imageConditionalKeys = {
|
|
392
|
-
xs: [325],
|
|
393
|
-
superFull: [1335, 650, 520, 325],
|
|
394
|
-
full: [980, 650, 520, 325],
|
|
395
|
-
default: [650, 520, 325],
|
|
396
|
-
narrow: [600, 325]
|
|
397
|
-
};
|
|
398
|
-
const SocialLabels = {
|
|
399
|
-
ru: {
|
|
400
|
-
tg: 'Телеграм',
|
|
401
|
-
fb: 'Фейсбук',
|
|
402
|
-
tw: 'Твиттер',
|
|
403
|
-
pdf: 'PDF',
|
|
404
|
-
unblock: 'Magic link',
|
|
405
|
-
bookmark: 'В закладки',
|
|
406
|
-
reaction: 'Напишите нам'
|
|
407
|
-
},
|
|
408
|
-
en: {
|
|
409
|
-
tg: 'Telegram',
|
|
410
|
-
fb: 'Fb',
|
|
411
|
-
tw: 'Twitter',
|
|
412
|
-
pdf: 'PDF',
|
|
413
|
-
unblock: 'Magic link',
|
|
414
|
-
bookmark: 'Add to bookmarks'
|
|
415
|
-
}
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
const toCamel = s => s.replace(/([_][a-z])/gi, str => str.toUpperCase().replace('_', ''));
|
|
419
|
-
const toCapitalize = s => s[0].toUpperCase() + s.slice(1);
|
|
420
|
-
|
|
421
|
-
const RenderPicture = ({
|
|
422
|
-
source,
|
|
423
|
-
fallbackSource,
|
|
424
|
-
optimized,
|
|
425
|
-
alt,
|
|
426
|
-
display,
|
|
427
|
-
onLoad
|
|
428
|
-
}) => {
|
|
429
|
-
const [fallback, setFallback] = useState(false);
|
|
430
|
-
useEffect(() => {
|
|
431
|
-
setFallback(!window.HTMLPictureElement);
|
|
432
|
-
}, []);
|
|
433
|
-
const keys = imageConditionalKeys[toCamel(display)] || imageConditionalKeys.default;
|
|
434
|
-
return /*#__PURE__*/React.createElement("picture", null, source && ( /*#__PURE__*/React.createElement("source", {
|
|
435
|
-
media: "(min-width: 325px)",
|
|
436
|
-
srcSet: `${source[1]} 2x`
|
|
437
|
-
})), optimized && !optimized.w325 && ( /*#__PURE__*/React.createElement("source", {
|
|
438
|
-
media: "(min-width: 0)",
|
|
439
|
-
srcSet: `${optimized.original}`
|
|
440
|
-
})), optimized && keys.map(key => {
|
|
441
|
-
const breakpoint = optimized[`w${key}`];
|
|
442
|
-
if (!breakpoint) {
|
|
443
|
-
return null;
|
|
444
|
-
}
|
|
445
|
-
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
446
|
-
key: key
|
|
447
|
-
}, /*#__PURE__*/React.createElement("source", {
|
|
448
|
-
type: "image/webp",
|
|
449
|
-
media: imageBreakpoints[key],
|
|
450
|
-
srcSet: `${breakpoint['2x_webp']} 2x, ${breakpoint['1x_webp']} 1x `
|
|
451
|
-
}), /*#__PURE__*/React.createElement("source", {
|
|
452
|
-
type: "image/png",
|
|
453
|
-
media: imageBreakpoints[key],
|
|
454
|
-
srcSet: `${breakpoint['2x']} 2x, ${breakpoint['1x']} 1x `
|
|
455
|
-
}));
|
|
456
|
-
}), /*#__PURE__*/React.createElement("img", {
|
|
457
|
-
src: fallback ? fallbackSource : 'data:image/gif;base64,R0lGODlhAQABAPAAAPLy8gAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==',
|
|
458
|
-
alt: alt,
|
|
459
|
-
onLoad: () => onLoad(true)
|
|
460
|
-
}));
|
|
461
|
-
};
|
|
462
|
-
|
|
463
|
-
var styles$E = {"root":"Image-module_root__H5wAh","isStatic":"Image-module_isStatic__TmQ1V","isLoaded":"Image-module_isLoaded__keFnD","wrapper":"Image-module_wrapper__gJtbB","fullscreen":"Image-module_fullscreen__4PU9c","dark":"Image-module_dark__qjo5O"};
|
|
464
|
-
|
|
465
|
-
const Image = ({
|
|
466
|
-
alt,
|
|
467
|
-
display,
|
|
468
|
-
optimized,
|
|
469
|
-
width,
|
|
470
|
-
height,
|
|
471
|
-
source,
|
|
472
|
-
lazy,
|
|
473
|
-
ratio,
|
|
474
|
-
styleContext,
|
|
475
|
-
fullscreen = true
|
|
476
|
-
}) => {
|
|
477
|
-
const {
|
|
478
|
-
lightBox
|
|
479
|
-
} = useContext(BlockContext);
|
|
480
|
-
const [isLoaded, setIsLoaded] = useState(lazy ? false : true);
|
|
481
|
-
const handleClick = () => {
|
|
482
|
-
if (!lightBox || !fullscreen || optimized && !optimized.original) {
|
|
483
|
-
return;
|
|
484
|
-
}
|
|
485
|
-
postMessage('', 'fullscreen_click', 'click');
|
|
486
|
-
lightBox.show(optimized, width, height, alt);
|
|
487
|
-
};
|
|
488
|
-
const blockStyles = {
|
|
489
|
-
maxWidth: width <= 649 ? width : '100%'
|
|
490
|
-
};
|
|
491
|
-
const pictureStyles = {
|
|
492
|
-
paddingBottom: styleContext === 'isInDynamicBlock' ? '100%' : `${100 / (ratio || width / height)}%`
|
|
493
|
-
};
|
|
494
|
-
/* fallback w325 url until w6 was released */
|
|
495
|
-
const fallbackSource = source && source[0] || optimized.w325 && optimized.w325['1x'] || optimized.original;
|
|
496
|
-
let classNames = [[styles$E.root, true], [styles$E.isLoaded, isLoaded], [styles$E.fullscreen, lightBox && optimized && optimized.original && fullscreen]];
|
|
497
|
-
if (styleContext) {
|
|
498
|
-
classNames = makeStyleContext(classNames, styleContext, styles$E);
|
|
499
|
-
}
|
|
500
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
501
|
-
className: makeClassName(classNames),
|
|
502
|
-
style: blockStyles,
|
|
503
|
-
"data-testid": "image"
|
|
504
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
505
|
-
className: styles$E.wrapper,
|
|
506
|
-
style: pictureStyles,
|
|
507
|
-
onClick: () => handleClick(),
|
|
508
|
-
onKeyPress: () => handleClick(),
|
|
509
|
-
role: "button",
|
|
510
|
-
tabIndex: 0
|
|
511
|
-
}, lazy ? ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Lazy, {
|
|
512
|
-
threshold: 0.25
|
|
513
|
-
}, /*#__PURE__*/React.createElement(RenderPicture, {
|
|
514
|
-
fallbackSource: fallbackSource,
|
|
515
|
-
source: source,
|
|
516
|
-
optimized: optimized,
|
|
517
|
-
alt: alt,
|
|
518
|
-
display: display,
|
|
519
|
-
onLoad: setIsLoaded
|
|
520
|
-
})), /*#__PURE__*/React.createElement("noscript", null, /*#__PURE__*/React.createElement("img", {
|
|
521
|
-
src: fallbackSource,
|
|
522
|
-
alt: alt
|
|
523
|
-
})))) : ( /*#__PURE__*/React.createElement(RenderPicture, {
|
|
524
|
-
fallbackSource: fallbackSource,
|
|
525
|
-
source: source,
|
|
526
|
-
optimized: optimized,
|
|
527
|
-
alt: alt,
|
|
528
|
-
display: display,
|
|
529
|
-
onLoad: setIsLoaded
|
|
530
|
-
}))));
|
|
531
|
-
};
|
|
532
|
-
|
|
533
|
-
var styles$D = {"root":"Popover-module_root__nBiV4","fadeOut":"Popover-module_fadeOut__Y88V7","visible":"Popover-module_visible__XVQLW","fadeIn":"Popover-module_fadeIn__FK1gd","overlay":"Popover-module_overlay__NAPar","container":"Popover-module_container__y4SB1","disappear":"Popover-module_disappear__uUn2b","dismiss":"Popover-module_dismiss__W8KFF","background":"Popover-module_background__apiio","appear":"Popover-module_appear__b-CZ2","body":"Popover-module_body__UJEZf"};
|
|
534
|
-
|
|
535
|
-
const Popover = ({
|
|
536
|
-
children,
|
|
537
|
-
onClose
|
|
538
|
-
}) => {
|
|
539
|
-
const [visible, setVisible] = useState(true);
|
|
540
|
-
const handleClose = () => {
|
|
541
|
-
setVisible(false);
|
|
542
|
-
setTimeout(onClose, 350);
|
|
543
|
-
};
|
|
544
|
-
const handleScroll = () => {
|
|
545
|
-
handleClose();
|
|
546
|
-
};
|
|
547
|
-
const escFunction = event => {
|
|
548
|
-
if (event.key === 'Escape') {
|
|
549
|
-
handleClose();
|
|
550
|
-
}
|
|
551
|
-
};
|
|
552
|
-
useEffect(() => {
|
|
553
|
-
document.body.dataset.popover = 'true';
|
|
554
|
-
window.addEventListener('keydown', escFunction, false);
|
|
555
|
-
window.addEventListener('scroll', handleScroll, false);
|
|
556
|
-
return () => {
|
|
557
|
-
document.body.removeAttribute('data-popover');
|
|
558
|
-
window.removeEventListener('keydown', escFunction, false);
|
|
559
|
-
window.removeEventListener('scroll', handleScroll, false);
|
|
560
|
-
};
|
|
561
|
-
}, [visible]);
|
|
562
|
-
/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */
|
|
563
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
564
|
-
"data-testid": "popover",
|
|
565
|
-
className: makeClassName([[styles$D.root, true], [styles$D.visible, visible]])
|
|
566
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
567
|
-
className: styles$D.overlay,
|
|
568
|
-
onClick: () => handleClose()
|
|
569
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
570
|
-
className: styles$D.container
|
|
571
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
572
|
-
type: "button",
|
|
573
|
-
className: styles$D.dismiss,
|
|
574
|
-
onClick: () => handleClose(),
|
|
575
|
-
"aria-label": "dismiss"
|
|
576
|
-
}), /*#__PURE__*/React.createElement("svg", {
|
|
577
|
-
width: "100%",
|
|
578
|
-
className: styles$D.background
|
|
579
|
-
}, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("mask", {
|
|
580
|
-
id: "myMask",
|
|
581
|
-
x: "0",
|
|
582
|
-
y: "0",
|
|
583
|
-
width: "100%",
|
|
584
|
-
height: "100%"
|
|
585
|
-
}, /*#__PURE__*/React.createElement("rect", {
|
|
586
|
-
fill: "white",
|
|
587
|
-
y: "0",
|
|
588
|
-
width: "100%",
|
|
589
|
-
height: "100%",
|
|
590
|
-
x: "0"
|
|
591
|
-
}), /*#__PURE__*/React.createElement("svg", {
|
|
592
|
-
x: "50%",
|
|
593
|
-
overflow: "visible"
|
|
594
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
595
|
-
transform: "translate(-12 0)"
|
|
596
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
597
|
-
d: "M4.61852778e-14,9.76996262e-15 L9.84597532,5.80270273 C11.0992017,6.54128882 12.6546044,6.54128882 13.9078308,5.80270273 L23.7538061,9.76996262e-15 L4.61852778e-14,9.76996262e-15 Z"
|
|
598
|
-
}))))), /*#__PURE__*/React.createElement("rect", {
|
|
599
|
-
fill: "#F7F7F7",
|
|
600
|
-
id: "base-mask",
|
|
601
|
-
mask: "url(#myMask)",
|
|
602
|
-
x: "0",
|
|
603
|
-
y: "0",
|
|
604
|
-
width: "100%",
|
|
605
|
-
height: "100%"
|
|
606
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
607
|
-
className: styles$D.body
|
|
608
|
-
}, children)));
|
|
609
|
-
};
|
|
610
|
-
|
|
611
|
-
var styles$C = {"root":"Footnote-module_root__W5D8G","body":"Footnote-module_body__C-ZC-","dismiss":"Footnote-module_dismiss__Q2hAX"};
|
|
612
|
-
|
|
613
|
-
const Footnote = ({
|
|
614
|
-
children,
|
|
615
|
-
onClose
|
|
616
|
-
}) => {
|
|
617
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
618
|
-
"data-testid": "footnote",
|
|
619
|
-
className: makeClassName([[styles$C.root, true]])
|
|
620
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
621
|
-
className: styles$C.dismiss,
|
|
622
|
-
type: "button",
|
|
623
|
-
onClick: () => onClose()
|
|
624
|
-
}, /*#__PURE__*/React.createElement(SvgSymbol, {
|
|
625
|
-
icon: "cross",
|
|
626
|
-
size: "unset"
|
|
627
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
628
|
-
className: styles$C.body
|
|
629
|
-
}, children));
|
|
630
|
-
};
|
|
631
|
-
|
|
632
|
-
var viewportSize = () => ({
|
|
633
|
-
width: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
|
|
634
|
-
height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
|
|
635
|
-
});
|
|
636
|
-
|
|
637
|
-
var styles$B = {"root":"DotsOnImage-module_root__8UQf2","isVisible":"DotsOnImage-module_isVisible__rA5x9","marker":"DotsOnImage-module_marker__pLdQT","show":"DotsOnImage-module_show__Ec0lG","dot":"DotsOnImage-module_dot__e2MWx","isActive":"DotsOnImage-module_isActive__Bhb58","popover":"DotsOnImage-module_popover__zHSbU","isRight":"DotsOnImage-module_isRight__IaUbc","isTop":"DotsOnImage-module_isTop__RMK49","isLeft":"DotsOnImage-module_isLeft__Q6JZ-","isBottom":"DotsOnImage-module_isBottom__c-aLe"};
|
|
638
|
-
|
|
639
|
-
const DotsOnImage = ({
|
|
640
|
-
block: {
|
|
641
|
-
optimized,
|
|
642
|
-
width,
|
|
643
|
-
height,
|
|
644
|
-
credit,
|
|
645
|
-
display,
|
|
646
|
-
dots
|
|
647
|
-
}
|
|
648
|
-
}) => {
|
|
649
|
-
const [ratio, setRatio] = useState(1);
|
|
650
|
-
const [ref, inView, entry] = useInView();
|
|
651
|
-
const container = useRef(null);
|
|
652
|
-
const [popover, setPopover] = useState({
|
|
653
|
-
title: null,
|
|
654
|
-
body: null,
|
|
655
|
-
show: false,
|
|
656
|
-
id: null
|
|
657
|
-
});
|
|
658
|
-
const [visible, setVisible] = useState(false);
|
|
659
|
-
const defaultWidth = 375;
|
|
660
|
-
useEffect(() => {
|
|
661
|
-
if (entry && entry.boundingClientRect && entry.boundingClientRect.y < 0) {
|
|
662
|
-
setVisible(true);
|
|
663
|
-
}
|
|
664
|
-
}, [entry]);
|
|
665
|
-
useEffect(() => {
|
|
666
|
-
if (inView) {
|
|
667
|
-
setVisible(true);
|
|
668
|
-
}
|
|
669
|
-
}, [inView]);
|
|
670
|
-
useEffect(() => {
|
|
671
|
-
if (popover.id) {
|
|
672
|
-
document.addEventListener('click', handleClickOutside);
|
|
673
|
-
} else {
|
|
674
|
-
document.removeEventListener('click', handleClickOutside);
|
|
675
|
-
}
|
|
676
|
-
return () => document.removeEventListener('click', handleClickOutside);
|
|
677
|
-
}, [popover]);
|
|
678
|
-
useEffect(() => {
|
|
679
|
-
setDotSize();
|
|
680
|
-
window.addEventListener('resize', setDotSize);
|
|
681
|
-
return () => document.removeEventListener('resize', setDotSize);
|
|
682
|
-
}, [visible]);
|
|
683
|
-
const setDotSize = () => {
|
|
684
|
-
const width = window.innerWidth;
|
|
685
|
-
if (width < defaultWidth) {
|
|
686
|
-
const ratio = width / defaultWidth;
|
|
687
|
-
setRatio(ratio);
|
|
688
|
-
} else {
|
|
689
|
-
setRatio(1);
|
|
690
|
-
}
|
|
691
|
-
};
|
|
692
|
-
const handleClickOutside = event => {
|
|
693
|
-
const path = event.composedPath();
|
|
694
|
-
if (path.indexOf(container.current) === -1) {
|
|
695
|
-
setPopover({
|
|
696
|
-
show: false
|
|
697
|
-
});
|
|
698
|
-
}
|
|
699
|
-
};
|
|
700
|
-
const handleDotClick = dot => {
|
|
701
|
-
const shouldShow = dot.id !== popover.id;
|
|
702
|
-
const side = dot.position.x > 50 ? 'isLeft' : 'isRight';
|
|
703
|
-
const align = dot.position.y > 50 ? 'isBottom' : 'isTop';
|
|
704
|
-
const style = {
|
|
705
|
-
top: `${dot.position.y}%`,
|
|
706
|
-
left: `${dot.position.x}%`
|
|
707
|
-
};
|
|
708
|
-
setPopover({
|
|
709
|
-
title: dot.title,
|
|
710
|
-
body: dot.body,
|
|
711
|
-
show: shouldShow,
|
|
712
|
-
id: shouldShow ? dot.id : null,
|
|
713
|
-
style,
|
|
714
|
-
side,
|
|
715
|
-
align
|
|
716
|
-
});
|
|
717
|
-
};
|
|
718
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
719
|
-
className: makeClassName([[styles$B.root, true], [styles$B.isVisible, visible]]),
|
|
720
|
-
"data-testid": "dots-on-image",
|
|
721
|
-
ref: ref
|
|
722
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
723
|
-
fullscreen: false,
|
|
724
|
-
optimized: optimized,
|
|
725
|
-
width: width,
|
|
726
|
-
height: height,
|
|
727
|
-
alt: credit,
|
|
728
|
-
display: display
|
|
729
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
730
|
-
ref: container
|
|
731
|
-
}, dots.map(dot => ( /*#__PURE__*/React.createElement("div", {
|
|
732
|
-
className: styles$B.dot,
|
|
733
|
-
key: dot.id,
|
|
734
|
-
style: {
|
|
735
|
-
top: `${dot.position.y}%`,
|
|
736
|
-
left: `${dot.position.x}%`,
|
|
737
|
-
transform: `scale(${ratio}) translate(-${50 / ratio}%, -${50 / ratio}%)`
|
|
738
|
-
}
|
|
739
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
740
|
-
className: makeClassName([[styles$B.marker, true], [styles$B.isActive, dot.id === popover.id]]),
|
|
741
|
-
type: "button",
|
|
742
|
-
style: {
|
|
743
|
-
backgroundColor: dot.icon.color
|
|
744
|
-
},
|
|
745
|
-
onClick: () => handleDotClick(dot)
|
|
746
|
-
}, dot.icon.type === 'svg' && ( /*#__PURE__*/React.createElement("div", {
|
|
747
|
-
dangerouslySetInnerHTML: {
|
|
748
|
-
__html: dot.icon.svg_string
|
|
749
|
-
}
|
|
750
|
-
})), dot.icon.type === 'number' && dot.icon.number)))), popover.show && ( /*#__PURE__*/React.createElement(React.Fragment, null, viewportSize().width >= MediaQuerySizes.LANDSCAPE_TABLET ? ( /*#__PURE__*/React.createElement("div", {
|
|
751
|
-
className: makeClassName([[styles$B.popover, true], [styles$B[popover.side], !!popover.side], [styles$B[popover.align], !!popover.align]]),
|
|
752
|
-
style: popover.style
|
|
753
|
-
}, /*#__PURE__*/React.createElement(Footnote, {
|
|
754
|
-
onClose: () => {
|
|
755
|
-
setPopover({
|
|
756
|
-
show: false
|
|
757
|
-
});
|
|
758
|
-
}
|
|
759
|
-
}, popover.title && /*#__PURE__*/React.createElement("h3", null, popover.title), /*#__PURE__*/React.createElement("div", {
|
|
760
|
-
dangerouslySetInnerHTML: {
|
|
761
|
-
__html: popover.body
|
|
762
|
-
}
|
|
763
|
-
})))) : ( /*#__PURE__*/React.createElement(Popover, {
|
|
764
|
-
onClose: () => {
|
|
765
|
-
setPopover({
|
|
766
|
-
show: false
|
|
767
|
-
});
|
|
768
|
-
}
|
|
769
|
-
}, popover.title && /*#__PURE__*/React.createElement("h3", null, popover.title), /*#__PURE__*/React.createElement("div", {
|
|
770
|
-
dangerouslySetInnerHTML: {
|
|
771
|
-
__html: popover.body
|
|
772
|
-
}
|
|
773
|
-
})))))));
|
|
774
|
-
};
|
|
775
|
-
|
|
776
|
-
var styles$A = {"root":"Tag-module_root__sGbnM","small":"Tag-module_small__hcPrf","large":"Tag-module_large__EKMu6","dark":"Tag-module_dark__9SHCb","light":"Tag-module_light__qlfy3","gold":"Tag-module_gold__u0bzS","gray":"Tag-module_gray__eazPk","inherit":"Tag-module_inherit__z21c-","is1to1":"Tag-module_is1to1__V-fH5","is1to2":"Tag-module_is1to2__b9Obh","isInSuperBlock":"Tag-module_isInSuperBlock__wrFUY","is1to3":"Tag-module_is1to3__vZT-R","is1to4":"Tag-module_is1to4__MBh5V","slide":"Tag-module_slide__gzptP","game":"Tag-module_game__NmKec","podcastMaterial":"Tag-module_podcastMaterial__O-LBI","richRelated":"Tag-module_richRelated__Qs6Ei","isInBookRelated":"Tag-module_isInBookRelated__ikTaj","card":"Tag-module_card__TX87-","live":"Tag-module_live__ykyR7","episode":"Tag-module_episode__3OHmN","podcast":"Tag-module_podcast__K6dHn","rich":"Tag-module_rich__vPnWd","isInDynamicBlock":"Tag-module_isInDynamicBlock__WNleF","mobile":"Tag-module_mobile__19oMH","desktop":"Tag-module_desktop__cNyQs"};
|
|
777
|
-
|
|
778
|
-
const Tag = ({
|
|
779
|
-
children,
|
|
780
|
-
size = 'small',
|
|
781
|
-
theme = 'gold',
|
|
782
|
-
styleContext,
|
|
783
|
-
correlation,
|
|
784
|
-
onlyOn
|
|
785
|
-
}) => {
|
|
786
|
-
let classNames = [[styles$A.root, true], [styles$A[size], !!size && !!styles$A[size]], [styles$A[theme], !!theme && !!styles$A[theme]], [styles$A[onlyOn], !!onlyOn && !!styles$A[onlyOn]], [styles$A[correlation], !!correlation && !!styles$A[correlation]]];
|
|
787
|
-
if (styleContext) {
|
|
788
|
-
classNames = makeStyleContext(classNames, styleContext, styles$A);
|
|
789
|
-
}
|
|
790
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
791
|
-
"data-testid": "tag",
|
|
792
|
-
className: makeClassName(classNames)
|
|
793
|
-
}, children);
|
|
794
|
-
};
|
|
795
|
-
|
|
796
|
-
var styles$z = {"root":"MediaCaption-module_root__1r0wu","caption":"MediaCaption-module_caption__ewfcc","credit":"MediaCaption-module_credit__7y4v8","dark":"MediaCaption-module_dark__7a9Cm","video":"MediaCaption-module_video__RDTUa","picture":"MediaCaption-module_picture__abCvw","desktop":"MediaCaption-module_desktop__e0lCY","isDark":"MediaCaption-module_isDark__IFb9X"};
|
|
797
|
-
|
|
798
|
-
const MediaCaption = ({
|
|
799
|
-
credit,
|
|
800
|
-
caption,
|
|
801
|
-
styleContext
|
|
802
|
-
}) => {
|
|
803
|
-
let classNames = [[styles$z.root, true]];
|
|
804
|
-
if (styleContext) {
|
|
805
|
-
classNames = makeStyleContext(classNames, styleContext, styles$z);
|
|
806
|
-
}
|
|
807
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
808
|
-
"data-testid": "media-caption",
|
|
809
|
-
className: makeClassName(classNames)
|
|
810
|
-
}, caption && ( /*#__PURE__*/React.createElement("div", {
|
|
811
|
-
className: styles$z.caption,
|
|
812
|
-
dangerouslySetInnerHTML: {
|
|
813
|
-
__html: caption
|
|
814
|
-
}
|
|
815
|
-
})), credit && ( /*#__PURE__*/React.createElement("div", {
|
|
816
|
-
className: styles$z.credit,
|
|
817
|
-
dangerouslySetInnerHTML: {
|
|
818
|
-
__html: credit
|
|
819
|
-
}
|
|
820
|
-
})));
|
|
821
|
-
};
|
|
822
|
-
|
|
823
|
-
var styles$y = {"root":"Table-module_root__fRuZq","card":"Table-module_card__8r-EA","table":"Table-module_table__7Pagp","slide":"Table-module_slide__dgMPV","wrapper":"Table-module_wrapper__AP4Pz","tracks":"Table-module_tracks__mRNG0","default":"Table-module_default__nwBEg","full":"Table-module_full__YZPDz","row":"Table-module_row__9OHT3","cell":"Table-module_cell__yFdqc","fixedColumn":"Table-module_fixedColumn__O2528","white":"Table-module_white__Laj3-","gray":"Table-module_gray__FPFh0","pink":"Table-module_pink__CGkAA","blue":"Table-module_blue__b8BHs","yellow":"Table-module_yellow__YOJgu","orange":"Table-module_orange__B-i8L","green":"Table-module_green__Bt6iC","violet":"Table-module_violet__yTZd7","header":"Table-module_header__YPDzO","s":"Table-module_s__I-CeX","m":"Table-module_m__vxhDf","l":"Table-module_l__GYHhk","xs":"Table-module_xs__imR8t"};
|
|
824
|
-
|
|
825
|
-
const Table = ({
|
|
826
|
-
styleContext,
|
|
827
|
-
block: {
|
|
828
|
-
rows,
|
|
829
|
-
options,
|
|
830
|
-
display,
|
|
831
|
-
columns_widths: columnsWidth,
|
|
832
|
-
table_credit: tableCredit
|
|
833
|
-
}
|
|
834
|
-
}) => {
|
|
835
|
-
const colors = {
|
|
836
|
-
'#ffffff': 'white',
|
|
837
|
-
'#f5f5f5': 'gray',
|
|
838
|
-
'#feeeee': 'pink',
|
|
839
|
-
'#e6f3ff': 'blue',
|
|
840
|
-
'#fffde6': 'yellow',
|
|
841
|
-
'#fff9f2': 'orange',
|
|
842
|
-
'#e7f2ef': 'green',
|
|
843
|
-
'#f4f0f8': 'violet'
|
|
844
|
-
};
|
|
845
|
-
let classNames = [[styles$y.root, true], [styles$y[display], !!display && !!styles$y[display]]];
|
|
846
|
-
if (styleContext) {
|
|
847
|
-
classNames = makeStyleContext(classNames, styleContext, styles$y);
|
|
848
|
-
}
|
|
849
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
850
|
-
"data-testid": "table",
|
|
851
|
-
className: makeClassName(classNames)
|
|
852
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
853
|
-
className: styles$y.wrapper
|
|
854
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
855
|
-
className: styles$y.table
|
|
856
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
857
|
-
className: styles$y.tracks
|
|
858
|
-
}, rows.map((row, i) => {
|
|
859
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
860
|
-
key: row.key,
|
|
861
|
-
className: styles$y.row
|
|
862
|
-
}, row.cells.map((cell, j) => ( /*#__PURE__*/React.createElement("div", {
|
|
863
|
-
key: cell.key,
|
|
864
|
-
className: makeClassName([[styles$y.cell, true], [styles$y.header, options.header && i === 0], [styles$y[colors[cell.color]], true], [styles$y[columnsWidth[j]], true], [styles$y.fixedColumn, options.fixed_first_column && j === 0]]),
|
|
865
|
-
dangerouslySetInnerHTML: {
|
|
866
|
-
__html: cell.val
|
|
867
|
-
}
|
|
868
|
-
}))));
|
|
869
|
-
})))), tableCredit && ( /*#__PURE__*/React.createElement(MediaCaption, {
|
|
870
|
-
credit: tableCredit,
|
|
871
|
-
styleContext: styleContext
|
|
872
|
-
})));
|
|
873
|
-
};
|
|
874
|
-
|
|
875
|
-
var styles$x = {"root":"MaterialNote-module_root__99HSA","dark":"MaterialNote-module_dark__etjym","note_credit":"MaterialNote-module_note_credit__J1skG","note_caption":"MaterialNote-module_note_caption__G2Ad0","center":"MaterialNote-module_center__mDLEO","default":"MaterialNote-module_default__ozgd7","card":"MaterialNote-module_card__EVuZe","slide":"MaterialNote-module_slide__mg8XV","game":"MaterialNote-module_game__c-r0n","gameSurvey":"MaterialNote-module_gameSurvey__azhu6"};
|
|
876
|
-
|
|
877
|
-
const MaterialNote = ({
|
|
878
|
-
block: {
|
|
879
|
-
data
|
|
880
|
-
},
|
|
881
|
-
styleContext
|
|
882
|
-
}) => {
|
|
883
|
-
let classNames = [[styles$x.root, true]];
|
|
884
|
-
if (styleContext) {
|
|
885
|
-
classNames = makeStyleContext(classNames, styleContext, styles$x);
|
|
886
|
-
}
|
|
887
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
888
|
-
"data-testid": "material-note",
|
|
889
|
-
className: makeClassName(classNames)
|
|
890
|
-
}, data && data.map(item => ( /*#__PURE__*/React.createElement("p", {
|
|
891
|
-
className: styles$x[item.type],
|
|
892
|
-
key: item.id,
|
|
893
|
-
dangerouslySetInnerHTML: {
|
|
894
|
-
__html: item.data
|
|
895
|
-
}
|
|
896
|
-
})))));
|
|
897
|
-
};
|
|
898
|
-
|
|
899
|
-
var styles$w = {"root":"BookmarkButton-module_root__A-75w","control":"BookmarkButton-module_control__-xy5O","dark":"BookmarkButton-module_dark__GkMEC","light":"BookmarkButton-module_light__1W6tx","isInBookmarks":"BookmarkButton-module_isInBookmarks__YSjjj","isInGrid":"BookmarkButton-module_isInGrid__Desh-"};
|
|
900
|
-
|
|
901
|
-
const BookmarkButton = ({
|
|
902
|
-
styleContext,
|
|
903
|
-
theme,
|
|
904
|
-
isInBookmarks,
|
|
905
|
-
onClick
|
|
906
|
-
}) => {
|
|
907
|
-
let classNames = [[styles$w.root, true], [styles$w.isInBookmarks, isInBookmarks], [styles$w[theme], !!theme && !!styles$w[theme]]];
|
|
908
|
-
if (styleContext) {
|
|
909
|
-
classNames = makeStyleContext(classNames, styleContext, styles$w);
|
|
910
|
-
}
|
|
911
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
912
|
-
"data-testid": "bookmark-button",
|
|
913
|
-
className: makeClassName(classNames)
|
|
914
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
915
|
-
className: styles$w.control,
|
|
916
|
-
onClick: () => onClick(),
|
|
917
|
-
type: "button"
|
|
918
|
-
}, /*#__PURE__*/React.createElement(SvgSymbol, {
|
|
919
|
-
icon: "bookmark",
|
|
920
|
-
size: "unset"
|
|
921
|
-
})));
|
|
922
|
-
};
|
|
923
|
-
|
|
924
|
-
var styles$v = {"root":"MaterialTitle-module_root__VSphO","primary":"MaterialTitle-module_primary__XGnpb","secondary":"MaterialTitle-module_secondary__7IDEp"};
|
|
925
|
-
|
|
926
|
-
const Primary = ({
|
|
927
|
-
children
|
|
928
|
-
}) => {
|
|
929
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
930
|
-
className: styles$v.primary
|
|
931
|
-
}, children);
|
|
932
|
-
};
|
|
933
|
-
const Secondary = ({
|
|
934
|
-
children
|
|
935
|
-
}) => {
|
|
936
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
937
|
-
className: styles$v.secondary
|
|
938
|
-
}, children);
|
|
939
|
-
};
|
|
940
|
-
const MaterialTitle = ({
|
|
941
|
-
children
|
|
942
|
-
}) => {
|
|
943
|
-
return /*#__PURE__*/React.createElement("h1", {
|
|
944
|
-
className: styles$v.root,
|
|
945
|
-
"data-testid": "material-title"
|
|
946
|
-
}, children);
|
|
947
|
-
};
|
|
948
|
-
|
|
949
|
-
var styles$u = {"root":"Dropdown-module_root__Wv7S-","menu":"Dropdown-module_menu__11IQL","inactive":"Dropdown-module_inactive__E5CP6","isInAudioPanel":"Dropdown-module_isInAudioPanel__UniSV"};
|
|
950
|
-
|
|
951
|
-
const Menu = ({
|
|
952
|
-
children
|
|
953
|
-
}) => {
|
|
954
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
955
|
-
"data-testid": "dropdown",
|
|
956
|
-
className: styles$u.menu
|
|
957
|
-
}, children);
|
|
958
|
-
};
|
|
959
|
-
const Dropdown = ({
|
|
960
|
-
children,
|
|
961
|
-
active,
|
|
962
|
-
styleContext
|
|
963
|
-
}) => {
|
|
964
|
-
let classNames = [[styles$u.root, true], [styles$u.inactive, !active && styleContext === 'isPodcastSeason' && !!styles$u.inactive]];
|
|
965
|
-
if (styleContext) {
|
|
966
|
-
classNames = makeStyleContext(classNames, styleContext, styles$u);
|
|
967
|
-
}
|
|
968
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
969
|
-
"data-testid": "dropdown",
|
|
970
|
-
className: makeClassName(classNames)
|
|
971
|
-
}, children);
|
|
972
|
-
};
|
|
973
|
-
|
|
974
|
-
var styles$t = {"root":"Toolbar-module_root__RnmlI","list":"Toolbar-module_list__-IhdP","item":"Toolbar-module_item__CWmGM","isInTopbar":"Toolbar-module_isInTopbar__WEDi8","center":"Toolbar-module_center__pvdiJ","game":"Toolbar-module_game__etwIA","gameSurvey":"Toolbar-module_gameSurvey__v4D31","slide":"Toolbar-module_slide__PtB3l","card":"Toolbar-module_card__Lutyq","isDark":"Toolbar-module_isDark__MG6Ar","dark":"Toolbar-module_dark__a9sgz"};
|
|
975
|
-
|
|
976
|
-
const ToolbarItem = ({
|
|
977
|
-
children
|
|
978
|
-
}) => {
|
|
979
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
980
|
-
className: styles$t.item
|
|
981
|
-
}, children);
|
|
982
|
-
};
|
|
983
|
-
|
|
984
|
-
const Toolbar = ({
|
|
985
|
-
children,
|
|
986
|
-
styleContext
|
|
987
|
-
}) => {
|
|
988
|
-
let classNames = [[styles$t.root, true]];
|
|
989
|
-
if (styleContext) {
|
|
990
|
-
classNames = makeStyleContext(classNames, styleContext, styles$t);
|
|
991
|
-
}
|
|
992
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
993
|
-
"data-testid": "toolbar",
|
|
994
|
-
className: makeClassName(classNames)
|
|
995
|
-
}, /*#__PURE__*/React.createElement("ul", {
|
|
996
|
-
className: styles$t.list
|
|
997
|
-
}, children));
|
|
998
|
-
};
|
|
999
|
-
|
|
1000
|
-
var styles$s = {"containerInDynamicBlock":"Meta-module_containerInDynamicBlock__YSh66","containerInDynamicBlockAndMaterial":"Meta-module_containerInDynamicBlockAndMaterial__4v4A9","root":"Meta-module_root__H-Q4d","rich":"Meta-module_rich__dCkJK","podcast":"Meta-module_podcast__MI8gD","episode":"Meta-module_episode__0n9CF","simple":"Meta-module_simple__tztcr","slide":"Meta-module_slide__3OyIN","card":"Meta-module_card__2vqfN","game":"Meta-module_game__HNcgr","isInMaterial":"Meta-module_isInMaterial__vKcTK","isInSearchItem":"Meta-module_isInSearchItem__ENqHo","isInMediaBlock":"Meta-module_isInMediaBlock__TENZG","center":"Meta-module_center__seHro","half":"Meta-module_half__aoa9h","podcastMaterial":"Meta-module_podcastMaterial__GTPyD","light":"Meta-module_light__oW3kc","dark":"Meta-module_dark__tLQNJ","isDark":"Meta-module_isDark__xSl1J","hasSource":"Meta-module_hasSource__OZJ0y","bookmark":"Meta-module_bookmark__jcFWn","isInBookRelated":"Meta-module_isInBookRelated__Ohidg","mobile":"Meta-module_mobile__PbG8N","desktop":"Meta-module_desktop__W5AB7"};
|
|
1001
|
-
|
|
1002
|
-
const Meta = ({
|
|
1003
|
-
hasSource,
|
|
1004
|
-
theme,
|
|
1005
|
-
children,
|
|
1006
|
-
onlyOn,
|
|
1007
|
-
styleContext
|
|
1008
|
-
}) => {
|
|
1009
|
-
let classNames = [[styles$s.root, true], [styles$s[theme], !!theme && !!styles$s[theme]], [styles$s[onlyOn], !!onlyOn], [styles$s.hasSource, hasSource]];
|
|
1010
|
-
if (styleContext) {
|
|
1011
|
-
classNames = makeStyleContext(classNames, styleContext, styles$s);
|
|
1012
|
-
}
|
|
1013
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1014
|
-
"data-testid": "meta",
|
|
1015
|
-
className: makeClassName(classNames)
|
|
1016
|
-
}, children);
|
|
1017
|
-
};
|
|
1018
|
-
|
|
1019
|
-
var styles$r = {"root":"Timestamp-module_root__jPJ6w"};
|
|
1020
|
-
|
|
1021
|
-
const Timestamp = ({
|
|
1022
|
-
publishedAt,
|
|
1023
|
-
locale = 'ru',
|
|
1024
|
-
type
|
|
1025
|
-
}) => {
|
|
1026
|
-
let published;
|
|
1027
|
-
const timeFormat = locale === 'ru' ? 'HH:mm, D MMMM YYYY' : 'h:mm a, MMMM D, YYYY';
|
|
1028
|
-
const preparedPublishedAt = publishedAt * 1000;
|
|
1029
|
-
dayjs.locale(locale);
|
|
1030
|
-
dayjs.extend(relativeTime);
|
|
1031
|
-
if (type === 'fromNow') {
|
|
1032
|
-
published = dayjs(preparedPublishedAt).fromNow();
|
|
1033
|
-
} else if (type === 'format') {
|
|
1034
|
-
published = dayjs(preparedPublishedAt).format('HH:mm');
|
|
1035
|
-
} else if (type === 'date') {
|
|
1036
|
-
published = dayjs(preparedPublishedAt).format(timeFormat);
|
|
1037
|
-
} else {
|
|
1038
|
-
throw new Error('Unknown time type');
|
|
1039
|
-
}
|
|
1040
|
-
return /*#__PURE__*/React.createElement("time", {
|
|
1041
|
-
suppressHydrationWarning: true,
|
|
1042
|
-
"data-testid": "timestamp",
|
|
1043
|
-
className: styles$r.root
|
|
1044
|
-
}, published);
|
|
1045
|
-
};
|
|
1046
|
-
|
|
1047
|
-
const DangerousHTML = ({
|
|
1048
|
-
className = '',
|
|
1049
|
-
tagName: TagName = 'div',
|
|
1050
|
-
html
|
|
1051
|
-
}) => {
|
|
1052
|
-
const element = useRef(null);
|
|
1053
|
-
const [canRenderHtml, setCanRenderHtml] = useState(false);
|
|
1054
|
-
useEffect(() => {
|
|
1055
|
-
setCanRenderHtml(true);
|
|
1056
|
-
}, []);
|
|
1057
|
-
const replaceScriptElementsRecursive = useCallback(node => {
|
|
1058
|
-
if (node.tagName === 'SCRIPT' && (!node.id || node.id.indexOf('script-') !== 0)) {
|
|
1059
|
-
const script = document.createElement('script');
|
|
1060
|
-
script.id = `script-${Math.random().toString(16).slice(2)}`;
|
|
1061
|
-
script.innerHTML = node.innerHTML;
|
|
1062
|
-
const attrs = node.attributes;
|
|
1063
|
-
for (let i = 0; i < attrs.length; i += 1) {
|
|
1064
|
-
const {
|
|
1065
|
-
name,
|
|
1066
|
-
value
|
|
1067
|
-
} = attrs[i];
|
|
1068
|
-
script.setAttribute(name, value);
|
|
1069
|
-
}
|
|
1070
|
-
node.parentElement.replaceChild(script, node);
|
|
1071
|
-
} else {
|
|
1072
|
-
let i = 0;
|
|
1073
|
-
const children = node.childNodes;
|
|
1074
|
-
while (i < children.length) {
|
|
1075
|
-
replaceScriptElementsRecursive(children[i]);
|
|
1076
|
-
i += 1;
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
}, []);
|
|
1080
|
-
const prepareAnchors = useCallback(() => {
|
|
1081
|
-
const anchors = Array.from(element.current.querySelectorAll('a'));
|
|
1082
|
-
anchors.forEach(a => {
|
|
1083
|
-
a.setAttribute('target', '_blank');
|
|
1084
|
-
});
|
|
1085
|
-
}, []);
|
|
1086
|
-
useEffect(() => {
|
|
1087
|
-
if (canRenderHtml && html.indexOf('script') > -1 && element.current.firstElementChild) {
|
|
1088
|
-
element.current.firstElementChild.innerHTML = html;
|
|
1089
|
-
replaceScriptElementsRecursive(element.current.firstElementChild);
|
|
1090
|
-
prepareAnchors();
|
|
1091
|
-
}
|
|
1092
|
-
}, [canRenderHtml, element, html, replaceScriptElementsRecursive, prepareAnchors]);
|
|
1093
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1094
|
-
ref: element
|
|
1095
|
-
}, /*#__PURE__*/React.createElement(TagName, {
|
|
1096
|
-
className: className,
|
|
1097
|
-
dangerouslySetInnerHTML: {
|
|
1098
|
-
__html: html
|
|
1099
|
-
}
|
|
1100
|
-
}));
|
|
1101
|
-
};
|
|
1102
|
-
|
|
1103
|
-
var styles$q = {"root":"EmbedBlock-module_root__wNZlD","object":"EmbedBlock-module_object__DONQ0","objectWrap":"EmbedBlock-module_objectWrap__qpbni","gameEmbed":"EmbedBlock-module_gameEmbed__tO5Ha","proportional":"EmbedBlock-module_proportional__zDPfm","default":"EmbedBlock-module_default__np8MO","xs":"EmbedBlock-module_xs__PNHGz","full":"EmbedBlock-module_full__Gmz7o","super_full":"EmbedBlock-module_super_full__-h382","figure":"EmbedBlock-module_figure__fNZB-","dark":"EmbedBlock-module_dark__S2R9f","isInGroupedBlock":"EmbedBlock-module_isInGroupedBlock__Wjj7k","control":"EmbedBlock-module_control__9bJUa","raw_html":"EmbedBlock-module_raw_html__EfYVy","mobileFullwidth":"EmbedBlock-module_mobileFullwidth__1MDT5","isInCard":"EmbedBlock-module_isInCard__WnLHG","isInSlide":"EmbedBlock-module_isInSlide__BtdnY","cc":"EmbedBlock-module_cc__Gyw44","isInSensitiveBlock":"EmbedBlock-module_isInSensitiveBlock__nYajZ","isInAnswer":"EmbedBlock-module_isInAnswer__WuZ0H","picture":"EmbedBlock-module_picture__Weamy","wrapper":"EmbedBlock-module_wrapper__ynT7R","mobile":"EmbedBlock-module_mobile__lEuww","desktop":"EmbedBlock-module_desktop__599S7"};
|
|
1104
|
-
|
|
1105
|
-
const EmbedGif = ({
|
|
1106
|
-
gif,
|
|
1107
|
-
mp4Url,
|
|
1108
|
-
style
|
|
1109
|
-
}) => {
|
|
1110
|
-
const [videoFrozen, setVideoFrozen] = useState(false);
|
|
1111
|
-
const videoElem = useRef(null);
|
|
1112
|
-
const handleVideoTouch = () => {
|
|
1113
|
-
videoElem.current.play();
|
|
1114
|
-
setVideoFrozen(false);
|
|
1115
|
-
};
|
|
1116
|
-
const handleVideoError = () => {
|
|
1117
|
-
const video = videoElem.current;
|
|
1118
|
-
video.setAttribute('poster', video.dataset.gif);
|
|
1119
|
-
setVideoFrozen(false);
|
|
1120
|
-
};
|
|
1121
|
-
useEffect(() => {
|
|
1122
|
-
const video = videoElem.current;
|
|
1123
|
-
const {
|
|
1124
|
-
width: viewportWidth
|
|
1125
|
-
} = viewportSize();
|
|
1126
|
-
if (viewportWidth >= MediaQuerySizes.MOBILE) {
|
|
1127
|
-
video.setAttribute('autoplay', true);
|
|
1128
|
-
video.play();
|
|
1129
|
-
} else {
|
|
1130
|
-
setVideoFrozen(true);
|
|
1131
|
-
video.pause();
|
|
1132
|
-
video.addEventListener('touchstart', handleVideoTouch);
|
|
1133
|
-
}
|
|
1134
|
-
video.addEventListener('error', handleVideoError);
|
|
1135
|
-
return () => {
|
|
1136
|
-
video.removeEventListener('touchstart', handleVideoTouch);
|
|
1137
|
-
video.removeEventListener('error', handleVideoError);
|
|
1138
|
-
};
|
|
1139
|
-
}, []);
|
|
1140
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1141
|
-
className: styles$q.figure
|
|
1142
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1143
|
-
className: styles$q.objectWrap,
|
|
1144
|
-
style: style,
|
|
1145
|
-
"data-frozen": videoFrozen
|
|
1146
|
-
}, /*#__PURE__*/React.createElement("video", {
|
|
1147
|
-
playsInline: true,
|
|
1148
|
-
muted: true,
|
|
1149
|
-
loop: true,
|
|
1150
|
-
autoPlay: true,
|
|
1151
|
-
preload: "metadata",
|
|
1152
|
-
"data-gif": gif,
|
|
1153
|
-
ref: videoElem
|
|
1154
|
-
}, /*#__PURE__*/React.createElement("source", {
|
|
1155
|
-
src: `https://meduza.io${mp4Url}`,
|
|
1156
|
-
type: "video/mp4"
|
|
1157
|
-
}))));
|
|
1158
|
-
};
|
|
1159
|
-
|
|
1160
|
-
const EmbedBlock = ({
|
|
1161
|
-
block,
|
|
1162
|
-
block: {
|
|
1163
|
-
data,
|
|
1164
|
-
data: {
|
|
1165
|
-
html,
|
|
1166
|
-
display,
|
|
1167
|
-
only_on: onlyOn,
|
|
1168
|
-
provider,
|
|
1169
|
-
cc,
|
|
1170
|
-
optimized,
|
|
1171
|
-
small_url: small,
|
|
1172
|
-
large_url: large,
|
|
1173
|
-
gif_url: gifUrl,
|
|
1174
|
-
mp4_url: mp4Url
|
|
1175
|
-
}
|
|
1176
|
-
},
|
|
1177
|
-
styleContext,
|
|
1178
|
-
children
|
|
1179
|
-
}) => {
|
|
1180
|
-
const [isPopoverShown, setIsPopoverShown] = useState(false);
|
|
1181
|
-
const style = {};
|
|
1182
|
-
const isProportional = block.data.height && block.data.width;
|
|
1183
|
-
const fullWidthProviders = ['youtube', 'vimeo', 'onetv', 'coub', 'meduza', 'facebook_video'];
|
|
1184
|
-
const mobileFullwidth = fullWidthProviders.indexOf(provider) > -1 || block.type === 'dots_on_image';
|
|
1185
|
-
const renderCC = context => ( /*#__PURE__*/React.createElement(MediaCaption, {
|
|
1186
|
-
credit: data.credit,
|
|
1187
|
-
caption: data.caption,
|
|
1188
|
-
styleContext: context || styleContext
|
|
1189
|
-
}));
|
|
1190
|
-
const renderEmbed = style => {
|
|
1191
|
-
switch (block.type) {
|
|
1192
|
-
case 'gif':
|
|
1193
|
-
{
|
|
1194
|
-
return /*#__PURE__*/React.createElement(EmbedGif, {
|
|
1195
|
-
gif: gifUrl,
|
|
1196
|
-
mp4Url: mp4Url,
|
|
1197
|
-
style: style
|
|
1198
|
-
});
|
|
1199
|
-
}
|
|
1200
|
-
case 'image':
|
|
1201
|
-
{
|
|
1202
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1203
|
-
className: styles$q.figure
|
|
1204
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
1205
|
-
source: !optimized && [small, large],
|
|
1206
|
-
optimized: block.data.optimized,
|
|
1207
|
-
width: block.data.width,
|
|
1208
|
-
height: block.data.height,
|
|
1209
|
-
alt: block.data.caption,
|
|
1210
|
-
display: block.data.display,
|
|
1211
|
-
lazy: block.data.lazy,
|
|
1212
|
-
styleContext: styleContext
|
|
1213
|
-
}));
|
|
1214
|
-
}
|
|
1215
|
-
case 'game_embed':
|
|
1216
|
-
{
|
|
1217
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1218
|
-
className: styles$q.gameEmbed
|
|
1219
|
-
}, /*#__PURE__*/React.createElement("iframe", {
|
|
1220
|
-
src: block.data.game_src,
|
|
1221
|
-
id: block.data.game_id,
|
|
1222
|
-
title: "Game embed"
|
|
1223
|
-
}));
|
|
1224
|
-
}
|
|
1225
|
-
case 'dots_on_image':
|
|
1226
|
-
{
|
|
1227
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1228
|
-
className: styles$q.figure
|
|
1229
|
-
}, /*#__PURE__*/React.createElement(DotsOnImage, {
|
|
1230
|
-
block: data
|
|
1231
|
-
}));
|
|
1232
|
-
}
|
|
1233
|
-
default:
|
|
1234
|
-
{
|
|
1235
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1236
|
-
className: styles$q.object
|
|
1237
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1238
|
-
className: styles$q.wrapper,
|
|
1239
|
-
style: style
|
|
1240
|
-
}, /*#__PURE__*/React.createElement(DangerousHTML, {
|
|
1241
|
-
className: styles$q.objectWrap,
|
|
1242
|
-
html: html
|
|
1243
|
-
})));
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
};
|
|
1247
|
-
if (isProportional) {
|
|
1248
|
-
style.paddingBottom = `${block.data.height / block.data.width * 100}%`;
|
|
1249
|
-
style.height = 0;
|
|
1250
|
-
}
|
|
1251
|
-
let classNames = [[styles$q.root, true], [styles$q.cc, cc], [styles$q[display], !!display && styles$q[display]], [styles$q[provider], !!provider && !!styles$q[provider]], [styles$q[onlyOn], !!onlyOn && styles$q[onlyOn]], [styles$q.mobileFullwidth, mobileFullwidth], [styles$q.proportional, isProportional]];
|
|
1252
|
-
// Убираем из контекста все, что не начинается с приставки isIn,
|
|
1253
|
-
// чтобы не применились лишние модификаторы
|
|
1254
|
-
// TODO: в w6 модификаторы должны передаваться явно
|
|
1255
|
-
if (styleContext && Array.isArray(styleContext)) {
|
|
1256
|
-
const filteredContext = styleContext.filter(key => key.startsWith('isIn') && styles$q[key]).reduce((acc, key) => {
|
|
1257
|
-
acc.push(key);
|
|
1258
|
-
return acc;
|
|
1259
|
-
}, []);
|
|
1260
|
-
classNames = makeStyleContext(classNames, filteredContext, styles$q);
|
|
1261
|
-
}
|
|
1262
|
-
return /*#__PURE__*/React.createElement("figure", {
|
|
1263
|
-
className: makeClassName(classNames)
|
|
1264
|
-
}, children && ( /*#__PURE__*/React.createElement("div", {
|
|
1265
|
-
className: styles$q.object
|
|
1266
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1267
|
-
className: styles$q.wrapper,
|
|
1268
|
-
style: style
|
|
1269
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1270
|
-
className: styles$q.objectWrap
|
|
1271
|
-
}, children)))), !children && renderEmbed(style), cc === 'default' && /*#__PURE__*/React.createElement("figcaption", null, renderCC()), cc === 'button' && ( /*#__PURE__*/React.createElement("button", {
|
|
1272
|
-
className: styles$q.control,
|
|
1273
|
-
type: "button",
|
|
1274
|
-
"aria-label": "Open",
|
|
1275
|
-
onClick: () => {
|
|
1276
|
-
setIsPopoverShown(!isPopoverShown);
|
|
1277
|
-
}
|
|
1278
|
-
})), cc === 'button' && isPopoverShown && ( /*#__PURE__*/React.createElement(Popover, {
|
|
1279
|
-
onClose: () => {
|
|
1280
|
-
setIsPopoverShown(false);
|
|
1281
|
-
}
|
|
1282
|
-
}, renderCC('isInPopover'))));
|
|
1283
|
-
};
|
|
1284
|
-
|
|
1285
|
-
const IframeBlock = ({
|
|
1286
|
-
block,
|
|
1287
|
-
block: {
|
|
1288
|
-
id
|
|
1289
|
-
},
|
|
1290
|
-
styleContext,
|
|
1291
|
-
lang = 'ru'
|
|
1292
|
-
}) => {
|
|
1293
|
-
const element = useRef(null);
|
|
1294
|
-
const renderIframe = () => {
|
|
1295
|
-
const rootEl = document.createElement('div');
|
|
1296
|
-
const contentEl = document.createElement('div');
|
|
1297
|
-
const scriptEl = document.createElement('script');
|
|
1298
|
-
const style = document.createElement('style');
|
|
1299
|
-
const range = document.createRange();
|
|
1300
|
-
range.setStart(contentEl, 0);
|
|
1301
|
-
contentEl.setAttribute('id', 'content');
|
|
1302
|
-
scriptEl.textContent = `
|
|
1303
|
-
function getDocHeight() {
|
|
1304
|
-
var doc = document;
|
|
1305
|
-
var body = doc.body;
|
|
1306
|
-
var html = doc.documentElement;
|
|
1307
|
-
var height = Math.max( body.scrollHeight, body.offsetHeight,
|
|
1308
|
-
html.clientHeight, html.scrollHeight, html.offsetHeight );
|
|
1309
|
-
|
|
1310
|
-
doc.body.style.margin="0";
|
|
1311
|
-
|
|
1312
|
-
return document.getElementById('content') ? document.getElementById('content').offsetHeight : height;
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
function sendDocHeightMsg() {
|
|
1316
|
-
var height = getDocHeight();
|
|
1317
|
-
var message = JSON.stringify({
|
|
1318
|
-
action: {
|
|
1319
|
-
type: "UPDATE_HEIGHT",
|
|
1320
|
-
payload: {
|
|
1321
|
-
id: "${block.id}",
|
|
1322
|
-
height: height
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
});
|
|
1326
|
-
parent.postMessage("mdzMaterialEmbedHeight=" + message, '*');
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
setInterval(sendDocHeightMsg, 300);
|
|
1330
|
-
`;
|
|
1331
|
-
style.type = 'text/css';
|
|
1332
|
-
style.innerHTML = block.type === 'embed_code' ? '.twitter-tweet { padding-top: 15px; margin: 0 !important; }' : '.twitter-tweet { margin: 0 !important; } .fb-post { display: block; } .instagram-media { min-width: 0 !important; }';
|
|
1333
|
-
contentEl.appendChild(range.createContextualFragment(block.data.html));
|
|
1334
|
-
rootEl.appendChild(scriptEl);
|
|
1335
|
-
rootEl.appendChild(contentEl);
|
|
1336
|
-
contentEl.appendChild(style);
|
|
1337
|
-
const frame = element.current.querySelector('iframe').contentDocument;
|
|
1338
|
-
frame.open();
|
|
1339
|
-
frame.close();
|
|
1340
|
-
frame.documentElement.setAttribute('lang', lang);
|
|
1341
|
-
frame.body.appendChild(rootEl);
|
|
1342
|
-
};
|
|
1343
|
-
useEffect(() => {
|
|
1344
|
-
renderIframe();
|
|
1345
|
-
}, []);
|
|
1346
|
-
return /*#__PURE__*/React.createElement(EmbedBlock, {
|
|
1347
|
-
block: block,
|
|
1348
|
-
styleContext: styleContext
|
|
1349
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1350
|
-
ref: element,
|
|
1351
|
-
dangerouslySetInnerHTML: {
|
|
1352
|
-
__html: `<iframe id=${id} frameBorder="0" scrolling="no"></iframe>`
|
|
1353
|
-
}
|
|
1354
|
-
}));
|
|
1355
|
-
};
|
|
1356
|
-
|
|
1357
|
-
const EmbedBlockContainer = ({
|
|
1358
|
-
block,
|
|
1359
|
-
styleContext,
|
|
1360
|
-
lang
|
|
1361
|
-
}) => {
|
|
1362
|
-
if (block.data && block.data.wrap_with_iframe) {
|
|
1363
|
-
return /*#__PURE__*/React.createElement(IframeBlock, {
|
|
1364
|
-
block: block,
|
|
1365
|
-
styleContext: styleContext,
|
|
1366
|
-
lang: lang
|
|
1367
|
-
});
|
|
1368
|
-
}
|
|
1369
|
-
return /*#__PURE__*/React.createElement(EmbedBlock, {
|
|
1370
|
-
block: block,
|
|
1371
|
-
styleContext: styleContext
|
|
1372
|
-
});
|
|
1373
|
-
};
|
|
1374
|
-
|
|
1375
|
-
var styles$p = {"root":"QuoteBlock-module_root__4qa1J","center":"QuoteBlock-module_center__1f83y"};
|
|
1376
|
-
|
|
1377
|
-
const QuoteBlock = ({
|
|
1378
|
-
block: {
|
|
1379
|
-
data
|
|
1380
|
-
},
|
|
1381
|
-
styleContext
|
|
1382
|
-
}) => {
|
|
1383
|
-
let classNames = [[styles$p.root, true]];
|
|
1384
|
-
if (styleContext) {
|
|
1385
|
-
classNames = makeStyleContext(classNames, styleContext, styles$p);
|
|
1386
|
-
}
|
|
1387
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1388
|
-
"data-testid": "quote-block",
|
|
1389
|
-
className: makeClassName(classNames)
|
|
1390
|
-
}, /*#__PURE__*/React.createElement("p", {
|
|
1391
|
-
dangerouslySetInnerHTML: {
|
|
1392
|
-
__html: data
|
|
1393
|
-
}
|
|
1394
|
-
}));
|
|
1395
|
-
};
|
|
1396
|
-
|
|
1397
|
-
var styles$o = {"root":"CardTitle-module_root__Pvx--","index":"CardTitle-module_index__Keled","title":"CardTitle-module_title__Lkflo","mobile":"CardTitle-module_mobile__6N3hB","desktop":"CardTitle-module_desktop__sBokS"};
|
|
1398
|
-
|
|
1399
|
-
const CardTitle = ({
|
|
1400
|
-
block: {
|
|
1401
|
-
data: {
|
|
1402
|
-
only_on: onlyOn,
|
|
1403
|
-
index,
|
|
1404
|
-
text
|
|
1405
|
-
},
|
|
1406
|
-
id
|
|
1407
|
-
},
|
|
1408
|
-
styleContext
|
|
1409
|
-
}) => {
|
|
1410
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1411
|
-
"data-testid": "card-title",
|
|
1412
|
-
id: id,
|
|
1413
|
-
className: makeClassName([[styles$o.root, true], [styles$o[onlyOn], !!onlyOn], [styles$o[styleContext], !!styleContext && !!styles$o[styleContext]]])
|
|
1414
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1415
|
-
className: styles$o.index
|
|
1416
|
-
}, index), /*#__PURE__*/React.createElement("h3", {
|
|
1417
|
-
className: styles$o.title
|
|
1418
|
-
}, text));
|
|
1419
|
-
};
|
|
1420
|
-
|
|
1421
|
-
var styles$n = {"root":"ChapterBlock-module_root__iw7d2","subtitle":"ChapterBlock-module_subtitle__IpWgz","mobile":"ChapterBlock-module_mobile__V1Eye","desktop":"ChapterBlock-module_desktop__9xWf4"};
|
|
1422
|
-
|
|
1423
|
-
const ChapterBlock = ({
|
|
1424
|
-
block: {
|
|
1425
|
-
data,
|
|
1426
|
-
only_on: onlyOn
|
|
1427
|
-
},
|
|
1428
|
-
styleContext,
|
|
1429
|
-
id
|
|
1430
|
-
}) => {
|
|
1431
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1432
|
-
"data-testid": "chapter-block",
|
|
1433
|
-
id: id,
|
|
1434
|
-
className: makeClassName([[styles$n.root, true], [styles$n[onlyOn], !!onlyOn]])
|
|
1435
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1436
|
-
className: makeClassName([[styles$n.subtitle, true], [styles$n[styleContext], !!styleContext && !!styles$n[styleContext]]]),
|
|
1437
|
-
dangerouslySetInnerHTML: {
|
|
1438
|
-
__html: data
|
|
1439
|
-
}
|
|
1440
|
-
}));
|
|
1441
|
-
};
|
|
1442
|
-
|
|
1443
|
-
const generateGradient = (color, type) => {
|
|
1444
|
-
const steps = {
|
|
1445
|
-
mediaBlockBottom: [[0, 7], [0.08, 12], [0.16, 17], [0.22, 21], [0.32, 26], [0.42, 32], [0.52, 38], [0.62, 47], [0.72, 57], [0.82, 65], [1, 82]],
|
|
1446
|
-
mediaBlockTop: [[0.5, 0], [0, 97]]
|
|
1447
|
-
};
|
|
1448
|
-
const gradient = steps[type].map(i => `rgba(${color}, ${i[0]}) ${i[1]}%`);
|
|
1449
|
-
return `linear-gradient(-180deg, ${gradient})`;
|
|
1450
|
-
};
|
|
1451
|
-
|
|
1452
|
-
var styles$m = {"root":"SimpleTitle-module_root__YOzNn","mobile":"SimpleTitle-module_mobile__1QiJd","desktop":"SimpleTitle-module_desktop__ZF5Af"};
|
|
1453
|
-
|
|
1454
|
-
const SimpleTitle = ({
|
|
1455
|
-
block: {
|
|
1456
|
-
data: {
|
|
1457
|
-
first
|
|
1458
|
-
},
|
|
1459
|
-
only_on: onlyOn
|
|
1460
|
-
},
|
|
1461
|
-
styleContext
|
|
1462
|
-
}) => {
|
|
1463
|
-
let classNames = [[styles$m.root, true], [styles$m[onlyOn], true]];
|
|
1464
|
-
if (styleContext) {
|
|
1465
|
-
classNames = makeStyleContext(classNames, styleContext, styles$m);
|
|
1466
|
-
}
|
|
1467
|
-
return /*#__PURE__*/React.createElement("h1", {
|
|
1468
|
-
"data-testid": "simple-title",
|
|
1469
|
-
className: makeClassName(classNames)
|
|
1470
|
-
}, first);
|
|
1471
|
-
};
|
|
1472
|
-
|
|
1473
|
-
var styles$l = {"root":"RichTitle-module_root__U5XQu","slide":"RichTitle-module_slide__eU9Ob","game":"RichTitle-module_game__S1csb","podcastMaterial":"RichTitle-module_podcastMaterial__AulVF","half":"RichTitle-module_half__yBMby","featured":"RichTitle-module_featured__ULNQn","isInMediaBlock":"RichTitle-module_isInMediaBlock__2h6rl","isInBookRelated":"RichTitle-module_isInBookRelated__LcCPV","isInDynamicBlock":"RichTitle-module_isInDynamicBlock__J-gM6","mobile":"RichTitle-module_mobile__W5L9E","desktop":"RichTitle-module_desktop__k0PkC"};
|
|
1474
|
-
|
|
1475
|
-
const RichTitle = ({
|
|
1476
|
-
block: {
|
|
1477
|
-
only_on: onlyOn,
|
|
1478
|
-
data: {
|
|
1479
|
-
featured,
|
|
1480
|
-
first,
|
|
1481
|
-
second,
|
|
1482
|
-
as: TagName = 'h1'
|
|
1483
|
-
}
|
|
1484
|
-
},
|
|
1485
|
-
styleContext
|
|
1486
|
-
}) => {
|
|
1487
|
-
let classNames = [[styles$l.root, true], [styles$l[onlyOn], true], [styles$l.featured, !!featured]];
|
|
1488
|
-
if (styleContext) {
|
|
1489
|
-
classNames = makeStyleContext(classNames, styleContext, styles$l);
|
|
1490
|
-
}
|
|
1491
|
-
return /*#__PURE__*/React.createElement(TagName, {
|
|
1492
|
-
"data-testid": "rich-title",
|
|
1493
|
-
className: makeClassName(classNames)
|
|
1494
|
-
}, first, second && /*#__PURE__*/React.createElement("span", null, " ", second));
|
|
1495
|
-
};
|
|
1496
|
-
|
|
1497
|
-
var styles$k = {"p":"SimpleBlock-module_p__7aRnT","h2":"SimpleBlock-module_h2__aWlMn","h3":"SimpleBlock-module_h3__uPh0-","h4":"SimpleBlock-module_h4__MxGXA","lead":"SimpleBlock-module_lead__NzEPT","lead_hr":"SimpleBlock-module_lead_hr__XN0rm","context_p":"SimpleBlock-module_context_p__Mdu1R","blockquote":"SimpleBlock-module_blockquote__nX-Ab","game":"SimpleBlock-module_game__uVeJJ","slide":"SimpleBlock-module_slide__MaaUF","dark":"SimpleBlock-module_dark__qtLhq","divider":"SimpleBlock-module_divider__-VXBu","isInIntro":"SimpleBlock-module_isInIntro__UOePf","center":"SimpleBlock-module_center__D1CsV","isInImportantLead":"SimpleBlock-module_isInImportantLead__qzKDo","podcastMaterial":"SimpleBlock-module_podcastMaterial__XEMjh","isInAnswer":"SimpleBlock-module_isInAnswer__Asx7d","mobile":"SimpleBlock-module_mobile__EVGYJ","desktop":"SimpleBlock-module_desktop__6ZH5e","isDark":"SimpleBlock-module_isDark__ehYKr"};
|
|
1498
|
-
|
|
1499
|
-
const SimpleBlock = ({
|
|
1500
|
-
block: {
|
|
1501
|
-
data,
|
|
1502
|
-
type,
|
|
1503
|
-
only_on: onlyOn
|
|
1504
|
-
},
|
|
1505
|
-
styleContext,
|
|
1506
|
-
id = null
|
|
1507
|
-
}) => {
|
|
1508
|
-
let TagName;
|
|
1509
|
-
let classNames = [[styles$k[type], !!type && !!styles$k[type]], [styles$k[onlyOn], true]];
|
|
1510
|
-
if (styleContext) {
|
|
1511
|
-
classNames = makeStyleContext(classNames, styleContext, styles$k);
|
|
1512
|
-
}
|
|
1513
|
-
switch (type) {
|
|
1514
|
-
case 'context_p':
|
|
1515
|
-
case 'lead':
|
|
1516
|
-
case 'note_caption':
|
|
1517
|
-
case 'note_credit':
|
|
1518
|
-
{
|
|
1519
|
-
TagName = 'p';
|
|
1520
|
-
break;
|
|
1521
|
-
}
|
|
1522
|
-
case 'divider':
|
|
1523
|
-
return /*#__PURE__*/React.createElement("hr", {
|
|
1524
|
-
className: makeClassName(classNames)
|
|
1525
|
-
});
|
|
1526
|
-
case 'lead_hr':
|
|
1527
|
-
{
|
|
1528
|
-
TagName = 'div';
|
|
1529
|
-
break;
|
|
1530
|
-
}
|
|
1531
|
-
default:
|
|
1532
|
-
TagName = type;
|
|
1533
|
-
}
|
|
1534
|
-
return /*#__PURE__*/React.createElement(TagName, {
|
|
1535
|
-
className: makeClassName(classNames),
|
|
1536
|
-
dangerouslySetInnerHTML: {
|
|
1537
|
-
__html: data
|
|
1538
|
-
},
|
|
1539
|
-
id: id
|
|
1540
|
-
});
|
|
1541
|
-
};
|
|
1542
|
-
|
|
1543
|
-
var styles$j = {"root":"ListBlock-module_root__dqomP","ol":"ListBlock-module_ol__1l6nP","ul":"ListBlock-module_ul__bgHlv","center":"ListBlock-module_center__bEBN-","isInImportantLead":"ListBlock-module_isInImportantLead__ewcD1","dark":"ListBlock-module_dark__NzpYz","mobile":"ListBlock-module_mobile__qEBsn","desktop":"ListBlock-module_desktop__HN0IU"};
|
|
1544
|
-
|
|
1545
|
-
const ListBlock = ({
|
|
1546
|
-
block: {
|
|
1547
|
-
type,
|
|
1548
|
-
data,
|
|
1549
|
-
only_on: onlyOn
|
|
1550
|
-
},
|
|
1551
|
-
styleContext
|
|
1552
|
-
}) => {
|
|
1553
|
-
const TagName = type;
|
|
1554
|
-
let classNames = [[styles$j.root, true], [styles$j[onlyOn], true], [styles$j[type], !!type && !!styles$j[type]]];
|
|
1555
|
-
if (styleContext) {
|
|
1556
|
-
classNames = makeStyleContext(classNames, styleContext, styles$j);
|
|
1557
|
-
}
|
|
1558
|
-
return /*#__PURE__*/React.createElement(TagName, {
|
|
1559
|
-
className: makeClassName(classNames),
|
|
1560
|
-
"data-testid": "list-block"
|
|
1561
|
-
}, data.map((item, index) => ( /*#__PURE__*/React.createElement("li", {
|
|
1562
|
-
key: index,
|
|
1563
|
-
dangerouslySetInnerHTML: {
|
|
1564
|
-
__html: item
|
|
1565
|
-
}
|
|
1566
|
-
}))));
|
|
1567
|
-
};
|
|
1568
|
-
|
|
1569
|
-
var styles$i = {"root":"RelatedBlock-module_root__cr1c-","header":"RelatedBlock-module_header__bfUJD","items":"RelatedBlock-module_items__rzzam","rich":"RelatedBlock-module_rich__1cWdn","first":"RelatedBlock-module_first__ZkcP5","simple":"RelatedBlock-module_simple__m22bj","center":"RelatedBlock-module_center__WVpIJ","isInSlideMaterial":"RelatedBlock-module_isInSlideMaterial__VumDw","mobile":"RelatedBlock-module_mobile__AScBA","desktop":"RelatedBlock-module_desktop__uMXUY"};
|
|
1570
|
-
|
|
1571
|
-
const RelatedBlock = ({
|
|
1572
|
-
block: {
|
|
1573
|
-
data: {
|
|
1574
|
-
title,
|
|
1575
|
-
related
|
|
1576
|
-
},
|
|
1577
|
-
only_on: onlyOn
|
|
1578
|
-
},
|
|
1579
|
-
styleContext
|
|
1580
|
-
}) => {
|
|
1581
|
-
let classNames = [[styles$i.root, true], [styles$i[onlyOn], true]];
|
|
1582
|
-
if (styleContext) {
|
|
1583
|
-
classNames = makeStyleContext(classNames, styleContext, styles$i);
|
|
1584
|
-
}
|
|
1585
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1586
|
-
"data-testid": "related-block",
|
|
1587
|
-
className: makeClassName(classNames)
|
|
1588
|
-
}, /*#__PURE__*/React.createElement("h3", {
|
|
1589
|
-
className: styles$i.header
|
|
1590
|
-
}, title), /*#__PURE__*/React.createElement("ul", {
|
|
1591
|
-
className: styles$i.items
|
|
1592
|
-
}, related.map((item, index) => ( /*#__PURE__*/React.createElement("li", {
|
|
1593
|
-
key: item.id || index,
|
|
1594
|
-
className: styles$i[item.layout]
|
|
1595
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
1596
|
-
to: item.full_url || `/${item.url}`
|
|
1597
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
1598
|
-
className: styles$i.first
|
|
1599
|
-
}, item.title), item.second_title && ' ', item.second_title && /*#__PURE__*/React.createElement("span", null, item.second_title)))))));
|
|
1600
|
-
};
|
|
1601
|
-
|
|
1602
|
-
var styles$h = {"root":"SourceBlock-module_root__9dnI4","text":"SourceBlock-module_text__M5-uy","origin":"SourceBlock-module_origin__fyvxH","center":"SourceBlock-module_center__UOMwy","mobile":"SourceBlock-module_mobile__QVEyg","desktop":"SourceBlock-module_desktop__xdXWm","isDark":"SourceBlock-module_isDark__etwk1"};
|
|
1603
|
-
|
|
1604
|
-
const SourceBlock = ({
|
|
1605
|
-
block: {
|
|
1606
|
-
only_on: onlyOn,
|
|
1607
|
-
data: {
|
|
1608
|
-
quote,
|
|
1609
|
-
origin,
|
|
1610
|
-
url
|
|
1611
|
-
}
|
|
1612
|
-
},
|
|
1613
|
-
styleContext
|
|
1614
|
-
}) => {
|
|
1615
|
-
let classNames = [[styles$h.root, true], [styles$h[onlyOn], true]];
|
|
1616
|
-
if (styleContext) {
|
|
1617
|
-
classNames = makeStyleContext(classNames, styleContext, styles$h);
|
|
1618
|
-
}
|
|
1619
|
-
return /*#__PURE__*/React.createElement("blockquote", {
|
|
1620
|
-
"data-testid": "source-block",
|
|
1621
|
-
cite: url,
|
|
1622
|
-
className: makeClassName(classNames)
|
|
1623
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
1624
|
-
className: styles$h.text,
|
|
1625
|
-
href: url,
|
|
1626
|
-
target: "_blank",
|
|
1627
|
-
rel: "noopener noreferrer"
|
|
1628
|
-
}, quote.map((item, index) => ( /*#__PURE__*/React.createElement("p", {
|
|
1629
|
-
key: index,
|
|
1630
|
-
dangerouslySetInnerHTML: {
|
|
1631
|
-
__html: item.data
|
|
1632
|
-
}
|
|
1633
|
-
}))), /*#__PURE__*/React.createElement("footer", null, /*#__PURE__*/React.createElement("cite", {
|
|
1634
|
-
className: styles$h.origin
|
|
1635
|
-
}, origin))));
|
|
1636
|
-
};
|
|
1637
|
-
|
|
1638
|
-
var styles$g = {"root":"SensitiveBlock-module_root__1Nl9-","container":"SensitiveBlock-module_container__GE2tW","overlay":"SensitiveBlock-module_overlay__tEsK8","content":"SensitiveBlock-module_content__RYbdd","button":"SensitiveBlock-module_button__LGEEM","default":"SensitiveBlock-module_default__pkWhC","full":"SensitiveBlock-module_full__hlH41","media":"SensitiveBlock-module_media__nuL1S","super_full":"SensitiveBlock-module_super_full__C7UyP","visible":"SensitiveBlock-module_visible__bXhYO","isInCard":"SensitiveBlock-module_isInCard__uANYL","isInSlide":"SensitiveBlock-module_isInSlide__ZAVUU"};
|
|
1639
|
-
|
|
1640
|
-
const SensitiveBlock = ({
|
|
1641
|
-
block,
|
|
1642
|
-
block: {
|
|
1643
|
-
cc,
|
|
1644
|
-
caption,
|
|
1645
|
-
credit,
|
|
1646
|
-
blurred_image: blurredImage
|
|
1647
|
-
},
|
|
1648
|
-
block: {
|
|
1649
|
-
item: {
|
|
1650
|
-
data: {
|
|
1651
|
-
display
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
},
|
|
1655
|
-
styleContext
|
|
1656
|
-
}) => {
|
|
1657
|
-
const [visible, isVisible] = useState(false);
|
|
1658
|
-
const handleClick = () => {
|
|
1659
|
-
isVisible(true);
|
|
1660
|
-
};
|
|
1661
|
-
let classNames = [[styles$g.root, true], [styles$g.visible, visible], [styles$g[display], display && styles$g[display]]];
|
|
1662
|
-
let context = ['isInSensitiveBlock'];
|
|
1663
|
-
if (styleContext) {
|
|
1664
|
-
classNames = makeStyleContext(classNames, styleContext, styles$g);
|
|
1665
|
-
context = [...styleContext, 'isInSensitiveBlock'];
|
|
1666
|
-
}
|
|
1667
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1668
|
-
"data-testid": "sensitive-block",
|
|
1669
|
-
className: makeClassName(classNames)
|
|
1670
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1671
|
-
className: styles$g.container
|
|
1672
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1673
|
-
className: styles$g.overlay,
|
|
1674
|
-
style: {
|
|
1675
|
-
backgroundImage: `url(${blurredImage})`
|
|
1676
|
-
}
|
|
1677
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1678
|
-
className: styles$g.content
|
|
1679
|
-
}, /*#__PURE__*/React.createElement("p", {
|
|
1680
|
-
dangerouslySetInnerHTML: {
|
|
1681
|
-
__html: block.title
|
|
1682
|
-
}
|
|
1683
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
1684
|
-
className: styles$g.button
|
|
1685
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
1686
|
-
onClick: () => handleClick(),
|
|
1687
|
-
theme: "light"
|
|
1688
|
-
}, block.button.text)))), /*#__PURE__*/React.createElement("div", {
|
|
1689
|
-
className: styles$g.media
|
|
1690
|
-
}, /*#__PURE__*/React.createElement(EmbedBlockContainer, {
|
|
1691
|
-
block: block.item,
|
|
1692
|
-
styleContext: context
|
|
1693
|
-
}))), cc && ( /*#__PURE__*/React.createElement("figcaption", {
|
|
1694
|
-
className: styles$g.figcaption
|
|
1695
|
-
}, /*#__PURE__*/React.createElement(MediaCaption, {
|
|
1696
|
-
credit: credit,
|
|
1697
|
-
caption: caption,
|
|
1698
|
-
styleContext: styleContext
|
|
1699
|
-
}))));
|
|
1700
|
-
};
|
|
1701
|
-
|
|
1702
|
-
var styles$f = {"root":"GroupedBlock-module_root__MQQin","hasFigcaption":"GroupedBlock-module_hasFigcaption__Y05ed","item":"GroupedBlock-module_item__-InqF","items":"GroupedBlock-module_items__8X4js","figcaption":"GroupedBlock-module_figcaption__OE5-u","default":"GroupedBlock-module_default__Tha8f","full":"GroupedBlock-module_full__SNwyE","super_full":"GroupedBlock-module_super_full__HTA9D","mobile":"GroupedBlock-module_mobile__xqMw5","desktop":"GroupedBlock-module_desktop__Oobdp"};
|
|
1703
|
-
|
|
1704
|
-
const GroupedBlock = ({
|
|
1705
|
-
block,
|
|
1706
|
-
block: {
|
|
1707
|
-
only_on: onlyOn
|
|
1708
|
-
},
|
|
1709
|
-
styleContext
|
|
1710
|
-
}) => {
|
|
1711
|
-
const maxHeight = Math.min(...block.data.map(item => item.data && item.data.height || item.item && item.item.data.height));
|
|
1712
|
-
const normalizedBoxesWidth = block.data.map(item => {
|
|
1713
|
-
const width = item.data && item.data.width || item.item && item.item.data.heigh;
|
|
1714
|
-
const height = item.data && item.data.height || item.item && item.item.data.heigh;
|
|
1715
|
-
return width / (height / maxHeight);
|
|
1716
|
-
});
|
|
1717
|
-
const sumWidth = normalizedBoxesWidth.reduce((sum, x) => sum + x);
|
|
1718
|
-
let classNames = [[styles$f.root, true], [styles$f[onlyOn], true], [styles$f.hasFigcaption, block.cc === 'default'], [styles$f[block.display], !!block.display && styles$f[block.display]]];
|
|
1719
|
-
if (styleContext) {
|
|
1720
|
-
classNames = makeStyleContext(classNames, styleContext, styles$f);
|
|
1721
|
-
}
|
|
1722
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1723
|
-
"data-testid": "grouped-block",
|
|
1724
|
-
className: makeClassName(classNames)
|
|
1725
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1726
|
-
className: styles$f.items
|
|
1727
|
-
}, block.data.map((item, index) => {
|
|
1728
|
-
const percentWidth = normalizedBoxesWidth[index] / sumWidth * 100;
|
|
1729
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1730
|
-
className: styles$f.item,
|
|
1731
|
-
key: item.id,
|
|
1732
|
-
style: {
|
|
1733
|
-
width: `${percentWidth}%`
|
|
1734
|
-
}
|
|
1735
|
-
}, item.type === 'sensitive' ? ( /*#__PURE__*/React.createElement(SensitiveBlock, {
|
|
1736
|
-
block: item,
|
|
1737
|
-
styleContext: ['isInGroupedBlock']
|
|
1738
|
-
})) : ( /*#__PURE__*/React.createElement(EmbedBlockContainer, {
|
|
1739
|
-
block: item,
|
|
1740
|
-
styleContext: ['isInGroupedBlock']
|
|
1741
|
-
})));
|
|
1742
|
-
})), block.cc && ( /*#__PURE__*/React.createElement("figcaption", {
|
|
1743
|
-
className: styles$f.figcaption
|
|
1744
|
-
}, /*#__PURE__*/React.createElement(MediaCaption, {
|
|
1745
|
-
credit: block.credit,
|
|
1746
|
-
caption: block.caption,
|
|
1747
|
-
styleContext: styleContext
|
|
1748
|
-
}))));
|
|
1749
|
-
};
|
|
1750
|
-
|
|
1751
|
-
var styles$e = {"root":"MetaItem-module_root__sRbrZ","hasBullets":"MetaItem-module_hasBullets__b1eW9","hasSource":"MetaItem-module_hasSource__35olm","listened":"MetaItem-module_listened__XZWFQ","read":"MetaItem-module_read__O3cUz","datetime":"MetaItem-module_datetime__--O8c"};
|
|
1752
|
-
|
|
1753
|
-
const MetaItem = ({
|
|
1754
|
-
hasSource,
|
|
1755
|
-
type,
|
|
1756
|
-
children,
|
|
1757
|
-
bullets
|
|
1758
|
-
}) => {
|
|
1759
|
-
const classNames = [[styles$e.root, true], [styles$e[type], !!type && !!styles$e[type]], [styles$e.hasSource, !!hasSource], [styles$e.hasBullets, !!bullets]];
|
|
1760
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1761
|
-
"data-testid": "meta-item",
|
|
1762
|
-
className: makeClassName(classNames)
|
|
1763
|
-
}, children);
|
|
1764
|
-
};
|
|
1765
|
-
|
|
1766
|
-
var styles$d = {"root":"MetaItemLive-module_root__XfQiW","gold":"MetaItemLive-module_gold__f1UOy","frame":"MetaItemLive-module_frame__FHByQ","liveMiddle":"MetaItemLive-module_liveMiddle__SX4Gs","liveFirstWave":"MetaItemLive-module_liveFirstWave__QqstP","liveSecondWave":"MetaItemLive-module_liveSecondWave__hlbpt"};
|
|
1767
|
-
|
|
1768
|
-
const MetaItemLive = ({
|
|
1769
|
-
theme = 'gold'
|
|
1770
|
-
}) => {
|
|
1771
|
-
const classNames = [[styles$d.root, true], [styles$d[theme], !!theme && styles$d[theme]]];
|
|
1772
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1773
|
-
"data-testid": "meta-item-live",
|
|
1774
|
-
"data-meta": "live",
|
|
1775
|
-
className: makeClassName(classNames)
|
|
1776
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1777
|
-
className: styles$d.frame
|
|
1778
|
-
}));
|
|
1779
|
-
};
|
|
1780
|
-
|
|
1781
|
-
const pluralize = (number, one, two, five) => {
|
|
1782
|
-
let n = Math.abs(number);
|
|
1783
|
-
n %= 100;
|
|
1784
|
-
if (n >= 5 && n <= 20) {
|
|
1785
|
-
return five;
|
|
1786
|
-
}
|
|
1787
|
-
n %= 10;
|
|
1788
|
-
if (n === 1) {
|
|
1789
|
-
return one;
|
|
1790
|
-
}
|
|
1791
|
-
if (n >= 2 && n <= 4) {
|
|
1792
|
-
return two;
|
|
1793
|
-
}
|
|
1794
|
-
return five;
|
|
1795
|
-
};
|
|
1796
|
-
|
|
1797
|
-
var styles$c = {"root":"DocumentItemsCount-module_root__u4M3y","items":"DocumentItemsCount-module_items__OE-hf"};
|
|
1798
|
-
|
|
1799
|
-
const DocumentItemsCount = ({
|
|
1800
|
-
type,
|
|
1801
|
-
lang = 'ru',
|
|
1802
|
-
items,
|
|
1803
|
-
children
|
|
1804
|
-
}) => {
|
|
1805
|
-
const i18n = {
|
|
1806
|
-
ru: {
|
|
1807
|
-
card: {
|
|
1808
|
-
one: 'карточка',
|
|
1809
|
-
two: 'карточки',
|
|
1810
|
-
five: 'карточек'
|
|
1811
|
-
},
|
|
1812
|
-
podcast: {
|
|
1813
|
-
one: 'эпизод',
|
|
1814
|
-
two: 'эпизода',
|
|
1815
|
-
five: 'эпизодов'
|
|
1816
|
-
}
|
|
1817
|
-
},
|
|
1818
|
-
en: {
|
|
1819
|
-
card: {
|
|
1820
|
-
one: 'card',
|
|
1821
|
-
two: 'cards',
|
|
1822
|
-
five: 'cards'
|
|
1823
|
-
},
|
|
1824
|
-
podcast: {
|
|
1825
|
-
one: 'episode',
|
|
1826
|
-
two: 'episodes',
|
|
1827
|
-
five: 'episodes'
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
};
|
|
1831
|
-
const itemsCount = `${items} ${pluralize(items, i18n[lang][type].one, i18n[lang][type].two, i18n[lang][type].five)}`;
|
|
1832
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1833
|
-
"data-testid": "document-items-count",
|
|
1834
|
-
className: styles$c.root
|
|
1835
|
-
}, children, /*#__PURE__*/React.createElement("span", {
|
|
1836
|
-
className: styles$c.items
|
|
1837
|
-
}, itemsCount));
|
|
1838
|
-
};
|
|
1839
|
-
|
|
1840
|
-
const MetaContainer = ({
|
|
1841
|
-
lang,
|
|
1842
|
-
block,
|
|
1843
|
-
isRead,
|
|
1844
|
-
isListened,
|
|
1845
|
-
bookmarkAction,
|
|
1846
|
-
isInBookmarks,
|
|
1847
|
-
block: {
|
|
1848
|
-
data: {
|
|
1849
|
-
components,
|
|
1850
|
-
theme
|
|
1851
|
-
}
|
|
1852
|
-
},
|
|
1853
|
-
styleContext,
|
|
1854
|
-
type
|
|
1855
|
-
}) => {
|
|
1856
|
-
const themeColor = styleContext && styleContext.indexOf('dark') !== -1 ? 'light' : 'unset';
|
|
1857
|
-
const isPodcast = styleContext && styleContext.indexOf('podcast') !== -1;
|
|
1858
|
-
const isSlides = styleContext && styleContext.indexOf('slide') !== -1;
|
|
1859
|
-
let context = [];
|
|
1860
|
-
if (styleContext && Array.isArray(styleContext)) {
|
|
1861
|
-
context = styleContext.filter(item => {
|
|
1862
|
-
return item !== 'dark';
|
|
1863
|
-
});
|
|
1864
|
-
}
|
|
1865
|
-
const hasSource = !!components.find(item => item.type === 'source_name');
|
|
1866
|
-
const classNames = [[styles$s.containerInDynamicBlock, styleContext === 'isInDynamicBlock'], [styles$s.containerInDynamicBlockAndMaterial, styleContext === 'isInDynamicBlock' && type === 'isInMaterial']];
|
|
1867
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1868
|
-
className: makeClassName(classNames)
|
|
1869
|
-
}, /*#__PURE__*/React.createElement(Meta, {
|
|
1870
|
-
styleContext: context,
|
|
1871
|
-
theme: theme || themeColor,
|
|
1872
|
-
onlyOn: block.only_on,
|
|
1873
|
-
hasSource: hasSource
|
|
1874
|
-
}, components.map(component => {
|
|
1875
|
-
switch (component.type) {
|
|
1876
|
-
case 'source_name':
|
|
1877
|
-
{
|
|
1878
|
-
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1879
|
-
hasSource: hasSource,
|
|
1880
|
-
bullets: true,
|
|
1881
|
-
key: component.id
|
|
1882
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, lang === 'ru' ? 'Источник: ' : 'Source: ', component.url && ( /*#__PURE__*/React.createElement("a", {
|
|
1883
|
-
href: component.url,
|
|
1884
|
-
rel: "noopener noreferrer",
|
|
1885
|
-
target: "_blank"
|
|
1886
|
-
}, component.text)), !component.url && component.text));
|
|
1887
|
-
}
|
|
1888
|
-
case 'duration':
|
|
1889
|
-
{
|
|
1890
|
-
if (styleContext === 'isInDynamicBlock') {
|
|
1891
|
-
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1892
|
-
hasSource: hasSource,
|
|
1893
|
-
bullets: true,
|
|
1894
|
-
key: component.id
|
|
1895
|
-
}, component.text);
|
|
1896
|
-
}
|
|
1897
|
-
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1898
|
-
hasSource: hasSource,
|
|
1899
|
-
bullets: true,
|
|
1900
|
-
key: component.id
|
|
1901
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SvgSymbol, {
|
|
1902
|
-
icon: "podcast",
|
|
1903
|
-
size: "small"
|
|
1904
|
-
}), component.text));
|
|
1905
|
-
}
|
|
1906
|
-
case 'datetime':
|
|
1907
|
-
{
|
|
1908
|
-
const format = component.format && toCamel(component.format) || 'date';
|
|
1909
|
-
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1910
|
-
hasSource: hasSource,
|
|
1911
|
-
bullets: true,
|
|
1912
|
-
key: component.id,
|
|
1913
|
-
type: "datetime"
|
|
1914
|
-
}, /*#__PURE__*/React.createElement(Timestamp, {
|
|
1915
|
-
publishedAt: component.datetime,
|
|
1916
|
-
type: styleContext === 'isInDynamicBlock' ? 'fromNow' : format || 'date',
|
|
1917
|
-
locale: lang
|
|
1918
|
-
}));
|
|
1919
|
-
}
|
|
1920
|
-
case 'items_count':
|
|
1921
|
-
{
|
|
1922
|
-
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1923
|
-
hasSource: hasSource,
|
|
1924
|
-
bullets: true,
|
|
1925
|
-
key: component.id
|
|
1926
|
-
}, /*#__PURE__*/React.createElement(DocumentItemsCount, {
|
|
1927
|
-
items: component.count,
|
|
1928
|
-
type: isPodcast ? 'podcast' : 'card',
|
|
1929
|
-
lang: lang
|
|
1930
|
-
}, /*#__PURE__*/React.createElement(SvgSymbol, {
|
|
1931
|
-
icon: "card",
|
|
1932
|
-
size: "unset"
|
|
1933
|
-
})));
|
|
1934
|
-
}
|
|
1935
|
-
case 'broadcast_active':
|
|
1936
|
-
{
|
|
1937
|
-
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1938
|
-
hasSource: hasSource,
|
|
1939
|
-
bullets: true,
|
|
1940
|
-
key: component.id
|
|
1941
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MetaItemLive, null), " \u041F\u0440\u044F\u043C\u043E\u0439 \u044D\u0444\u0438\u0440"));
|
|
1942
|
-
}
|
|
1943
|
-
case 'broadcast':
|
|
1944
|
-
{
|
|
1945
|
-
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1946
|
-
hasSource: hasSource,
|
|
1947
|
-
bullets: true,
|
|
1948
|
-
key: component.id
|
|
1949
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, component.with_icon && /*#__PURE__*/React.createElement(MetaItemLive, null), component.label));
|
|
1950
|
-
}
|
|
1951
|
-
case 'string':
|
|
1952
|
-
{
|
|
1953
|
-
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1954
|
-
hasSource: hasSource,
|
|
1955
|
-
bullets: true,
|
|
1956
|
-
key: component.id
|
|
1957
|
-
}, component.text);
|
|
1958
|
-
}
|
|
1959
|
-
default:
|
|
1960
|
-
{
|
|
1961
|
-
return null;
|
|
1962
|
-
}
|
|
1963
|
-
}
|
|
1964
|
-
}), (isRead || isListened) && ( /*#__PURE__*/React.createElement(MetaItem, {
|
|
1965
|
-
hasSource: hasSource,
|
|
1966
|
-
bullets: true,
|
|
1967
|
-
type: isListened ? 'listened' : 'read'
|
|
1968
|
-
}, /*#__PURE__*/React.createElement(SvgSymbol, {
|
|
1969
|
-
icon: isListened ? 'listened' : 'read',
|
|
1970
|
-
size: "unset"
|
|
1971
|
-
}))), isSlides && lang === 'ru' && ( /*#__PURE__*/React.createElement("div", {
|
|
1972
|
-
className: styles$s.bookmark
|
|
1973
|
-
}, /*#__PURE__*/React.createElement(BookmarkButton, {
|
|
1974
|
-
isInBookmarks: isInBookmarks,
|
|
1975
|
-
onClick: () => bookmarkAction('bookmark', 'top')
|
|
1976
|
-
})))));
|
|
1977
|
-
};
|
|
1978
|
-
|
|
1979
|
-
var styles$b = {"root":"DonatesTeaser-module_root__XQCVy","main":"DonatesTeaser-module_main__eN9kd","title":"DonatesTeaser-module_title__9umo1","text":"DonatesTeaser-module_text__s6tyf","cta":"DonatesTeaser-module_cta__-50aB","center":"DonatesTeaser-module_center__gxLvW","isInCard":"DonatesTeaser-module_isInCard__vaUhd","isInSlide":"DonatesTeaser-module_isInSlide__Dh4NH","ru":"DonatesTeaser-module_ru__y-PlJ","en":"DonatesTeaser-module_en__0Iisr"};
|
|
1980
|
-
|
|
1981
|
-
const DonatesTeaser = ({
|
|
1982
|
-
styleContext,
|
|
1983
|
-
lang = 'ru'
|
|
1984
|
-
}) => {
|
|
1985
|
-
let classNames = [[styles$b.root, true], [styles$b[lang], styles$b[lang]]];
|
|
1986
|
-
if (styleContext) {
|
|
1987
|
-
classNames = makeStyleContext(classNames, styleContext, styles$b);
|
|
1988
|
-
}
|
|
1989
|
-
const data = {
|
|
1990
|
-
ru: {
|
|
1991
|
-
title: '«Медуза». Работаем 24/7. И только в интересах читателей',
|
|
1992
|
-
subtitle: 'Нам срочно нужна ваша поддержка',
|
|
1993
|
-
button: 'Хочу помочь',
|
|
1994
|
-
href: 'https://support.meduza.io/'
|
|
1995
|
-
},
|
|
1996
|
-
en: {
|
|
1997
|
-
title: 'Meduza, working 24/7, always for our readers',
|
|
1998
|
-
subtitle: 'We need your help like never before',
|
|
1999
|
-
button: 'Okay!',
|
|
2000
|
-
href: 'https://support.meduza.io/en'
|
|
2001
|
-
}
|
|
2002
|
-
};
|
|
2003
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2004
|
-
"data-testid": "donates-teaser",
|
|
2005
|
-
className: makeClassName(classNames)
|
|
2006
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2007
|
-
className: styles$b.main
|
|
2008
|
-
}, /*#__PURE__*/React.createElement("h3", {
|
|
2009
|
-
className: styles$b.title
|
|
2010
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
2011
|
-
dangerouslySetInnerHTML: {
|
|
2012
|
-
__html: data[lang].title
|
|
2013
|
-
}
|
|
2014
|
-
}), ` `, /*#__PURE__*/React.createElement("span", {
|
|
2015
|
-
className: styles$b.text,
|
|
2016
|
-
dangerouslySetInnerHTML: {
|
|
2017
|
-
__html: data[lang].subtitle
|
|
2018
|
-
}
|
|
2019
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
2020
|
-
className: styles$b.cta
|
|
2021
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
2022
|
-
href: data[lang].href,
|
|
2023
|
-
target: "_blank",
|
|
2024
|
-
rel: "noreferrer"
|
|
2025
|
-
}, /*#__PURE__*/React.createElement("span", null, data[lang].button))));
|
|
2026
|
-
};
|
|
2027
|
-
|
|
2028
|
-
var styles$a = {"root":"AnnouncementInText-module_root__C4-Oo","body":"AnnouncementInText-module_body__lZy-L","title":"AnnouncementInText-module_title__cb6i1","footer":"AnnouncementInText-module_footer__jRk9p","button":"AnnouncementInText-module_button__JuT-E","link":"AnnouncementInText-module_link__C0YxL","center":"AnnouncementInText-module_center__1DJjd","isInCard":"AnnouncementInText-module_isInCard__jIqpa","isInSlide":"AnnouncementInText-module_isInSlide__BWO-A","ru":"AnnouncementInText-module_ru__QHQad","en":"AnnouncementInText-module_en__r0PvM"};
|
|
2029
|
-
|
|
2030
|
-
const AnnouncementInText = ({
|
|
2031
|
-
styleContext,
|
|
2032
|
-
lang = 'ru'
|
|
2033
|
-
}) => {
|
|
2034
|
-
let classNames = [[styles$a.root, true], [styles$a[lang], styles$a[lang]]];
|
|
2035
|
-
if (styleContext) {
|
|
2036
|
-
classNames = makeStyleContext(classNames, styleContext, styles$a);
|
|
2037
|
-
}
|
|
2038
|
-
const data = {
|
|
2039
|
-
ru: {
|
|
2040
|
-
title: '«Медуза» заблокирована в России. Мы были к этому готовы — и продолжаем работать. Несмотря ни на что',
|
|
2041
|
-
text: '<p>Нам нужна ваша помощь как никогда. Прямо сейчас. Дальше всем нам будет еще труднее. Мы независимое издание и работаем только в интересах читателей.</p>',
|
|
2042
|
-
button: 'Хочу помочь',
|
|
2043
|
-
href: 'https://mdza.io/yiNxPZ7Bs-k'
|
|
2044
|
-
},
|
|
2045
|
-
en: {
|
|
2046
|
-
title: 'Meduza has been blocked in Russia. We were ready for this and our work continues, no matter what, but we need your support like never before. ',
|
|
2047
|
-
text: '<p>We need it now. Tomorrow could be too late. We are an independent publication, and we work only in the interests of our readers. Many of our readers in Russia can no longer contribute, so we turn to you, our audience around the world.</p>',
|
|
2048
|
-
button: 'I want to help',
|
|
2049
|
-
href: 'https://support.meduza.io/en'
|
|
2050
|
-
}
|
|
2051
|
-
};
|
|
2052
|
-
const localeData = data[lang];
|
|
2053
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2054
|
-
"data-testid": "announcement-in-text",
|
|
2055
|
-
className: makeClassName(classNames)
|
|
2056
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2057
|
-
className: styles$a.body
|
|
2058
|
-
}, /*#__PURE__*/React.createElement("h3", {
|
|
2059
|
-
className: styles$a.title,
|
|
2060
|
-
dangerouslySetInnerHTML: {
|
|
2061
|
-
__html: localeData.title
|
|
2062
|
-
}
|
|
2063
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
2064
|
-
dangerouslySetInnerHTML: {
|
|
2065
|
-
__html: localeData.text
|
|
2066
|
-
}
|
|
2067
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
2068
|
-
className: styles$a.footer
|
|
2069
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
2070
|
-
className: styles$a.link,
|
|
2071
|
-
href: localeData.href,
|
|
2072
|
-
target: "_blank",
|
|
2073
|
-
rel: "noreferrer"
|
|
2074
|
-
}, /*#__PURE__*/React.createElement("span", null, localeData.button)), /*#__PURE__*/React.createElement("span", {
|
|
2075
|
-
className: styles$a.button
|
|
2076
|
-
}, /*#__PURE__*/React.createElement("span", null, localeData.button))));
|
|
2077
|
-
};
|
|
2078
|
-
|
|
2079
|
-
var styles$9 = {"root":"VersesBlock-module_root__CrgSZ","ol":"VersesBlock-module_ol__ToXjg","ul":"VersesBlock-module_ul__wfaQD","center":"VersesBlock-module_center__E1IS-","isInImportantLead":"VersesBlock-module_isInImportantLead__pdugk","dark":"VersesBlock-module_dark__FwaPS","mobile":"VersesBlock-module_mobile__EcHvz","desktop":"VersesBlock-module_desktop__quKfJ"};
|
|
2080
|
-
|
|
2081
|
-
const VersesBlock = ({
|
|
2082
|
-
block: {
|
|
2083
|
-
type,
|
|
2084
|
-
data,
|
|
2085
|
-
only_on: onlyOn
|
|
2086
|
-
},
|
|
2087
|
-
styleContext
|
|
2088
|
-
}) => {
|
|
2089
|
-
let classNames = [[styles$9.root, true], [styles$9[onlyOn], true], [styles$9[type], !!type && !!styles$9[type]]];
|
|
2090
|
-
if (styleContext) {
|
|
2091
|
-
classNames = makeStyleContext(classNames, styleContext, styles$9);
|
|
2092
|
-
}
|
|
2093
|
-
return /*#__PURE__*/React.createElement("ul", {
|
|
2094
|
-
className: makeClassName(classNames),
|
|
2095
|
-
"data-testid": "verses-block"
|
|
2096
|
-
}, data.map((item, index) => ( /*#__PURE__*/React.createElement("li", {
|
|
2097
|
-
key: index,
|
|
2098
|
-
dangerouslySetInnerHTML: {
|
|
2099
|
-
__html: item
|
|
2100
|
-
}
|
|
2101
|
-
}))));
|
|
2102
|
-
};
|
|
2103
|
-
|
|
2104
|
-
const RenderBlocks = ({
|
|
2105
|
-
block,
|
|
2106
|
-
styleContext,
|
|
2107
|
-
lang,
|
|
2108
|
-
isRead,
|
|
2109
|
-
isListened,
|
|
2110
|
-
bookmarkAction,
|
|
2111
|
-
isInBookmarks,
|
|
2112
|
-
type = 'default'
|
|
2113
|
-
}) => {
|
|
2114
|
-
switch (block.type) {
|
|
2115
|
-
case 'tag':
|
|
2116
|
-
{
|
|
2117
|
-
return /*#__PURE__*/React.createElement(Tag, {
|
|
2118
|
-
size: "large",
|
|
2119
|
-
onlyOn: block.only_on,
|
|
2120
|
-
theme: block.data.theme,
|
|
2121
|
-
styleContext: styleContext
|
|
2122
|
-
}, block.data.text);
|
|
2123
|
-
}
|
|
2124
|
-
case 'simple_title':
|
|
2125
|
-
{
|
|
2126
|
-
return /*#__PURE__*/React.createElement(SimpleTitle, {
|
|
2127
|
-
block: block,
|
|
2128
|
-
styleContext: styleContext
|
|
2129
|
-
});
|
|
2130
|
-
}
|
|
2131
|
-
case 'rich_title':
|
|
2132
|
-
{
|
|
2133
|
-
return /*#__PURE__*/React.createElement(RichTitle, {
|
|
2134
|
-
block: block,
|
|
2135
|
-
styleContext: styleContext
|
|
2136
|
-
});
|
|
2137
|
-
}
|
|
2138
|
-
case 'meta':
|
|
2139
|
-
{
|
|
2140
|
-
return /*#__PURE__*/React.createElement(MetaContainer, {
|
|
2141
|
-
block: block,
|
|
2142
|
-
lang: block.data.lang,
|
|
2143
|
-
styleContext: styleContext,
|
|
2144
|
-
isRead: isRead,
|
|
2145
|
-
isListened: isListened,
|
|
2146
|
-
isInBookmarks: isInBookmarks,
|
|
2147
|
-
bookmarkAction: bookmarkAction,
|
|
2148
|
-
type: type
|
|
2149
|
-
});
|
|
2150
|
-
}
|
|
2151
|
-
case 'blockquote':
|
|
2152
|
-
case 'p':
|
|
2153
|
-
case 'context_p':
|
|
2154
|
-
case 'divider':
|
|
2155
|
-
case 'lead':
|
|
2156
|
-
case 'lead_hr':
|
|
2157
|
-
{
|
|
2158
|
-
return /*#__PURE__*/React.createElement(SimpleBlock, {
|
|
2159
|
-
block: block,
|
|
2160
|
-
styleContext: styleContext
|
|
2161
|
-
});
|
|
2162
|
-
}
|
|
2163
|
-
case 'h1':
|
|
2164
|
-
case 'h2':
|
|
2165
|
-
case 'h3':
|
|
2166
|
-
case 'h4':
|
|
2167
|
-
{
|
|
2168
|
-
return /*#__PURE__*/React.createElement(SimpleBlock, {
|
|
2169
|
-
block: block,
|
|
2170
|
-
styleContext: styleContext,
|
|
2171
|
-
id: block.id
|
|
2172
|
-
});
|
|
2173
|
-
}
|
|
2174
|
-
case 'quote':
|
|
2175
|
-
return /*#__PURE__*/React.createElement(QuoteBlock, {
|
|
2176
|
-
block: block,
|
|
2177
|
-
styleContext: styleContext
|
|
2178
|
-
});
|
|
2179
|
-
case 'ol':
|
|
2180
|
-
case 'ul':
|
|
2181
|
-
{
|
|
2182
|
-
return /*#__PURE__*/React.createElement(ListBlock, {
|
|
2183
|
-
block: block,
|
|
2184
|
-
styleContext: styleContext
|
|
2185
|
-
});
|
|
2186
|
-
}
|
|
2187
|
-
case 'verses':
|
|
2188
|
-
{
|
|
2189
|
-
return /*#__PURE__*/React.createElement(VersesBlock, {
|
|
2190
|
-
block: block,
|
|
2191
|
-
styleContext: styleContext
|
|
2192
|
-
});
|
|
2193
|
-
}
|
|
2194
|
-
case 'chapter-subtitle':
|
|
2195
|
-
{
|
|
2196
|
-
return /*#__PURE__*/React.createElement(ChapterBlock, {
|
|
2197
|
-
block: block,
|
|
2198
|
-
styleContext: styleContext,
|
|
2199
|
-
id: block.id
|
|
2200
|
-
});
|
|
2201
|
-
}
|
|
2202
|
-
case 'card_title':
|
|
2203
|
-
{
|
|
2204
|
-
return /*#__PURE__*/React.createElement(CardTitle, {
|
|
2205
|
-
block: block,
|
|
2206
|
-
styleContext: styleContext
|
|
2207
|
-
});
|
|
2208
|
-
}
|
|
2209
|
-
case 'related':
|
|
2210
|
-
{
|
|
2211
|
-
return /*#__PURE__*/React.createElement(RelatedBlock, {
|
|
2212
|
-
block: block,
|
|
2213
|
-
styleContext: styleContext
|
|
2214
|
-
});
|
|
2215
|
-
}
|
|
2216
|
-
case 'source':
|
|
2217
|
-
return /*#__PURE__*/React.createElement(SourceBlock, {
|
|
2218
|
-
block: block,
|
|
2219
|
-
styleContext: styleContext
|
|
2220
|
-
});
|
|
2221
|
-
case 'table':
|
|
2222
|
-
return /*#__PURE__*/React.createElement(Table, {
|
|
2223
|
-
block: block,
|
|
2224
|
-
styleContext: styleContext
|
|
2225
|
-
});
|
|
2226
|
-
case 'sensitive':
|
|
2227
|
-
return /*#__PURE__*/React.createElement(SensitiveBlock, {
|
|
2228
|
-
block: block,
|
|
2229
|
-
styleContext: styleContext
|
|
2230
|
-
});
|
|
2231
|
-
case 'embed':
|
|
2232
|
-
case 'embed_code':
|
|
2233
|
-
case 'game_embed':
|
|
2234
|
-
case 'image':
|
|
2235
|
-
case 'dots_on_image':
|
|
2236
|
-
case 'gif':
|
|
2237
|
-
return /*#__PURE__*/React.createElement(EmbedBlockContainer, {
|
|
2238
|
-
block: block,
|
|
2239
|
-
styleContext: styleContext,
|
|
2240
|
-
lang: lang
|
|
2241
|
-
});
|
|
2242
|
-
case 'grouped':
|
|
2243
|
-
return /*#__PURE__*/React.createElement(GroupedBlock, {
|
|
2244
|
-
block: block,
|
|
2245
|
-
styleContext: styleContext
|
|
2246
|
-
});
|
|
2247
|
-
case 'donation':
|
|
2248
|
-
return /*#__PURE__*/React.createElement(DonatesTeaser, {
|
|
2249
|
-
styleContext: styleContext,
|
|
2250
|
-
lang: lang
|
|
2251
|
-
});
|
|
2252
|
-
case 'material_note':
|
|
2253
|
-
return /*#__PURE__*/React.createElement(MaterialNote, {
|
|
2254
|
-
block: block,
|
|
2255
|
-
styleContext: styleContext
|
|
2256
|
-
});
|
|
2257
|
-
case 'announcement_in_text':
|
|
2258
|
-
return /*#__PURE__*/React.createElement(AnnouncementInText, {
|
|
2259
|
-
styleContext: styleContext,
|
|
2260
|
-
lang: lang
|
|
2261
|
-
});
|
|
2262
|
-
default:
|
|
2263
|
-
{
|
|
2264
|
-
return null;
|
|
2265
|
-
}
|
|
2266
|
-
}
|
|
2267
|
-
};
|
|
2268
|
-
|
|
2269
|
-
var styles$8 = {"root":"Cover-module_root__3pscq","body":"Cover-module_body__eJpUI","image":"Cover-module_image__frrrH","rich":"Cover-module_rich__YcxWa","dark":"Cover-module_dark__cRucL","light":"Cover-module_light__la-sk","control":"Cover-module_control__WP0G3","isInDynamicBlock":"Cover-module_isInDynamicBlock__qO-yt","mobile":"Cover-module_mobile__aotep","desktop":"Cover-module_desktop__dfbC-"};
|
|
2270
|
-
|
|
2271
|
-
const Cover = ({
|
|
2272
|
-
block: {
|
|
2273
|
-
only_on: onlyOn,
|
|
2274
|
-
data: {
|
|
2275
|
-
blocks,
|
|
2276
|
-
cover: {
|
|
2277
|
-
credit,
|
|
2278
|
-
caption,
|
|
2279
|
-
urls,
|
|
2280
|
-
mobile_ratio: mobileRatio,
|
|
2281
|
-
gradients,
|
|
2282
|
-
cc
|
|
2283
|
-
}
|
|
2284
|
-
}
|
|
2285
|
-
},
|
|
2286
|
-
styleContext
|
|
2287
|
-
}) => {
|
|
2288
|
-
const [isPopoverShown, setIsPopoverShown] = useState(false);
|
|
2289
|
-
const style = {};
|
|
2290
|
-
let classNames = [[styles$8.root, true], [styles$8[onlyOn], !!onlyOn && !!styles$8[onlyOn]]];
|
|
2291
|
-
if (styleContext) {
|
|
2292
|
-
classNames = makeStyleContext(classNames, styleContext, styles$8);
|
|
2293
|
-
}
|
|
2294
|
-
if (gradients) {
|
|
2295
|
-
const theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
|
|
2296
|
-
classNames = makeStyleContext(classNames, theme, styles$8);
|
|
2297
|
-
style.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockBottom');
|
|
2298
|
-
}
|
|
2299
|
-
const renderCC = context => ( /*#__PURE__*/React.createElement(MediaCaption, {
|
|
2300
|
-
credit: credit,
|
|
2301
|
-
caption: caption,
|
|
2302
|
-
styleContext: context || styleContext
|
|
2303
|
-
}));
|
|
2304
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2305
|
-
"data-testid": "cover",
|
|
2306
|
-
className: makeClassName(classNames)
|
|
2307
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2308
|
-
className: styles$8.image
|
|
2309
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
2310
|
-
optimized: urls,
|
|
2311
|
-
ratio: mobileRatio,
|
|
2312
|
-
display: "narrow"
|
|
2313
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
2314
|
-
className: styles$8.body,
|
|
2315
|
-
style: style
|
|
2316
|
-
}, blocks.map(item => ( /*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2317
|
-
key: item.id,
|
|
2318
|
-
block: item,
|
|
2319
|
-
styleContext: styleContext
|
|
2320
|
-
})))), cc === 'button' && ( /*#__PURE__*/React.createElement("button", {
|
|
2321
|
-
className: styles$8.control,
|
|
2322
|
-
type: "button",
|
|
2323
|
-
"aria-label": "Open",
|
|
2324
|
-
onClick: () => {
|
|
2325
|
-
setIsPopoverShown(!isPopoverShown);
|
|
2326
|
-
}
|
|
2327
|
-
})), cc === 'button' && isPopoverShown && ( /*#__PURE__*/React.createElement(Popover, {
|
|
2328
|
-
onClose: () => {
|
|
2329
|
-
setIsPopoverShown(false);
|
|
2330
|
-
}
|
|
2331
|
-
}, renderCC('isInPopover'))));
|
|
2332
|
-
};
|
|
2333
|
-
|
|
2334
|
-
var styles$7 = {"root":"HalfBlock-module_root__EXQbz","main":"HalfBlock-module_main__eIcRo","body":"HalfBlock-module_body__HPhGj","footer":"HalfBlock-module_footer__TFfCQ","image":"HalfBlock-module_image__XWLbK","mobile":"HalfBlock-module_mobile__uGGpm","desktop":"HalfBlock-module_desktop__p-hAq"};
|
|
2335
|
-
|
|
2336
|
-
const HalfBlock = ({
|
|
2337
|
-
block: {
|
|
2338
|
-
only_on: onlyOn,
|
|
2339
|
-
data,
|
|
2340
|
-
data: {
|
|
2341
|
-
cover: {
|
|
2342
|
-
optimized,
|
|
2343
|
-
ratio,
|
|
2344
|
-
credit,
|
|
2345
|
-
caption
|
|
2346
|
-
}
|
|
2347
|
-
}
|
|
2348
|
-
},
|
|
2349
|
-
styleContext
|
|
2350
|
-
}) => {
|
|
2351
|
-
let classNames = [[styles$7.root, true], [styles$7[onlyOn], true]];
|
|
2352
|
-
if (styleContext) {
|
|
2353
|
-
classNames = makeStyleContext(classNames, styleContext, styles$7);
|
|
2354
|
-
}
|
|
2355
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2356
|
-
"data-testid": "half-block",
|
|
2357
|
-
className: makeClassName(classNames)
|
|
2358
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2359
|
-
className: styles$7.main
|
|
2360
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2361
|
-
className: styles$7.image
|
|
2362
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
2363
|
-
optimized: optimized,
|
|
2364
|
-
ratio: ratio,
|
|
2365
|
-
display: "super_full"
|
|
2366
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
2367
|
-
className: styles$7.body
|
|
2368
|
-
}, data.blocks.map(item => ( /*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2369
|
-
key: item.id,
|
|
2370
|
-
block: item,
|
|
2371
|
-
styleContext: ['rich']
|
|
2372
|
-
}))))), /*#__PURE__*/React.createElement("div", {
|
|
2373
|
-
className: styles$7.footer
|
|
2374
|
-
}, /*#__PURE__*/React.createElement(MediaCaption, {
|
|
2375
|
-
credit: credit,
|
|
2376
|
-
caption: caption,
|
|
2377
|
-
styleContext: styleContext
|
|
2378
|
-
})));
|
|
2379
|
-
};
|
|
2380
|
-
|
|
2381
|
-
var styles$6 = {"root":"ImportantLead-module_root__-rnt6","slide":"ImportantLead-module_slide__zcovu","mobile":"ImportantLead-module_mobile__msInp","desktop":"ImportantLead-module_desktop__ELC2-"};
|
|
2382
|
-
|
|
2383
|
-
const ImportantLead = ({
|
|
2384
|
-
block: {
|
|
2385
|
-
only_on: onlyOn,
|
|
2386
|
-
data
|
|
2387
|
-
},
|
|
2388
|
-
styleContext
|
|
2389
|
-
}) => {
|
|
2390
|
-
let classNames = [[styles$6.root, true], [styles$6[onlyOn], !!onlyOn]];
|
|
2391
|
-
if (styleContext) {
|
|
2392
|
-
classNames = makeStyleContext(classNames, styleContext, styles$6);
|
|
2393
|
-
}
|
|
2394
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2395
|
-
"data-testid": "important-lead",
|
|
2396
|
-
className: makeClassName(classNames)
|
|
2397
|
-
}, data.map(item => ( /*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2398
|
-
key: item.id,
|
|
2399
|
-
block: item,
|
|
2400
|
-
styleContext: "isInImportantLead"
|
|
2401
|
-
}))));
|
|
2402
|
-
};
|
|
2403
|
-
|
|
2404
|
-
var styles$5 = {"root":"Spoiler-module_root__fAbb9","header":"Spoiler-module_header__iEKsQ","body":"Spoiler-module_body__jjqIn","spoiled":"Spoiler-module_spoiled__ENI93","footer":"Spoiler-module_footer__g21Zn","spoilerSticky":"Spoiler-module_spoilerSticky__YTiyF","spoilerStickyBg":"Spoiler-module_spoilerStickyBg__tmDnG","center":"Spoiler-module_center__0XCWo","full":"Spoiler-module_full__FtKDT","default":"Spoiler-module_default__wvlKw","mobile":"Spoiler-module_mobile__PWCMW","desktop":"Spoiler-module_desktop__qTakd"};
|
|
2405
|
-
|
|
2406
|
-
const Spoiler = ({
|
|
2407
|
-
block: {
|
|
2408
|
-
display,
|
|
2409
|
-
button,
|
|
2410
|
-
only_on: onlyOn,
|
|
2411
|
-
btn_title: buttonTitle,
|
|
2412
|
-
title,
|
|
2413
|
-
blocks
|
|
2414
|
-
},
|
|
2415
|
-
styleContext
|
|
2416
|
-
}) => {
|
|
2417
|
-
const [spoiled, setSpoiled] = useState(false);
|
|
2418
|
-
const ref = useRef(null);
|
|
2419
|
-
const handleButtonClick = () => {
|
|
2420
|
-
setSpoiled(!spoiled);
|
|
2421
|
-
if (spoiled) {
|
|
2422
|
-
postMessage('', 'closeSpoiler', 'click');
|
|
2423
|
-
const rect = ref.current.getBoundingClientRect();
|
|
2424
|
-
if (rect.top < 0) {
|
|
2425
|
-
ref.current.scrollIntoView({
|
|
2426
|
-
behavior: 'smooth'
|
|
2427
|
-
});
|
|
2428
|
-
}
|
|
2429
|
-
} else {
|
|
2430
|
-
postMessage('', 'openSpoiler', 'click');
|
|
2431
|
-
}
|
|
2432
|
-
};
|
|
2433
|
-
let classNames = [[styles$5.root, true], [styles$5[onlyOn], !!onlyOn], [styles$5[display], !!display && styles$5[display]], [[styles$5.spoiled], !!spoiled]];
|
|
2434
|
-
const context = ['center'];
|
|
2435
|
-
if (styleContext) {
|
|
2436
|
-
context.concat(styleContext);
|
|
2437
|
-
classNames = makeStyleContext(classNames, styleContext, styles$5);
|
|
2438
|
-
}
|
|
2439
|
-
const buttonCollapse = button ? button.collapse : 'Свернуть';
|
|
2440
|
-
const buttonExpande = button ? button.expand : buttonTitle;
|
|
2441
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2442
|
-
ref: ref,
|
|
2443
|
-
className: makeClassName(classNames),
|
|
2444
|
-
"data-testid": "spoiler"
|
|
2445
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2446
|
-
className: styles$5.header
|
|
2447
|
-
}, title && /*#__PURE__*/React.createElement("h3", null, title)), /*#__PURE__*/React.createElement("div", {
|
|
2448
|
-
className: styles$5.body
|
|
2449
|
-
}, blocks.map(item => ( /*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2450
|
-
key: item.id,
|
|
2451
|
-
block: item,
|
|
2452
|
-
styleContext: context
|
|
2453
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
2454
|
-
className: styles$5.footer
|
|
2455
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
2456
|
-
size: "default",
|
|
2457
|
-
theme: "gray",
|
|
2458
|
-
onClick: () => handleButtonClick(),
|
|
2459
|
-
styleContext: "isInSpoiler"
|
|
2460
|
-
}, spoiled ? buttonCollapse : buttonExpande, /*#__PURE__*/React.createElement(SvgSymbol, {
|
|
2461
|
-
icon: "arrow"
|
|
2462
|
-
}))));
|
|
2463
|
-
};
|
|
2464
|
-
|
|
2465
|
-
var styles$4 = {"root":"RelatedRichBlock-module_root__-SEe7","wrapper":"RelatedRichBlock-module_wrapper__YkEpr","overlay":"RelatedRichBlock-module_overlay__tWuyR","overlayHeader":"RelatedRichBlock-module_overlayHeader__V3ynX","body":"RelatedRichBlock-module_body__XhS0U","isRich":"RelatedRichBlock-module_isRich__Z2kQ8","hasGradient":"RelatedRichBlock-module_hasGradient__s5Krh","picture":"RelatedRichBlock-module_picture__OmRKx","isCard":"RelatedRichBlock-module_isCard__wkMw-","cover":"RelatedRichBlock-module_cover__3gnIx","tag":"RelatedRichBlock-module_tag__c18sv","center":"RelatedRichBlock-module_center__KANd-","dark":"RelatedRichBlock-module_dark__cnk4R","light":"RelatedRichBlock-module_light__aJLn7","mobile":"RelatedRichBlock-module_mobile__N-G4U","desktop":"RelatedRichBlock-module_desktop__EaPOr"};
|
|
2466
|
-
|
|
2467
|
-
/* eslint-disable react/jsx-no-target-blank */
|
|
2468
|
-
const RelatedRichBlock = ({
|
|
2469
|
-
block: {
|
|
2470
|
-
only_on: onlyOn,
|
|
2471
|
-
data: {
|
|
2472
|
-
blocks,
|
|
2473
|
-
url,
|
|
2474
|
-
cover: {
|
|
2475
|
-
urls,
|
|
2476
|
-
gradients,
|
|
2477
|
-
tag,
|
|
2478
|
-
layout,
|
|
2479
|
-
ratio
|
|
2480
|
-
}
|
|
2481
|
-
}
|
|
2482
|
-
},
|
|
2483
|
-
styleContext
|
|
2484
|
-
}) => {
|
|
2485
|
-
const style = {};
|
|
2486
|
-
const styleHeader = {};
|
|
2487
|
-
const cardType = `is${toCapitalize(layout)}`;
|
|
2488
|
-
const [ref, inView] = useInView({
|
|
2489
|
-
threshold: 0,
|
|
2490
|
-
triggerOnce: true
|
|
2491
|
-
});
|
|
2492
|
-
useEffect(() => {
|
|
2493
|
-
if (inView) {
|
|
2494
|
-
if (onlyOn === 'mobile' && window.innerWidth <= 511 || onlyOn === 'desktop' && window.innerWidth >= 512 || !onlyOn) {
|
|
2495
|
-
postMessage('richRelated', url, 'view');
|
|
2496
|
-
}
|
|
2497
|
-
}
|
|
2498
|
-
}, [inView]);
|
|
2499
|
-
const handleClick = () => {
|
|
2500
|
-
postMessage('richRelated', url, 'click');
|
|
2501
|
-
};
|
|
2502
|
-
let classNames = [[styles$4.root, true], [styles$4[cardType], !!layout && !!styles$4[cardType]], [styles$4.hasGradient, !!gradients], [styles$4[onlyOn], !!onlyOn && !!styles$4[onlyOn]]];
|
|
2503
|
-
let context = ['isInMediaBlock'];
|
|
2504
|
-
if (styleContext) {
|
|
2505
|
-
classNames = makeStyleContext(classNames, styleContext, styles$4);
|
|
2506
|
-
context = [...styleContext, 'isInMediaBlock'];
|
|
2507
|
-
}
|
|
2508
|
-
if (gradients) {
|
|
2509
|
-
styleHeader.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockTop');
|
|
2510
|
-
const theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
|
|
2511
|
-
classNames = makeStyleContext(classNames, theme, styles$4);
|
|
2512
|
-
if (onlyOn === 'desktop') {
|
|
2513
|
-
style.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockBottom');
|
|
2514
|
-
}
|
|
2515
|
-
}
|
|
2516
|
-
return /*#__PURE__*/React.createElement(Link, {
|
|
2517
|
-
"data-testid": "related-rich-block",
|
|
2518
|
-
className: makeClassName(classNames),
|
|
2519
|
-
to: `/${url}`,
|
|
2520
|
-
onClick: () => handleClick(),
|
|
2521
|
-
ref: ref
|
|
2522
|
-
}, layout === 'rich' && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2523
|
-
className: styles$4.overlay,
|
|
2524
|
-
style: style
|
|
2525
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
2526
|
-
className: styles$4.overlayHeader,
|
|
2527
|
-
style: styleHeader
|
|
2528
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
2529
|
-
className: styles$4.tag
|
|
2530
|
-
}, /*#__PURE__*/React.createElement(Tag, {
|
|
2531
|
-
size: "small",
|
|
2532
|
-
theme: "inherit",
|
|
2533
|
-
styleContext: "richRelated"
|
|
2534
|
-
}, tag)), /*#__PURE__*/React.createElement("div", {
|
|
2535
|
-
className: styles$4.cover
|
|
2536
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2537
|
-
className: styles$4.picture
|
|
2538
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
2539
|
-
optimized: urls,
|
|
2540
|
-
ratio: ratio,
|
|
2541
|
-
display: "narrow"
|
|
2542
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
2543
|
-
className: styles$4.body
|
|
2544
|
-
}, blocks.map(item => ( /*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2545
|
-
key: item.id,
|
|
2546
|
-
block: item,
|
|
2547
|
-
styleContext: context
|
|
2548
|
-
})))));
|
|
2549
|
-
};
|
|
2550
|
-
|
|
2551
|
-
var styles$3 = {"root":"ShopRelatedBlock-module_root__eTGjC","wrapper":"ShopRelatedBlock-module_wrapper__v6yE3","overlay":"ShopRelatedBlock-module_overlay__oR67Y","overlayHeader":"ShopRelatedBlock-module_overlayHeader__YMcNw","body":"ShopRelatedBlock-module_body__W4pBN","hasGradient":"ShopRelatedBlock-module_hasGradient__50JTl","picture":"ShopRelatedBlock-module_picture__zjFL4","tag":"ShopRelatedBlock-module_tag__ixkda","center":"ShopRelatedBlock-module_center__IpBP4","title":"ShopRelatedBlock-module_title__COl93","price":"ShopRelatedBlock-module_price__5Qitu","dark":"ShopRelatedBlock-module_dark__d0QiW","light":"ShopRelatedBlock-module_light__lUDWA","mobile":"ShopRelatedBlock-module_mobile__I6Hih","desktop":"ShopRelatedBlock-module_desktop__ywKrb"};
|
|
2552
|
-
|
|
2553
|
-
/* eslint-disable react/jsx-no-target-blank */
|
|
2554
|
-
const ShopRelatedBlock = ({
|
|
2555
|
-
block: {
|
|
2556
|
-
only_on: onlyOn,
|
|
2557
|
-
data: {
|
|
2558
|
-
url,
|
|
2559
|
-
cover: {
|
|
2560
|
-
urls,
|
|
2561
|
-
gradients,
|
|
2562
|
-
tag,
|
|
2563
|
-
layout,
|
|
2564
|
-
ratio,
|
|
2565
|
-
first_title: firstTitle,
|
|
2566
|
-
second_title: secondTitle
|
|
2567
|
-
}
|
|
2568
|
-
}
|
|
2569
|
-
},
|
|
2570
|
-
styleContext
|
|
2571
|
-
}) => {
|
|
2572
|
-
const style = {};
|
|
2573
|
-
const styleHeader = {};
|
|
2574
|
-
const [ref, inView] = useInView({
|
|
2575
|
-
threshold: 0,
|
|
2576
|
-
triggerOnce: true
|
|
2577
|
-
});
|
|
2578
|
-
useEffect(() => {
|
|
2579
|
-
if (inView) {
|
|
2580
|
-
if (onlyOn === 'mobile' && window.innerWidth <= 511 || onlyOn === 'desktop' && window.innerWidth >= 512 || !onlyOn) {
|
|
2581
|
-
postMessage('productRelated', url, 'view');
|
|
2582
|
-
}
|
|
2583
|
-
}
|
|
2584
|
-
}, [inView]);
|
|
2585
|
-
const handleClick = () => {
|
|
2586
|
-
postMessage('productRelated', url, 'click');
|
|
2587
|
-
};
|
|
2588
|
-
let classNames = [[styles$3.root, true], [styles$3.hasGradient, !!gradients], [styles$3[onlyOn], !!onlyOn && !!styles$3[onlyOn]]];
|
|
2589
|
-
if (styleContext) {
|
|
2590
|
-
classNames = makeStyleContext(classNames, styleContext, styles$3);
|
|
2591
|
-
}
|
|
2592
|
-
if (gradients) {
|
|
2593
|
-
styleHeader.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockTop');
|
|
2594
|
-
const theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
|
|
2595
|
-
classNames = makeStyleContext(classNames, theme, styles$3);
|
|
2596
|
-
if (onlyOn === 'desktop') {
|
|
2597
|
-
style.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockBottom');
|
|
2598
|
-
}
|
|
2599
|
-
}
|
|
2600
|
-
return /*#__PURE__*/React.createElement("a", {
|
|
2601
|
-
"data-testid": "related-rich-block",
|
|
2602
|
-
className: makeClassName(classNames),
|
|
2603
|
-
href: url,
|
|
2604
|
-
target: "_blank",
|
|
2605
|
-
onClick: () => handleClick(),
|
|
2606
|
-
ref: ref
|
|
2607
|
-
}, layout === 'rich' && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2608
|
-
className: styles$3.overlay,
|
|
2609
|
-
style: style
|
|
2610
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
2611
|
-
className: styles$3.overlayHeader,
|
|
2612
|
-
style: styleHeader
|
|
2613
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
2614
|
-
className: styles$3.tag
|
|
2615
|
-
}, /*#__PURE__*/React.createElement(Tag, {
|
|
2616
|
-
size: "small",
|
|
2617
|
-
theme: "inherit",
|
|
2618
|
-
styleContext: "richRelated"
|
|
2619
|
-
}, tag)), /*#__PURE__*/React.createElement("div", {
|
|
2620
|
-
className: styles$3.cover
|
|
2621
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2622
|
-
className: styles$3.picture
|
|
2623
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
2624
|
-
optimized: urls,
|
|
2625
|
-
ratio: ratio,
|
|
2626
|
-
display: "narrow"
|
|
2627
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
2628
|
-
className: styles$3.body
|
|
2629
|
-
}, /*#__PURE__*/React.createElement("h2", {
|
|
2630
|
-
className: styles$3.title
|
|
2631
|
-
}, firstTitle, /*#__PURE__*/React.createElement("span", {
|
|
2632
|
-
className: styles$3.price
|
|
2633
|
-
}, secondTitle))));
|
|
2634
|
-
};
|
|
2635
|
-
|
|
2636
|
-
var styles$2 = {"root":"RelatedBook-module_root__QsOmA","container":"RelatedBook-module_container__vdDiZ","imageWrap":"RelatedBook-module_imageWrap__WmwnE","image":"RelatedBook-module_image__U1e5t","picture":"RelatedBook-module_picture__NXg-K","tag":"RelatedBook-module_tag__mSbbz","contentWrap":"RelatedBook-module_contentWrap__HIGRi","content":"RelatedBook-module_content__23Pfr","title":"RelatedBook-module_title__VRbr-","footer":"RelatedBook-module_footer__Z05t-","center":"RelatedBook-module_center__Fa6cj","isLight":"RelatedBook-module_isLight__W-0TO","isDark":"RelatedBook-module_isDark__0mrtK"};
|
|
2637
|
-
|
|
2638
|
-
const RelatedBook = ({
|
|
2639
|
-
block,
|
|
2640
|
-
styleContext
|
|
2641
|
-
}) => {
|
|
2642
|
-
const theme = block.data.theme.text_color === '0,0,0' ? 'isDark' : 'isLight';
|
|
2643
|
-
let classNames = [[styles$2.root, true], [styles$2[theme], theme], [styles$2[block.data.onlyOn], !!block.data.onlyOn && !!styles$2[block.data.onlyOn]]];
|
|
2644
|
-
if (styleContext) {
|
|
2645
|
-
classNames = makeStyleContext(classNames, styleContext, styles$2);
|
|
2646
|
-
}
|
|
2647
|
-
const cssProps = {
|
|
2648
|
-
'--bgColor': `rgb(${block.data.theme.background_color || '0, 0, 0'})`
|
|
2649
|
-
};
|
|
2650
|
-
return /*#__PURE__*/React.createElement(Link, {
|
|
2651
|
-
to: `/${block.data.url}`,
|
|
2652
|
-
className: makeClassName(classNames),
|
|
2653
|
-
style: cssProps
|
|
2654
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2655
|
-
className: styles$2.container
|
|
2656
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2657
|
-
className: styles$2.imageWrap
|
|
2658
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2659
|
-
className: styles$2.image
|
|
2660
|
-
}, /*#__PURE__*/React.createElement("picture", {
|
|
2661
|
-
className: styles$2.picture
|
|
2662
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
2663
|
-
optimized: block.data.cover.urls,
|
|
2664
|
-
ratio: 0,
|
|
2665
|
-
display: "narrow",
|
|
2666
|
-
styleContext: ['isStatic'],
|
|
2667
|
-
lazy: true
|
|
2668
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
2669
|
-
className: styles$2.contentWrap
|
|
2670
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2671
|
-
className: styles$2.content
|
|
2672
|
-
}, block.data.blocks.map(item => ( /*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2673
|
-
key: item.id,
|
|
2674
|
-
block: item,
|
|
2675
|
-
styleContext: ['isInMediaBlock', 'isInBookRelated', 'isCustom']
|
|
2676
|
-
})))))));
|
|
2677
|
-
};
|
|
2678
|
-
|
|
2679
|
-
const RawHtmlBlock = ({
|
|
2680
|
-
block,
|
|
2681
|
-
styleContext,
|
|
2682
|
-
isRead,
|
|
2683
|
-
isListened,
|
|
2684
|
-
isInBookmarks,
|
|
2685
|
-
bookmarkAction,
|
|
2686
|
-
lightBox,
|
|
2687
|
-
lang,
|
|
2688
|
-
type = 'default'
|
|
2689
|
-
}) => {
|
|
2690
|
-
const context = {
|
|
2691
|
-
lightBox: lightBox || null
|
|
2692
|
-
};
|
|
2693
|
-
switch (block.type) {
|
|
2694
|
-
case 'important_lead':
|
|
2695
|
-
{
|
|
2696
|
-
return /*#__PURE__*/React.createElement(ImportantLead, {
|
|
2697
|
-
block: block,
|
|
2698
|
-
styleContext: styleContext
|
|
2699
|
-
});
|
|
2700
|
-
}
|
|
2701
|
-
case 'spoiler':
|
|
2702
|
-
{
|
|
2703
|
-
return /*#__PURE__*/React.createElement(BlockProvider, {
|
|
2704
|
-
value: context
|
|
2705
|
-
}, /*#__PURE__*/React.createElement(Spoiler, {
|
|
2706
|
-
block: block,
|
|
2707
|
-
styleContext: styleContext
|
|
2708
|
-
}));
|
|
2709
|
-
}
|
|
2710
|
-
case 'cover':
|
|
2711
|
-
{
|
|
2712
|
-
return /*#__PURE__*/React.createElement(Cover, {
|
|
2713
|
-
block: block,
|
|
2714
|
-
styleContext: styleContext
|
|
2715
|
-
});
|
|
2716
|
-
}
|
|
2717
|
-
case 'half':
|
|
2718
|
-
{
|
|
2719
|
-
return /*#__PURE__*/React.createElement(HalfBlock, {
|
|
2720
|
-
block: block,
|
|
2721
|
-
styleContext: styleContext
|
|
2722
|
-
});
|
|
2723
|
-
}
|
|
2724
|
-
case 'related_rich':
|
|
2725
|
-
{
|
|
2726
|
-
return /*#__PURE__*/React.createElement(RelatedRichBlock, {
|
|
2727
|
-
block: block,
|
|
2728
|
-
styleContext: styleContext
|
|
2729
|
-
});
|
|
2730
|
-
}
|
|
2731
|
-
case 'related_book':
|
|
2732
|
-
{
|
|
2733
|
-
return /*#__PURE__*/React.createElement(RelatedBook, {
|
|
2734
|
-
block: block,
|
|
2735
|
-
styleContext: styleContext
|
|
2736
|
-
});
|
|
2737
|
-
}
|
|
2738
|
-
case 'related_shop':
|
|
2739
|
-
{
|
|
2740
|
-
return /*#__PURE__*/React.createElement(ShopRelatedBlock, {
|
|
2741
|
-
block: block,
|
|
2742
|
-
styleContext: styleContext
|
|
2743
|
-
});
|
|
2744
|
-
}
|
|
2745
|
-
default:
|
|
2746
|
-
{
|
|
2747
|
-
return /*#__PURE__*/React.createElement(BlockProvider, {
|
|
2748
|
-
value: context
|
|
2749
|
-
}, /*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2750
|
-
block: block,
|
|
2751
|
-
styleContext: styleContext,
|
|
2752
|
-
isRead: isRead,
|
|
2753
|
-
isListened: isListened,
|
|
2754
|
-
isInBookmarks: isInBookmarks,
|
|
2755
|
-
bookmarkAction: bookmarkAction,
|
|
2756
|
-
lang: lang,
|
|
2757
|
-
type: type
|
|
2758
|
-
}));
|
|
2759
|
-
}
|
|
2760
|
-
}
|
|
2761
|
-
};
|
|
2762
|
-
|
|
2763
|
-
var styles$1 = {"root":"ToolbarButton-module_root__upsEH","isDark":"ToolbarButton-module_isDark__gWpv-","dark":"ToolbarButton-module_dark__5XOEp","bookmark":"ToolbarButton-module_bookmark__7SWkm","isActive":"ToolbarButton-module_isActive__N4kkV","icon":"ToolbarButton-module_icon__Ldcgq","text":"ToolbarButton-module_text__4R2a0"};
|
|
2764
|
-
|
|
2765
|
-
const ToolbarButton = ({
|
|
2766
|
-
type,
|
|
2767
|
-
theme,
|
|
2768
|
-
isActive,
|
|
2769
|
-
lang = 'ru',
|
|
2770
|
-
text,
|
|
2771
|
-
icon,
|
|
2772
|
-
onClick
|
|
2773
|
-
}) => {
|
|
2774
|
-
const classNames = [[styles$1.root, true], [styles$1[type], !!styles$1[type]], [styles$1[theme], !!styles$1[theme] && !!theme], [styles$1.isActive, !!isActive]];
|
|
2775
|
-
const label = SocialLabels[lang][type];
|
|
2776
|
-
return /*#__PURE__*/React.createElement("button", {
|
|
2777
|
-
"data-testid": "toolbar-button",
|
|
2778
|
-
className: makeClassName(classNames),
|
|
2779
|
-
type: "button",
|
|
2780
|
-
onClick: event => onClick(event, type)
|
|
2781
|
-
}, icon && ( /*#__PURE__*/React.createElement("div", {
|
|
2782
|
-
className: styles$1.icon
|
|
2783
|
-
}, /*#__PURE__*/React.createElement(SvgSymbol, {
|
|
2784
|
-
size: "medium",
|
|
2785
|
-
icon: icon,
|
|
2786
|
-
styleContext: "isInToolbar"
|
|
2787
|
-
}))), /*#__PURE__*/React.createElement("span", {
|
|
2788
|
-
className: styles$1.text
|
|
2789
|
-
}, text || label));
|
|
2790
|
-
};
|
|
2791
|
-
|
|
2792
|
-
var styles = {"root":"Tooltip-module_root__xK21R","isCenterBottom":"Tooltip-module_isCenterBottom__-qv7D","isLeftBottom":"Tooltip-module_isLeftBottom__0-f5z","isCenterTop":"Tooltip-module_isCenterTop__xQ3Ql","isLeftTop":"Tooltip-module_isLeftTop__yjKrV","body":"Tooltip-module_body__5qgzu","footer":"Tooltip-module_footer__swU9S"};
|
|
2793
|
-
|
|
2794
|
-
const capitalizeFirstLetter = string => string.charAt(0).toUpperCase() + string.slice(1);
|
|
2795
|
-
|
|
2796
|
-
const Tooltip = ({
|
|
2797
|
-
children,
|
|
2798
|
-
position
|
|
2799
|
-
}) => {
|
|
2800
|
-
const [x, y] = position;
|
|
2801
|
-
const positionClass = `is${capitalizeFirstLetter(x)}${capitalizeFirstLetter(y)}`;
|
|
2802
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2803
|
-
className: makeClassName([[styles.root, true], [styles[positionClass], true]])
|
|
2804
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2805
|
-
className: styles.body
|
|
2806
|
-
}, children));
|
|
2807
|
-
};
|
|
2808
|
-
|
|
2809
|
-
const TooltipFooter = ({
|
|
2810
|
-
children
|
|
2811
|
-
}) => {
|
|
2812
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2813
|
-
className: styles.footer
|
|
2814
|
-
}, children);
|
|
2815
|
-
};
|
|
2816
|
-
|
|
2817
|
-
export { AnnouncementInText, BookmarkButton, Button, ButtonLoader, CardTitle, ChapterBlock, Cover, DocumentItemsCount, DonatesTeaser, DotsOnImage, Dropdown, EmbedBlockContainer, Footnote, GroupedBlock, HalfBlock, Image, ImportantLead, Lazy, ListBlock, MaterialNote, MaterialTitle, MediaCaption, Menu, Meta, MetaItem, MetaItemLive, Popover, Primary, QuoteBlock, RawHtmlBlock, RelatedBlock, RelatedRichBlock, RenderBlocks, RichTitle, Secondary, SensitiveBlock, ShopRelatedBlock, SimpleBlock, SimpleTitle, SourceBlock, Spoiler, SvgSymbol, Switcher, Table, Tag, Timestamp, Toolbar, ToolbarButton, ToolbarItem, Tooltip, TooltipFooter };
|
|
2818
|
-
//# sourceMappingURL=ui-kit-2.esm.js.map
|