jodit-pro 4.17.8 → 4.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. package/es2015/jodit.css +2 -2
  2. package/es2015/jodit.fat.min.css +1 -1
  3. package/es2015/jodit.fat.min.js +6 -6
  4. package/es2015/jodit.js +791 -128
  5. package/es2015/jodit.min.css +1 -1
  6. package/es2015/jodit.min.js +10 -10
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  8. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  9. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  10. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  11. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  12. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  13. package/es2015/plugins/backup/backup.css +1 -1
  14. package/es2015/plugins/backup/backup.js +1 -1
  15. package/es2015/plugins/backup/backup.min.js +1 -1
  16. package/es2015/plugins/button-generator/button-generator.css +1 -1
  17. package/es2015/plugins/button-generator/button-generator.js +1 -1
  18. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  19. package/es2015/plugins/change-case/change-case.js +1 -1
  20. package/es2015/plugins/change-case/change-case.min.js +1 -1
  21. package/es2015/plugins/color-picker/color-picker.css +1 -1
  22. package/es2015/plugins/color-picker/color-picker.js +1 -1
  23. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  24. package/es2015/plugins/emoji/emoji.css +1 -1
  25. package/es2015/plugins/emoji/emoji.js +1 -1
  26. package/es2015/plugins/emoji/emoji.min.js +1 -1
  27. package/es2015/plugins/export-docs/export-docs.js +1 -1
  28. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  29. package/es2015/plugins/finder/finder.css +1 -1
  30. package/es2015/plugins/finder/finder.js +1 -1
  31. package/es2015/plugins/finder/finder.min.js +1 -1
  32. package/es2015/plugins/google-maps/google-maps.css +1 -1
  33. package/es2015/plugins/google-maps/google-maps.js +1 -1
  34. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  35. package/es2015/plugins/google-search/google-search.js +1 -1
  36. package/es2015/plugins/google-search/google-search.min.js +1 -1
  37. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  38. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  39. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  40. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  41. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  42. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  43. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  44. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  45. package/es2015/plugins/keyboard/keyboard.css +1 -1
  46. package/es2015/plugins/keyboard/keyboard.js +1 -1
  47. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  48. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  49. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  50. package/es2015/plugins/page-break/page-break.js +1 -1
  51. package/es2015/plugins/page-break/page-break.min.js +1 -1
  52. package/es2015/plugins/paste-code/paste-code.css +1 -1
  53. package/es2015/plugins/paste-code/paste-code.js +1 -1
  54. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  55. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  56. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  57. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  58. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  59. package/es2015/plugins/style/style.css +1 -1
  60. package/es2015/plugins/style/style.js +1 -1
  61. package/es2015/plugins/style/style.min.js +1 -1
  62. package/es2015/plugins/templates/templates.css +1 -1
  63. package/es2015/plugins/templates/templates.js +1 -1
  64. package/es2015/plugins/templates/templates.min.js +1 -1
  65. package/es2015/plugins/todo-list/todo-list.css +1 -1
  66. package/es2015/plugins/todo-list/todo-list.js +1 -1
  67. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  68. package/es2015/plugins/translate/translate.css +1 -1
  69. package/es2015/plugins/translate/translate.js +1 -1
  70. package/es2015/plugins/translate/translate.min.js +1 -1
  71. package/es2015/plugins/tune-block/tune-block.css +1 -1
  72. package/es2015/plugins/tune-block/tune-block.js +1 -1
  73. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  74. package/es2018/jodit.fat.min.css +1 -1
  75. package/es2018/jodit.fat.min.js +9 -9
  76. package/es2018/jodit.min.css +1 -1
  77. package/es2018/jodit.min.js +9 -9
  78. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  79. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  80. package/es2018/plugins/backup/backup.min.js +1 -1
  81. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  82. package/es2018/plugins/change-case/change-case.min.js +1 -1
  83. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  84. package/es2018/plugins/emoji/emoji.min.js +1 -1
  85. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  86. package/es2018/plugins/finder/finder.min.js +1 -1
  87. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  88. package/es2018/plugins/google-search/google-search.min.js +1 -1
  89. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  90. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  91. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  92. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  93. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  94. package/es2018/plugins/page-break/page-break.min.js +1 -1
  95. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  96. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  97. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  98. package/es2018/plugins/style/style.min.js +1 -1
  99. package/es2018/plugins/templates/templates.min.js +1 -1
  100. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  101. package/es2018/plugins/translate/translate.min.js +1 -1
  102. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  103. package/es2021/jodit.css +2 -2
  104. package/es2021/jodit.fat.min.css +1 -1
  105. package/es2021/jodit.fat.min.js +16 -16
  106. package/es2021/jodit.js +792 -129
  107. package/es2021/jodit.min.css +1 -1
  108. package/es2021/jodit.min.js +16 -16
  109. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  110. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  111. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  112. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  113. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  114. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  115. package/es2021/plugins/backup/backup.css +1 -1
  116. package/es2021/plugins/backup/backup.js +1 -1
  117. package/es2021/plugins/backup/backup.min.js +1 -1
  118. package/es2021/plugins/button-generator/button-generator.css +1 -1
  119. package/es2021/plugins/button-generator/button-generator.js +1 -1
  120. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  121. package/es2021/plugins/change-case/change-case.js +1 -1
  122. package/es2021/plugins/change-case/change-case.min.js +1 -1
  123. package/es2021/plugins/color-picker/color-picker.css +1 -1
  124. package/es2021/plugins/color-picker/color-picker.js +1 -1
  125. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  126. package/es2021/plugins/emoji/emoji.css +1 -1
  127. package/es2021/plugins/emoji/emoji.js +1 -1
  128. package/es2021/plugins/emoji/emoji.min.js +1 -1
  129. package/es2021/plugins/export-docs/export-docs.js +1 -1
  130. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  131. package/es2021/plugins/finder/finder.css +1 -1
  132. package/es2021/plugins/finder/finder.js +1 -1
  133. package/es2021/plugins/finder/finder.min.js +1 -1
  134. package/es2021/plugins/google-maps/google-maps.css +1 -1
  135. package/es2021/plugins/google-maps/google-maps.js +1 -1
  136. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  137. package/es2021/plugins/google-search/google-search.js +1 -1
  138. package/es2021/plugins/google-search/google-search.min.js +1 -1
  139. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  140. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  141. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  142. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  143. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  144. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  145. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  146. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  147. package/es2021/plugins/keyboard/keyboard.css +1 -1
  148. package/es2021/plugins/keyboard/keyboard.js +1 -1
  149. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  150. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  151. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  152. package/es2021/plugins/page-break/page-break.js +1 -1
  153. package/es2021/plugins/page-break/page-break.min.js +1 -1
  154. package/es2021/plugins/paste-code/paste-code.css +1 -1
  155. package/es2021/plugins/paste-code/paste-code.js +1 -1
  156. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  157. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  158. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  159. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  160. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  161. package/es2021/plugins/style/style.css +1 -1
  162. package/es2021/plugins/style/style.js +1 -1
  163. package/es2021/plugins/style/style.min.js +1 -1
  164. package/es2021/plugins/templates/templates.css +1 -1
  165. package/es2021/plugins/templates/templates.js +1 -1
  166. package/es2021/plugins/templates/templates.min.js +1 -1
  167. package/es2021/plugins/todo-list/todo-list.css +1 -1
  168. package/es2021/plugins/todo-list/todo-list.js +1 -1
  169. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  170. package/es2021/plugins/translate/translate.css +1 -1
  171. package/es2021/plugins/translate/translate.js +1 -1
  172. package/es2021/plugins/translate/translate.min.js +1 -1
  173. package/es2021/plugins/tune-block/tune-block.css +1 -1
  174. package/es2021/plugins/tune-block/tune-block.js +1 -1
  175. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  176. package/es2021.en/jodit.css +2 -2
  177. package/es2021.en/jodit.fat.min.css +1 -1
  178. package/es2021.en/jodit.fat.min.js +15 -15
  179. package/es2021.en/jodit.js +792 -129
  180. package/es2021.en/jodit.min.css +1 -1
  181. package/es2021.en/jodit.min.js +15 -15
  182. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  183. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  184. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  185. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  186. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  187. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  188. package/es2021.en/plugins/backup/backup.css +1 -1
  189. package/es2021.en/plugins/backup/backup.js +1 -1
  190. package/es2021.en/plugins/backup/backup.min.js +1 -1
  191. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  192. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  193. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  194. package/es2021.en/plugins/change-case/change-case.js +1 -1
  195. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  196. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  197. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  198. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  199. package/es2021.en/plugins/emoji/emoji.css +1 -1
  200. package/es2021.en/plugins/emoji/emoji.js +1 -1
  201. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  202. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  203. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  204. package/es2021.en/plugins/finder/finder.css +1 -1
  205. package/es2021.en/plugins/finder/finder.js +1 -1
  206. package/es2021.en/plugins/finder/finder.min.js +1 -1
  207. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  208. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  209. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  210. package/es2021.en/plugins/google-search/google-search.js +1 -1
  211. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  212. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  213. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  214. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  215. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  216. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  217. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  218. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  219. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  220. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  221. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  222. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  223. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  224. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  225. package/es2021.en/plugins/page-break/page-break.js +1 -1
  226. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  227. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  228. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  229. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  230. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  231. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  232. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  233. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  234. package/es2021.en/plugins/style/style.css +1 -1
  235. package/es2021.en/plugins/style/style.js +1 -1
  236. package/es2021.en/plugins/style/style.min.js +1 -1
  237. package/es2021.en/plugins/templates/templates.css +1 -1
  238. package/es2021.en/plugins/templates/templates.js +1 -1
  239. package/es2021.en/plugins/templates/templates.min.js +1 -1
  240. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  241. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  242. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  243. package/es2021.en/plugins/translate/translate.css +1 -1
  244. package/es2021.en/plugins/translate/translate.js +1 -1
  245. package/es2021.en/plugins/translate/translate.min.js +1 -1
  246. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  247. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  248. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  249. package/es5/jodit.css +3 -3
  250. package/es5/jodit.fat.min.css +1 -1
  251. package/es5/jodit.fat.min.js +2 -2
  252. package/es5/jodit.js +1300 -132
  253. package/es5/jodit.min.css +3 -3
  254. package/es5/jodit.min.js +2 -2
  255. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  256. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  257. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  258. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  259. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  260. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  261. package/es5/plugins/backup/backup.css +1 -1
  262. package/es5/plugins/backup/backup.js +1 -1
  263. package/es5/plugins/backup/backup.min.js +1 -1
  264. package/es5/plugins/button-generator/button-generator.css +1 -1
  265. package/es5/plugins/button-generator/button-generator.js +1 -1
  266. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  267. package/es5/plugins/change-case/change-case.js +1 -1
  268. package/es5/plugins/change-case/change-case.min.js +1 -1
  269. package/es5/plugins/color-picker/color-picker.css +1 -1
  270. package/es5/plugins/color-picker/color-picker.js +1 -1
  271. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  272. package/es5/plugins/emoji/emoji.css +1 -1
  273. package/es5/plugins/emoji/emoji.js +1 -1
  274. package/es5/plugins/emoji/emoji.min.js +1 -1
  275. package/es5/plugins/export-docs/export-docs.js +1 -1
  276. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  277. package/es5/plugins/finder/finder.css +1 -1
  278. package/es5/plugins/finder/finder.js +1 -1
  279. package/es5/plugins/finder/finder.min.js +1 -1
  280. package/es5/plugins/google-maps/google-maps.css +1 -1
  281. package/es5/plugins/google-maps/google-maps.js +1 -1
  282. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  283. package/es5/plugins/google-search/google-search.js +1 -1
  284. package/es5/plugins/google-search/google-search.min.js +1 -1
  285. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  286. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  287. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  288. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  289. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  290. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  291. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  292. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  293. package/es5/plugins/keyboard/keyboard.css +1 -1
  294. package/es5/plugins/keyboard/keyboard.js +1 -1
  295. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  296. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  297. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  298. package/es5/plugins/page-break/page-break.js +1 -1
  299. package/es5/plugins/page-break/page-break.min.js +1 -1
  300. package/es5/plugins/paste-code/paste-code.css +1 -1
  301. package/es5/plugins/paste-code/paste-code.js +1 -1
  302. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  303. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  304. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  305. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  306. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  307. package/es5/plugins/style/style.css +1 -1
  308. package/es5/plugins/style/style.js +1 -1
  309. package/es5/plugins/style/style.min.js +1 -1
  310. package/es5/plugins/templates/templates.css +1 -1
  311. package/es5/plugins/templates/templates.js +1 -1
  312. package/es5/plugins/templates/templates.min.js +1 -1
  313. package/es5/plugins/todo-list/todo-list.css +1 -1
  314. package/es5/plugins/todo-list/todo-list.js +1 -1
  315. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  316. package/es5/plugins/translate/translate.css +1 -1
  317. package/es5/plugins/translate/translate.js +1 -1
  318. package/es5/plugins/translate/translate.min.js +1 -1
  319. package/es5/plugins/tune-block/tune-block.css +1 -1
  320. package/es5/plugins/tune-block/tune-block.js +1 -1
  321. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  322. package/es5/polyfills.fat.min.js +1 -1
  323. package/es5/polyfills.js +1 -1
  324. package/es5/polyfills.min.js +1 -1
  325. package/package.json +1 -1
