@meduza/ui-kit-2 0.0.1 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/README.md +7 -179
  2. package/dist/BookmarkButton/BookmarkButton.stories.d.ts +10 -0
  3. package/dist/BookmarkButton/BookmarkButton.types.d.ts +6 -0
  4. package/dist/BookmarkButton/index.d.ts +3 -0
  5. package/dist/Button/Button.stories.d.ts +10 -0
  6. package/dist/Button/Button.types.d.ts +2 -2
  7. package/dist/CardTitle/CardTitle.stories.d.ts +10 -0
  8. package/dist/CardTitle/CardTitle.types.d.ts +8 -0
  9. package/dist/CardTitle/index.d.ts +3 -0
  10. package/dist/ChapterBlock/ChapterBlock.stories.d.ts +10 -0
  11. package/dist/ChapterBlock/ChapterBlock.types.d.ts +7 -0
  12. package/dist/ChapterBlock/index.d.ts +3 -0
  13. package/dist/Cover/Cover.stories.d.ts +10 -0
  14. package/dist/Cover/Cover.types.d.ts +4 -0
  15. package/dist/Cover/index.d.ts +3 -0
  16. package/dist/DocumentItemsCount/DocumentItemsCount.stories.d.ts +10 -0
  17. package/dist/DocumentItemsCount/DocumentItemsCount.types.d.ts +7 -0
  18. package/dist/DocumentItemsCount/index.d.ts +3 -0
  19. package/dist/DotsOnImage/DotsOnImage.stories.d.ts +10 -0
  20. package/dist/DotsOnImage/DotsOnImage.types.d.ts +42 -0
  21. package/dist/DotsOnImage/index.d.ts +3 -0
  22. package/dist/Dropdown/Dropdown.stories.d.ts +10 -0
  23. package/dist/Dropdown/Dropdown.types.d.ts +6 -0
  24. package/dist/Dropdown/index.d.ts +4 -0
  25. package/dist/EmbedBlock/EmbedBlock.d.ts +3 -0
  26. package/dist/EmbedBlock/EmbedBlock.stories.d.ts +10 -0
  27. package/dist/EmbedBlock/EmbedBlock.types.d.ts +5 -0
  28. package/dist/EmbedBlock/IframeBlock.d.ts +3 -0
  29. package/dist/EmbedBlock/index.d.ts +3 -0
  30. package/dist/GroupedBlock/GroupedBlock.stories.d.ts +10 -0
  31. package/dist/GroupedBlock/GroupedBlock.types.d.ts +4 -0
  32. package/dist/GroupedBlock/index.d.ts +3 -0
  33. package/dist/HalfBlock/HalfBlock.stories.d.ts +10 -0
  34. package/dist/HalfBlock/HalfBlock.types.d.ts +4 -0
  35. package/dist/HalfBlock/index.d.ts +3 -0
  36. package/dist/Image/Image.stories.d.ts +10 -0
  37. package/dist/Image/Image.types.d.ts +38 -0
  38. package/dist/Image/RenderPicture.d.ts +4 -0
  39. package/dist/Image/index.d.ts +3 -0
  40. package/dist/ImportantLead/ImportantLead.stories.d.ts +10 -0
  41. package/dist/ImportantLead/ImportantLead.types.d.ts +4 -0
  42. package/dist/ImportantLead/index.d.ts +3 -0
  43. package/dist/Lazy/Lazy.stories.d.ts +10 -0
  44. package/dist/Lazy/Lazy.types.d.ts +5 -0
  45. package/dist/Lazy/index.d.ts +3 -0
  46. package/dist/ListBlock/ListBlock.stories.d.ts +10 -0
  47. package/dist/ListBlock/ListBlock.types.d.ts +4 -0
  48. package/dist/ListBlock/index.d.ts +3 -0
  49. package/dist/MaterialNote/MaterialNote.stories.d.ts +10 -0
  50. package/dist/MaterialNote/MaterialNote.types.d.ts +12 -0
  51. package/dist/MaterialNote/index.d.ts +3 -0
  52. package/dist/MaterialTitle/MaterialTitle.stories.d.ts +10 -0
  53. package/dist/MaterialTitle/MaterialTitle.types.d.ts +4 -0
  54. package/dist/MaterialTitle/index.d.ts +5 -0
  55. package/dist/MediaCaption/MediaCaption.stories.d.ts +10 -0
  56. package/dist/MediaCaption/MediaCaption.types.d.ts +5 -0
  57. package/dist/MediaCaption/index.d.ts +3 -0
  58. package/dist/Meta/Meta.stories.d.ts +10 -0
  59. package/dist/Meta/Meta.types.d.ts +18 -0
  60. package/dist/Meta/MetaContainer.d.ts +3 -0
  61. package/dist/Meta/index.d.ts +3 -0
  62. package/dist/MetaItem/MetaItem.stories.d.ts +10 -0
  63. package/dist/MetaItem/MetaItem.types.d.ts +7 -0
  64. package/dist/MetaItem/index.d.ts +3 -0
  65. package/dist/MetaItemLive/MetaItemLive.stories.d.ts +10 -0
  66. package/dist/MetaItemLive/MetaItemLive.types.d.ts +3 -0
  67. package/dist/MetaItemLive/index.d.ts +3 -0
  68. package/dist/Popover/Popover.stories.d.ts +10 -0
  69. package/dist/Popover/Popover.types.d.ts +5 -0
  70. package/dist/Popover/index.d.ts +3 -0
  71. package/dist/QuoteBlock/QuoteBlock.stories.d.ts +10 -0
  72. package/dist/QuoteBlock/QuoteBlock.types.d.ts +6 -0
  73. package/dist/QuoteBlock/index.d.ts +3 -0
  74. package/dist/RawHtmlBlock/RawHtmlBlock.stories.d.ts +10 -0
  75. package/dist/RawHtmlBlock/RawHtmlBlock.types.d.ts +9 -0
  76. package/dist/RawHtmlBlock/index.d.ts +3 -0
  77. package/dist/RelatedBlock/RelatedBlock.stories.d.ts +10 -0
  78. package/dist/RelatedBlock/RelatedBlock.types.d.ts +4 -0
  79. package/dist/RelatedBlock/index.d.ts +3 -0
  80. package/dist/RenderBlocks/RenderBlocks.stories.d.ts +10 -0
  81. package/dist/RenderBlocks/RenderBlocks.types.d.ts +10 -0
  82. package/dist/RenderBlocks/index.d.ts +3 -0
  83. package/dist/RichTitle/RichTitle.stories.d.ts +10 -0
  84. package/dist/RichTitle/RichTitle.types.d.ts +4 -0
  85. package/dist/RichTitle/index.d.ts +3 -0
  86. package/dist/SimpleBlock/SimpleBlock.stories.d.ts +10 -0
  87. package/dist/SimpleBlock/SimpleBlock.types.d.ts +4 -0
  88. package/dist/SimpleBlock/index.d.ts +3 -0
  89. package/dist/SimpleTitle/SimpleTitle.stories.d.ts +10 -0
  90. package/dist/SimpleTitle/SimpleTitle.types.d.ts +4 -0
  91. package/dist/SimpleTitle/index.d.ts +3 -0
  92. package/dist/SourceBlock/SourceBlock.stories.d.ts +10 -0
  93. package/dist/SourceBlock/SourceBlock.types.d.ts +4 -0
  94. package/dist/SourceBlock/index.d.ts +3 -0
  95. package/dist/Spoiler/Spoiler.stories.d.ts +10 -0
  96. package/dist/Spoiler/Spoiler.types.d.ts +4 -0
  97. package/dist/Spoiler/index.d.ts +3 -0
  98. package/dist/SvgSymbol/SvgSymbol.stories.d.ts +10 -0
  99. package/dist/SvgSymbol/SvgSymbol.types.d.ts +8 -0
  100. package/dist/SvgSymbol/icons.d.ts +157 -0
  101. package/dist/SvgSymbol/index.d.ts +3 -0
  102. package/dist/Switcher/Switcher.stories.d.ts +10 -0
  103. package/dist/Switcher/Switcher.types.d.ts +12 -0
  104. package/dist/Switcher/index.d.ts +3 -0
  105. package/dist/Table/Table.stories.d.ts +10 -0
  106. package/dist/Table/Table.types.d.ts +25 -0
  107. package/dist/Table/index.d.ts +3 -0
  108. package/dist/Tag/Tag.stories.d.ts +10 -0
  109. package/dist/Tag/Tag.types.d.ts +12 -0
  110. package/dist/Tag/index.d.ts +3 -0
  111. package/dist/Timestamp/Timestamp.stories.d.ts +10 -0
  112. package/dist/Timestamp/Timestamp.types.d.ts +5 -0
  113. package/dist/Timestamp/index.d.ts +4 -0
  114. package/dist/Toolbar/Toolbar.stories.d.ts +10 -0
  115. package/dist/Toolbar/Toolbar.types.d.ts +5 -0
  116. package/dist/Toolbar/index.d.ts +3 -0
  117. package/dist/ToolbarButton/ToolbarButton.stories.d.ts +10 -0
  118. package/dist/ToolbarButton/ToolbarButton.types.d.ts +9 -0
  119. package/dist/ToolbarButton/index.d.ts +3 -0
  120. package/dist/_storybook/PreviewWrapper/index.d.ts +6 -0
  121. package/dist/constants.d.ts +22 -0
  122. package/dist/index.d.ts +37 -0
  123. package/dist/ui-kit-2.cjs.development.css +36 -0
  124. package/dist/ui-kit-2.cjs.development.js +2187 -39
  125. package/dist/ui-kit-2.cjs.development.js.map +1 -1
  126. package/dist/ui-kit-2.cjs.production.min.js +1 -1
  127. package/dist/ui-kit-2.cjs.production.min.js.map +1 -1
  128. package/dist/ui-kit-2.esm.js +2139 -32
  129. package/dist/ui-kit-2.esm.js.map +1 -1
  130. package/dist/utils/BlockContext.d.ts +8 -0
  131. package/dist/utils/DangerousHtml.d.ts +8 -0
  132. package/dist/utils/makeClassName.d.ts +1 -1
  133. package/dist/utils/makeStyleContext.d.ts +2 -0
  134. package/dist/utils/toCamel.d.ts +1 -0
  135. package/package.json +29 -13
  136. package/src/BookmarkButton/BookmarkButton.module.css +50 -0
  137. package/src/BookmarkButton/BookmarkButton.stories.module.css +5 -0
  138. package/src/BookmarkButton/BookmarkButton.stories.tsx +39 -0
  139. package/src/BookmarkButton/BookmarkButton.test.tsx +20 -0
  140. package/src/BookmarkButton/BookmarkButton.types.ts +6 -0
  141. package/src/BookmarkButton/index.tsx +37 -0
  142. package/src/Button/Button.stories.module.css +30 -0
  143. package/src/Button/Button.stories.tsx +87 -0
  144. package/src/Button/Button.test.tsx +42 -0
  145. package/src/Button/Button.types.ts +1 -3
  146. package/src/Button/index.tsx +2 -2
  147. package/src/CardTitle/CardTitle.module.css +52 -0
  148. package/src/CardTitle/CardTitle.stories.module.css +5 -0
  149. package/src/CardTitle/CardTitle.stories.tsx +36 -0
  150. package/src/CardTitle/CardTitle.test.tsx +20 -0
  151. package/src/CardTitle/CardTitle.types.ts +8 -0
  152. package/src/CardTitle/index.tsx +24 -0
  153. package/src/CardTitle/mock.json +8 -0
  154. package/src/ChapterBlock/ChapterBlock.module.css +70 -0
  155. package/src/ChapterBlock/ChapterBlock.stories.module.css +5 -0
  156. package/src/ChapterBlock/ChapterBlock.stories.tsx +36 -0
  157. package/src/ChapterBlock/ChapterBlock.test.tsx +20 -0
  158. package/src/ChapterBlock/ChapterBlock.types.ts +7 -0
  159. package/src/ChapterBlock/index.tsx +31 -0
  160. package/src/ChapterBlock/mock.json +5 -0
  161. package/src/Cover/Cover.module.css +5 -0
  162. package/src/Cover/Cover.stories.module.css +5 -0
  163. package/src/Cover/Cover.stories.tsx +34 -0
  164. package/src/Cover/Cover.test.tsx +20 -0
  165. package/src/Cover/Cover.types.ts +4 -0
  166. package/src/Cover/index.tsx +89 -0
  167. package/src/DocumentItemsCount/DocumentItemsCount.module.css +18 -0
  168. package/src/DocumentItemsCount/DocumentItemsCount.stories.module.css +5 -0
  169. package/src/DocumentItemsCount/DocumentItemsCount.stories.tsx +34 -0
  170. package/src/DocumentItemsCount/DocumentItemsCount.test.tsx +20 -0
  171. package/src/DocumentItemsCount/DocumentItemsCount.types.ts +6 -0
  172. package/src/DocumentItemsCount/index.tsx +54 -0
  173. package/src/DotsOnImage/DotsOnImage.module.css +56 -0
  174. package/src/DotsOnImage/DotsOnImage.stories.module.css +9 -0
  175. package/src/DotsOnImage/DotsOnImage.stories.tsx +37 -0
  176. package/src/DotsOnImage/DotsOnImage.test.tsx +19 -0
  177. package/src/DotsOnImage/DotsOnImage.types.ts +46 -0
  178. package/src/DotsOnImage/index.tsx +79 -0
  179. package/src/DotsOnImage/mock.json +75 -0
  180. package/src/Dropdown/Dropdown.module.css +82 -0
  181. package/src/Dropdown/Dropdown.stories.module.css +5 -0
  182. package/src/Dropdown/Dropdown.stories.tsx +55 -0
  183. package/src/Dropdown/Dropdown.test.tsx +20 -0
  184. package/src/Dropdown/Dropdown.types.ts +5 -0
  185. package/src/Dropdown/index.tsx +35 -0
  186. package/src/EmbedBlock/EmbedBlock.module.css +351 -0
  187. package/src/EmbedBlock/EmbedBlock.stories.module.css +5 -0
  188. package/src/EmbedBlock/EmbedBlock.stories.tsx +39 -0
  189. package/src/EmbedBlock/EmbedBlock.test.tsx +20 -0
  190. package/src/EmbedBlock/EmbedBlock.tsx +236 -0
  191. package/src/EmbedBlock/EmbedBlock.types.ts +5 -0
  192. package/src/EmbedBlock/IframeBlock.tsx +86 -0
  193. package/src/EmbedBlock/index.tsx +16 -0
  194. package/src/EmbedBlock/mock.json +89 -0
  195. package/src/GroupedBlock/GroupedBlock.module.css +94 -0
  196. package/src/GroupedBlock/GroupedBlock.stories.module.css +5 -0
  197. package/src/GroupedBlock/GroupedBlock.stories.tsx +34 -0
  198. package/src/GroupedBlock/GroupedBlock.test.tsx +20 -0
  199. package/src/GroupedBlock/GroupedBlock.types.ts +4 -0
  200. package/src/GroupedBlock/index.tsx +67 -0
  201. package/src/HalfBlock/HalfBlock.module.css +88 -0
  202. package/src/HalfBlock/HalfBlock.stories.module.css +5 -0
  203. package/src/HalfBlock/HalfBlock.stories.tsx +34 -0
  204. package/src/HalfBlock/HalfBlock.test.tsx +20 -0
  205. package/src/HalfBlock/HalfBlock.types.ts +4 -0
  206. package/src/HalfBlock/index.tsx +53 -0
  207. package/src/Image/Image.module.css +78 -0
  208. package/src/Image/Image.stories.module.css +5 -0
  209. package/src/Image/Image.stories.tsx +47 -0
  210. package/src/Image/Image.test.tsx +33 -0
  211. package/src/Image/Image.types.ts +40 -0
  212. package/src/Image/RenderPicture.tsx +70 -0
  213. package/src/Image/index.tsx +101 -0
  214. package/src/Image/mock.json +49 -0
  215. package/src/ImportantLead/ImportantLead.module.css +64 -0
  216. package/src/ImportantLead/ImportantLead.stories.module.css +5 -0
  217. package/src/ImportantLead/ImportantLead.stories.tsx +34 -0
  218. package/src/ImportantLead/ImportantLead.test.tsx +20 -0
  219. package/src/ImportantLead/ImportantLead.types.ts +4 -0
  220. package/src/ImportantLead/index.tsx +35 -0
  221. package/src/Lazy/Lazy.module.css +9 -0
  222. package/src/Lazy/Lazy.stories.module.css +5 -0
  223. package/src/Lazy/Lazy.stories.tsx +48 -0
  224. package/src/Lazy/Lazy.test.tsx +20 -0
  225. package/src/Lazy/Lazy.types.ts +4 -0
  226. package/src/Lazy/index.tsx +41 -0
  227. package/src/ListBlock/ListBlock.module.css +163 -0
  228. package/src/ListBlock/ListBlock.stories.module.css +5 -0
  229. package/src/ListBlock/ListBlock.stories.tsx +34 -0
  230. package/src/ListBlock/ListBlock.test.tsx +20 -0
  231. package/src/ListBlock/ListBlock.types.ts +4 -0
  232. package/src/ListBlock/index.tsx +33 -0
  233. package/src/MaterialNote/MaterialNote.module.css +139 -0
  234. package/src/MaterialNote/MaterialNote.stories.module.css +5 -0
  235. package/src/MaterialNote/MaterialNote.stories.tsx +36 -0
  236. package/src/MaterialNote/MaterialNote.test.tsx +20 -0
  237. package/src/MaterialNote/MaterialNote.types.ts +12 -0
  238. package/src/MaterialNote/index.tsx +30 -0
  239. package/src/MaterialNote/mock.json +18 -0
  240. package/src/MaterialTitle/MaterialTitle.module.css +33 -0
  241. package/src/MaterialTitle/MaterialTitle.stories.module.css +13 -0
  242. package/src/MaterialTitle/MaterialTitle.stories.tsx +52 -0
  243. package/src/MaterialTitle/MaterialTitle.test.tsx +20 -0
  244. package/src/MaterialTitle/MaterialTitle.types.ts +3 -0
  245. package/src/MaterialTitle/index.tsx +20 -0
  246. package/src/MediaCaption/MediaCaption.module.css +85 -0
  247. package/src/MediaCaption/MediaCaption.stories.module.css +5 -0
  248. package/src/MediaCaption/MediaCaption.stories.tsx +37 -0
  249. package/src/MediaCaption/MediaCaption.test.tsx +20 -0
  250. package/src/MediaCaption/MediaCaption.types.ts +5 -0
  251. package/src/MediaCaption/index.tsx +35 -0
  252. package/src/Meta/Meta.module.css +106 -0
  253. package/src/Meta/Meta.stories.module.css +7 -0
  254. package/src/Meta/Meta.stories.tsx +69 -0
  255. package/src/Meta/Meta.test.tsx +20 -0
  256. package/src/Meta/Meta.types.ts +19 -0
  257. package/src/Meta/MetaContainer.tsx +148 -0
  258. package/src/Meta/index.tsx +32 -0
  259. package/src/MetaItem/MetaItem.module.css +104 -0
  260. package/src/MetaItem/MetaItem.stories.module.css +5 -0
  261. package/src/MetaItem/MetaItem.stories.tsx +34 -0
  262. package/src/MetaItem/MetaItem.test.tsx +20 -0
  263. package/src/MetaItem/MetaItem.types.ts +6 -0
  264. package/src/MetaItem/index.tsx +26 -0
  265. package/src/MetaItemLive/MetaItemLive.module.css +124 -0
  266. package/src/MetaItemLive/MetaItemLive.stories.module.css +5 -0
  267. package/src/MetaItemLive/MetaItemLive.stories.tsx +34 -0
  268. package/src/MetaItemLive/MetaItemLive.test.tsx +20 -0
  269. package/src/MetaItemLive/MetaItemLive.types.ts +3 -0
  270. package/src/MetaItemLive/index.tsx +25 -0
  271. package/src/Popover/Popover.module.css +134 -0
  272. package/src/Popover/Popover.stories.module.css +5 -0
  273. package/src/Popover/Popover.stories.tsx +55 -0
  274. package/src/Popover/Popover.test.tsx +20 -0
  275. package/src/Popover/Popover.types.ts +4 -0
  276. package/src/Popover/index.tsx +78 -0
  277. package/src/QuoteBlock/QuoteBlock.module.css +79 -0
  278. package/src/QuoteBlock/QuoteBlock.stories.module.css +7 -0
  279. package/src/QuoteBlock/QuoteBlock.stories.tsx +36 -0
  280. package/src/QuoteBlock/QuoteBlock.test.tsx +20 -0
  281. package/src/QuoteBlock/QuoteBlock.types.ts +6 -0
  282. package/src/QuoteBlock/index.tsx +24 -0
  283. package/src/QuoteBlock/mock.json +6 -0
  284. package/src/RawHtmlBlock/RawHtmlBlock.stories.module.css +5 -0
  285. package/src/RawHtmlBlock/RawHtmlBlock.stories.tsx +34 -0
  286. package/src/RawHtmlBlock/RawHtmlBlock.test.tsx +20 -0
  287. package/src/RawHtmlBlock/RawHtmlBlock.types.ts +9 -0
  288. package/src/RawHtmlBlock/index.tsx +57 -0
  289. package/src/RelatedBlock/RelatedBlock.module.css +129 -0
  290. package/src/RelatedBlock/RelatedBlock.stories.module.css +5 -0
  291. package/src/RelatedBlock/RelatedBlock.stories.tsx +34 -0
  292. package/src/RelatedBlock/RelatedBlock.test.tsx +20 -0
  293. package/src/RelatedBlock/RelatedBlock.types.ts +4 -0
  294. package/src/RelatedBlock/index.tsx +45 -0
  295. package/src/RenderBlocks/RenderBlocks.stories.module.css +5 -0
  296. package/src/RenderBlocks/RenderBlocks.stories.tsx +34 -0
  297. package/src/RenderBlocks/RenderBlocks.test.tsx +20 -0
  298. package/src/RenderBlocks/RenderBlocks.types.ts +10 -0
  299. package/src/RenderBlocks/index.tsx +125 -0
  300. package/src/RichTitle/RichTitle.module.css +85 -0
  301. package/src/RichTitle/RichTitle.stories.module.css +5 -0
  302. package/src/RichTitle/RichTitle.stories.tsx +34 -0
  303. package/src/RichTitle/RichTitle.test.tsx +20 -0
  304. package/src/RichTitle/RichTitle.types.ts +4 -0
  305. package/src/RichTitle/index.tsx +32 -0
  306. package/src/SimpleBlock/FootnoteLink.css +34 -0
  307. package/src/SimpleBlock/SimpleBlock.module.css +393 -0
  308. package/src/SimpleBlock/SimpleBlock.stories.module.css +5 -0
  309. package/src/SimpleBlock/SimpleBlock.stories.tsx +34 -0
  310. package/src/SimpleBlock/SimpleBlock.test.tsx +20 -0
  311. package/src/SimpleBlock/SimpleBlock.types.ts +4 -0
  312. package/src/SimpleBlock/index.tsx +47 -0
  313. package/src/SimpleTitle/SimpleTitle.module.css +33 -0
  314. package/src/SimpleTitle/SimpleTitle.stories.module.css +5 -0
  315. package/src/SimpleTitle/SimpleTitle.stories.tsx +34 -0
  316. package/src/SimpleTitle/SimpleTitle.test.tsx +20 -0
  317. package/src/SimpleTitle/SimpleTitle.types.ts +4 -0
  318. package/src/SimpleTitle/index.tsx +29 -0
  319. package/src/SourceBlock/SourceBlock.module.css +110 -0
  320. package/src/SourceBlock/SourceBlock.stories.module.css +5 -0
  321. package/src/SourceBlock/SourceBlock.stories.tsx +34 -0
  322. package/src/SourceBlock/SourceBlock.test.tsx +20 -0
  323. package/src/SourceBlock/SourceBlock.types.ts +4 -0
  324. package/src/SourceBlock/index.tsx +44 -0
  325. package/src/Spoiler/Spoiler.module.css +177 -0
  326. package/src/Spoiler/Spoiler.stories.module.css +8 -0
  327. package/src/Spoiler/Spoiler.stories.tsx +36 -0
  328. package/src/Spoiler/Spoiler.test.tsx +20 -0
  329. package/src/Spoiler/Spoiler.types.ts +4 -0
  330. package/src/Spoiler/index.tsx +81 -0
  331. package/src/Spoiler/mock.json +49 -0
  332. package/src/SvgSymbol/SvgSymbol.module.css +240 -0
  333. package/src/SvgSymbol/SvgSymbol.stories.module.css +127 -0
  334. package/src/SvgSymbol/SvgSymbol.stories.tsx +95 -0
  335. package/src/SvgSymbol/SvgSymbol.test.tsx +21 -0
  336. package/src/SvgSymbol/SvgSymbol.types.ts +57 -0
  337. package/src/SvgSymbol/icons.ts +217 -0
  338. package/src/SvgSymbol/index.tsx +32 -0
  339. package/src/Switcher/Switcher.module.css +159 -0
  340. package/src/Switcher/Switcher.stories.module.css +28 -0
  341. package/src/Switcher/Switcher.stories.tsx +68 -0
  342. package/src/Switcher/Switcher.test.tsx +43 -0
  343. package/src/Switcher/Switcher.types.ts +16 -0
  344. package/src/Switcher/index.tsx +53 -0
  345. package/src/Table/Table.module.css +300 -0
  346. package/src/Table/Table.stories.module.css +5 -0
  347. package/src/Table/Table.stories.tsx +36 -0
  348. package/src/Table/Table.test.tsx +20 -0
  349. package/src/Table/Table.types.ts +26 -0
  350. package/src/Table/index.tsx +76 -0
  351. package/src/Table/mock.json +301 -0
  352. package/src/Tag/Tag.module.css +115 -0
  353. package/src/Tag/Tag.stories.module.css +5 -0
  354. package/src/Tag/Tag.stories.tsx +53 -0
  355. package/src/Tag/Tag.test.tsx +20 -0
  356. package/src/Tag/Tag.types.ts +14 -0
  357. package/src/Tag/index.tsx +33 -0
  358. package/src/Timestamp/Timestamp.module.css +6 -0
  359. package/src/Timestamp/Timestamp.stories.module.css +5 -0
  360. package/src/Timestamp/Timestamp.stories.tsx +34 -0
  361. package/src/Timestamp/Timestamp.test.tsx +20 -0
  362. package/src/Timestamp/Timestamp.types.ts +5 -0
  363. package/src/Timestamp/index.tsx +40 -0
  364. package/src/Toolbar/Toolbar.module.css +134 -0
  365. package/src/Toolbar/Toolbar.stories.module.css +5 -0
  366. package/src/Toolbar/Toolbar.stories.tsx +89 -0
  367. package/src/Toolbar/Toolbar.test.tsx +20 -0
  368. package/src/Toolbar/Toolbar.types.ts +4 -0
  369. package/src/Toolbar/index.tsx +28 -0
  370. package/src/ToolbarButton/ToolbarButton.module.css +97 -0
  371. package/src/ToolbarButton/ToolbarButton.stories.module.css +5 -0
  372. package/src/ToolbarButton/ToolbarButton.stories.tsx +36 -0
  373. package/src/ToolbarButton/ToolbarButton.test.tsx +20 -0
  374. package/src/ToolbarButton/ToolbarButton.types.ts +19 -0
  375. package/src/ToolbarButton/index.tsx +34 -0
  376. package/src/_storybook/PreviewWrapper/PreviewWrapper.module.css +117 -0
  377. package/src/_storybook/PreviewWrapper/index.tsx +23 -0
  378. package/src/constants.ts +24 -0
  379. package/src/index.tsx +38 -0
  380. package/src/utils/BlockContext.ts +7 -0
  381. package/src/utils/DangerousHtml.tsx +79 -0
  382. package/src/utils/makeClassName.ts +1 -1
  383. package/src/utils/makeStyleContext.ts +13 -0
  384. package/src/utils/toCamel.ts +2 -0
  385. package/LICENSE +0 -21
  386. package/src/global.d.ts +0 -4