package/es5/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.17.8
4
+ * Version: v4.18.0
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -745,18 +745,43 @@ var ConfigPrototype = {};
745
745
  /**
746
746
  * Class names to align images with, instead of an inline `float` or
747
747
  * `margin`. Aligning an image removes every class listed here and adds the
748
- * chosen alignment's, which can be several separated by spaces.
748
+ * chosen alignment's, which can be several separated by spaces. An
749
+ * alignment can also list several such sets, to recognise each of them;
750
+ * aligning writes the first. `alignClasses.img` takes its place when set.
749
751
  *
750
752
  * ```javascript
751
753
  * Jodit.make('#editor', {
752
754
  * imageAlignClasses: {
753
755
  * left: 'align-left',
754
756
  * right: 'align-right',
755
- * center: 'align-center'
757
+ * center: ['align-center', 'centered']
756
758
  * }
757
759
  * });
758
760
  * ```
759
761
  */ this.imageAlignClasses = null;
762
+ /**
763
+ * Class names to align elements with, by tag name, as `imageAlignClasses`
764
+ * does for images: `img`, and `video`, `audio` and `iframe` in the media
765
+ * popup. A media wrapper (see `mediaWrappers`), and Jodit's own `jodit` and
766
+ * `jodit-media` wrappers, are aligned with the classes for the media in
767
+ * them.
768
+ *
769
+ * ```javascript
770
+ * const media = {
771
+ * left: 'media-left',
772
+ * right: 'media-right',
773
+ * center: 'media-center'
774
+ * };
775
+ *
776
+ * Jodit.make('#editor', {
777
+ * alignClasses: { video: media, iframe: media }
778
+ * });
779
+ * ```
780
+ */ this.alignClasses = {};
781
+ /**
782
+ * Alignment given to the media the video popup inserts. `'normal'` leaves
783
+ * them unaligned
784
+ */ this.mediaDefaultAlign = 'normal';
760
785
  /**
761
786
  * Do not display these buttons that are on the list
762
787
  *
@@ -2308,7 +2333,7 @@ function _unsupported_iterable_to_array(o, minLen) {
2308
2333
  if (n === "Map" || n === "Set") return Array.from(n);
2309
2334
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
2310
2335
  }
2311
- var APP_VERSION = "4.17.8";
2336
+ var APP_VERSION = "4.18.0";
2312
2337
  // prettier-ignore
2313
2338
  var ES = "es5";
2314
2339
  var IS_ES_MODERN = false;
@@ -8129,6 +8154,7 @@ __webpack_require__.r(__webpack_exports__);
8129
8154
  /* harmony export */ completeUrl: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.completeUrl; },
8130
8155
  /* harmony export */ connection: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.connection; },
8131
8156
  /* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
8157
+ /* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.createMediaWrapper; },
8132
8158
  /* harmony export */ css: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.css; },
8133
8159
  /* harmony export */ cssInline: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.cssInline; },
8134
8160
  /* harmony export */ cssPath: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.cssPath; },
@@ -8139,13 +8165,16 @@ __webpack_require__.r(__webpack_exports__);
8139
8165
  /* harmony export */ fastClone: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.fastClone; },
8140
8166
  /* harmony export */ fuzzySearchIndex: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.fuzzySearchIndex; },
8141
8167
  /* harmony export */ get: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.get; },
8168
+ /* harmony export */ getAlignClasses: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getAlignClasses; },
8142
8169
  /* harmony export */ getClassName: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getClassName; },
8143
8170
  /* harmony export */ getContentWidth: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getContentWidth; },
8144
8171
  /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getDataTransfer; },
8145
8172
  /* harmony export */ getFixedPositionOffset: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getFixedPositionOffset; },
8146
8173
  /* harmony export */ getHAlign: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getHAlign; },
8174
+ /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getMediaWrapper; },
8147
8175
  /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getPropertyDescriptor; },
8148
8176
  /* harmony export */ getScrollParent: function() { return /* reexport safe */ _size_index_js__WEBPACK_IMPORTED_MODULE_6__.getScrollParent; },
8177
+ /* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getWrappedMedia; },
8149
8178
  /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.getXPathByElement; },
8150
8179
  /* harmony export */ hAlignElement: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.hAlignElement; },
8151
8180
  /* harmony export */ hasBrowserColorPicker: function() { return /* reexport safe */ _checker_index_js__WEBPACK_IMPORTED_MODULE_2__.hasBrowserColorPicker; },
@@ -8226,7 +8255,8 @@ __webpack_require__.r(__webpack_exports__);
8226
8255
  /* harmony export */ trim: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trim; },
8227
8256
  /* harmony export */ trimChars: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trimChars; },
8228
8257
  /* harmony export */ trimInv: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.trimInv; },
8229
- /* harmony export */ ucfirst: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.ucfirst; }
8258
+ /* harmony export */ ucfirst: function() { return /* reexport safe */ _string_index_js__WEBPACK_IMPORTED_MODULE_7__.ucfirst; },
8259
+ /* harmony export */ wrapMedia: function() { return /* reexport safe */ _utils_index_js__WEBPACK_IMPORTED_MODULE_8__.wrapMedia; }
8230
8260
  /* harmony export */ });
8231
8261
  /* harmony import */ var _array_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76855);
8232
8262
  /* harmony import */ var _async_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91898);
@@ -9248,12 +9278,15 @@ function trimChars(value, chars) {
9248
9278
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9249
9279
  /* harmony export */ alignElement: function() { return /* binding */ alignElement; },
9250
9280
  /* harmony export */ clearAlign: function() { return /* binding */ clearAlign; },
9281
+ /* harmony export */ getAlignClasses: function() { return /* binding */ getAlignClasses; },
9251
9282
  /* harmony export */ getHAlign: function() { return /* binding */ getHAlign; },
9252
9283
  /* harmony export */ hAlignElement: function() { return /* binding */ hAlignElement; }
9253
9284
  /* harmony export */ });
9254
9285
  /* harmony import */ var _dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
9255
- /* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
9256
- /* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
9286
+ /* harmony import */ var _checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68345);
9287
+ /* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29960);
9288
+ /* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
9289
+ /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
9257
9290
  function _array_like_to_array(arr, len) {
9258
9291
  if (len == null || len > arr.length) len = arr.length;
9259
9292
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -9288,37 +9321,65 @@ function _unsupported_iterable_to_array(o, minLen) {
9288
9321
  */ ;
9289
9322
 
9290
9323
 
9291
- var classNames = function classNames(value) {
9292
- return (value !== null && value !== void 0 ? value : '').split(/\s+/).filter(Boolean);
9324
+
9325
+
9326
+ // The sets of class names an alignment lists, the first being the one to write
9327
+ var classSets = function classSets(value) {
9328
+ return ((0,_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(value) ? value : [
9329
+ value !== null && value !== void 0 ? value : ''
9330
+ ]).map(function(set) {
9331
+ return set.split(/\s+/).filter(Boolean);
9332
+ }).filter(function(set) {
9333
+ return set.length;
9334
+ });
9293
9335
  };
9294
9336
  /**
9295
- * Align image, with `classes` (see `imageAlignClasses`) instead of inline
9296
- * styles when they are given
9337
+ * The class names to align `elm` with: `alignClasses` for its tag, or for the
9338
+ * media in it when it wraps media (a `mediaWrappers` wrapper, `jodit` or
9339
+ * `jodit-media`), falling back to `imageAlignClasses` for an image
9340
+ */ function getAlignClasses(jodit, elm) {
9341
+ var _a, _b;
9342
+ if (!elm) {
9343
+ return null;
9344
+ }
9345
+ var media = _dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
9346
+ 'jodit',
9347
+ 'jodit-media'
9348
+ ])) ? elm.firstElementChild : (0,_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getWrappedMedia)(jodit, elm);
9349
+ var tag = (media !== null && media !== void 0 ? media : elm).nodeName.toLowerCase();
9350
+ return (_b = (_a = jodit.o.alignClasses) === null || _a === void 0 ? void 0 : _a[tag]) !== null && _b !== void 0 ? _b : tag === 'img' ? jodit.o.imageAlignClasses : null;
9351
+ }
9352
+ /**
9353
+ * Align image, with `classes` (see `alignClasses`) instead of inline styles
9354
+ * when they are given
9297
9355
  */ function hAlignElement(image, align, classes) {
9356
+ var _a;
9298
9357
  if (classes) {
9299
9358
  var _image_classList, _image_classList1;
9300
9359
  hAlignElement(image, 'normal');
9301
9360
  Object.values(classes).forEach(function(value) {
9302
- return (_image_classList = image.classList).remove.apply(_image_classList, _to_consumable_array(classNames(value)));
9361
+ return classSets(value).forEach(function(set) {
9362
+ return (_image_classList = image.classList).remove.apply(_image_classList, _to_consumable_array(set));
9363
+ });
9303
9364
  });
9304
- (_image_classList1 = image.classList).add.apply(_image_classList1, _to_consumable_array(classNames(classes[align || 'normal'])));
9365
+ (_image_classList1 = image.classList).add.apply(_image_classList1, _to_consumable_array((_a = classSets(classes[align || 'normal'])[0]) !== null && _a !== void 0 ? _a : []));
9305
9366
  [
9306
9367
  'class',
9307
9368
  'style'
9308
9369
  ].forEach(function(name) {
9309
9370
  var _a;
9310
- if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
9311
- (0,_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, name, null);
9371
+ if (!((_a = (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name)) === null || _a === void 0 ? void 0 : _a.trim())) {
9372
+ (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(image, name, null);
9312
9373
  }
9313
9374
  });
9314
9375
  return;
9315
9376
  }
9316
9377
  if (align && align !== 'normal') {
9317
9378
  if (align !== 'center') {
9318
- (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'float', align);
9319
- (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.clearCenterAlign)(image);
9379
+ (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float', align);
9380
+ (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
9320
9381
  } else {
9321
- (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, {
9382
+ (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, {
9322
9383
  float: '',
9323
9384
  display: 'block',
9324
9385
  marginLeft: 'auto',
@@ -9326,13 +9387,13 @@ var classNames = function classNames(value) {
9326
9387
  });
9327
9388
  }
9328
9389
  } else {
9329
- if ((0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'float') && [
9390
+ if ((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float') && [
9330
9391
  'right',
9331
9392
  'left'
9332
- ].indexOf((0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'float').toString().toLowerCase()) !== -1) {
9333
- (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(image, 'float', '');
9393
+ ].indexOf((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float').toString().toLowerCase()) !== -1) {
9394
+ (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, 'float', '');
9334
9395
  }
9335
- ;(0,_css_js__WEBPACK_IMPORTED_MODULE_2__.clearCenterAlign)(image);
9396
+ ;(0,_css_js__WEBPACK_IMPORTED_MODULE_3__.clearCenterAlign)(image);
9336
9397
  }
9337
9398
  }
9338
9399
  /**
@@ -9346,19 +9407,20 @@ var classNames = function classNames(value) {
9346
9407
  'normal'
9347
9408
  ]; _i < _iter.length; _i++){
9348
9409
  var align = _iter[_i];
9349
- var names = classNames(classes[align]);
9350
- if (names.length && names.every(function(name) {
9351
- return elm.classList.contains(name);
9410
+ if (classSets(classes[align]).some(function(set) {
9411
+ return set.every(function(name) {
9412
+ return elm.classList.contains(name);
9413
+ });
9352
9414
  })) {
9353
9415
  return align;
9354
9416
  }
9355
9417
  }
9356
9418
  }
9357
- var float = (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'float').toLowerCase();
9419
+ var float = (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'float').toLowerCase();
9358
9420
  if (float === 'left' || float === 'right') {
9359
9421
  return float;
9360
9422
  }
9361
- if ((0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(elm, 'display') === 'block' && (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'margin-left') === 'auto' && (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'margin-right') === 'auto') {
9423
+ if ((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(elm, 'display') === 'block' && (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'margin-left') === 'auto' && (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'margin-right') === 'auto') {
9362
9424
  return 'center';
9363
9425
  }
9364
9426
  return 'normal';
@@ -9368,10 +9430,10 @@ var classNames = function classNames(value) {
9368
9430
  */ function clearAlign(node) {
9369
9431
  _dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.each(node, function(elm) {
9370
9432
  if (_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(elm)) {
9371
- if ((0,_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(elm, 'textAlign')) {
9372
- (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(elm, 'textAlign', '');
9373
- if (!((0,_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style') || '').trim().length) {
9374
- (0,_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style', null);
9433
+ if ((0,_css_js__WEBPACK_IMPORTED_MODULE_3__.cssInline)(elm, 'textAlign')) {
9434
+ (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(elm, 'textAlign', '');
9435
+ if (!((0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'style') || '').trim().length) {
9436
+ (0,_attr_js__WEBPACK_IMPORTED_MODULE_2__.attr)(elm, 'style', null);
9375
9437
  }
9376
9438
  }
9377
9439
  }
@@ -9402,7 +9464,7 @@ function alignElement(command, box) {
9402
9464
  clearAlign(box);
9403
9465
  var align = ALIGN_BY_COMMAND.get(command.toLowerCase());
9404
9466
  if (align) {
9405
- (0,_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(box, 'textAlign', align);
9467
+ (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box, 'textAlign', align);
9406
9468
  }
9407
9469
  }
9408
9470
  }
@@ -10829,13 +10891,13 @@ var getClassName = function getClassName(obj) {
10829
10891
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
10830
10892
 
10831
10893
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10832
- /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_24__.$$; },
10894
+ /* harmony export */ $$: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.$$; },
10833
10895
  /* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigDeepFlatten; },
10834
10896
  /* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigFlatten; },
10835
10897
  /* harmony export */ ConfigMerge: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigMerge; },
10836
10898
  /* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto_js__WEBPACK_IMPORTED_MODULE_7__.ConfigProto; },
10837
10899
  /* harmony export */ ConnectionError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.ConnectionError; },
10838
- /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_26__.LimitedStack; },
10900
+ /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack_js__WEBPACK_IMPORTED_MODULE_27__.LimitedStack; },
10839
10901
  /* harmony export */ OptionsError: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.OptionsError; },
10840
10902
  /* harmony export */ UNSAFE_PROTO_KEYS: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.UNSAFE_PROTO_KEYS; },
10841
10903
  /* harmony export */ abort: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.abort; },
@@ -10848,51 +10910,56 @@ var getClassName = function getClassName(obj) {
10848
10910
  /* harmony export */ attrRaw: function() { return /* reexport safe */ _attr_js__WEBPACK_IMPORTED_MODULE_3__.attrRaw; },
10849
10911
  /* harmony export */ browser: function() { return /* reexport safe */ _browser_js__WEBPACK_IMPORTED_MODULE_4__.browser; },
10850
10912
  /* harmony export */ buildQuery: function() { return /* reexport safe */ _build_query_js__WEBPACK_IMPORTED_MODULE_5__.buildQuery; },
10851
- /* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.call; },
10852
- /* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.callPromise; },
10853
- /* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.callThis; },
10913
+ /* harmony export */ call: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.call; },
10914
+ /* harmony export */ callPromise: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.callPromise; },
10915
+ /* harmony export */ callThis: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.callThis; },
10854
10916
  /* harmony export */ clearAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.clearAlign; },
10855
10917
  /* harmony export */ clearCenterAlign: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.clearCenterAlign; },
10856
10918
  /* harmony export */ cns: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.cns; },
10857
10919
  /* harmony export */ completeUrl: function() { return /* reexport safe */ _complete_url_js__WEBPACK_IMPORTED_MODULE_6__.completeUrl; },
10858
10920
  /* harmony export */ connection: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.connection; },
10859
10921
  /* harmony export */ convertMediaUrlToVideoEmbed: function() { return /* reexport safe */ _convert_media_url_to_video_embed_js__WEBPACK_IMPORTED_MODULE_8__.convertMediaUrlToVideoEmbed; },
10922
+ /* harmony export */ createMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.createMediaWrapper; },
10860
10923
  /* harmony export */ css: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.css; },
10861
10924
  /* harmony export */ cssInline: function() { return /* reexport safe */ _css_js__WEBPACK_IMPORTED_MODULE_9__.cssInline; },
10862
- /* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_24__.cssPath; },
10925
+ /* harmony export */ cssPath: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.cssPath; },
10863
10926
  /* harmony export */ ctrlKey: function() { return /* reexport safe */ _ctrl_key_js__WEBPACK_IMPORTED_MODULE_10__.ctrlKey; },
10864
10927
  /* harmony export */ dataBind: function() { return /* reexport safe */ _data_bind_js__WEBPACK_IMPORTED_MODULE_11__.dataBind; },
10865
10928
  /* harmony export */ defaultLanguage: function() { return /* reexport safe */ _default_language_js__WEBPACK_IMPORTED_MODULE_12__.defaultLanguage; },
10866
10929
  /* harmony export */ error: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.error; },
10867
10930
  /* harmony export */ fastClone: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.fastClone; },
10868
10931
  /* harmony export */ get: function() { return /* reexport safe */ _get_js__WEBPACK_IMPORTED_MODULE_15__.get; },
10932
+ /* harmony export */ getAlignClasses: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses; },
10869
10933
  /* harmony export */ getClassName: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.getClassName; },
10870
- /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.getDataTransfer; },
10934
+ /* harmony export */ getDataTransfer: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.getDataTransfer; },
10871
10935
  /* harmony export */ getHAlign: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.getHAlign; },
10872
- /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.getPropertyDescriptor; },
10873
- /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_24__.getXPathByElement; },
10936
+ /* harmony export */ getMediaWrapper: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getMediaWrapper; },
10937
+ /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.getPropertyDescriptor; },
10938
+ /* harmony export */ getWrappedMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.getWrappedMedia; },
10939
+ /* harmony export */ getXPathByElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.getXPathByElement; },
10874
10940
  /* harmony export */ hAlignElement: function() { return /* reexport safe */ _align_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement; },
10875
10941
  /* harmony export */ humanSizeToBytes: function() { return /* reexport safe */ _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__.humanSizeToBytes; },
10876
- /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_23__.inView; },
10942
+ /* harmony export */ inView: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__.inView; },
10877
10943
  /* harmony export */ isAtom: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.isAtom; },
10878
10944
  /* harmony export */ isUnsafeProtoKey: function() { return /* reexport safe */ _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__.isUnsafeProtoKey; },
10879
10945
  /* harmony export */ keepNames: function() { return /* reexport safe */ _get_class_name_js__WEBPACK_IMPORTED_MODULE_16__.keepNames; },
10880
- /* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.keys; },
10881
- /* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.loadImage; },
10946
+ /* harmony export */ keys: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.keys; },
10947
+ /* harmony export */ loadImage: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.loadImage; },
10882
10948
  /* harmony export */ loadNext: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNext; },
10883
10949
  /* harmony export */ loadNextStyle: function() { return /* reexport safe */ _append_script_js__WEBPACK_IMPORTED_MODULE_1__.loadNextStyle; },
10884
10950
  /* harmony export */ markAsAtomic: function() { return /* reexport safe */ _extend_js__WEBPACK_IMPORTED_MODULE_14__.markAsAtomic; },
10885
10951
  /* harmony export */ markDeprecated: function() { return /* reexport safe */ _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__.markDeprecated; },
10886
- /* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.markOwner; },
10887
- /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_27__.memorizeExec; },
10952
+ /* harmony export */ markOwner: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.markOwner; },
10953
+ /* harmony export */ memorizeExec: function() { return /* reexport safe */ _utils_js__WEBPACK_IMPORTED_MODULE_28__.memorizeExec; },
10888
10954
  /* harmony export */ options: function() { return /* reexport safe */ _error_index_js__WEBPACK_IMPORTED_MODULE_13__.options; },
10889
- /* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_20__.parseQuery; },
10890
- /* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_21__.previewBox; },
10891
- /* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_24__.refs; },
10892
- /* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_22__.reset; },
10893
- /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_24__.resolveElement; },
10894
- /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_23__.scrollIntoViewIfNeeded; },
10895
- /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_25__.set; }
10955
+ /* harmony export */ parseQuery: function() { return /* reexport safe */ _parse_query_js__WEBPACK_IMPORTED_MODULE_21__.parseQuery; },
10956
+ /* harmony export */ previewBox: function() { return /* reexport safe */ _print_js__WEBPACK_IMPORTED_MODULE_22__.previewBox; },
10957
+ /* harmony export */ refs: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.refs; },
10958
+ /* harmony export */ reset: function() { return /* reexport safe */ _reset_js__WEBPACK_IMPORTED_MODULE_23__.reset; },
10959
+ /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector_js__WEBPACK_IMPORTED_MODULE_25__.resolveElement; },
10960
+ /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__.scrollIntoViewIfNeeded; },
10961
+ /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_26__.set; },
10962
+ /* harmony export */ wrapMedia: function() { return /* reexport safe */ _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__.wrapMedia; }
10896
10963
  /* harmony export */ });
10897
10964
  /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
10898
10965
  /* harmony import */ var _append_script_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63799);
@@ -10914,14 +10981,15 @@ var getClassName = function getClassName(obj) {
10914
10981
  /* harmony import */ var _human_size_to_bytes_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(38420);
10915
10982
  /* harmony import */ var _is_unsafe_proto_key_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(69175);
10916
10983
  /* harmony import */ var _mark_deprecated_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(95942);
10917
- /* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(82501);
10918
- /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(11628);
10919
- /* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(58844);
10920
- /* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(26395);
10921
- /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(76078);
10922
- /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(3703);
10923
- /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(50535);
10924
- /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(37790);
10984
+ /* harmony import */ var _media_wrapper_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(61477);
10985
+ /* harmony import */ var _parse_query_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(82501);
10986
+ /* harmony import */ var _print_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(11628);
10987
+ /* harmony import */ var _reset_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(58844);
10988
+ /* harmony import */ var _scroll_into_view_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(26395);
10989
+ /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(76078);
10990
+ /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(3703);
10991
+ /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(50535);
10992
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(37790);
10925
10993
  /*!
10926
10994
  * Jodit Editor (https://xdsoft.net/jodit/)
10927
10995
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -10956,6 +11024,7 @@ var getClassName = function getClassName(obj) {
10956
11024
 
10957
11025
 
10958
11026
 
11027
+
10959
11028
 
10960
11029
 
10961
11030
  /***/ }),
@@ -11054,6 +11123,143 @@ function _unsupported_iterable_to_array(o, minLen) {
11054
11123
  }
11055
11124
 
11056
11125
 
11126
+ /***/ }),
11127
+
11128
+ /***/ 61477:
11129
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
11130
+
11131
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11132
+ /* harmony export */ createMediaWrapper: function() { return /* binding */ createMediaWrapper; },
11133
+ /* harmony export */ getMediaWrapper: function() { return /* binding */ getMediaWrapper; },
11134
+ /* harmony export */ getWrappedMedia: function() { return /* binding */ getWrappedMedia; },
11135
+ /* harmony export */ wrapMedia: function() { return /* binding */ wrapMedia; }
11136
+ /* harmony export */ });
11137
+ /* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
11138
+ function _array_like_to_array(arr, len) {
11139
+ if (len == null || len > arr.length) len = arr.length;
11140
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
11141
+ return arr2;
11142
+ }
11143
+ function _array_with_holes(arr) {
11144
+ if (Array.isArray(arr)) return arr;
11145
+ }
11146
+ function _iterable_to_array_limit(arr, i) {
11147
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
11148
+ if (_i == null) return;
11149
+ var _arr = [];
11150
+ var _n = true;
11151
+ var _d = false;
11152
+ var _s, _e;
11153
+ try {
11154
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
11155
+ _arr.push(_s.value);
11156
+ if (i && _arr.length === i) break;
11157
+ }
11158
+ } catch (err) {
11159
+ _d = true;
11160
+ _e = err;
11161
+ } finally{
11162
+ try {
11163
+ if (!_n && _i["return"] != null) _i["return"]();
11164
+ } finally{
11165
+ if (_d) throw _e;
11166
+ }
11167
+ }
11168
+ return _arr;
11169
+ }
11170
+ function _non_iterable_rest() {
11171
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11172
+ }
11173
+ function _sliced_to_array(arr, i) {
11174
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
11175
+ }
11176
+ function _unsupported_iterable_to_array(o, minLen) {
11177
+ if (!o) return;
11178
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
11179
+ var n = Object.prototype.toString.call(o).slice(8, -1);
11180
+ if (n === "Object" && o.constructor) n = o.constructor.name;
11181
+ if (n === "Map" || n === "Set") return Array.from(n);
11182
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
11183
+ }
11184
+ /*!
11185
+ * Jodit Editor (https://xdsoft.net/jodit/)
11186
+ * Released under MIT see LICENSE.txt in the project root for license information.
11187
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
11188
+ */ ;
11189
+ var isWrapper = function isWrapper(node, wrapper) {
11190
+ return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(node) && node.nodeName.toLowerCase() === wrapper.tag.toLowerCase() && node.classList.contains(wrapper.className);
11191
+ };
11192
+ /**
11193
+ * The media in `elm` when `elm` is a wrapper media keep in the content (see
11194
+ * `mediaWrappers`): an element of a type `elm` is the wrapper for
11195
+ */ function getWrappedMedia(jodit, elm) {
11196
+ var _a;
11197
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
11198
+ try {
11199
+ for(var _iterator = Object.entries((_a = jodit.o.mediaWrappers) !== null && _a !== void 0 ? _a : {})[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
11200
+ var _step_value = _sliced_to_array(_step.value, 2), tag = _step_value[0], wrapper = _step_value[1];
11201
+ if (isWrapper(elm, wrapper)) {
11202
+ var media = elm.querySelector(tag);
11203
+ if (media) {
11204
+ return media;
11205
+ }
11206
+ }
11207
+ }
11208
+ } catch (err) {
11209
+ _didIteratorError = true;
11210
+ _iteratorError = err;
11211
+ } finally{
11212
+ try {
11213
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
11214
+ _iterator.return();
11215
+ }
11216
+ } finally{
11217
+ if (_didIteratorError) {
11218
+ throw _iteratorError;
11219
+ }
11220
+ }
11221
+ }
11222
+ return null;
11223
+ }
11224
+ /**
11225
+ * The wrapper media keep in the content (see `mediaWrappers`) that is or
11226
+ * holds `node`
11227
+ */ function getMediaWrapper(jodit, node) {
11228
+ return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(node, function(elm) {
11229
+ return Boolean(getWrappedMedia(jodit, elm));
11230
+ }, jodit.editor);
11231
+ }
11232
+ /**
11233
+ * An empty wrapper for media of type `tag` to keep in the content (see
11234
+ * `mediaWrappers`), or null when there is none for it
11235
+ */ function createMediaWrapper(jodit, tag) {
11236
+ var _a;
11237
+ var wrapper = (_a = jodit.o.mediaWrappers) === null || _a === void 0 ? void 0 : _a[tag.toLowerCase()];
11238
+ if (!wrapper) {
11239
+ return null;
11240
+ }
11241
+ return jodit.createInside.element(wrapper.tag, {
11242
+ class: wrapper.className,
11243
+ contenteditable: false,
11244
+ draggable: true
11245
+ });
11246
+ }
11247
+ /**
11248
+ * Puts `element` in the wrapper for its type (see `mediaWrappers`), and
11249
+ * returns the wrapper, or `element` when there is none for it
11250
+ */ function wrapMedia(jodit, element) {
11251
+ var wrapper = createMediaWrapper(jodit, element.nodeName);
11252
+ if (!wrapper) {
11253
+ return element;
11254
+ }
11255
+ if (element.parentNode) {
11256
+ _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.before(element, wrapper);
11257
+ }
11258
+ _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.append(wrapper, element);
11259
+ return wrapper;
11260
+ }
11261
+
11262
+
11057
11263
  /***/ }),