@@ -4,7 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
6
 
7
- var React = _interopDefault(require('react'));
7
+ var React = require('react');
8
+ var React__default = _interopDefault(React);
9
+ var reactIntersectionObserver = require('react-intersection-observer');
10
+ var dayjs = _interopDefault(require('dayjs'));
11
+ require('dayjs/locale/ru');
12
+ var relativeTime = _interopDefault(require('dayjs/plugin/relativeTime'));
13
+ var enableInlineVideo = _interopDefault(require('iphone-inline-video'));
8
14
 
9
15
  var makeClassName = function makeClassName(list) {
10
16
  return list.filter(function (_ref) {
@@ -17,58 +23,29 @@ var makeClassName = function makeClassName(list) {
17
23
  };
18
24
 
19
25
  var Loader = function Loader() {
20
- return React.createElement("svg", {
26
+ return React__default.createElement("svg", {
21
27
  width: "30px",
22
28
  height: "30px",
23
29
  viewBox: "0 0 30 30",
24
30
  xmlns: "http://www.w3.org/2000/svg"
25
- }, React.createElement("g", null, React.createElement("path", {
31
+ }, React__default.createElement("g", null, React__default.createElement("path", {
26
32
  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",
27
33
  opacity: "0.3"
28
- })), React.createElement("g", {
34
+ })), React__default.createElement("g", {
29
35
  fillRule: "evenodd"
30
- }, React.createElement("animateTransform", {
36
+ }, React__default.createElement("animateTransform", {
31
37
  attributeName: "transform",
32
38
  type: "rotate",
33
39
  from: "0 15 15",
34
40
  to: "360 15 15",
35
41
  dur: "1000ms",
36
42
  repeatCount: "indefinite"
37
- }), React.createElement("path", {
43
+ }), React__default.createElement("path", {
38
44
  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"
39
45
  })));
40
46
  };
41
47
 
42
- function styleInject(css, ref) {
43
- if ( ref === void 0 ) ref = {};
44
- var insertAt = ref.insertAt;
45
-
46
- if (!css || typeof document === 'undefined') { return; }
47
-
48
- var head = document.head || document.getElementsByTagName('head')[0];
49
- var style = document.createElement('style');
50
- style.type = 'text/css';
51
-
52
- if (insertAt === 'top') {
53
- if (head.firstChild) {
54
- head.insertBefore(style, head.firstChild);
55
- } else {
56
- head.appendChild(style);
57
- }
58
- } else {
59
- head.appendChild(style);
60
- }
61
-
62
- if (style.styleSheet) {
63
- style.styleSheet.cssText = css;
64
- } else {
65
- style.appendChild(document.createTextNode(css));
66
- }
67
- }
68
-
69
- var css_248z = "/* Colors */\n/* Fonts */\n/* Gap */\n/* Media */\n/* 512 */\n/* 650 */\n/* 768 */\n/* 1024 */\n/* 1010 */\n/* 1200 */\n/* 511 */\n/* 1023 */\n/* Zindex */\n.Button-module_root__RpsiW {\n display: block;\n\n padding: 0;\n\n color: #fff;\n\n font-family: 'Proxima Nova', 'Arial', 'Helvetica Neue', sans-serif;\n line-height: 1;\n text-align: center;\n\n border-width: 0;\n outline: none;\n\n cursor: pointer;\n\n transition: background-color 0.15s ease-out;\n\n -webkit-appearance: none;\n\n -moz-appearance: none;\n\n appearance: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.Button-module_root__RpsiW::-moz-focus-inner {\n border: 0;\n}\n.Button-module_root__RpsiW[disabled] {\n cursor: default;\n\n opacity: 0.5;\n\n pointer-events: none;\n}\n.Button-module_root__RpsiW > span:first-child {\n margin-right: 4px;\n}\n.Button-module_root__RpsiW > span:last-child {\n margin-left: 4px;\n}\n.Button-module_gold__ZMYg- {\n background: #b88b59;\n}\n.Button-module_gold__ZMYg-.Button-module_isLoading__1g6QO {\n fill: #b88b59;\n}\n.Button-module_gold__ZMYg-:hover {\n background-color: #9e784c\n}\n@media (hover: none) {\n.Button-module_gold__ZMYg-:hover {\n background-color: #b88b59\n}\n }\n.Button-module_gold__ZMYg-:active {\n background-color: #856440;\n}\n.Button-module_gray__3IM54 {\n color: #000;\n\n background-color: #f0f0f0;\n}\n.Button-module_gray__3IM54.Button-module_isLoading__1g6QO {\n fill: #545454;\n}\n.Button-module_gray__3IM54:hover {\n background-color: #ebebeb\n}\n@media (hover: none) {\n.Button-module_gray__3IM54:hover {\n background-color: #ebebeb\n}\n }\n.Button-module_gray__3IM54:active {\n background-color: #e3e3e3;\n}\n.Button-module_sand__2AqVq {\n background: #a18c68;\n}\n.Button-module_sand__2AqVq.Button-module_isLoading__1g6QO {\n fill: #a18c68;\n}\n.Button-module_sand__2AqVq:hover {\n background-color: #8a7654\n}\n@media (hover: none) {\n.Button-module_sand__2AqVq:hover {\n background-color: #a18c68\n}\n }\n.Button-module_sand__2AqVq:active {\n background-color: #7b6743;\n}\n.Button-module_dark__I0uXx {\n color: #adadad;\n\n background-color: #3a3a3a;\n box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.4);\n}\n.Button-module_dark__I0uXx:hover {\n background-color: #2e2e2e\n}\n@media (hover: none) {\n.Button-module_dark__I0uXx:hover {\n background-color: #3a3a3a\n}\n }\n.Button-module_dark__I0uXx:active {\n background-color: #242424;\n}\n.Button-module_dark__I0uXx.Button-module_isLoading__1g6QO {\n fill: #3a3a3a;\n}\n.Button-module_light__1Y4hG {\n color: #000;\n\n background-color: #fff;\n}\n.Button-module_light__1Y4hG:hover {\n background-color: #ebebeb\n}\n@media (hover: none) {\n.Button-module_light__1Y4hG:hover {\n background-color: #fff\n}\n }\n.Button-module_light__1Y4hG:active {\n background-color: #e3e3e3;\n}\n.Button-module_light__1Y4hG.Button-module_isLoading__1g6QO {\n fill: #fff;\n}\n.Button-module_black__3sG3Y {\n color: #7e7d7b;\n\n background-color: #000;\n}\n.Button-module_black__3sG3Y.Button-module_isLoading__1g6QO {\n fill: #7e7d7b;\n}\n.Button-module_black__3sG3Y:hover {\n background-color: #141414\n}\n@media (hover: none) {\n.Button-module_black__3sG3Y:hover {\n background: #141414\n}\n }\n.Button-module_black__3sG3Y:active {\n background-color: #242424;\n}\n.Button-module_red__3Niou {\n background-color: #f95a5a;\n}\n.Button-module_red__3Niou:hover {\n background-color: #e65353\n}\n@media (hover: none) {\n.Button-module_red__3Niou:hover {\n background: #f95a5a\n}\n }\n.Button-module_red__3Niou:active {\n background-color: #d44d4d;\n}\n.Button-module_red__3Niou.Button-module_isLoading__1g6QO {\n fill: #141414;\n}\n.Button-module_default__28Vo_ {\n width: 100%;\n height: 42px;\n padding: 7px 18px 6px;\n\n font-weight: 600;\n\n font-size: 12px;\n line-height: 22px;\n\n letter-spacing: 1px;\n text-transform: uppercase;\n\n border-radius: 8px\n}\n@media only screen and (min-device-width: 64em) {\n.Button-module_default__28Vo_ {\n font-size: 14px;\n line-height: 16px\n}\n }\n.Button-module_isInSpoiler__2Yl8c svg {\n margin-top: -2px;\n margin-left: 6px;\n}\n.Button-module_ghost__3awCW {\n\n color: inherit;\n font-weight: inherit;\n font-size: inherit;\n\n font-family: inherit;\n letter-spacing: inherit;\n text-transform: none;\n\n background-color: transparent;\n}\n.Button-module_isInDropdown__1ogKL {\n font-family: 'Proxima Nova', 'Arial', 'Helvetica Neue', sans-serif;\n}\n.Button-module_black__3sG3Y[disabled],\n.Button-module_sand__2AqVq[disabled] {\n opacity: 0.3;\n}\n/* LOADING */\n.Button-module_root__RpsiW.Button-module_isLoading__1g6QO {\n\n background-color: transparent;\n box-shadow: none;\n cursor: default;\n\n pointer-events: none;\n}\n.Button-module_loader__2pl6d {\n display: block;\n\n margin-top: -1px;\n}\n";
70
48
  var styles = {"root":"Button-module_root__RpsiW","gold":"Button-module_gold__ZMYg-","isLoading":"Button-module_isLoading__1g6QO","gray":"Button-module_gray__3IM54","sand":"Button-module_sand__2AqVq","dark":"Button-module_dark__I0uXx","light":"Button-module_light__1Y4hG","black":"Button-module_black__3sG3Y","red":"Button-module_red__3Niou","default":"Button-module_default__28Vo_","isInSpoiler":"Button-module_isInSpoiler__2Yl8c","ghost":"Button-module_ghost__3awCW","isInDropdown":"Button-module_isInDropdown__1ogKL","loader":"Button-module_loader__2pl6d"};
71
- styleInject(css_248z);
72
49
 
73
50
  var Button = function Button(_ref) {
74
51
  var _ref$theme = _ref.theme,
@@ -76,7 +53,7 @@ var Button = function Button(_ref) {
76
53
  _ref$size = _ref.size,
77
54
  size = _ref$size === void 0 ? 'default' : _ref$size,
78
55
  _ref$state = _ref.state,
79
- state = _ref$state === void 0 ? 'default' : _ref$state,
56
+ state = _ref$state === void 0 ? 'isDefault' : _ref$state,
80
57
  _ref$styleContext = _ref.styleContext,
81
58
  styleContext = _ref$styleContext === void 0 ? 'isInToolbar' : _ref$styleContext,
82
59
  _ref$disabled = _ref.disabled,
@@ -92,16 +69,2187 @@ var Button = function Button(_ref) {
92
69
  onClick();
93
70
  };
94
71
 
95
- return React.createElement("button", {
72
+ return React__default.createElement("button", {
96
73
  "data-testid": "button",
97
74
  className: makeClassName([[styles.root, true], [styles[size], !!size], [styles[theme], !!theme], [styles[state], !!state && !!styles[state]], [styles[styleContext], !!styleContext]]),
98
75
  disabled: disabled,
99
76
  onClick: handleClick,
100
77
  type: "button"
101
- }, state === 'isLoading' ? React.createElement("span", {
78
+ }, state === 'isLoading' ? React__default.createElement("span", {
102
79
  className: styles.loader
103
- }, React.createElement(Loader, null)) : children);
80
+ }, React__default.createElement(Loader, null)) : children);
81
+ };
82
+
83
+ var styles$1 = {"root":"SvgSymbol-module_root__2CsRW","small":"SvgSymbol-module_small__2g6oR","normal":"SvgSymbol-module_normal__9lFn1","medium":"SvgSymbol-module_medium__2eF5L","large":"SvgSymbol-module_large__2kQrt","adaptive":"SvgSymbol-module_adaptive__3_68T","fb":"SvgSymbol-module_fb__1whmw","vk":"SvgSymbol-module_vk__3VEuu","ok":"SvgSymbol-module_ok__2_1Qb","tw":"SvgSymbol-module_tw__2VRG5","tg":"SvgSymbol-module_tg__2xe2f","reaction":"SvgSymbol-module_reaction__rrJvf","card":"SvgSymbol-module_card__1XAqw","podcast":"SvgSymbol-module_podcast__3oPoo","read":"SvgSymbol-module_read__2V82i","listened":"SvgSymbol-module_listened__1oMFV","menu":"SvgSymbol-module_menu__2iYFt","cross":"SvgSymbol-module_cross__J2lCN","isInFeature":"SvgSymbol-module_isInFeature__cDeTI","isInCard":"SvgSymbol-module_isInCard__pKq4e","isInTopicBlockItem":"SvgSymbol-module_isInTopicBlockItem__3Te91","isInPageStatic":"SvgSymbol-module_isInPageStatic__H31Rd","isInMaterialMeta":"SvgSymbol-module_isInMaterialMeta__2IbAw","isInAudioPlayer":"SvgSymbol-module_isInAudioPlayer__2xlzW","isInEpisodeBlock":"SvgSymbol-module_isInEpisodeBlock__2vY3o","isInButtonPlaybackRate":"SvgSymbol-module_isInButtonPlaybackRate__1L3TW","isInButtonBackward":"SvgSymbol-module_isInButtonBackward__1Grf9","isInButtonForward":"SvgSymbol-module_isInButtonForward__D1AFL","isInToolbar":"SvgSymbol-module_isInToolbar__3SaIh","play":"SvgSymbol-module_play__pM-qY","meduzaLogo":"SvgSymbol-module_meduzaLogo__2Ouzp","arrow":"SvgSymbol-module_arrow__11naX","oil":"SvgSymbol-module_oil__hvHE5","search":"SvgSymbol-module_search__VK6p3","user":"SvgSymbol-module_user__1MGim","bookmark":"SvgSymbol-module_bookmark__2z7tX","receipt":"SvgSymbol-module_receipt__3Eqow","isInHeader":"SvgSymbol-module_isInHeader__1QHjL"};
84
+
85
+ var icons = {
86
+ meduzaLogo: {
87
+ width: 544,
88
+ height: 115,
89
+ 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" />'
90
+ },
91
+ menu: {
92
+ width: 24,
93
+ height: 24,
94
+ content: '<path d="M2 21h20M2 12h20M2 3h20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" vector-effect="non-scaling-stroke" />'
95
+ },
96
+ fb: {
97
+ width: 16,
98
+ height: 18,
99
+ 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" />'
100
+ },
101
+ tw: {
102
+ width: 20,
103
+ height: 18,
104
+ 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"/>'
105
+ },
106
+ vk: {
107
+ width: 20,
108
+ height: 18,
109
+ 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"/>'
110
+ },
111
+ ok: {
112
+ width: 9,
113
+ height: 18,
114
+ 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"/>'
115
+ },
116
+ tg: {
117
+ width: 18,
118
+ height: 18,
119
+ 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"/>'
120
+ },
121
+ meduzaSymbol: {
122
+ width: 24,
123
+ height: 18,
124
+ 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" />'
125
+ },
126
+ backward: {
127
+ width: 25,
128
+ height: 27,
129
+ 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"/>'
130
+ },
131
+ forward: {
132
+ width: 25,
133
+ height: 27,
134
+ 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"/>'
135
+ },
136
+ download: {
137
+ width: 25,
138
+ height: 27,
139
+ 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" />'
140
+ },
141
+ play: {
142
+ width: 62,
143
+ height: 62,
144
+ 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"/>'
145
+ },
146
+ pause: {
147
+ width: 22,
148
+ height: 22,
149
+ 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" />'
150
+ },
151
+ speedHalf: {
152
+ width: 25,
153
+ height: 27,
154
+ content: '<path d="M7.212 15.198V12.29l-.676.724L6 12.406 7.35 11h.825v4.198h-.963zM8.056 18H7.3l4.23-7h.765l-4.24 7zm2.99 0v-.735c1.717-1.27 2.134-1.679 2.134-2.14 0-.389-.288-.578-.665-.578-.467 0-.884.263-1.083.525l-.496-.64c.417-.493 1.053-.693 1.599-.693.913 0 1.599.462 1.599 1.312 0 .682-.556 1.28-1.708 2.14h1.737V18h-3.118zm5.998-2.918l-1.39 1.48-.567-.577 1.4-1.49-1.4-1.48.566-.588 1.39 1.49 1.4-1.49.557.588-1.4 1.48 1.4 1.49-.556.577-1.4-1.48z" /><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" />'
155
+ },
156
+ speedOne: {
157
+ width: 25,
158
+ height: 27,
159
+ content: '<path d="M9.955 18v-4.84l-1.11 1.13-.81-.85 2.1-2.11h1.24V18h-1.42zm4.6-2.78l-1.4 1.41-.57-.55 1.41-1.42-1.41-1.41.57-.56 1.4 1.42 1.41-1.42.56.56-1.41 1.41 1.41 1.42-.56.55-1.41-1.41z" fill-rule="nonzero"/><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" fill-rule="nonzero"/>'
160
+ },
161
+ speedOneHalf: {
162
+ width: 25,
163
+ height: 27,
164
+ content: '<path d="M5.62 18v-4.84l-1.11 1.13-.81-.85 2.1-2.11h1.24V18H5.62zm3.37-2.67v-2.77l-.68.69-.54-.58 1.36-1.34h.83v4h-.97zM9.84 18h-.76l4.26-6.67h.77L9.84 18zm3.01 0v-.7c1.73-1.21 2.15-1.6 2.15-2.04 0-.37-.29-.55-.67-.55-.47 0-.89.25-1.09.5l-.5-.61c.42-.47 1.06-.66 1.61-.66.92 0 1.61.44 1.61 1.25 0 .65-.56 1.22-1.72 2.04h1.75V18h-3.14zm6.04-2.78l-1.4 1.41-.57-.55 1.41-1.42-1.41-1.41.57-.56 1.4 1.42 1.41-1.42.56.56-1.41 1.41 1.41 1.42-.56.55-1.41-1.41z" fill-rule="nonzero"/><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" fill-rule="nonzero"/>'
165
+ },
166
+ speedTwo: {
167
+ width: 25,
168
+ height: 27,
169
+ content: '<path d="M7.147 18v-1.158c2.685-2.078 3.471-2.792 3.471-3.64 0-.6-.52-.9-1.061-.9-.748 0-1.318.311-1.76.797L7 12.127C7.64 11.352 8.613 11 9.527 11c1.396 0 2.507.827 2.507 2.202 0 1.18-.924 2.203-2.625 3.506h2.675V18H7.147zm7.916-2.874l-1.377 1.457-.56-.568 1.386-1.468-1.386-1.458.56-.58 1.377 1.469 1.386-1.468.551.579-1.386 1.458L17 16.015l-.55.568-1.387-1.457z" fill-rule="nonzero"/><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" fill-rule="nonzero"/>'
170
+ },
171
+ podcastBookmark: {
172
+ width: 25,
173
+ height: 27,
174
+ 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" />'
175
+ },
176
+ reaction: {
177
+ width: 16,
178
+ height: 16,
179
+ 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" />'
180
+ },
181
+ cross: {
182
+ width: 18,
183
+ height: 18,
184
+ 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" />'
185
+ },
186
+ link: {
187
+ width: 24,
188
+ height: 24,
189
+ 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" />'
190
+ },
191
+ search: {
192
+ width: 16,
193
+ height: 16,
194
+ 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>'
195
+ },
196
+ card: {
197
+ width: 15,
198
+ height: 15,
199
+ 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"/>'
200
+ },
201
+ podcast: {
202
+ width: 15,
203
+ height: 15,
204
+ 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" />'
205
+ },
206
+ arrow: {
207
+ width: 12,
208
+ height: 12,
209
+ 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" />'
210
+ },
211
+ brent: {
212
+ width: 9,
213
+ height: 12,
214
+ 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> '
215
+ },
216
+ user: {
217
+ width: 16,
218
+ height: 16,
219
+ 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" />'
220
+ },
221
+ bookmark: {
222
+ width: 17,
223
+ height: 21,
224
+ content: '<path d="M16 20l-7.5-6.333L1 20V1h15z" stroke="currentColor" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"/>'
225
+ },
226
+ receipt: {
227
+ width: 10,
228
+ height: 13,
229
+ 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>'
230
+ },
231
+ read: {
232
+ width: 15,
233
+ height: 15,
234
+ 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>'
235
+ },
236
+ listened: {
237
+ width: 15,
238
+ height: 15,
239
+ 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>'
240
+ }
241
+ };
242
+
243
+ var SvgSymbol = function SvgSymbol(_ref) {
244
+ var icon = _ref.icon,
245
+ size = _ref.size,
246
+ styleContext = _ref.styleContext;
247
+ var data = icons[icon];
248
+ return React__default.createElement("svg", {
249
+ "data-testid": "svg-symbol",
250
+ xmlns: "http://www.w3.org/2000/svg",
251
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
252
+ className: makeClassName([[styles$1.root, true], [styles$1[size], !!styles$1[size]], [styles$1[icon], !!styles$1[icon]], [styles$1[styleContext], !!styles$1[styleContext]]]),
253
+ width: data.width,
254
+ height: data.height,
255
+ viewBox: "0 0 " + data.width + " " + data.height,
256
+ dangerouslySetInnerHTML: {
257
+ __html: data.content
258
+ }
259
+ });
260
+ };
261
+
262
+ var styles$2 = {"root":"Switcher-module_root__1Env1","dark":"Switcher-module_dark__1IzaH","control":"Switcher-module_control__1NTvY","input":"Switcher-module_input__jaMVF","knob":"Switcher-module_knob__3kEy5","children":"Switcher-module_children__147JP","left":"Switcher-module_left__2coeE","right":"Switcher-module_right__yWG7h","isInPanel":"Switcher-module_isInPanel__TumqY","isInMenu":"Switcher-module_isInMenu__3XJYj","isInLive":"Switcher-module_isInLive__2cLui"};
263
+
264
+ var Switcher = function Switcher(_ref) {
265
+ var enabled = _ref.enabled,
266
+ children = _ref.children,
267
+ _ref$childrenPosition = _ref.childrenPosition,
268
+ childrenPosition = _ref$childrenPosition === void 0 ? 'left' : _ref$childrenPosition,
269
+ onChange = _ref.onChange,
270
+ styleContext = _ref.styleContext,
271
+ _ref$theme = _ref.theme,
272
+ theme = _ref$theme === void 0 ? 'light' : _ref$theme;
273
+ return React__default.createElement("label", {
274
+ "data-testid": "switcher",
275
+ className: makeClassName([[styles$2.root, true], [styles$2[theme], !!styles$2[theme]], [styles$2[styleContext], !!styles$2[styleContext]]])
276
+ }, children && childrenPosition === 'left' && React__default.createElement("div", {
277
+ className: makeClassName([[styles$2.children, true], [styles$2.left, true]])
278
+ }, children), React__default.createElement("input", {
279
+ className: styles$2.input,
280
+ type: "checkbox",
281
+ checked: enabled,
282
+ onChange: onChange
283
+ }), React__default.createElement("span", {
284
+ className: styles$2.control
285
+ }, React__default.createElement("span", {
286
+ className: styles$2.knob
287
+ })), children && childrenPosition === 'right' && React__default.createElement("div", {
288
+ className: makeClassName([[styles$2.children, true], [styles$2.right, true]])
289
+ }, children));
290
+ };
291
+
292
+ var BlockContext = /*#__PURE__*/React__default.createContext({
293
+ lightBox: null
294
+ });
295
+ var BlockProvider = BlockContext.Provider;
296
+
297
+ var viewportSize = (function () {
298
+ return {
299
+ width: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
300
+ height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
301
+ };
302
+ });
303
+
304
+ var MediaQuerySizes = {
305
+ MOBILE: 512,
306
+ PORTRAIT_TABLET: 768,
307
+ LANDSCAPE_TABLET: 1024,
308
+ DESKTOP: 1010,
309
+ WIDE_DESKTOP: 1200
310
+ };
311
+ var imageBreakpoints = {
312
+ 325: '(min-width: 0)',
313
+ 520: '(min-width: 325px)',
314
+ 600: '(min-width: 600px)',
315
+ 650: '(min-width: 650px)',
316
+ 980: '(min-width: 1000px)',
317
+ 1335: '(min-width: 1000px)'
318
+ };
319
+ var imageConditionalKeys = {
320
+ xs: [325],
321
+ superFull: [1335, 650, 520, 325],
322
+ full: [980, 650, 520, 325],
323
+ "default": [650, 520, 325],
324
+ narrow: [600, 325]
325
+ };
326
+
327
+ var styles$3 = {"root":"Lazy-module_root__2Z72l","visible":"Lazy-module_visible__3-SdX"};
328
+
329
+ var Lazy = function Lazy(_ref) {
330
+ var children = _ref.children,
331
+ threshold = _ref.threshold;
332
+
333
+ var _useInView = reactIntersectionObserver.useInView({
334
+ threshold: threshold || 0
335
+ }),
336
+ ref = _useInView[0],
337
+ inView = _useInView[1],
338
+ entry = _useInView[2];
339
+
340
+ var _useState = React.useState(false),
341
+ visible = _useState[0],
342
+ setVisible = _useState[1];
343
+
344
+ React.useEffect(function () {
345
+ if (entry && entry.boundingClientRect && entry.boundingClientRect.y < 0) {
346
+ setVisible(true);
347
+ }
348
+ }, [entry]);
349
+ React.useEffect(function () {
350
+ if (inView) {
351
+ setVisible(true);
352
+ }
353
+ }, [inView]);
354
+ return React__default.createElement("div", {
355
+ className: makeClassName([[styles$3.root, true], [styles$3.visible, visible]]),
356
+ ref: ref,
357
+ "data-testid": "lazy"
358
+ }, visible && children);
359
+ };
360
+
361
+ var toCamel = function toCamel(s) {
362
+ return s.replace(/([_][a-z])/gi, function (str) {
363
+ return str.toUpperCase().replace('_', '');
364
+ });
365
+ };
366
+
367
+ var RenderPicture = function RenderPicture(_ref) {
368
+ var source = _ref.source,
369
+ fallbackSource = _ref.fallbackSource,
370
+ optimized = _ref.optimized,
371
+ alt = _ref.alt,
372
+ display = _ref.display;
373
+
374
+ var _useState = React.useState(false),
375
+ fallback = _useState[0],
376
+ setFallback = _useState[1];
377
+
378
+ React.useEffect(function () {
379
+ setFallback(!window.HTMLPictureElement);
380
+ }, []);
381
+ var keys = imageConditionalKeys[toCamel(display)] || imageConditionalKeys["default"];
382
+ return React__default.createElement("picture", null, source && React__default.createElement("source", {
383
+ media: "(min-width: 325px)",
384
+ srcSet: source[1] + " 2x"
385
+ }), optimized && !optimized.w325 && React__default.createElement("source", {
386
+ media: "(min-width: 0)",
387
+ srcSet: "" + optimized.original
388
+ }), optimized && keys.map(function (key) {
389
+ var breakpoint = optimized["w" + key];
390
+
391
+ if (!breakpoint) {
392
+ return null;
393
+ }
394
+
395
+ return React__default.createElement(React__default.Fragment, {
396
+ key: key
397
+ }, React__default.createElement("source", {
398
+ type: "image/webp",
399
+ media: imageBreakpoints[key],
400
+ srcSet: breakpoint['2x_webp'] + " 2x, " + breakpoint['1x_webp'] + " 1x "
401
+ }), React__default.createElement("source", {
402
+ type: "image/png",
403
+ media: imageBreakpoints[key],
404
+ srcSet: breakpoint['2x'] + " 2x, " + breakpoint['1x'] + " 1x "
405
+ }));
406
+ }), React__default.createElement("img", {
407
+ src: fallback ? fallbackSource : 'data:image/gif;base64,R0lGODlhAQABAPAAAPLy8gAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==',
408
+ alt: alt
409
+ }));
410
+ };
411
+
412
+ var styles$4 = {"root":"Image-module_root__1vsA_","placeholder":"Image-module_placeholder__1p4ob","wrapper":"Image-module_wrapper__3fLjs","loaded":"Image-module_loaded__w9FVT","fullscreen":"Image-module_fullscreen__29apx"};
413
+
414
+ var Image = function Image(_ref) {
415
+ var alt = _ref.alt,
416
+ display = _ref.display,
417
+ optimized = _ref.optimized,
418
+ width = _ref.width,
419
+ height = _ref.height,
420
+ source = _ref.source,
421
+ lazy = _ref.lazy,
422
+ fullscreen = _ref.fullscreen,
423
+ ratio = _ref.ratio;
424
+
425
+ var _useContext = React.useContext(BlockContext),
426
+ lightBox = _useContext.lightBox;
427
+
428
+ var handleClick = function handleClick() {
429
+ var _viewportSize = viewportSize(),
430
+ viewportWidth = _viewportSize.width;
431
+
432
+ if (optimized && !optimized.original || !lightBox || viewportWidth >= MediaQuerySizes.LANDSCAPE_TABLET && !fullscreen) {
433
+ return;
434
+ }
435
+
436
+ postMessage('fullscreen_click', 'click');
437
+ lightBox.show(optimized, width, height, alt);
438
+ };
439
+
440
+ var pictureStyles = {
441
+ paddingBottom: 100 / (ratio || width / height) + "%"
442
+ };
443
+ var blockStyles = {
444
+ maxWidth: width <= 649 ? width : '100%'
445
+ };
446
+ /* fallback w325 url until w6 was released */
447
+
448
+ var fallbackSource = source && source[0] || optimized.w325 && optimized.w325['1x'] || optimized.original;
449
+ return React__default.createElement("div", {
450
+ className: makeClassName([[styles$4.root, true], [styles$4.fullscreen, fullscreen]]),
451
+ style: blockStyles,
452
+ "data-testid": "image"
453
+ }, React__default.createElement("div", {
454
+ className: styles$4.wrapper,
455
+ style: pictureStyles,
456
+ onClick: function onClick() {
457
+ return handleClick();
458
+ },
459
+ onKeyPress: function onKeyPress() {
460
+ return handleClick();
461
+ },
462
+ role: "button",
463
+ tabIndex: 0
464
+ }, lazy ? React__default.createElement(React__default.Fragment, null, React__default.createElement(Lazy, {
465
+ threshold: 0.25
466
+ }, React__default.createElement(RenderPicture, {
467
+ fallbackSource: fallbackSource,
468
+ source: source,
469
+ optimized: optimized,
470
+ alt: alt,
471
+ display: display
472
+ })), React__default.createElement("noscript", null, React__default.createElement("img", {
473
+ src: fallbackSource,
474
+ alt: alt
475
+ }))) : React__default.createElement(RenderPicture, {
476
+ fallbackSource: fallbackSource,
477
+ source: source,
478
+ optimized: optimized,
479
+ alt: alt,
480
+ display: display
481
+ })));
482
+ };
483
+
484
+ var styles$5 = {"root":"DotsOnImage-module_root__2XP3Q","dot":"DotsOnImage-module_dot__H1wua","popover":"DotsOnImage-module_popover__35Cpj","popoverTitle":"DotsOnImage-module_popoverTitle__343d8"};
485
+
486
+ var DotsOnImage = function DotsOnImage(_ref) {
487
+ var block = _ref.block;
488
+ var optimized = block.optimized,
489
+ width = block.width,
490
+ height = block.height,
491
+ credit = block.credit,
492
+ display = block.display,
493
+ dots = block.dots;
494
+
495
+ var _useState = React.useState({
496
+ title: null,
497
+ body: null,
498
+ show: false,
499
+ id: null
500
+ }),
501
+ popover = _useState[0],
502
+ setPopover = _useState[1];
503
+
504
+ var handleDotClick = function handleDotClick(dot) {
505
+ var shouldShow = dot.id !== popover.id;
506
+ setPopover({
507
+ title: dot.title,
508
+ body: dot.body,
509
+ show: shouldShow,
510
+ id: shouldShow ? dot.id : null
511
+ });
512
+ };
513
+
514
+ return React__default.createElement("div", {
515
+ "data-testid": "dots-on-image",
516
+ className: makeClassName([[styles$5.root, true]])
517
+ }, React__default.createElement("div", {
518
+ className: styles$5.dots
519
+ }, dots.map(function (dot) {
520
+ return React__default.createElement("button", {
521
+ className: styles$5.dot,
522
+ type: "button",
523
+ key: dot.id,
524
+ style: {
525
+ top: dot.position.y + "%",
526
+ left: dot.position.x + "%",
527
+ backgroundColor: dot.icon.color
528
+ },
529
+ onClick: function onClick() {
530
+ return handleDotClick(dot);
531
+ }
532
+ }, dot.icon.type === 'svg' && React__default.createElement("div", {
533
+ className: styles$5.icon,
534
+ dangerouslySetInnerHTML: {
535
+ __html: dot.icon.svg_string
536
+ }
537
+ }), dot.icon.type === 'number' && dot.icon.number);
538
+ })), React__default.createElement("div", {
539
+ className: styles$5.image
540
+ }, React__default.createElement(Image, {
541
+ optimized: optimized,
542
+ width: width,
543
+ height: height,
544
+ alt: credit,
545
+ display: display
546
+ })), popover.show && React__default.createElement("div", {
547
+ className: styles$5.popover
548
+ }, React__default.createElement("div", {
549
+ className: styles$5.popoverTitle
550
+ }, popover.title), React__default.createElement("div", {
551
+ className: styles$5.popoverBody,
552
+ dangerouslySetInnerHTML: {
553
+ __html: popover.body
554
+ }
555
+ })));
556
+ };
557
+
558
+ var makeStyleContext = function makeStyleContext(classNames, styleContext, styles) {
559
+ var context = Array.isArray(styleContext) ? styleContext.filter(function (ctx) {
560
+ return styles[ctx];
561
+ }).map(function (ctx) {
562
+ return [[styles[ctx]], true];
563
+ }) : [[styles[styleContext], !!styleContext && !!styles[styleContext]]];
564
+ return classNames.concat(context);
565
+ };
566
+
567
+ var styles$6 = {"root":"Tag-module_root__3IqWC","small":"Tag-module_small__2IAb7","large":"Tag-module_large__22z_o","dark":"Tag-module_dark__sgnt1","light":"Tag-module_light__1zUhp","gold":"Tag-module_gold__2ksA7","gray":"Tag-module_gray__mGAO_","inherit":"Tag-module_inherit__2QB5U","is1to1":"Tag-module_is1to1__3EDbC","is1to2":"Tag-module_is1to2__3xbC6","isInSuperBlock":"Tag-module_isInSuperBlock__38JE0","is1to3":"Tag-module_is1to3__3j5K-","is1to4":"Tag-module_is1to4__2vq4r","slide":"Tag-module_slide__2nMDw","game":"Tag-module_game__3j5yG","card":"Tag-module_card__1EAeF","live":"Tag-module_live__rwXuR","episode":"Tag-module_episode__3o6gg","podcast":"Tag-module_podcast__VPoll","rich":"Tag-module_rich__2URd9","isInDynamicBlock":"Tag-module_isInDynamicBlock__1YM9I","mobile":"Tag-module_mobile__QQxuv","desktop":"Tag-module_desktop__1Bjsy"};
568
+
569
+ var Tag = function Tag(_ref) {
570
+ var children = _ref.children,
571
+ _ref$size = _ref.size,
572
+ size = _ref$size === void 0 ? 'small' : _ref$size,
573
+ _ref$theme = _ref.theme,
574
+ theme = _ref$theme === void 0 ? 'gold' : _ref$theme,
575
+ styleContext = _ref.styleContext,
576
+ correlation = _ref.correlation,
577
+ onlyOn = _ref.onlyOn;
578
+ var classNames = [[styles$6.root, true], [styles$6[size], !!size && !!styles$6[size]], [styles$6[theme], !!theme && !!styles$6[theme]], [styles$6[onlyOn], !!onlyOn && !!styles$6[onlyOn]], [styles$6[correlation], !!correlation && !!styles$6[correlation]]];
579
+
580
+ if (styleContext) {
581
+ classNames = makeStyleContext(classNames, styleContext, styles$6);
582
+ }
583
+
584
+ return React__default.createElement("div", {
585
+ "data-testid": "tag",
586
+ className: makeClassName(classNames)
587
+ }, children);
588
+ };
589
+
590
+ var styles$7 = {"root":"MediaCaption-module_root__KqTdw","caption":"MediaCaption-module_caption__1hr7Y","credit":"MediaCaption-module_credit__3ehAP","dark":"MediaCaption-module_dark__3tL1u","video":"MediaCaption-module_video__1KZ6k","picture":"MediaCaption-module_picture__3AAMH","desktop":"MediaCaption-module_desktop__3Saev"};
591
+
592
+ var MediaCaption = function MediaCaption(_ref) {
593
+ var credit = _ref.credit,
594
+ caption = _ref.caption,
595
+ styleContext = _ref.styleContext;
596
+ var classNames = [[styles$7.root, true]];
597
+
598
+ if (styleContext) {
599
+ classNames = makeStyleContext(classNames, styleContext, styles$7);
600
+ }
601
+
602
+ return React__default.createElement("div", {
603
+ "data-testid": "media-caption",
604
+ className: makeClassName(classNames)
605
+ }, caption && React__default.createElement("div", {
606
+ className: styles$7.caption,
607
+ dangerouslySetInnerHTML: {
608
+ __html: caption
609
+ }
610
+ }), credit && React__default.createElement("div", {
611
+ className: styles$7.credit,
612
+ dangerouslySetInnerHTML: {
613
+ __html: credit
614
+ }
615
+ }));
616
+ };
617
+
618
+ var styles$8 = {"root":"Table-module_root__1VsG6","card":"Table-module_card__3gbok","table":"Table-module_table__nZIkV","slide":"Table-module_slide__nSGPC","wrapper":"Table-module_wrapper__1YTKM","tracks":"Table-module_tracks__2wrDB","default":"Table-module_default__3CGeE","full":"Table-module_full__S5pDB","row":"Table-module_row__3TH83","cell":"Table-module_cell__EFKDW","fixedColumn":"Table-module_fixedColumn__E1hN5","white":"Table-module_white__gzvo0","gray":"Table-module_gray__3da6S","pink":"Table-module_pink__3oH1l","blue":"Table-module_blue__GM27F","yellow":"Table-module_yellow__2jhvA","orange":"Table-module_orange__1c-oM","green":"Table-module_green__13OIM","violet":"Table-module_violet__2W-kO","header":"Table-module_header__1exlo","s":"Table-module_s__Vl_Eg","m":"Table-module_m__29G9r","l":"Table-module_l__1ZSMc","xs":"Table-module_xs__au2Oe"};
619
+
620
+ var Table = function Table(_ref) {
621
+ var styleContext = _ref.styleContext,
622
+ _ref$block = _ref.block,
623
+ rows = _ref$block.rows,
624
+ options = _ref$block.options,
625
+ display = _ref$block.display,
626
+ columnsWidth = _ref$block.columns_widths,
627
+ tableCredit = _ref$block.table_credit;
628
+ var colors = {
629
+ '#ffffff': 'white',
630
+ '#f5f5f5': 'gray',
631
+ '#feeeee': 'pink',
632
+ '#e6f3ff': 'blue',
633
+ '#fffde6': 'yellow',
634
+ '#fff9f2': 'orange',
635
+ '#e7f2ef': 'green',
636
+ '#f4f0f8': 'violet'
637
+ };
638
+ var classNames = [[styles$8.root, true], [styles$8[display], !!display && !!styles$8[display]]];
639
+
640
+ if (styleContext) {
641
+ classNames = makeStyleContext(classNames, styleContext, styles$8);
642
+ }
643
+
644
+ return React__default.createElement("div", {
645
+ "data-testid": "table",
646
+ className: makeClassName(classNames)
647
+ }, React__default.createElement("div", {
648
+ className: styles$8.wrapper
649
+ }, React__default.createElement("div", {
650
+ className: styles$8.table
651
+ }, React__default.createElement("div", {
652
+ className: styles$8.tracks
653
+ }, rows.map(function (row, i) {
654
+ return React__default.createElement("div", {
655
+ key: row.key,
656
+ className: styles$8.row
657
+ }, row.cells.map(function (cell, j) {
658
+ return React__default.createElement("div", {
659
+ key: cell.key,
660
+ className: makeClassName([[styles$8.cell, true], [styles$8.header, options.header && i === 0], [styles$8[colors[cell.color]], true], [styles$8[columnsWidth[j]], true], [styles$8.fixedColumn, options.fixed_first_column && j === 0]]),
661
+ dangerouslySetInnerHTML: {
662
+ __html: cell.val
663
+ }
664
+ });
665
+ }));
666
+ })))), tableCredit && React__default.createElement(MediaCaption, {
667
+ credit: tableCredit,
668
+ styleContext: styleContext
669
+ }));
670
+ };
671
+
672
+ var styles$9 = {"root":"MaterialNote-module_root__1AcYe","dark":"MaterialNote-module_dark__xCry-","note_credit":"MaterialNote-module_note_credit__PuFyX","note_caption":"MaterialNote-module_note_caption__1ezSo","center":"MaterialNote-module_center__18RxI","default":"MaterialNote-module_default__1lQPl","card":"MaterialNote-module_card__OWXbQ","slide":"MaterialNote-module_slide__1ZBBq","game":"MaterialNote-module_game__cADMe","gameSurvey":"MaterialNote-module_gameSurvey__3SiG-"};
673
+
674
+ var MaterialNote = function MaterialNote(_ref) {
675
+ var data = _ref.block.data,
676
+ styleContext = _ref.styleContext;
677
+ var classNames = [[styles$9.root, true]];
678
+
679
+ if (styleContext) {
680
+ classNames = makeStyleContext(classNames, styleContext, styles$9);
681
+ }
682
+
683
+ return React__default.createElement("div", {
684
+ "data-testid": "material-note",
685
+ className: makeClassName(classNames)
686
+ }, data && data.map(function (item) {
687
+ return React__default.createElement("p", {
688
+ className: styles$9[item.type],
689
+ key: item.id,
690
+ dangerouslySetInnerHTML: {
691
+ __html: item.data
692
+ }
693
+ });
694
+ }));
695
+ };
696
+
697
+ var styles$a = {"root":"BookmarkButton-module_root__3KmuY","control":"BookmarkButton-module_control__1A0ea","dark":"BookmarkButton-module_dark__1cwyi","light":"BookmarkButton-module_light__1uQyH","isInBookmarks":"BookmarkButton-module_isInBookmarks__1_5kB","isInGrid":"BookmarkButton-module_isInGrid__2pQ2B"};
698
+
699
+ var BookmarkButton = function BookmarkButton(_ref) {
700
+ var styleContext = _ref.styleContext,
701
+ theme = _ref.theme,
702
+ isInBookmarks = _ref.isInBookmarks,
703
+ _onClick = _ref.onClick;
704
+ var classNames = [[styles$a.root, true], [styles$a.isInBookmarks, isInBookmarks], [styles$a[theme], !!theme && !!styles$a[theme]]];
705
+
706
+ if (styleContext) {
707
+ classNames = makeStyleContext(classNames, styleContext, styles$a);
708
+ }
709
+
710
+ return React__default.createElement("div", {
711
+ "data-testid": "bookmark-button",
712
+ className: makeClassName(classNames)
713
+ }, React__default.createElement("button", {
714
+ className: styles$a.control,
715
+ onClick: function onClick() {
716
+ return _onClick();
717
+ },
718
+ type: "button"
719
+ }, React__default.createElement(SvgSymbol, {
720
+ icon: "bookmark",
721
+ size: "unset"
722
+ })));
723
+ };
724
+
725
+ var styles$b = {"root":"MaterialTitle-module_root__18ku-","primary":"MaterialTitle-module_primary__2Sfmx","secondary":"MaterialTitle-module_secondary__3uDp4"};
726
+
727
+ var Primary = function Primary(_ref) {
728
+ var children = _ref.children;
729
+ return React__default.createElement("span", {
730
+ className: styles$b.primary
731
+ }, children);
732
+ };
733
+ var Secondary = function Secondary(_ref2) {
734
+ var children = _ref2.children;
735
+ return React__default.createElement("span", {
736
+ className: styles$b.secondary
737
+ }, children);
738
+ };
739
+ var MaterialTitle = function MaterialTitle(_ref3) {
740
+ var children = _ref3.children;
741
+ return React__default.createElement("h1", {
742
+ className: styles$b.root,
743
+ "data-testid": "material-title"
744
+ }, children);
745
+ };
746
+
747
+ var styles$c = {"root":"Dropdown-module_root__11PNk","active":"Dropdown-module_active__3IwAl","menu":"Dropdown-module_menu__3PIqD","isInAudioPanel":"Dropdown-module_isInAudioPanel__1zv7F"};
748
+
749
+ var Menu = function Menu(_ref) {
750
+ var children = _ref.children;
751
+ return React__default.createElement("div", {
752
+ "data-testid": "dropdown",
753
+ className: styles$c.menu
754
+ }, children);
755
+ };
756
+ var Dropdown = function Dropdown(_ref2) {
757
+ var children = _ref2.children,
758
+ active = _ref2.active,
759
+ styleContext = _ref2.styleContext;
760
+ var classNames = [[styles$c.root, true], [styles$c.active, !!active && !!styles$c.active]];
761
+
762
+ if (styleContext) {
763
+ classNames = makeStyleContext(classNames, styleContext, styles$c);
764
+ }
765
+
766
+ return React__default.createElement("div", {
767
+ "data-testid": "dropdown",
768
+ className: makeClassName(classNames)
769
+ }, children);
770
+ };
771
+
772
+ var styles$d = {"root":"Toolbar-module_root__2HF2r","list":"Toolbar-module_list__1n5ny","item":"Toolbar-module_item__36x7d","isInTopbar":"Toolbar-module_isInTopbar__223iP","center":"Toolbar-module_center__3_H8M","game":"Toolbar-module_game__5-jY_","gameSurvey":"Toolbar-module_gameSurvey__1hQEz","dark":"Toolbar-module_dark__2Ejc9"};
773
+
774
+ var Toolbar = function Toolbar(_ref) {
775
+ var children = _ref.children,
776
+ styleContext = _ref.styleContext;
777
+ var classNames = [[styles$d.root, true]];
778
+
779
+ if (styleContext) {
780
+ classNames = makeStyleContext(classNames, styleContext, styles$d);
781
+ }
782
+
783
+ var renderItems = function renderItems() {
784
+ return React.Children.map(children, function (item, index) {
785
+ return React__default.createElement("li", {
786
+ className: styles$d.item,
787
+ key: index + "-" + item.props.type
788
+ }, React__default.cloneElement(item));
789
+ });
790
+ };
791
+
792
+ return React__default.createElement("div", {
793
+ "data-testid": "toolbar",
794
+ className: makeClassName(classNames)
795
+ }, React__default.createElement("ul", {
796
+ className: styles$d.list
797
+ }, renderItems()));
798
+ };
799
+
800
+ var styles$e = {"root":"Popover-module_root__1v6f_","fadeOut":"Popover-module_fadeOut__3EZhx","visible":"Popover-module_visible__eK5ZQ","fadeIn":"Popover-module_fadeIn__AkrSN","overlay":"Popover-module_overlay__2SBL0","container":"Popover-module_container__FnZT-","disappear":"Popover-module_disappear__3Q9LI","dismiss":"Popover-module_dismiss__3RnLj","background":"Popover-module_background__1KKaP","appear":"Popover-module_appear__37vPd"};
801
+
802
+ var Popover = function Popover(_ref) {
803
+ var children = _ref.children,
804
+ onClose = _ref.onClose;
805
+
806
+ var _useState = React.useState(true),
807
+ visible = _useState[0],
808
+ setVisible = _useState[1];
809
+
810
+ var handleClose = function handleClose() {
811
+ setVisible(false);
812
+ setTimeout(onClose, 350);
813
+ };
814
+
815
+ var handleScroll = function handleScroll() {
816
+ handleClose();
817
+ };
818
+
819
+ var escFunction = function escFunction(event) {
820
+ if (event.key === 'Escape') {
821
+ handleClose();
822
+ }
823
+ };
824
+
825
+ React.useEffect(function () {
826
+ window.addEventListener('keydown', escFunction, false);
827
+ window.addEventListener('scroll', handleScroll, false);
828
+ return function () {
829
+ window.removeEventListener('keydown', escFunction, false);
830
+ window.removeEventListener('scroll', handleScroll, false);
831
+ };
832
+ }, [visible]);
833
+ /* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */
834
+
835
+ return React__default.createElement("div", {
836
+ "data-testid": "popover",
837
+ className: makeClassName([[styles$e.root, true], [styles$e.visible, visible]])
838
+ }, React__default.createElement("div", {
839
+ className: styles$e.overlay,
840
+ onClick: function onClick() {
841
+ return handleClose();
842
+ }
843
+ }), React__default.createElement("div", {
844
+ className: styles$e.container
845
+ }, React__default.createElement("button", {
846
+ type: "button",
847
+ className: styles$e.dismiss,
848
+ onClick: function onClick() {
849
+ return handleClose();
850
+ },
851
+ "aria-label": "dismiss"
852
+ }), React__default.createElement("svg", {
853
+ width: "100%",
854
+ className: styles$e.background
855
+ }, React__default.createElement("defs", null, React__default.createElement("mask", {
856
+ id: "myMask",
857
+ x: "0",
858
+ y: "0",
859
+ width: "100%",
860
+ height: "100%"
861
+ }, React__default.createElement("rect", {
862
+ fill: "white",
863
+ y: "0",
864
+ width: "100%",
865
+ height: "100%",
866
+ x: "0"
867
+ }), React__default.createElement("svg", {
868
+ x: "50%",
869
+ overflow: "visible"
870
+ }, React__default.createElement("g", {
871
+ transform: "translate(-12 0)"
872
+ }, React__default.createElement("path", {
873
+ 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"
874
+ }))))), React__default.createElement("rect", {
875
+ fill: "#F7F7F7",
876
+ id: "base-mask",
877
+ mask: "url(#myMask)",
878
+ x: "0",
879
+ y: "0",
880
+ width: "100%",
881
+ height: "100%"
882
+ })), children));
883
+ };
884
+
885
+ var styles$f = {"root":"Meta-module_root__12AG7","rich":"Meta-module_rich__1XBtZ","podcast":"Meta-module_podcast__1m4zo","episode":"Meta-module_episode__1K2Xv","simple":"Meta-module_simple__3vUiI","slide":"Meta-module_slide__3g6fG","card":"Meta-module_card__LE1RK","game":"Meta-module_game__3aNlZ","isInMaterial":"Meta-module_isInMaterial__zaYMy","isInSearchItem":"Meta-module_isInSearchItem__1wbpx","center":"Meta-module_center__3BBPr","half":"Meta-module_half__1xRkT","light":"Meta-module_light__2baE-","dark":"Meta-module_dark__24y9m","hasSource":"Meta-module_hasSource__2lXiN","bookmark":"Meta-module_bookmark__3ot3k","mobile":"Meta-module_mobile__22LGV","desktop":"Meta-module_desktop__1ZGUS"};
886
+
887
+ var Meta = function Meta(_ref) {
888
+ var hasSource = _ref.hasSource,
889
+ theme = _ref.theme,
890
+ children = _ref.children,
891
+ onlyOn = _ref.onlyOn,
892
+ styleContext = _ref.styleContext;
893
+ var classNames = [[styles$f.root, true], [styles$f[theme], !!theme && !!styles$f[theme]], [styles$f[onlyOn], !!onlyOn], [styles$f.hasSource, hasSource]];
894
+
895
+ if (styleContext) {
896
+ classNames = makeStyleContext(classNames, styleContext, styles$f);
897
+ }
898
+
899
+ return React__default.createElement("div", {
900
+ "data-testid": "meta",
901
+ className: makeClassName(classNames)
902
+ }, children);
903
+ };
904
+
905
+ var styles$g = {"root":"Timestamp-module_root__coOvT"};
906
+
907
+ var Timestamp = function Timestamp(_ref) {
908
+ var publishedAt = _ref.publishedAt,
909
+ _ref$locale = _ref.locale,
910
+ locale = _ref$locale === void 0 ? 'ru' : _ref$locale,
911
+ type = _ref.type;
912
+ var published;
913
+ var timeFormat = locale === 'ru' ? 'HH:mm, D MMMM YYYY' : 'h:mm a, MMMM D, YYYY';
914
+ var preparedPublishedAt = publishedAt * 1000;
915
+ dayjs.locale(locale);
916
+ dayjs.extend(relativeTime);
917
+
918
+ if (type === 'fromNow') {
919
+ published = dayjs(preparedPublishedAt).fromNow();
920
+ } else if (type === 'format') {
921
+ published = dayjs(preparedPublishedAt).format('HH:mm');
922
+ } else if (type === 'date') {
923
+ published = dayjs(preparedPublishedAt).format(timeFormat);
924
+ } else {
925
+ throw new Error('Unknown time type');
926
+ }
927
+
928
+ return React__default.createElement("time", {
929
+ "data-testid": "timestamp",
930
+ className: styles$g.root
931
+ }, published);
932
+ };
933
+
934
+ var DangerousHTML = function DangerousHTML(_ref) {
935
+ var _ref$className = _ref.className,
936
+ className = _ref$className === void 0 ? '' : _ref$className,
937
+ _ref$tagName = _ref.tagName,
938
+ TagName = _ref$tagName === void 0 ? 'div' : _ref$tagName,
939
+ html = _ref.html;
940
+ var element = React.useRef(null);
941
+
942
+ var _useState = React.useState(false),
943
+ canRenderHtml = _useState[0],
944
+ setCanRenderHtml = _useState[1];
945
+
946
+ React.useEffect(function () {
947
+ setCanRenderHtml(true);
948
+ }, []);
949
+ var replaceScriptElementsRecursive = React.useCallback(function (node) {
950
+ if (node.tagName === 'SCRIPT' && (!node.id || node.id.indexOf('script-') !== 0)) {
951
+ var script = document.createElement('script');
952
+ script.id = "script-" + Math.random().toString(16).slice(2);
953
+ script.innerHTML = node.innerHTML;
954
+ var attrs = node.attributes;
955
+
956
+ for (var i = 0; i < attrs.length; i += 1) {
957
+ var _attrs$i = attrs[i],
958
+ name = _attrs$i.name,
959
+ value = _attrs$i.value;
960
+ script.setAttribute(name, value);
961
+ }
962
+
963
+ node.parentElement.replaceChild(script, node);
964
+ } else {
965
+ var _i = 0;
966
+ var children = node.childNodes;
967
+
968
+ while (_i < children.length) {
969
+ replaceScriptElementsRecursive(children[_i]);
970
+ _i += 1;
971
+ }
972
+ }
973
+ }, []);
974
+ var prepareAnchors = React.useCallback(function () {
975
+ var anchors = Array.from(element.current.querySelectorAll('a'));
976
+ anchors.forEach(function (a) {
977
+ a.setAttribute('target', '_blank');
978
+ });
979
+ }, []);
980
+ React.useEffect(function () {
981
+ if (canRenderHtml && html.indexOf('script') > -1 && element.current) {
982
+ element.current.innerHTML = html;
983
+ replaceScriptElementsRecursive(element.current);
984
+ prepareAnchors();
985
+ }
986
+ }, [canRenderHtml, element, html]);
987
+ return React__default.createElement(TagName // @ts-ignore
988
+ , {
989
+ // @ts-ignore
990
+ ref: element,
991
+ className: className,
992
+ dangerouslySetInnerHTML: {
993
+ __html: html
994
+ }
995
+ });
996
+ };
997
+
998
+ var styles$h = {"root":"EmbedBlock-module_root__28k9U","object":"EmbedBlock-module_object__2_UZ7","objectWrap":"EmbedBlock-module_objectWrap__1aDVd","proportional":"EmbedBlock-module_proportional__3lAv4","attachment":"EmbedBlock-module_attachment__2pE0t","default":"EmbedBlock-module_default__LSDny","xs":"EmbedBlock-module_xs__1hFgW","full":"EmbedBlock-module_full__1TEjx","super_full":"EmbedBlock-module_super_full__1Fn9A","figure":"EmbedBlock-module_figure__vAvcN","dark":"EmbedBlock-module_dark__1be2G","isInGroupedBlock":"EmbedBlock-module_isInGroupedBlock__3r_i-","gameEmbed":"EmbedBlock-module_gameEmbed__AZQSo","mobile":"EmbedBlock-module_mobile__1P-eo","desktop":"EmbedBlock-module_desktop__SF5a_","control":"EmbedBlock-module_control__xr8dZ","raw_html":"EmbedBlock-module_raw_html__MQoAA","youtube":"EmbedBlock-module_youtube__3gGQ5","vimeo":"EmbedBlock-module_vimeo__kpH1s","onetv":"EmbedBlock-module_onetv__3o33d","coub":"EmbedBlock-module_coub__38Mva","facebook_video":"EmbedBlock-module_facebook_video__1_M05","card":"EmbedBlock-module_card__KTbvp","slide":"EmbedBlock-module_slide__3cL3M","cc":"EmbedBlock-module_cc__1BQ5g","isInAnswer":"EmbedBlock-module_isInAnswer__tLlgs","picture":"EmbedBlock-module_picture__186q0","wrapper":"EmbedBlock-module_wrapper__33XvX"};
999
+
1000
+ var EmbedBlock = function EmbedBlock(_ref) {
1001
+ var block = _ref.block,
1002
+ _ref$block = _ref.block,
1003
+ data = _ref$block.data,
1004
+ _ref$block$data = _ref$block.data,
1005
+ display = _ref$block$data.display,
1006
+ onlyOn = _ref$block$data.only_on,
1007
+ provider = _ref$block$data.provider,
1008
+ cc = _ref$block$data.cc,
1009
+ optimized = _ref$block$data.optimized,
1010
+ small = _ref$block$data.small_url,
1011
+ large = _ref$block$data.large_url,
1012
+ styleContext = _ref.styleContext,
1013
+ children = _ref.children;
1014
+
1015
+ var _useState = React.useState(false),
1016
+ isPopoverShown = _useState[0],
1017
+ setIsPopoverShown = _useState[1];
1018
+
1019
+ var _useState2 = React.useState(false),
1020
+ videoFrozen = _useState2[0],
1021
+ setVideoFrozen = _useState2[1];
1022
+
1023
+ var videoElem = React.useRef(null);
1024
+ var wrapperElem = React.useRef(null);
1025
+
1026
+ var handleVideoTouch = function handleVideoTouch() {
1027
+ videoElem.current.play();
1028
+ setVideoFrozen(false);
1029
+ };
1030
+
1031
+ var handleVideoError = function handleVideoError() {
1032
+ var video = videoElem.current;
1033
+ video.setAttribute('poster', video.dataset.gif);
1034
+ setVideoFrozen(false);
1035
+ };
1036
+
1037
+ React.useEffect(function () {
1038
+ var video = videoElem.current;
1039
+
1040
+ if (block.type === 'gif' && video) {
1041
+ var _viewportSize = viewportSize(),
1042
+ viewportWidth = _viewportSize.width;
1043
+
1044
+ enableInlineVideo(video);
1045
+
1046
+ if (viewportWidth >= MediaQuerySizes.MOBILE) {
1047
+ video.setAttribute('autoplay', true);
1048
+ video.play();
1049
+ } else {
1050
+ setVideoFrozen(true);
1051
+ video.pause();
1052
+ video.addEventListener('touchstart', handleVideoTouch);
1053
+ }
1054
+
1055
+ video.addEventListener('error', handleVideoError);
1056
+ }
1057
+
1058
+ return function () {
1059
+ if (video) {
1060
+ video.removeEventListener('touchstart', handleVideoTouch);
1061
+ video.removeEventListener('error', handleVideoError);
1062
+ }
1063
+ };
1064
+ }, []);
1065
+
1066
+ var renderCC = function renderCC(context) {
1067
+ return React__default.createElement(MediaCaption, {
1068
+ credit: data.credit,
1069
+ caption: data.caption,
1070
+ styleContext: context || styleContext
1071
+ });
1072
+ };
1073
+
1074
+ var renderEmbed = function renderEmbed(style) {
1075
+ var html = block.data.html;
1076
+
1077
+ switch (block.type) {
1078
+ case 'gif':
1079
+ {
1080
+ return React__default.createElement("div", {
1081
+ className: styles$h.figure
1082
+ }, React__default.createElement("div", {
1083
+ className: styles$h.objectWrap,
1084
+ style: style,
1085
+ ref: wrapperElem,
1086
+ "data-frozen": videoFrozen
1087
+ }, React__default.createElement("video", {
1088
+ playsInline: true,
1089
+ muted: true,
1090
+ loop: true,
1091
+ autoPlay: true,
1092
+ preload: "metadata",
1093
+ "data-gif": block.data.gif_url,
1094
+ ref: videoElem
1095
+ }, React__default.createElement("source", {
1096
+ src: "https://meduza.io" + block.data.mp4_url,
1097
+ type: "video/mp4"
1098
+ }))));
1099
+ }
1100
+
1101
+ case 'image':
1102
+ {
1103
+ return React__default.createElement("div", {
1104
+ className: styles$h.figure
1105
+ }, (small || optimized) && React__default.createElement(Image, {
1106
+ fullscreen: block.data.fullscreen,
1107
+ source: !optimized && [small, large],
1108
+ optimized: block.data.optimized,
1109
+ width: block.data.width,
1110
+ height: block.data.height,
1111
+ alt: block.data.caption,
1112
+ display: block.data.display,
1113
+ lazy: block.data.lazy
1114
+ }));
1115
+ }
1116
+
1117
+ case 'game_embed':
1118
+ {
1119
+ return React__default.createElement("div", {
1120
+ className: styles$h.gameEmbed
1121
+ }, React__default.createElement("iframe", {
1122
+ src: block.data.game_src,
1123
+ id: block.data.game_id,
1124
+ title: "Game embed"
1125
+ }));
1126
+ }
1127
+
1128
+ default:
1129
+ {
1130
+ return React__default.createElement("div", {
1131
+ className: styles$h.object
1132
+ }, React__default.createElement("div", {
1133
+ className: styles$h.wrapper,
1134
+ style: style
1135
+ }, React__default.createElement(DangerousHTML, {
1136
+ className: styles$h.objectWrap,
1137
+ html: html
1138
+ })));
1139
+ }
1140
+ }
1141
+ };
1142
+
1143
+ var style = {};
1144
+ var isProportional; // @TODO: Разобраться зачем это было нужно
1145
+ // const className = Object.keys(styleContext)
1146
+ // .filter(key => key.startsWith('isIn') && styles[key])
1147
+ // .reduce((acc, key) => {
1148
+ // acc.push([styles[key], true])
1149
+ // return acc
1150
+ // }, [])
1151
+
1152
+ /* eslint-disable react/no-array-index-key, no-mixed-operators */
1153
+
1154
+ if (block.data.height && block.data.width) {
1155
+ style.paddingBottom = block.data.height / block.data.width * 100 + "%";
1156
+ style.height = 0;
1157
+ isProportional = true;
1158
+ }
1159
+
1160
+ var classNames = [[styles$h.root, true], [styles$h.cc, cc], [styles$h[display], !!display && styles$h[display]], [styles$h[provider], !!provider && !!styles$h[provider]], [styles$h[onlyOn], !!onlyOn && styles$h[onlyOn]], [styles$h.proportional, !!styles$h.proportional && isProportional]];
1161
+
1162
+ if (styleContext) {
1163
+ classNames = makeStyleContext(classNames, styleContext, styles$h);
1164
+ }
1165
+
1166
+ return React__default.createElement("figure", {
1167
+ className: makeClassName(classNames)
1168
+ }, children && React__default.createElement("div", {
1169
+ className: styles$h.object
1170
+ }, React__default.createElement("div", {
1171
+ className: styles$h.wrapper,
1172
+ style: style
1173
+ }, React__default.createElement("div", {
1174
+ className: styles$h.objectWrap
1175
+ }, children))), !children && renderEmbed(style), cc === 'default' && React__default.createElement("figcaption", null, renderCC()), cc === 'button' && React__default.createElement("button", {
1176
+ className: styles$h.control,
1177
+ type: "button",
1178
+ "aria-label": "Open",
1179
+ onClick: function onClick() {
1180
+ setIsPopoverShown(!isPopoverShown);
1181
+ }
1182
+ }), cc === 'button' && isPopoverShown && React__default.createElement(Popover, {
1183
+ onClose: function onClose() {
1184
+ setIsPopoverShown(false);
1185
+ }
1186
+ }, renderCC('isInPopover')));
1187
+ };
1188
+
1189
+ var IframeBlock = function IframeBlock(_ref) {
1190
+ var block = _ref.block,
1191
+ id = _ref.block.id,
1192
+ styleContext = _ref.styleContext,
1193
+ _ref$lang = _ref.lang,
1194
+ lang = _ref$lang === void 0 ? 'ru' : _ref$lang;
1195
+ var element = React.useRef(null);
1196
+
1197
+ var renderIframe = function renderIframe() {
1198
+ var rootEl = document.createElement('div');
1199
+ var contentEl = document.createElement('div');
1200
+ var scriptEl = document.createElement('script');
1201
+ var style = document.createElement('style');
1202
+ var range = document.createRange();
1203
+ range.setStart(contentEl, 0);
1204
+ contentEl.setAttribute('id', 'content');
1205
+ scriptEl.textContent = "\n function getDocHeight() {\n var doc = document;\n var body = doc.body;\n var html = doc.documentElement;\n var height = Math.max( body.scrollHeight, body.offsetHeight,\n html.clientHeight, html.scrollHeight, html.offsetHeight );\n\n doc.body.style.margin=\"0\";\n\n return document.getElementById('content') ? document.getElementById('content').offsetHeight : height;\n }\n\n function sendDocHeightMsg() {\n var height = getDocHeight();\n var message = JSON.stringify({\n action: {\n type: \"UPDATE_HEIGHT\",\n payload: {\n id: \"" + block.id + "\",\n height: height\n }\n }\n });\n parent.postMessage(\"mdzMaterialEmbedHeight=\" + message, '*');\n }\n\n setInterval(sendDocHeightMsg, 300);\n ";
1206
+ style.type = 'text/css';
1207
+ 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; }';
1208
+ contentEl.appendChild(range.createContextualFragment(block.data.html));
1209
+ rootEl.appendChild(scriptEl);
1210
+ rootEl.appendChild(contentEl);
1211
+ contentEl.appendChild(style);
1212
+ var frame = element.current.querySelector('iframe').contentDocument;
1213
+ frame.open();
1214
+ frame.close();
1215
+ frame.documentElement.setAttribute('lang', lang);
1216
+ frame.body.appendChild(rootEl);
1217
+ };
1218
+
1219
+ React.useEffect(function () {
1220
+ renderIframe();
1221
+ }, []);
1222
+ return React__default.createElement(EmbedBlock, {
1223
+ block: block,
1224
+ styleContext: styleContext
1225
+ }, React__default.createElement("div", {
1226
+ ref: element,
1227
+ dangerouslySetInnerHTML: {
1228
+ __html: "<iframe id=" + id + " frameBorder=\"0\" scrolling=\"no\"></iframe>"
1229
+ }
1230
+ }));
1231
+ };
1232
+
1233
+ var EmbedBlockContainer = function EmbedBlockContainer(_ref) {
1234
+ var block = _ref.block,
1235
+ styleContext = _ref.styleContext,
1236
+ lang = _ref.lang;
1237
+
1238
+ if (block.data.wrap_with_iframe) {
1239
+ return React__default.createElement(IframeBlock, {
1240
+ block: block,
1241
+ styleContext: styleContext,
1242
+ lang: lang
1243
+ });
1244
+ }
1245
+
1246
+ return React__default.createElement(EmbedBlock, {
1247
+ block: block,
1248
+ styleContext: styleContext
1249
+ });
1250
+ };
1251
+
1252
+ var styles$i = {"root":"QuoteBlock-module_root__2GrcC","center":"QuoteBlock-module_center__cTFNy"};
1253
+
1254
+ var QuoteBlock = function QuoteBlock(_ref) {
1255
+ var data = _ref.block.data,
1256
+ styleContext = _ref.styleContext;
1257
+ var classNames = [[styles$i.root, true]];
1258
+
1259
+ if (styleContext) {
1260
+ classNames = makeStyleContext(classNames, styleContext, styles$i);
1261
+ }
1262
+
1263
+ return React__default.createElement("div", {
1264
+ "data-testid": "quote-block",
1265
+ className: makeClassName(classNames)
1266
+ }, React__default.createElement("p", {
1267
+ dangerouslySetInnerHTML: {
1268
+ __html: data
1269
+ }
1270
+ }));
1271
+ };
1272
+
1273
+ var styles$j = {"root":"CardTitle-module_root__1uqqF","index":"CardTitle-module_index__4FsTf","title":"CardTitle-module_title__2iTI6","mobile":"CardTitle-module_mobile__1_kij","desktop":"CardTitle-module_desktop__1l3_n"};
1274
+
1275
+ var CardTitle = function CardTitle(_ref) {
1276
+ var _ref$block = _ref.block,
1277
+ onlyOn = _ref$block.only_on,
1278
+ index = _ref$block.index,
1279
+ text = _ref$block.text,
1280
+ styleContext = _ref.styleContext;
1281
+ return React__default.createElement("div", {
1282
+ "data-testid": "card-title",
1283
+ className: makeClassName([[styles$j.root, true], [styles$j[onlyOn], !!onlyOn], [styles$j[styleContext], !!styleContext && !!styles$j[styleContext]]])
1284
+ }, React__default.createElement("div", {
1285
+ className: styles$j.index
1286
+ }, index), React__default.createElement("h3", {
1287
+ className: styles$j.title
1288
+ }, text));
1289
+ };
1290
+
1291
+ var styles$k = {"root":"ChapterBlock-module_root__1WyVn","subtitle":"ChapterBlock-module_subtitle__3TXll","mobile":"ChapterBlock-module_mobile__CiO0w","desktop":"ChapterBlock-module_desktop__tk1Nk"};
1292
+
1293
+ var ChapterBlock = function ChapterBlock(_ref) {
1294
+ var block = _ref.block,
1295
+ onlyOn = _ref.block.only_on,
1296
+ styleContext = _ref.styleContext;
1297
+ return React__default.createElement("div", {
1298
+ "data-testid": "chapter-block",
1299
+ className: makeClassName([[styles$k.root, true], [styles$k[onlyOn], !!onlyOn]])
1300
+ }, React__default.createElement(DangerousHTML, {
1301
+ className: makeClassName([[styles$k.subtitle, true], [styles$k[styleContext], !!styleContext && !!styles$k[styleContext]]]),
1302
+ html: block.data
1303
+ }));
1304
+ };
1305
+
1306
+ var generateGradient = function generateGradient(color) {
1307
+ var gradientSteps = [[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]];
1308
+ var gradient = gradientSteps.map(function (i) {
1309
+ return "rgba(" + color + ", " + i[0] + ") " + i[1] + "%";
1310
+ });
1311
+ return "linear-gradient(-180deg, " + gradient + ")";
1312
+ };
1313
+
1314
+ var styles$l = {"root":"Cover-module_root__18Z8J"};
1315
+
1316
+ var styles$m = {"root":"SimpleTitle-module_root__2jVQN","mobile":"SimpleTitle-module_mobile__11gBz","desktop":"SimpleTitle-module_desktop__3yXgy"};
1317
+
1318
+ var SimpleTitle = function SimpleTitle(_ref) {
1319
+ var _ref$block = _ref.block,
1320
+ first = _ref$block.data.first,
1321
+ onlyOn = _ref$block.only_on,
1322
+ styleContext = _ref.styleContext;
1323
+ var classNames = [[styles$m.root, true], [styles$m[onlyOn], true]];
1324
+
1325
+ if (styleContext) {
1326
+ classNames = makeStyleContext(classNames, styleContext, styles$m);
1327
+ }
1328
+
1329
+ return React__default.createElement("div", {
1330
+ "data-testid": "simple-title",
1331
+ className: makeClassName(classNames)
1332
+ }, first);
1333
+ };
1334
+
1335
+ var styles$n = {"root":"RichTitle-module_root__BK_WT","slide":"RichTitle-module_slide__1A-gB","game":"RichTitle-module_game__1g8Bn","half":"RichTitle-module_half__10GRI","featured":"RichTitle-module_featured__wJfaQ","mobile":"RichTitle-module_mobile__1Cb6E","desktop":"RichTitle-module_desktop__2ixSQ"};
1336
+
1337
+ var RichTitle = function RichTitle(_ref) {
1338
+ var _ref$block = _ref.block,
1339
+ onlyOn = _ref$block.only_on,
1340
+ _ref$block$data = _ref$block.data,
1341
+ featured = _ref$block$data.featured,
1342
+ first = _ref$block$data.first,
1343
+ second = _ref$block$data.second,
1344
+ styleContext = _ref.styleContext;
1345
+ var classNames = [[styles$n.root, true], [styles$n[onlyOn], true], [styles$n.featured, !!featured]];
1346
+
1347
+ if (styleContext) {
1348
+ classNames = makeStyleContext(classNames, styleContext, styles$n);
1349
+ }
1350
+
1351
+ return React__default.createElement("h1", {
1352
+ "data-testid": "rich-title",
1353
+ className: makeClassName(classNames)
1354
+ }, first, second && React__default.createElement("span", null, " ", second));
1355
+ };
1356
+
1357
+ var styles$o = {"p":"SimpleBlock-module_p__Q3azD","h2":"SimpleBlock-module_h2__S0LRs","h3":"SimpleBlock-module_h3__2Kv7Y","h4":"SimpleBlock-module_h4__2TJO3","lead":"SimpleBlock-module_lead__35nXx","lead_hr":"SimpleBlock-module_lead_hr__1yD5v","context_p":"SimpleBlock-module_context_p__33saY","blockquote":"SimpleBlock-module_blockquote__pwpcX","game":"SimpleBlock-module_game__2sjgl","slide":"SimpleBlock-module_slide__Aqgfu","dark":"SimpleBlock-module_dark__1J_ov","isInIntro":"SimpleBlock-module_isInIntro__DfutD","center":"SimpleBlock-module_center__2rjif","isInImportantLead":"SimpleBlock-module_isInImportantLead__3VGzT","isInAnswer":"SimpleBlock-module_isInAnswer__3aX6X","mobile":"SimpleBlock-module_mobile__Ckgek","desktop":"SimpleBlock-module_desktop__2se2o"};
1358
+
1359
+ var SimpleBlock = function SimpleBlock(_ref) {
1360
+ var _ref$block = _ref.block,
1361
+ data = _ref$block.data,
1362
+ type = _ref$block.type,
1363
+ onlyOn = _ref$block.only_on,
1364
+ styleContext = _ref.styleContext;
1365
+ var tagName;
1366
+ var classNames = [[styles$o[type], !!type && !!styles$o[type]], [styles$o[onlyOn], true]];
1367
+
1368
+ if (styleContext) {
1369
+ classNames = makeStyleContext(classNames, styleContext, styles$o);
1370
+ }
1371
+
1372
+ switch (type) {
1373
+ case 'context_p':
1374
+ case 'lead':
1375
+ case 'note_caption':
1376
+ case 'note_credit':
1377
+ {
1378
+ tagName = 'p';
1379
+ break;
1380
+ }
1381
+
1382
+ case 'lead_hr':
1383
+ {
1384
+ tagName = 'div';
1385
+ break;
1386
+ }
1387
+
1388
+ default:
1389
+ tagName = type;
1390
+ }
1391
+
1392
+ return React__default.createElement(DangerousHTML, {
1393
+ className: makeClassName(classNames),
1394
+ html: data || '',
1395
+ tagName: tagName
1396
+ });
1397
+ };
1398
+
1399
+ var styles$p = {"root":"ListBlock-module_root__3Q3Ga","ol":"ListBlock-module_ol__21CgV","ul":"ListBlock-module_ul__2MRrS","center":"ListBlock-module_center__tdIwd","isInImportantLead":"ListBlock-module_isInImportantLead__UP0ic","dark":"ListBlock-module_dark__3E3tV","mobile":"ListBlock-module_mobile__2-nuV","desktop":"ListBlock-module_desktop__1EE0g"};
1400
+
1401
+ var ListBlock = function ListBlock(_ref) {
1402
+ var _ref$block = _ref.block,
1403
+ type = _ref$block.type,
1404
+ data = _ref$block.data,
1405
+ onlyOn = _ref$block.only_on,
1406
+ styleContext = _ref.styleContext;
1407
+ var TagName = type;
1408
+ var classNames = [[styles$p.root, true], [styles$p[onlyOn], true], [styles$p[type], !!type && !!styles$p[type]]];
1409
+
1410
+ if (styleContext) {
1411
+ classNames = makeStyleContext(classNames, styleContext, styles$p);
1412
+ }
1413
+
1414
+ return React__default.createElement(TagName, {
1415
+ className: makeClassName(classNames)
1416
+ }, data.map(function (item, index) {
1417
+ return React__default.createElement(DangerousHTML, {
1418
+ key: index,
1419
+ html: item,
1420
+ tagName: "li"
1421
+ });
1422
+ }));
1423
+ };
1424
+
1425
+ var styles$q = {"root":"RelatedBlock-module_root__IKcQq","header":"RelatedBlock-module_header__2SuWP","items":"RelatedBlock-module_items__2V-Ap","rich":"RelatedBlock-module_rich__ddaHq","first":"RelatedBlock-module_first__BKItW","simple":"RelatedBlock-module_simple__29HVO","center":"RelatedBlock-module_center__1LmW8","isInSlideMaterial":"RelatedBlock-module_isInSlideMaterial__2YSYG","mobile":"RelatedBlock-module_mobile__2XM5a","desktop":"RelatedBlock-module_desktop__2mXeq"};
1426
+
1427
+ var RelatedBlock = function RelatedBlock(_ref) {
1428
+ var _ref$block = _ref.block,
1429
+ _ref$block$data = _ref$block.data,
1430
+ title = _ref$block$data.title,
1431
+ related = _ref$block$data.related,
1432
+ onlyOn = _ref$block.only_on,
1433
+ styleContext = _ref.styleContext;
1434
+ var classNames = [[styles$q.root, true], [styles$q[onlyOn], true]];
1435
+
1436
+ if (styleContext) {
1437
+ classNames = makeStyleContext(classNames, styleContext, styles$q);
1438
+ }
1439
+
1440
+ return React__default.createElement("div", {
1441
+ "data-testid": "related-block",
1442
+ className: makeClassName(classNames)
1443
+ }, React__default.createElement("h3", {
1444
+ className: styles$q.header
1445
+ }, title), React__default.createElement("ul", {
1446
+ className: styles$q.items
1447
+ }, related.map(function (item, index) {
1448
+ return React__default.createElement("li", {
1449
+ key: item.id || index,
1450
+ className: styles$q[item.layout]
1451
+ }, React__default.createElement("a", {
1452
+ href: item.full_url || "/" + item.url,
1453
+ target: "_blank",
1454
+ rel: "noopener noreferrer"
1455
+ }, React__default.createElement("span", {
1456
+ className: styles$q.first
1457
+ }, item.title), item.second_title && ' ', item.second_title && React__default.createElement("span", null, item.second_title)));
1458
+ })));
1459
+ };
1460
+
1461
+ var styles$r = {"root":"SourceBlock-module_root__1P3XD","text":"SourceBlock-module_text__Si4vm","origin":"SourceBlock-module_origin__l3JbO","center":"SourceBlock-module_center__3P93B","mobile":"SourceBlock-module_mobile__2gw4S","desktop":"SourceBlock-module_desktop__DecT6"};
1462
+
1463
+ var SourceBlock = function SourceBlock(_ref) {
1464
+ var _ref$block = _ref.block,
1465
+ onlyOn = _ref$block.only_on,
1466
+ quote = _ref$block.quote,
1467
+ origin = _ref$block.origin,
1468
+ url = _ref$block.url,
1469
+ styleContext = _ref.styleContext;
1470
+ var classNames = [[styles$r.root, true], [styles$r[onlyOn], true]];
1471
+
1472
+ if (styleContext) {
1473
+ classNames = makeStyleContext(classNames, styleContext, styles$r);
1474
+ }
1475
+
1476
+ return React__default.createElement("blockquote", {
1477
+ "data-testid": "source-block",
1478
+ cite: url,
1479
+ className: makeClassName(classNames)
1480
+ }, React__default.createElement("a", {
1481
+ className: styles$r.text,
1482
+ href: url,
1483
+ target: "_blank",
1484
+ rel: "noopener noreferrer"
1485
+ }, quote.map(function (item, index) {
1486
+ return React__default.createElement(DangerousHTML, {
1487
+ key: index,
1488
+ html: item.data,
1489
+ tagName: "p"
1490
+ });
1491
+ }), React__default.createElement("footer", null, React__default.createElement("cite", {
1492
+ className: styles$r.origin
1493
+ }, origin))));
1494
+ };
1495
+
1496
+ var styles$s = {"root":"GroupedBlock-module_root__2qfQA","hasFigcaption":"GroupedBlock-module_hasFigcaption__2_mcf","item":"GroupedBlock-module_item__3sz9_","items":"GroupedBlock-module_items__2DV2X","figcaption":"GroupedBlock-module_figcaption__2Q_wf","default":"GroupedBlock-module_default__3ylw_","full":"GroupedBlock-module_full__1dzQR","super_full":"GroupedBlock-module_super_full__1PU72","mobile":"GroupedBlock-module_mobile__3n8Ub","desktop":"GroupedBlock-module_desktop__6ZRpA"};
1497
+
1498
+ var GroupedBlock = function GroupedBlock(_ref) {
1499
+ var block = _ref.block,
1500
+ onlyOn = _ref.block.only_on,
1501
+ styleContext = _ref.styleContext;
1502
+ var maxHeight = Math.min.apply(Math, block.data.map(function (item) {
1503
+ return item.data.height;
1504
+ }));
1505
+ var normalizedBoxesWidth = block.data.map(function (item) {
1506
+ return item.data.width / (item.data.height / maxHeight);
1507
+ });
1508
+ var sumWidth = normalizedBoxesWidth.reduce(function (sum, x) {
1509
+ return sum + x;
1510
+ });
1511
+ var classNames = [[styles$s.root, true], [styles$s[onlyOn], true], [styles$s.hasFigcaption, block.cc === 'default'], [styles$s[block.display], !!block.display && styles$s[block.display]]];
1512
+
1513
+ if (styleContext) {
1514
+ classNames = makeStyleContext(classNames, styleContext, styles$s);
1515
+ }
1516
+
1517
+ return React__default.createElement("div", {
1518
+ "data-testid": "grouped-block",
1519
+ className: makeClassName(classNames)
1520
+ }, React__default.createElement("div", {
1521
+ className: styles$s.items
1522
+ }, block.data.map(function (item, index) {
1523
+ var percentWidth = normalizedBoxesWidth[index] / sumWidth * 100;
1524
+ return React__default.createElement("div", {
1525
+ className: styles$s.item,
1526
+ key: item.id,
1527
+ style: {
1528
+ width: percentWidth + "%"
1529
+ }
1530
+ }, React__default.createElement(EmbedBlockContainer, {
1531
+ block: item,
1532
+ styleContext: "isInGroupedBlock"
1533
+ }));
1534
+ })), block.cc && React__default.createElement("figcaption", {
1535
+ className: styles$s.figcaption
1536
+ }, React__default.createElement(MediaCaption, {
1537
+ credit: block.credit,
1538
+ caption: block.caption,
1539
+ styleContext: styleContext
1540
+ })));
1541
+ };
1542
+
1543
+ var styles$t = {"root":"MetaItem-module_root__2VQom","hasBullets":"MetaItem-module_hasBullets__CkQPI","hasSource":"MetaItem-module_hasSource__1DmCI","listened":"MetaItem-module_listened__lwvAO","read":"MetaItem-module_read__5eAIG","datetime":"MetaItem-module_datetime__3tOWm"};
1544
+
1545
+ var MetaItem = function MetaItem(_ref) {
1546
+ var hasSource = _ref.hasSource,
1547
+ type = _ref.type,
1548
+ children = _ref.children,
1549
+ bullets = _ref.bullets;
1550
+ var classNames = [[styles$t.root, true], [styles$t[type], !!type && !!styles$t[type]], [styles$t.hasSource, !!hasSource], [styles$t.hasBullets, !!bullets]];
1551
+ return React__default.createElement("div", {
1552
+ "data-testid": "meta-item",
1553
+ className: makeClassName(classNames)
1554
+ }, children);
1555
+ };
1556
+
1557
+ var styles$u = {"root":"MetaItemLive-module_root__2mpD3","gold":"MetaItemLive-module_gold__3yZEV","frame":"MetaItemLive-module_frame__1H_Ha","liveMiddle":"MetaItemLive-module_liveMiddle__wyuV3","liveFirstWave":"MetaItemLive-module_liveFirstWave__3dbvz","liveSecondWave":"MetaItemLive-module_liveSecondWave__12g57"};
1558
+
1559
+ var MetaItemLive = function MetaItemLive(_ref) {
1560
+ var _ref$theme = _ref.theme,
1561
+ theme = _ref$theme === void 0 ? 'gold' : _ref$theme;
1562
+ var classNames = [[styles$u.root, true], [styles$u[theme], !!theme && styles$u[theme]]];
1563
+ return React__default.createElement("div", {
1564
+ "data-testid": "meta-item-live",
1565
+ "data-meta": "live",
1566
+ className: makeClassName(classNames)
1567
+ }, React__default.createElement("div", {
1568
+ className: styles$u.frame
1569
+ }));
1570
+ };
1571
+
1572
+ var pluralize = function pluralize(number, one, two, five) {
1573
+ var n = Math.abs(number);
1574
+ n %= 100;
1575
+
1576
+ if (n >= 5 && n <= 20) {
1577
+ return five;
1578
+ }
1579
+
1580
+ n %= 10;
1581
+
1582
+ if (n === 1) {
1583
+ return one;
1584
+ }
1585
+
1586
+ if (n >= 2 && n <= 4) {
1587
+ return two;
1588
+ }
1589
+
1590
+ return five;
1591
+ };
1592
+
1593
+ var styles$v = {"root":"DocumentItemsCount-module_root__P3q-z","items":"DocumentItemsCount-module_items__3pfxW"};
1594
+
1595
+ var DocumentItemsCount = function DocumentItemsCount(_ref) {
1596
+ var type = _ref.type,
1597
+ _ref$lang = _ref.lang,
1598
+ lang = _ref$lang === void 0 ? 'ru' : _ref$lang,
1599
+ items = _ref.items,
1600
+ children = _ref.children;
1601
+ var i18n = {
1602
+ ru: {
1603
+ card: {
1604
+ one: 'карточка',
1605
+ two: 'карточки',
1606
+ five: 'карточек'
1607
+ },
1608
+ podcast: {
1609
+ one: 'эпизод',
1610
+ two: 'эпизода',
1611
+ five: 'эпизодов'
1612
+ }
1613
+ },
1614
+ en: {
1615
+ card: {
1616
+ one: 'card',
1617
+ two: 'cards',
1618
+ five: 'cards'
1619
+ },
1620
+ podcast: {
1621
+ one: 'episode',
1622
+ two: 'episodes',
1623
+ five: 'episodes'
1624
+ }
1625
+ }
1626
+ };
1627
+ var itemsCount = items + " " + pluralize(items, i18n[lang][type].one, i18n[lang][type].two, i18n[lang][type].five);
1628
+ return React__default.createElement("div", {
1629
+ "data-testid": "document-items-count",
1630
+ className: styles$v.root
1631
+ }, children, React__default.createElement("span", {
1632
+ className: styles$v.items
1633
+ }, itemsCount));
1634
+ };
1635
+
1636
+ var MetaContainer = function MetaContainer(_ref) {
1637
+ var lang = _ref.lang,
1638
+ block = _ref.block,
1639
+ isRead = _ref.isRead,
1640
+ isListened = _ref.isListened,
1641
+ bookmarkAction = _ref.bookmarkAction,
1642
+ isInBookmarks = _ref.isInBookmarks,
1643
+ _ref$block$data = _ref.block.data,
1644
+ components = _ref$block$data.components,
1645
+ theme = _ref$block$data.theme,
1646
+ styleContext = _ref.styleContext;
1647
+ var themeColor = styleContext && styleContext.indexOf('dark') !== -1 ? 'light' : 'unset';
1648
+ var isPodcast = styleContext && styleContext.indexOf('podcast') !== -1;
1649
+ var isSlides = styleContext && styleContext.indexOf('slide') !== -1;
1650
+ var hasSource = !!components.find(function (item) {
1651
+ return item.type === 'source_name';
1652
+ });
1653
+ return React__default.createElement(Meta, {
1654
+ styleContext: styleContext,
1655
+ theme: theme || themeColor,
1656
+ onlyOn: block.only_on,
1657
+ hasSource: hasSource
1658
+ }, components.map(function (component) {
1659
+ switch (component.type) {
1660
+ case 'source_name':
1661
+ {
1662
+ return React__default.createElement(MetaItem, {
1663
+ hasSource: hasSource,
1664
+ bullets: true,
1665
+ key: component.id
1666
+ }, React__default.createElement(React__default.Fragment, null, lang === 'ru' ? 'Источник: ' : 'Source: ', component.url && React__default.createElement("a", {
1667
+ href: component.url,
1668
+ rel: "noopener noreferrer",
1669
+ target: "_blank"
1670
+ }, component.text), !component.url && component.text));
1671
+ }
1672
+
1673
+ case 'duration':
1674
+ {
1675
+ return React__default.createElement(MetaItem, {
1676
+ hasSource: hasSource,
1677
+ bullets: true,
1678
+ key: component.id
1679
+ }, React__default.createElement(React__default.Fragment, null, React__default.createElement(SvgSymbol, {
1680
+ icon: "podcast",
1681
+ size: "small"
1682
+ }), component.text));
1683
+ }
1684
+
1685
+ case 'datetime':
1686
+ {
1687
+ return React__default.createElement(MetaItem, {
1688
+ hasSource: hasSource,
1689
+ bullets: true,
1690
+ key: component.id,
1691
+ type: "datetime"
1692
+ }, React__default.createElement(Timestamp, {
1693
+ publishedAt: component.datetime,
1694
+ type: "date",
1695
+ locale: lang
1696
+ }));
1697
+ }
1698
+
1699
+ case 'items_count':
1700
+ {
1701
+ return React__default.createElement(MetaItem, {
1702
+ hasSource: hasSource,
1703
+ bullets: true,
1704
+ key: component.id
1705
+ }, React__default.createElement(DocumentItemsCount, {
1706
+ items: component.count,
1707
+ type: isPodcast ? 'podcast' : 'card',
1708
+ lang: lang
1709
+ }, React__default.createElement(SvgSymbol, {
1710
+ icon: "card",
1711
+ size: "unset"
1712
+ })));
1713
+ }
1714
+
1715
+ case 'broadcast_active':
1716
+ {
1717
+ return React__default.createElement(MetaItem, {
1718
+ hasSource: hasSource,
1719
+ bullets: true,
1720
+ key: component.id
1721
+ }, React__default.createElement(React__default.Fragment, null, React__default.createElement(MetaItemLive, null), " \u041F\u0440\u044F\u043C\u043E\u0439 \u044D\u0444\u0438\u0440"));
1722
+ }
1723
+
1724
+ case 'broadcast':
1725
+ {
1726
+ return React__default.createElement(MetaItem, {
1727
+ hasSource: hasSource,
1728
+ bullets: true,
1729
+ key: component.id
1730
+ }, React__default.createElement(React__default.Fragment, null, component.with_icon && React__default.createElement(MetaItemLive, null), component.label));
1731
+ }
1732
+
1733
+ default:
1734
+ {
1735
+ return null;
1736
+ }
1737
+ }
1738
+ }), (isRead || isListened) && React__default.createElement(MetaItem, {
1739
+ hasSource: hasSource,
1740
+ bullets: true,
1741
+ type: isListened ? 'listened' : 'read'
1742
+ }, React__default.createElement(SvgSymbol, {
1743
+ icon: isListened ? 'listened' : 'read',
1744
+ size: "unset"
1745
+ })), isSlides && lang === 'ru' && React__default.createElement("div", {
1746
+ className: styles$f.bookmark
1747
+ }, React__default.createElement(BookmarkButton, {
1748
+ isInBookmarks: isInBookmarks,
1749
+ onClick: function onClick() {
1750
+ return bookmarkAction('bookmark', 'top');
1751
+ }
1752
+ })));
1753
+ };
1754
+
1755
+ var RenderBlocks = function RenderBlocks(_ref) {
1756
+ var block = _ref.block,
1757
+ styleContext = _ref.styleContext,
1758
+ lang = _ref.lang,
1759
+ isRead = _ref.isRead,
1760
+ isListened = _ref.isListened,
1761
+ bookmarkAction = _ref.bookmarkAction,
1762
+ isInBookmarks = _ref.isInBookmarks;
1763
+
1764
+ switch (block.type) {
1765
+ case 'tag':
1766
+ {
1767
+ return React__default.createElement(Tag, {
1768
+ size: "large",
1769
+ onlyOn: block.only_on,
1770
+ theme: block.data.theme,
1771
+ styleContext: styleContext
1772
+ }, block.data.text);
1773
+ }
1774
+
1775
+ case 'simple_title':
1776
+ {
1777
+ return React__default.createElement(SimpleTitle, {
1778
+ block: block,
1779
+ styleContext: styleContext
1780
+ });
1781
+ }
1782
+
1783
+ case 'rich_title':
1784
+ {
1785
+ return React__default.createElement(RichTitle, {
1786
+ block: block,
1787
+ styleContext: styleContext
1788
+ });
1789
+ }
1790
+
1791
+ case 'meta':
1792
+ {
1793
+ return React__default.createElement(MetaContainer, {
1794
+ block: block,
1795
+ lang: block.data.lang,
1796
+ styleContext: styleContext,
1797
+ isRead: isRead,
1798
+ isListened: isListened,
1799
+ isInBookmarks: isInBookmarks,
1800
+ bookmarkAction: bookmarkAction
1801
+ });
1802
+ }
1803
+
1804
+ case 'h1':
1805
+ case 'h2':
1806
+ case 'h3':
1807
+ case 'h4':
1808
+ case 'blockquote':
1809
+ case 'p':
1810
+ case 'context_p':
1811
+ case 'lead':
1812
+ case 'lead_hr':
1813
+ {
1814
+ return React__default.createElement(SimpleBlock, {
1815
+ block: block,
1816
+ styleContext: styleContext
1817
+ });
1818
+ }
1819
+
1820
+ case 'quote':
1821
+ return React__default.createElement(QuoteBlock, {
1822
+ block: block,
1823
+ styleContext: styleContext
1824
+ });
1825
+
1826
+ case 'ol':
1827
+ case 'ul':
1828
+ {
1829
+ return React__default.createElement(ListBlock, {
1830
+ block: block,
1831
+ styleContext: styleContext
1832
+ });
1833
+ }
1834
+
1835
+ case 'chapter-subtitle':
1836
+ {
1837
+ return React__default.createElement(ChapterBlock, {
1838
+ block: block,
1839
+ styleContext: styleContext
1840
+ });
1841
+ }
1842
+
1843
+ case 'card_title':
1844
+ {
1845
+ return React__default.createElement(CardTitle, {
1846
+ block: block,
1847
+ styleContext: styleContext
1848
+ });
1849
+ }
1850
+
1851
+ case 'related':
1852
+ {
1853
+ return React__default.createElement(RelatedBlock, {
1854
+ block: block,
1855
+ styleContext: styleContext
1856
+ });
1857
+ }
1858
+
1859
+ case 'source':
1860
+ return React__default.createElement(SourceBlock, {
1861
+ block: block,
1862
+ styleContext: styleContext
1863
+ });
1864
+
1865
+ case 'table':
1866
+ return React__default.createElement(Table, {
1867
+ block: block,
1868
+ styleContext: styleContext
1869
+ });
1870
+
1871
+ case 'embed':
1872
+ case 'embed_code':
1873
+ case 'game_embed':
1874
+ case 'image':
1875
+ case 'gif':
1876
+ return React__default.createElement(EmbedBlockContainer, {
1877
+ block: block,
1878
+ styleContext: styleContext,
1879
+ lang: lang
1880
+ });
1881
+
1882
+ case 'grouped':
1883
+ return React__default.createElement(GroupedBlock, {
1884
+ block: block,
1885
+ styleContext: styleContext
1886
+ });
1887
+
1888
+ case 'material_note':
1889
+ return React__default.createElement(MaterialNote, {
1890
+ block: block,
1891
+ styleContext: styleContext
1892
+ });
1893
+
1894
+ default:
1895
+ {
1896
+ return null;
1897
+ }
1898
+ }
1899
+ };
1900
+
1901
+ var Cover = function Cover(_ref) {
1902
+ var _ref$block = _ref.block,
1903
+ onlyOn = _ref$block.only_on,
1904
+ _ref$block$data = _ref$block.data,
1905
+ blocks = _ref$block$data.blocks,
1906
+ _ref$block$data$cover = _ref$block$data.cover,
1907
+ credit = _ref$block$data$cover.credit,
1908
+ caption = _ref$block$data$cover.caption,
1909
+ urls = _ref$block$data$cover.urls,
1910
+ mobileRatio = _ref$block$data$cover.mobile_ratio,
1911
+ gradients = _ref$block$data$cover.gradients,
1912
+ cc = _ref$block$data$cover.cc,
1913
+ styleContext = _ref.styleContext;
1914
+
1915
+ var _useState = React.useState(false),
1916
+ isPopoverShown = _useState[0],
1917
+ setIsPopoverShown = _useState[1];
1918
+
1919
+ var style = {};
1920
+ var theme;
1921
+ var classNames = [[styles$l.root, true], [styles$l[theme], true], [styles$l[onlyOn], !!onlyOn && !!styles$l[onlyOn]]];
1922
+
1923
+ if (styleContext) {
1924
+ classNames = makeStyleContext(classNames, styleContext, styles$l);
1925
+ }
1926
+
1927
+ if (gradients) {
1928
+ theme = gradients.text_rgb === '0,0,0' ? 'dark' : 'light';
1929
+ style.backgroundImage = generateGradient(gradients.bg_rgb);
1930
+ }
1931
+
1932
+ var renderCC = function renderCC(context) {
1933
+ return React__default.createElement(MediaCaption, {
1934
+ credit: credit,
1935
+ caption: caption,
1936
+ styleContext: context || styleContext
1937
+ });
1938
+ };
1939
+
1940
+ return React__default.createElement("div", {
1941
+ "data-testid": "cover",
1942
+ className: makeClassName(classNames)
1943
+ }, React__default.createElement("div", {
1944
+ className: styles$l.image
1945
+ }, React__default.createElement(Image, {
1946
+ optimized: urls,
1947
+ ratio: mobileRatio,
1948
+ display: "narrow"
1949
+ })), React__default.createElement("div", {
1950
+ className: styles$l.body,
1951
+ style: style
1952
+ }, blocks.map(function (item) {
1953
+ return React__default.createElement(RenderBlocks, {
1954
+ key: item.id,
1955
+ block: item,
1956
+ styleContext: styleContext
1957
+ });
1958
+ })), cc === 'button' && React__default.createElement("button", {
1959
+ className: styles$l.control,
1960
+ type: "button",
1961
+ "aria-label": "Open",
1962
+ onClick: function onClick() {
1963
+ setIsPopoverShown(!isPopoverShown);
1964
+ }
1965
+ }), cc === 'button' && isPopoverShown && React__default.createElement(Popover, {
1966
+ onClose: function onClose() {
1967
+ setIsPopoverShown(false);
1968
+ }
1969
+ }, renderCC('isInPopover')));
1970
+ };
1971
+
1972
+ var styles$w = {"root":"HalfBlock-module_root__2frv2","main":"HalfBlock-module_main__2XX73","body":"HalfBlock-module_body__3MnEN","footer":"HalfBlock-module_footer__1C0yp","image":"HalfBlock-module_image__2lYel","mobile":"HalfBlock-module_mobile__2latf","desktop":"HalfBlock-module_desktop__3B1Ej"};
1973
+
1974
+ var HalfBlock = function HalfBlock(_ref) {
1975
+ var _ref$block = _ref.block,
1976
+ onlyOn = _ref$block.only_on,
1977
+ data = _ref$block.data,
1978
+ _ref$block$data$cover = _ref$block.data.cover,
1979
+ optimized = _ref$block$data$cover.optimized,
1980
+ ratio = _ref$block$data$cover.ratio,
1981
+ credit = _ref$block$data$cover.credit,
1982
+ caption = _ref$block$data$cover.caption,
1983
+ styleContext = _ref.styleContext;
1984
+ var classNames = [[styles$w.root, true], [styles$w[onlyOn], true]];
1985
+
1986
+ if (styleContext) {
1987
+ classNames = makeStyleContext(classNames, styleContext, styles$w);
1988
+ }
1989
+
1990
+ return React__default.createElement("div", {
1991
+ "data-testid": "half-block",
1992
+ className: makeClassName(classNames)
1993
+ }, React__default.createElement("div", {
1994
+ className: styles$w.main
1995
+ }, React__default.createElement("div", {
1996
+ className: styles$w.image
1997
+ }, React__default.createElement(Image, {
1998
+ optimized: optimized,
1999
+ ratio: ratio,
2000
+ display: "super_full"
2001
+ })), React__default.createElement("div", {
2002
+ className: styles$w.body
2003
+ }, data.blocks.map(function (item) {
2004
+ return React__default.createElement(RenderBlocks, {
2005
+ key: item.id,
2006
+ block: item,
2007
+ styleContext: ['rich']
2008
+ });
2009
+ }))), React__default.createElement("div", {
2010
+ className: styles$w.footer
2011
+ }, React__default.createElement(MediaCaption, {
2012
+ credit: credit,
2013
+ caption: caption,
2014
+ styleContext: styleContext
2015
+ })));
2016
+ };
2017
+
2018
+ var styles$x = {"root":"ImportantLead-module_root__2BdT3","slide":"ImportantLead-module_slide__3kQ9x","mobile":"ImportantLead-module_mobile__3BXbm","desktop":"ImportantLead-module_desktop__3Zljc"};
2019
+
2020
+ var ImportantLead = function ImportantLead(_ref) {
2021
+ var _ref$block = _ref.block,
2022
+ onlyOn = _ref$block.only_on,
2023
+ data = _ref$block.data,
2024
+ styleContext = _ref.styleContext;
2025
+ var classNames = [[styles$x.root, true], [styles$x[onlyOn], !!onlyOn]];
2026
+
2027
+ if (styleContext) {
2028
+ classNames = makeStyleContext(classNames, styleContext, styles$x);
2029
+ }
2030
+
2031
+ return React__default.createElement("div", {
2032
+ "data-testid": "important-lead",
2033
+ className: makeClassName(classNames)
2034
+ }, data.map(function (item) {
2035
+ return React__default.createElement(RenderBlocks, {
2036
+ key: item.id,
2037
+ block: item,
2038
+ styleContext: "isInImportantLead"
2039
+ });
2040
+ }));
2041
+ };
2042
+
2043
+ var POST_MESSAGE_PREFIX = 'mdzKitMsg';
2044
+
2045
+ var postMessage$1 = function postMessage(element, action) {
2046
+ var target = window.top;
2047
+ var msg = POST_MESSAGE_PREFIX + "=" + JSON.stringify({
2048
+ element: element,
2049
+ action: action
2050
+ });
2051
+
2052
+ if (typeof target !== 'undefined') {
2053
+ target.postMessage(msg, '*');
2054
+ }
2055
+ };
2056
+
2057
+ var styles$y = {"root":"Spoiler-module_root__1OfSR","header":"Spoiler-module_header__1rZUs","body":"Spoiler-module_body__Q1e_c","spoiled":"Spoiler-module_spoiled__1A5r4","footer":"Spoiler-module_footer__23mh7","spoilerSticky":"Spoiler-module_spoilerSticky__3Kd30","center":"Spoiler-module_center__tq1m0","full":"Spoiler-module_full__1QFqR","default":"Spoiler-module_default__2Kjx8","mobile":"Spoiler-module_mobile__2BPt8","desktop":"Spoiler-module_desktop__1BIFJ"};
2058
+
2059
+ var Spoiler = function Spoiler(_ref) {
2060
+ var _ref$block = _ref.block,
2061
+ display = _ref$block.display,
2062
+ button = _ref$block.button,
2063
+ onlyOn = _ref$block.only_on,
2064
+ buttonTitle = _ref$block.btn_title,
2065
+ title = _ref$block.title,
2066
+ blocks = _ref$block.blocks,
2067
+ styleContext = _ref.styleContext;
2068
+
2069
+ var _useState = React.useState(false),
2070
+ spoiled = _useState[0],
2071
+ setSpoiled = _useState[1];
2072
+
2073
+ var ref = React.useRef(null);
2074
+
2075
+ var handleButtonClick = function handleButtonClick() {
2076
+ setSpoiled(!spoiled);
2077
+
2078
+ if (spoiled) {
2079
+ postMessage$1('closeSpoiler', 'click');
2080
+ var rect = ref.current.getBoundingClientRect();
2081
+
2082
+ if (rect.top < 0) {
2083
+ ref.current.scrollIntoView({
2084
+ behavior: 'smooth'
2085
+ });
2086
+ }
2087
+ } else {
2088
+ postMessage$1('openSpoiler', 'click');
2089
+ }
2090
+ };
2091
+
2092
+ var classNames = [[styles$y.root, true], [styles$y[onlyOn], !!onlyOn], [styles$y[display], !!display && styles$y[display]], [[styles$y.spoiled], !!spoiled]];
2093
+
2094
+ if (styleContext) {
2095
+ classNames = makeStyleContext(classNames, styleContext, styles$y);
2096
+ }
2097
+
2098
+ var buttonCollapse = button ? button.collapse : 'Свернуть';
2099
+ var buttonExpande = button ? button.expand : buttonTitle;
2100
+ return React__default.createElement("div", {
2101
+ ref: ref,
2102
+ className: makeClassName(classNames),
2103
+ "data-testid": "spoiler"
2104
+ }, React__default.createElement("div", {
2105
+ className: styles$y.header
2106
+ }, title && React__default.createElement("h3", null, title)), React__default.createElement("div", {
2107
+ className: styles$y.body
2108
+ }, blocks.map(function (item) {
2109
+ return React__default.createElement(RenderBlocks, {
2110
+ key: item.id,
2111
+ block: item,
2112
+ styleContext: styleContext
2113
+ });
2114
+ })), React__default.createElement("div", {
2115
+ className: styles$y.footer
2116
+ }, React__default.createElement(Button, {
2117
+ size: "default",
2118
+ theme: "gray",
2119
+ onClick: function onClick() {
2120
+ return handleButtonClick();
2121
+ },
2122
+ styleContext: "isInSpoiler"
2123
+ }, spoiled ? buttonCollapse : buttonExpande, React__default.createElement(SvgSymbol, {
2124
+ icon: "arrow"
2125
+ }))));
2126
+ };
2127
+
2128
+ var RawHtmlBlock = function RawHtmlBlock(_ref) {
2129
+ var block = _ref.block,
2130
+ styleContext = _ref.styleContext,
2131
+ isRead = _ref.isRead,
2132
+ isListened = _ref.isListened,
2133
+ isInBookmarks = _ref.isInBookmarks,
2134
+ bookmarkAction = _ref.bookmarkAction,
2135
+ lightBox = _ref.lightBox;
2136
+ var context = {
2137
+ lightBox: lightBox || null
2138
+ };
2139
+
2140
+ switch (block.type) {
2141
+ case 'important_lead':
2142
+ {
2143
+ return React__default.createElement(ImportantLead, {
2144
+ block: block,
2145
+ styleContext: styleContext
2146
+ });
2147
+ }
2148
+
2149
+ case 'spoiler':
2150
+ {
2151
+ return React__default.createElement(Spoiler, {
2152
+ block: block,
2153
+ styleContext: styleContext
2154
+ });
2155
+ }
2156
+
2157
+ case 'cover':
2158
+ {
2159
+ return React__default.createElement(Cover, {
2160
+ block: block,
2161
+ styleContext: styleContext
2162
+ });
2163
+ }
2164
+
2165
+ case 'half':
2166
+ {
2167
+ return React__default.createElement(HalfBlock, {
2168
+ block: block,
2169
+ styleContext: styleContext
2170
+ });
2171
+ }
2172
+
2173
+ default:
2174
+ {
2175
+ return React__default.createElement(BlockProvider, {
2176
+ value: context
2177
+ }, React__default.createElement(RenderBlocks, {
2178
+ block: block,
2179
+ styleContext: styleContext,
2180
+ isRead: isRead,
2181
+ isListened: isListened,
2182
+ isInBookmarks: isInBookmarks,
2183
+ bookmarkAction: bookmarkAction
2184
+ }));
2185
+ }
2186
+ }
2187
+ };
2188
+
2189
+ var styles$z = {"root":"ToolbarButton-module_root__xN-fq","dark":"ToolbarButton-module_dark__GrIOr","bookmark":"ToolbarButton-module_bookmark__3369b","isActive":"ToolbarButton-module_isActive__3NLAE","text":"ToolbarButton-module_text__32m6s"};
2190
+
2191
+ var ToolbarButton = function ToolbarButton(_ref) {
2192
+ var children = _ref.children,
2193
+ type = _ref.type,
2194
+ theme = _ref.theme,
2195
+ isActive = _ref.isActive,
2196
+ _onClick = _ref.onClick;
2197
+ var classNames = [[styles$z.root, true], [styles$z[type], !!styles$z[type]], [styles$z[theme], !!styles$z[theme] && !!theme], [styles$z.isActive, !!isActive]];
2198
+ return React__default.createElement("button", {
2199
+ "data-testid": "toolbar-button",
2200
+ className: makeClassName(classNames),
2201
+ type: "button",
2202
+ onClick: function onClick() {
2203
+ return _onClick(type);
2204
+ }
2205
+ }, React__default.createElement(SvgSymbol, {
2206
+ size: "medium",
2207
+ icon: type,
2208
+ styleContext: "isInToolbar"
2209
+ }), children && React__default.createElement("span", {
2210
+ className: styles$z.text
2211
+ }, children));
104
2212
  };
105
2213
 
2214
+ exports.BookmarkButton = BookmarkButton;
106
2215
  exports.Button = Button;
2216
+ exports.CardTitle = CardTitle;
2217
+ exports.ChapterBlock = ChapterBlock;
2218
+ exports.Cover = Cover;
2219
+ exports.DocumentItemsCount = DocumentItemsCount;
2220
+ exports.DotsOnImage = DotsOnImage;
2221
+ exports.Dropdown = Dropdown;
2222
+ exports.EmbedBlockContainer = EmbedBlockContainer;
2223
+ exports.GroupedBlock = GroupedBlock;
2224
+ exports.HalfBlock = HalfBlock;
2225
+ exports.Image = Image;
2226
+ exports.ImportantLead = ImportantLead;
2227
+ exports.Lazy = Lazy;
2228
+ exports.ListBlock = ListBlock;
2229
+ exports.MaterialNote = MaterialNote;
2230
+ exports.MaterialTitle = MaterialTitle;
2231
+ exports.MediaCaption = MediaCaption;
2232
+ exports.Menu = Menu;
2233
+ exports.Meta = Meta;
2234
+ exports.MetaItem = MetaItem;
2235
+ exports.MetaItemLive = MetaItemLive;
2236
+ exports.Popover = Popover;
2237
+ exports.Primary = Primary;
2238
+ exports.QuoteBlock = QuoteBlock;
2239
+ exports.RawHtmlBlock = RawHtmlBlock;
2240
+ exports.RelatedBlock = RelatedBlock;
2241
+ exports.RenderBlocks = RenderBlocks;
2242
+ exports.RichTitle = RichTitle;
2243
+ exports.Secondary = Secondary;
2244
+ exports.SimpleBlock = SimpleBlock;
2245
+ exports.SimpleTitle = SimpleTitle;
2246
+ exports.SourceBlock = SourceBlock;
2247
+ exports.Spoiler = Spoiler;
2248
+ exports.SvgSymbol = SvgSymbol;
2249
+ exports.Switcher = Switcher;
2250
+ exports.Table = Table;
2251
+ exports.Tag = Tag;
2252
+ exports.Timestamp = Timestamp;
2253
+ exports.Toolbar = Toolbar;
2254
+ exports.ToolbarButton = ToolbarButton;
107
2255
  //# sourceMappingURL=ui-kit-2.cjs.development.js.map