11058
11264
 
11059
11265
  /***/ 82501:
@@ -14904,9 +15110,9 @@ var Selection = /*#__PURE__*/ function() {
14904
15110
  if (styles && (typeof styles === "undefined" ? "undefined" : _type_of(styles)) === 'object') {
14905
15111
  (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.css)(image, styles);
14906
15112
  }
14907
- var _this_j_o = this.j.o, imageDefaultAlign = _this_j_o.imageDefaultAlign, imageAlignClasses = _this_j_o.imageAlignClasses;
15113
+ var imageDefaultAlign = this.j.o.imageDefaultAlign;
14908
15114
  if (imageDefaultAlign && imageDefaultAlign !== 'normal') {
14909
- (0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.hAlignElement)(image, imageDefaultAlign, imageAlignClasses);
15115
+ (0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.hAlignElement)(image, imageDefaultAlign, (0,_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_5__.getAlignClasses)(this.j, image));
14910
15116
  }
14911
15117
  var onload = function onload1() {
14912
15118
  if (image.naturalHeight < image.offsetHeight || image.naturalWidth < image.offsetWidth) {
@@ -41476,6 +41682,7 @@ var INPUT_TAGS = new Set([
41476
41682
  'textarea',
41477
41683
  'select'
41478
41684
  ]);
41685
+ var TYPE_AHEAD_TIMEOUT = 1000;
41479
41686
  var FOCUSABLE_SELECTOR = [
41480
41687
  'button:not([disabled])',
41481
41688
  'a[href]',
@@ -41501,6 +41708,9 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
41501
41708
  currentValue: '',
41502
41709
  hasTrigger: false
41503
41710
  });
41711
+ _this.__typed = '';
41712
+ _this.__typedAt = 0;
41713
+ _this.__typedTo = null;
41504
41714
  _this.openedPopup = null;
41505
41715
  var button = _this.getElm('button');
41506
41716
  (0,_core_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_14__.assert)(button, 'Element button should exists');
@@ -41852,7 +42062,9 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
41852
42062
  items[(index + 1) % items.length].focus();
41853
42063
  break;
41854
42064
  default:
41855
- return;
42065
+ if (!this.control.list || !this.__typeAhead(e.key, items, index)) {
42066
+ return;
42067
+ }
41856
42068
  }
41857
42069
  e.preventDefault();
41858
42070
  e.stopPropagation();
@@ -41860,6 +42072,57 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
41860
42072
  },
41861
42073
  {
41862
42074
  /**
42075
+ * The mouse opens a dropdown without taking the focus out of the editor.
42076
+ * While a dropdown list is open, typing there searches the list, as in an
42077
+ * open `<select>`, instead of writing into the content
42078
+ */ key: "__onEditorKeyDown",
42079
+ value: function __onEditorKeyDown(e) {
42080
+ if (!this.openedPopup || !this.control.list || e.altKey || e.ctrlKey || e.metaKey || !this.__typeAhead(e.key, this.__popupFocusables(), -1)) {
42081
+ return;
42082
+ }
42083
+ e.preventDefault();
42084
+ return false;
42085
+ }
42086
+ },
42087
+ {
42088
+ /**
42089
+ * Typing in a dropdown list focuses the next item whose label starts with
42090
+ * the typed text, whatever their case and accents, and repeating one letter
42091
+ * cycles through the items that start with it, like the WAI-ARIA menu
42092
+ * pattern's type-ahead. The typed text starts again after a pause, or once
42093
+ * the focus has moved on
42094
+ */ key: "__typeAhead",
42095
+ value: function __typeAhead(key, items, index) {
42096
+ var _a, _b;
42097
+ var now = Date.now();
42098
+ if (now - this.__typedAt > TYPE_AHEAD_TIMEOUT || items[index] !== this.__typedTo) {
42099
+ this.__typed = '';
42100
+ }
42101
+ if (key.length !== 1 || key === ' ' && !this.__typed) {
42102
+ return false;
42103
+ }
42104
+ this.__typedAt = now;
42105
+ this.__typed += key;
42106
+ this.__typedTo = items[index];
42107
+ var compare = new Intl.Collator(undefined, {
42108
+ usage: 'search',
42109
+ sensitivity: 'base'
42110
+ }).compare, typed = this.__typed, cycle = Array.from(typed).every(function(char) {
42111
+ return compare(char, typed[0]) === 0;
42112
+ }), prefix = cycle ? typed[0] : typed, start = cycle ? index + 1 : Math.max(index, 0);
42113
+ for(var i = 0; i < items.length; i += 1){
42114
+ var item = items[(start + i) % items.length], label = (_b = (_a = item.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '';
42115
+ if (compare(label.slice(0, prefix.length), prefix) === 0) {
42116
+ item.focus();
42117
+ this.__typedTo = item;
42118
+ break;
42119
+ }
42120
+ }
42121
+ return true;
42122
+ }
42123
+ },
42124
+ {
42125
+ /**
41863
42126
  * Visible controls of the opened dropdown that can take the focus
41864
42127
  */ key: "__popupFocusables",
41865
42128
  value: function __popupFocusables() {
@@ -41878,14 +42141,18 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
41878
42141
  */ key: "__openControlList",
41879
42142
  value: function __openControlList(control) {
41880
42143
  var _this = this;
41881
- var _a;
42144
+ var _a, _b, _c, _d, _e;
41882
42145
  var controls = (_a = this.jodit.options.controls) !== null && _a !== void 0 ? _a : {}, getControl = function getControl(key) {
41883
42146
  return (0,_core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_18__.findControlType)(key, controls);
41884
42147
  };
41885
42148
  var list = control.list;
41886
42149
  var menu = this.openPopup();
41887
- var toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_21__.makeCollection)(this.j);
41888
42150
  menu.parentElement = this;
42151
+ var content = (_b = control.popup) === null || _b === void 0 ? void 0 : _b.call(control, this.j, (_e = (_d = (_c = this.toolbar) === null || _c === void 0 ? void 0 : _c.getTarget(this)) !== null && _d !== void 0 ? _d : this.target) !== null && _e !== void 0 ? _e : null, this.__closePopup, this);
42152
+ if (content) {
42153
+ return this.__openMenu(menu, content);
42154
+ }
42155
+ var toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_21__.makeCollection)(this.j);
41889
42156
  toolbar.parentElement = menu;
41890
42157
  toolbar.mode = 'vertical';
41891
42158
  var isListItem = function isListItem(key) {
@@ -41937,7 +42204,14 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
41937
42204
  toolbar.build((0,_core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(list) ? list.map(getButton) : (0,_core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_16__.keys)(list, false).map(function(key) {
41938
42205
  return getButton(key, list[key]);
41939
42206
  }), this.target);
41940
- menu.setContent(toolbar).open(function() {
42207
+ this.__openMenu(menu, toolbar);
42208
+ }
42209
+ },
42210
+ {
42211
+ key: "__openMenu",
42212
+ value: function __openMenu(menu, content) {
42213
+ var _this = this;
42214
+ menu.setContent(content).open(function() {
41941
42215
  return (0,_core_helpers_size_index_js__WEBPACK_IMPORTED_MODULE_12__.position)(_this.container);
41942
42216
  }, false, this.j.o.allowTabNavigation ? this.container : undefined);
41943
42217
  this.state.activated = true;
@@ -41959,7 +42233,7 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
41959
42233
  value: function openPopup() {
41960
42234
  this.__closePopup();
41961
42235
  this.openedPopup = new _core_ui_popup_popup_js__WEBPACK_IMPORTED_MODULE_20__.Popup(this.j, false);
41962
- this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
42236
+ this.j.e.on(this.ow, 'mousedown touchstart', this.onOutsideClick).on('escape closeAllPopups', this.onOutsideClick).on('keydown', this.__onEditorKeyDown).on(this.openedPopup.container, 'keydown', this.__onPopupKeyDown);
41963
42237
  return this.openedPopup;
41964
42238
  }
41965
42239
  },
@@ -41977,7 +42251,7 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
41977
42251
  // popup while the outer `removeChild` is still running and Chrome
41978
42252
  // throws NotFoundError. See #1458
41979
42253
  this.openedPopup = null;
41980
- this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick);
42254
+ this.j.e.off(this.ow, 'mousedown touchstart', this.onOutsideClick).off('escape closeAllPopups', this.onOutsideClick).off('keydown', this.__onEditorKeyDown);
41981
42255
  // The keyboard brought the focus into the dropdown: give it back to
41982
42256
  // the button, otherwise it would fall out to the document
41983
42257
  var activeElement = this.od.activeElement, hadFocus = activeElement && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_6__.Dom.isOrContains(popup.container, activeElement);
@@ -42062,6 +42336,9 @@ __decorate([
42062
42336
  __decorate([
42063
42337
  _core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
42064
42338
  ], ToolbarButton.prototype, "__onPopupKeyDown", null);
42339
+ __decorate([
42340
+ _core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
42341
+ ], ToolbarButton.prototype, "__onEditorKeyDown", null);
42065
42342
  __decorate([
42066
42343
  _core_decorators_autobind_autobind_js__WEBPACK_IMPORTED_MODULE_2__.autobind
42067
42344
  ], ToolbarButton.prototype, "onOutsideClick", null);
@@ -52372,12 +52649,14 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('focus', focus);
52372
52649
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
52373
52650
 
52374
52651
  /* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22732);
52375
- /* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49055);
52376
- /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
52377
- /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12153);
52378
- /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6441);
52379
- /* harmony import */ var _icons_font_svg_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4104);
52380
- /* harmony import */ var _icons_fontsize_svg_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(83709);
52652
+ /* harmony import */ var _core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68345);
52653
+ /* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49055);
52654
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
52655
+ /* harmony import */ var _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12153);
52656
+ /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6441);
52657
+ /* harmony import */ var _icons_font_svg_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4104);
52658
+ /* harmony import */ var _icons_fontsize_svg_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(83709);
52659
+ /* harmony import */ var _font_picker_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40222);
52381
52660
  function _array_like_to_array(arr, len) {
52382
52661
  if (len == null || len > arr.length) len = arr.length;
52383
52662
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -52484,11 +52763,18 @@ function _unsupported_iterable_to_array(o, minLen) {
52484
52763
 
52485
52764
 
52486
52765
 
52766
+
52767
+
52487
52768
  /**
52488
52769
  * Default font-size points
52489
- */ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.defaultFontSizePoints = 'px';
52490
- _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_3__.Icon.set('font', _icons_font_svg_js__WEBPACK_IMPORTED_MODULE_5__["default"]).set('fontsize', _icons_fontsize_svg_js__WEBPACK_IMPORTED_MODULE_6__["default"]);
52491
- _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.fontsize = {
52770
+ */ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.defaultFontSizePoints = 'px';
52771
+ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.font = {
52772
+ googleFonts: {
52773
+ url: ''
52774
+ }
52775
+ };
52776
+ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_4__.Icon.set('font', _icons_font_svg_js__WEBPACK_IMPORTED_MODULE_6__["default"]).set('fontsize', _icons_fontsize_svg_js__WEBPACK_IMPORTED_MODULE_7__["default"]);
52777
+ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.fontsize = {
52492
52778
  command: 'fontsize',
52493
52779
  data: {
52494
52780
  cssRule: 'font-size',
@@ -52534,7 +52820,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.fontsize = {
52534
52820
  }
52535
52821
  var control = button.control;
52536
52822
  var cssKey = ((_a = control.data) === null || _a === void 0 ? void 0 : _a.cssRule) || 'font-size';
52537
- var value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(box, cssKey);
52823
+ var value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box, cssKey);
52538
52824
  if (cssKey === 'font-size') {
52539
52825
  var numValue = parseFloat(value.toString());
52540
52826
  if (editor.o.defaultFontSizePoints === 'pt') {
@@ -52570,11 +52856,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.fontsize = {
52570
52856
  return keySet.has(normalize(value.toString()));
52571
52857
  }
52572
52858
  };
52573
- _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object_spread_props(_object_spread({}, _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.fontsize), {
52859
+ var hadSelection = new WeakSet();
52860
+ _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.font = _object_spread_props(_object_spread({}, _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.fontsize), {
52574
52861
  command: 'fontname',
52575
52862
  textTemplate: function textTemplate(j, value) {
52576
52863
  var _value_split = _sliced_to_array(value.split(','), 1), first = _value_split[0];
52577
- return (0,_core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_1__.trimChars)(first, '"\'');
52864
+ return (0,_core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_2__.trimChars)(first, '"\'');
52578
52865
  },
52579
52866
  list: {
52580
52867
  '': 'Default',
@@ -52596,6 +52883,9 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
52596
52883
  } catch (_a) {}
52597
52884
  return '<span data-style="'.concat(key, '" style="').concat(isAvailable ? "font-family: ".concat(key, "!important;") : '', '">').concat(value, "</span>");
52598
52885
  },
52886
+ popup: function popup(editor, current, close, button) {
52887
+ return editor.o.font.googleFonts.url ? new _font_picker_js__WEBPACK_IMPORTED_MODULE_8__.UIFontPicker(editor, button, close) : false;
52888
+ },
52599
52889
  data: {
52600
52890
  cssRule: 'font-family',
52601
52891
  normalize: function normalize(v) {
@@ -52604,19 +52894,19 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
52604
52894
  },
52605
52895
  // When no font is explicitly set, the computed font-family equals the
52606
52896
  // editor's own default (e.g. `-apple-system, …`). Return '' so the
52607
- // button shows the `Default` list entry instead of that raw stack.
52608
- // See #1370
52609
- value: function value(editor) {
52610
- var current = editor.s.current();
52611
- if (!current) {
52612
- return;
52613
- }
52614
- var box = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement, editor.editor);
52615
- if (!box) {
52897
+ // button shows the list's `Default` entry, when it has one, instead of
52898
+ // that raw stack. See #1370
52899
+ value: function value(editor, button) {
52900
+ var current = editor.s.current(), box = current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(current, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement, editor.editor);
52901
+ // Until there is a selection the button shows the editor's own font,
52902
+ // and afterwards the font of the last one
52903
+ if (box) {
52904
+ hadSelection.add(button);
52905
+ } else if (hadSelection.has(button)) {
52616
52906
  return;
52617
52907
  }
52618
- var value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(box, 'font-family').toString();
52619
- if (value === (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.css)(editor.editor, 'font-family').toString()) {
52908
+ var value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(box || editor.editor, 'font-family').toString(), list = button.control.list;
52909
+ if (value === (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__.css)(editor.editor, 'font-family').toString() && ((0,_core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(list) ? list.includes('') : '' in (list !== null && list !== void 0 ? list : {}))) {
52620
52910
  return '';
52621
52911
  }
52622
52912
  return value;
@@ -52625,6 +52915,439 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
52625
52915
  });
52626
52916
 
52627
52917
 
52918
+ /***/ }),
52919
+
52920
+ /***/ 40222:
52921
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
52922
+
52923
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
52924
+ /* harmony export */ UIFontPicker: function() { return /* binding */ UIFontPicker; }
52925
+ /* harmony export */ });
52926
+ /* harmony import */ var _core_decorators_component_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87325);
52927
+ /* harmony import */ var _core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37133);
52928
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
52929
+ /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
52930
+ /* harmony import */ var _core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68345);
52931
+ /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29960);
52932
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41180);
52933
+ /* harmony import */ var _core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(37790);
52934
+ /* harmony import */ var _core_ui_element_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(48538);
52935
+ /* harmony import */ var _google_fonts_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(41870);
52936
+ function _array_like_to_array(arr, len) {
52937
+ if (len == null || len > arr.length) len = arr.length;
52938
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
52939
+ return arr2;
52940
+ }
52941
+ function _array_without_holes(arr) {
52942
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
52943
+ }
52944
+ function _assert_this_initialized(self) {
52945
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
52946
+ return self;
52947
+ }
52948
+ function _call_super(_this, derived, args) {
52949
+ derived = _get_prototype_of(derived);
52950
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
52951
+ }
52952
+ function _class_call_check(instance, Constructor) {
52953
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
52954
+ }
52955
+ function _defineProperties(target, props) {
52956
+ for(var i = 0; i < props.length; i++){
52957
+ var descriptor = props[i];
52958
+ descriptor.enumerable = descriptor.enumerable || false;
52959
+ descriptor.configurable = true;
52960
+ if ("value" in descriptor) descriptor.writable = true;
52961
+ Object.defineProperty(target, descriptor.key, descriptor);
52962
+ }
52963
+ }
52964
+ function _create_class(Constructor, protoProps, staticProps) {
52965
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
52966
+ if (staticProps) _defineProperties(Constructor, staticProps);
52967
+ return Constructor;
52968
+ }
52969
+ function _get(target, property, receiver) {
52970
+ if (typeof Reflect !== "undefined" && Reflect.get) _get = Reflect.get;
52971
+ else {
52972
+ _get = function get(target, property, receiver) {
52973
+ var base = _super_prop_base(target, property);
52974
+ if (!base) return;
52975
+ var desc = Object.getOwnPropertyDescriptor(base, property);
52976
+ if (desc.get) return desc.get.call(receiver || target);
52977
+ return desc.value;
52978
+ };
52979
+ }
52980
+ return _get(target, property, receiver || target);
52981
+ }
52982
+ function _get_prototype_of(o) {
52983
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
52984
+ return o.__proto__ || Object.getPrototypeOf(o);
52985
+ };
52986
+ return _get_prototype_of(o);
52987
+ }
52988
+ function _inherits(subClass, superClass) {
52989
+ if (typeof superClass !== "function" && superClass !== null) {
52990
+ throw new TypeError("Super expression must either be null or a function");
52991
+ }
52992
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
52993
+ constructor: {
52994
+ value: subClass,
52995
+ writable: true,
52996
+ configurable: true
52997
+ }
52998
+ });
52999
+ if (superClass) _set_prototype_of(subClass, superClass);
53000
+ }
53001
+ function _is_native_reflect_construct() {
53002
+ try {
53003
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
53004
+ } catch (_) {}
53005
+ return (_is_native_reflect_construct = function() {
53006
+ return !!result;
53007
+ })();
53008
+ }
53009
+ function _iterable_to_array(iter) {
53010
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
53011
+ return Array.from(iter);
53012
+ }
53013
+ }
53014
+ function _non_iterable_spread() {
53015
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
53016
+ }
53017
+ function _possible_constructor_return(self, call) {
53018
+ if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
53019
+ return _assert_this_initialized(self);
53020
+ }
53021
+ function _set_prototype_of(o, p) {
53022
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
53023
+ o.__proto__ = p;
53024
+ return o;
53025
+ };
53026
+ return _set_prototype_of(o, p);
53027
+ }
53028
+ function _super_prop_base(object, property) {
53029
+ while(!Object.prototype.hasOwnProperty.call(object, property)){
53030
+ object = _get_prototype_of(object);
53031
+ if (object === null) break;
53032
+ }
53033
+ return object;
53034
+ }
53035
+ function _to_consumable_array(arr) {
53036
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
53037
+ }
53038
+ function _type_of(obj) {
53039
+ "@swc/helpers - typeof";
53040
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
53041
+ }
53042
+ function _unsupported_iterable_to_array(o, minLen) {
53043
+ if (!o) return;
53044
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
53045
+ var n = Object.prototype.toString.call(o).slice(8, -1);
53046
+ if (n === "Object" && o.constructor) n = o.constructor.name;
53047
+ if (n === "Map" || n === "Set") return Array.from(n);
53048
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
53049
+ }
53050
+ /*!
53051
+ * Jodit Editor (https://xdsoft.net/jodit/)
53052
+ * Released under MIT see LICENSE.txt in the project root for license information.
53053
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
53054
+ */ var __decorate = undefined && undefined.__decorate || function(decorators, target, key, desc) {
53055
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
53056
+ if ((typeof Reflect === "undefined" ? "undefined" : _type_of(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
53057
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
53058
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
53059
+ };
53060
+
53061
+
53062
+
53063
+
53064
+
53065
+
53066
+
53067
+
53068
+
53069
+
53070
+ var HEADINGS = [
53071
+ 'h1',
53072
+ 'h2',
53073
+ 'h3',
53074
+ 'h4',
53075
+ 'h5',
53076
+ 'h6'
53077
+ ];
53078
+ var GENERIC_FAMILIES = new Set([
53079
+ 'serif',
53080
+ 'sans-serif',
53081
+ 'monospace',
53082
+ 'cursive',
53083
+ 'fantasy',
53084
+ 'system-ui',
53085
+ 'ui-serif',
53086
+ 'ui-sans-serif',
53087
+ 'ui-monospace',
53088
+ 'ui-rounded'
53089
+ ]);
53090
+ /**
53091
+ * A family that names a font, not a generic family or a vendor keyword such
53092
+ * as `-apple-system`
53093
+ */ function isFontName(family) {
53094
+ return Boolean(family) && !family.startsWith('-') && !GENERIC_FAMILIES.has(family);
53095
+ }
53096
+ /**
53097
+ * The font family dropdown with Google Fonts. Under their own headings it
53098
+ * lists the fonts the editor's styles give text and headings, the fonts the
53099
+ * content uses, the control's list and the Google Fonts library
53100
+ */ var UIFontPicker = /*#__PURE__*/ function(UIElement) {
53101
+ "use strict";
53102
+ _inherits(UIFontPicker, UIElement);
53103
+ function UIFontPicker(jodit, __button, __close) {
53104
+ _class_call_check(this, UIFontPicker);
53105
+ var _this;
53106
+ _this = _call_super(this, UIFontPicker, [
53107
+ jodit
53108
+ ]);
53109
+ _this.__button = __button;
53110
+ _this.__close = __close;
53111
+ _this.__fonts = new Map();
53112
+ _this.__observer = null;
53113
+ _this.__googleFonts = jodit.getInstance(_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.GoogleFonts);
53114
+ _this.__render();
53115
+ if (!_this.__googleFonts.fonts.size) {
53116
+ _this.__googleFonts.ready.then(function() {
53117
+ return !_this.isDestructed && _this.__render();
53118
+ });
53119
+ }
53120
+ return _this;
53121
+ }
53122
+ _create_class(UIFontPicker, [
53123
+ {
53124
+ key: "className",
53125
+ value: function className() {
53126
+ return 'UIFontPicker';
53127
+ }
53128
+ },
53129
+ {
53130
+ key: "__render",
53131
+ value: function __render() {
53132
+ var _this = this;
53133
+ var _a, _b;
53134
+ var control = this.__button.control, _control_list = control.list, list = _control_list === void 0 ? {} : _control_list, listed = (0,_core_helpers_checker_is_array_js__WEBPACK_IMPORTED_MODULE_4__.isArray)(list) ? list.map(function(key) {
53135
+ return {
53136
+ value: key.toString(),
53137
+ title: key.toString()
53138
+ };
53139
+ }) : (0,_core_helpers_utils_utils_js__WEBPACK_IMPORTED_MODULE_7__.keys)(list, false).map(function(key) {
53140
+ return {
53141
+ value: key,
53142
+ title: list[key].toString()
53143
+ };
53144
+ }), google = Array.from(this.__googleFonts.fonts.values(), function(font) {
53145
+ return {
53146
+ value: _this.__googleFonts.value(font),
53147
+ title: font.family,
53148
+ font: font
53149
+ };
53150
+ }), byFamily = new Map();
53151
+ _to_consumable_array(google).concat(_to_consumable_array(listed)).forEach(function(entry) {
53152
+ return byFamily.set((0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(entry.value), entry);
53153
+ });
53154
+ var theme = new Map(), used = new Map();
53155
+ // The theme's own fonts are listed too, so its body font can be chosen
53156
+ // to take a font off
53157
+ this.__themeFonts().forEach(function(fontFamily) {
53158
+ var _a;
53159
+ var family = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(fontFamily), title = fontFamily.split(',')[0].replace(/["']/g, '').trim(), entry = (_a = byFamily.get(family)) !== null && _a !== void 0 ? _a : isFontName(family) ? {
53160
+ value: fontFamily,
53161
+ title: title
53162
+ } : undefined;
53163
+ entry && !theme.has(family) && theme.set(family, entry);
53164
+ });
53165
+ this.__usedFonts().forEach(function(fontFamily) {
53166
+ var family = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(fontFamily), entry = byFamily.get(family);
53167
+ entry && !theme.has(family) && used.set(family, entry);
53168
+ });
53169
+ var defaultEntry = listed.find(function(entry) {
53170
+ return entry.value === '';
53171
+ }), current = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)((_b = (_a = control.value) === null || _a === void 0 ? void 0 : _a.call(control, this.j, this.__button)) !== null && _b !== void 0 ? _b : '');
53172
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.detach(this.container);
53173
+ this.__fonts.clear();
53174
+ defaultEntry && this.__append(current, [
53175
+ defaultEntry
53176
+ ]);
53177
+ this.__append(current, _to_consumable_array(theme.values()), 'Theme fonts');
53178
+ this.__append(current, _to_consumable_array(used.values()), 'Used fonts');
53179
+ this.__append(current, listed.filter(function(entry) {
53180
+ return entry !== defaultEntry;
53181
+ }), 'System fonts');
53182
+ this.__append(current, google, 'Google Fonts');
53183
+ this.__observeGoogleFonts();
53184
+ }
53185
+ },
53186
+ {
53187
+ /**
53188
+ * The fonts the editor's styles give text and each heading
53189
+ */ key: "__themeFonts",
53190
+ value: function __themeFonts() {
53191
+ var _this = this;
53192
+ var editor = this.j.editor, fonts = [
53193
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(editor, 'font-family').toString()
53194
+ ];
53195
+ HEADINGS.forEach(function(tag) {
53196
+ var heading = _this.j.createInside.element(tag, {
53197
+ style: 'display: none'
53198
+ });
53199
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(editor, heading);
53200
+ fonts.push((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(heading, 'font-family').toString());
53201
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.safeRemove(heading);
53202
+ });
53203
+ return fonts;
53204
+ }
53205
+ },
53206
+ {
53207
+ /**
53208
+ * The fonts the content sets
53209
+ */ key: "__usedFonts",
53210
+ value: function __usedFonts() {
53211
+ return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'), function(element) {
53212
+ return element.style.fontFamily;
53213
+ });
53214
+ }
53215
+ },
53216
+ {
53217
+ key: "__append",
53218
+ value: function __append(current, entries, heading) {
53219
+ var _this = this;
53220
+ if (!entries.length) {
53221
+ return;
53222
+ }
53223
+ var control = this.__button.control, group = this.j.c.div(this.getFullElName('group'));
53224
+ if (heading) {
53225
+ var title = this.j.c.div(this.getFullElName('heading'), {
53226
+ id: "".concat(this.getFullElName('heading'), "-").concat((0,_core_global_js__WEBPACK_IMPORTED_MODULE_3__.uniqueUid)())
53227
+ });
53228
+ title.textContent = this.i18n(heading);
53229
+ (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(group, {
53230
+ role: 'group',
53231
+ 'aria-labelledby': title.id
53232
+ });
53233
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(group, title);
53234
+ }
53235
+ entries.forEach(function(entry) {
53236
+ var _a, _b;
53237
+ var item = _this.j.c.element('button', {
53238
+ type: 'button',
53239
+ class: _this.getFullElName('item'),
53240
+ 'data-value': entry.value,
53241
+ 'aria-pressed': (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(entry.value) === current
53242
+ });
53243
+ if (entry.font) {
53244
+ item.textContent = entry.title;
53245
+ _this.__fonts.set(item, entry.font);
53246
+ } else {
53247
+ item.innerHTML = (_b = (_a = control.childTemplate) === null || _a === void 0 ? void 0 : _a.call(control, _this.j, entry.value, entry.title, _this.__button)) !== null && _b !== void 0 ? _b : entry.title;
53248
+ }
53249
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(group, item);
53250
+ });
53251
+ _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.append(this.container, group);
53252
+ }
53253
+ },
53254
+ {
53255
+ /**
53256
+ * Shows the names of the Google Fonts in view, and those just below it,
53257
+ * in their own fonts. Setting every item's font up front would have the
53258
+ * browser look for each of the library's families among the installed
53259
+ * fonts the first time the list opens
53260
+ */ key: "__observeGoogleFonts",
53261
+ value: function __observeGoogleFonts() {
53262
+ var _this = this;
53263
+ this.j.async.requestAnimationFrame(function() {
53264
+ var _a;
53265
+ (_a = _this.__observer) === null || _a === void 0 ? void 0 : _a.disconnect();
53266
+ if (_this.isDestructed || !_this.__fonts.size) {
53267
+ return;
53268
+ }
53269
+ var observer = new IntersectionObserver(function(entries) {
53270
+ var fonts = [];
53271
+ entries.forEach(function(param) {
53272
+ var isIntersecting = param.isIntersecting, target = param.target;
53273
+ var font = _this.__fonts.get(target);
53274
+ if (isIntersecting && font) {
53275
+ fonts.push(font);
53276
+ (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(target, {
53277
+ fontFamily: _this.__googleFonts.value(font)
53278
+ });
53279
+ observer.unobserve(target);
53280
+ }
53281
+ });
53282
+ _this.__googleFonts.preview(fonts);
53283
+ }, {
53284
+ root: _this.container.parentElement,
53285
+ rootMargin: '0px 0px 400px 0px'
53286
+ });
53287
+ _this.__fonts.forEach(function(_, item) {
53288
+ return observer.observe(item);
53289
+ });
53290
+ _this.__observer = observer;
53291
+ });
53292
+ }
53293
+ },
53294
+ {
53295
+ /**
53296
+ * Keeps the editor's selection, as the toolbar buttons do
53297
+ */ key: "onMouseDown",
53298
+ value: function onMouseDown(e) {
53299
+ e.preventDefault();
53300
+ }
53301
+ },
53302
+ {
53303
+ key: "onClick",
53304
+ value: function onClick(e) {
53305
+ var _a;
53306
+ var item = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(e.target, function(node) {
53307
+ return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(node) && node.hasAttribute('data-value');
53308
+ }, this.container);
53309
+ if (!item) {
53310
+ return;
53311
+ }
53312
+ var value = (_a = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_5__.attr)(item, 'data-value')) !== null && _a !== void 0 ? _a : '', font = this.__googleFonts.find(value), // The font the text has anyway is taken off rather than written
53313
+ inherited = (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(value) === (0,_google_fonts_js__WEBPACK_IMPORTED_MODULE_9__.firstFamily)(this.__blockFont());
53314
+ font && !inherited && this.__googleFonts.load(font);
53315
+ this.j.execCommand('fontname', false, inherited ? '' : value);
53316
+ this.__close();
53317
+ }
53318
+ },
53319
+ {
53320
+ /**
53321
+ * The font the selected text has without a font of its own: its block's
53322
+ */ key: "__blockFont",
53323
+ value: function __blockFont() {
53324
+ var block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(this.j.s.current(), _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock, this.j.editor);
53325
+ return (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__.css)(block !== null && block !== void 0 ? block : this.j.editor, 'font-family').toString();
53326
+ }
53327
+ },
53328
+ {
53329
+ key: "destruct",
53330
+ value: function destruct() {
53331
+ var _a;
53332
+ (_a = this.__observer) === null || _a === void 0 ? void 0 : _a.disconnect();
53333
+ _get(_get_prototype_of(UIFontPicker.prototype), "destruct", this).call(this);
53334
+ }
53335
+ }
53336
+ ]);
53337
+ return UIFontPicker;
53338
+ }(_core_ui_element_js__WEBPACK_IMPORTED_MODULE_8__.UIElement);
53339
+ __decorate([
53340
+ (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__.watch)('container:mousedown')
53341
+ ], UIFontPicker.prototype, "onMouseDown", null);
53342
+ __decorate([
53343
+ (0,_core_decorators_watch_watch_js__WEBPACK_IMPORTED_MODULE_1__.watch)('container:click')
53344
+ ], UIFontPicker.prototype, "onClick", null);
53345
+ UIFontPicker = __decorate([
53346
+ _core_decorators_component_component_js__WEBPACK_IMPORTED_MODULE_0__.component
53347
+ ], UIFontPicker);
53348
+
53349
+
53350
+
52628
53351
  /***/ }),
52629
53352
 
52630
53353
  /***/ 23399:
@@ -52634,6 +53357,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
52634
53357
  /* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(580);
52635
53358
  /* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21537);
52636
53359
  /* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28252);
53360
+ /* harmony import */ var _google_fonts_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41870);
52637
53361
  /*!
52638
53362
  * Jodit Editor (https://xdsoft.net/jodit/)
52639
53363
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -52641,6 +53365,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
52641
53365
  */
52642
53366
 
52643
53367
 
53368
+
52644
53369
  /**
52645
53370
  * Process commands `fontsize` and `fontname`
52646
53371
  */ function font(editor) {
@@ -52651,6 +53376,22 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
52651
53376
  name: 'fontsize',
52652
53377
  group: 'font'
52653
53378
  });
53379
+ if (editor.o.font.googleFonts.url) {
53380
+ var googleFonts = editor.getInstance(_google_fonts_js__WEBPACK_IMPORTED_MODULE_3__.GoogleFonts), loadUsed = editor.async.debounce(function() {
53381
+ return googleFonts.loadUsed();
53382
+ }, editor.defaultTimeout);
53383
+ googleFonts.ready.then(loadUsed);
53384
+ editor.e.on('afterInit afterSetMode change', loadUsed);
53385
+ }
53386
+ // An iframe's stylesheets can arrive after the toolbar first shows the
53387
+ // editor's font
53388
+ editor.e.on('afterInit', function() {
53389
+ editor.iframe && editor.e.on(editor.ed, 'load', function() {
53390
+ return editor.e.fire('updateToolbar');
53391
+ }, {
53392
+ capture: true
53393
+ });
53394
+ });
52654
53395
  var callback = function callback(command, second, third) {
52655
53396
  switch(command){
52656
53397
  case 'fontsize':
@@ -52680,6 +53421,375 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.font = _object
52680
53421
  _core_global_js__WEBPACK_IMPORTED_MODULE_0__.pluginSystem.add('font', font);
52681
53422
 
52682
53423
 
53424
+ /***/ }),
53425
+
53426
+ /***/ 41870:
53427
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
53428
+
53429
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
53430
+ /* harmony export */ GoogleFonts: function() { return /* binding */ GoogleFonts; },
53431
+ /* harmony export */ firstFamily: function() { return /* binding */ firstFamily; }
53432
+ /* harmony export */ });
53433
+ /* harmony import */ var _core_component_view_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80480);
53434
+ /* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2748);
53435
+ /* harmony import */ var _core_request_ajax_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54079);
53436
+ function _array_like_to_array(arr, len) {
53437
+ if (len == null || len > arr.length) len = arr.length;
53438
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
53439
+ return arr2;
53440
+ }
53441
+ function _array_with_holes(arr) {
53442
+ if (Array.isArray(arr)) return arr;
53443
+ }
53444
+ function _array_without_holes(arr) {
53445
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
53446
+ }
53447
+ function _assert_this_initialized(self) {
53448
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
53449
+ return self;
53450
+ }
53451
+ function _call_super(_this, derived, args) {
53452
+ derived = _get_prototype_of(derived);
53453
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
53454
+ }
53455
+ function _class_call_check(instance, Constructor) {
53456
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
53457
+ }
53458
+ function _defineProperties(target, props) {
53459
+ for(var i = 0; i < props.length; i++){
53460
+ var descriptor = props[i];
53461
+ descriptor.enumerable = descriptor.enumerable || false;
53462
+ descriptor.configurable = true;
53463
+ if ("value" in descriptor) descriptor.writable = true;
53464
+ Object.defineProperty(target, descriptor.key, descriptor);
53465
+ }
53466
+ }
53467
+ function _create_class(Constructor, protoProps, staticProps) {
53468
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
53469
+ if (staticProps) _defineProperties(Constructor, staticProps);
53470
+ return Constructor;
53471
+ }
53472
+ function _get(target, property, receiver) {
53473
+ if (typeof Reflect !== "undefined" && Reflect.get) _get = Reflect.get;
53474
+ else {
53475
+ _get = function get(target, property, receiver) {
53476
+ var base = _super_prop_base(target, property);
53477
+ if (!base) return;
53478
+ var desc = Object.getOwnPropertyDescriptor(base, property);
53479
+ if (desc.get) return desc.get.call(receiver || target);
53480
+ return desc.value;
53481
+ };
53482
+ }
53483
+ return _get(target, property, receiver || target);
53484
+ }
53485
+ function _get_prototype_of(o) {
53486
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
53487
+ return o.__proto__ || Object.getPrototypeOf(o);
53488
+ };
53489
+ return _get_prototype_of(o);
53490
+ }
53491
+ function _inherits(subClass, superClass) {
53492
+ if (typeof superClass !== "function" && superClass !== null) {
53493
+ throw new TypeError("Super expression must either be null or a function");
53494
+ }
53495
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
53496
+ constructor: {
53497
+ value: subClass,
53498
+ writable: true,
53499
+ configurable: true
53500
+ }
53501
+ });
53502
+ if (superClass) _set_prototype_of(subClass, superClass);
53503
+ }
53504
+ function _is_native_reflect_construct() {
53505
+ try {
53506
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
53507
+ } catch (_) {}
53508
+ return (_is_native_reflect_construct = function() {
53509
+ return !!result;
53510
+ })();
53511
+ }
53512
+ function _iterable_to_array(iter) {
53513
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
53514
+ return Array.from(iter);
53515
+ }
53516
+ }
53517
+ function _iterable_to_array_limit(arr, i) {
53518
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
53519
+ if (_i == null) return;
53520
+ var _arr = [];
53521
+ var _n = true;
53522
+ var _d = false;
53523
+ var _s, _e;
53524
+ try {
53525
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
53526
+ _arr.push(_s.value);
53527
+ if (i && _arr.length === i) break;
53528
+ }
53529
+ } catch (err) {
53530
+ _d = true;
53531
+ _e = err;
53532
+ } finally{
53533
+ try {
53534
+ if (!_n && _i["return"] != null) _i["return"]();
53535
+ } finally{
53536
+ if (_d) throw _e;
53537
+ }
53538
+ }
53539
+ return _arr;
53540
+ }
53541
+ function _non_iterable_rest() {
53542
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
53543
+ }
53544
+ function _non_iterable_spread() {
53545
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
53546
+ }
53547
+ function _possible_constructor_return(self, call) {
53548
+ if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
53549
+ return _assert_this_initialized(self);
53550
+ }
53551
+ function _set_prototype_of(o, p) {
53552
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
53553
+ o.__proto__ = p;
53554
+ return o;
53555
+ };
53556
+ return _set_prototype_of(o, p);
53557
+ }
53558
+ function _sliced_to_array(arr, i) {
53559
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
53560
+ }
53561
+ function _super_prop_base(object, property) {
53562
+ while(!Object.prototype.hasOwnProperty.call(object, property)){
53563
+ object = _get_prototype_of(object);
53564
+ if (object === null) break;
53565
+ }
53566
+ return object;
53567
+ }
53568
+ function _to_consumable_array(arr) {
53569
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
53570
+ }
53571
+ function _type_of(obj) {
53572
+ "@swc/helpers - typeof";
53573
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
53574
+ }
53575
+ function _unsupported_iterable_to_array(o, minLen) {
53576
+ if (!o) return;
53577
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
53578
+ var n = Object.prototype.toString.call(o).slice(8, -1);
53579
+ if (n === "Object" && o.constructor) n = o.constructor.name;
53580
+ if (n === "Map" || n === "Set") return Array.from(n);
53581
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
53582
+ }
53583
+ /*!
53584
+ * Jodit Editor (https://xdsoft.net/jodit/)
53585
+ * Released under MIT see LICENSE.txt in the project root for license information.
53586
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
53587
+ */ ;
53588
+
53589
+
53590
+ var CSS_URL = 'https://fonts.googleapis.com/css2';
53591
+ // `cursive` and `fantasy` stand in badly for a handwriting or display font
53592
+ var GENERIC_FAMILIES = {
53593
+ serif: 'serif',
53594
+ monospace: 'monospace'
53595
+ };
53596
+ var libraries = new Map();
53597
+ /**
53598
+ * The fonts of the library at `url`, fetched once for every editor on the page
53599
+ */ function library(jodit, url) {
53600
+ var fonts = libraries.get(url);
53601
+ if (!fonts) {
53602
+ var ajax = new _core_request_ajax_js__WEBPACK_IMPORTED_MODULE_2__.Ajax({
53603
+ url: url,
53604
+ method: 'GET'
53605
+ }, jodit.o.defaultAjaxOptions);
53606
+ fonts = ajax.send().then(function(response) {
53607
+ return response.json();
53608
+ })// A font without a regular style can't be asked for by its name alone
53609
+ .then(function(param) {
53610
+ var items = param.items;
53611
+ return items.filter(function(font) {
53612
+ return font.variants.includes('regular');
53613
+ });
53614
+ }).catch(function() {
53615
+ libraries.delete(url);
53616
+ return [];
53617
+ }).finally(function() {
53618
+ return ajax.destruct();
53619
+ });
53620
+ libraries.set(url, fonts);
53621
+ }
53622
+ return fonts;
53623
+ }
53624
+ /**
53625
+ * The first family of a `font-family` value, unquoted and in lower case for
53626
+ * comparing
53627
+ */ function firstFamily(fontFamily) {
53628
+ return fontFamily.split(',')[0].replace(/["']/g, '').trim().toLowerCase();
53629
+ }
53630
+ /**
53631
+ * Loads fonts from Google Fonts: the whole of each font the content uses into
53632
+ * the editor's document, and just the letters of its name for the font list
53633
+ */ var GoogleFonts = /*#__PURE__*/ function(ViewComponent) {
53634
+ "use strict";
53635
+ _inherits(GoogleFonts, ViewComponent);
53636
+ function GoogleFonts(jodit) {
53637
+ _class_call_check(this, GoogleFonts);
53638
+ var _this;
53639
+ _this = _call_super(this, GoogleFonts, [
53640
+ jodit
53641
+ ]);
53642
+ /**
53643
+ * The library by lower-case family, empty until it arrives
53644
+ */ _this.fonts = new Map();
53645
+ _this.__links = [];
53646
+ _this.__loaded = new WeakMap();
53647
+ _this.__previewed = new Set();
53648
+ _this.ready = library(jodit, jodit.o.font.googleFonts.url).then(function(fonts) {
53649
+ fonts.forEach(function(font) {
53650
+ return _this.fonts.set(font.family.toLowerCase(), font);
53651
+ });
53652
+ });
53653
+ return _this;
53654
+ }
53655
+ _create_class(GoogleFonts, [
53656
+ {
53657
+ key: "className",
53658
+ value: function className() {
53659
+ return 'GoogleFonts';
53660
+ }
53661
+ },
53662
+ {
53663
+ /**
53664
+ * The library's font named first in a `font-family` value
53665
+ */ key: "find",
53666
+ value: function find(fontFamily) {
53667
+ return this.fonts.get(firstFamily(fontFamily));
53668
+ }
53669
+ },
53670
+ {
53671
+ /**
53672
+ * The `font-family` value that applies a font
53673
+ */ key: "value",
53674
+ value: function value(font) {
53675
+ var _a;
53676
+ return "'".concat(font.family, "', ").concat((_a = GENERIC_FAMILIES[font.category]) !== null && _a !== void 0 ? _a : 'sans-serif');
53677
+ }
53678
+ },
53679
+ {
53680
+ /**
53681
+ * Loads the regular, italic, bold and bold italic styles that a font has
53682
+ * into the editor's document
53683
+ */ key: "load",
53684
+ value: function load(font) {
53685
+ var loaded = this.__loadedInto(this.j.ed);
53686
+ if (loaded.has(font.family)) {
53687
+ return;
53688
+ }
53689
+ loaded.add(font.family);
53690
+ var styles = [
53691
+ [
53692
+ 'regular',
53693
+ '0,400'
53694
+ ],
53695
+ [
53696
+ '700',
53697
+ '0,700'
53698
+ ],
53699
+ [
53700
+ 'italic',
53701
+ '1,400'
53702
+ ],
53703
+ [
53704
+ '700italic',
53705
+ '1,700'
53706
+ ]
53707
+ ].filter(function(param) {
53708
+ var _param = _sliced_to_array(param, 1), variant = _param[0];
53709
+ return font.variants.includes(variant);
53710
+ }).map(function(param) {
53711
+ var _param = _sliced_to_array(param, 2), style = _param[1];
53712
+ return style;
53713
+ });
53714
+ this.__append(this.j.ed, "family=".concat(this.__family(font), ":ital,wght@").concat(styles.join(';')));
53715
+ }
53716
+ },
53717
+ {
53718
+ /**
53719
+ * Loads every font of the library that the content uses
53720
+ */ key: "loadUsed",
53721
+ value: function loadUsed() {
53722
+ var _this = this;
53723
+ this.j.editor.querySelectorAll('[style*="font-family"]').forEach(function(element) {
53724
+ var font = _this.find(element.style.fontFamily);
53725
+ font && _this.load(font);
53726
+ });
53727
+ }
53728
+ },
53729
+ {
53730
+ /**
53731
+ * Loads into the page just the letters of each font's name, so the font
53732
+ * list can show the name in its font
53733
+ */ key: "preview",
53734
+ value: function preview(fonts) {
53735
+ var _this = this;
53736
+ var loaded = this.__loadedInto(this.j.od);
53737
+ fonts = fonts.filter(function(font) {
53738
+ return !_this.__previewed.has(font.family) && !loaded.has(font.family);
53739
+ });
53740
+ if (!fonts.length) {
53741
+ return;
53742
+ }
53743
+ fonts.forEach(function(font) {
53744
+ return _this.__previewed.add(font.family);
53745
+ });
53746
+ var families = fonts.map(function(font) {
53747
+ return "family=".concat(_this.__family(font));
53748
+ }), letters = new Set(fonts.map(function(font) {
53749
+ return font.family;
53750
+ }).join(''));
53751
+ this.__append(this.j.od, "".concat(families.join('&'), "&text=").concat(encodeURIComponent(_to_consumable_array(letters).join(''))));
53752
+ }
53753
+ },
53754
+ {
53755
+ key: "__loadedInto",
53756
+ value: function __loadedInto(doc) {
53757
+ var _a;
53758
+ var loaded = (_a = this.__loaded.get(doc)) !== null && _a !== void 0 ? _a : new Set();
53759
+ this.__loaded.set(doc, loaded);
53760
+ return loaded;
53761
+ }
53762
+ },
53763
+ {
53764
+ key: "__family",
53765
+ value: function __family(font) {
53766
+ return encodeURIComponent(font.family).replace(/%20/g, '+');
53767
+ }
53768
+ },
53769
+ {
53770
+ key: "__append",
53771
+ value: function __append(doc, query) {
53772
+ var link = doc.createElement('link');
53773
+ link.rel = 'stylesheet';
53774
+ link.href = "".concat(CSS_URL, "?").concat(query, "&display=swap");
53775
+ doc.head.appendChild(link);
53776
+ this.__links.push(link);
53777
+ }
53778
+ },
53779
+ {
53780
+ key: "destruct",
53781
+ value: function destruct() {
53782
+ this.__links.forEach(function(link) {
53783
+ return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(link);
53784
+ });
53785
+ _get(_get_prototype_of(GoogleFonts.prototype), "destruct", this).call(this);
53786
+ }
53787
+ }
53788
+ ]);
53789
+ return GoogleFonts;
53790
+ }(_core_component_view_component_js__WEBPACK_IMPORTED_MODULE_0__.ViewComponent);
53791
+
53792
+
52683
53793
  /***/ }),
52684
53794
 
52685
53795
  /***/ 4104:
@@ -54716,12 +55826,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('imageProperties',
54716
55826
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
54717
55827
  /* harmony export */ readValuesFromImage: function() { return /* binding */ readValuesFromImage; }
54718
55828
  /* harmony export */ });
54719
- /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29960);
54720
- /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41180);
54721
- /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(51642);
54722
- /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75595);
54723
- /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(47749);
54724
- /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(32566);
55829
+ /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25726);
55830
+ /* harmony import */ var _core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29960);
55831
+ /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41180);
55832
+ /* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51642);
55833
+ /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75595);
55834
+ /* harmony import */ var _margin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47749);
55835
+ /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32566);
54725
55836
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
54726
55837
  try {
54727
55838
  var info = gen[key](arg);
@@ -54857,6 +55968,7 @@ function _ts_generator(thisArg, body) {
54857
55968
 
54858
55969
 
54859
55970
 
55971
+
54860
55972
  /**
54861
55973
  * Read values from image and set it to state
54862
55974
  * @private
@@ -54865,29 +55977,29 @@ function _ts_generator(thisArg, body) {
54865
55977
  var image, values;
54866
55978
  return _ts_generator(this, function(_state) {
54867
55979
  image = state.sourceImage, values = state.values;
54868
- (0,_align_js__WEBPACK_IMPORTED_MODULE_2__.readAlign)(image, values, j.o.imageAlignClasses);
55980
+ (0,_align_js__WEBPACK_IMPORTED_MODULE_3__.readAlign)(image, values, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(j, image));
54869
55981
  // Border radius
54870
- values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_1__.cssInline)(image, 'border-radius') || '0', 10) || 0;
55982
+ values.borderRadius = parseInt((0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__.cssInline)(image, 'border-radius') || '0', 10) || 0;
54871
55983
  // Id
54872
- values.id = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__.attr)(image, 'id') || '';
55984
+ values.id = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id') || '';
54873
55985
  // Title
54874
- values.imageTitle = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__.attr)(image, 'title') || '';
55986
+ values.imageTitle = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'title') || '';
54875
55987
  // Alt
54876
- values.imageAlt = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__.attr)(image, 'alt') || '';
55988
+ values.imageAlt = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'alt') || '';
54877
55989
  // Style
54878
- values.style = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__.attr)(image, 'style') || '';
55990
+ values.style = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'style') || '';
54879
55991
  // Classes
54880
- values.classes = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
55992
+ values.classes = ((0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'class') || '').replace(/jodit_focused_image[\s]*/, '');
54881
55993
  // Margins
54882
- (0,_margin_js__WEBPACK_IMPORTED_MODULE_4__.readMargins)(image, values, state);
55994
+ (0,_margin_js__WEBPACK_IMPORTED_MODULE_5__.readMargins)(image, values, state);
54883
55995
  // Link
54884
- (0,_link_js__WEBPACK_IMPORTED_MODULE_3__.readLink)(state, j, values);
55996
+ (0,_link_js__WEBPACK_IMPORTED_MODULE_4__.readLink)(state, j, values);
54885
55997
  // Src
54886
- values.imageSrc = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__.attr)(image, 'src') || '';
55998
+ values.imageSrc = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'src') || '';
54887
55999
  // Image size
54888
56000
  return [
54889
56001
  2,
54890
- (0,_size_js__WEBPACK_IMPORTED_MODULE_5__.readSizes)(image, values, state)
56002
+ (0,_size_js__WEBPACK_IMPORTED_MODULE_6__.readSizes)(image, values, state)
54891
56003
  ];
54892
56004
  });
54893
56005
  })();
@@ -56793,7 +57905,7 @@ function _ts_generator(thisArg, body) {
56793
57905
  (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.attr)(image, 'id', id || null);
56794
57906
  }
56795
57907
  if (opt.image.editAlign) {
56796
- (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align, j.o.imageAlignClasses);
57908
+ (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.hAlignElement)(image, align, (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.getAlignClasses)(j, image));
56797
57909
  }
56798
57910
  }
56799
57911
 
@@ -57686,6 +58798,7 @@ var cmd = function cmd(control) {
57686
58798
  /* harmony import */ var _core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70799);
57687
58799
  /* harmony import */ var _core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25726);
57688
58800
  /* harmony import */ var _core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41180);
58801
+ /* harmony import */ var _core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61477);
57689
58802
  function _array_like_to_array(arr, len) {
57690
58803
  if (len == null || len > arr.length) len = arr.length;
57691
58804
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -57740,11 +58853,7 @@ function _unsupported_iterable_to_array(o, minLen) {
57740
58853
 
57741
58854
 
57742
58855
 
57743
- // Images align with `imageAlignClasses`; the wrappers of iframes and media
57744
- // keep inline styles
57745
- var alignClasses = function alignClasses(editor, elm) {
57746
- return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, 'img') ? editor.o.imageAlignClasses : null;
57747
- };
58856
+
57748
58857
  // A Normal image sits where the text of its line is aligned (#1531)
57749
58858
  var lineAlign = function lineAlign(editor, elm) {
57750
58859
  var block = elm && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(elm, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isBlock, editor.editor) || editor.editor;
@@ -57766,7 +58875,7 @@ var lineAlign = function lineAlign(editor, elm) {
57766
58875
  }
57767
58876
  };
57768
58877
  var currentAlign = function currentAlign(editor, elm) {
57769
- return elm ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm, alignClasses(editor, elm)) : 'normal';
58878
+ return elm ? (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getHAlign)(elm, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, elm)) : 'normal';
57770
58879
  };
57771
58880
  var align = {
57772
58881
  name: 'left',
@@ -57793,23 +58902,25 @@ var align = {
57793
58902
  },
57794
58903
  exec: function exec(editor, elm, param) {
57795
58904
  var control = param.control;
57796
- if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
58905
+ // A media wrapper kept in the content (`mediaWrappers`) is aligned itself
58906
+ if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(elm) || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
57797
58907
  'img',
57798
58908
  'jodit',
57799
58909
  'jodit-media'
57800
- ]))) {
58910
+ ])) && (0,_core_helpers_utils_media_wrapper_js__WEBPACK_IMPORTED_MODULE_4__.getMediaWrapper)(editor, elm) !== elm) {
57801
58911
  return;
57802
58912
  }
57803
58913
  var command = control.args && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_1__.isString)(control.args[0]) ? control.args[0].toLowerCase() : '';
57804
58914
  if (!command) {
57805
58915
  return false;
57806
58916
  }
57807
- ;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command, alignClasses(editor, elm));
58917
+ ;(0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm, command, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, elm));
57808
58918
  if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(elm, new Set([
57809
58919
  'jodit',
57810
58920
  'jodit-media'
57811
58921
  ])) && elm.firstElementChild) {
57812
- (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(elm.firstElementChild, command);
58922
+ var media = elm.firstElementChild;
58923
+ (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.hAlignElement)(media, command, (0,_core_helpers_utils_align_js__WEBPACK_IMPORTED_MODULE_2__.getAlignClasses)(editor, media));
57813
58924
  }
57814
58925
  editor.synchronizeValues();
57815
58926
  editor.e.fire('recalcPositionPopup');
@@ -57980,6 +59091,14 @@ var align = {
57980
59091
  /* harmony import */ var _core_ui_popup_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(61259);
57981
59092
  /* harmony import */ var _modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21491);
57982
59093
  /* harmony import */ var _config_config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(24526);
59094
+ function _array_like_to_array(arr, len) {
59095
+ if (len == null || len > arr.length) len = arr.length;
59096
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
59097
+ return arr2;
59098
+ }
59099
+ function _array_without_holes(arr) {
59100
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
59101
+ }
57983
59102
  function _assert_this_initialized(self) {
57984
59103
  if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
57985
59104
  return self;
@@ -58051,6 +59170,14 @@ function _is_native_reflect_construct() {
58051
59170
  return !!result;
58052
59171
  })();
58053
59172
  }
59173
+ function _iterable_to_array(iter) {
59174
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
59175
+ return Array.from(iter);
59176
+ }
59177
+ }
59178
+ function _non_iterable_spread() {
59179
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
59180
+ }
58054
59181
  function _possible_constructor_return(self, call) {
58055
59182
  if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
58056
59183
  return _assert_this_initialized(self);
@@ -58062,10 +59189,21 @@ function _set_prototype_of(o, p) {
58062
59189
  };
58063
59190
  return _set_prototype_of(o, p);
58064
59191
  }
59192
+ function _to_consumable_array(arr) {
59193
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
59194
+ }
58065
59195
  function _type_of(obj) {
58066
59196
  "@swc/helpers - typeof";
58067
59197
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
58068
59198
  }
59199
+ function _unsupported_iterable_to_array(o, minLen) {
59200
+ if (!o) return;
59201
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
59202
+ var n = Object.prototype.toString.call(o).slice(8, -1);
59203
+ if (n === "Object" && o.constructor) n = o.constructor.name;
59204
+ if (n === "Map" || n === "Set") return Array.from(n);
59205
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
59206
+ }
58069
59207
  function _wrap_native_super(Class) {
58070
59208
  var _cache = typeof Map === "function" ? new Map() : undefined;
58071
59209
  _wrap_native_super = function(Class) {
@@ -58147,11 +59285,13 @@ function _wrap_native_super(Class) {
58147
59285
  key: "onClick",
58148
59286
  value: function onClick(node) {
58149
59287
  var _this = this;
58150
- var elements = this.elmsList, target = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'img') ? node : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, elements, this.j.editor);
58151
- if (target && this.canShowPopupForType(target.nodeName.toLowerCase())) {
59288
+ var elements = this.elmsList, mediaWrapper = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getMediaWrapper)(this.j, node), target = mediaWrapper !== null && mediaWrapper !== void 0 ? mediaWrapper : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, 'img') ? node : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(node, elements, this.j.editor);
59289
+ // A media wrapper kept in the content gets the media popup
59290
+ var type = mediaWrapper ? 'jodit-media' : target === null || target === void 0 ? void 0 : target.nodeName.toLowerCase();
59291
+ if (target && type && this.canShowPopupForType(type)) {
58152
59292
  this.showPopup(function() {
58153
59293
  return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(target, _this.j);
58154
- }, target.nodeName.toLowerCase(), target);
59294
+ }, type, target);
58155
59295
  return false;
58156
59296
  }
58157
59297
  }
@@ -58390,7 +59530,13 @@ function _wrap_native_super(Class) {
58390
59530
  {
58391
59531
  key: "_eventsList",
58392
59532
  value: function _eventsList() {
58393
- var el = this.elmsList;
59533
+ var _a;
59534
+ // Clicks on a media wrapper kept in the content (`mediaWrappers`)
59535
+ var wrapperTags = Object.values((_a = this.j.o.mediaWrappers) !== null && _a !== void 0 ? _a : {}).map(function(param) {
59536
+ var tag = param.tag;
59537
+ return tag.toLowerCase();
59538
+ });
59539
+ var el = _to_consumable_array(new Set(this.elmsList.concat(wrapperTags)));
58394
59540
  return el.map(function(e) {
58395
59541
  return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.camelCase)("click_".concat(e));
58396
59542
  }).concat(el.map(function(e) {
@@ -60515,8 +61661,6 @@ var formTemplate = function formTemplate(editor) {
60515
61661
  * Jodit Editor (https://xdsoft.net/jodit/)
60516
61662
  * Released under MIT see LICENSE.txt in the project root for license information.
60517
61663
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
60518
- */ /**
60519
- * @module plugins/media
60520
61664
  */
60521
61665
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaFakeTag = 'jodit-media';
60522
61666
  _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaInFakeBlock = true;
@@ -60524,6 +61668,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaBlocks = [
60524
61668
  'video',
60525
61669
  'audio'
60526
61670
  ];
61671
+ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.mediaWrappers = {};
60527
61672
 
60528
61673
 
60529
61674
  /***/ }),
@@ -60563,11 +61708,14 @@ function _define_property(obj, key, value) {
60563
61708
  * Process `video` and `audio`
60564
61709
  */ function media(editor) {
60565
61710
  var keyFake = 'jodit_fake_wrapper';
60566
- var _editor_options = editor.options, mediaFakeTag = _editor_options.mediaFakeTag, mediaBlocks = _editor_options.mediaBlocks, mediaInFakeBlock = _editor_options.mediaInFakeBlock;
61711
+ var _editor_options = editor.options, mediaFakeTag = _editor_options.mediaFakeTag, mediaBlocks = _editor_options.mediaBlocks, mediaInFakeBlock = _editor_options.mediaInFakeBlock, mediaWrappers = _editor_options.mediaWrappers;
60567
61712
  var wrap = function wrap(element) {
61713
+ var _a;
60568
61714
  if (element.parentNode && (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(element.parentNode, 'data-jodit_iframe_wrapper')) {
60569
61715
  element = element.parentNode;
60570
- } else {
61716
+ } else if (mediaWrappers[element.nodeName.toLowerCase()]) {
61717
+ element = (_a = (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.getMediaWrapper)(editor, element)) !== null && _a !== void 0 ? _a : (0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_3__.wrapMedia)(editor, element);
61718
+ } else if (mediaInFakeBlock) {
60571
61719
  var wrapper = editor.createInside.element(mediaFakeTag, _define_property({
60572
61720
  'data-jodit-temp': 1,
60573
61721
  contenteditable: false,
@@ -60584,12 +61732,14 @@ function _define_property(obj, key, value) {
60584
61732
  }
60585
61733
  _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(wrapper, element);
60586
61734
  element = wrapper;
61735
+ } else {
61736
+ return;
60587
61737
  }
60588
61738
  editor.e.off(element, 'mousedown.select touchstart.select').on(element, 'mousedown.select touchstart.select', function() {
60589
61739
  editor.s.setCursorAfter(element);
60590
61740
  });
60591
61741
  };
60592
- if (mediaInFakeBlock) {
61742
+ if (mediaInFakeBlock || Object.keys(mediaWrappers).length) {
60593
61743
  editor.e.on('afterGetValueFromEditor', function(data) {
60594
61744
  var rxp = new RegExp("<".concat(mediaFakeTag, "[^>]+data-").concat(keyFake, "[^>]+>([^]+?)</").concat(mediaFakeTag, ">"), 'ig');
60595
61745
  if (rxp.test(data.value)) {
@@ -74401,16 +75551,34 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('toolbarNavigation
74401
75551
 
74402
75552
 
74403
75553
 
75554
+ // Media the popup inserts go in their wrapper (see `mediaWrappers`), aligned
75555
+ // with `mediaDefaultAlign`
75556
+ function prepareMedia(jodit, element) {
75557
+ var media = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.wrapMedia)(jodit, element);
75558
+ var mediaDefaultAlign = jodit.o.mediaDefaultAlign;
75559
+ if (mediaDefaultAlign && mediaDefaultAlign !== 'normal') {
75560
+ (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.hAlignElement)(media, mediaDefaultAlign, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.getAlignClasses)(jodit, media));
75561
+ }
75562
+ return media;
75563
+ }
74404
75564
  function insertVideos(data) {
74405
75565
  var _this = this;
74406
75566
  var _a;
74407
75567
  (_a = data.files) === null || _a === void 0 ? void 0 : _a.forEach(function(file) {
74408
- _this.s.insertNode(_this.createInside.element('video', {
75568
+ _this.s.insertNode(prepareMedia(_this, _this.createInside.element('video', {
74409
75569
  controls: '',
74410
75570
  src: data.baseurl + file
74411
- }));
75571
+ })));
74412
75572
  });
74413
75573
  }
75574
+ // Embed code that is one element is prepared as media; other code goes in as
75575
+ // it is
75576
+ function prepareEmbedCode(jodit, code) {
75577
+ var box = jodit.createInside.div();
75578
+ box.innerHTML = code.trim();
75579
+ var element = box.firstElementChild;
75580
+ return element && box.childNodes.length === 1 ? prepareMedia(jodit, element) : code;
75581
+ }
74414
75582
  _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.video = {
74415
75583
  parseUrlToVideoEmbed: _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
74416
75584
  defaultWidth: 400,
@@ -74452,7 +75620,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.video = {
74452
75620
  ])
74453
75621
  ]), tabs = [], insertCode = function insertCode(code) {
74454
75622
  jodit.s.restore();
74455
- jodit.s.insertHTML(code);
75623
+ jodit.s.insertHTML(prepareEmbedCode(jodit, code));
74456
75624
  close();
74457
75625
  };
74458
75626
  jodit.s.save();